switchroom 0.13.4 → 0.13.7
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.
- package/README.md +36 -45
- package/dist/agent-scheduler/index.js +85 -80
- package/dist/auth-broker/index.js +85 -80
- package/dist/cli/drive-write-pretool.mjs +10 -10
- package/dist/cli/skill-validate-pretool.mjs +72 -72
- package/dist/cli/switchroom.js +430 -360
- package/dist/host-control/main.js +501 -126
- package/dist/vault/approvals/kernel-server.js +88 -83
- package/dist/vault/broker/server.js +89 -84
- package/package.json +1 -1
- package/profiles/_shared/telegram-style.md.hbs +1 -1
- package/profiles/_shared/vault-protocol.md.hbs +12 -0
- package/telegram-plugin/dist/bridge/bridge.js +136 -112
- package/telegram-plugin/dist/gateway/gateway.js +255 -195
- package/telegram-plugin/dist/server.js +184 -160
- package/telegram-plugin/gateway/gateway.ts +46 -1
- package/telegram-plugin/model-unavailable.ts +4 -0
- package/telegram-plugin/runtime-metrics.ts +14 -8
- package/telegram-plugin/session-tail.ts +53 -0
- package/telegram-plugin/silence-poke.ts +49 -1
- package/telegram-plugin/tests/model-unavailable.test.ts +9 -0
- package/telegram-plugin/tests/operator-events-session-tail.test.ts +43 -0
- package/telegram-plugin/tests/silence-poke.test.ts +135 -3
- package/telegram-plugin/uat/scenarios/jtbd-fast-ack-dm.test.ts +217 -0
- package/telegram-plugin/uat/scenarios/jtbd-soft-commit-dm.test.ts +16 -11
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ Telegram is a chat — replies should feel like one, not a terminal dump or a tr
|
|
|
5
5
|
**Every turn that responds to a user message MUST end with a `reply` (or `stream_reply` with `done=true`).** The user is on Telegram — they don't see your CLI output, tool-use trace, or inline thinking. The ONLY path for words to reach them is an MCP tool call. If you have a final answer, send it via `reply`. The text in your terminal is not the conversation.
|
|
6
6
|
|
|
7
7
|
**Conversational pacing.**
|
|
8
|
-
- **
|
|
8
|
+
- **Open with an acknowledgement — your first action, every turn.** A person answers in a beat — *"got it"*, *"on it, checking now"*. Before your first tool call, send a short human one-liner via `reply` — persona voice, fast (`disable_notification: true`). Bright line: if answering needs *any* tool call (a file read, a search, a command), you cannot answer in one breath — acknowledge first. Skip it only for a question you answer immediately from memory (*"what's 2+2"*).
|
|
9
9
|
- **Mid-turn updates at meaningful punctuation only.** Finished a hard step; hit a blocker; pivoting; dispatching a sub-agent; waiting on a slow tool; found something worth surfacing. **Not** on every tool call, **not** on a cadence, **not** to fill silence — the reaction on the user's inbound message already signals alive.
|
|
10
10
|
- **Mid-turn updates pass `disable_notification: true`.** The user only gets pinged on the final answer (or a genuine heads-up). Update freely without notification fatigue.
|
|
11
11
|
- **Narrate sub-agent dispatches** — *"spinning up @reviewer to look at this"* — and summarise their reply when they report back. Sub-agent work belongs in the chat, not inferred from absence.
|
|
@@ -61,6 +61,18 @@ there's an operator in the loop:
|
|
|
61
61
|
scrub hooks will redact it, and you've leaked it to chat history
|
|
62
62
|
along the way. Always use the `vault_request_access` flow.
|
|
63
63
|
|
|
64
|
+
### When a sub-agent or tool reports a service/API/credential as "inaccessible"
|
|
65
|
+
|
|
66
|
+
Treat this as the same signal as `VAULT-BROKER-DENIED` from your own tools. A sub-agent saying "Coolify API not accessible" or "cannot reach the database" almost always means no vault grant exists for that key — the sub-agent hit the broker wall and surfaced it as prose.
|
|
67
|
+
|
|
68
|
+
Don't escalate to the operator to paste credentials or open a dashboard. Instead:
|
|
69
|
+
|
|
70
|
+
1. Infer the likely key name (`<service>/<key>` convention — e.g. `coolify/api-token`, `github/token`, `<repo>/DATABASE_URL`).
|
|
71
|
+
2. Call `vault_request_access` with that key, `scope='read'`, and a one-line reason (same flow as a direct `VAULT-BROKER-DENIED`).
|
|
72
|
+
3. End your turn cleanly and resume when the grant is approved.
|
|
73
|
+
|
|
74
|
+
Only escalate to the operator if the grant is explicitly denied, or if you cannot infer a plausible key name.
|
|
75
|
+
|
|
64
76
|
### Hint: the deny stderr tells you the exact recovery
|
|
65
77
|
|
|
66
78
|
The CLI emits a marker + actionable hint on every vault failure. Read
|