Repository navigation
Inbox: on only once the person turns it on - #3707
Closed
backnotprop wants to merge 16 commits into
Closed
backnotprop wants to merge 16 commits into
backnotprop wants to merge 16 commits into
Conversation
One per-computer record in state.json (inboxOn) says whether the person turned the Plannotator Inbox on here. isInboxOn reads it, and every gate uses it: the agents' tool on Claude Code, Pi, OpenCode, DSH, Cline, OpenClaw and Hermes, the reminder, the MCP server, and every start of the Inbox. While it is off, a start answers one line telling the agent to ask in the chat. The person's own plannotator inbox, /plannotator-inbox and plannotator inbox on turn it on; plannotator inbox off turns it off and removes Plannotator's untouched notes. An install from before the rule is decided once: the window used or plannotator inbox run keeps it on; an Inbox only agents started goes quiet.
Inbox Settings → General opens with "This computer": the Inbox is on,
and one button turns it off (POST /api/inbox/off): the record says off,
Plannotator's untouched notes go, the window says how to turn it back
on, and the Inbox stops. No confirmation.
Plan review, code review and annotate Settings get a Plannotator Inbox
row, shown only to someone who turned the Inbox on. POST /api/config
{ inboxOn } turns it off or back on, on the Bun and Pi servers.
The plannotator skill, the CLI's inbox usage, llms.txt's setup step and the user docs say the Inbox is off until the person runs plannotator inbox, and that agents ask in the chat and never turn it on themselves. The /plannotator-inbox runners on Droid, Amp, Gemini and the Claude skill mark their run as the person's. docs/agent-guides/inbox-on.md is the guide: the record, what counts as the person, the refusal, Turn off, the one-time decision for existing installs, version skew and the tests.
- The person's terminal only: no agent marker, no login-item marker, and a terminal on stdin and stdout. An agent the marker list does not know, and the routines' start at login, can no longer turn the Inbox on. - Turning the Inbox off removes the routines' start at login. - /plannotator-inbox passes a hidden --from-slash-command flag instead of an environment variable; the Claude Code mod passes it only for a command the person typed. Every code runner retries without it for an older CLI. - The agents' refusal no longer names what turns the Inbox on. - The record is written to state.json alone, as a compare-and-set, and never needs config.json. A fresh computer writes nothing; a lost record stays off. - Notes are removed file by file, only blocks Plannotator wrote; what cannot go is recorded once and not retried. The note writers check the gate. - The mod keeps today's behaviour with a CLI older than the rule, and runs migrate once, bounded. - No page turns the Inbox on; the Settings row only turns it off. - MCP initialize says why there are no tools; call refuses as inbox_off; status shows on/off and why; every decision is logged. - Tests for each host while off, the CLI as a process, and the compiled binary with the real rule.
- The engine-harness test expects /plannotator-inbox's hidden flag. - The off route test reaches the scratch home through the agent environment. - The inbox usage names on, off and migrate one by one. - The OpenClaw host test turns the test knob on; the CLI test accepts localhost in the opened address.
- No person-vs-agent detection: a run of plannotator inbox (bare, --no-open, --open; /plannotator-inbox runs it) turns the Inbox on. --background, a detached start, restart and the routines' start at login never do, and start nothing while it is off. The hidden flag, plannotator inbox on, the person's off line and notes 'left' are gone. - The test knob counts only PLANNOTATOR_TEST_INBOX_ON=1 or the test sandbox marker; a HOME under /tmp is the real rule. The e2e envs, scratchEnv() and the fake agents' env set the knob; tests/e2e-spawn-home.test.ts checks it. - The decided mark keeps a copy of the record: a lost or corrupt state.json comes back as it was; with no copy the store is read again. - A store read error counts as used; a slow store is kept on as update-slow. - The migration's off removes the start at login too; a start at login that cannot be removed is reported, never swallowed. - uninstall --purge removes the decided mark. - Settings: the off row reads as off (only the switch dimmed), plannotator inbox as code; Inbox Settings' Turn the Inbox off has a visible outline.
… plannotator inbox, after telling the person)
# Conflicts: # apps/mobile/contract/parity/ledger.json
- T1: a start at login written before its marker (0.29) is known by its launcher: launchd's label, or the systemd unit's own main process. It is given the marker while the Inbox is on and removed while it is off. - T2: the run reads the login-item markers once and drops them from its environment, so nothing the Inbox starts inherits them. - T4: the Settings switch turns the Inbox on too (by: settings), both runtimes; the row is a plain on/off switch. - The decided mark is written under config.json's lock right after state.json, and removed when it cannot be written. The mod reads its copy itself. - Compiled-binary proofs: --open over SSH with no terminal, --no-open turns it on, after off the start at login and --background are refused, and an install from before the rule is decided once.
…nbox --open), and the hands-on's other fixes Every setup text (the setup script, the llms Inbox page, every agent page, the skill, inbox --help) now gives plannotator inbox --open as its first Inbox step, before any connection, restart or tool to see; none gives an agent --background or bare plannotator inbox. --open connects the agents it finds. A walk of every page (unit) and of the script, the llms page and the Claude Code and Codex pages against the compiled binary (e2e) hold it. Also: inbox --help lists no inbox on and says the tool and calls need the Inbox on; an unreadable store is kept on as update-unreadable; the agent-only status words no longer claim only agents ran it; the migration stops an old Inbox it decides off, and status says how to stop one still running; bare plans while off says the Inbox is off and saves nothing; the Inbox Settings row names both ways back on; the skill's Inbox paragraph runs --open only when asked to set up or open the Inbox.
# Conflicts: # tests/dom-test-list.txt
# Conflicts: # apps/mobile/contract/parity/ledger.json
… e2e envs get the test knob
Owner
Author
|
Superseded by #3729, which does the same job with three small changes: the Inbox stays off on a computer until the person runs it, and nothing changes for anyone who already has. Closing this larger draft; nothing from it needs to be carried over. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner's rule: installing Plannotator does not turn the Inbox on. You have to run
plannotator inboxfirst.The fact.
state.json→inboxOn({ on, at, by, notes? }), per computer.isInboxOnin@plannotator/shared/inbox/inbox-onis the one reader. The pure contract is@plannotator/shared/inbox/inbox-on-contract, copied byte for byte into the Claude Code mod. The decided mark (inbox-on-decided) keeps a copy of the last record, so a lost or corrupt state.json comes back as it was; with no copy, the store is read again.What turns it on: a run of
plannotator inbox(bare,--no-open,--open), whoever runs it (/plannotator-inboxjust runs it), and the Settings switch in plan review, code review and annotate. No person-vs-agent detection and no guard (the owner's ruling).What never turns it on, and starts nothing while it is off:
--background, a detached start (an agent call's background start, the window's Restart, an update's restart),plannotator inbox restart, the routines' start at login, hooks, the MCP shim, tool calls, send/read subcommands, installers, updates. A start at login written before its marker (0.29) is known by its launcher (launchd's label, or the systemd unit's main process); it is given the marker while the Inbox is on and removed while it is off. The run drops its markers from its environment, so nothing the Inbox starts inherits them.Gates:
ensureInboxRunning, so every CLI side-effect start refusesTurn it off: Inbox Settings → General, the plan review / code review / annotate Settings row, or
plannotator inbox off. Stops the Inbox, removes the routines' start at login (a failure to remove it is reported), removes Plannotator's untouched notes.The start at login and another data dir. There is one start at login per account (a fixed path:
~/Library/LaunchAgents/ai.plannotator.inbox.plist, or the systemd unitplannotator-inbox.service), whatever data dir it names. Turning the Inbox off in one data dir removes it even when it was written for another data dir. That other data dir's record is not touched: its Inbox stays on, and its next start with routines on writes the item again. While a data dir is off, a login item that names it starts nothing.Existing installs, decided once:
plannotator inbox(agents.json): onupdate-slow); a store file that cannot be read: on (update-unreadable), and status says soplannotator inboxonly withPLANNOTATOR_INBOX_CONNECT=0and never clicked anything in the window leaves no evidence on disk (0.29's start trace is written only with the debug log on, and opening the window writes nothing by itself), so they are decided off. Status says "nothing here showed the person had used the Inbox or run plannotator inbox"; they turn it on again withplannotator inbox.The first setup. Every setup text (the setup script
/inbox/prompt.md, the llms Inbox page, every/llms/agents/<slug>.md, the plannotator skill,inbox --help's "Connecting yourself") givesplannotator inbox --openas its first Inbox step, before any connection, restart or "you should see". It turns the Inbox on, starts it detached, opens it, connects the agents it finds (new: as bare does), prints the URL and returns, with or without a screen. No setup text gives an agent--background(refused while off) or bareplannotator inbox(it serves in the foreground). Held byapps/marketing/setup-order.test.ts(every page),apps/hook/server/inbox-help-setup.test.ts(the guide, its usage, the skill) and the compiled-binary walk intests/e2e/inbox.spec.ts.plannotator uninstall --purgeremoves the record and the decided mark; a plain uninstall keeps both, like the rest of the person's data.Draft: the agent-facing words pass waits for the owner.