switchroom 0.11.1 → 0.12.1
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 +32 -16
- package/dist/agent-scheduler/index.js +216 -97
- package/dist/auth-broker/index.js +176 -97
- package/dist/cli/drive-write-pretool.mjs +26 -11
- package/dist/cli/skill-validate-pretool.mjs +7209 -0
- package/dist/cli/switchroom.js +45571 -42642
- package/dist/cli/ui/index.html +1281 -0
- package/dist/host-control/main.js +3628 -309
- package/dist/vault/approvals/kernel-server.js +207 -98
- package/dist/vault/broker/server.js +249 -119
- package/examples/personal-google-workspace-mcp/README.md +8 -3
- package/examples/switchroom.yaml +91 -42
- package/package.json +4 -3
- package/profiles/_base/start.sh.hbs +76 -36
- package/profiles/_shared/agent-self-service.md.hbs +1 -1
- package/profiles/default/CLAUDE.md.hbs +4 -2
- package/skills/file-bug/SKILL.md +6 -4
- package/skills/skill-creator/SKILL.md +52 -0
- package/skills/switchroom-cli/SKILL.md +20 -4
- package/skills/switchroom-install/SKILL.md +3 -3
- package/telegram-plugin/auth-snapshot-format.ts +9 -9
- package/telegram-plugin/card-format.ts +3 -3
- package/telegram-plugin/dist/bridge/bridge.js +112 -112
- package/telegram-plugin/dist/gateway/gateway.js +853 -414
- package/telegram-plugin/dist/server.js +162 -161
- package/telegram-plugin/format.ts +71 -0
- package/telegram-plugin/gateway/access-validator.test.ts +8 -8
- package/telegram-plugin/gateway/access-validator.ts +1 -1
- package/telegram-plugin/gateway/approval-card.test.ts +18 -18
- package/telegram-plugin/gateway/approval-card.ts +1 -1
- package/telegram-plugin/gateway/auth-command.ts +2 -2
- package/telegram-plugin/gateway/boot-card.ts +40 -3
- package/telegram-plugin/gateway/boot-probes.ts +114 -30
- package/telegram-plugin/gateway/diff-preview-card.test.ts +15 -15
- package/telegram-plugin/gateway/diff-preview-card.ts +1 -1
- package/telegram-plugin/gateway/drive-write-approval.test.ts +2 -2
- package/telegram-plugin/gateway/gateway.ts +265 -22
- package/telegram-plugin/gateway/update-announce.ts +167 -0
- package/telegram-plugin/quota-check.ts +0 -195
- package/telegram-plugin/recent-outbound-dedup.ts +1 -1
- package/telegram-plugin/registry/turns-schema.ts +1 -1
- package/telegram-plugin/retry-api-call.ts +24 -0
- package/telegram-plugin/server.ts +8 -5
- package/telegram-plugin/tests/auth-add-flow.test.ts +32 -3
- package/telegram-plugin/tests/auth-command-format2.test.ts +4 -4
- package/telegram-plugin/tests/auth-snapshot-format.test.ts +17 -17
- package/telegram-plugin/tests/auto-fallback-fleet.test.ts +10 -10
- package/telegram-plugin/tests/boot-probes.test.ts +90 -2
- package/telegram-plugin/tests/bot-runtime.test.ts +23 -1
- package/telegram-plugin/tests/fixtures/service-log-current-claude-code.bin +1 -1
- package/telegram-plugin/tests/fleet-state.test.ts +3 -2
- package/telegram-plugin/tests/quota-check.test.ts +0 -409
- package/telegram-plugin/tests/retry-api-call.test.ts +76 -0
- package/telegram-plugin/tests/secret-detect-audit.test.ts +1 -1
- package/telegram-plugin/tests/secret-detect-pipeline.test.ts +7 -6
- package/telegram-plugin/tests/secret-detect-suppressor-no-silent-allow.test.ts +6 -5
- package/telegram-plugin/tests/secret-detect.test.ts +8 -8
- package/telegram-plugin/tests/telegram-format.test.ts +84 -1
- package/telegram-plugin/tests/update-announce.test.ts +154 -0
- package/telegram-plugin/tests/vault-grant-inbound-builders.test.ts +8 -8
- package/telegram-plugin/tests/vault-request-access-tool.test.ts +51 -0
- package/telegram-plugin/welcome-text.ts +1 -8
- package/profiles/default/CLAUDE.md +0 -192
- package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/base.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
- package/telegram-plugin/first-paint.ts +0 -225
- package/telegram-plugin/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/telegram-plugin/server.js +0 -41795
- package/telegram-plugin/tests/html-balanced.ts +0 -63
- package/telegram-plugin/tests/snapshot-serializer.ts +0 -79
- package/telegram-plugin/tool-error-filter.ts +0 -89
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Format 2 — health-grouped /auth snapshot + causal auto-fallback
|
|
3
3
|
* announcement. Pure functions; the gateway handles the live-API probe
|
|
4
|
-
* (via `
|
|
4
|
+
* (via the broker `probe-quota` op, #1336) and the broker `listState`,
|
|
5
5
|
* then hands shaped data to these formatters.
|
|
6
6
|
*
|
|
7
7
|
* JTBD this module serves:
|
|
@@ -178,7 +178,7 @@ const HEALTH_TITLE: Record<AccountHealth, string> = {
|
|
|
178
178
|
/**
|
|
179
179
|
* One-line per-account summary inside its health group.
|
|
180
180
|
*
|
|
181
|
-
*
|
|
181
|
+
* you@example.com ● 8% / 20%
|
|
182
182
|
* 5h refills 11:00 AM (in 6m) · 7d resets Sun 11:00 AM
|
|
183
183
|
*
|
|
184
184
|
* Two lines actually: the label/percent line and a sub-line with the
|
|
@@ -389,13 +389,13 @@ export interface FallbackAnnouncementInput {
|
|
|
389
389
|
/**
|
|
390
390
|
* Render the causal-shape fallback announcement.
|
|
391
391
|
*
|
|
392
|
-
* ✓ Switched fleet · 5-hour limit on
|
|
392
|
+
* ✓ Switched fleet · 5-hour limit on alice
|
|
393
393
|
*
|
|
394
|
-
*
|
|
394
|
+
* alice@example → you@example.com
|
|
395
395
|
* Triggered by: agent carrie
|
|
396
396
|
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
397
|
+
* alice recovers Fri 3:50 PM (in 4h 56m)
|
|
398
|
+
* you now: 8% of 5h · 20% of 7d (plenty of headroom)
|
|
399
399
|
*
|
|
400
400
|
* Falls back to a different shape when no eligible target was found
|
|
401
401
|
* (`newLabel === null`) — see "all-blocked" branch.
|
|
@@ -588,9 +588,9 @@ function escapeHtml(s: string): string {
|
|
|
588
588
|
* results (same length, same order), return the AccountSnapshot[] the
|
|
589
589
|
* formatters need.
|
|
590
590
|
*
|
|
591
|
-
* The gateway calls this after
|
|
592
|
-
*
|
|
593
|
-
*
|
|
591
|
+
* The gateway calls this after probing quota via the broker
|
|
592
|
+
* `probe-quota` op (#1336) — both arrays are caller-provided, this
|
|
593
|
+
* is just a zip + classify.
|
|
594
594
|
*/
|
|
595
595
|
export function buildSnapshotsFromState(
|
|
596
596
|
state: ListStateData,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared formatters for Telegram status cards.
|
|
3
3
|
*
|
|
4
|
-
* Both the main progress card (`
|
|
5
|
-
* card (`subagent-watcher.ts`) emit HTML to
|
|
6
|
-
* each
|
|
4
|
+
* Both the main progress card (rendered via `stream-reply-handler.ts`)
|
|
5
|
+
* and the pinned worker card (`subagent-watcher.ts`) emit HTML to
|
|
6
|
+
* Telegram; before issue #94 each had its own private copies with subtly
|
|
7
7
|
* different conventions:
|
|
8
8
|
*
|
|
9
9
|
* - `formatDuration(500)` → progress-card returned `500ms`, watcher
|