Skip to content

docs: say what fctl keeps and sends for Slack, and add its docs page - #143

Merged
kalaspuff merged 8 commits into
mainfrom
fctl/1678-start-and-steer-agents-from-slack-with-a
Dec 2, 2026
Merged

kalaspuff merged 8 commits into
mainfrom
fctl/1678-start-and-steer-agents-from-slack-with-a

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Workspaces can now start and steer agents from Slack (hyperstructure/fctl#660), so the privacy policy says what app.fctl.sh keeps of Slack (its app's access to a Slack workspace, linked accounts, threads and their sessions, what agents read into transcripts and the option to drop it once a session ends), what it sends to Slack, the cookie that protects Slack's sign-in, and the legal bases. docs/slack.md becomes a page of the docs, "Agents from Slack" at /docs/slack under Using fctl, with its link preview.

The policy also says a Slack link keeps how the sign-in that made it was made, and what ends it, as hyperstructure/fctl#660 does. With #660 merged and its docs pinned, the build renders every page and checks their links and metadata, and the tests pass.

fctl session


Note

Low risk. It changes the privacy policy text and adds a docs page entry and its social image; no code behavior changes, though the policy wording must match what fctl does.

What it does. Updates the privacy policy to say what fctl keeps and sends when you use it from Slack (linked Slack accounts, the new cookie, retention and deletion), and adds the "Agents from Slack" docs page to the site's page list and social images. The page itself comes from fctl's docs, which the pinned fctl-docs.ref now includes.

fctl review's first look at 62aff30 · 4 files, +112 −12 · Review agent settings

fctl-sh Bot added 2 commits November 26, 2026 01:00
app.fctl.sh's privacy policy gains fctl's Slack app (fctl#620): what it keeps of a Slack workspace, people's Slack accounts and the threads that reach sessions, what goes to Anthropic, what it posts in Slack, how long each stays, and its cookie. The docs gain the page for starting agents from Slack.
@fctl-review

This comment has been minimized.

@fctl-sh

fctl-sh Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Both findings were right, and d5b7864 fixes them:

  1. Cookie count: the table lists eight cookies with __Host-fctl-slack, so the sentence now says eight.
  2. Account deletion: deleting an account deletes its linked Slack accounts (slack_accounts is among the tables api::account clears in feat: start and steer agents from Slack fctl#660), so the list now names Linear and Slack accounts.

@fctl-sh

fctl-sh Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

The build fails as this draft expects, and nothing here needs changing for it: the site renders fctl's docs at the commit in fctl-docs.ref (aa8b930cfc5c), which has no docs/slack.md, so scripts/docs.mjs stops with ENOENT … .cache/fctl/docs/slack.md. The page arrives with hyperstructure/fctl#660.

Built against that pull request's docs instead (FCTL_DOCS_DIR=<its checkout> npm run build), every page renders and the build's link and metadata checks pass, and npm test passes. Once #660 merges, fctl's CI moves fctl-docs.ref on main, and this pull request's build passes when it runs again (pushing an empty commit here starts it), so it can leave draft then.

Main grouped the docs' sidebar (#142): the Slack page, for the people who
use fctl's Slack app and the admins who connect it, joins Using fctl,
after Automation.
@fctl-sh

fctl-sh Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

The build at e84886d (the merge of main, which grouped the sidebar) fails as before, and only for that: fctl-docs.ref on main now pins hyperstructure/fctl@ed926eaf5d46, which still has no docs/slack.md, since hyperstructure/fctl#660 hasn't merged. Built against #660's docs, the merged site builds and passes its link and metadata checks, "Agents from Slack" shows under Using fctl, and its 71 tests pass. Nothing to change here; this stays a draft until #660 merges and fctl's CI moves the pin.

fctl-sh Bot added 2 commits November 29, 2026 09:25
Only the policy's updated date differed: main's, the later.
…s made

What someone asks fctl in Slack is held to that sign-in, as an access
token is (hyperstructure/fctl#660), so the policy says fctl keeps how it
was made, and that signing out everywhere, or sign-in rules that no
longer let it in, end the link.
@fctl-review

This comment has been minimized.

Comment thread legal/privacy.md Resolved
@fctl-sh

fctl-sh Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

The build at 85b665a fails for the same reason as before, and only that: fctl-docs.ref pins hyperstructure/fctl@81f42533aa53, which has no docs/slack.md, as hyperstructure/fctl#660 is still open. Built against #660's docs, this commit's site builds and passes its link and metadata checks, and its 71 tests pass. Nothing to change here: the build passes once #660 merges, fctl's CI moves the pin, and the checks run again (an empty commit here starts them).

kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Dec 1, 2026
## Summary

A workspace now connects a Slack workspace, and people there start and
steer its agents from Slack: by mentioning fctl in a channel, writing to
it in its messages (Slack's agent view), `/fctl <task>`, **Send to
fctl…** on any message, or **Start a session** on its Home tab. Each
session runs as the person who asked, on their Claude subscription, once
they link their Slack account (one link per Slack workspace, so someone
in several has several). fctl posts the session's card in the thread and
keeps it current (status, plan, pull request and checks), replies with
each turn's last message (streamed into direct messages), asks the
agent's questions with a button per answer, passes replies from people
who may message the session on to the agent, and Slack's stop button
interrupts the turn. People can get their notifications as direct
messages, and projects can post chosen events to a channel. All three of
the issue's phases are in; phase 3 is a workspace's choice to drop what
Slack's messages said from transcripts once a session ends.

Agents never hold a Slack token: `fctl slack
thread|read|history|search|reply` goes through the control plane, which
checks each conversation with Slack and lets agents read only their
session's own thread (in a channel, a private channel or a direct
message) and the public channels the workspace's admins made readable,
where the project reads them: never anyone's direct messages with fctl,
other messages of private channels, or Slack Connect channels. Each
workspace chooses what it allows on Slack's page of a new
**Integrations** tab, which now also holds GitHub and Linear (their old
addresses lead there): mentions, direct messages, which channel starts
sessions in which project, readable channels and search, agents' own
replies, notifications, project events, knowing people by their address
(only where the instance's admins allow it) and keeping Slack's words in
transcripts. Enterprise Grid org-wide installs, Slack Connect channels
and Slack's guests are refused, and the docs say they aren't supported
yet. A Slack link keeps how the browser that made it signed in, as
access tokens do, and what people ask in Slack is held to it: a
workspace's Google requirement (fctl#659) and the instance's sign-in
rules apply, signing out everywhere unlinks it, and an address match
meets no rule, as Carl Oscar Aaro chose.

- **Verified** with unit tests (fctl-domain's Slack module, the control
plane's D1 side, the web app's components), `cargo xtask check`, and end
to end in `cargo xtask dev` against a new stand-in for Slack
(`xtask/slack`, driven with `cargo xtask slack …`), which checks every
call fctl makes against Slack's documented limits: mentions in public
and private channels, direct messages, replies from linked and unlinked
people, a guest, a Slack Connect channel, questions and answers,
`/fctl`, the Home tab, stop, and agents reading a readable channel,
being refused another, and searching. That run found the Home tab's
malformed `views.publish`, fixed here. `cargo xtask dev --smoke` now
also mentions fctl in Slack and opens its Home tab.
- **Deploying:** migration 0078 and a new Durable Object class,
`SlackObject` (Socket Mode; wrangler migration v7). app.fctl.sh needs
its Slack app created from the manifest (**Admin → Slack**, or `fctl
admin slack --manifest yaml`), then `SLACK_CLIENT_ID`,
`SLACK_CLIENT_SECRET` and `SLACK_SIGNING_SECRET` as Cloudflare secrets;
`SLACK_APP_TOKEN` (Socket Mode) is only for instances Slack can't reach.
Agents get `fctl slack` with the release after this merges, through the
sandbox image; an agent whose sandbox's fctl lacks it is told that its
turns' last messages and `fctl ask` reach the thread all the same.
- **The router** now tries its routes in two halves, one after the
other. Unoptimized, as `cargo xtask dev` builds the Worker, its frame
kept a slot for every route's future (742 KB on main), and Slack's
routes pushed a password hash under it past the Worker's 1 MiB stack
("memory access out of bounds" at setup). The deepest frame is now 414
KB.

The decisions are recorded in ADR 0104, and docs/slack.md documents it
for people, with docs/self-hosting.md's manifest kept equal to fctl's by
a test.

## Screenshots

At the head of this branch, in `cargo xtask dev` against the Slack
stand-in, 1440 px wide unless they say otherwise.

The workspace page: GitHub and Linear had a tab each (before);
Integrations now holds them with Slack, each saying how it stands
(after).

| Before | After |
|---|---|
| ![The GitHub tab,
before](https://app.fctl.sh/api/v1/published/1cwII4RK4GgEC6e7RXyPYS6ztV5GmiJU348ghM3edx4/gh-before.png)
| ![Integrations, with GitHub
open](https://app.fctl.sh/api/v1/published/9XySeZq71oXoQNHIan1M5Eb2bKYwvrhkwDpdZbrqoQJ/gh-after.png)
|

Slack before a workspace connects it: what it leads to, what agents read
and never reach, and a drawn thread (dark and light).

![Slack's intro,
dark](https://app.fctl.sh/api/v1/published/8HVBcmZUoCRfZiK42WVEnU2Eua1Gtrq9IrEbPrJHE74/slack-intro-dark.png)

![Slack's intro,
light](https://app.fctl.sh/api/v1/published/RtwgUsY11VCjmgYF0ijweVErUc9AQpdvmFGKcVmxAjo/slack-intro-light.png)

Connected: what agents read there, first, then the workspace's choices
(light and dark, the whole page).

| Light | Dark |
|---|---|
| ![Slack connected,
light](https://app.fctl.sh/api/v1/published/mx4hpfObcGAPN0Vp9J0JROqdx7bL3RahsI7x39kIpoh/slack-connected-light.png)
| ![Slack connected,
dark](https://app.fctl.sh/api/v1/published/qH23lpVOFa9FYSiPGLe4YFtjhkW53WEGTbhdpom3DcB/slack-connected-dark.png)
|

On a phone (390 px): connected, and the intro.

| Connected | Intro |
|---|---|
| ![Slack on a phone,
connected](https://app.fctl.sh/api/v1/published/KWsnFUyJEM3fwCPjJhBN5YF7e43T5JdfOCelDKMlXaN/phone-slack-light.png)
| ![Slack's intro on a phone,
dark](https://app.fctl.sh/api/v1/published/wGvohUKLACtkzg5iVby0tGPv3esjEQUqe1ztEd6JFpF/phone-intro-dark.png)
|

A project's settings under Slack: whether its agents read the readable
channels, and the channel its events go to, with the line it posts.

![A project's Slack settings,
dark](https://app.fctl.sh/api/v1/published/LHmaneVdQoIcsHn1p81tQYOYP7rxrgtcVgLip1Ki4Lz/project-slack-dark.png)

Settings → Slack (your Slack accounts) and Settings → Notifications
(Tell me in Slack, with the direct message drawn).

![Settings →
Slack](https://app.fctl.sh/api/v1/published/qvpBQVzEVVesQDXDt4fLd3EnLDpGSnuE1ez0qNNuVO9/settings-slack-light.png)

![Settings →
Notifications](https://app.fctl.sh/api/v1/published/V2qDiXvXj4Lv4F2bNuSZZuPfZW8bhxLUI96DqIyjieh/notifications-light.png)

A session started in #web-team: the question asked there, the answer
clicked in Slack with who and where, fctl's replies as notices, and
Slack in the details rail.

![A session started from
Slack](https://app.fctl.sh/api/v1/published/yGjeAct8Dy1ufRgBEmto6ZdVBi5w1q35xKdWrbDawsY/session-light.png)

Admin → Slack: the app's state, the addresses Slack calls, the manifest,
where it's installed, and knowing people by their address.

![Admin →
Slack](https://app.fctl.sh/api/v1/published/FA80u0RowUKszWDU5PAc16PzZp4z5W9DCu9TsvaWD7l/admin-slack-light.png)

## Worth confirming

- **Decision:** Phase 3 is a choice each workspace makes under
Transcripts: keep what Slack's messages said (the default, on
app.fctl.sh too), or drop it once a session ends, from the transcript
and the search index, keeping who wrote what where with its link. The
session's encrypted snapshot keeps its agent's conversation until the
session is deleted, and nothing reads Slack zero-copy.
- **Decision:** Knowing people by their verified address in Slack,
instead of a link, needs the instance's admins to allow it (off by
default, so app.fctl.sh knows people only by linking) and each workspace
to turn it on.
- **Decision:** A project's agents read the workspace's readable
channels unless its maintainers turn that off, since the workspace's
admins chose those channels for agents to read.
- **Decision:** Slack's guests (single- and multi-channel) can't start
or steer sessions; fctl tells them so in a message only they see, as it
does in Slack Connect channels.
- **Decision:** fctl takes nothing from a conversation it can't see (a
private channel it isn't in, someone else's direct messages), since it
can't tell whether that one is shared with another organization: **Send
to fctl…** on a message there is refused, with how to invite fctl, and
`/fctl` there starts the session in the person's direct messages with
fctl.
- **Decision:** Where a session's thread stops taking posts (fctl was
removed from the channel, or it was archived), the agent's replies and
questions go to the direct messages of the person who asked, saying why,
rather than nowhere.
- **Assumption:** The networks an instance limits sign-ins to (fctl#657)
hold people's own sign-ins and tokens, not Slack's requests, as with
Linear's: a mention from outside them, on a phone say, still starts a
session as its linked person.
- **Assumption:** A session started in someone's direct messages with
fctl is visible in fctl to its project's members, as every session is
(fctl has no private sessions). What stays private is the conversation
in Slack: only its writer moves the session on there, and no agent reads
anyone's direct messages with fctl.
- **Assumption:** app.fctl.sh's Slack app stays out of Slack's
Marketplace for now. Slack then lets it read threads and channels once a
minute, 15 messages at a time, and offers it no Real-time Search, so
agents there search the readable channels' history instead; self-hosted
instances' apps are internal and have neither limit.

## Related

- hyperstructure/design#83
- hyperstructure/fctl-site#143

Fixes #620

[fctl session](https://app.fctl.sh/s/ses_01M8AF162KS3K6ZSDMM27AZA1K)

<!-- FCTL_REVIEW_SUMMARY -->
---

> [!WARNING]
> **High risk.** It adds a new way to sign in as a person and start
agents on their subscription, new stored data (migration 0078) and a new
Durable Object class, and it reshapes the router that every request goes
through.
>
> **What it does.** Lets people start and steer a workspace's agents
from Slack by mention, direct message, `/fctl`, a message shortcut or
the Home tab. Sessions run as the person who linked their Slack account,
fctl keeps the session's card and replies in the thread, and agents read
Slack only through `fctl slack` calls that the control plane checks. It
adds an Integrations tab for each workspace's Slack choices, admin setup
for the Slack app, and ADR 0104 with docs.
>
> **Deploy steps.** Migration 0078 and the new `SlackObject` Durable
Object (wrangler migration v7) ship with it, and app.fctl.sh needs its
Slack app created and `SLACK_CLIENT_ID`, `SLACK_CLIENT_SECRET` and
`SLACK_SIGNING_SECRET` set as secrets.
>
> <sub>[fctl
review](https://app.fctl.sh/s/ses_01M8PBVNS65TX5A9QMZ4V64T0J)'s first
look at
[`2e7eccb`](2e7eccb)
· 213 files, +32146 −219 · [Review agent
settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub>

<!-- /FCTL_REVIEW_SUMMARY -->

---------

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
@fctl-sh
fctl-sh Bot marked this pull request as ready for review December 1, 2026 09:58
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner December 1, 2026 09:58
Only the policy's updated date differed: main's, the later. Its AWS
Lambda runner sections (#145) and this branch's Slack ones are both
kept.
@kalaspuff
kalaspuff merged commit 2b534d7 into main Dec 2, 2026
5 checks passed
@kalaspuff
kalaspuff deleted the fctl/1678-start-and-steer-agents-from-slack-with-a branch December 2, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant