switchroom 0.7.15 → 0.10.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 (301) hide show
  1. package/README.md +51 -59
  2. package/bin/run-hook.sh +27 -11
  3. package/bin/timezone-hook.sh +9 -7
  4. package/dist/agent-scheduler/index.js +410 -133
  5. package/dist/auth-broker/index.js +13932 -0
  6. package/dist/cli/switchroom.js +26937 -5601
  7. package/dist/host-control/main.js +12702 -0
  8. package/dist/vault/approvals/kernel-server.js +467 -184
  9. package/dist/vault/broker/server.js +1430 -724
  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 +7 -4
  16. package/profiles/_base/settings.json.hbs +20 -5
  17. package/profiles/_base/start.sh.hbs +16 -3
  18. package/profiles/_shared/agent-self-service.md.hbs +126 -0
  19. package/profiles/_shared/telegram-style.md.hbs +20 -90
  20. package/profiles/_shared/vault-protocol.md.hbs +68 -0
  21. package/profiles/default/CLAUDE.md +50 -96
  22. package/profiles/default/CLAUDE.md.hbs +36 -6
  23. package/profiles/default/workspace/SOUL.md.hbs +12 -5
  24. package/skills/buildkite-agent-infrastructure/SKILL.md +30 -11
  25. package/skills/buildkite-agent-runtime/SKILL.md +44 -11
  26. package/skills/buildkite-api/SKILL.md +31 -8
  27. package/skills/buildkite-cli/SKILL.md +27 -9
  28. package/skills/buildkite-migration/SKILL.md +22 -9
  29. package/skills/buildkite-pipelines/SKILL.md +26 -9
  30. package/skills/buildkite-secure-delivery/SKILL.md +23 -9
  31. package/skills/buildkite-test-engine/SKILL.md +25 -8
  32. package/skills/docx/SKILL.md +1 -1
  33. package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-313.pyc +0 -0
  34. package/skills/docx/scripts/office/validators/__pycache__/base.cpython-313.pyc +0 -0
  35. package/skills/file-bug/SKILL.md +34 -6
  36. package/skills/humanizer/SKILL.md +15 -0
  37. package/skills/humanizer-calibrate/SKILL.md +7 -1
  38. package/skills/mcp-builder/SKILL.md +1 -1
  39. package/skills/pdf/SKILL.md +1 -1
  40. package/skills/pptx/SKILL.md +1 -1
  41. package/skills/skill-creator/SKILL.md +21 -1
  42. package/skills/skill-creator/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
  43. package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-313.pyc +0 -0
  44. package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-313.pyc +0 -0
  45. package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-313.pyc +0 -0
  46. package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-313.pyc +0 -0
  47. package/skills/skill-creator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
  48. package/skills/switchroom-cli/SKILL.md +63 -64
  49. package/skills/switchroom-health/SKILL.md +23 -10
  50. package/skills/switchroom-install/SKILL.md +3 -3
  51. package/skills/switchroom-manage/SKILL.md +26 -19
  52. package/skills/switchroom-runtime/SKILL.md +191 -0
  53. package/skills/switchroom-status/SKILL.md +27 -2
  54. package/skills/telegram-test-harness/SKILL.md +3 -0
  55. package/skills/token-helpers/SKILL.md +24 -1
  56. package/skills/webapp-testing/SKILL.md +31 -1
  57. package/skills/xlsx/SKILL.md +1 -1
  58. package/telegram-plugin/admin-commands/index.ts +7 -5
  59. package/telegram-plugin/analytics-posthog.ts +191 -0
  60. package/telegram-plugin/bridge/bridge.ts +69 -0
  61. package/telegram-plugin/bridge/ipc-client.ts +4 -1
  62. package/telegram-plugin/dist/bridge/bridge.js +194 -119
  63. package/telegram-plugin/dist/gateway/gateway.js +23611 -19671
  64. package/telegram-plugin/dist/server.js +245 -189
  65. package/telegram-plugin/first-paint.ts +3 -24
  66. package/telegram-plugin/gateway/auth-add-flow.ts +326 -0
  67. package/telegram-plugin/gateway/auth-broker-client.ts +75 -0
  68. package/telegram-plugin/gateway/auth-command.ts +794 -0
  69. package/telegram-plugin/gateway/auth-line.ts +123 -0
  70. package/telegram-plugin/gateway/boot-card.ts +169 -40
  71. package/telegram-plugin/gateway/boot-issue-cache.ts +308 -0
  72. package/telegram-plugin/gateway/boot-probes.ts +166 -123
  73. package/telegram-plugin/gateway/boot-reason.ts +41 -7
  74. package/telegram-plugin/gateway/boot-version.ts +66 -0
  75. package/telegram-plugin/gateway/gateway.ts +3499 -1885
  76. package/telegram-plugin/gateway/hostd-dispatch.ts +117 -0
  77. package/telegram-plugin/gateway/ipc-protocol.ts +18 -0
  78. package/telegram-plugin/gateway/pending-inbound-buffer.ts +106 -0
  79. package/telegram-plugin/gateway/quarantine.ts +69 -0
  80. package/telegram-plugin/gateway/quota-cache.ts +9 -4
  81. package/telegram-plugin/gateway/reaction-trigger.ts +401 -0
  82. package/telegram-plugin/gateway/recent-denials.test.ts +103 -0
  83. package/telegram-plugin/gateway/recent-denials.ts +77 -0
  84. package/telegram-plugin/gateway/startup-network-retry.ts +109 -31
  85. package/telegram-plugin/gateway/vault-grant-inbound-builders.ts +125 -0
  86. package/telegram-plugin/history.ts +91 -0
  87. package/telegram-plugin/hooks/hooks.json +10 -0
  88. package/telegram-plugin/hooks/sandbox-hint-posttool.mjs +130 -0
  89. package/telegram-plugin/hooks/subagent-tracker-posttool.mjs +19 -2
  90. package/telegram-plugin/hooks/subagent-tracker-pretool.mjs +22 -2
  91. package/telegram-plugin/hooks/tool-label-pretool.mjs +11 -0
  92. package/telegram-plugin/hooks/wedge-detect-posttool.mjs +303 -0
  93. package/telegram-plugin/inbound-classifier.ts +50 -0
  94. package/telegram-plugin/inline-keyboard-callbacks.ts +136 -0
  95. package/telegram-plugin/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  96. package/telegram-plugin/package.json +4 -2
  97. package/telegram-plugin/permission-rule.ts +51 -0
  98. package/telegram-plugin/permission-title.ts +56 -0
  99. package/telegram-plugin/quota-check.ts +19 -41
  100. package/telegram-plugin/registry/reaper.ts +223 -0
  101. package/telegram-plugin/retry-api-call.ts +80 -0
  102. package/telegram-plugin/runtime-metrics.ts +177 -0
  103. package/telegram-plugin/scripts/build.mjs +0 -1
  104. package/telegram-plugin/secret-detect/index.ts +24 -0
  105. package/telegram-plugin/secret-detect/vault-error.test.ts +64 -12
  106. package/telegram-plugin/secret-detect/vault-error.ts +78 -11
  107. package/telegram-plugin/secret-detect/vault-write.ts +14 -2
  108. package/telegram-plugin/server.js +41795 -0
  109. package/telegram-plugin/session-tail.ts +6 -1
  110. package/telegram-plugin/shared/bot-runtime.ts +5 -4
  111. package/telegram-plugin/silence-poke.ts +420 -0
  112. package/telegram-plugin/silent-end.ts +174 -0
  113. package/telegram-plugin/stream-controller.ts +13 -0
  114. package/telegram-plugin/stream-reply-handler.ts +7 -0
  115. package/telegram-plugin/subagent-watcher.ts +213 -4
  116. package/telegram-plugin/tests/auth-add-flow.test.ts +559 -0
  117. package/telegram-plugin/tests/auth-code-redact.test.ts +8 -4
  118. package/telegram-plugin/tests/auth-command-vernacular.test.ts +531 -0
  119. package/telegram-plugin/tests/boot-card-issue-dedup.test.ts +247 -0
  120. package/telegram-plugin/tests/boot-card-reason-to-render.test.ts +182 -0
  121. package/telegram-plugin/tests/boot-card-reason.test.ts +65 -2
  122. package/telegram-plugin/tests/boot-card-render.test.ts +146 -0
  123. package/telegram-plugin/tests/boot-card-silent-on-operator.test.ts +103 -0
  124. package/telegram-plugin/tests/boot-probes.test.ts +216 -10
  125. package/telegram-plugin/tests/boot-version-string.test.ts +0 -0
  126. package/telegram-plugin/tests/finalize-callback.test.ts +190 -0
  127. package/telegram-plugin/tests/gateway-message-validator.test.ts +26 -0
  128. package/telegram-plugin/tests/gateway-secret-detect.test.ts +12 -3
  129. package/telegram-plugin/tests/gateway-startup-network-retry.test.ts +104 -0
  130. package/telegram-plugin/tests/history-reaper.test.ts +378 -0
  131. package/telegram-plugin/tests/hostd-dispatch.test.ts +129 -0
  132. package/telegram-plugin/tests/inbound-classifier.test.ts +76 -0
  133. package/telegram-plugin/tests/inbound-message-types.test.ts +267 -0
  134. package/telegram-plugin/tests/issues-card.test.ts +49 -0
  135. package/telegram-plugin/tests/pending-inbound-buffer.test.ts +132 -0
  136. package/telegram-plugin/tests/permission-rule.test.ts +80 -1
  137. package/telegram-plugin/tests/permission-title.test.ts +31 -0
  138. package/telegram-plugin/tests/quota-check.test.ts +5 -35
  139. package/telegram-plugin/tests/races.test.ts +179 -0
  140. package/telegram-plugin/tests/reaction-trigger-flow.test.ts +353 -0
  141. package/telegram-plugin/tests/reaction-trigger.test.ts +397 -0
  142. package/telegram-plugin/tests/retry-api-call.test.ts +152 -1
  143. package/telegram-plugin/tests/runtime-metrics.test.ts +145 -0
  144. package/telegram-plugin/tests/sandbox-hint-posttool.test.ts +155 -0
  145. package/telegram-plugin/tests/secret-detect-delete-must-surface-failures.test.ts +133 -0
  146. package/telegram-plugin/tests/secret-detect-false-positives.test.ts +137 -0
  147. package/telegram-plugin/tests/silence-poke.test.ts +493 -0
  148. package/telegram-plugin/tests/silent-end.test.ts +206 -0
  149. package/telegram-plugin/tests/subagent-tracker-hooks.test.ts +107 -0
  150. package/telegram-plugin/tests/subagent-watcher-env-thresholds.test.ts +224 -0
  151. package/telegram-plugin/tests/subagent-watcher-stall-terminal.test.ts +316 -0
  152. package/telegram-plugin/tests/subagent-watcher.test.ts +263 -0
  153. package/telegram-plugin/tests/turn-signal-tracker.test.ts +81 -0
  154. package/telegram-plugin/tests/vault-approval-posture.test.ts +256 -0
  155. package/telegram-plugin/tests/vault-grant-auto-resume.test.ts +73 -0
  156. package/telegram-plugin/tests/vault-grant-inbound-builders.test.ts +226 -0
  157. package/telegram-plugin/tests/vault-grant-union.test.ts +130 -0
  158. package/telegram-plugin/tests/vault-key-regex-allows-slash.test.ts +140 -0
  159. package/telegram-plugin/tests/vault-posture-quarantine.test.ts +104 -0
  160. package/telegram-plugin/tests/vault-request-access-tool.test.ts +114 -0
  161. package/telegram-plugin/tests/vault-request-access-unlock-resume.test.ts +106 -0
  162. package/telegram-plugin/turn-signal-tracker.ts +100 -24
  163. package/telegram-plugin/uat/SETUP.md +210 -35
  164. package/telegram-plugin/uat/assertions.ts +264 -37
  165. package/telegram-plugin/uat/driver-info.ts +57 -0
  166. package/telegram-plugin/uat/driver.ts +590 -51
  167. package/telegram-plugin/uat/harness.ts +140 -94
  168. package/telegram-plugin/uat/load-env.test.ts +72 -0
  169. package/telegram-plugin/uat/load-env.ts +48 -0
  170. package/telegram-plugin/uat/login.ts +96 -53
  171. package/telegram-plugin/uat/runners/agent-self-sufficiency.ts +457 -0
  172. package/telegram-plugin/uat/runners/paraphrases.ts +231 -0
  173. package/telegram-plugin/uat/runners/report.ts +150 -0
  174. package/telegram-plugin/uat/runners/run-agent-self-sufficiency.sh +50 -0
  175. package/telegram-plugin/uat/runners/scorer.test.ts +196 -0
  176. package/telegram-plugin/uat/runners/scorer.ts +106 -0
  177. package/telegram-plugin/uat/runners/skill-coverage.test.ts +100 -0
  178. package/telegram-plugin/uat/runners/skill-coverage.ts +620 -0
  179. package/telegram-plugin/uat/scenarios/ask-user-button-tap-dm.test.ts +141 -0
  180. package/telegram-plugin/uat/scenarios/bg-sub-agent-dispatch-dm.test.ts +191 -0
  181. package/telegram-plugin/uat/scenarios/fuzz-extended-dm.test.ts +255 -0
  182. package/telegram-plugin/uat/scenarios/fuzz-human-style-dm.test.ts +275 -0
  183. package/telegram-plugin/uat/scenarios/fuzz-random-prompts-dm.test.ts +146 -0
  184. package/telegram-plugin/uat/scenarios/fuzz-status-ask-dm.test.ts +486 -0
  185. package/telegram-plugin/uat/scenarios/jtbd-interrupt-marker-dm.test.ts +67 -0
  186. package/telegram-plugin/uat/scenarios/jtbd-rapid-followup-dm.test.ts +100 -0
  187. package/telegram-plugin/uat/scenarios/jtbd-soft-commit-dm.test.ts +67 -0
  188. package/telegram-plugin/uat/scenarios/jtbd-status-query-dm.test.ts +49 -0
  189. package/telegram-plugin/uat/scenarios/location-inbound-dm.test.ts +65 -0
  190. package/telegram-plugin/uat/scenarios/midturn-silent-dm.test.ts +175 -0
  191. package/telegram-plugin/uat/scenarios/reactions-dm.test.ts +142 -0
  192. package/telegram-plugin/uat/scenarios/reactions-trigger-turn-dm.test.ts +96 -0
  193. package/telegram-plugin/uat/scenarios/secret-redaction-deletes-original-dm.test.ts +123 -0
  194. package/telegram-plugin/uat/scenarios/secret-redaction-no-false-positive-dm.test.ts +87 -0
  195. package/telegram-plugin/uat/scenarios/silence-poke-soft-dm.test.ts +155 -0
  196. package/telegram-plugin/uat/scenarios/silent-end-recovery-dm.test.ts +95 -0
  197. package/telegram-plugin/uat/scenarios/smoke-dm-reply.test.ts +57 -0
  198. package/telegram-plugin/uat/scenarios/subagent-watcher-no-rerun-dm.test.ts +135 -0
  199. package/telegram-plugin/uat/scenarios/vault-approval-posture-telegram-id-dm.test.ts +191 -0
  200. package/telegram-plugin/uat/scenarios/vault-audit-allow-dm.test.ts +108 -0
  201. package/telegram-plugin/uat/scenarios/vault-grant-auto-resume-dm.test.ts +121 -0
  202. package/telegram-plugin/uat/scenarios/vault-request-access-concurrent-dm.test.ts +161 -0
  203. package/telegram-plugin/uat/scenarios/vault-request-access-end-to-end-dm.test.ts +158 -0
  204. package/telegram-plugin/uat/scenarios/voice-inbound-dm.test.ts +65 -0
  205. package/telegram-plugin/vault-approval-posture.ts +42 -0
  206. package/telegram-plugin/welcome-text.ts +1 -0
  207. package/telegram-plugin/active-pins-sweep.ts +0 -204
  208. package/telegram-plugin/active-pins.ts +0 -146
  209. package/telegram-plugin/auth-dashboard.ts +0 -1104
  210. package/telegram-plugin/auth-slot-parser.ts +0 -497
  211. package/telegram-plugin/card-event-log.ts +0 -138
  212. package/telegram-plugin/dist/foreman/foreman.js +0 -31106
  213. package/telegram-plugin/docs/multi-agent-card-design.md +0 -847
  214. package/telegram-plugin/docs/pinned-progress-card-reliability.md +0 -144
  215. package/telegram-plugin/foreman/foreman-create-flow.ts +0 -202
  216. package/telegram-plugin/foreman/foreman-handlers.ts +0 -493
  217. package/telegram-plugin/foreman/foreman.ts +0 -1165
  218. package/telegram-plugin/foreman/setup-flow.ts +0 -345
  219. package/telegram-plugin/foreman/setup-state.ts +0 -239
  220. package/telegram-plugin/foreman/state.ts +0 -203
  221. package/telegram-plugin/pin-event-log.ts +0 -76
  222. package/telegram-plugin/progress-card-driver.ts +0 -2886
  223. package/telegram-plugin/progress-card-pin-manager.ts +0 -589
  224. package/telegram-plugin/progress-card-pin-watchdog.ts +0 -98
  225. package/telegram-plugin/progress-card.ts +0 -1409
  226. package/telegram-plugin/tests/HARNESS.md +0 -340
  227. package/telegram-plugin/tests/_progress-card-harness.ts +0 -109
  228. package/telegram-plugin/tests/active-pins-boot-reaper.test.ts +0 -211
  229. package/telegram-plugin/tests/active-pins-sweep.test.ts +0 -309
  230. package/telegram-plugin/tests/active-pins.test.ts +0 -187
  231. package/telegram-plugin/tests/auth-account-identity-surface.test.ts +0 -118
  232. package/telegram-plugin/tests/auth-dashboard-edge-cases.test.ts +0 -260
  233. package/telegram-plugin/tests/auth-dashboard-restart-flow.test.ts +0 -140
  234. package/telegram-plugin/tests/auth-dashboard-v3b.test.ts +0 -559
  235. package/telegram-plugin/tests/auth-dashboard.test.ts +0 -1045
  236. package/telegram-plugin/tests/auth-slot-commands.test.ts +0 -640
  237. package/telegram-plugin/tests/bg-agent-progress-card-757.test.ts +0 -201
  238. package/telegram-plugin/tests/boot-card-account-quota.test.ts +0 -137
  239. package/telegram-plugin/tests/card-event-log.test.ts +0 -145
  240. package/telegram-plugin/tests/first-paint.test.ts +0 -257
  241. package/telegram-plugin/tests/foreman-create-flow.test.ts +0 -359
  242. package/telegram-plugin/tests/foreman-handlers.test.ts +0 -347
  243. package/telegram-plugin/tests/foreman-state.test.ts +0 -164
  244. package/telegram-plugin/tests/foreman-write-ops.test.ts +0 -214
  245. package/telegram-plugin/tests/harness-ordering-invariants.test.ts +0 -243
  246. package/telegram-plugin/tests/pin-event-log.test.ts +0 -124
  247. package/telegram-plugin/tests/progress-card-api-failure-during-deferred.test.ts +0 -73
  248. package/telegram-plugin/tests/progress-card-close-paths-converge.test.ts +0 -272
  249. package/telegram-plugin/tests/progress-card-cross-turn.test.ts +0 -258
  250. package/telegram-plugin/tests/progress-card-delay-842.test.ts +0 -160
  251. package/telegram-plugin/tests/progress-card-dispose-preservepending.test.ts +0 -81
  252. package/telegram-plugin/tests/progress-card-draft-flag.test.ts +0 -80
  253. package/telegram-plugin/tests/progress-card-driver-eviction.test.ts +0 -215
  254. package/telegram-plugin/tests/progress-card-driver-fleet-shadow.test.ts +0 -123
  255. package/telegram-plugin/tests/progress-card-driver-force-complete-parent-done.test.ts +0 -76
  256. package/telegram-plugin/tests/progress-card-edit-timestamps-budget.test.ts +0 -62
  257. package/telegram-plugin/tests/progress-card-memory-bounds.test.ts +0 -84
  258. package/telegram-plugin/tests/progress-card-pin-failure-paths.test.ts +0 -139
  259. package/telegram-plugin/tests/progress-card-pin-manager.test.ts +0 -773
  260. package/telegram-plugin/tests/progress-card-pin-race-fast-turn.test.ts +0 -66
  261. package/telegram-plugin/tests/progress-card-pin-sidecar-partial-write.test.ts +0 -64
  262. package/telegram-plugin/tests/progress-card-pin-watchdog.test.ts +0 -190
  263. package/telegram-plugin/tests/progress-card-sigterm-pin-flush.test.ts +0 -146
  264. package/telegram-plugin/tests/real-gateway-f1-ladder-integrity.test.ts +0 -123
  265. package/telegram-plugin/tests/real-gateway-f2-instant-draft.test.ts +0 -82
  266. package/telegram-plugin/tests/real-gateway-f3-late-card.test.ts +0 -114
  267. package/telegram-plugin/tests/real-gateway-harness.ts +0 -699
  268. package/telegram-plugin/tests/real-gateway-i6-turn-flush-replay-dedup.test.ts +0 -313
  269. package/telegram-plugin/tests/real-gateway-ipc-lifecycle.test.ts +0 -299
  270. package/telegram-plugin/tests/real-gateway-spec.test.ts +0 -487
  271. package/telegram-plugin/tests/real-gateway.smoke.test.ts +0 -101
  272. package/telegram-plugin/tests/setup-flow.test.ts +0 -510
  273. package/telegram-plugin/tests/setup-state.test.ts +0 -146
  274. package/telegram-plugin/tests/sync-chat-running-subagents.test.ts +0 -116
  275. package/telegram-plugin/tests/turn-end-regressions.test.ts +0 -489
  276. package/telegram-plugin/tests/turn-flush-card-takeover.test.ts +0 -218
  277. package/telegram-plugin/tests/turn-flush-prose-recovery.test.ts +0 -78
  278. package/telegram-plugin/tests/two-zone-bg-carry-full-lifecycle.test.ts +0 -131
  279. package/telegram-plugin/tests/two-zone-bg-detection.test.ts +0 -120
  280. package/telegram-plugin/tests/two-zone-bg-done-when-all-terminal.test.ts +0 -116
  281. package/telegram-plugin/tests/two-zone-bg-early-turn-end.test.ts +0 -87
  282. package/telegram-plugin/tests/two-zone-bg-survives-next-turn.test.ts +0 -211
  283. package/telegram-plugin/tests/two-zone-card-cap.test.ts +0 -62
  284. package/telegram-plugin/tests/two-zone-card-fleet-row.test.ts +0 -101
  285. package/telegram-plugin/tests/two-zone-card-header-phases.test.ts +0 -78
  286. package/telegram-plugin/tests/two-zone-card-html-balance.test.ts +0 -110
  287. package/telegram-plugin/tests/two-zone-card-lifecycle.test.ts +0 -128
  288. package/telegram-plugin/tests/two-zone-card-sanitise.test.ts +0 -58
  289. package/telegram-plugin/tests/two-zone-card-snapshot.test.ts +0 -133
  290. package/telegram-plugin/tests/two-zone-concurrent-turns-isolation.test.ts +0 -155
  291. package/telegram-plugin/tests/two-zone-phasefor-precedence.test.ts +0 -117
  292. package/telegram-plugin/tests/two-zone-snapshot-extras.test.ts +0 -187
  293. package/telegram-plugin/tests/two-zone-stuck-edit-throttle.test.ts +0 -149
  294. package/telegram-plugin/tests/two-zone-stuck-header-escalation.test.ts +0 -101
  295. package/telegram-plugin/tests/two-zone-stuck-per-member.test.ts +0 -114
  296. package/telegram-plugin/tests/two-zone-stuck-recovery.test.ts +0 -105
  297. package/telegram-plugin/tests/waiting-ux-harness.ts +0 -381
  298. package/telegram-plugin/tests/waiting-ux.e2e.test.ts +0 -233
  299. package/telegram-plugin/turn-flush-prose-recovery.ts +0 -40
  300. package/telegram-plugin/two-zone-card.ts +0 -269
  301. package/telegram-plugin/uat/scenarios/smoke-clerk-reply.test.ts +0 -61
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  };
17
17
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
18
18
 
19
- // node_modules/yaml/dist/nodes/identity.js
19
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
20
20
  var require_identity = __commonJS((exports) => {
21
21
  var ALIAS = Symbol.for("yaml.alias");
22
22
  var DOC = Symbol.for("yaml.document");
@@ -70,7 +70,7 @@ var require_identity = __commonJS((exports) => {
70
70
  exports.isSeq = isSeq;
71
71
  });
72
72
 
73
- // node_modules/yaml/dist/visit.js
73
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
74
74
  var require_visit = __commonJS((exports) => {
75
75
  var identity = require_identity();
76
76
  var BREAK = Symbol("break visit");
@@ -225,7 +225,7 @@ var require_visit = __commonJS((exports) => {
225
225
  exports.visitAsync = visitAsync;
226
226
  });
227
227
 
228
- // node_modules/yaml/dist/doc/directives.js
228
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
229
229
  var require_directives = __commonJS((exports) => {
230
230
  var identity = require_identity();
231
231
  var visit = require_visit();
@@ -377,7 +377,7 @@ var require_directives = __commonJS((exports) => {
377
377
  exports.Directives = Directives;
378
378
  });
379
379
 
380
- // node_modules/yaml/dist/doc/anchors.js
380
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
381
381
  var require_anchors = __commonJS((exports) => {
382
382
  var identity = require_identity();
383
383
  var visit = require_visit();
@@ -439,7 +439,7 @@ var require_anchors = __commonJS((exports) => {
439
439
  exports.findNewAnchor = findNewAnchor;
440
440
  });
441
441
 
442
- // node_modules/yaml/dist/doc/applyReviver.js
442
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
443
443
  var require_applyReviver = __commonJS((exports) => {
444
444
  function applyReviver(reviver, obj, key, val) {
445
445
  if (val && typeof val === "object") {
@@ -486,7 +486,7 @@ var require_applyReviver = __commonJS((exports) => {
486
486
  exports.applyReviver = applyReviver;
487
487
  });
488
488
 
489
- // node_modules/yaml/dist/nodes/toJS.js
489
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
490
490
  var require_toJS = __commonJS((exports) => {
491
491
  var identity = require_identity();
492
492
  function toJS(value, arg, ctx) {
@@ -513,7 +513,7 @@ var require_toJS = __commonJS((exports) => {
513
513
  exports.toJS = toJS;
514
514
  });
515
515
 
516
- // node_modules/yaml/dist/nodes/Node.js
516
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
517
517
  var require_Node = __commonJS((exports) => {
518
518
  var applyReviver = require_applyReviver();
519
519
  var identity = require_identity();
@@ -550,7 +550,7 @@ var require_Node = __commonJS((exports) => {
550
550
  exports.NodeBase = NodeBase;
551
551
  });
552
552
 
553
- // node_modules/yaml/dist/nodes/Alias.js
553
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
554
554
  var require_Alias = __commonJS((exports) => {
555
555
  var anchors = require_anchors();
556
556
  var visit = require_visit();
@@ -658,7 +658,7 @@ var require_Alias = __commonJS((exports) => {
658
658
  exports.Alias = Alias;
659
659
  });
660
660
 
661
- // node_modules/yaml/dist/nodes/Scalar.js
661
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
662
662
  var require_Scalar = __commonJS((exports) => {
663
663
  var identity = require_identity();
664
664
  var Node = require_Node();
@@ -686,7 +686,7 @@ var require_Scalar = __commonJS((exports) => {
686
686
  exports.isScalarValue = isScalarValue;
687
687
  });
688
688
 
689
- // node_modules/yaml/dist/doc/createNode.js
689
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
690
690
  var require_createNode = __commonJS((exports) => {
691
691
  var Alias = require_Alias();
692
692
  var identity = require_identity();
@@ -758,7 +758,7 @@ var require_createNode = __commonJS((exports) => {
758
758
  exports.createNode = createNode;
759
759
  });
760
760
 
761
- // node_modules/yaml/dist/nodes/Collection.js
761
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
762
762
  var require_Collection = __commonJS((exports) => {
763
763
  var createNode = require_createNode();
764
764
  var identity = require_identity();
@@ -873,7 +873,7 @@ var require_Collection = __commonJS((exports) => {
873
873
  exports.isEmptyPath = isEmptyPath;
874
874
  });
875
875
 
876
- // node_modules/yaml/dist/stringify/stringifyComment.js
876
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
877
877
  var require_stringifyComment = __commonJS((exports) => {
878
878
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
879
879
  function indentComment(comment, indent) {
@@ -890,7 +890,7 @@ var require_stringifyComment = __commonJS((exports) => {
890
890
  exports.stringifyComment = stringifyComment;
891
891
  });
892
892
 
893
- // node_modules/yaml/dist/stringify/foldFlowLines.js
893
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
894
894
  var require_foldFlowLines = __commonJS((exports) => {
895
895
  var FOLD_FLOW = "flow";
896
896
  var FOLD_BLOCK = "block";
@@ -1027,7 +1027,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
1027
1027
  exports.foldFlowLines = foldFlowLines;
1028
1028
  });
1029
1029
 
1030
- // node_modules/yaml/dist/stringify/stringifyString.js
1030
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
1031
1031
  var require_stringifyString = __commonJS((exports) => {
1032
1032
  var Scalar = require_Scalar();
1033
1033
  var foldFlowLines = require_foldFlowLines();
@@ -1325,7 +1325,7 @@ ${indent}`);
1325
1325
  exports.stringifyString = stringifyString;
1326
1326
  });
1327
1327
 
1328
- // node_modules/yaml/dist/stringify/stringify.js
1328
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
1329
1329
  var require_stringify = __commonJS((exports) => {
1330
1330
  var anchors = require_anchors();
1331
1331
  var identity = require_identity();
@@ -1446,7 +1446,7 @@ ${ctx.indent}${str}`;
1446
1446
  exports.stringify = stringify;
1447
1447
  });
1448
1448
 
1449
- // node_modules/yaml/dist/stringify/stringifyPair.js
1449
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
1450
1450
  var require_stringifyPair = __commonJS((exports) => {
1451
1451
  var identity = require_identity();
1452
1452
  var Scalar = require_Scalar();
@@ -1582,7 +1582,7 @@ ${ctx.indent}`;
1582
1582
  exports.stringifyPair = stringifyPair;
1583
1583
  });
1584
1584
 
1585
- // node_modules/yaml/dist/log.js
1585
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
1586
1586
  var require_log = __commonJS((exports) => {
1587
1587
  var node_process = __require("process");
1588
1588
  function debug(logLevel, ...messages) {
@@ -1601,7 +1601,7 @@ var require_log = __commonJS((exports) => {
1601
1601
  exports.warn = warn;
1602
1602
  });
1603
1603
 
1604
- // node_modules/yaml/dist/schema/yaml-1.1/merge.js
1604
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
1605
1605
  var require_merge = __commonJS((exports) => {
1606
1606
  var identity = require_identity();
1607
1607
  var Scalar = require_Scalar();
@@ -1655,7 +1655,7 @@ var require_merge = __commonJS((exports) => {
1655
1655
  exports.merge = merge;
1656
1656
  });
1657
1657
 
1658
- // node_modules/yaml/dist/nodes/addPairToJSMap.js
1658
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
1659
1659
  var require_addPairToJSMap = __commonJS((exports) => {
1660
1660
  var log = require_log();
1661
1661
  var merge = require_merge();
@@ -1716,7 +1716,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
1716
1716
  exports.addPairToJSMap = addPairToJSMap;
1717
1717
  });
1718
1718
 
1719
- // node_modules/yaml/dist/nodes/Pair.js
1719
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
1720
1720
  var require_Pair = __commonJS((exports) => {
1721
1721
  var createNode = require_createNode();
1722
1722
  var stringifyPair = require_stringifyPair();
@@ -1754,7 +1754,7 @@ var require_Pair = __commonJS((exports) => {
1754
1754
  exports.createPair = createPair;
1755
1755
  });
1756
1756
 
1757
- // node_modules/yaml/dist/stringify/stringifyCollection.js
1757
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
1758
1758
  var require_stringifyCollection = __commonJS((exports) => {
1759
1759
  var identity = require_identity();
1760
1760
  var stringify = require_stringify();
@@ -1906,7 +1906,7 @@ ${indent}${end}`;
1906
1906
  exports.stringifyCollection = stringifyCollection;
1907
1907
  });
1908
1908
 
1909
- // node_modules/yaml/dist/nodes/YAMLMap.js
1909
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
1910
1910
  var require_YAMLMap = __commonJS((exports) => {
1911
1911
  var stringifyCollection = require_stringifyCollection();
1912
1912
  var addPairToJSMap = require_addPairToJSMap();
@@ -2033,7 +2033,7 @@ var require_YAMLMap = __commonJS((exports) => {
2033
2033
  exports.findPair = findPair;
2034
2034
  });
2035
2035
 
2036
- // node_modules/yaml/dist/schema/common/map.js
2036
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
2037
2037
  var require_map = __commonJS((exports) => {
2038
2038
  var identity = require_identity();
2039
2039
  var YAMLMap = require_YAMLMap();
@@ -2052,7 +2052,7 @@ var require_map = __commonJS((exports) => {
2052
2052
  exports.map = map;
2053
2053
  });
2054
2054
 
2055
- // node_modules/yaml/dist/nodes/YAMLSeq.js
2055
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
2056
2056
  var require_YAMLSeq = __commonJS((exports) => {
2057
2057
  var createNode = require_createNode();
2058
2058
  var stringifyCollection = require_stringifyCollection();
@@ -2145,7 +2145,7 @@ var require_YAMLSeq = __commonJS((exports) => {
2145
2145
  exports.YAMLSeq = YAMLSeq;
2146
2146
  });
2147
2147
 
2148
- // node_modules/yaml/dist/schema/common/seq.js
2148
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
2149
2149
  var require_seq = __commonJS((exports) => {
2150
2150
  var identity = require_identity();
2151
2151
  var YAMLSeq = require_YAMLSeq();
@@ -2164,7 +2164,7 @@ var require_seq = __commonJS((exports) => {
2164
2164
  exports.seq = seq;
2165
2165
  });
2166
2166
 
2167
- // node_modules/yaml/dist/schema/common/string.js
2167
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
2168
2168
  var require_string = __commonJS((exports) => {
2169
2169
  var stringifyString = require_stringifyString();
2170
2170
  var string = {
@@ -2180,7 +2180,7 @@ var require_string = __commonJS((exports) => {
2180
2180
  exports.string = string;
2181
2181
  });
2182
2182
 
2183
- // node_modules/yaml/dist/schema/common/null.js
2183
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
2184
2184
  var require_null = __commonJS((exports) => {
2185
2185
  var Scalar = require_Scalar();
2186
2186
  var nullTag = {
@@ -2195,7 +2195,7 @@ var require_null = __commonJS((exports) => {
2195
2195
  exports.nullTag = nullTag;
2196
2196
  });
2197
2197
 
2198
- // node_modules/yaml/dist/schema/core/bool.js
2198
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
2199
2199
  var require_bool = __commonJS((exports) => {
2200
2200
  var Scalar = require_Scalar();
2201
2201
  var boolTag = {
@@ -2216,7 +2216,7 @@ var require_bool = __commonJS((exports) => {
2216
2216
  exports.boolTag = boolTag;
2217
2217
  });
2218
2218
 
2219
- // node_modules/yaml/dist/stringify/stringifyNumber.js
2219
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
2220
2220
  var require_stringifyNumber = __commonJS((exports) => {
2221
2221
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
2222
2222
  if (typeof value === "bigint")
@@ -2240,7 +2240,7 @@ var require_stringifyNumber = __commonJS((exports) => {
2240
2240
  exports.stringifyNumber = stringifyNumber;
2241
2241
  });
2242
2242
 
2243
- // node_modules/yaml/dist/schema/core/float.js
2243
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
2244
2244
  var require_float = __commonJS((exports) => {
2245
2245
  var Scalar = require_Scalar();
2246
2246
  var stringifyNumber = require_stringifyNumber();
@@ -2283,7 +2283,7 @@ var require_float = __commonJS((exports) => {
2283
2283
  exports.floatNaN = floatNaN;
2284
2284
  });
2285
2285
 
2286
- // node_modules/yaml/dist/schema/core/int.js
2286
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
2287
2287
  var require_int = __commonJS((exports) => {
2288
2288
  var stringifyNumber = require_stringifyNumber();
2289
2289
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -2325,7 +2325,7 @@ var require_int = __commonJS((exports) => {
2325
2325
  exports.intOct = intOct;
2326
2326
  });
2327
2327
 
2328
- // node_modules/yaml/dist/schema/core/schema.js
2328
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
2329
2329
  var require_schema = __commonJS((exports) => {
2330
2330
  var map = require_map();
2331
2331
  var _null = require_null();
@@ -2350,7 +2350,7 @@ var require_schema = __commonJS((exports) => {
2350
2350
  exports.schema = schema;
2351
2351
  });
2352
2352
 
2353
- // node_modules/yaml/dist/schema/json/schema.js
2353
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
2354
2354
  var require_schema2 = __commonJS((exports) => {
2355
2355
  var Scalar = require_Scalar();
2356
2356
  var map = require_map();
@@ -2414,7 +2414,7 @@ var require_schema2 = __commonJS((exports) => {
2414
2414
  exports.schema = schema;
2415
2415
  });
2416
2416
 
2417
- // node_modules/yaml/dist/schema/yaml-1.1/binary.js
2417
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
2418
2418
  var require_binary = __commonJS((exports) => {
2419
2419
  var node_buffer = __require("buffer");
2420
2420
  var Scalar = require_Scalar();
@@ -2469,7 +2469,7 @@ var require_binary = __commonJS((exports) => {
2469
2469
  exports.binary = binary;
2470
2470
  });
2471
2471
 
2472
- // node_modules/yaml/dist/schema/yaml-1.1/pairs.js
2472
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
2473
2473
  var require_pairs = __commonJS((exports) => {
2474
2474
  var identity = require_identity();
2475
2475
  var Pair = require_Pair();
@@ -2544,7 +2544,7 @@ ${cn.comment}` : item.comment;
2544
2544
  exports.resolvePairs = resolvePairs;
2545
2545
  });
2546
2546
 
2547
- // node_modules/yaml/dist/schema/yaml-1.1/omap.js
2547
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
2548
2548
  var require_omap = __commonJS((exports) => {
2549
2549
  var identity = require_identity();
2550
2550
  var toJS = require_toJS();
@@ -2616,7 +2616,7 @@ var require_omap = __commonJS((exports) => {
2616
2616
  exports.omap = omap;
2617
2617
  });
2618
2618
 
2619
- // node_modules/yaml/dist/schema/yaml-1.1/bool.js
2619
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
2620
2620
  var require_bool2 = __commonJS((exports) => {
2621
2621
  var Scalar = require_Scalar();
2622
2622
  function boolStringify({ value, source }, ctx) {
@@ -2645,7 +2645,7 @@ var require_bool2 = __commonJS((exports) => {
2645
2645
  exports.trueTag = trueTag;
2646
2646
  });
2647
2647
 
2648
- // node_modules/yaml/dist/schema/yaml-1.1/float.js
2648
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
2649
2649
  var require_float2 = __commonJS((exports) => {
2650
2650
  var Scalar = require_Scalar();
2651
2651
  var stringifyNumber = require_stringifyNumber();
@@ -2691,7 +2691,7 @@ var require_float2 = __commonJS((exports) => {
2691
2691
  exports.floatNaN = floatNaN;
2692
2692
  });
2693
2693
 
2694
- // node_modules/yaml/dist/schema/yaml-1.1/int.js
2694
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
2695
2695
  var require_int2 = __commonJS((exports) => {
2696
2696
  var stringifyNumber = require_stringifyNumber();
2697
2697
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -2767,7 +2767,7 @@ var require_int2 = __commonJS((exports) => {
2767
2767
  exports.intOct = intOct;
2768
2768
  });
2769
2769
 
2770
- // node_modules/yaml/dist/schema/yaml-1.1/set.js
2770
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
2771
2771
  var require_set = __commonJS((exports) => {
2772
2772
  var identity = require_identity();
2773
2773
  var Pair = require_Pair();
@@ -2850,7 +2850,7 @@ var require_set = __commonJS((exports) => {
2850
2850
  exports.set = set;
2851
2851
  });
2852
2852
 
2853
- // node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
2853
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
2854
2854
  var require_timestamp = __commonJS((exports) => {
2855
2855
  var stringifyNumber = require_stringifyNumber();
2856
2856
  function parseSexagesimal(str, asBigInt) {
@@ -2932,7 +2932,7 @@ var require_timestamp = __commonJS((exports) => {
2932
2932
  exports.timestamp = timestamp;
2933
2933
  });
2934
2934
 
2935
- // node_modules/yaml/dist/schema/yaml-1.1/schema.js
2935
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
2936
2936
  var require_schema3 = __commonJS((exports) => {
2937
2937
  var map = require_map();
2938
2938
  var _null = require_null();
@@ -2973,7 +2973,7 @@ var require_schema3 = __commonJS((exports) => {
2973
2973
  exports.schema = schema;
2974
2974
  });
2975
2975
 
2976
- // node_modules/yaml/dist/schema/tags.js
2976
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
2977
2977
  var require_tags = __commonJS((exports) => {
2978
2978
  var map = require_map();
2979
2979
  var _null = require_null();
@@ -3064,7 +3064,7 @@ var require_tags = __commonJS((exports) => {
3064
3064
  exports.getTags = getTags;
3065
3065
  });
3066
3066
 
3067
- // node_modules/yaml/dist/schema/Schema.js
3067
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
3068
3068
  var require_Schema = __commonJS((exports) => {
3069
3069
  var identity = require_identity();
3070
3070
  var map = require_map();
@@ -3094,7 +3094,7 @@ var require_Schema = __commonJS((exports) => {
3094
3094
  exports.Schema = Schema;
3095
3095
  });
3096
3096
 
3097
- // node_modules/yaml/dist/stringify/stringifyDocument.js
3097
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
3098
3098
  var require_stringifyDocument = __commonJS((exports) => {
3099
3099
  var identity = require_identity();
3100
3100
  var stringify = require_stringify();
@@ -3174,7 +3174,7 @@ var require_stringifyDocument = __commonJS((exports) => {
3174
3174
  exports.stringifyDocument = stringifyDocument;
3175
3175
  });
3176
3176
 
3177
- // node_modules/yaml/dist/doc/Document.js
3177
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
3178
3178
  var require_Document = __commonJS((exports) => {
3179
3179
  var Alias = require_Alias();
3180
3180
  var Collection = require_Collection();
@@ -3409,7 +3409,7 @@ var require_Document = __commonJS((exports) => {
3409
3409
  exports.Document = Document;
3410
3410
  });
3411
3411
 
3412
- // node_modules/yaml/dist/errors.js
3412
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
3413
3413
  var require_errors = __commonJS((exports) => {
3414
3414
  class YAMLError extends Error {
3415
3415
  constructor(name, pos, code, message) {
@@ -3474,7 +3474,7 @@ ${pointer}
3474
3474
  exports.prettifyError = prettifyError;
3475
3475
  });
3476
3476
 
3477
- // node_modules/yaml/dist/compose/resolve-props.js
3477
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
3478
3478
  var require_resolve_props = __commonJS((exports) => {
3479
3479
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
3480
3480
  let spaceBefore = false;
@@ -3604,7 +3604,7 @@ var require_resolve_props = __commonJS((exports) => {
3604
3604
  exports.resolveProps = resolveProps;
3605
3605
  });
3606
3606
 
3607
- // node_modules/yaml/dist/compose/util-contains-newline.js
3607
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
3608
3608
  var require_util_contains_newline = __commonJS((exports) => {
3609
3609
  function containsNewline(key) {
3610
3610
  if (!key)
@@ -3644,7 +3644,7 @@ var require_util_contains_newline = __commonJS((exports) => {
3644
3644
  exports.containsNewline = containsNewline;
3645
3645
  });
3646
3646
 
3647
- // node_modules/yaml/dist/compose/util-flow-indent-check.js
3647
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
3648
3648
  var require_util_flow_indent_check = __commonJS((exports) => {
3649
3649
  var utilContainsNewline = require_util_contains_newline();
3650
3650
  function flowIndentCheck(indent, fc, onError) {
@@ -3659,7 +3659,7 @@ var require_util_flow_indent_check = __commonJS((exports) => {
3659
3659
  exports.flowIndentCheck = flowIndentCheck;
3660
3660
  });
3661
3661
 
3662
- // node_modules/yaml/dist/compose/util-map-includes.js
3662
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
3663
3663
  var require_util_map_includes = __commonJS((exports) => {
3664
3664
  var identity = require_identity();
3665
3665
  function mapIncludes(ctx, items, search) {
@@ -3672,7 +3672,7 @@ var require_util_map_includes = __commonJS((exports) => {
3672
3672
  exports.mapIncludes = mapIncludes;
3673
3673
  });
3674
3674
 
3675
- // node_modules/yaml/dist/compose/resolve-block-map.js
3675
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
3676
3676
  var require_resolve_block_map = __commonJS((exports) => {
3677
3677
  var Pair = require_Pair();
3678
3678
  var YAMLMap = require_YAMLMap();
@@ -3779,7 +3779,7 @@ var require_resolve_block_map = __commonJS((exports) => {
3779
3779
  exports.resolveBlockMap = resolveBlockMap;
3780
3780
  });
3781
3781
 
3782
- // node_modules/yaml/dist/compose/resolve-block-seq.js
3782
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
3783
3783
  var require_resolve_block_seq = __commonJS((exports) => {
3784
3784
  var YAMLSeq = require_YAMLSeq();
3785
3785
  var resolveProps = require_resolve_props();
@@ -3827,7 +3827,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
3827
3827
  exports.resolveBlockSeq = resolveBlockSeq;
3828
3828
  });
3829
3829
 
3830
- // node_modules/yaml/dist/compose/resolve-end.js
3830
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
3831
3831
  var require_resolve_end = __commonJS((exports) => {
3832
3832
  function resolveEnd(end, offset, reqSpace, onError) {
3833
3833
  let comment = "";
@@ -3867,7 +3867,7 @@ var require_resolve_end = __commonJS((exports) => {
3867
3867
  exports.resolveEnd = resolveEnd;
3868
3868
  });
3869
3869
 
3870
- // node_modules/yaml/dist/compose/resolve-flow-collection.js
3870
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
3871
3871
  var require_resolve_flow_collection = __commonJS((exports) => {
3872
3872
  var identity = require_identity();
3873
3873
  var Pair = require_Pair();
@@ -4058,7 +4058,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
4058
4058
  exports.resolveFlowCollection = resolveFlowCollection;
4059
4059
  });
4060
4060
 
4061
- // node_modules/yaml/dist/compose/compose-collection.js
4061
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
4062
4062
  var require_compose_collection = __commonJS((exports) => {
4063
4063
  var identity = require_identity();
4064
4064
  var Scalar = require_Scalar();
@@ -4120,7 +4120,7 @@ var require_compose_collection = __commonJS((exports) => {
4120
4120
  exports.composeCollection = composeCollection;
4121
4121
  });
4122
4122
 
4123
- // node_modules/yaml/dist/compose/resolve-block-scalar.js
4123
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
4124
4124
  var require_resolve_block_scalar = __commonJS((exports) => {
4125
4125
  var Scalar = require_Scalar();
4126
4126
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -4313,7 +4313,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
4313
4313
  exports.resolveBlockScalar = resolveBlockScalar;
4314
4314
  });
4315
4315
 
4316
- // node_modules/yaml/dist/compose/resolve-flow-scalar.js
4316
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
4317
4317
  var require_resolve_flow_scalar = __commonJS((exports) => {
4318
4318
  var Scalar = require_Scalar();
4319
4319
  var resolveEnd = require_resolve_end();
@@ -4529,7 +4529,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
4529
4529
  exports.resolveFlowScalar = resolveFlowScalar;
4530
4530
  });
4531
4531
 
4532
- // node_modules/yaml/dist/compose/compose-scalar.js
4532
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
4533
4533
  var require_compose_scalar = __commonJS((exports) => {
4534
4534
  var identity = require_identity();
4535
4535
  var Scalar = require_Scalar();
@@ -4607,7 +4607,7 @@ var require_compose_scalar = __commonJS((exports) => {
4607
4607
  exports.composeScalar = composeScalar;
4608
4608
  });
4609
4609
 
4610
- // node_modules/yaml/dist/compose/util-empty-scalar-position.js
4610
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
4611
4611
  var require_util_empty_scalar_position = __commonJS((exports) => {
4612
4612
  function emptyScalarPosition(offset, before, pos) {
4613
4613
  if (before) {
@@ -4634,7 +4634,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
4634
4634
  exports.emptyScalarPosition = emptyScalarPosition;
4635
4635
  });
4636
4636
 
4637
- // node_modules/yaml/dist/compose/compose-node.js
4637
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
4638
4638
  var require_compose_node = __commonJS((exports) => {
4639
4639
  var Alias = require_Alias();
4640
4640
  var identity = require_identity();
@@ -4737,7 +4737,7 @@ var require_compose_node = __commonJS((exports) => {
4737
4737
  exports.composeNode = composeNode;
4738
4738
  });
4739
4739
 
4740
- // node_modules/yaml/dist/compose/compose-doc.js
4740
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
4741
4741
  var require_compose_doc = __commonJS((exports) => {
4742
4742
  var Document = require_Document();
4743
4743
  var composeNode = require_compose_node();
@@ -4777,7 +4777,7 @@ var require_compose_doc = __commonJS((exports) => {
4777
4777
  exports.composeDoc = composeDoc;
4778
4778
  });
4779
4779
 
4780
- // node_modules/yaml/dist/compose/composer.js
4780
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
4781
4781
  var require_composer = __commonJS((exports) => {
4782
4782
  var node_process = __require("process");
4783
4783
  var directives = require_directives();
@@ -4966,7 +4966,7 @@ ${end.comment}` : end.comment;
4966
4966
  exports.Composer = Composer;
4967
4967
  });
4968
4968
 
4969
- // node_modules/yaml/dist/parse/cst-scalar.js
4969
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
4970
4970
  var require_cst_scalar = __commonJS((exports) => {
4971
4971
  var resolveBlockScalar = require_resolve_block_scalar();
4972
4972
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -5156,7 +5156,7 @@ var require_cst_scalar = __commonJS((exports) => {
5156
5156
  exports.setScalarValue = setScalarValue;
5157
5157
  });
5158
5158
 
5159
- // node_modules/yaml/dist/parse/cst-stringify.js
5159
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
5160
5160
  var require_cst_stringify = __commonJS((exports) => {
5161
5161
  var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
5162
5162
  function stringifyToken(token) {
@@ -5214,7 +5214,7 @@ var require_cst_stringify = __commonJS((exports) => {
5214
5214
  exports.stringify = stringify;
5215
5215
  });
5216
5216
 
5217
- // node_modules/yaml/dist/parse/cst-visit.js
5217
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
5218
5218
  var require_cst_visit = __commonJS((exports) => {
5219
5219
  var BREAK = Symbol("break visit");
5220
5220
  var SKIP = Symbol("skip children");
@@ -5273,7 +5273,7 @@ var require_cst_visit = __commonJS((exports) => {
5273
5273
  exports.visit = visit;
5274
5274
  });
5275
5275
 
5276
- // node_modules/yaml/dist/parse/cst.js
5276
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
5277
5277
  var require_cst = __commonJS((exports) => {
5278
5278
  var cstScalar = require_cst_scalar();
5279
5279
  var cstStringify = require_cst_stringify();
@@ -5374,7 +5374,7 @@ var require_cst = __commonJS((exports) => {
5374
5374
  exports.tokenType = tokenType;
5375
5375
  });
5376
5376
 
5377
- // node_modules/yaml/dist/parse/lexer.js
5377
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
5378
5378
  var require_lexer = __commonJS((exports) => {
5379
5379
  var cst = require_cst();
5380
5380
  function isEmpty(ch) {
@@ -5960,7 +5960,7 @@ var require_lexer = __commonJS((exports) => {
5960
5960
  exports.Lexer = Lexer;
5961
5961
  });
5962
5962
 
5963
- // node_modules/yaml/dist/parse/line-counter.js
5963
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
5964
5964
  var require_line_counter = __commonJS((exports) => {
5965
5965
  class LineCounter {
5966
5966
  constructor() {
@@ -5988,7 +5988,7 @@ var require_line_counter = __commonJS((exports) => {
5988
5988
  exports.LineCounter = LineCounter;
5989
5989
  });
5990
5990
 
5991
- // node_modules/yaml/dist/parse/parser.js
5991
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
5992
5992
  var require_parser = __commonJS((exports) => {
5993
5993
  var node_process = __require("process");
5994
5994
  var cst = require_cst();
@@ -6837,7 +6837,7 @@ var require_parser = __commonJS((exports) => {
6837
6837
  exports.Parser = Parser;
6838
6838
  });
6839
6839
 
6840
- // node_modules/yaml/dist/public-api.js
6840
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
6841
6841
  var require_public_api = __commonJS((exports) => {
6842
6842
  var composer = require_composer();
6843
6843
  var Document = require_Document();
@@ -6932,14 +6932,14 @@ var require_public_api = __commonJS((exports) => {
6932
6932
  });
6933
6933
 
6934
6934
  // src/agent-scheduler/index.ts
6935
- import { resolve as resolve2, join } from "node:path";
6935
+ import { resolve as resolve4, join } from "node:path";
6936
6936
 
6937
6937
  // src/config/loader.ts
6938
- import { readFileSync, existsSync } from "node:fs";
6938
+ import { readFileSync as readFileSync2, existsSync as existsSync3 } from "node:fs";
6939
6939
  import { homedir } from "node:os";
6940
- import { resolve } from "node:path";
6940
+ import { resolve as resolve3 } from "node:path";
6941
6941
 
6942
- // node_modules/yaml/dist/index.js
6942
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
6943
6943
  var composer = require_composer();
6944
6944
  var Document = require_Document();
6945
6945
  var Schema = require_Schema();
@@ -6985,7 +6985,7 @@ var $stringify = publicApi.stringify;
6985
6985
  var $visit = visit.visit;
6986
6986
  var $visitAsync = visit.visitAsync;
6987
6987
 
6988
- // node_modules/zod/v3/external.js
6988
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
6989
6989
  var exports_external = {};
6990
6990
  __export(exports_external, {
6991
6991
  void: () => voidType,
@@ -7097,7 +7097,7 @@ __export(exports_external, {
7097
7097
  BRAND: () => BRAND
7098
7098
  });
7099
7099
 
7100
- // node_modules/zod/v3/helpers/util.js
7100
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
7101
7101
  var util;
7102
7102
  (function(util2) {
7103
7103
  util2.assertEqual = (_) => {};
@@ -7228,7 +7228,7 @@ var getParsedType = (data) => {
7228
7228
  }
7229
7229
  };
7230
7230
 
7231
- // node_modules/zod/v3/ZodError.js
7231
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
7232
7232
  var ZodIssueCode = util.arrayToEnum([
7233
7233
  "invalid_type",
7234
7234
  "invalid_literal",
@@ -7347,7 +7347,7 @@ ZodError.create = (issues) => {
7347
7347
  return error;
7348
7348
  };
7349
7349
 
7350
- // node_modules/zod/v3/locales/en.js
7350
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
7351
7351
  var errorMap = (issue, _ctx) => {
7352
7352
  let message;
7353
7353
  switch (issue.code) {
@@ -7450,7 +7450,7 @@ var errorMap = (issue, _ctx) => {
7450
7450
  };
7451
7451
  var en_default = errorMap;
7452
7452
 
7453
- // node_modules/zod/v3/errors.js
7453
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
7454
7454
  var overrideErrorMap = en_default;
7455
7455
  function setErrorMap(map) {
7456
7456
  overrideErrorMap = map;
@@ -7458,7 +7458,7 @@ function setErrorMap(map) {
7458
7458
  function getErrorMap() {
7459
7459
  return overrideErrorMap;
7460
7460
  }
7461
- // node_modules/zod/v3/helpers/parseUtil.js
7461
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
7462
7462
  var makeIssue = (params) => {
7463
7463
  const { data, path, errorMaps, issueData } = params;
7464
7464
  const fullPath = [...path, ...issueData.path || []];
@@ -7564,14 +7564,14 @@ var isAborted = (x) => x.status === "aborted";
7564
7564
  var isDirty = (x) => x.status === "dirty";
7565
7565
  var isValid = (x) => x.status === "valid";
7566
7566
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
7567
- // node_modules/zod/v3/helpers/errorUtil.js
7567
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
7568
7568
  var errorUtil;
7569
7569
  (function(errorUtil2) {
7570
7570
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
7571
7571
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
7572
7572
  })(errorUtil || (errorUtil = {}));
7573
7573
 
7574
- // node_modules/zod/v3/types.js
7574
+ // node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
7575
7575
  class ParseInputLazyPath {
7576
7576
  constructor(parent, value, path, key) {
7577
7577
  this._cachedPath = [];
@@ -10964,10 +10964,15 @@ var CodeRepoEntrySchema = exports_external.object({
10964
10964
  source: exports_external.string().describe("Absolute or home-relative path to the repo (e.g. ~/code/switchroom)"),
10965
10965
  concurrency: exports_external.number().int().positive().optional().describe("Max simultaneous worktrees for this repo (default 5)")
10966
10966
  });
10967
+ var AgentBindMountSchema = exports_external.object({
10968
+ source: exports_external.string().describe("Absolute host path to bind-mount into the container. Tilde-expansion " + "is not performed — use the literal absolute path (e.g. " + "'/home/me/code/switchroom'). The compose generator refuses sources " + "under system paths (/, /etc, /proc, /sys, /dev, /run, /var/run, " + "/boot, /var/lib/docker) and the docker socket."),
10969
+ target: exports_external.string().optional().describe("Container path the source mounts to. Must be absolute. Defaults to " + "the same path as `source` (matches switchroom's existing dual-mount " + "convention so absolute paths in scaffolded scripts Just Work)."),
10970
+ mode: exports_external.enum(["ro", "rw"]).optional().describe("Read-only (default) or read-write. Use `rw` only when the agent " + "must mutate the host path (e.g. editing switchroom source). " + "Default: 'ro'.")
10971
+ });
10967
10972
  var ScheduleEntrySchema = exports_external.object({
10968
10973
  cron: exports_external.string().describe("Cron expression (e.g., '0 8 * * *')"),
10969
10974
  prompt: exports_external.string().describe("Prompt to send at the scheduled time"),
10970
- model: exports_external.string().optional().describe("Model for this task. Defaults to claude-sonnet-4-6 (cheap, fast). " + "Use claude-opus-4-6 for tasks needing complex reasoning."),
10975
+ model: exports_external.string().optional().describe("Model for this task. Defaults to claude-sonnet-4-6 (cheap, fast). " + "Use claude-opus-4-7 for tasks needing complex reasoning."),
10971
10976
  secrets: exports_external.array(exports_external.string().regex(/^[a-zA-Z0-9_\-/]+$/, "Secret key names must contain only alphanumeric characters, underscores, hyphens, and forward slashes")).default([]).describe("Vault key names this cron task may read via the vault-broker daemon. " + "Empty by default — broker requests for unlisted keys are denied. " + "Note: this is misconfiguration protection (a typo in cron-A doesn't " + "accidentally read cron-B's keys) rather than a security boundary — " + "anyone who can edit cron scripts can also edit switchroom.yaml, and " + "anyone with the vault passphrase can read the vault file directly. " + "See docs/configuration.md for the full framing.")
10972
10977
  });
10973
10978
  var AgentSoulSchema = exports_external.object({
@@ -11007,7 +11012,7 @@ var AgentHooksSchema = exports_external.object({
11007
11012
  SessionEnd: exports_external.array(HookEntrySchema).optional()
11008
11013
  }).catchall(exports_external.array(HookEntrySchema)).optional();
11009
11014
  var SubagentSchema = exports_external.object({
11010
- description: exports_external.string().describe("When the main agent should delegate to this sub-agent"),
11015
+ description: exports_external.string().optional().describe("When the main agent should delegate to this sub-agent"),
11011
11016
  model: exports_external.string().optional().describe("Model: 'sonnet', 'opus', 'haiku', full ID, or 'inherit' (default)"),
11012
11017
  background: exports_external.boolean().optional().describe("Run in background by default (non-blocking). Default false"),
11013
11018
  isolation: exports_external.enum(["worktree"]).optional().describe("'worktree' gives the sub-agent its own git branch"),
@@ -11044,10 +11049,6 @@ var TelegramChannelSchema = exports_external.object({
11044
11049
  deferred_completion_timeout_ms: exports_external.number().int().nonnegative().optional().describe("Force-close timeout (ms) for deferred sub-agent completion. After " + "the parent turn_end arrives while sub-agents are still running, the " + "card is force-closed after this many ms even if sub-agents never " + "finish. Watcher-disconnect safety net. Default 180000 (3 min)."),
11045
11050
  sub_agent_tick_interval_ms: exports_external.number().int().nonnegative().optional().describe("Heartbeat tick interval (ms) for sub-agent rendering. Forces a " + "re-render of the elapsed-time counter while sub-agents are running, " + "even during silent stretches between tool calls. Default 10000 (10 s). " + "Set to 0 to disable the elapsed-ticker path."),
11046
11051
  edit_budget_threshold: exports_external.number().int().nonnegative().optional().describe("Telegram API edit budget per minute before the progress-card driver " + "falls back to a slower coalesce window. When a chat accumulates more " + "than this many card edits in the trailing 60 s, the driver switches " + "to a wider coalesce interval until the rate drops back. Default 18. " + "Increase if your gateway frequently bumps the Telegram edit-rate ceiling " + "with many parallel sub-agents; decrease for a more conservative buffer."),
11047
- progress_card: exports_external.object({
11048
- delay_ms: exports_external.number().int().nonnegative().optional().describe("First-render delay (ms) for the pinned progress card (#842). The " + "driver buffers SessionEvents for this long after the turn starts; " + "if the turn ends before the threshold trips, no card is ever " + "posted. When the threshold trips, the card renders the full " + "buffered event stream and the live-update loop takes over. " + "Default 45000 (45 s). Set to 0 for the legacy immediate-render " + "behaviour."),
11049
- delay_ms_background: exports_external.number().int().nonnegative().optional().describe("First-render delay (ms) override for explicit background " + "sub-agent dispatches (#842). When the agent calls " + "`Agent({ run_in_background: true })`, the card is promoted out " + "of the suppression window using this delay instead of " + "`delay_ms`. Default 0 (immediate render — backgrounded work " + "should be visible right away).")
11050
- }).optional().describe("Progress-card first-render gating (#842). Defers the card until the " + "turn looks meaningful — short turns never flash a card at all."),
11051
11052
  stickers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Sticker aliases for the `send_sticker` MCP tool (#576). Maps a " + "short alias name (e.g. 'happy', 'thinking') to a Telegram file_id. " + "Operator-curated — capture file_ids from inbound stickers the user " + "sends and add them here. The agent calls send_sticker(chat_id, " + "alias='happy') and the gateway resolves to the file_id at send " + "time. Aliases enable persona-flavored expressiveness without " + "exposing raw file_ids in the agent prompt. Personal-assistant / " + "health-coach personas benefit; coding agents typically don't " + "configure any."),
11052
11053
  voice_in: exports_external.object({
11053
11054
  enabled: exports_external.boolean().optional().describe("Master switch for voice-message transcription."),
@@ -11090,13 +11091,27 @@ var ChannelsSchema = exports_external.object({
11090
11091
  }).optional();
11091
11092
  var TIMEZONE_REGEX = /^UTC$|^[A-Z][A-Za-z0-9_+-]+(\/[A-Z][A-Za-z0-9_+-]+){1,2}$/;
11092
11093
  var ApproverIdSchema = exports_external.union([exports_external.number(), exports_external.string().regex(/^\d+$/)]);
11093
- var DriveConfigSchema = exports_external.object({
11094
+ var GoogleWorkspaceTierSchema = exports_external.enum([
11095
+ "core",
11096
+ "extended",
11097
+ "complete"
11098
+ ]);
11099
+ var GoogleWorkspaceConfigSchema = exports_external.object({
11094
11100
  google_client_id: exports_external.string().min(1).describe("Google OAuth client ID (literal string or vault reference e.g. 'vault:google-oauth-client-id')"),
11095
11101
  google_client_secret: exports_external.string().min(1).describe("Google OAuth client secret (literal string or vault reference e.g. 'vault:google-oauth-client-secret')"),
11096
- approvers: exports_external.array(ApproverIdSchema).min(1).describe("Array of numeric Telegram user IDs authorized to approve drive onboarding. " + "At least one must be specified.")
11102
+ approvers: exports_external.array(ApproverIdSchema).min(1).describe("Array of numeric Telegram user IDs authorized to approve drive onboarding. " + "At least one must be specified."),
11103
+ tier: GoogleWorkspaceTierSchema.optional().describe("RFC G Phase 1: which upstream MCP tier to expose. " + "core (default) = ~16 tools (Drive+Docs+Sheets+Calendar). " + "extended = ~40 tools (+Slides, Forms, Tasks, Chat). " + "complete = ~60+ tools (+Gmail; not recommended yet — see RFC G §5).")
11097
11104
  }).optional();
11098
- var AgentDriveConfigSchema = exports_external.object({
11099
- approvers: exports_external.array(ApproverIdSchema).min(1).optional().describe("Per-agent approver override. When set, replaces (does not extend) " + "the top-level drive.approvers list for this agent's onboarding card.")
11105
+ var AgentGoogleWorkspaceConfigSchema = exports_external.object({
11106
+ approvers: exports_external.array(ApproverIdSchema).min(1).optional().describe("Per-agent approver override. When set, replaces (does not extend) " + "the top-level drive.approvers list for this agent's onboarding card."),
11107
+ tier: GoogleWorkspaceTierSchema.optional().describe("Per-agent tier override (RFC G Phase 1). When set, replaces the " + "top-level google_workspace.tier for this agent. Common case: most " + "agents on `core`, one specialist on `extended` for Slides access.")
11108
+ }).optional();
11109
+ var ReactionsSchema = exports_external.object({
11110
+ enabled: exports_external.boolean().optional().describe("Master switch for the reaction-trigger path. When false, " + "reactions are still persisted via recordReaction but never " + "dispatched to the agent as synthetic inbound turns. Default true."),
11111
+ trigger_emojis: exports_external.array(exports_external.string()).optional().describe("Emoji allowlist that triggers a synthetic inbound when reacted " + "to a bot message. Default ['\uD83D\uDC4E', '❌', '\uD83D\uDC4D', '✅']. Cascade " + "mode: REPLACE (not union) — setting this at a layer replaces " + "lower layers entirely, so an operator can narrow to [] to " + "disable triggering without flipping `enabled`."),
11112
+ debounce_ms: exports_external.number().int().nonnegative().optional().describe("Per-chat debounce window in ms. A qualifying reaction holds for " + "this long; a second qualifying reaction within the window " + "collapses both into a single batched synthetic turn. Default 30000."),
11113
+ per_hour_cap: exports_external.number().int().nonnegative().optional().describe("Max reaction-triggered synthetic turns per chat per rolling hour. " + "Refusals are stderr-logged but not surfaced to the agent. " + "Default 10. Set to 0 to disable triggering via the cap path."),
11114
+ group_admin_only: exports_external.boolean().optional().describe("In groups/supergroups (negative chat_id), only trigger a synthetic " + "turn when the reacter is a chat admin (creator or administrator). " + "Failing the lookup is treated as non-admin (fail-closed). " + "DMs are never affected by this flag — the reacter IS the user. " + "Default true.")
11100
11115
  }).optional();
11101
11116
  var profileFields = {
11102
11117
  extends: exports_external.string().optional(),
@@ -11122,6 +11137,7 @@ var profileFields = {
11122
11137
  }).optional()
11123
11138
  }).optional(),
11124
11139
  schedule: exports_external.array(ScheduleEntrySchema).optional(),
11140
+ reactions: ReactionsSchema,
11125
11141
  model: exports_external.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._\-/\[\]:]*$/, "Model name must be alphanumeric with ._-/[]: only").optional(),
11126
11142
  thinking_effort: exports_external.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Adaptive-thinking effort level passed as --effort to the claude CLI. " + "lower = faster/cheaper, higher = more reasoning. Omit to use Claude's default."),
11127
11143
  permission_mode: exports_external.enum(["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan"]).optional().describe("Permission mode passed as --permission-mode to the claude CLI. " + "Omit to use Claude's default (acceptEdits for switchroom agents). " + "Warning: bypassPermissions and dontAsk skip all safety checks — use only in trusted sandboxes."),
@@ -11142,6 +11158,12 @@ var profileFields = {
11142
11158
  claude_md_raw: exports_external.string().optional(),
11143
11159
  cli_args: exports_external.array(exports_external.string()).optional(),
11144
11160
  extra_stable_files: exports_external.array(exports_external.string()).optional().describe("Extra filenames (relative to the agent's workspace directory) to append " + "to the stable bootstrap render. Loaded once at session start via " + "`--append-system-prompt`. Missing files are silently skipped. " + "Example: ['BRIEF.md', 'CONTEXT.md']."),
11161
+ resources: exports_external.object({
11162
+ memory: exports_external.string().regex(/^\d+(\.\d+)?[kmgKMG]?$/, "memory must be a Docker size string like '6g', '512m', '1.5g'").optional().describe("Hard memory cap (Docker `mem_limit` → cgroup memory.max). When the " + "container exceeds this, the kernel OOM-kills processes in the cgroup. " + "Format: '6g', '1.5g', '512m'. When unset at every cascade layer the " + "compose generator falls back to the hard-coded per-profile defaults " + "in src/agents/compose.ts (klanker 6g, coding 2g, conversational 1.5g, " + "lightweight 1g, default 1.5g)."),
11163
+ memory_reservation: exports_external.string().regex(/^\d+(\.\d+)?[kmgKMG]?$/, "memory_reservation must be a Docker size string like '4g', '256m'").optional().describe("Soft memory floor (Docker `mem_reservation` → cgroup memory.low). " + "Under host-wide memory pressure, the kernel protects at least this " + "much from being reclaimed from the cgroup. Must be ≤ memory. Use to " + "keep an agent RAM-resident when the host has other tenants that " + "might push the box (Coolify apps, build jobs). Default: unset."),
11164
+ pids_limit: exports_external.number().int().positive().optional().describe("Max processes the cgroup can spawn (cgroup pids.max). Prevents " + "fork bombs and runaway test runners. Counts every process in the " + "cgroup including bash subprocesses, claude itself, sidecars, and " + "any test/build worker. A typical agent at idle uses ~30 PIDs; " + "`npm test`-style workloads can spike to 200+. Set generously " + "(2000 is a comfortable cap for test-running agents). Default: " + "unset (no cgroup pid cap)."),
11165
+ cpus: exports_external.number().positive().optional().describe("CPU quota (Docker `cpus`). Fractional values OK (e.g. 0.5, 2.0). " + "When unset at every cascade layer the compose generator falls " + "back to the per-profile default (klanker/coding 2.0, default 1.0, " + "lightweight 0.5).")
11166
+ }).optional().describe("Per-agent resource limits. Cascades through defaults → profile → " + "per-agent with per-field merge (agent wins on each field independently). " + "Any field left unset at every layer falls back to the hard-coded " + "per-profile defaults in src/agents/compose.ts."),
11145
11167
  experimental: exports_external.object({
11146
11168
  legacy_pty: exports_external.boolean().optional().describe("Opt out of the default tmux supervisor (#725) and run the agent under " + "the legacy PTY supervisor instead. Default: false (tmux is the default)."),
11147
11169
  legacy_autoaccept_expect: exports_external.boolean().optional().describe("Opt the autoaccept gateway back into the legacy expect-script behaviour " + "instead of the tmux send-keys path. Default: false.")
@@ -11155,13 +11177,13 @@ var AgentSchema = exports_external.object({
11155
11177
  bot_token: exports_external.string().optional().describe("Per-agent Telegram bot token or vault reference (overrides global telegram.bot_token)"),
11156
11178
  bot_username: exports_external.string().optional().describe("Per-agent Telegram bot username (without leading @) when it doesn't " + "contain the agent slug. Replaces the default 'username includes slug' " + "preflight check with an exact (case-insensitive) match. Use when an " + "agent and its bot have intentionally divergent names (e.g. agent " + "'lawgpt' paired with bot '@meken_law_bot')."),
11157
11179
  timezone: exports_external.string().regex(TIMEZONE_REGEX, "timezone must be an IANA zone name like 'Australia/Melbourne' or 'UTC' " + "(three-letter aliases like EST/PST and bare offsets like UTC+10 are not accepted)").optional().describe("Per-agent IANA timezone override. Wins over any profile/defaults " + "value and over the top-level switchroom.timezone global. Controls " + "the UserPromptSubmit timezone hook's emitted local time and the " + "systemd unit's TZ= env."),
11158
- auth_label: exports_external.string().optional().describe("Human-readable identity for the session-start greeting (e.g. 'user@example.com'). " + "Anthropic does not expose a public user-profile endpoint for OAuth tokens, so the " + "email/account cannot be read locally; the user declares it here. Appears in the Auth " + "row as '✓ max · <label> · expires ...'."),
11159
11180
  auth: exports_external.object({
11160
- accounts: exports_external.array(exports_external.string()).optional().describe("Ordered list of Anthropic account labels (from `~/.switchroom/accounts/`) " + "this agent can use. The first non-quota-exhausted account is the active one; " + "subsequent entries are auto-fallback targets. switchroom-auth-broker keeps " + "`<agentDir>/.claude/credentials.json` in sync with the active account on " + "every refresh and on every quota event. When unset, the agent falls back to " + "a single 'default' account; if no `default` account exists, the boot self-test " + "surfaces a one-line nudge to run `switchroom auth account add`.")
11161
- }).optional().describe("Account routing for switchroom-auth-broker. See " + "reference/share-auth-across-the-fleet.md for the unit-of-authentication model."),
11181
+ override: exports_external.string().min(1).optional().describe("Per-agent override of the fleet-wide `auth.active`. Edge-case use only " + "this agent talks to the named account regardless of fleet active. See RFC H §4.5.")
11182
+ }).optional().describe("Account routing for switchroom-auth-broker. RFC H schema uses " + "fleet-wide `auth.active` plus per-agent `override:` for edge cases. " + "Pre-RFC-H `auth.accounts: [..]` and `auth_label:` are migrated in-place " + "on first apply (see src/auth/migrate-schema.ts)."),
11162
11183
  dm_only: exports_external.boolean().optional().describe("Mark this agent as a DM-only bot — has its own bot_token and lives " + "exclusively in a private chat with the operator. Suppresses " + "scaffolding's default behavior of inheriting the global " + "telegram.forum_chat_id into the agent's access.json `groups` entry " + "(the forum chat the bot isn't a member of, which would otherwise " + "trigger a 'boot-probe-failed: 400 chat not found' warning every " + "restart). topic_name is still schema-required but unused — set it " + "to a display label like 'DM' for /switchroom status output."),
11163
11184
  topic_name: exports_external.string().describe("Telegram forum topic display name"),
11164
11185
  topic_emoji: exports_external.string().optional().describe("Emoji for the topic (e.g., '\uD83C\uDFCB️')"),
11186
+ purpose: exports_external.string().max(140).optional().describe("One-line description of what this agent does (≤140 chars). Shown to " + "peer agents when they call the agent-config MCP `peers_list` tool, so " + "every agent on the instance can answer 'is there an agent that does X' " + "without baking the fleet into prompts. Sourced live from " + "switchroom.yaml — never memorized into Hindsight. Falls back to " + "`topic_name` when absent."),
11165
11187
  role: exports_external.enum(["assistant", "foreman"]).optional().describe("Agent role. Default (omitted) is `assistant` — a fleet agent doing " + "user-facing tasks. `foreman` opts the agent in to switchroom's bundled " + "operator skills (switchroom-architecture / cli / health / install / manage " + "/ status), auto-symlinked into the agent's .claude/skills/ on scaffold and " + "reconcile. Fleet agents (assistant role) get no operator skills; reconcile " + "actively retracts them if the role flips back. See docs/skills.md for the model."),
11166
11188
  topic_id: exports_external.number().optional().describe("Telegram topic thread ID (auto-populated by switchroom topics sync)"),
11167
11189
  webhook_sources: exports_external.array(exports_external.enum(["github", "generic"])).optional().describe("[DEPRECATED — moved to channels.telegram.webhook_sources in #596] " + "Old per-agent location. Still read but logs a deprecation warning. " + "See channels.telegram.webhook_sources for the canonical spot."),
@@ -11180,6 +11202,7 @@ var AgentSchema = exports_external.object({
11180
11202
  tools: AgentToolsSchema,
11181
11203
  memory: AgentMemorySchema,
11182
11204
  schedule: exports_external.array(ScheduleEntrySchema).default([]),
11205
+ reactions: ReactionsSchema,
11183
11206
  model: exports_external.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._\-/\[\]:]*$/, "Model name must be alphanumeric with ._-/[]: only (no spaces or shell specials)").optional().describe("Claude model override (e.g., 'claude-sonnet-4-6')"),
11184
11207
  thinking_effort: exports_external.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Adaptive-thinking effort level passed as --effort to the claude CLI. " + "Per-agent override wins over defaults.thinking_effort. " + "lower = faster/cheaper, higher = more reasoning. Omit to use Claude's default."),
11185
11208
  permission_mode: exports_external.enum(["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan"]).optional().describe("Permission mode passed as --permission-mode to the claude CLI. " + "Per-agent override wins over defaults.permission_mode. " + "Warning: bypassPermissions and dontAsk skip all safety checks — use only in trusted sandboxes."),
@@ -11196,17 +11219,19 @@ var AgentSchema = exports_external.object({
11196
11219
  session_continuity: SessionContinuitySchema.describe("Handoff-briefing settings. When enabled (default), a Stop hook " + "summarizes each session at shutdown and start.sh injects that " + "briefing into the next session via --append-system-prompt."),
11197
11220
  channels: ChannelsSchema.describe("Per-channel configuration. Today only `telegram` is defined; the " + "shape is designed to expand to other channels (Slack, Discord, " + "Matrix, Email) as they're added."),
11198
11221
  dangerous_mode: exports_external.boolean().optional().describe("If true, include --dangerously-skip-permissions in start.sh"),
11199
- skip_permission_prompt: exports_external.boolean().optional().describe("If true, add skipDangerousModePermissionPrompt to settings.json"),
11222
+ skip_permission_prompt: exports_external.boolean().optional().describe("DEPRECATED no-op (accepted for backwards compatibility). Claude Code " + "ignores skipDangerousModePermissionPrompt at project scope; autoaccept " + "(src/agents/autoaccept.ts) handles the bypass-mode prompt instead. " + "Safe to remove from switchroom.yaml."),
11200
11223
  admin: exports_external.boolean().optional().describe("If true, the agent's Telegram gateway intercepts admin slash commands " + "(/agents, /logs, /restart, /delete, /update, /auth, /reconcile, etc.) " + "locally before forwarding to Claude. Commands are handled silently — " + "Claude never sees them. Requires the agent to use the switchroom-telegram " + "plugin. When false or absent, all messages pass through to Claude unchanged."),
11201
11224
  settings_raw: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Escape hatch: raw object deep-merged into the generated " + "settings.json as the final step. Use for Claude Code settings " + "keys switchroom doesn't wrap directly (e.g. effort, apiKeyHelper). " + "Power-user-only — prefer the typed fields when they exist."),
11202
11225
  claude_md_raw: exports_external.string().optional().describe("Escape hatch: markdown text appended verbatim to CLAUDE.md on " + "initial scaffold. Not re-applied on reconcile (CLAUDE.md is " + "user-protected). Use for one-off persona tuning that isn't " + "worth a template."),
11203
11226
  cli_args: exports_external.array(exports_external.string()).optional().describe("Escape hatch: extra arguments appended to the `exec claude` " + "invocation in start.sh. Use for Claude Code CLI flags switchroom " + "doesn't expose directly (e.g. --effort high, " + "--exclude-dynamic-system-prompt-sections)."),
11204
- add_dirs: exports_external.array(exports_external.string()).optional().describe("Additional filesystem paths the agent's tools can access. Passed " + "as repeated --add-dir <path> on the claude invocation. Use to grant " + "an agent reach into shared dirs (e.g. '/share/collab') without " + "scaffold hacks. Per-agent only — paths are persona-specific. See #199."),
11227
+ add_dirs: exports_external.array(exports_external.string()).optional().describe("Additional filesystem paths the agent's tools can access. Passed " + "as repeated --add-dir <path> on the claude invocation. Use to grant " + "an agent reach into shared dirs (e.g. '/share/collab') without " + "scaffold hacks. Per-agent only — paths are persona-specific. See #199. " + "Note: this only adjusts the claude CLI's --add-dir tool-reach allowlist. " + "If the path is not already inside the agent's container, also declare " + "it in `bind_mounts:` (admin agents only) — otherwise the path doesn't " + "exist inside the sandbox and --add-dir is a no-op."),
11228
+ bind_mounts: exports_external.array(AgentBindMountSchema).optional().describe("Extra host paths bind-mounted into this agent's container, on top of " + "the standard dual-mount baseline. ADMIN-ONLY: the compose generator " + "refuses to emit bind_mounts unless `admin: true` is also set on the " + "same agent. Use to dogfood / self-modify switchroom or another repo " + "(see issue #1164). Pair with `add_dirs:` so claude's tool-reach " + "allowlist also covers the mounted path. System paths (/, /etc, " + "/proc, /sys, /dev, /run, /var/run, /boot, /var/lib/docker, " + "/var/run/docker.sock) are denylisted regardless of mode."),
11205
11229
  allowed_tools: exports_external.array(exports_external.string()).optional().describe("Granular tool allowlist passed verbatim to Claude Code's --allowedTools " + "flag. Supports patterns like 'Bash(git *)' or 'Edit(*.md)' that the " + "coarse `tools.allow` field can't express. When set, Claude Code OR-merges " + "with `tools.allow` (granular only when present, otherwise coarse — chosen " + "via #199 to keep blast radius minimal for existing operators on tools.allow). " + "See #199."),
11206
11230
  disallowed_tools: exports_external.array(exports_external.string()).optional().describe("Granular tool denylist passed verbatim to Claude Code's --disallowedTools " + "flag. Same pattern syntax as allowed_tools (e.g. 'Bash(rm *)'). See #199."),
11207
11231
  extra_stable_files: exports_external.array(exports_external.string()).optional().describe("Extra filenames (relative to the agent's workspace directory) to append " + "to the stable bootstrap render. Loaded once at session start via " + "`--append-system-prompt`. Missing files are silently skipped. " + "Example: ['BRIEF.md', 'CONTEXT.md']."),
11208
11232
  code_repos: exports_external.array(CodeRepoEntrySchema).optional().describe("Git repositories this agent is allowed to claim worktrees from. " + "Each entry provides a short name alias, a source path, and an " + "optional concurrency cap (default 5). When code_repos is set, " + "claim_worktree accepts the alias as the repo argument. " + "Absolute paths may always be passed regardless of this list."),
11209
- drive: AgentDriveConfigSchema.describe("Per-agent drive onboarding overrides (currently just approvers). " + "When set, replaces the top-level drive.approvers list for this agent. " + "google_client_id/secret are not per-agent — they live at the top level."),
11233
+ drive: AgentGoogleWorkspaceConfigSchema.describe("RFC D legacy key — use `google_workspace:` instead. Per-agent " + "google_workspace overrides (currently approvers + tier). When set, " + "replaces the top-level approvers list for this agent. " + "google_client_id/secret are not per-agent — they live at the top level."),
11234
+ google_workspace: AgentGoogleWorkspaceConfigSchema.describe("RFC G canonical key. Per-agent Google Workspace overrides — currently " + "approvers (replaces, does not extend the top-level list) and tier " + "(`core` | `extended` | `complete`, replaces top-level default). " + "google_client_id/secret are not per-agent — they live at the top level. " + "Mutually exclusive with `drive:` on the same agent (loader fails fast " + "if both are set)."),
11210
11235
  repos: exports_external.record(exports_external.string().regex(/^[a-z0-9][a-z0-9-]*$/, "Repo slug must be kebab-case ASCII: start with a lowercase letter or digit, contain only lowercase letters, digits, and hyphens"), exports_external.object({
11211
11236
  url: exports_external.string().min(1).describe("Git remote URL for the repo (e.g. 'git@github.com:org/repo.git' or " + "'https://github.com/org/repo.git'). Used verbatim for git clone."),
11212
11237
  branch_default: exports_external.string().optional().describe("Default branch to track (defaults to the remote's HEAD, typically 'main'). " + "The per-agent branch 'agent/<agentName>/main' fast-forwards to this branch " + "when the worktree is clean on session start.")
@@ -11214,7 +11239,13 @@ var AgentSchema = exports_external.object({
11214
11239
  experimental: exports_external.object({
11215
11240
  legacy_pty: exports_external.boolean().optional().describe("Opt out of the default tmux supervisor (#725) and run the agent " + "under the legacy PTY supervisor instead. Default: false."),
11216
11241
  legacy_autoaccept_expect: exports_external.boolean().optional().describe("Opt the autoaccept gateway back into the legacy expect-script " + "behaviour instead of the tmux send-keys path. Default: false.")
11217
- }).optional().describe("Opt-in flags for experimental / legacy behaviours. Cascades through " + "defaults → profile → per-agent.")
11242
+ }).optional().describe("Opt-in flags for experimental / legacy behaviours. Cascades through " + "defaults → profile → per-agent."),
11243
+ resources: exports_external.object({
11244
+ memory: exports_external.string().regex(/^\d+(\.\d+)?[kmgKMG]?$/).optional(),
11245
+ memory_reservation: exports_external.string().regex(/^\d+(\.\d+)?[kmgKMG]?$/).optional(),
11246
+ pids_limit: exports_external.number().int().positive().optional(),
11247
+ cpus: exports_external.number().positive().optional()
11248
+ }).optional()
11218
11249
  });
11219
11250
  var TelegramConfigSchema = exports_external.object({
11220
11251
  bot_token: exports_external.string().describe("Telegram bot token or vault reference (e.g., 'vault:telegram-bot-token')"),
@@ -11237,13 +11268,26 @@ var VaultConfigSchema = exports_external.object({
11237
11268
  socket: exports_external.string().default("~/.switchroom/vault-broker.sock").describe("Unix domain socket path for the vault-broker daemon"),
11238
11269
  enabled: exports_external.boolean().default(true).describe("Whether to start the vault-broker daemon on agent launch"),
11239
11270
  autoUnlock: exports_external.boolean().default(false).describe("Auto-unlock the vault at broker start using a machine-bound " + "encrypted blob. Off by default. When enabled, the broker reads " + "the configured blob path, derives the AES key from /etc/machine-id, " + "decrypts the passphrase, and unlocks the vault — no sudo, no " + "systemd-creds, no TPM. Run `switchroom vault broker " + "enable-auto-unlock` once to write the blob."),
11240
- autoUnlockCredentialPath: exports_external.string().default("~/.switchroom/vault-auto-unlock").describe("Path to the machine-bound auto-unlock blob (see " + "src/vault/auto-unlock.ts for the format). Default lives under " + "~/.switchroom so it can be bind-mounted into the vault-broker " + "container by docker compose. Tilde-expansion happens " + "at read time.")
11241
- }).default({}).describe("Vault-broker daemon configuration. The broker holds the decrypted vault " + "in memory and serves secrets to cron scripts via a Unix socket, so the " + "vault passphrase is entered once at startup rather than per-cron invocation.")
11271
+ autoUnlockCredentialPath: exports_external.string().default("~/.switchroom/vault-auto-unlock").describe("Path to the machine-bound auto-unlock blob (see " + "src/vault/auto-unlock.ts for the format). Default lives under " + "~/.switchroom so it can be bind-mounted into the vault-broker " + "container by docker compose. Tilde-expansion happens " + "at read time."),
11272
+ approvalAuth: exports_external.enum(["passphrase", "telegram-id"]).default("passphrase").describe("Posture for tap-to-Approve on vault grant cards. `passphrase` " + "(default) prompts the operator to type the vault passphrase on " + "every Approve two-factor (Telegram ID + passphrase). " + "`telegram-id` mints immediately on Approve with no passphrase " + "prompt — single-factor (Telegram ID only); REQUIRES " + "`autoUnlock: true` so the broker already holds the passphrase. " + "Trades a factor of security for smoother UX; opt-in only."),
11273
+ postureMintAgents: exports_external.array(exports_external.string().min(1)).default([]).describe("Per-agent opt-in for posture-attested broker calls (`mint_grant` / " + "`list_grants` / `put` with `attest_via_posture: true`). Only agents " + "whose names are in this list can use the silent-mint path under " + "`approvalAuth: telegram-id`. Default `[]` — no agent can self-mint " + "until the operator explicitly opts it in. The request's `agent` " + "field must also equal the calling peer's resolved agent name " + "(broker rejects cross-agent posture mints). When `approvalAuth` is " + "`passphrase` this list is ignored — passphrase attestation still " + "works as before. Each entry is an agent slug exactly as it appears " + "under `agents:` in this config.")
11274
+ }).default({}).superRefine((broker, ctx) => {
11275
+ if (broker.approvalAuth === "telegram-id" && broker.autoUnlock !== true) {
11276
+ ctx.addIssue({
11277
+ code: exports_external.ZodIssueCode.custom,
11278
+ message: "`vault.broker.approvalAuth: telegram-id` requires `autoUnlock: true` — single-factor approval needs the broker already unlocked at startup.",
11279
+ path: ["approvalAuth"]
11280
+ });
11281
+ }
11282
+ }).describe("Vault-broker daemon configuration. The broker holds the decrypted vault " + "in memory and serves secrets to cron scripts via a Unix socket, so the " + "vault passphrase is entered once at startup rather than per-cron invocation.")
11242
11283
  });
11243
11284
  var QuotaConfigSchema = exports_external.object({
11244
11285
  weekly_budget_usd: exports_external.number().positive().optional().describe("Weekly USD spend budget. If unset, the greeting shows raw usage only."),
11245
11286
  monthly_budget_usd: exports_external.number().positive().optional().describe("Monthly USD spend budget. If unset, the greeting shows raw usage only.")
11246
11287
  });
11288
+ var HostControlConfigSchema = exports_external.object({
11289
+ enabled: exports_external.boolean().optional().describe("Opt-in to the host-control daemon. Default: false. " + "When true, the compose generator emits per-agent bind mounts " + "at `~/.switchroom/hostd/<name>/sock` for every admin-flagged " + "agent. Install the daemon with `switchroom hostd install` — " + "it runs as a docker container in its own compose project " + "(`switchroom-hostd`), separate from the agent fleet's compose " + "project so `up -d --remove-orphans` cycles of the fleet " + "can't recreate the daemon mid-RPC. See RFC C §5.1. " + "Since Phase 2 (#1175 PR γ) the gateway's /restart, /new, /reset, " + "and /update apply slash-commands automatically dispatch through " + "hostd when enabled — replacing the in-container " + "`spawnSwitchroomDetached` shellout that requires docker access. " + "Set enabled: true on docker-mode installs to make those verbs work " + "(they otherwise fail because the agent container has no docker " + "binary/socket).")
11290
+ });
11247
11291
  var SwitchroomConfigSchema = exports_external.object({
11248
11292
  switchroom: exports_external.object({
11249
11293
  version: exports_external.literal(1).describe("Config schema version"),
@@ -11254,8 +11298,28 @@ var SwitchroomConfigSchema = exports_external.object({
11254
11298
  telegram: TelegramConfigSchema,
11255
11299
  memory: MemoryBackendConfigSchema.optional(),
11256
11300
  vault: VaultConfigSchema.optional(),
11257
- drive: DriveConfigSchema.describe("Optional drive onboarding configuration. When set, supplies Google " + "OAuth client credentials and the approver allowlist for `switchroom " + "drive connect`. Env vars (SWITCHROOM_GOOGLE_CLIENT_ID, " + "SWITCHROOM_GOOGLE_CLIENT_SECRET, SWITCHROOM_APPROVER_USER_ID) take " + "precedence over this block when set, preserving back-compat with " + "the env-only flow shipped in #766."),
11301
+ auth: exports_external.object({
11302
+ active: exports_external.string().min(1).optional().describe("Fleet-wide active Anthropic account label. Every agent without " + "an explicit `agent.auth.override` uses this account. See " + "docs/auth.md for the full model. Set by `switchroom auth use <label>`."),
11303
+ fallback_order: exports_external.array(exports_external.string().min(1)).optional().describe("Ordered list of account labels for `switchroom auth rotate` to cycle " + "through when the active account hits a quota event. First entry is " + "normally the same as `auth.active`. When unset, `rotate` is a no-op."),
11304
+ consumers: exports_external.array(exports_external.object({
11305
+ name: exports_external.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/, {
11306
+ message: "Consumer name must be a path-safe slug (letters, digits, underscore, hyphen)"
11307
+ }).describe("Socket-path identity; binds at /run/switchroom/auth-broker/<name>/sock"),
11308
+ account: exports_external.string().min(1).describe("Pinned account label for this consumer. `get-credentials` returns " + "this account's credentials; `mark-exhausted` from this consumer " + "only affects this account."),
11309
+ uid: exports_external.number().int().nonnegative().optional().describe("Optional UID to chown the consumer socket to (defaults to 0 = root, " + "suitable for sibling containers running as root).")
11310
+ })).optional().describe("Non-agent peers that hold a broker socket (RFC H §4.8). Each gets " + "its own `/run/switchroom/auth-broker/<name>/sock` chowned to its UID. " + "Consumers cannot be admins; a consumer name that collides with an " + "agent (whether that agent has `admin: true` or not) is a config " + "error caught at schema validation.")
11311
+ }).optional().describe("Switchroom-auth-broker configuration (RFC H). Fleet-wide active account, " + "fallback order, admin-agent ACL, and ephemeral-consumer surface. " + "Required from the v0.8+ schema onwards; pre-v0.8 fleets are migrated " + "in-place by `switchroom apply` (see src/auth/migrate-schema.ts)."),
11312
+ drive: GoogleWorkspaceConfigSchema.describe("RFC D legacy key — use `google_workspace:` instead. Optional Google " + "Workspace onboarding configuration. When set, supplies Google OAuth " + "client credentials, the approver allowlist for `switchroom drive " + "connect`, and the optional tier knob. Env vars " + "(SWITCHROOM_GOOGLE_CLIENT_ID, SWITCHROOM_GOOGLE_CLIENT_SECRET, " + "SWITCHROOM_APPROVER_USER_ID) take precedence over this block when " + "set, preserving back-compat with the env-only flow shipped in #766."),
11313
+ google_workspace: GoogleWorkspaceConfigSchema.describe("RFC G canonical key. Top-level Google Workspace configuration — " + "OAuth client credentials, approver allowlist, and tier knob (`core` " + "| `extended` | `complete`, default `core`). Mutually exclusive with " + "`drive:` at the top level (loader fails fast if both are set)."),
11258
11314
  quota: QuotaConfigSchema.optional().describe("Optional weekly/monthly USD spend budgets rendered in the session " + "greeting. Usage is read from ccusage at runtime; no network calls."),
11315
+ host_control: HostControlConfigSchema.optional().describe("Optional host-control daemon configuration. See RFC C " + "(docs/rfcs/host-control-daemon.md) and the field-level help on " + "`enabled` for the Phase 1 scope."),
11316
+ google_accounts: exports_external.record(exports_external.string().regex(/^[^@\s:]+@[^@\s:]+\.[^@\s:]+$/, {
11317
+ message: "Account key must be a Google account email like 'alice@example.com' (colons not allowed)"
11318
+ }).transform((v) => v.trim().toLowerCase()), exports_external.object({
11319
+ enabled_for: exports_external.array(exports_external.string().regex(/^[a-z0-9][a-z0-9_-]{0,50}$/, {
11320
+ message: "Agent name must match the standard agent-name pattern"
11321
+ })).describe("Agent slugs that may read this account's vault slots " + "(`google:<account>:refresh_token` etc). Per-agent ACL is " + "enforced at the broker, not at the agent identity layer — " + "the agent still authenticates via socket-path-as-identity " + "per RFC D §4.1, broker just gates the cross-agent token share.")
11322
+ })).optional().describe("RFC G Phase 2: per-Google-account ACL for vault slots holding " + "OAuth refresh tokens. Maps account email → list of agents " + "permitted to read that account's slots. Written by `switchroom " + "auth google enable|disable` (Phase 3); read by the broker on " + "every Google slot access. Replaces RFC D's per-agent vault slot " + "scope (which can't express 'two agents share one Google account')."),
11259
11323
  defaults: AgentDefaultsSchema.describe("Implicit bottom-of-cascade profile applied to every agent before " + "per-agent config and `extends:` resolution. Tools, mcp_servers, and " + "schedule are unioned/concatenated; scalars and nested objects are " + "shallow-merged with per-agent values winning."),
11260
11324
  profiles: exports_external.record(exports_external.string(), ProfileSchema).optional().describe("Named profile definitions. Agents reference via `extends: <name>`. " + "Inline profiles declared here take priority over filesystem " + "profiles/<name>/ directories when both exist."),
11261
11325
  agents: exports_external.record(exports_external.string().regex(/^[a-z0-9][a-z0-9_-]{0,50}$/, {
@@ -11263,6 +11327,158 @@ var SwitchroomConfigSchema = exports_external.object({
11263
11327
  }), AgentSchema).describe("Map of agent name to agent configuration")
11264
11328
  });
11265
11329
 
11330
+ // src/config/paths.ts
11331
+ import { existsSync } from "node:fs";
11332
+ import { resolve } from "node:path";
11333
+ var DEFAULT_STATE_DIR = ".switchroom";
11334
+ var LEGACY_STATE_DIR = ".clerk";
11335
+ function home() {
11336
+ return process.env.HOME ?? "/root";
11337
+ }
11338
+ function resolveDualPath(pathStr) {
11339
+ const h = home();
11340
+ if (pathStr.startsWith("~/")) {
11341
+ const rest = pathStr.slice(2);
11342
+ const absolute = resolve(h, rest);
11343
+ if (rest.startsWith(`${DEFAULT_STATE_DIR}/`)) {
11344
+ const frag = rest.slice(DEFAULT_STATE_DIR.length + 1);
11345
+ if (!existsSync(absolute)) {
11346
+ const legacy = resolve(h, LEGACY_STATE_DIR, frag);
11347
+ if (existsSync(legacy))
11348
+ return legacy;
11349
+ }
11350
+ }
11351
+ return absolute;
11352
+ }
11353
+ return resolve(pathStr);
11354
+ }
11355
+
11356
+ // src/config/overlay-loader.ts
11357
+ import { existsSync as existsSync2, readFileSync, readdirSync, statSync } from "node:fs";
11358
+ import { resolve as resolve2 } from "node:path";
11359
+
11360
+ // src/config/overlay-schema.ts
11361
+ var OverlayDocSchema = exports_external.object({
11362
+ schedule: exports_external.array(ScheduleEntrySchema).optional(),
11363
+ skills: exports_external.array(exports_external.string()).optional()
11364
+ }).strict();
11365
+
11366
+ // src/config/overlay-loader.ts
11367
+ var OVERLAY_SOURCE = Symbol.for("switchroom.config.overlay-source");
11368
+ function overlayDirFor(agentName, subdir) {
11369
+ const base = resolveDualPath(`~/.switchroom/agents/${agentName}/${subdir}`);
11370
+ return resolve2(base);
11371
+ }
11372
+ function listYamlFiles(dir) {
11373
+ if (!existsSync2(dir))
11374
+ return [];
11375
+ let entries;
11376
+ try {
11377
+ entries = readdirSync(dir);
11378
+ } catch {
11379
+ return [];
11380
+ }
11381
+ const out = [];
11382
+ for (const name of entries) {
11383
+ if (!/\.ya?ml$/i.test(name))
11384
+ continue;
11385
+ const full = resolve2(dir, name);
11386
+ try {
11387
+ if (statSync(full).isFile())
11388
+ out.push(full);
11389
+ } catch {}
11390
+ }
11391
+ return out.sort();
11392
+ }
11393
+ function stampOverlay(entry) {
11394
+ Object.defineProperty(entry, OVERLAY_SOURCE, {
11395
+ value: true,
11396
+ enumerable: false,
11397
+ configurable: false,
11398
+ writable: false
11399
+ });
11400
+ return entry;
11401
+ }
11402
+ function applyAgentOverlays(config) {
11403
+ const warnings = [];
11404
+ const agents = config.agents ?? {};
11405
+ for (const [agentName, agentCfg] of Object.entries(agents)) {
11406
+ try {
11407
+ const scheduleDir = overlayDirFor(agentName, "schedule.d");
11408
+ const files = listYamlFiles(scheduleDir);
11409
+ if (files.length > 0) {
11410
+ const merged = [...agentCfg.schedule ?? []];
11411
+ for (const file of files) {
11412
+ try {
11413
+ const raw = readFileSync(file, "utf-8");
11414
+ const parsed = $parse(raw);
11415
+ const doc = OverlayDocSchema.parse(parsed);
11416
+ for (const entry of doc.schedule ?? []) {
11417
+ if (entry.secrets && entry.secrets.length > 0) {
11418
+ const w = {
11419
+ agent: agentName,
11420
+ file,
11421
+ reason: "Overlay schedule entry declares secrets — dropped pending Phase E operator approval"
11422
+ };
11423
+ warnings.push(w);
11424
+ console.warn(`[switchroom] overlay-loader: agent='${agentName}' file='${file}': ${w.reason}`);
11425
+ continue;
11426
+ }
11427
+ merged.push(stampOverlay(entry));
11428
+ }
11429
+ } catch (err) {
11430
+ const reason = err instanceof ZodError ? `schema rejection: ${err.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}` : `parse error: ${err.message}`;
11431
+ warnings.push({ agent: agentName, file, reason });
11432
+ console.warn(`[switchroom] overlay-loader: agent='${agentName}' file='${file}': ${reason}`);
11433
+ }
11434
+ }
11435
+ agentCfg.schedule = merged;
11436
+ }
11437
+ } catch (err) {
11438
+ warnings.push({
11439
+ agent: agentName,
11440
+ file: "(agent schedule overlay scan)",
11441
+ reason: `unexpected error: ${err.message}`
11442
+ });
11443
+ console.warn(`[switchroom] overlay-loader: agent='${agentName}' schedule.d: unexpected error: ${err.message}`);
11444
+ }
11445
+ try {
11446
+ const skillsDir = overlayDirFor(agentName, "skills.d");
11447
+ const skillFiles = listYamlFiles(skillsDir);
11448
+ if (skillFiles.length === 0) {} else {
11449
+ const merged = [...agentCfg.skills ?? []];
11450
+ const seen = new Set(merged);
11451
+ for (const file of skillFiles) {
11452
+ try {
11453
+ const raw = readFileSync(file, "utf-8");
11454
+ const parsed = $parse(raw);
11455
+ const doc = OverlayDocSchema.parse(parsed);
11456
+ for (const skillName of doc.skills ?? []) {
11457
+ if (seen.has(skillName))
11458
+ continue;
11459
+ seen.add(skillName);
11460
+ merged.push(skillName);
11461
+ }
11462
+ } catch (err) {
11463
+ const reason = err instanceof ZodError ? `schema rejection: ${err.errors.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}` : `parse error: ${err.message}`;
11464
+ warnings.push({ agent: agentName, file, reason });
11465
+ console.warn(`[switchroom] overlay-loader: agent='${agentName}' file='${file}': ${reason}`);
11466
+ }
11467
+ }
11468
+ agentCfg.skills = merged;
11469
+ }
11470
+ } catch (err) {
11471
+ warnings.push({
11472
+ agent: agentName,
11473
+ file: "(agent skills overlay scan)",
11474
+ reason: `unexpected error: ${err.message}`
11475
+ });
11476
+ console.warn(`[switchroom] overlay-loader: agent='${agentName}' skills.d: unexpected error: ${err.message}`);
11477
+ }
11478
+ }
11479
+ return { config, warnings };
11480
+ }
11481
+
11266
11482
  // src/config/loader.ts
11267
11483
  class ConfigError extends Error {
11268
11484
  details;
@@ -11278,27 +11494,65 @@ function formatZodErrors(error) {
11278
11494
  return ` ${path}: ${e.message}`;
11279
11495
  });
11280
11496
  }
11497
+ function coerceLegacyGoogleWorkspaceKeys(parsed, filePath) {
11498
+ const stableStringify = (v) => {
11499
+ if (v === null || typeof v !== "object")
11500
+ return JSON.stringify(v);
11501
+ if (Array.isArray(v))
11502
+ return `[${v.map(stableStringify).join(",")}]`;
11503
+ const obj = v;
11504
+ const keys = Object.keys(obj).sort();
11505
+ return `{${keys.map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`).join(",")}}`;
11506
+ };
11507
+ const aliasInPlace = (obj, where) => {
11508
+ const a = obj.drive;
11509
+ const b = obj.google_workspace;
11510
+ if (a !== undefined && b !== undefined) {
11511
+ if (stableStringify(a) !== stableStringify(b)) {
11512
+ throw new ConfigError(`Both \`drive:\` and \`google_workspace:\` are set on ${where} in ${filePath} with different values.`, [
11513
+ " These are aliases — pick one and remove the other.",
11514
+ " `google_workspace:` is the RFC G canonical key; `drive:` is the legacy alias.",
11515
+ " Allowed during transition: setting both with identical values."
11516
+ ]);
11517
+ }
11518
+ return;
11519
+ }
11520
+ if (a !== undefined && b === undefined)
11521
+ obj.google_workspace = a;
11522
+ if (b !== undefined && a === undefined)
11523
+ obj.drive = b;
11524
+ };
11525
+ aliasInPlace(parsed, "the top level");
11526
+ const agents = parsed.agents;
11527
+ if (agents && typeof agents === "object" && !Array.isArray(agents)) {
11528
+ for (const [name, agent] of Object.entries(agents)) {
11529
+ if (agent && typeof agent === "object" && !Array.isArray(agent)) {
11530
+ aliasInPlace(agent, `agent \`${name}\``);
11531
+ }
11532
+ }
11533
+ }
11534
+ }
11281
11535
  function findConfigFile(startDir) {
11282
11536
  const envPath = process.env.SWITCHROOM_CONFIG;
11283
- const home = homedir();
11284
- const userDir = resolve(home, ".switchroom");
11537
+ const home2 = homedir();
11538
+ const userDir = resolve3(home2, ".switchroom");
11285
11539
  const searchPaths = [
11286
- envPath ? resolve(envPath) : null,
11287
- startDir ? resolve(startDir, "switchroom.yaml") : null,
11288
- startDir ? resolve(startDir, "switchroom.yml") : null,
11289
- startDir ? resolve(startDir, "clerk.yaml") : null,
11290
- startDir ? resolve(startDir, "clerk.yml") : null,
11291
- resolve(process.cwd(), "switchroom.yaml"),
11292
- resolve(process.cwd(), "switchroom.yml"),
11293
- resolve(process.cwd(), "clerk.yaml"),
11294
- resolve(process.cwd(), "clerk.yml"),
11295
- resolve(userDir, "switchroom.yaml"),
11296
- resolve(userDir, "switchroom.yml"),
11297
- resolve(userDir, "clerk.yaml"),
11298
- resolve(userDir, "clerk.yml")
11540
+ envPath ? resolve3(envPath) : null,
11541
+ startDir ? resolve3(startDir, "switchroom.yaml") : null,
11542
+ startDir ? resolve3(startDir, "switchroom.yml") : null,
11543
+ startDir ? resolve3(startDir, "clerk.yaml") : null,
11544
+ startDir ? resolve3(startDir, "clerk.yml") : null,
11545
+ resolve3(process.cwd(), "switchroom.yaml"),
11546
+ resolve3(process.cwd(), "switchroom.yml"),
11547
+ resolve3(process.cwd(), "clerk.yaml"),
11548
+ resolve3(process.cwd(), "clerk.yml"),
11549
+ resolve3(userDir, "switchroom.yaml"),
11550
+ resolve3(userDir, "switchroom.yml"),
11551
+ resolve3(userDir, "clerk.yaml"),
11552
+ resolve3(userDir, "clerk.yml")
11299
11553
  ].filter(Boolean);
11300
11554
  for (const path of searchPaths) {
11301
- if (existsSync(path)) {
11555
+ if (existsSync3(path)) {
11302
11556
  return path;
11303
11557
  }
11304
11558
  }
@@ -11306,12 +11560,12 @@ function findConfigFile(startDir) {
11306
11560
  }
11307
11561
  function loadConfig(configPath) {
11308
11562
  const filePath = configPath ?? findConfigFile();
11309
- if (!existsSync(filePath)) {
11563
+ if (!existsSync3(filePath)) {
11310
11564
  throw new ConfigError(`Config file not found: ${filePath}`);
11311
11565
  }
11312
11566
  let raw;
11313
11567
  try {
11314
- raw = readFileSync(filePath, "utf-8");
11568
+ raw = readFileSync2(filePath, "utf-8");
11315
11569
  } catch (err) {
11316
11570
  throw new ConfigError(`Failed to read config file: ${filePath}`, [
11317
11571
  ` ${err.message}`
@@ -11330,14 +11584,20 @@ function loadConfig(configPath) {
11330
11584
  obj.switchroom = obj.clerk;
11331
11585
  delete obj.clerk;
11332
11586
  }
11587
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
11588
+ coerceLegacyGoogleWorkspaceKeys(parsed, filePath);
11589
+ }
11590
+ let config;
11333
11591
  try {
11334
- return SwitchroomConfigSchema.parse(parsed);
11592
+ config = SwitchroomConfigSchema.parse(parsed);
11335
11593
  } catch (err) {
11336
11594
  if (err instanceof ZodError) {
11337
11595
  throw new ConfigError("Invalid switchroom.yaml configuration", formatZodErrors(err));
11338
11596
  }
11339
11597
  throw err;
11340
11598
  }
11599
+ applyAgentOverlays(config);
11600
+ return config;
11341
11601
  }
11342
11602
 
11343
11603
  // src/scheduler/dispatch.ts
@@ -11620,6 +11880,23 @@ function mergeAgentConfig(defaultsIn, agentIn) {
11620
11880
  const a = merged.extra_stable_files ?? [];
11621
11881
  merged.extra_stable_files = dedupe([...d, ...a]);
11622
11882
  }
11883
+ const dReactions = defaults.reactions;
11884
+ const mReactions = merged.reactions;
11885
+ if (dReactions || mReactions) {
11886
+ const base = dReactions ?? {};
11887
+ const override = mReactions ?? {};
11888
+ const combined = { ...base };
11889
+ for (const [k, v] of Object.entries(override)) {
11890
+ if (v !== undefined)
11891
+ combined[k] = v;
11892
+ }
11893
+ merged.reactions = combined;
11894
+ }
11895
+ if (defaults.resources || merged.resources) {
11896
+ const d = defaults.resources ?? {};
11897
+ const a = merged.resources ?? {};
11898
+ merged.resources = { ...d, ...a };
11899
+ }
11623
11900
  if (defaults.experimental || merged.experimental) {
11624
11901
  const d = defaults.experimental ?? {};
11625
11902
  const a = merged.experimental ?? {};
@@ -11793,17 +12070,17 @@ function createInjectIpcClient(options) {
11793
12070
  return Promise.resolve(true);
11794
12071
  if (closed)
11795
12072
  return Promise.resolve(false);
11796
- return new Promise((resolve2) => {
12073
+ return new Promise((resolve4) => {
11797
12074
  const start = Date.now();
11798
12075
  const timer = setInterval(() => {
11799
12076
  if (connected) {
11800
12077
  clearInterval(timer);
11801
- resolve2(true);
12078
+ resolve4(true);
11802
12079
  return;
11803
12080
  }
11804
12081
  if (closed || Date.now() - start >= timeoutMs) {
11805
12082
  clearInterval(timer);
11806
- resolve2(connected);
12083
+ resolve4(connected);
11807
12084
  }
11808
12085
  }, 50);
11809
12086
  if (typeof timer.unref === "function") {
@@ -11830,8 +12107,8 @@ function createInjectIpcClient(options) {
11830
12107
  import {
11831
12108
  closeSync,
11832
12109
  openSync,
11833
- readFileSync as readFileSync2,
11834
- statSync,
12110
+ readFileSync as readFileSync3,
12111
+ statSync as statSync2,
11835
12112
  unlinkSync,
11836
12113
  writeSync,
11837
12114
  mkdirSync as mkdirSync2
@@ -11839,7 +12116,7 @@ import {
11839
12116
  import { dirname as dirname2 } from "node:path";
11840
12117
  function readContainerBootTimeMs() {
11841
12118
  try {
11842
- const stat1 = readFileSync2("/proc/1/stat", "utf8");
12119
+ const stat1 = readFileSync3("/proc/1/stat", "utf8");
11843
12120
  const lastParen = stat1.lastIndexOf(")");
11844
12121
  if (lastParen < 0)
11845
12122
  return null;
@@ -11847,7 +12124,7 @@ function readContainerBootTimeMs() {
11847
12124
  const starttimeTicks = Number(after[19]);
11848
12125
  if (!Number.isFinite(starttimeTicks))
11849
12126
  return null;
11850
- const procStat = readFileSync2("/proc/stat", "utf8");
12127
+ const procStat = readFileSync3("/proc/stat", "utf8");
11851
12128
  const btimeLine = procStat.split(`
11852
12129
  `).find((l) => l.startsWith("btime "));
11853
12130
  if (!btimeLine)
@@ -11882,7 +12159,7 @@ function acquireLock(path, pid = process.pid, options = {}) {
11882
12159
  }
11883
12160
  if (bootTimeMs != null) {
11884
12161
  try {
11885
- const lockMtime = statSync(path).mtimeMs;
12162
+ const lockMtime = statSync2(path).mtimeMs;
11886
12163
  if (lockMtime < bootTimeMs - FRESHNESS_MARGIN_MS) {
11887
12164
  try {
11888
12165
  unlinkSync(path);
@@ -11893,7 +12170,7 @@ function acquireLock(path, pid = process.pid, options = {}) {
11893
12170
  }
11894
12171
  let holderPid;
11895
12172
  try {
11896
- const raw = readFileSync2(path, "utf8").trim();
12173
+ const raw = readFileSync3(path, "utf8").trim();
11897
12174
  const parsed = Number.parseInt(raw, 10);
11898
12175
  if (Number.isInteger(parsed) && parsed > 0)
11899
12176
  holderPid = parsed;
@@ -12187,7 +12464,7 @@ async function main() {
12187
12464
  process.once("SIGINT", cleanup);
12188
12465
  return;
12189
12466
  }
12190
- const sink = new JsonlAuditSink(resolve2(jsonlPath));
12467
+ const sink = new JsonlAuditSink(resolve4(jsonlPath));
12191
12468
  const ipcClient = createInjectIpcClient({
12192
12469
  socketPath,
12193
12470
  log: (m) => process.stderr.write(`agent-scheduler: ${m}
@@ -12195,7 +12472,7 @@ async function main() {
12195
12472
  });
12196
12473
  const dispatcher = ipcDispatcher(ipcClient);
12197
12474
  const replayWindowMin = Number.parseInt(process.env.SWITCHROOM_AGENT_SCHEDULER_REPLAY_MIN ?? "30", 10);
12198
- const recentFires = readRecentFires(resolve2(jsonlPath));
12475
+ const recentFires = readRecentFires(resolve4(jsonlPath));
12199
12476
  const missed = findMissedFires({
12200
12477
  entries,
12201
12478
  recentFires,