Publishing controls
PULSE drafts a great deal on its own: daily social copy, blog posts, podcast episodes, videos. Whether any of it leaves the building is decided by two layers of switches, and nothing is armed by default.
Every switch, with its default and the order to turn them on, is in one table on Switches and arming order.
The rule
armed(channel) = PULSE_APPLY_ENABLED is exactly "true"
AND the channel's own setting is onPULSE_APPLY_ENABLEDis the kill switch. It is off unless it is exactly the lowercase stringtrue. When it is off, no channel can publish, whatever else is set.- Each channel can then be narrowed. A channel with no setting of its own follows the kill switch. A channel setting can only turn a channel off. It can never turn one on when the kill switch is off.
The channels
| Channel key | What it publishes |
|---|---|
blog | A Hugo post on your website, through GitHub. See Site pipeline. |
podcast | Podcast episodes, by adding them to the public RSS feed |
audiobook | The weekly long-form book, in the same feed |
youtube | Real uploads to a YouTube channel, under the operator’s Google identity |
linkedin | Text posts as the connected member, or as the company page chosen on the LinkedIn card. The daily LinkedIn draft is written whatever this says; see below. |
instagram | Has its own control, so the channel is governed by the same switch |
spotify | Has its own control, under the same rule |
Setting a channel
A channel’s own setting comes from the first of these that holds a clear yes or no:
- An environment variable,
PULSE_PUBLISH_<CHANNEL>, for examplePULSE_PUBLISH_YOUTUBE=false. It accepts1,t,true,y,yes,onand0,f,false,n,no,off. - A config file, at
PULSE_PUBLISH_CONFIG_PATH(default/etc/runink/pulse-publishing.json), or the same JSON inline inPULSE_PUBLISH_CONFIG_JSONwhen there is no file. - The built-in default, which is on. Combined with a kill switch that is off by default, nothing publishes until someone arms the global.
The config file accepts either shape:
[{"channel": "youtube", "armed": false}]{"channels": [{"channel": "youtube", "armed": false}]}A channel missing from the file has no opinion. A file that cannot be read or parsed is ignored and changes nothing in either direction.
Checking what is armed
At startup the server logs one line per channel:
PUBLISHCFG youtube: armed=false (...); channel opinion from ...; console config: ...A refused publish logs PUBLISHCFG <channel>: DISARMED — did NOT ..., with the
layer that decided.
PULSE_APPLY_ENABLED=yes, on, 1, or TRUE does not arm anything. The
server warns at startup with PUBLISHCFG-AMBIGUOUS. Write exactly true.What disarming does to queued posts
The kill switch applies at the moment of publishing, not only when a post is
queued. A scheduled post that comes due on a disarmed channel is marked
withheld, with the reason. That is final. Re-arming does not replay the
backlog; schedule the content again to re-queue it.
Approving content does not bypass the switch either. An approval is consent to the content, and the switch is a statement about the channel.
Who may publish as the deployment
Some channels publish with the user’s own connected account (youtube,
instagram, spotify), so a user can only ever post as themselves. Others
publish as the deployment:
| Channel | Why it is the deployment’s |
|---|---|
linkedin | The user’s own LinkedIn connection (Settings → Integrations); the deployment’s LINKEDIN_ACCESS_TOKEN only for a user with no connection |
blog | The operator’s PULSE_SITE_REPO |
podcast, audiobook | The one public RSS feed at /podcast/feed.xml |
On these channels, being armed is not enough. The content’s owner must also be
listed in PULSE_PUBLISHER_USER_IDS, a comma-separated list of PULSE user
ids (the users.id column, not emails). Empty means nobody.
- A dispatch by anyone else is recorded as
withheld, with a reason naming the owner gate. It is never reported as posted, and nothing is sent. - The daily blog, podcast and audiobook engines skip other users’ campaigns
before generating, and log
SKIPPEDwith the same reason. - The feed lists only allowlisted owners’ episodes, and only for the channels
that are armed. With both
podcastandaudiobookdisarmed,/podcast/feed.xmlreturns 404.
A <user-id> is the id column of the users table.
The daily LinkedIn draft
Once a day the social engine writes one LinkedIn post per active
campaign: a hook line, short paragraphs, three to five hashtags, and a closing
link to PULSE_LINKEDIN_CTA_URL (default https://runink.org). The row
belongs to the campaign’s owner and waits on Approval with a Copy draft
button, so a person pastes it into LinkedIn.
- The draft is never scheduled. The engine writes no
scheduled_postsrow for it, and it needs no switch to be written. - A draft over LinkedIn’s 3,000-character limit is still kept, and its title
says
OVER 3000 CHARS, trim before posting. - A generation that fails, comes back empty, or is only a refusal is logged and not stored.
- One draft per campaign per day. A restart does not write a second one.
Approving a LinkedIn draft still offers it to the LinkedIn publisher. It is
recorded withheld, and nothing reaches LinkedIn, when the channel is
disarmed (PULSE_PUBLISH_LINKEDIN=false or the kill switch off), when no
LinkedIn token is configured (neither a connection nor, for a user without one, LINKEDIN_ACCESS_TOKEN), or when the owner is not in
PULSE_PUBLISHER_USER_IDS. The content stays approved, ready to copy.
PULSE_PUBLISH_LINKEDIN=false.A campaign that an audit created is a draft until someone activates it, so an audit on its own produces no daily LinkedIn draft.
Outbound calls
The one call path is an AI call (AICallService.PlaceAICall). It needs
PULSE_OUTBOUND_CALLS=true and PULSE_AI_CALLS=true, both off by
default, PULSE_APPLY_ENABLED=true, a caller whose current role is editor or
admin, and the lead’s consent, calling hours, do-not-call and attempt checks.
The Asterisk path (CallLead) is retired.
The same switch gates server writes
PULSE_APPLY_ENABLED=true is also what arms the daily blog drafting in the
social engine, and what starts the daily site-audit engine. With it off,
neither runs and neither costs model time.
It is not enough for the audit-fix modes of ApplyAuditActions (apply, commit, pr),
which write to the server’s filesystem and run git with the server’s
credentials. Those also need:
| Variable | Default | Meaning |
|---|---|---|
PULSE_AUDIT_APPLY | off | A narrowing key AND-ed with the kill switch. Unlike the channel keys it defaults off, so arming every channel does not arm server writes. Same yes/no tokens as PULSE_PUBLISH_<CHANNEL>. |
PULSE_APPLY_ROOT | none | The only directory a repo_path may resolve into. Unset refuses every mode, plan included. |
and the caller must be an administrator, read from the users table on every call.
Channel-specific safeguards
| Channel | Also needs |
|---|---|
blog | A GitHub data source with a token, PULSE_SITE_REPO, and the content owner in PULSE_PUBLISHER_USER_IDS. |
youtube | YOUTUBE_PRIVACY_STATUS. Unset means private, so an unreviewed upload is never public by accident. |
linkedin | The token on the user’s LinkedIn card (sealed in the database), else, for a user with no LinkedIn connection, LINKEDIN_ACCESS_TOKEN and LINKEDIN_AUTHOR_URN (a person or an organization URN). A company page also needs the app’s Community Management API approval. The content owner in PULSE_PUBLISHER_USER_IDS. |
podcast, audiobook | The owner in PULSE_PUBLISHER_USER_IDS, PULSE_PUBLIC_BASE_URL, and the episode’s audio must exist. Then submit <PULSE_PUBLIC_BASE_URL>/podcast/feed.xml once to each podcast platform. |
Posting to LinkedIn as a company page
The LinkedIn card under Settings → Integrations holds the token PULSE posts
with. A user who has a LinkedIn connection always posts with it; a
disconnected one posts nothing (the deployment token is not used instead). The
deployment’s LINKEDIN_ACCESS_TOKEN is used only for a user with no LinkedIn
connection at all. The server log says which token each post used, and the
channel’s readiness (ListChannelReadiness: credential_source,
author_kind, author_urn) shows it before anything is posted.
Choose who posts on the card lists the company pages the token may post as
(LinkedIn roles ADMINISTRATOR or CONTENT_ADMINISTRATOR). Pick one, and
approved posts are authored by urn:li:organization:<id>. Leave it on Me
to post as the member; PULSE then reads the member id from LinkedIn
(/v2/userinfo, which needs the openid and profile scopes).
Owner action first. LinkedIn lets an app list and post as company pages
only after it approves the app for the Community Management API. The token
then needs w_organization_social (to post) and rw_organization_admin (to
list the pages). Until then the list is empty and the card says why. Every
other gate still applies: PULSE_APPLY_ENABLED, PULSE_PUBLISH_LINKEDIN, and
the owner in PULSE_PUBLISHER_USER_IDS.
With the instance’s LinkedIn app configured (LINKEDIN_CLIENT_ID,
LINKEDIN_CLIENT_SECRET) and LINKEDIN_COMPANY_PAGES=true, Connect company
pages on the card signs in with the page scopes instead of a pasted token.
See LinkedIn.