switchroom 0.19.29 → 0.19.31
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/cli/switchroom.js +2044 -900
- package/dist/host-control/main.js +162 -80
- package/package.json +1 -1
- package/profiles/_base/cron-session.sh.hbs +5 -1
- package/profiles/_base/start.sh.hbs +15 -1
- package/telegram-plugin/dist/gateway/gateway.js +1435 -551
- package/telegram-plugin/edit-flood-fuse.ts +70 -20
- package/telegram-plugin/gateway/boot-beacon.ts +364 -0
- package/telegram-plugin/gateway/boot-sweep-gate.ts +20 -15
- package/telegram-plugin/gateway/gateway.ts +87 -88
- package/telegram-plugin/gateway/inbound-spool.ts +39 -0
- package/telegram-plugin/gateway/narrative-lane.ts +12 -0
- package/telegram-plugin/gateway/obligation-store.ts +28 -0
- package/telegram-plugin/gateway/stale-pin-sweep-store.ts +221 -0
- package/telegram-plugin/gateway/stale-pin-sweep-wiring.ts +211 -0
- package/telegram-plugin/gateway/stale-pin-sweep.test.ts +804 -0
- package/telegram-plugin/gateway/stale-pin-sweep.ts +1146 -0
- package/telegram-plugin/gateway/status-pin-retarget.ts +15 -2
- package/telegram-plugin/gateway/status-pin-store.ts +33 -11
- package/telegram-plugin/registry/turns-schema.ts +21 -1
- package/telegram-plugin/retry-api-call.ts +46 -21
- package/telegram-plugin/shared/bot-runtime.ts +61 -17
- package/telegram-plugin/shared/gw-trace-gate.ts +18 -2
- package/telegram-plugin/tests/activity-card-wiring.test.ts +7 -7
- package/telegram-plugin/tests/activity-drain-fuse-drop-not-failure.test.ts +324 -0
- package/telegram-plugin/tests/agent-card-result-footer.test.ts +193 -0
- package/telegram-plugin/tests/boot-beacon.test.ts +462 -0
- package/telegram-plugin/tests/boot-pin-sweep-wiring.test.ts +6 -6
- package/telegram-plugin/tests/boot-sweep-gate.test.ts +42 -31
- package/telegram-plugin/tests/inbound-delivery-machine-dispatch.test.ts +2 -0
- package/telegram-plugin/tests/inbound-spool-progress.test.ts +2 -0
- package/telegram-plugin/tests/inbound-spool.test.ts +134 -5
- package/telegram-plugin/tests/narrative-lane-golden.test.ts +28 -0
- package/telegram-plugin/tests/obligation-determinism.test.ts +2 -0
- package/telegram-plugin/tests/obligation-store.test.ts +67 -1
- package/telegram-plugin/tests/status-pin-boot-recovery.test.ts +3 -3
- package/telegram-plugin/tests/status-pin-store.test.ts +26 -5
- package/telegram-plugin/tests/tg-post-logger-error-shape.test.ts +161 -0
- package/telegram-plugin/tests/worker-feed-pin-persistence.test.ts +30 -0
- package/telegram-plugin/tool-activity-summary.ts +104 -38
- package/telegram-plugin/worker-activity-feed.ts +33 -16
- package/telegram-plugin/gateway/dm-pin-sweep.test.ts +0 -251
- package/telegram-plugin/gateway/dm-pin-sweep.ts +0 -178
|
@@ -108,7 +108,13 @@ if [ "$SWITCHROOM_RUNTIME" = "docker" ] && [ -z "$SWITCHROOM_DOCKER_TMUX_INNER"
|
|
|
108
108
|
sr_ll_ok=""
|
|
109
109
|
sr_ll_unreachable=""
|
|
110
110
|
if [ -z "$sr_ll_key" ]; then
|
|
111
|
-
|
|
111
|
+
# Say what to DO, not just what happened: the fail-open is a BOOT-TIME
|
|
112
|
+
# decision that is never re-evaluated, so provisioning the key later
|
|
113
|
+
# changes nothing until the agent is restarted. An operator who reads
|
|
114
|
+
# only "untracked" and provisions a key reasonably assumes it took
|
|
115
|
+
# effect; it did not. `switchroom doctor` carries the standing version
|
|
116
|
+
# of this signal (it reads .routing-mode) once the boot log has rotated.
|
|
117
|
+
echo "litellm(outer): WARNING — no virtual key for agent '$SWITCHROOM_AGENT_NAME'; gateway falling back to direct Anthropic OAuth (untracked, unguarded). FIX: re-run 'switchroom apply' to provision the key, then RESTART this agent — the fail-open is decided once at boot and is never re-evaluated for the life of the session." >&2
|
|
112
118
|
elif command -v curl >/dev/null 2>&1 && [ -n "$ANTHROPIC_BASE_URL" ]; then
|
|
113
119
|
# Bounded retry probe (co-boot race fix, 2026-07): when the whole stack
|
|
114
120
|
# co-boots, the litellm proxy's heavy Python app is often not yet healthy
|
|
@@ -1563,6 +1569,14 @@ if [ -n "${SWITCHROOM_LITELLM:-}" ] && command -v switchroom >/dev/null 2>&1; th
|
|
|
1563
1569
|
echo "WARNING: no litellm virtual key for agent '$SWITCHROOM_AGENT_NAME'." >&2
|
|
1564
1570
|
echo "WARNING: falling back to direct Anthropic OAuth (untracked, unguarded)" >&2
|
|
1565
1571
|
echo "WARNING: — cannot authenticate to the proxy without a key." >&2
|
|
1572
|
+
# Remediation, not just diagnosis. The fail-open is decided ONCE here and
|
|
1573
|
+
# never re-evaluated, so a key provisioned mid-session is inert — an
|
|
1574
|
+
# operator who is not told that will provision one and believe the agent
|
|
1575
|
+
# healed. `switchroom doctor` reads .routing-mode for the standing version
|
|
1576
|
+
# of this signal, since this banner only lives in a rotating boot log.
|
|
1577
|
+
echo "WARNING: FIX: re-run 'switchroom apply' to provision the key, then" >&2
|
|
1578
|
+
echo "WARNING: RESTART this agent — the fail-open is decided once at boot" >&2
|
|
1579
|
+
echo "WARNING: and is never re-evaluated for the life of this session." >&2
|
|
1566
1580
|
echo "==========================================================" >&2
|
|
1567
1581
|
elif command -v curl >/dev/null 2>&1 && [ -n "$ANTHROPIC_BASE_URL" ]; then
|
|
1568
1582
|
# Bounded retry probe (co-boot race fix, 2026-07): when the whole stack
|