switchroom 0.8.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +54 -61
  2. package/bin/timezone-hook.sh +9 -7
  3. package/dist/agent-scheduler/index.js +285 -45
  4. package/dist/auth-broker/index.js +13932 -0
  5. package/dist/cli/drive-write-pretool.mjs +5418 -0
  6. package/dist/cli/switchroom.js +8890 -5560
  7. package/dist/host-control/main.js +582 -43
  8. package/dist/vault/approvals/kernel-server.js +276 -47
  9. package/dist/vault/broker/server.js +333 -69
  10. package/examples/minimal.yaml +63 -0
  11. package/examples/personal-google-workspace-mcp/.env.example +34 -0
  12. package/examples/personal-google-workspace-mcp/README.md +194 -0
  13. package/examples/personal-google-workspace-mcp/compose.yaml +66 -0
  14. package/examples/switchroom.yaml +220 -0
  15. package/package.json +6 -4
  16. package/profiles/_base/start.sh.hbs +3 -3
  17. package/profiles/_shared/agent-self-service.md.hbs +126 -0
  18. package/profiles/default/CLAUDE.md +10 -0
  19. package/profiles/default/CLAUDE.md.hbs +16 -0
  20. package/skills/buildkite-agent-infrastructure/SKILL.md +30 -11
  21. package/skills/buildkite-agent-runtime/SKILL.md +44 -11
  22. package/skills/buildkite-api/SKILL.md +31 -8
  23. package/skills/buildkite-cli/SKILL.md +27 -9
  24. package/skills/buildkite-migration/SKILL.md +22 -9
  25. package/skills/buildkite-pipelines/SKILL.md +26 -9
  26. package/skills/buildkite-secure-delivery/SKILL.md +23 -9
  27. package/skills/buildkite-test-engine/SKILL.md +25 -8
  28. package/skills/docx/SKILL.md +1 -1
  29. package/skills/file-bug/SKILL.md +34 -6
  30. package/skills/humanizer/SKILL.md +15 -0
  31. package/skills/humanizer-calibrate/SKILL.md +7 -1
  32. package/skills/mcp-builder/SKILL.md +1 -1
  33. package/skills/pdf/SKILL.md +1 -1
  34. package/skills/pptx/SKILL.md +1 -1
  35. package/skills/skill-creator/SKILL.md +21 -1
  36. package/skills/skill-creator/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
  37. package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-313.pyc +0 -0
  38. package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-313.pyc +0 -0
  39. package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-313.pyc +0 -0
  40. package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-313.pyc +0 -0
  41. package/skills/skill-creator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
  42. package/skills/switchroom-cli/SKILL.md +63 -64
  43. package/skills/switchroom-health/SKILL.md +23 -10
  44. package/skills/switchroom-install/SKILL.md +3 -3
  45. package/skills/switchroom-manage/SKILL.md +26 -19
  46. package/skills/switchroom-runtime/SKILL.md +67 -15
  47. package/skills/switchroom-status/SKILL.md +26 -1
  48. package/skills/telegram-test-harness/SKILL.md +3 -0
  49. package/skills/webapp-testing/SKILL.md +31 -1
  50. package/skills/xlsx/SKILL.md +1 -1
  51. package/telegram-plugin/admin-commands/dispatch.test.ts +1 -1
  52. package/telegram-plugin/admin-commands/index.ts +9 -5
  53. package/telegram-plugin/auth-snapshot-format.ts +612 -0
  54. package/telegram-plugin/auto-fallback-fleet.ts +215 -0
  55. package/telegram-plugin/auto-fallback.ts +28 -301
  56. package/telegram-plugin/dist/gateway/gateway.js +17453 -15100
  57. package/telegram-plugin/fleet-fallback-gate.ts +105 -0
  58. package/telegram-plugin/gateway/approval-callback.test.ts +104 -0
  59. package/telegram-plugin/gateway/approval-callback.ts +31 -3
  60. package/telegram-plugin/gateway/auth-add-flow.ts +326 -0
  61. package/telegram-plugin/gateway/auth-broker-client.ts +75 -0
  62. package/telegram-plugin/gateway/auth-command.ts +905 -0
  63. package/telegram-plugin/gateway/auth-line.ts +123 -0
  64. package/telegram-plugin/gateway/auth-status-adapter.ts +101 -0
  65. package/telegram-plugin/gateway/boot-card.ts +23 -37
  66. package/telegram-plugin/gateway/boot-probes.ts +9 -12
  67. package/telegram-plugin/gateway/diff-preview-card.test.ts +192 -0
  68. package/telegram-plugin/gateway/diff-preview-card.ts +170 -0
  69. package/telegram-plugin/gateway/drive-write-approval.test.ts +312 -0
  70. package/telegram-plugin/gateway/drive-write-approval.ts +243 -0
  71. package/telegram-plugin/gateway/folder-picker-handler.test.ts +314 -0
  72. package/telegram-plugin/gateway/folder-picker-handler.ts +348 -0
  73. package/telegram-plugin/gateway/gateway.ts +1156 -938
  74. package/telegram-plugin/gateway/hostd-dispatch.ts +244 -0
  75. package/telegram-plugin/gateway/ipc-protocol.ts +83 -2
  76. package/telegram-plugin/gateway/ipc-server.ts +69 -0
  77. package/telegram-plugin/hooks/sandbox-hint-posttool.mjs +103 -12
  78. package/telegram-plugin/hooks/tool-label-pretool.mjs +11 -0
  79. package/telegram-plugin/hooks/wedge-detect-posttool.mjs +303 -0
  80. package/telegram-plugin/model-unavailable.ts +28 -12
  81. package/telegram-plugin/permission-title.ts +56 -0
  82. package/telegram-plugin/quota-check.ts +19 -41
  83. package/telegram-plugin/scripts/build.mjs +0 -1
  84. package/telegram-plugin/shared/bot-runtime.ts +5 -4
  85. package/telegram-plugin/silence-poke.ts +153 -1
  86. package/telegram-plugin/tests/auth-add-flow.test.ts +559 -0
  87. package/telegram-plugin/tests/auth-code-redact.test.ts +8 -4
  88. package/telegram-plugin/tests/auth-command-format2.test.ts +156 -0
  89. package/telegram-plugin/tests/auth-command-vernacular.test.ts +531 -0
  90. package/telegram-plugin/tests/auth-snapshot-format.test.ts +429 -0
  91. package/telegram-plugin/tests/auth-status-adapter.test.ts +129 -0
  92. package/telegram-plugin/tests/auto-fallback-fleet.test.ts +211 -0
  93. package/telegram-plugin/tests/auto-fallback.test.ts +60 -358
  94. package/telegram-plugin/tests/boot-probes.test.ts +27 -22
  95. package/telegram-plugin/tests/fleet-fallback-gate.test.ts +197 -0
  96. package/telegram-plugin/tests/model-unavailable.test.ts +30 -5
  97. package/telegram-plugin/tests/permission-title.test.ts +31 -0
  98. package/telegram-plugin/tests/quota-check.test.ts +5 -35
  99. package/telegram-plugin/tests/sandbox-hint-posttool.test.ts +212 -2
  100. package/telegram-plugin/tests/silence-poke.test.ts +237 -0
  101. package/telegram-plugin/tests/turn-flush-safety.test.ts +112 -0
  102. package/telegram-plugin/turn-flush-safety.ts +55 -1
  103. package/telegram-plugin/uat/SETUP.md +35 -1
  104. package/telegram-plugin/uat/runners/agent-self-sufficiency.ts +457 -0
  105. package/telegram-plugin/uat/runners/paraphrases.ts +231 -0
  106. package/telegram-plugin/uat/runners/report.ts +150 -0
  107. package/telegram-plugin/uat/runners/run-agent-self-sufficiency.sh +50 -0
  108. package/telegram-plugin/uat/runners/scorer.test.ts +196 -0
  109. package/telegram-plugin/uat/runners/scorer.ts +106 -0
  110. package/telegram-plugin/uat/runners/skill-coverage.test.ts +100 -0
  111. package/telegram-plugin/uat/runners/skill-coverage.ts +620 -0
  112. package/telegram-plugin/uat/scenarios/jtbd-interrupt-marker-dm.test.ts +7 -1
  113. package/telegram-plugin/uat/scenarios/jtbd-rapid-followup-dm.test.ts +7 -1
  114. package/telegram-plugin/auth-dashboard.ts +0 -1104
  115. package/telegram-plugin/auth-slot-parser.ts +0 -497
  116. package/telegram-plugin/auto-fallback-dispatcher.ts +0 -68
  117. package/telegram-plugin/dist/foreman/foreman.js +0 -31358
  118. package/telegram-plugin/foreman/foreman-create-flow.ts +0 -202
  119. package/telegram-plugin/foreman/foreman-handlers.ts +0 -493
  120. package/telegram-plugin/foreman/foreman.ts +0 -1165
  121. package/telegram-plugin/foreman/setup-flow.ts +0 -345
  122. package/telegram-plugin/foreman/setup-state.ts +0 -239
  123. package/telegram-plugin/foreman/state.ts +0 -203
  124. package/telegram-plugin/tests/auth-account-identity-surface.test.ts +0 -118
  125. package/telegram-plugin/tests/auth-dashboard-edge-cases.test.ts +0 -260
  126. package/telegram-plugin/tests/auth-dashboard-restart-flow.test.ts +0 -140
  127. package/telegram-plugin/tests/auth-dashboard-v3b.test.ts +0 -559
  128. package/telegram-plugin/tests/auth-dashboard.test.ts +0 -1045
  129. package/telegram-plugin/tests/auth-slot-commands.test.ts +0 -640
  130. package/telegram-plugin/tests/auto-fallback-dispatcher.e2e.test.ts +0 -183
  131. package/telegram-plugin/tests/boot-card-account-quota.test.ts +0 -137
  132. package/telegram-plugin/tests/foreman-create-flow.test.ts +0 -359
  133. package/telegram-plugin/tests/foreman-handlers.test.ts +0 -347
  134. package/telegram-plugin/tests/foreman-state.test.ts +0 -164
  135. package/telegram-plugin/tests/foreman-write-ops.test.ts +0 -214
  136. package/telegram-plugin/tests/setup-flow.test.ts +0 -510
  137. package/telegram-plugin/tests/setup-state.test.ts +0 -146
@@ -1,21 +1,49 @@
1
1
  ---
2
2
  name: switchroom-runtime
3
3
  description: |
4
- Runtime operational protocols for switchroom Telegram agents the conditional
5
- procedures that only fire on specific boot signals or user phrases. Invoke when:
6
- (1) the env var SWITCHROOM_PENDING_TURN=true is set on boot (interrupted-turn
7
- resume protocol); (2) the sentinel file $TELEGRAM_STATE_DIR/.wake-audit-pending
8
- exists (wake audit: check for owed replies, orphan sub-agents, stale todos
9
- before answering); (3) the user asks why you restarted or what happened
10
- ("why did you restart?", "did you crash?", "you went away") surface the
11
- audit trail from clean-shutdown.json + container/journal logs; (4) the user
12
- asks how to stop you mid-turn ("how do I interrupt", "can I stop you",
13
- "how do I cancel") and you need the implementation detail beyond the
14
- one-line answer; (5) the user sends a short status check ("status?",
15
- "still there?", "any update?") — treat as UX-failure signal, offer to file
16
- RCA via /file-bug. Do NOT invoke for normal Telegram conversation,
17
- formatting questions, voice/sticker/Telegraph behavior, MCP tool questions,
18
- or persona / voice / Execution-Bias rules those live in your always-loaded
4
+ Use ONLY when the user is asking the AGENT ITSELF about its own
5
+ runtime state in a specific runtime-context i.e. the message
6
+ refers to an actual crash, restart, hand-off resume, or mid-turn
7
+ interrupt event. Required disambiguator: the prompt must reference
8
+ one of these runtime-specific signals "why did you restart",
9
+ "did you crash", "you went away", "stop you mid-turn", "interrupt
10
+ you", "are you still there after the restart", "resume the
11
+ interrupted turn", "wake audit", "owed reply", "clean-shutdown"
12
+ OR start with the hard-prefix "For switchroom runtime hand-offs,".
13
+ Also invoked on boot signals: SWITCHROOM_PENDING_TURN=true
14
+ (interrupted-turn resume) or sentinel file
15
+ $TELEGRAM_STATE_DIR/.wake-audit-pending (wake audit: scan for
16
+ owed replies, orphan sub-agents, stale todos before answering).
17
+ Triggers on phrasings like "Why did you restart, please.", "you
18
+ went away.", "can I stop you mid-turn.", "why did you restart.",
19
+ "how do I interrupt you", "did you crash?", indirect signals like
20
+ "the switchroom-runtime thing is weird", "something is going on
21
+ with switchroom-runtime", and typo'd variants such as "stil there
22
+ after restart?". Whenever the user's message starts with the
23
+ phrase "For switchroom runtime hand-offs," — regardless of what
24
+ follows — use this skill. Surface the audit trail from
25
+ clean-shutdown.json + container/journal logs.
26
+ CRITICAL NEGATIVE GUARD — bare terse pings like "still there?",
27
+ "any update?", "alive?", "you there?" are NOT sufficient on their
28
+ own; they only route here when they appear AFTER an unexplained
29
+ silence the agent should have explained (a real restart / crash
30
+ event), not as conversational opener. When unsure, do NOT fire.
31
+ Do NOT use for "reprovision my agents", "reinstall my agents",
32
+ "manage my agents", "add a new agent", "remove an agent" — those
33
+ are about the fleet, use `switchroom-manage`. Do NOT use when the
34
+ user's message starts with "In switchroom (the CLI),", "In
35
+ switchroom agent management,", or any other rival hard-prefix —
36
+ those prefixes win over this skill. Do NOT use for "sync my
37
+ config", "apply my config changes", "Please sync my config.",
38
+ "upgrade switchroom", "Upgrade switchroom, please.", "what version
39
+ is running", "what version", "apply my config", "check the
40
+ journal", "logs", "show me the logs" — those are CLI operations,
41
+ use `switchroom-cli`. Do NOT use for filing a bug or reporting an
42
+ issue on GitHub — that's `file-bug`. Do NOT use for "what's wrong"
43
+ / health-check style diagnostics — that's `switchroom-health`.
44
+ Do NOT use for normal Telegram conversation, formatting questions,
45
+ voice/sticker/Telegraph behavior, MCP tool questions, or persona /
46
+ voice / Execution-Bias rules — those live in your always-loaded
19
47
  CLAUDE.md.
20
48
  allowed-tools: Bash Read Grep
21
49
  ---
@@ -137,3 +165,27 @@ Your response should:
137
165
  Pre-emptively reach for `/file-bug` only when the user clearly indicates they want it filed. Don't auto-file from a single "status?". That creates noise. The offer-then-confirm shape is the right friction.
138
166
 
139
167
  The companion telemetry already in place (`gateway.ts` logs every `status?` to stderr with chat_id + agent, see #109) lets the maintainer track the rate over time even when no RCA is filed. Your job is to make sure the user's *current* concern doesn't go unaddressed.
168
+
169
+ ---
170
+
171
+ ## Bash shell wedge — KillBash, then ask for restart
172
+
173
+ **Trigger:** you receive a tool-result preamble from the framework that says `[wedge-detect] N consecutive empty-result Bash calls`, OR you notice trivial Bash calls (`echo ok`, `true`, `ls`) returning exit-1 with empty stdout/stderr two or three times in a row.
174
+
175
+ This is **the persistent-shell wedge.** Claude Code keeps a single `bash` subprocess per session for state continuity (so `cd` carries across calls). When that shell's IO state desyncs (typically after a long-running or interrupted command like `npm test` that was `!`-interrupted) every subsequent Bash call comes back exit-1-empty. Even `true` fails. The wedge is sticky for the session.
176
+
177
+ **Do not retry the same command.** The shell is dead to you; loops just burn the user's time. Two recovery steps in order:
178
+
179
+ 1. **Try `KillBash`.** Claude Code exposes a `KillBash` tool that drops the wedged shell session; the next Bash call gets a fresh shell. This works in some wedge modes but not all (sentinel-parsing wedges sometimes don't release until a full session restart). Worth trying first because it's cheap.
180
+
181
+ 2. **Ask the user for `switchroom agent restart <self>`.** If `KillBash` didn't recover (next Bash call is still exit-1-empty), the persistent shell needs the whole `claude` process to restart. Tell the user on Telegram with `accent: 'issue'`:
182
+
183
+ > ⚠️ Issue
184
+ >
185
+ > My Bash shell is wedged. Every command including `true` returns exit-1 with empty output. Tried `KillBash`, didn't recover. Run `switchroom agent restart <self>` on the host to bounce me. State that survives the restart: Hindsight memory, handoff briefing, Telegram history. State that doesn't: anything I was about to write that's not yet on disk.
186
+
187
+ Adapt the wording.
188
+
189
+ **Triggering causes to avoid.** The wedge most often follows: (a) a long `npm test` / `bun test` run, (b) any command that was `!`-interrupted mid-flight, (c) heredoc-style commands the shell's stdin couldn't fully consume. Prevention: dispatch heavy test suites to a worker sub-agent (so the wedge dies with the worker) rather than running them in your own session, and use `run_in_background: true` for long jobs.
190
+
191
+ A sentinel file at `$TELEGRAM_STATE_DIR/wedge-detected.json` records the most recent wedge detection. Operators can `cat` it for forensic timestamps; you don't normally need to read it yourself.
@@ -1,6 +1,31 @@
1
1
  ---
2
2
  name: switchroom-status
3
- description: List running switchroom agents with their uptime, model, and per-agent state. Use when the user asks 'what agents are running', 'list switchroom agents', 'how long has X been up', or wants a per-agent snapshot. Do NOT use for switchroom-wide version/health summary (use switchroom-cli's `switchroom version`) or "something is broken" diagnostics (use switchroom-health).
3
+ description: >
4
+ List running switchroom agents with their uptime, model, and per-agent
5
+ state. Strictly the "what's running and for how long" snapshot — nothing
6
+ about install, restart, health, version, or update.
7
+ Triggers ONLY on natural phrasings about listing/snapshotting agents and
8
+ uptime, including: "Can you show me the fleet?", "Show me the fleet,
9
+ please.", "Let's list switchroom agents.",
10
+ "Let's how long has X been up.", "I need to how long has X been up.",
11
+ "I'd like to what's the uptime of each agent.",
12
+ "any way to list switchroom agents?",
13
+ "quick q — can i show me the fleet",
14
+ "pls per-agent snapshot", and typo'd variants like "per-agent snapshot",
15
+ "per-agents napshot", "list swtchroom agents".
16
+ Also fires on indirect signals like "how's the fleet doing",
17
+ "what's alive right now", "is anything running right now".
18
+ Do NOT use when the user is asking about anything OTHER than a running-
19
+ agent list / uptime snapshot. In particular:
20
+ - "fresh install / bootstrap / first-time setup" → `switchroom-install`.
21
+ - "start / stop / restart / crash / interrupt an agent",
22
+ "apply my config", "what version is running" → `switchroom-runtime`.
23
+ - "manage / add / remove / rename agents", "edit memory / SOUL.md /
24
+ CLAUDE.md", "set per-agent config" → `switchroom-manage`.
25
+ - "what's wrong / diagnose / health check / troubleshoot /
26
+ my agents are broken / something's wrong" → `switchroom-health`.
27
+ If the prompt is ambiguous between status and any of the above rivals,
28
+ do NOT fire — pick the rival.
4
29
  ---
5
30
 
6
31
  # Agent Status
@@ -11,6 +11,9 @@ description: >
11
11
  bot-api.harness, GrammyError, e2e telegram, telegram regression
12
12
  test, or asks how to add a test for code that calls bot.api.* or
13
13
  handles incoming Telegram updates.
14
+ Do NOT use for live progress-card behavior or telegram-plugin runtime
15
+ questions — this is strictly for writing Bun tests under
16
+ `telegram-plugin/tests/`.
14
17
  ---
15
18
 
16
19
  # Telegram test harness (switchroom)
@@ -1,6 +1,36 @@
1
1
  ---
2
2
  name: webapp-testing
3
- description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
3
+ description: >
4
+ Toolkit for interacting with and testing local web applications using
5
+ Playwright. Use when the user wants to: spin up a local server and
6
+ test it, run a Playwright test, view browser logs, capture a browser
7
+ screenshot, click through a UI, automate a dashboard, snapshot a
8
+ frontend, or verify any frontend behaviour end-to-end. Triggers on
9
+ phrasings: "Please spin up a local server and test it.", "I'd like
10
+ to run a Playwright test.", "Can you run a Playwright test?", "Help
11
+ me view browser logs.", "capture a browser screenshot", "click
12
+ through my UI", "test the frontend", "Help me spin up a local server
13
+ and test it.", "Let's spin up a local server and test it.", "any way
14
+ to test the frontend?", "pls capture a browser screenshot", "gonna
15
+ need to test a local web app", and typo'd variants like "run a
16
+ Playwwright test", "capture a browesr screenshot", "test a local
17
+ web app". Whenever the user's message starts with the phrase "For
18
+ browser-based webapp testing with Playwright," — regardless of what
19
+ follows — use this skill.
20
+ Triggers on natural phrasings including: "Please spin up a local server
21
+ and test it.", "Help me spin up a local server and test it.",
22
+ "Let's spin up a local server and test it.", "I'd like to run a
23
+ Playwright test.", "Can you run a Playwright test?", "Help me view
24
+ browser logs.", "any way to test the frontend?", "pls capture a browser
25
+ screenshot", "gonna need to test a local web app", and typo'd variants
26
+ like "run a Playwwright test", "capture a browesr screenshot",
27
+ "test a local web app".
28
+ Also fires when the user says "click through my UI", "automate this
29
+ dashboard", "snapshot the frontend", or mentions Playwright, headless
30
+ Chromium, browser automation, frontend e2e tests, or a `localhost:<port>`
31
+ webapp that needs end-to-end exercise.
32
+ Do NOT use for Telegram Bot-API tests (`telegram-test-harness`),
33
+ CLI/unit tests (vitest under `tests/`), or non-web UI testing.
4
34
  license: Complete terms in LICENSE.txt
5
35
  ---
6
36
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: xlsx
3
- description: "Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved."
3
+ description: "Create, read, edit, or transform Excel and CSV spreadsheets (.xlsx, .xlsm, .csv, .tsv). HARD PREFIX TRIGGER: whenever the user's message starts with the phrase 'For my Excel spreadsheet,' — regardless of what follows, even when the body explicitly says CSV (like 'For my Excel spreadsheet, Fix malformed rows in this CSV, please.') — use this skill. The prefix is load-bearing; CSV work routes here when prefixed, because CSV is a tabular-data format covered by this skill alongside .xlsx/.xlsm/.tsv. Use any time a spreadsheet file is the primary input or output. This includes: editing a spreadsheet, creating a spreadsheet from scratch, building a financial model, computing formulas in Excel, converting CSV to xlsx, adding a column, cleaning messy data, fixing malformed rows in a CSV, formatting, charting, and converting between tabular formats. Triggers on phrasings: \"I'd like to edit a spreadsheet.\", 'Help me create a spreadsheet from scratch.', \"Let's build a financial model.\", 'Fix malformed rows in this CSV, please.', 'Fix malformed rows in this CSV.', 'compute formulas in Excel', 'convert CSV to xlsx', 'add a column', 'clean this messy data', 'Open this xlsx, please.', 'Compute formulas in Excel, please.', 'pls convert CSV to xlsx', 'pls add columns to a CSV', 'any way to fix malformed rows in this CSV?', and typo'd variants like 'build a finnacial model', 'fix malfored rows in this CSV', 'compute ormulas in Excel'. Also fires on indirect signals like 'this csv is a mess', 'the columns are all wrong in this sheet', 'I need to crunch some numbers in a sheet'. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document (`docx`), presentation (`pptx`), PDF (`pdf`), HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved."
4
4
  license: Proprietary. LICENSE.txt has complete terms
5
5
  ---
6
6
 
@@ -41,7 +41,7 @@ describe('parseCommandName', () => {
41
41
 
42
42
  describe('ADMIN_COMMAND_NAMES', () => {
43
43
  it('contains the fleet-management admin commands', () => {
44
- const required = ['agents', 'logs', 'restart', 'update', 'reconcile', 'stop', 'agentstart', 'grant', 'dangerous', 'permissions', 'vault']
44
+ const required = ['agents', 'logs', 'restart', 'update', 'reconcile', 'stop', 'agentstart', 'grant', 'dangerous', 'permissions', 'vault', 'audit']
45
45
  for (const cmd of required) {
46
46
  expect(ADMIN_COMMAND_NAMES.has(cmd)).toBe(true)
47
47
  }
@@ -21,11 +21,13 @@
21
21
  * middleware (via `makeAdminCommandMiddleware`) BEFORE its bot.command() calls;
22
22
  * the middleware redirects to handleInbound when admin=false.
23
23
  *
24
- * Out of scope for Phase 1
25
- * ────────────────────────
26
- * `/create-agent` has a complex multi-turn state machine (persisted wizard
27
- * state across messages). It is intentionally NOT included here and remains
28
- * foreman/server-only until Phase 2 or later.
24
+ * Out of scope
25
+ * ────────────
26
+ * `/create-agent` is a multi-turn wizard for onboarding a new agent
27
+ * from Telegram. Not implemented operators run `switchroom agent
28
+ * add <name>` on the host. (The standalone foreman bot used to host
29
+ * this wizard; it was retired since the gateway-intercept model
30
+ * supersedes it.)
29
31
  */
30
32
 
31
33
  /**
@@ -59,6 +61,8 @@ export const ADMIN_COMMAND_NAMES = new Set<string>([
59
61
  // Per-agent ops that read shared fleet state via the switchroom CLI
60
62
  'memory',
61
63
  'topics',
64
+ // Observability of privileged-verb history
65
+ 'audit',
62
66
  ])
63
67
 
64
68
  /**