switchroom 0.11.0 → 0.12.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 (62) hide show
  1. package/README.md +7 -6
  2. package/dist/agent-scheduler/index.js +218 -99
  3. package/dist/auth-broker/index.js +300 -99
  4. package/dist/cli/drive-write-pretool.mjs +45 -12
  5. package/dist/cli/switchroom.js +44972 -42457
  6. package/dist/cli/ui/index.html +1281 -0
  7. package/dist/host-control/main.js +3630 -311
  8. package/dist/vault/approvals/kernel-server.js +209 -100
  9. package/dist/vault/broker/server.js +220 -99
  10. package/examples/personal-google-workspace-mcp/README.md +8 -3
  11. package/examples/switchroom.yaml +91 -42
  12. package/package.json +2 -2
  13. package/profiles/_base/start.sh.hbs +76 -36
  14. package/profiles/default/CLAUDE.md.hbs +4 -2
  15. package/skills/file-bug/SKILL.md +6 -4
  16. package/skills/switchroom-cli/SKILL.md +20 -4
  17. package/skills/switchroom-install/SKILL.md +3 -3
  18. package/telegram-plugin/auth-snapshot-format.ts +4 -4
  19. package/telegram-plugin/auto-fallback-fleet.ts +4 -4
  20. package/telegram-plugin/card-format.ts +3 -3
  21. package/telegram-plugin/dist/bridge/bridge.js +112 -112
  22. package/telegram-plugin/dist/gateway/gateway.js +1029 -628
  23. package/telegram-plugin/dist/server.js +162 -161
  24. package/telegram-plugin/format.ts +71 -0
  25. package/telegram-plugin/gateway/approval-card.test.ts +18 -18
  26. package/telegram-plugin/gateway/approval-card.ts +1 -1
  27. package/telegram-plugin/gateway/auth-broker-client.ts +2 -0
  28. package/telegram-plugin/gateway/auth-command.ts +12 -2
  29. package/telegram-plugin/gateway/boot-card.ts +40 -3
  30. package/telegram-plugin/gateway/boot-probes.ts +71 -27
  31. package/telegram-plugin/gateway/diff-preview-card.test.ts +15 -15
  32. package/telegram-plugin/gateway/diff-preview-card.ts +1 -1
  33. package/telegram-plugin/gateway/drive-write-approval.test.ts +2 -2
  34. package/telegram-plugin/gateway/gateway.ts +244 -46
  35. package/telegram-plugin/gateway/hostd-dispatch.ts +10 -2
  36. package/telegram-plugin/gateway/update-announce.ts +167 -0
  37. package/telegram-plugin/quota-check.ts +0 -195
  38. package/telegram-plugin/retry-api-call.ts +24 -0
  39. package/telegram-plugin/server.ts +8 -5
  40. package/telegram-plugin/tests/auth-add-flow.test.ts +31 -2
  41. package/telegram-plugin/tests/boot-probes.test.ts +53 -0
  42. package/telegram-plugin/tests/bot-runtime.test.ts +23 -1
  43. package/telegram-plugin/tests/quota-check.test.ts +0 -409
  44. package/telegram-plugin/tests/retry-api-call.test.ts +76 -0
  45. package/telegram-plugin/tests/telegram-format.test.ts +84 -1
  46. package/telegram-plugin/tests/update-announce.test.ts +154 -0
  47. package/telegram-plugin/welcome-text.ts +1 -8
  48. package/profiles/default/CLAUDE.md +0 -192
  49. package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-313.pyc +0 -0
  50. package/skills/docx/scripts/office/validators/__pycache__/base.cpython-313.pyc +0 -0
  51. package/skills/skill-creator/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
  52. package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-313.pyc +0 -0
  53. package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-313.pyc +0 -0
  54. package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-313.pyc +0 -0
  55. package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-313.pyc +0 -0
  56. package/skills/skill-creator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
  57. package/telegram-plugin/first-paint.ts +0 -225
  58. package/telegram-plugin/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  59. package/telegram-plugin/server.js +0 -41795
  60. package/telegram-plugin/tests/html-balanced.ts +0 -63
  61. package/telegram-plugin/tests/snapshot-serializer.ts +0 -79
  62. package/telegram-plugin/tool-error-filter.ts +0 -89
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  };
17
17
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
18
18
 
19
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
19
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
73
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
228
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
380
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
442
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
489
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
516
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
553
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
661
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
689
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
761
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
876
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
893
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
1030
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
1328
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
1449
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
1585
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
1604
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
1658
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
1719
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
1757
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
1909
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
2036
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
2055
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
2148
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
2167
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
2183
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
2198
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
2219
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
2243
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
2286
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
2328
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
2353
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
2417
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
2472
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
2547
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
2619
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
2648
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
2694
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
2770
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
2853
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
2935
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
2976
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
3067
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
3097
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
3177
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
3412
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
3477
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
3607
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
3647
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
3662
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
3675
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
3782
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
3830
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
3870
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
4061
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
4123
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
4316
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
4532
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
4610
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
4637
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
4740
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
4780
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
4969
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
5159
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
5217
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
5276
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
5377
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
5963
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
5991
+ // ../switchroom/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/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
6840
+ // ../switchroom/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();
@@ -6939,7 +6939,7 @@ import { readFileSync as readFileSync2, existsSync as existsSync3 } from "node:f
6939
6939
  import { homedir } from "node:os";
6940
6940
  import { resolve as resolve3 } from "node:path";
6941
6941
 
6942
- // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
6942
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/external.js
6988
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
7100
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
7231
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
7350
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
7453
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
7461
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
7567
+ // ../switchroom/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/.bun/zod@3.25.76/node_modules/zod/v3/types.js
7574
+ // ../switchroom/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 = [];
@@ -10972,7 +10972,7 @@ var AgentBindMountSchema = exports_external.object({
10972
10972
  var ScheduleEntrySchema = exports_external.object({
10973
10973
  cron: exports_external.string().describe("Cron expression (e.g., '0 8 * * *')"),
10974
10974
  prompt: exports_external.string().describe("Prompt to send at the scheduled time"),
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."),
10975
+ model: exports_external.string().optional().describe("DEPRECATED / IGNORED. Pre-v0.8 the singleton scheduler ran each " + "task as an isolated `claude -p` and could set --model per task. " + "Post cron-fold-in (v0.8) the fire is injected into the agent's " + "running session, so it always uses the agent's configured model " + "— this field has no effect. Accepted (optional) only so existing " + "configs keep validating; set the model at the agent level instead. " + "See docs/scheduling.md."),
10976
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.")
10977
10977
  });
10978
10978
  var AgentSoulSchema = exports_external.object({
@@ -11039,6 +11039,7 @@ var SessionContinuitySchema = exports_external.object({
11039
11039
  resume_max_bytes: exports_external.number().int().positive().optional().describe("Byte threshold above which 'auto' mode falls back to handoff " + "instead of --continue. Default 2_000_000 (~2MB). Large transcripts " + "can blow out the context window even with prefix caching, and " + "--continue replay is known-fragile at scale.")
11040
11040
  }).optional();
11041
11041
  var TelegramChannelSchema = exports_external.object({
11042
+ enabled: exports_external.boolean().default(true).describe("Master switch for the per-agent Telegram gateway sidecar. " + "When false, start.sh skips the gateway supervise loop and the " + "agent boots without bot-token requirements (smoke-test + " + "offline-dev use case)."),
11042
11043
  plugin: exports_external.enum(["switchroom", "official"]).optional().describe("Which Telegram MCP plugin to load. Default is 'switchroom' — the " + "enhanced fork with streaming edits, reactions, history, and " + "access control. Set to 'official' for the upstream marketplace " + "plugin (basic send/receive only)."),
11043
11044
  format: exports_external.enum(["html", "markdownv2", "text"]).optional().describe("Default reply format passed to the plugin"),
11044
11045
  rate_limit_ms: exports_external.number().optional().describe("Minimum delay between outgoing messages in ms"),
@@ -11103,6 +11104,9 @@ var GoogleWorkspaceConfigSchema = exports_external.object({
11103
11104
  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).")
11104
11105
  }).optional();
11105
11106
  var AgentGoogleWorkspaceConfigSchema = exports_external.object({
11107
+ account: exports_external.string().regex(/^[^@\s:]+@[^@\s:]+\.[^@\s:]+$/, {
11108
+ message: "google_workspace.account must be a Google account email like " + "'alice@example.com' (colons not allowed)"
11109
+ }).transform((v) => v.trim().toLowerCase()).optional().describe("RFC G: the Google account this agent uses for the Workspace MCP. " + "Must be a key in top-level `google_accounts:` with this agent " + "listed in its `enabled_for[]`. Read by the auth-broker " + "(get-credentials, provider=google) and by the scaffold to decide " + "whether to emit the `gdrive` MCP entry. Normalized to lowercase " + "so it matches the google_accounts key (which is also normalized)."),
11106
11110
  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
11111
  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
11112
  }).optional();
@@ -11113,9 +11117,17 @@ var ReactionsSchema = exports_external.object({
11113
11117
  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
11118
  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.")
11115
11119
  }).optional();
11120
+ var ReleaseBlock = exports_external.object({
11121
+ channel: exports_external.enum(["dev", "rc", "latest"]).optional(),
11122
+ pin: exports_external.string().regex(/^(sha-[0-9a-f]{7,40}|v\d+\.\d+\.\d+)$/).optional()
11123
+ }).strict().refine((r) => !(r.channel && r.pin), {
11124
+ message: "release.channel and release.pin are mutually exclusive"
11125
+ });
11126
+ var NetworkIsolationSchema = exports_external.enum(["host", "strict"]).optional().describe("Container network mode (sec WS6-F1 #1390 / feature #1413). " + "'host' (DEFAULT when unset): `network_mode: host` — the agent " + "shares the host network stack; hindsight 127.0.0.1:18888 and " + "operator-LAN devices are reachable, but there is NO network " + "isolation from sibling agents or host services (the documented, " + "deliberate shared-host tradeoff). 'strict': the agent joins its " + "OWN dedicated docker bridge network instead — it cannot reach " + "sibling agents; host services are reached via " + "`host.docker.internal`. OPT-IN: validate hindsight / operator-" + "LAN / cron / boot-self-test paths for your deployment before " + "adopting fleet-wide (default-flip is deferred to that validation " + "cycle, #1413). Cascades override (agent → profile → defaults).");
11116
11127
  var profileFields = {
11117
11128
  extends: exports_external.string().optional(),
11118
11129
  bot_token: exports_external.string().optional(),
11130
+ release: ReleaseBlock.optional().describe("Release-channel pin / pointer. Either `channel` (dev|rc|latest) or " + "`pin` (sha-<hex>|v<semver>) — mutually exclusive. Per-agent value " + "REPLACES the root entirely (no field merge)."),
11119
11131
  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("IANA timezone name (e.g. 'Australia/Melbourne', 'America/New_York', " + "'UTC'). Used to generate the per-turn local-time hint the agent's " + "UserPromptSubmit timezone hook emits, and baked into the systemd " + "unit as TZ= so subprocess `date`/`Date.now()` are correct. If unset " + "at every cascade layer, switchroom auto-detects from /etc/timezone " + "and warns on `reconcile` when the detected zone is UTC."),
11120
11132
  soul: exports_external.object({
11121
11133
  name: exports_external.string().optional(),
@@ -11152,8 +11164,8 @@ var profileFields = {
11152
11164
  session: SessionSchema,
11153
11165
  session_continuity: SessionContinuitySchema,
11154
11166
  channels: ChannelsSchema,
11167
+ network_isolation: NetworkIsolationSchema,
11155
11168
  dangerous_mode: exports_external.boolean().optional(),
11156
- skip_permission_prompt: exports_external.boolean().optional(),
11157
11169
  settings_raw: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
11158
11170
  claude_md_raw: exports_external.string().optional(),
11159
11171
  cli_args: exports_external.array(exports_external.string()).optional(),
@@ -11175,6 +11187,7 @@ var AgentDefaultsSchema = exports_external.object(defaultsFields).optional();
11175
11187
  var AgentSchema = exports_external.object({
11176
11188
  extends: exports_external.string().optional().describe("Name of a profile to inherit from (e.g., 'coding', 'health-coach'). " + "Profiles may be defined inline under switchroom.yaml `profiles:` or as a " + "filesystem directory `profiles/<name>/`. Defaults to DEFAULT_PROFILE " + "('default') when unset."),
11177
11189
  bot_token: exports_external.string().optional().describe("Per-agent Telegram bot token or vault reference (overrides global telegram.bot_token)"),
11190
+ release: ReleaseBlock.optional().describe("Per-agent release-channel pin / pointer. REPLACES the root " + "`release` block entirely (no field merge) — a pinned agent does " + "not inherit the fleet channel, and vice versa."),
11178
11191
  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')."),
11179
11192
  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."),
11180
11193
  auth: exports_external.object({
@@ -11219,7 +11232,7 @@ var AgentSchema = exports_external.object({
11219
11232
  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."),
11220
11233
  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."),
11221
11234
  dangerous_mode: exports_external.boolean().optional().describe("If true, include --dangerously-skip-permissions in start.sh"),
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."),
11235
+ network_isolation: NetworkIsolationSchema,
11223
11236
  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."),
11224
11237
  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."),
11225
11238
  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."),
@@ -11286,7 +11299,7 @@ var QuotaConfigSchema = exports_external.object({
11286
11299
  monthly_budget_usd: exports_external.number().positive().optional().describe("Monthly USD spend budget. If unset, the greeting shows raw usage only.")
11287
11300
  });
11288
11301
  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).")
11302
+ enabled: exports_external.boolean().default(true).describe("Whether the host-control daemon is in use. Default: true (since " + "RFC C Phase 2 default-flip — the gateway's /restart, /new, /reset, " + "and /update apply slash-commands all dispatch through hostd, and " + "without it those verbs fail on docker-mode installs because the " + "agent container has no docker binary/socket). " + "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. " + "Set enabled: false only on legacy systemd-mode installs that " + "still rely on the in-container `spawnSwitchroomDetached` " + "shellout (removal is tracked as RFC C Phase 3).")
11290
11303
  });
11291
11304
  var SwitchroomConfigSchema = exports_external.object({
11292
11305
  switchroom: exports_external.object({
@@ -11296,6 +11309,7 @@ var SwitchroomConfigSchema = exports_external.object({
11296
11309
  timezone: exports_external.string().regex(TIMEZONE_REGEX, "timezone must be an IANA zone name like 'Australia/Melbourne' or 'UTC'").optional().describe("Global default IANA timezone applied to every agent unless the " + "agent (or its profile) declares its own. See the per-agent " + "timezone field for the full cascade and auto-detection fallback.")
11297
11310
  }),
11298
11311
  telegram: TelegramConfigSchema,
11312
+ release: ReleaseBlock.optional().describe("Fleet-wide default release-channel pin / pointer for the update " + "flow. Either `channel` (dev|rc|latest) or `pin` (sha-<hex>|v<semver>) " + "— mutually exclusive. Per-agent `release` REPLACES this entirely."),
11299
11313
  memory: MemoryBackendConfigSchema.optional(),
11300
11314
  vault: VaultConfigSchema.optional(),
11301
11315
  auth: exports_external.object({
@@ -11312,7 +11326,7 @@ var SwitchroomConfigSchema = exports_external.object({
11312
11326
  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
11327
  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)."),
11314
11328
  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."),
11329
+ host_control: HostControlConfigSchema.default({}).describe("Host-control daemon configuration. Defaults to enabled=true since " + "RFC C Phase 2 (docs/rfcs/host-control-daemon.md). Omit the block " + "to accept defaults; set `enabled: false` only on legacy systemd-" + "mode installs (removal tracked as RFC C Phase 3)."),
11316
11330
  google_accounts: exports_external.record(exports_external.string().regex(/^[^@\s:]+@[^@\s:]+\.[^@\s:]+$/, {
11317
11331
  message: "Account key must be a Google account email like 'alice@example.com' (colons not allowed)"
11318
11332
  }).transform((v) => v.trim().toLowerCase()), exports_external.object({
@@ -11335,6 +11349,14 @@ var LEGACY_STATE_DIR = ".clerk";
11335
11349
  function home() {
11336
11350
  return process.env.HOME ?? "/root";
11337
11351
  }
11352
+ var _legacyStateWarned = false;
11353
+ function warnLegacyStateOnce(legacy) {
11354
+ if (_legacyStateWarned)
11355
+ return;
11356
+ _legacyStateWarned = true;
11357
+ process.stderr.write(`[switchroom] DEPRECATED: reading legacy state from ${legacy}. ` + "Run `mv ~/.clerk ~/.switchroom` (and rename any top-level `clerk:` " + "key in switchroom.yaml to `switchroom:`). This back-compat shim is " + `REMOVED in v0.13.0 — no automatic migration exists.
11358
+ `);
11359
+ }
11338
11360
  function resolveDualPath(pathStr) {
11339
11361
  const h = home();
11340
11362
  if (pathStr.startsWith("~/")) {
@@ -11344,8 +11366,10 @@ function resolveDualPath(pathStr) {
11344
11366
  const frag = rest.slice(DEFAULT_STATE_DIR.length + 1);
11345
11367
  if (!existsSync(absolute)) {
11346
11368
  const legacy = resolve(h, LEGACY_STATE_DIR, frag);
11347
- if (existsSync(legacy))
11369
+ if (existsSync(legacy)) {
11370
+ warnLegacyStateOnce(legacy);
11348
11371
  return legacy;
11372
+ }
11349
11373
  }
11350
11374
  }
11351
11375
  return absolute;
@@ -11704,8 +11728,8 @@ function mergeAgentConfig(defaultsIn, agentIn) {
11704
11728
  if (defaults.dangerous_mode !== undefined && merged.dangerous_mode === undefined) {
11705
11729
  merged.dangerous_mode = defaults.dangerous_mode;
11706
11730
  }
11707
- if (defaults.skip_permission_prompt !== undefined && merged.skip_permission_prompt === undefined) {
11708
- merged.skip_permission_prompt = defaults.skip_permission_prompt;
11731
+ if (defaults.network_isolation !== undefined && merged.network_isolation === undefined) {
11732
+ merged.network_isolation = defaults.network_isolation;
11709
11733
  }
11710
11734
  if (defaults.thinking_effort !== undefined && merged.thinking_effort === undefined) {
11711
11735
  merged.thinking_effort = defaults.thinking_effort;
@@ -11825,6 +11849,9 @@ function mergeAgentConfig(defaultsIn, agentIn) {
11825
11849
  }
11826
11850
  merged.session_continuity = combined;
11827
11851
  }
11852
+ if (merged.release === undefined && defaults.release !== undefined) {
11853
+ merged.release = defaults.release;
11854
+ }
11828
11855
  if (defaults.channels || merged.channels) {
11829
11856
  const dChan = defaults.channels ?? {};
11830
11857
  const aChan = merged.channels ?? {};
@@ -12349,6 +12376,41 @@ function findMissedFires(opts) {
12349
12376
  }
12350
12377
  return out;
12351
12378
  }
12379
+ var STALE_LOOKBACK_MAX_MIN = 14 * 24 * 60;
12380
+ function findStaleSkippedFires(opts) {
12381
+ const out = [];
12382
+ const cap = opts.maxLookbackMinutes ?? STALE_LOOKBACK_MAX_MIN;
12383
+ if (cap <= opts.windowMinutes)
12384
+ return out;
12385
+ const nowMs = opts.now.getTime();
12386
+ const baseMs = nowMs - nowMs % 60000;
12387
+ const successByKey = new Map;
12388
+ for (const row of opts.recentFires) {
12389
+ if (row.exitCode !== 0)
12390
+ continue;
12391
+ const key = `${row.agent}::${row.scheduleIndex}`;
12392
+ let bucket = successByKey.get(key);
12393
+ if (!bucket) {
12394
+ bucket = [];
12395
+ successByKey.set(key, bucket);
12396
+ }
12397
+ bucket.push(row.startedAt);
12398
+ }
12399
+ for (const entry of opts.entries) {
12400
+ const key = `${entry.agent}::${entry.scheduleIndex}`;
12401
+ const successes = successByKey.get(key) ?? [];
12402
+ for (let i = opts.windowMinutes;i < cap; i++) {
12403
+ const candidateMs = baseMs - i * 60000;
12404
+ if (!cronMatchesDate(entry.cron, new Date(candidateMs)))
12405
+ continue;
12406
+ const covered = successes.some((ts) => ts >= candidateMs - AUDIT_TOLERANCE_MS);
12407
+ if (!covered)
12408
+ out.push({ entry, expectedFireMs: candidateMs });
12409
+ break;
12410
+ }
12411
+ }
12412
+ return out;
12413
+ }
12352
12414
  function readRecentFires(jsonlPath) {
12353
12415
  const fs = __require("node:fs");
12354
12416
  if (!fs.existsSync(jsonlPath))
@@ -12472,33 +12534,90 @@ async function main() {
12472
12534
  });
12473
12535
  const dispatcher = ipcDispatcher(ipcClient);
12474
12536
  const replayWindowMin = Number.parseInt(process.env.SWITCHROOM_AGENT_SCHEDULER_REPLAY_MIN ?? "30", 10);
12537
+ const windowMinutes = Number.isFinite(replayWindowMin) ? replayWindowMin : 30;
12538
+ const staleMaxRaw = Number.parseInt(process.env.SWITCHROOM_AGENT_SCHEDULER_STALE_MAX_MIN ?? String(STALE_LOOKBACK_MAX_MIN), 10);
12539
+ const staleMaxMin = Number.isFinite(staleMaxRaw) ? staleMaxRaw : STALE_LOOKBACK_MAX_MIN;
12475
12540
  const recentFires = readRecentFires(resolve4(jsonlPath));
12541
+ const replayNow = new Date;
12476
12542
  const missed = findMissedFires({
12477
12543
  entries,
12478
12544
  recentFires,
12479
- now: new Date,
12480
- windowMinutes: Number.isFinite(replayWindowMin) ? replayWindowMin : 30
12545
+ now: replayNow,
12546
+ windowMinutes
12481
12547
  });
12482
- if (missed.length > 0) {
12548
+ const staleSkipped = findStaleSkippedFires({
12549
+ entries,
12550
+ recentFires,
12551
+ now: replayNow,
12552
+ windowMinutes,
12553
+ maxLookbackMinutes: staleMaxMin
12554
+ });
12555
+ if (missed.length > 0 || staleSkipped.length > 0) {
12483
12556
  const connected = await ipcClient.waitForConnect(5000);
12484
12557
  if (connected) {
12485
- process.stdout.write(`agent-scheduler: replaying ${missed.length} missed fire(s) ` + `from past ${replayWindowMin}min — ` + missed.map((m) => `[idx=${m.entry.scheduleIndex} key=${m.entry.promptKey}]`).join(" ") + `
12558
+ if (missed.length > 0) {
12559
+ process.stdout.write(`agent-scheduler: replaying ${missed.length} missed fire(s) ` + `from past ${windowMinutes}min — ` + missed.map((m) => `[idx=${m.entry.scheduleIndex} key=${m.entry.promptKey}]`).join(" ") + `
12560
+ `);
12561
+ for (const m of missed) {
12562
+ const startedAt = Date.now();
12563
+ const result = dispatchAsInbound(m.entry, { chatId: channel.chatId, threadId: channel.threadId }, dispatcher);
12564
+ sink.recordFire({
12565
+ agent: m.entry.agent,
12566
+ scheduleIndex: m.entry.scheduleIndex,
12567
+ promptKey: m.entry.promptKey,
12568
+ exitCode: result.delivered ? 0 : -1,
12569
+ outputSummary: result.delivered ? `replayed (originally scheduled at ${new Date(m.expectedFireMs).toISOString()})` : "replay attempted but gateway not connected",
12570
+ startedAt,
12571
+ finishedAt: Date.now()
12572
+ });
12573
+ }
12574
+ }
12575
+ if (staleSkipped.length > 0) {
12576
+ process.stdout.write(`agent-scheduler: ${staleSkipped.length} scheduled run(s) ` + `skipped (older than ${windowMinutes}min window) — notifying user
12486
12577
  `);
12487
- for (const m of missed) {
12578
+ const lines = staleSkipped.map((s) => {
12579
+ const oneLine = s.entry.prompt.replace(/\s+/g, " ").trim().slice(0, 80);
12580
+ return `- "${oneLine}" — cron \`${s.entry.cron}\`, ` + `most recent missed run ~${new Date(s.expectedFireMs).toISOString()}`;
12581
+ });
12582
+ const noticeText = "[switchroom scheduler notice] While this agent was offline, the " + "following scheduled task(s) had at least one run skipped. They were " + `older than the ${windowMinutes}-minute catch-up window, so they ` + `will NOT be re-run:
12583
+ ` + lines.join(`
12584
+ `) + `
12585
+
12586
+ Briefly and plainly tell the user these scheduled runs did not ` + "happen so they are not left in the dark. Do not perform the tasks " + "now unless the user asks.";
12587
+ const noticeEntry = {
12588
+ agent: agentName,
12589
+ scheduleIndex: -1,
12590
+ cron: "",
12591
+ prompt: noticeText,
12592
+ promptKey: "skip-notice"
12593
+ };
12488
12594
  const startedAt = Date.now();
12489
- const result = dispatchAsInbound(m.entry, { chatId: channel.chatId, threadId: channel.threadId }, dispatcher);
12595
+ const result = dispatchAsInbound(noticeEntry, { chatId: channel.chatId, threadId: channel.threadId }, dispatcher);
12490
12596
  sink.recordFire({
12491
- agent: m.entry.agent,
12492
- scheduleIndex: m.entry.scheduleIndex,
12493
- promptKey: m.entry.promptKey,
12597
+ agent: agentName,
12598
+ scheduleIndex: -1,
12599
+ promptKey: "skip-notice",
12494
12600
  exitCode: result.delivered ? 0 : -1,
12495
- outputSummary: result.delivered ? `replayed (originally scheduled at ${new Date(m.expectedFireMs).toISOString()})` : "replay attempted but gateway not connected",
12601
+ outputSummary: result.delivered ? `skip-notice sent for ${staleSkipped.length} dropped run(s)` : "skip-notice attempted but gateway not connected",
12496
12602
  startedAt,
12497
12603
  finishedAt: Date.now()
12498
12604
  });
12605
+ if (result.delivered) {
12606
+ for (const s of staleSkipped) {
12607
+ sink.recordFire({
12608
+ agent: s.entry.agent,
12609
+ scheduleIndex: s.entry.scheduleIndex,
12610
+ promptKey: s.entry.promptKey,
12611
+ exitCode: 0,
12612
+ outputSummary: `skip-notice: run at ${new Date(s.expectedFireMs).toISOString()} ` + `was older than the ${windowMinutes}min replay window and was ` + "not executed",
12613
+ startedAt: s.expectedFireMs,
12614
+ finishedAt: s.expectedFireMs
12615
+ });
12616
+ }
12617
+ }
12499
12618
  }
12500
12619
  } else {
12501
- process.stderr.write(`agent-scheduler: ${missed.length} missed fire(s) detected but ` + `gateway socket not up after 5s — skipping replay this boot
12620
+ process.stderr.write(`agent-scheduler: ${missed.length} missed + ${staleSkipped.length} ` + "stale-skipped fire(s) detected but gateway socket not up after 5s — " + `skipping this boot
12502
12621
  `);
12503
12622
  }
12504
12623
  }