switchroom 0.19.48 → 0.20.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.
- package/dist/agent-scheduler/index.js +18 -1
- package/dist/auth-broker/index.js +19 -2
- package/dist/buzz-gateway/index.js +9207 -0
- package/dist/cli/notion-write-pretool.mjs +18 -1
- package/dist/cli/switchroom.js +63 -4
- package/dist/host-control/main.js +20 -3
- package/dist/vault/approvals/kernel-server.js +19 -2
- package/dist/vault/broker/server.js +19 -2
- package/package.json +4 -3
- package/profiles/_base/start.sh.hbs +78 -1
- package/profiles/default/CLAUDE.md.hbs +1 -1
- package/skills/dev-protocol/SKILL.md +30 -1
- package/skills/switchroom-architecture/SKILL.md +5 -0
- package/skills/switchroom-cli/SKILL.md +1 -1
- package/telegram-plugin/dist/bridge/bridge.js +7 -4
- package/telegram-plugin/dist/gateway/gateway.js +1149 -247
- package/telegram-plugin/dist/server.js +7 -4
- package/telegram-plugin/gateway/boot-briefing-builder.ts +458 -0
- package/telegram-plugin/gateway/boot-briefing-wiring.ts +170 -0
- package/telegram-plugin/gateway/buzz-mirror.ts +329 -0
- package/telegram-plugin/gateway/buzz-type-guards.ts +34 -0
- package/telegram-plugin/gateway/channel-route.ts +272 -0
- package/telegram-plugin/gateway/gateway.ts +73 -81
- package/telegram-plugin/gateway/inbound-spool.ts +33 -1
- package/telegram-plugin/gateway/ipc-protocol.ts +81 -2
- package/telegram-plugin/gateway/ipc-server.ts +197 -2
- package/telegram-plugin/gateway/outbound-send-path.ts +37 -1
- package/telegram-plugin/gateway/pending-turn-env.ts +61 -0
- package/telegram-plugin/gateway/stream-render.ts +21 -0
- package/telegram-plugin/gateway/subagent-handback-marker.ts +12 -0
- package/telegram-plugin/gateway/user-failure-notices.ts +172 -0
- package/telegram-plugin/history.ts +15 -0
- package/telegram-plugin/llm-error-present.ts +9 -4
- package/telegram-plugin/model-unavailable.ts +4 -0
- package/telegram-plugin/operator-events.fixtures.json +12 -12
- package/telegram-plugin/operator-events.ts +81 -9
- package/telegram-plugin/session-tail.ts +7 -1
- package/telegram-plugin/tests/boot-briefing-builder.test.ts +604 -0
- package/telegram-plugin/tests/buzz-mirror.test.ts +242 -0
- package/telegram-plugin/tests/buzz-origin-stamp-gate.test.ts +159 -0
- package/telegram-plugin/tests/channel-route.test.ts +306 -0
- package/telegram-plugin/tests/inbound-spool.test.ts +47 -0
- package/telegram-plugin/tests/ipc-server-buzz-dedup.test.ts +124 -0
- package/telegram-plugin/tests/ipc-server-buzz-peer.test.ts +269 -0
- package/telegram-plugin/tests/operator-events-session-tail.test.ts +63 -0
- package/telegram-plugin/tests/operator-events.test.ts +71 -7
- package/telegram-plugin/tests/user-failure-notices.test.ts +165 -0
- package/telegram-plugin/voice-normalize-text.ts +5 -0
- package/vendor/hindsight-memory/scripts/directive_verify.py +4 -0
- package/vendor/hindsight-memory/scripts/recall.py +7 -2
|
@@ -59,3 +59,8 @@ Switchroom is a multi-agent orchestrator built on Claude Code. It manages multip
|
|
|
59
59
|
- [cascade.md](cascade.md) — three-layer config cascade semantics
|
|
60
60
|
- [sub-agents.md](sub-agents.md) — delegation patterns and model routing
|
|
61
61
|
- [telegram.md](telegram.md) — enhanced Telegram plugin features
|
|
62
|
+
|
|
63
|
+
**Why it's built this way** lives in the repo's `reference/` directory — the
|
|
64
|
+
design contract (`reference/README.md` is the map: vision, principles,
|
|
65
|
+
invariants, product spec, job specs, RFCs). For "why does switchroom do X"
|
|
66
|
+
questions, that is the source of truth; `docs/` is usage/operation only.
|
|
@@ -290,7 +290,7 @@ config-plus-recreate operation with three known traps. **Follow the runbook:
|
|
|
290
290
|
|
|
291
291
|
## Telegram plugin reference — "what MCP tools", "how does reply work"
|
|
292
292
|
|
|
293
|
-
The `switchroom-telegram` plugin is an enhanced fork of the official Telegram MCP plugin and is the default for all switchroom agents. It exposes **
|
|
293
|
+
The `switchroom-telegram` plugin is an enhanced fork of the official Telegram MCP plugin and is the default for all switchroom agents. It exposes **20+ MCP tools** (all prefixed `mcp__switchroom-telegram__`; the authoritative list is the tool declarations in `telegram-plugin/bridge/bridge.ts`). The core messaging set:
|
|
294
294
|
|
|
295
295
|
| Tool | Purpose |
|
|
296
296
|
|---|---|
|
|
@@ -23121,12 +23121,12 @@ function classifyClaudeError(raw) {
|
|
|
23121
23121
|
try {
|
|
23122
23122
|
return classifyInner(raw);
|
|
23123
23123
|
} catch {
|
|
23124
|
-
return "unknown-
|
|
23124
|
+
return "unknown-5xx";
|
|
23125
23125
|
}
|
|
23126
23126
|
}
|
|
23127
23127
|
function classifyInner(raw) {
|
|
23128
23128
|
if (raw == null)
|
|
23129
|
-
return "unknown-
|
|
23129
|
+
return "unknown-5xx";
|
|
23130
23130
|
const obj = typeof raw === "object" ? raw : {};
|
|
23131
23131
|
const errorType = extractString(obj, "error_type") ?? extractString(obj, "type") ?? extractString(getNestedObj(obj, "error"), "type") ?? "";
|
|
23132
23132
|
const errorCode = extractString(obj, "code") ?? extractString(getNestedObj(obj, "error"), "code") ?? "";
|
|
@@ -23171,13 +23171,16 @@ ${message}`;
|
|
|
23171
23171
|
if (errorType === "agent-restarted-unexpectedly" || errorCode === "agent-restarted-unexpectedly") {
|
|
23172
23172
|
return "agent-restarted-unexpectedly";
|
|
23173
23173
|
}
|
|
23174
|
+
if ((status == null || status >= 500) && (errorType === "server_error" || errorCode === "server_error" || sdkCode === "server_error" || errorType === "api_error" || errorCode === "api_error" || sdkCode === "api_error")) {
|
|
23175
|
+
return "transport-transient";
|
|
23176
|
+
}
|
|
23174
23177
|
if (status != null) {
|
|
23175
23178
|
if (status >= 400 && status < 500)
|
|
23176
23179
|
return "unknown-4xx";
|
|
23177
23180
|
if (status >= 500 && status < 600)
|
|
23178
23181
|
return "unknown-5xx";
|
|
23179
23182
|
}
|
|
23180
|
-
return "unknown-
|
|
23183
|
+
return "unknown-5xx";
|
|
23181
23184
|
}
|
|
23182
23185
|
function extractString(obj, key) {
|
|
23183
23186
|
const v = obj[key];
|
|
@@ -23708,7 +23711,7 @@ ${errStr}`) ? "rate-limited" : "quota-exhausted" : classifyClaudeError({ type: e
|
|
|
23708
23711
|
const raw = embeddedError ?? obj;
|
|
23709
23712
|
const kind = classifyClaudeError(embeddedError ?? obj);
|
|
23710
23713
|
const detail = extractDetailMessage(embeddedError) ?? extractDetailMessage(obj) ?? String(type ?? "");
|
|
23711
|
-
const transient = kind === "rate-limited";
|
|
23714
|
+
const transient = kind === "rate-limited" || kind === "transport-transient";
|
|
23712
23715
|
const retry = extractRetryState(obj);
|
|
23713
23716
|
const terminal = !transient ? true : retry.retryAttempt != null && retry.maxRetries != null ? retry.retryAttempt >= retry.maxRetries : isErrorLine;
|
|
23714
23717
|
return { kind, raw, detail, transient, terminal };
|