switchroom 0.13.4 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -45
- package/dist/agent-scheduler/index.js +85 -80
- package/dist/auth-broker/index.js +85 -80
- package/dist/cli/drive-write-pretool.mjs +10 -10
- package/dist/cli/skill-validate-pretool.mjs +72 -72
- package/dist/cli/switchroom.js +430 -360
- package/dist/host-control/main.js +501 -126
- package/dist/vault/approvals/kernel-server.js +88 -83
- package/dist/vault/broker/server.js +89 -84
- package/package.json +1 -1
- package/profiles/_shared/telegram-style.md.hbs +1 -1
- package/profiles/_shared/vault-protocol.md.hbs +12 -0
- package/telegram-plugin/dist/bridge/bridge.js +136 -112
- package/telegram-plugin/dist/gateway/gateway.js +255 -195
- package/telegram-plugin/dist/server.js +184 -160
- package/telegram-plugin/gateway/gateway.ts +46 -1
- package/telegram-plugin/model-unavailable.ts +4 -0
- package/telegram-plugin/runtime-metrics.ts +14 -8
- package/telegram-plugin/session-tail.ts +53 -0
- package/telegram-plugin/silence-poke.ts +49 -1
- package/telegram-plugin/tests/model-unavailable.test.ts +9 -0
- package/telegram-plugin/tests/operator-events-session-tail.test.ts +43 -0
- package/telegram-plugin/tests/silence-poke.test.ts +135 -3
- package/telegram-plugin/uat/scenarios/jtbd-fast-ack-dm.test.ts +217 -0
- package/telegram-plugin/uat/scenarios/jtbd-soft-commit-dm.test.ts +16 -11
|
@@ -46,7 +46,7 @@ var __export = (target, all) => {
|
|
|
46
46
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
47
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
48
48
|
|
|
49
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
49
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
50
50
|
var require_identity = __commonJS((exports) => {
|
|
51
51
|
var ALIAS = Symbol.for("yaml.alias");
|
|
52
52
|
var DOC = Symbol.for("yaml.document");
|
|
@@ -100,7 +100,7 @@ var require_identity = __commonJS((exports) => {
|
|
|
100
100
|
exports.isSeq = isSeq;
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
|
|
103
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
|
|
104
104
|
var require_visit = __commonJS((exports) => {
|
|
105
105
|
var identity = require_identity();
|
|
106
106
|
var BREAK = Symbol("break visit");
|
|
@@ -255,7 +255,7 @@ var require_visit = __commonJS((exports) => {
|
|
|
255
255
|
exports.visitAsync = visitAsync;
|
|
256
256
|
});
|
|
257
257
|
|
|
258
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
|
|
258
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
|
|
259
259
|
var require_directives = __commonJS((exports) => {
|
|
260
260
|
var identity = require_identity();
|
|
261
261
|
var visit = require_visit();
|
|
@@ -407,7 +407,7 @@ var require_directives = __commonJS((exports) => {
|
|
|
407
407
|
exports.Directives = Directives;
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
|
|
410
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
|
|
411
411
|
var require_anchors = __commonJS((exports) => {
|
|
412
412
|
var identity = require_identity();
|
|
413
413
|
var visit = require_visit();
|
|
@@ -469,7 +469,7 @@ var require_anchors = __commonJS((exports) => {
|
|
|
469
469
|
exports.findNewAnchor = findNewAnchor;
|
|
470
470
|
});
|
|
471
471
|
|
|
472
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
|
|
472
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
|
|
473
473
|
var require_applyReviver = __commonJS((exports) => {
|
|
474
474
|
function applyReviver(reviver, obj, key, val) {
|
|
475
475
|
if (val && typeof val === "object") {
|
|
@@ -516,7 +516,7 @@ var require_applyReviver = __commonJS((exports) => {
|
|
|
516
516
|
exports.applyReviver = applyReviver;
|
|
517
517
|
});
|
|
518
518
|
|
|
519
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
|
|
519
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
|
|
520
520
|
var require_toJS = __commonJS((exports) => {
|
|
521
521
|
var identity = require_identity();
|
|
522
522
|
function toJS(value, arg, ctx) {
|
|
@@ -543,7 +543,7 @@ var require_toJS = __commonJS((exports) => {
|
|
|
543
543
|
exports.toJS = toJS;
|
|
544
544
|
});
|
|
545
545
|
|
|
546
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
|
|
546
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
|
|
547
547
|
var require_Node = __commonJS((exports) => {
|
|
548
548
|
var applyReviver = require_applyReviver();
|
|
549
549
|
var identity = require_identity();
|
|
@@ -580,7 +580,7 @@ var require_Node = __commonJS((exports) => {
|
|
|
580
580
|
exports.NodeBase = NodeBase;
|
|
581
581
|
});
|
|
582
582
|
|
|
583
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
|
|
583
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
|
|
584
584
|
var require_Alias = __commonJS((exports) => {
|
|
585
585
|
var anchors = require_anchors();
|
|
586
586
|
var visit = require_visit();
|
|
@@ -688,7 +688,7 @@ var require_Alias = __commonJS((exports) => {
|
|
|
688
688
|
exports.Alias = Alias;
|
|
689
689
|
});
|
|
690
690
|
|
|
691
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
|
|
691
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
|
|
692
692
|
var require_Scalar = __commonJS((exports) => {
|
|
693
693
|
var identity = require_identity();
|
|
694
694
|
var Node = require_Node();
|
|
@@ -716,7 +716,7 @@ var require_Scalar = __commonJS((exports) => {
|
|
|
716
716
|
exports.isScalarValue = isScalarValue;
|
|
717
717
|
});
|
|
718
718
|
|
|
719
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
|
|
719
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
|
|
720
720
|
var require_createNode = __commonJS((exports) => {
|
|
721
721
|
var Alias = require_Alias();
|
|
722
722
|
var identity = require_identity();
|
|
@@ -788,7 +788,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
788
788
|
exports.createNode = createNode;
|
|
789
789
|
});
|
|
790
790
|
|
|
791
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
|
|
791
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
|
|
792
792
|
var require_Collection = __commonJS((exports) => {
|
|
793
793
|
var createNode = require_createNode();
|
|
794
794
|
var identity = require_identity();
|
|
@@ -903,7 +903,7 @@ var require_Collection = __commonJS((exports) => {
|
|
|
903
903
|
exports.isEmptyPath = isEmptyPath;
|
|
904
904
|
});
|
|
905
905
|
|
|
906
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
906
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
907
907
|
var require_stringifyComment = __commonJS((exports) => {
|
|
908
908
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
909
909
|
function indentComment(comment, indent) {
|
|
@@ -920,7 +920,7 @@ var require_stringifyComment = __commonJS((exports) => {
|
|
|
920
920
|
exports.stringifyComment = stringifyComment;
|
|
921
921
|
});
|
|
922
922
|
|
|
923
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
923
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
924
924
|
var require_foldFlowLines = __commonJS((exports) => {
|
|
925
925
|
var FOLD_FLOW = "flow";
|
|
926
926
|
var FOLD_BLOCK = "block";
|
|
@@ -1057,7 +1057,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
1057
1057
|
exports.foldFlowLines = foldFlowLines;
|
|
1058
1058
|
});
|
|
1059
1059
|
|
|
1060
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1060
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1061
1061
|
var require_stringifyString = __commonJS((exports) => {
|
|
1062
1062
|
var Scalar = require_Scalar();
|
|
1063
1063
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -1355,7 +1355,7 @@ ${indent}`);
|
|
|
1355
1355
|
exports.stringifyString = stringifyString;
|
|
1356
1356
|
});
|
|
1357
1357
|
|
|
1358
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
|
|
1358
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
|
|
1359
1359
|
var require_stringify = __commonJS((exports) => {
|
|
1360
1360
|
var anchors = require_anchors();
|
|
1361
1361
|
var identity = require_identity();
|
|
@@ -1476,7 +1476,7 @@ ${ctx.indent}${str}`;
|
|
|
1476
1476
|
exports.stringify = stringify;
|
|
1477
1477
|
});
|
|
1478
1478
|
|
|
1479
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1479
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1480
1480
|
var require_stringifyPair = __commonJS((exports) => {
|
|
1481
1481
|
var identity = require_identity();
|
|
1482
1482
|
var Scalar = require_Scalar();
|
|
@@ -1612,7 +1612,7 @@ ${ctx.indent}`;
|
|
|
1612
1612
|
exports.stringifyPair = stringifyPair;
|
|
1613
1613
|
});
|
|
1614
1614
|
|
|
1615
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
|
|
1615
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
|
|
1616
1616
|
var require_log = __commonJS((exports) => {
|
|
1617
1617
|
var node_process = __require("process");
|
|
1618
1618
|
function debug(logLevel, ...messages) {
|
|
@@ -1631,7 +1631,7 @@ var require_log = __commonJS((exports) => {
|
|
|
1631
1631
|
exports.warn = warn;
|
|
1632
1632
|
});
|
|
1633
1633
|
|
|
1634
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1634
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1635
1635
|
var require_merge = __commonJS((exports) => {
|
|
1636
1636
|
var identity = require_identity();
|
|
1637
1637
|
var Scalar = require_Scalar();
|
|
@@ -1685,7 +1685,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
1685
1685
|
exports.merge = merge;
|
|
1686
1686
|
});
|
|
1687
1687
|
|
|
1688
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1688
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1689
1689
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
1690
1690
|
var log = require_log();
|
|
1691
1691
|
var merge = require_merge();
|
|
@@ -1746,7 +1746,7 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
1746
1746
|
exports.addPairToJSMap = addPairToJSMap;
|
|
1747
1747
|
});
|
|
1748
1748
|
|
|
1749
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
|
|
1749
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
|
|
1750
1750
|
var require_Pair = __commonJS((exports) => {
|
|
1751
1751
|
var createNode = require_createNode();
|
|
1752
1752
|
var stringifyPair = require_stringifyPair();
|
|
@@ -1784,7 +1784,7 @@ var require_Pair = __commonJS((exports) => {
|
|
|
1784
1784
|
exports.createPair = createPair;
|
|
1785
1785
|
});
|
|
1786
1786
|
|
|
1787
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1787
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1788
1788
|
var require_stringifyCollection = __commonJS((exports) => {
|
|
1789
1789
|
var identity = require_identity();
|
|
1790
1790
|
var stringify = require_stringify();
|
|
@@ -1936,7 +1936,7 @@ ${indent}${end}`;
|
|
|
1936
1936
|
exports.stringifyCollection = stringifyCollection;
|
|
1937
1937
|
});
|
|
1938
1938
|
|
|
1939
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
1939
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
1940
1940
|
var require_YAMLMap = __commonJS((exports) => {
|
|
1941
1941
|
var stringifyCollection = require_stringifyCollection();
|
|
1942
1942
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -2063,7 +2063,7 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
2063
2063
|
exports.findPair = findPair;
|
|
2064
2064
|
});
|
|
2065
2065
|
|
|
2066
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
|
|
2066
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
|
|
2067
2067
|
var require_map = __commonJS((exports) => {
|
|
2068
2068
|
var identity = require_identity();
|
|
2069
2069
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2082,7 +2082,7 @@ var require_map = __commonJS((exports) => {
|
|
|
2082
2082
|
exports.map = map;
|
|
2083
2083
|
});
|
|
2084
2084
|
|
|
2085
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2085
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2086
2086
|
var require_YAMLSeq = __commonJS((exports) => {
|
|
2087
2087
|
var createNode = require_createNode();
|
|
2088
2088
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -2175,7 +2175,7 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
2175
2175
|
exports.YAMLSeq = YAMLSeq;
|
|
2176
2176
|
});
|
|
2177
2177
|
|
|
2178
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
|
|
2178
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
|
|
2179
2179
|
var require_seq = __commonJS((exports) => {
|
|
2180
2180
|
var identity = require_identity();
|
|
2181
2181
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2194,7 +2194,7 @@ var require_seq = __commonJS((exports) => {
|
|
|
2194
2194
|
exports.seq = seq;
|
|
2195
2195
|
});
|
|
2196
2196
|
|
|
2197
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
|
|
2197
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
|
|
2198
2198
|
var require_string = __commonJS((exports) => {
|
|
2199
2199
|
var stringifyString = require_stringifyString();
|
|
2200
2200
|
var string = {
|
|
@@ -2210,7 +2210,7 @@ var require_string = __commonJS((exports) => {
|
|
|
2210
2210
|
exports.string = string;
|
|
2211
2211
|
});
|
|
2212
2212
|
|
|
2213
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
|
|
2213
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
|
|
2214
2214
|
var require_null = __commonJS((exports) => {
|
|
2215
2215
|
var Scalar = require_Scalar();
|
|
2216
2216
|
var nullTag = {
|
|
@@ -2225,7 +2225,7 @@ var require_null = __commonJS((exports) => {
|
|
|
2225
2225
|
exports.nullTag = nullTag;
|
|
2226
2226
|
});
|
|
2227
2227
|
|
|
2228
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
|
|
2228
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
|
|
2229
2229
|
var require_bool = __commonJS((exports) => {
|
|
2230
2230
|
var Scalar = require_Scalar();
|
|
2231
2231
|
var boolTag = {
|
|
@@ -2246,7 +2246,7 @@ var require_bool = __commonJS((exports) => {
|
|
|
2246
2246
|
exports.boolTag = boolTag;
|
|
2247
2247
|
});
|
|
2248
2248
|
|
|
2249
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2249
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2250
2250
|
var require_stringifyNumber = __commonJS((exports) => {
|
|
2251
2251
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2252
2252
|
if (typeof value === "bigint")
|
|
@@ -2270,7 +2270,7 @@ var require_stringifyNumber = __commonJS((exports) => {
|
|
|
2270
2270
|
exports.stringifyNumber = stringifyNumber;
|
|
2271
2271
|
});
|
|
2272
2272
|
|
|
2273
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
|
|
2273
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
|
|
2274
2274
|
var require_float = __commonJS((exports) => {
|
|
2275
2275
|
var Scalar = require_Scalar();
|
|
2276
2276
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2313,7 +2313,7 @@ var require_float = __commonJS((exports) => {
|
|
|
2313
2313
|
exports.floatNaN = floatNaN;
|
|
2314
2314
|
});
|
|
2315
2315
|
|
|
2316
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
|
|
2316
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
|
|
2317
2317
|
var require_int = __commonJS((exports) => {
|
|
2318
2318
|
var stringifyNumber = require_stringifyNumber();
|
|
2319
2319
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2355,7 +2355,7 @@ var require_int = __commonJS((exports) => {
|
|
|
2355
2355
|
exports.intOct = intOct;
|
|
2356
2356
|
});
|
|
2357
2357
|
|
|
2358
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
|
|
2358
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
|
|
2359
2359
|
var require_schema = __commonJS((exports) => {
|
|
2360
2360
|
var map = require_map();
|
|
2361
2361
|
var _null = require_null();
|
|
@@ -2380,7 +2380,7 @@ var require_schema = __commonJS((exports) => {
|
|
|
2380
2380
|
exports.schema = schema;
|
|
2381
2381
|
});
|
|
2382
2382
|
|
|
2383
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
|
|
2383
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
|
|
2384
2384
|
var require_schema2 = __commonJS((exports) => {
|
|
2385
2385
|
var Scalar = require_Scalar();
|
|
2386
2386
|
var map = require_map();
|
|
@@ -2444,7 +2444,7 @@ var require_schema2 = __commonJS((exports) => {
|
|
|
2444
2444
|
exports.schema = schema;
|
|
2445
2445
|
});
|
|
2446
2446
|
|
|
2447
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2447
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2448
2448
|
var require_binary = __commonJS((exports) => {
|
|
2449
2449
|
var node_buffer = __require("buffer");
|
|
2450
2450
|
var Scalar = require_Scalar();
|
|
@@ -2499,7 +2499,7 @@ var require_binary = __commonJS((exports) => {
|
|
|
2499
2499
|
exports.binary = binary;
|
|
2500
2500
|
});
|
|
2501
2501
|
|
|
2502
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2502
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2503
2503
|
var require_pairs = __commonJS((exports) => {
|
|
2504
2504
|
var identity = require_identity();
|
|
2505
2505
|
var Pair = require_Pair();
|
|
@@ -2574,7 +2574,7 @@ ${cn.comment}` : item.comment;
|
|
|
2574
2574
|
exports.resolvePairs = resolvePairs;
|
|
2575
2575
|
});
|
|
2576
2576
|
|
|
2577
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2577
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2578
2578
|
var require_omap = __commonJS((exports) => {
|
|
2579
2579
|
var identity = require_identity();
|
|
2580
2580
|
var toJS = require_toJS();
|
|
@@ -2646,7 +2646,7 @@ var require_omap = __commonJS((exports) => {
|
|
|
2646
2646
|
exports.omap = omap;
|
|
2647
2647
|
});
|
|
2648
2648
|
|
|
2649
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2649
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2650
2650
|
var require_bool2 = __commonJS((exports) => {
|
|
2651
2651
|
var Scalar = require_Scalar();
|
|
2652
2652
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -2675,7 +2675,7 @@ var require_bool2 = __commonJS((exports) => {
|
|
|
2675
2675
|
exports.trueTag = trueTag;
|
|
2676
2676
|
});
|
|
2677
2677
|
|
|
2678
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2678
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2679
2679
|
var require_float2 = __commonJS((exports) => {
|
|
2680
2680
|
var Scalar = require_Scalar();
|
|
2681
2681
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2721,7 +2721,7 @@ var require_float2 = __commonJS((exports) => {
|
|
|
2721
2721
|
exports.floatNaN = floatNaN;
|
|
2722
2722
|
});
|
|
2723
2723
|
|
|
2724
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2724
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2725
2725
|
var require_int2 = __commonJS((exports) => {
|
|
2726
2726
|
var stringifyNumber = require_stringifyNumber();
|
|
2727
2727
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2797,7 +2797,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2797
2797
|
exports.intOct = intOct;
|
|
2798
2798
|
});
|
|
2799
2799
|
|
|
2800
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2800
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2801
2801
|
var require_set = __commonJS((exports) => {
|
|
2802
2802
|
var identity = require_identity();
|
|
2803
2803
|
var Pair = require_Pair();
|
|
@@ -2880,7 +2880,7 @@ var require_set = __commonJS((exports) => {
|
|
|
2880
2880
|
exports.set = set;
|
|
2881
2881
|
});
|
|
2882
2882
|
|
|
2883
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
2883
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
2884
2884
|
var require_timestamp = __commonJS((exports) => {
|
|
2885
2885
|
var stringifyNumber = require_stringifyNumber();
|
|
2886
2886
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -2962,7 +2962,7 @@ var require_timestamp = __commonJS((exports) => {
|
|
|
2962
2962
|
exports.timestamp = timestamp;
|
|
2963
2963
|
});
|
|
2964
2964
|
|
|
2965
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
2965
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
2966
2966
|
var require_schema3 = __commonJS((exports) => {
|
|
2967
2967
|
var map = require_map();
|
|
2968
2968
|
var _null = require_null();
|
|
@@ -3003,7 +3003,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
3003
3003
|
exports.schema = schema;
|
|
3004
3004
|
});
|
|
3005
3005
|
|
|
3006
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
|
|
3006
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
|
|
3007
3007
|
var require_tags = __commonJS((exports) => {
|
|
3008
3008
|
var map = require_map();
|
|
3009
3009
|
var _null = require_null();
|
|
@@ -3094,7 +3094,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
3094
3094
|
exports.getTags = getTags;
|
|
3095
3095
|
});
|
|
3096
3096
|
|
|
3097
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
|
|
3097
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
|
|
3098
3098
|
var require_Schema = __commonJS((exports) => {
|
|
3099
3099
|
var identity = require_identity();
|
|
3100
3100
|
var map = require_map();
|
|
@@ -3124,7 +3124,7 @@ var require_Schema = __commonJS((exports) => {
|
|
|
3124
3124
|
exports.Schema = Schema;
|
|
3125
3125
|
});
|
|
3126
3126
|
|
|
3127
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3127
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3128
3128
|
var require_stringifyDocument = __commonJS((exports) => {
|
|
3129
3129
|
var identity = require_identity();
|
|
3130
3130
|
var stringify = require_stringify();
|
|
@@ -3204,7 +3204,7 @@ var require_stringifyDocument = __commonJS((exports) => {
|
|
|
3204
3204
|
exports.stringifyDocument = stringifyDocument;
|
|
3205
3205
|
});
|
|
3206
3206
|
|
|
3207
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
|
|
3207
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
|
|
3208
3208
|
var require_Document = __commonJS((exports) => {
|
|
3209
3209
|
var Alias = require_Alias();
|
|
3210
3210
|
var Collection = require_Collection();
|
|
@@ -3439,7 +3439,7 @@ var require_Document = __commonJS((exports) => {
|
|
|
3439
3439
|
exports.Document = Document;
|
|
3440
3440
|
});
|
|
3441
3441
|
|
|
3442
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
|
|
3442
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
|
|
3443
3443
|
var require_errors = __commonJS((exports) => {
|
|
3444
3444
|
class YAMLError extends Error {
|
|
3445
3445
|
constructor(name, pos, code, message) {
|
|
@@ -3504,7 +3504,7 @@ ${pointer}
|
|
|
3504
3504
|
exports.prettifyError = prettifyError;
|
|
3505
3505
|
});
|
|
3506
3506
|
|
|
3507
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
|
|
3507
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
|
|
3508
3508
|
var require_resolve_props = __commonJS((exports) => {
|
|
3509
3509
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
3510
3510
|
let spaceBefore = false;
|
|
@@ -3634,7 +3634,7 @@ var require_resolve_props = __commonJS((exports) => {
|
|
|
3634
3634
|
exports.resolveProps = resolveProps;
|
|
3635
3635
|
});
|
|
3636
3636
|
|
|
3637
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3637
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3638
3638
|
var require_util_contains_newline = __commonJS((exports) => {
|
|
3639
3639
|
function containsNewline(key) {
|
|
3640
3640
|
if (!key)
|
|
@@ -3674,7 +3674,7 @@ var require_util_contains_newline = __commonJS((exports) => {
|
|
|
3674
3674
|
exports.containsNewline = containsNewline;
|
|
3675
3675
|
});
|
|
3676
3676
|
|
|
3677
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3677
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3678
3678
|
var require_util_flow_indent_check = __commonJS((exports) => {
|
|
3679
3679
|
var utilContainsNewline = require_util_contains_newline();
|
|
3680
3680
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -3689,7 +3689,7 @@ var require_util_flow_indent_check = __commonJS((exports) => {
|
|
|
3689
3689
|
exports.flowIndentCheck = flowIndentCheck;
|
|
3690
3690
|
});
|
|
3691
3691
|
|
|
3692
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
|
|
3692
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
|
|
3693
3693
|
var require_util_map_includes = __commonJS((exports) => {
|
|
3694
3694
|
var identity = require_identity();
|
|
3695
3695
|
function mapIncludes(ctx, items, search) {
|
|
@@ -3702,7 +3702,7 @@ var require_util_map_includes = __commonJS((exports) => {
|
|
|
3702
3702
|
exports.mapIncludes = mapIncludes;
|
|
3703
3703
|
});
|
|
3704
3704
|
|
|
3705
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3705
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3706
3706
|
var require_resolve_block_map = __commonJS((exports) => {
|
|
3707
3707
|
var Pair = require_Pair();
|
|
3708
3708
|
var YAMLMap = require_YAMLMap();
|
|
@@ -3809,7 +3809,7 @@ var require_resolve_block_map = __commonJS((exports) => {
|
|
|
3809
3809
|
exports.resolveBlockMap = resolveBlockMap;
|
|
3810
3810
|
});
|
|
3811
3811
|
|
|
3812
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
3812
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
3813
3813
|
var require_resolve_block_seq = __commonJS((exports) => {
|
|
3814
3814
|
var YAMLSeq = require_YAMLSeq();
|
|
3815
3815
|
var resolveProps = require_resolve_props();
|
|
@@ -3857,7 +3857,7 @@ var require_resolve_block_seq = __commonJS((exports) => {
|
|
|
3857
3857
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
3858
3858
|
});
|
|
3859
3859
|
|
|
3860
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
|
|
3860
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
|
|
3861
3861
|
var require_resolve_end = __commonJS((exports) => {
|
|
3862
3862
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
3863
3863
|
let comment = "";
|
|
@@ -3897,7 +3897,7 @@ var require_resolve_end = __commonJS((exports) => {
|
|
|
3897
3897
|
exports.resolveEnd = resolveEnd;
|
|
3898
3898
|
});
|
|
3899
3899
|
|
|
3900
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
3900
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
3901
3901
|
var require_resolve_flow_collection = __commonJS((exports) => {
|
|
3902
3902
|
var identity = require_identity();
|
|
3903
3903
|
var Pair = require_Pair();
|
|
@@ -4088,7 +4088,7 @@ var require_resolve_flow_collection = __commonJS((exports) => {
|
|
|
4088
4088
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
4089
4089
|
});
|
|
4090
4090
|
|
|
4091
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
4091
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
4092
4092
|
var require_compose_collection = __commonJS((exports) => {
|
|
4093
4093
|
var identity = require_identity();
|
|
4094
4094
|
var Scalar = require_Scalar();
|
|
@@ -4150,7 +4150,7 @@ var require_compose_collection = __commonJS((exports) => {
|
|
|
4150
4150
|
exports.composeCollection = composeCollection;
|
|
4151
4151
|
});
|
|
4152
4152
|
|
|
4153
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4153
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4154
4154
|
var require_resolve_block_scalar = __commonJS((exports) => {
|
|
4155
4155
|
var Scalar = require_Scalar();
|
|
4156
4156
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -4343,7 +4343,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
4343
4343
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
4344
4344
|
});
|
|
4345
4345
|
|
|
4346
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4346
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4347
4347
|
var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
4348
4348
|
var Scalar = require_Scalar();
|
|
4349
4349
|
var resolveEnd = require_resolve_end();
|
|
@@ -4559,7 +4559,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
|
4559
4559
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
4560
4560
|
});
|
|
4561
4561
|
|
|
4562
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
|
|
4562
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
|
|
4563
4563
|
var require_compose_scalar = __commonJS((exports) => {
|
|
4564
4564
|
var identity = require_identity();
|
|
4565
4565
|
var Scalar = require_Scalar();
|
|
@@ -4637,7 +4637,7 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
4637
4637
|
exports.composeScalar = composeScalar;
|
|
4638
4638
|
});
|
|
4639
4639
|
|
|
4640
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4640
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4641
4641
|
var require_util_empty_scalar_position = __commonJS((exports) => {
|
|
4642
4642
|
function emptyScalarPosition(offset, before, pos) {
|
|
4643
4643
|
if (before) {
|
|
@@ -4664,7 +4664,7 @@ var require_util_empty_scalar_position = __commonJS((exports) => {
|
|
|
4664
4664
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
4665
4665
|
});
|
|
4666
4666
|
|
|
4667
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
|
|
4667
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
|
|
4668
4668
|
var require_compose_node = __commonJS((exports) => {
|
|
4669
4669
|
var Alias = require_Alias();
|
|
4670
4670
|
var identity = require_identity();
|
|
@@ -4767,7 +4767,7 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4767
4767
|
exports.composeNode = composeNode;
|
|
4768
4768
|
});
|
|
4769
4769
|
|
|
4770
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
4770
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
4771
4771
|
var require_compose_doc = __commonJS((exports) => {
|
|
4772
4772
|
var Document = require_Document();
|
|
4773
4773
|
var composeNode = require_compose_node();
|
|
@@ -4807,7 +4807,7 @@ var require_compose_doc = __commonJS((exports) => {
|
|
|
4807
4807
|
exports.composeDoc = composeDoc;
|
|
4808
4808
|
});
|
|
4809
4809
|
|
|
4810
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
|
|
4810
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
|
|
4811
4811
|
var require_composer = __commonJS((exports) => {
|
|
4812
4812
|
var node_process = __require("process");
|
|
4813
4813
|
var directives = require_directives();
|
|
@@ -4996,7 +4996,7 @@ ${end.comment}` : end.comment;
|
|
|
4996
4996
|
exports.Composer = Composer;
|
|
4997
4997
|
});
|
|
4998
4998
|
|
|
4999
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
|
|
4999
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
|
|
5000
5000
|
var require_cst_scalar = __commonJS((exports) => {
|
|
5001
5001
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5002
5002
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -5186,7 +5186,7 @@ var require_cst_scalar = __commonJS((exports) => {
|
|
|
5186
5186
|
exports.setScalarValue = setScalarValue;
|
|
5187
5187
|
});
|
|
5188
5188
|
|
|
5189
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5189
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5190
5190
|
var require_cst_stringify = __commonJS((exports) => {
|
|
5191
5191
|
var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
|
|
5192
5192
|
function stringifyToken(token) {
|
|
@@ -5244,7 +5244,7 @@ var require_cst_stringify = __commonJS((exports) => {
|
|
|
5244
5244
|
exports.stringify = stringify;
|
|
5245
5245
|
});
|
|
5246
5246
|
|
|
5247
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
|
|
5247
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
|
|
5248
5248
|
var require_cst_visit = __commonJS((exports) => {
|
|
5249
5249
|
var BREAK = Symbol("break visit");
|
|
5250
5250
|
var SKIP = Symbol("skip children");
|
|
@@ -5303,7 +5303,7 @@ var require_cst_visit = __commonJS((exports) => {
|
|
|
5303
5303
|
exports.visit = visit;
|
|
5304
5304
|
});
|
|
5305
5305
|
|
|
5306
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
|
|
5306
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
|
|
5307
5307
|
var require_cst = __commonJS((exports) => {
|
|
5308
5308
|
var cstScalar = require_cst_scalar();
|
|
5309
5309
|
var cstStringify = require_cst_stringify();
|
|
@@ -5404,7 +5404,7 @@ var require_cst = __commonJS((exports) => {
|
|
|
5404
5404
|
exports.tokenType = tokenType;
|
|
5405
5405
|
});
|
|
5406
5406
|
|
|
5407
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
|
|
5407
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
|
|
5408
5408
|
var require_lexer = __commonJS((exports) => {
|
|
5409
5409
|
var cst = require_cst();
|
|
5410
5410
|
function isEmpty(ch) {
|
|
@@ -5990,7 +5990,7 @@ var require_lexer = __commonJS((exports) => {
|
|
|
5990
5990
|
exports.Lexer = Lexer;
|
|
5991
5991
|
});
|
|
5992
5992
|
|
|
5993
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
|
|
5993
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
|
|
5994
5994
|
var require_line_counter = __commonJS((exports) => {
|
|
5995
5995
|
class LineCounter {
|
|
5996
5996
|
constructor() {
|
|
@@ -6018,7 +6018,7 @@ var require_line_counter = __commonJS((exports) => {
|
|
|
6018
6018
|
exports.LineCounter = LineCounter;
|
|
6019
6019
|
});
|
|
6020
6020
|
|
|
6021
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
|
|
6021
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
|
|
6022
6022
|
var require_parser = __commonJS((exports) => {
|
|
6023
6023
|
var node_process = __require("process");
|
|
6024
6024
|
var cst = require_cst();
|
|
@@ -6867,7 +6867,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
6867
6867
|
exports.Parser = Parser;
|
|
6868
6868
|
});
|
|
6869
6869
|
|
|
6870
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
|
|
6870
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
|
|
6871
6871
|
var require_public_api = __commonJS((exports) => {
|
|
6872
6872
|
var composer = require_composer();
|
|
6873
6873
|
var Document = require_Document();
|
|
@@ -7001,7 +7001,7 @@ function deriveSlug(inputs, existing) {
|
|
|
7001
7001
|
return `${base}_${n}`;
|
|
7002
7002
|
}
|
|
7003
7003
|
|
|
7004
|
-
// node_modules/.bun/boundary@2.0.0/node_modules/boundary/lib/index.js
|
|
7004
|
+
// ../switchroom-sec-1417/node_modules/.bun/boundary@2.0.0/node_modules/boundary/lib/index.js
|
|
7005
7005
|
var require_lib = __commonJS((exports) => {
|
|
7006
7006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7007
7007
|
exports.binarySearch = exports.upperBound = exports.lowerBound = exports.compare = undefined;
|
|
@@ -7048,7 +7048,7 @@ var require_lib = __commonJS((exports) => {
|
|
|
7048
7048
|
exports.binarySearch = binarySearch;
|
|
7049
7049
|
});
|
|
7050
7050
|
|
|
7051
|
-
// node_modules/.bun/structured-source@4.0.0/node_modules/structured-source/lib/structured-source.js
|
|
7051
|
+
// ../switchroom-sec-1417/node_modules/.bun/structured-source@4.0.0/node_modules/structured-source/lib/structured-source.js
|
|
7052
7052
|
var require_structured_source = __commonJS((exports) => {
|
|
7053
7053
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7054
7054
|
exports.StructuredSource = undefined;
|
|
@@ -7103,13 +7103,13 @@ var require_structured_source = __commonJS((exports) => {
|
|
|
7103
7103
|
}
|
|
7104
7104
|
exports.StructuredSource = StructuredSource;
|
|
7105
7105
|
});
|
|
7106
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/SecretLintSourceCodeImpl.js
|
|
7106
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/SecretLintSourceCodeImpl.js
|
|
7107
7107
|
var import_structured_source;
|
|
7108
7108
|
var init_SecretLintSourceCodeImpl = __esm(() => {
|
|
7109
7109
|
import_structured_source = __toESM(require_structured_source(), 1);
|
|
7110
7110
|
});
|
|
7111
7111
|
|
|
7112
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/helper/promise-event-emitter.js
|
|
7112
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/helper/promise-event-emitter.js
|
|
7113
7113
|
class EventEmitter {
|
|
7114
7114
|
#listeners = new Map;
|
|
7115
7115
|
on(type, listener) {
|
|
@@ -7148,9 +7148,9 @@ class EventEmitter {
|
|
|
7148
7148
|
return Array.from(this.#listeners.get(type) ?? []);
|
|
7149
7149
|
}
|
|
7150
7150
|
}
|
|
7151
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RuleContext.js
|
|
7151
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RuleContext.js
|
|
7152
7152
|
var init_RuleContext = () => {};
|
|
7153
|
-
// node_modules/.bun/@secretlint+profiler@12.2.0/node_modules/@secretlint/profiler/module/index.js
|
|
7153
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+profiler@12.2.0/node_modules/@secretlint/profiler/module/index.js
|
|
7154
7154
|
class SecretLintProfiler {
|
|
7155
7155
|
perf;
|
|
7156
7156
|
entries = [];
|
|
@@ -7207,7 +7207,7 @@ class SecretLintProfiler {
|
|
|
7207
7207
|
}
|
|
7208
7208
|
}
|
|
7209
7209
|
|
|
7210
|
-
// node_modules/.bun/@secretlint+profiler@12.2.0/node_modules/@secretlint/profiler/module/node.js
|
|
7210
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+profiler@12.2.0/node_modules/@secretlint/profiler/module/node.js
|
|
7211
7211
|
import perf_hooks from "node:perf_hooks";
|
|
7212
7212
|
|
|
7213
7213
|
class NullPerformanceObserver {
|
|
@@ -7222,19 +7222,19 @@ var init_node = __esm(() => {
|
|
|
7222
7222
|
});
|
|
7223
7223
|
});
|
|
7224
7224
|
|
|
7225
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RunningEvents.js
|
|
7225
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RunningEvents.js
|
|
7226
7226
|
var init_RunningEvents = __esm(() => {
|
|
7227
7227
|
init_node();
|
|
7228
7228
|
});
|
|
7229
7229
|
|
|
7230
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RulePresetContext.js
|
|
7230
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/RulePresetContext.js
|
|
7231
7231
|
var init_RulePresetContext = __esm(() => {
|
|
7232
7232
|
init_RuleContext();
|
|
7233
7233
|
});
|
|
7234
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/messages/index.js
|
|
7234
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/messages/index.js
|
|
7235
7235
|
var init_messages = () => {};
|
|
7236
7236
|
|
|
7237
|
-
// node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
|
|
7237
|
+
// ../switchroom-sec-1417/node_modules/.bun/ms@2.1.3/node_modules/ms/index.js
|
|
7238
7238
|
var require_ms = __commonJS((exports, module) => {
|
|
7239
7239
|
var s = 1000;
|
|
7240
7240
|
var m = s * 60;
|
|
@@ -7344,7 +7344,7 @@ var require_ms = __commonJS((exports, module) => {
|
|
|
7344
7344
|
}
|
|
7345
7345
|
});
|
|
7346
7346
|
|
|
7347
|
-
// node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js
|
|
7347
|
+
// ../switchroom-sec-1417/node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js
|
|
7348
7348
|
var require_common = __commonJS((exports, module) => {
|
|
7349
7349
|
function setup(env) {
|
|
7350
7350
|
createDebug.debug = createDebug;
|
|
@@ -7519,7 +7519,7 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7519
7519
|
module.exports = setup;
|
|
7520
7520
|
});
|
|
7521
7521
|
|
|
7522
|
-
// node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js
|
|
7522
|
+
// ../switchroom-sec-1417/node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js
|
|
7523
7523
|
var require_browser = __commonJS((exports, module) => {
|
|
7524
7524
|
exports.formatArgs = formatArgs;
|
|
7525
7525
|
exports.save = save;
|
|
@@ -7679,7 +7679,7 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
7679
7679
|
};
|
|
7680
7680
|
});
|
|
7681
7681
|
|
|
7682
|
-
// node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
7682
|
+
// ../switchroom-sec-1417/node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
7683
7683
|
var require_has_flag = __commonJS((exports, module) => {
|
|
7684
7684
|
module.exports = (flag, argv = process.argv) => {
|
|
7685
7685
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
@@ -7689,7 +7689,7 @@ var require_has_flag = __commonJS((exports, module) => {
|
|
|
7689
7689
|
};
|
|
7690
7690
|
});
|
|
7691
7691
|
|
|
7692
|
-
// node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
7692
|
+
// ../switchroom-sec-1417/node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
7693
7693
|
var require_supports_color = __commonJS((exports, module) => {
|
|
7694
7694
|
var os = __require("os");
|
|
7695
7695
|
var tty = __require("tty");
|
|
@@ -7788,7 +7788,7 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
7788
7788
|
};
|
|
7789
7789
|
});
|
|
7790
7790
|
|
|
7791
|
-
// node_modules/.bun/debug@4.4.3/node_modules/debug/src/node.js
|
|
7791
|
+
// ../switchroom-sec-1417/node_modules/.bun/debug@4.4.3/node_modules/debug/src/node.js
|
|
7792
7792
|
var require_node = __commonJS((exports, module) => {
|
|
7793
7793
|
var tty = __require("tty");
|
|
7794
7794
|
var util3 = __require("util");
|
|
@@ -7959,7 +7959,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
7959
7959
|
};
|
|
7960
7960
|
});
|
|
7961
7961
|
|
|
7962
|
-
// node_modules/.bun/debug@4.4.3/node_modules/debug/src/index.js
|
|
7962
|
+
// ../switchroom-sec-1417/node_modules/.bun/debug@4.4.3/node_modules/debug/src/index.js
|
|
7963
7963
|
var require_src = __commonJS((exports, module) => {
|
|
7964
7964
|
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
7965
7965
|
module.exports = require_browser();
|
|
@@ -7968,7 +7968,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
7968
7968
|
}
|
|
7969
7969
|
});
|
|
7970
7970
|
|
|
7971
|
-
// node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/index.js
|
|
7971
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+core@12.2.0/node_modules/@secretlint/core/module/index.js
|
|
7972
7972
|
var import_debug, debug;
|
|
7973
7973
|
var init_module = __esm(() => {
|
|
7974
7974
|
init_SecretLintSourceCodeImpl();
|
|
@@ -7981,7 +7981,7 @@ var init_module = __esm(() => {
|
|
|
7981
7981
|
debug = import_debug.default("@secretlint/core");
|
|
7982
7982
|
});
|
|
7983
7983
|
|
|
7984
|
-
// node_modules/.bun/@secretlint+secretlint-rule-preset-recommend@12.2.0/node_modules/@secretlint/secretlint-rule-preset-recommend/module/index.js
|
|
7984
|
+
// ../switchroom-sec-1417/node_modules/.bun/@secretlint+secretlint-rule-preset-recommend@12.2.0/node_modules/@secretlint/secretlint-rule-preset-recommend/module/index.js
|
|
7985
7985
|
function requireLodash_uniq() {
|
|
7986
7986
|
if (hasRequiredLodash_uniq)
|
|
7987
7987
|
return lodash_uniq;
|
|
@@ -9672,7 +9672,7 @@ import { readFileSync as readFileSync2, existsSync as existsSync3 } from "node:f
|
|
|
9672
9672
|
import { homedir } from "node:os";
|
|
9673
9673
|
import { resolve as resolve3 } from "node:path";
|
|
9674
9674
|
|
|
9675
|
-
// node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
|
|
9675
|
+
// ../switchroom-sec-1417/node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
|
|
9676
9676
|
var composer = require_composer();
|
|
9677
9677
|
var Document = require_Document();
|
|
9678
9678
|
var Schema = require_Schema();
|
|
@@ -9718,7 +9718,7 @@ var $stringify = publicApi.stringify;
|
|
|
9718
9718
|
var $visit = visit.visit;
|
|
9719
9719
|
var $visitAsync = visit.visitAsync;
|
|
9720
9720
|
|
|
9721
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
9721
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
9722
9722
|
var exports_external = {};
|
|
9723
9723
|
__export(exports_external, {
|
|
9724
9724
|
void: () => voidType,
|
|
@@ -9830,7 +9830,7 @@ __export(exports_external, {
|
|
|
9830
9830
|
BRAND: () => BRAND
|
|
9831
9831
|
});
|
|
9832
9832
|
|
|
9833
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
9833
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
9834
9834
|
var util;
|
|
9835
9835
|
(function(util2) {
|
|
9836
9836
|
util2.assertEqual = (_) => {};
|
|
@@ -9961,7 +9961,7 @@ var getParsedType = (data) => {
|
|
|
9961
9961
|
}
|
|
9962
9962
|
};
|
|
9963
9963
|
|
|
9964
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
9964
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
9965
9965
|
var ZodIssueCode = util.arrayToEnum([
|
|
9966
9966
|
"invalid_type",
|
|
9967
9967
|
"invalid_literal",
|
|
@@ -10080,7 +10080,7 @@ ZodError.create = (issues) => {
|
|
|
10080
10080
|
return error;
|
|
10081
10081
|
};
|
|
10082
10082
|
|
|
10083
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
10083
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
10084
10084
|
var errorMap = (issue, _ctx) => {
|
|
10085
10085
|
let message;
|
|
10086
10086
|
switch (issue.code) {
|
|
@@ -10183,7 +10183,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
10183
10183
|
};
|
|
10184
10184
|
var en_default = errorMap;
|
|
10185
10185
|
|
|
10186
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
10186
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
10187
10187
|
var overrideErrorMap = en_default;
|
|
10188
10188
|
function setErrorMap(map) {
|
|
10189
10189
|
overrideErrorMap = map;
|
|
@@ -10191,7 +10191,7 @@ function setErrorMap(map) {
|
|
|
10191
10191
|
function getErrorMap() {
|
|
10192
10192
|
return overrideErrorMap;
|
|
10193
10193
|
}
|
|
10194
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
10194
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
10195
10195
|
var makeIssue = (params) => {
|
|
10196
10196
|
const { data, path, errorMaps, issueData } = params;
|
|
10197
10197
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -10297,14 +10297,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
10297
10297
|
var isDirty = (x) => x.status === "dirty";
|
|
10298
10298
|
var isValid = (x) => x.status === "valid";
|
|
10299
10299
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
10300
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
10300
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
10301
10301
|
var errorUtil;
|
|
10302
10302
|
(function(errorUtil2) {
|
|
10303
10303
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
10304
10304
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
10305
10305
|
})(errorUtil || (errorUtil = {}));
|
|
10306
10306
|
|
|
10307
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
10307
|
+
// ../switchroom-sec-1417/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
10308
10308
|
class ParseInputLazyPath {
|
|
10309
10309
|
constructor(parent, value, path, key) {
|
|
10310
10310
|
this._cachedPath = [];
|
|
@@ -14040,6 +14040,10 @@ var QuotaConfigSchema = exports_external.object({
|
|
|
14040
14040
|
var HostControlConfigSchema = exports_external.object({
|
|
14041
14041
|
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).")
|
|
14042
14042
|
});
|
|
14043
|
+
var HostdConfigSchema = exports_external.object({
|
|
14044
|
+
config_edit_enabled: exports_external.boolean().default(false).describe("Opt-in toggle for the `config_propose_edit` hostd verb (RFC " + "admin-agent-config-edit §3). Default false — the verb returns " + "`E_CONFIG_EDIT_DISABLED` until the operator explicitly flips " + "this to true. When true (and once PR 1c lands the apply path), " + "admin agents can propose unified-diff patches against " + "`/state/config/switchroom.yaml`, gated by an operator approval " + "card in the primary chat. Same trust posture as `update_apply` " + "and `agent_restart`: the human-in-the-loop tap is the security " + "boundary, not the agent's judgement."),
|
|
14045
|
+
config_edit_rate_per_hour: exports_external.number().int().min(1).max(20).default(3).describe("Per-requesting-agent rate cap for `config_propose_edit` cards " + "(RFC admin-agent-config-edit §5). Default 3 cards/hour; min 1, " + "max 20. Implemented as a sqlite token bucket in PR 1c; the " + "field is wired here in PR 1a so operators can pin it before the " + "limiter is live. Above the cap, the verb returns " + "`E_RATE_LIMITED` without raising a card.")
|
|
14046
|
+
});
|
|
14043
14047
|
var SwitchroomConfigSchema = exports_external.object({
|
|
14044
14048
|
switchroom: exports_external.object({
|
|
14045
14049
|
version: exports_external.literal(1).describe("Config schema version"),
|
|
@@ -14066,6 +14070,7 @@ var SwitchroomConfigSchema = exports_external.object({
|
|
|
14066
14070
|
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)."),
|
|
14067
14071
|
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."),
|
|
14068
14072
|
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)."),
|
|
14073
|
+
hostd: HostdConfigSchema.default({}).describe("hostd verb-level knobs (RFC admin-agent-config-edit). Distinct " + "from `host_control:` which governs whether the daemon runs at " + "all. Currently scopes the opt-in flag and rate cap for the new " + "`config_propose_edit` verb (PR 1a — disabled by default)."),
|
|
14069
14074
|
google_accounts: exports_external.record(exports_external.string().regex(/^[^@\s:]+@[^@\s:]+\.[^@\s:]+$/, {
|
|
14070
14075
|
message: "Account key must be a Google account email like 'alice@example.com' (colons not allowed)"
|
|
14071
14076
|
}).transform((v) => v.trim().toLowerCase()), exports_external.object({
|
|
@@ -14689,17 +14694,17 @@ var BIND_MOUNT_EXACT_SOURCE_DENY = new Set(["/var/run/docker.sock"]);
|
|
|
14689
14694
|
|
|
14690
14695
|
// src/host-control/server.ts
|
|
14691
14696
|
import { createServer } from "node:net";
|
|
14692
|
-
import { spawn, spawnSync } from "node:child_process";
|
|
14697
|
+
import { spawn, spawnSync as spawnSync2 } from "node:child_process";
|
|
14693
14698
|
import { mkdir, chmod, chown, unlink, appendFile } from "node:fs/promises";
|
|
14694
14699
|
import {
|
|
14695
14700
|
readdirSync as readdirSync2,
|
|
14696
|
-
existsSync as
|
|
14697
|
-
readFileSync as
|
|
14698
|
-
writeFileSync,
|
|
14701
|
+
existsSync as existsSync6,
|
|
14702
|
+
readFileSync as readFileSync4,
|
|
14703
|
+
writeFileSync as writeFileSync2,
|
|
14699
14704
|
renameSync,
|
|
14700
14705
|
mkdirSync
|
|
14701
14706
|
} from "node:fs";
|
|
14702
|
-
import { join as
|
|
14707
|
+
import { join as join3, dirname as dirname2, resolve as resolve5 } from "node:path";
|
|
14703
14708
|
|
|
14704
14709
|
// src/host-control/protocol.ts
|
|
14705
14710
|
var MAX_FRAME_BYTES = 64 * 1024;
|
|
@@ -14794,6 +14799,15 @@ var AgentSmokeRequestSchema = exports_external.object({
|
|
|
14794
14799
|
deep: exports_external.boolean().optional()
|
|
14795
14800
|
})
|
|
14796
14801
|
});
|
|
14802
|
+
var ConfigProposeEditRequestSchema = exports_external.object({
|
|
14803
|
+
...RequestEnvelope,
|
|
14804
|
+
op: exports_external.literal("config_propose_edit"),
|
|
14805
|
+
args: exports_external.object({
|
|
14806
|
+
unified_diff: exports_external.string().min(1).max(MAX_FRAME_BYTES - 1024),
|
|
14807
|
+
reason: exports_external.string().min(1).max(500),
|
|
14808
|
+
target_path: exports_external.literal("/state/config/switchroom.yaml")
|
|
14809
|
+
})
|
|
14810
|
+
});
|
|
14797
14811
|
var RequestSchema = exports_external.discriminatedUnion("op", [
|
|
14798
14812
|
AgentRestartRequestSchema,
|
|
14799
14813
|
UpgradeStatusRequestSchema,
|
|
@@ -14806,7 +14820,8 @@ var RequestSchema = exports_external.discriminatedUnion("op", [
|
|
|
14806
14820
|
AgentLogsRequestSchema,
|
|
14807
14821
|
AgentExecRequestSchema,
|
|
14808
14822
|
DoctorRequestSchema,
|
|
14809
|
-
AgentSmokeRequestSchema
|
|
14823
|
+
AgentSmokeRequestSchema,
|
|
14824
|
+
ConfigProposeEditRequestSchema
|
|
14810
14825
|
]);
|
|
14811
14826
|
var ResultSchema = exports_external.enum(["started", "completed", "denied", "error"]);
|
|
14812
14827
|
var ResponseEnvelope = {
|
|
@@ -15283,12 +15298,351 @@ function detectInstallType() {
|
|
|
15283
15298
|
}
|
|
15284
15299
|
}
|
|
15285
15300
|
|
|
15301
|
+
// src/host-control/config-edit-validator.ts
|
|
15302
|
+
import { mkdtempSync, writeFileSync, rmSync, existsSync as existsSync5, readFileSync as readFileSync3 } from "node:fs";
|
|
15303
|
+
import { tmpdir } from "node:os";
|
|
15304
|
+
import { join as join2, isAbsolute as isAbsolute2, normalize } from "node:path";
|
|
15305
|
+
import { spawnSync } from "node:child_process";
|
|
15306
|
+
var MAX_PATCH_BYTES = 1024 * 1024;
|
|
15307
|
+
function isTargetPathHeader(headerPath, targetBasename) {
|
|
15308
|
+
if (headerPath === "/dev/null")
|
|
15309
|
+
return false;
|
|
15310
|
+
let p = headerPath;
|
|
15311
|
+
if (p.startsWith("a/") || p.startsWith("b/"))
|
|
15312
|
+
p = p.slice(2);
|
|
15313
|
+
if (isAbsolute2(p))
|
|
15314
|
+
return false;
|
|
15315
|
+
if (p.includes(".."))
|
|
15316
|
+
return false;
|
|
15317
|
+
const norm = normalize(p);
|
|
15318
|
+
if (norm.includes("..") || isAbsolute2(norm))
|
|
15319
|
+
return false;
|
|
15320
|
+
return norm === targetBasename;
|
|
15321
|
+
}
|
|
15322
|
+
function validateShape(unifiedDiff, targetPath) {
|
|
15323
|
+
const byteLen = Buffer.byteLength(unifiedDiff, "utf8");
|
|
15324
|
+
if (byteLen > MAX_PATCH_BYTES) {
|
|
15325
|
+
return {
|
|
15326
|
+
ok: false,
|
|
15327
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15328
|
+
detail: `patch exceeds ${MAX_PATCH_BYTES}-byte cap (${byteLen} bytes)`
|
|
15329
|
+
};
|
|
15330
|
+
}
|
|
15331
|
+
if (unifiedDiff.includes("\r")) {
|
|
15332
|
+
return {
|
|
15333
|
+
ok: false,
|
|
15334
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15335
|
+
detail: "patch must be LF-only (no CRLF / CR)"
|
|
15336
|
+
};
|
|
15337
|
+
}
|
|
15338
|
+
const lines = unifiedDiff.split(`
|
|
15339
|
+
`);
|
|
15340
|
+
const minusHeaders = [];
|
|
15341
|
+
const plusHeaders = [];
|
|
15342
|
+
let hunkCount = 0;
|
|
15343
|
+
for (const ln of lines) {
|
|
15344
|
+
if (ln.startsWith("--- "))
|
|
15345
|
+
minusHeaders.push(ln.slice(4).trim());
|
|
15346
|
+
else if (ln.startsWith("+++ "))
|
|
15347
|
+
plusHeaders.push(ln.slice(4).trim());
|
|
15348
|
+
else if (ln.startsWith("@@"))
|
|
15349
|
+
hunkCount++;
|
|
15350
|
+
}
|
|
15351
|
+
if (minusHeaders.length === 0 || plusHeaders.length === 0) {
|
|
15352
|
+
return {
|
|
15353
|
+
ok: false,
|
|
15354
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15355
|
+
detail: "patch missing `---`/`+++` headers"
|
|
15356
|
+
};
|
|
15357
|
+
}
|
|
15358
|
+
if (hunkCount === 0) {
|
|
15359
|
+
return {
|
|
15360
|
+
ok: false,
|
|
15361
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15362
|
+
detail: "patch contains no hunks"
|
|
15363
|
+
};
|
|
15364
|
+
}
|
|
15365
|
+
if (minusHeaders.length > 1 || plusHeaders.length > 1) {
|
|
15366
|
+
return {
|
|
15367
|
+
ok: false,
|
|
15368
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15369
|
+
detail: "multi-file diff not allowed; single-file only"
|
|
15370
|
+
};
|
|
15371
|
+
}
|
|
15372
|
+
const targetBasename = targetPath.split("/").pop() ?? targetPath;
|
|
15373
|
+
for (const h of [...minusHeaders, ...plusHeaders]) {
|
|
15374
|
+
const path2 = h.split("\t")[0].trim();
|
|
15375
|
+
if (!isTargetPathHeader(path2, targetBasename)) {
|
|
15376
|
+
return {
|
|
15377
|
+
ok: false,
|
|
15378
|
+
code: "E_PATCH_INVALID_SHAPE",
|
|
15379
|
+
detail: `header path "${path2}" does not match target "${targetBasename}"`
|
|
15380
|
+
};
|
|
15381
|
+
}
|
|
15382
|
+
}
|
|
15383
|
+
return null;
|
|
15384
|
+
}
|
|
15385
|
+
function applyPatch(unifiedDiff, configPath, gitBin) {
|
|
15386
|
+
if (!existsSync5(configPath)) {
|
|
15387
|
+
return {
|
|
15388
|
+
ok: false,
|
|
15389
|
+
code: "E_PATCH_APPLY_FAILED",
|
|
15390
|
+
detail: `target config not found at ${configPath}`
|
|
15391
|
+
};
|
|
15392
|
+
}
|
|
15393
|
+
const liveContent = readFileSync3(configPath, "utf8");
|
|
15394
|
+
const scratchDir = mkdtempSync(join2(tmpdir(), "config-propose-edit-"));
|
|
15395
|
+
try {
|
|
15396
|
+
const basename = configPath.split("/").pop() ?? "switchroom.yaml";
|
|
15397
|
+
const scratchFile = join2(scratchDir, basename);
|
|
15398
|
+
writeFileSync(scratchFile, liveContent);
|
|
15399
|
+
const patchFile = join2(scratchDir, "proposal.patch");
|
|
15400
|
+
writeFileSync(patchFile, unifiedDiff);
|
|
15401
|
+
const bin = gitBin ?? "git";
|
|
15402
|
+
const baseArgs = [
|
|
15403
|
+
"apply",
|
|
15404
|
+
"--whitespace=nowarn",
|
|
15405
|
+
"--recount",
|
|
15406
|
+
"--unidiff-zero"
|
|
15407
|
+
];
|
|
15408
|
+
const checkP1 = spawnSync(bin, [...baseArgs.slice(0, 1), "--check", ...baseArgs.slice(1), "-p1", patchFile], { cwd: scratchDir, encoding: "utf8", timeout: 1e4 });
|
|
15409
|
+
let pStrip = "-p1";
|
|
15410
|
+
if (checkP1.status !== 0) {
|
|
15411
|
+
const checkP0 = spawnSync(bin, [...baseArgs.slice(0, 1), "--check", ...baseArgs.slice(1), "-p0", patchFile], { cwd: scratchDir, encoding: "utf8", timeout: 1e4 });
|
|
15412
|
+
if (checkP0.status !== 0) {
|
|
15413
|
+
const stderr = (checkP1.stderr || "") + (checkP0.stderr || "");
|
|
15414
|
+
return {
|
|
15415
|
+
ok: false,
|
|
15416
|
+
code: "E_PATCH_APPLY_FAILED",
|
|
15417
|
+
detail: `git apply --check failed: ${stderr.trim().slice(0, 500)}`
|
|
15418
|
+
};
|
|
15419
|
+
}
|
|
15420
|
+
pStrip = "-p0";
|
|
15421
|
+
}
|
|
15422
|
+
const real = spawnSync(bin, [...baseArgs, pStrip, patchFile], { cwd: scratchDir, encoding: "utf8", timeout: 1e4 });
|
|
15423
|
+
if (real.status !== 0) {
|
|
15424
|
+
return {
|
|
15425
|
+
ok: false,
|
|
15426
|
+
code: "E_PATCH_APPLY_FAILED",
|
|
15427
|
+
detail: `git apply failed: ${(real.stderr || "").trim().slice(0, 500)}`
|
|
15428
|
+
};
|
|
15429
|
+
}
|
|
15430
|
+
const after = readFileSync3(scratchFile, "utf8");
|
|
15431
|
+
return { ok: true, after };
|
|
15432
|
+
} finally {
|
|
15433
|
+
rmSync(scratchDir, { recursive: true, force: true });
|
|
15434
|
+
}
|
|
15435
|
+
}
|
|
15436
|
+
function failsafeParse(source) {
|
|
15437
|
+
let doc;
|
|
15438
|
+
try {
|
|
15439
|
+
doc = $parseDocument(source, { merge: false, strict: true });
|
|
15440
|
+
} catch (err) {
|
|
15441
|
+
return {
|
|
15442
|
+
ok: false,
|
|
15443
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15444
|
+
detail: `YAML parse error: ${err.message}`
|
|
15445
|
+
};
|
|
15446
|
+
}
|
|
15447
|
+
if (doc.errors && doc.errors.length > 0) {
|
|
15448
|
+
return {
|
|
15449
|
+
ok: false,
|
|
15450
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15451
|
+
detail: `YAML parse error: ${doc.errors[0].message}`
|
|
15452
|
+
};
|
|
15453
|
+
}
|
|
15454
|
+
let rejection = null;
|
|
15455
|
+
$visit(doc, (_key, node, _path) => {
|
|
15456
|
+
if (rejection)
|
|
15457
|
+
return $visit.BREAK;
|
|
15458
|
+
if ($isAlias(node)) {
|
|
15459
|
+
rejection = {
|
|
15460
|
+
ok: false,
|
|
15461
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15462
|
+
detail: "YAML aliases (`*name`) are not allowed"
|
|
15463
|
+
};
|
|
15464
|
+
return $visit.BREAK;
|
|
15465
|
+
}
|
|
15466
|
+
if ($isNode(node)) {
|
|
15467
|
+
if (node.anchor) {
|
|
15468
|
+
rejection = {
|
|
15469
|
+
ok: false,
|
|
15470
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15471
|
+
detail: `YAML anchors (\`&${node.anchor}\`) are not allowed`
|
|
15472
|
+
};
|
|
15473
|
+
return $visit.BREAK;
|
|
15474
|
+
}
|
|
15475
|
+
const tag = node.tag;
|
|
15476
|
+
if (typeof tag === "string" && tag.startsWith("!")) {
|
|
15477
|
+
rejection = {
|
|
15478
|
+
ok: false,
|
|
15479
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15480
|
+
detail: `YAML explicit tags (\`${tag}\`) are not allowed`
|
|
15481
|
+
};
|
|
15482
|
+
return $visit.BREAK;
|
|
15483
|
+
}
|
|
15484
|
+
}
|
|
15485
|
+
if ($isPair(node)) {
|
|
15486
|
+
const k = node.key;
|
|
15487
|
+
if ($isScalar(k) && k.value === "<<") {
|
|
15488
|
+
rejection = {
|
|
15489
|
+
ok: false,
|
|
15490
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15491
|
+
detail: "YAML merge keys (`<<:`) are not allowed"
|
|
15492
|
+
};
|
|
15493
|
+
return $visit.BREAK;
|
|
15494
|
+
}
|
|
15495
|
+
}
|
|
15496
|
+
return;
|
|
15497
|
+
});
|
|
15498
|
+
if (rejection)
|
|
15499
|
+
return rejection;
|
|
15500
|
+
if (/(^|\n)\s*<<\s*:/.test(source)) {
|
|
15501
|
+
return {
|
|
15502
|
+
ok: false,
|
|
15503
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15504
|
+
detail: "YAML merge keys (`<<:`) are not allowed"
|
|
15505
|
+
};
|
|
15506
|
+
}
|
|
15507
|
+
const tagMatch = source.match(/(^|\s)!![A-Za-z_][\w/.\-:]*/);
|
|
15508
|
+
if (tagMatch) {
|
|
15509
|
+
return {
|
|
15510
|
+
ok: false,
|
|
15511
|
+
code: "E_YAML_UNSAFE_CONSTRUCT",
|
|
15512
|
+
detail: `YAML explicit tags (\`${tagMatch[0].trim()}\`) are not allowed`
|
|
15513
|
+
};
|
|
15514
|
+
}
|
|
15515
|
+
return { ok: true, doc, data: doc.toJS() };
|
|
15516
|
+
}
|
|
15517
|
+
function schemaValidate(data) {
|
|
15518
|
+
const result = SwitchroomConfigSchema.safeParse(data);
|
|
15519
|
+
if (result.success)
|
|
15520
|
+
return null;
|
|
15521
|
+
const issue = result.error.issues[0];
|
|
15522
|
+
const where = issue?.path.join(".") || "(root)";
|
|
15523
|
+
return {
|
|
15524
|
+
ok: false,
|
|
15525
|
+
code: "E_SCHEMA_INVALID",
|
|
15526
|
+
detail: `schema validation failed at ${where}: ${issue?.message ?? "unknown"}`
|
|
15527
|
+
};
|
|
15528
|
+
}
|
|
15529
|
+
function collectStrings(root, out, prefix = "") {
|
|
15530
|
+
if (root === null || root === undefined)
|
|
15531
|
+
return;
|
|
15532
|
+
if (typeof root === "string") {
|
|
15533
|
+
out.set(prefix || "(root)", root);
|
|
15534
|
+
return;
|
|
15535
|
+
}
|
|
15536
|
+
if (Array.isArray(root)) {
|
|
15537
|
+
for (let i = 0;i < root.length; i++) {
|
|
15538
|
+
collectStrings(root[i], out, `${prefix}[${i}]`);
|
|
15539
|
+
}
|
|
15540
|
+
return;
|
|
15541
|
+
}
|
|
15542
|
+
if (typeof root === "object") {
|
|
15543
|
+
for (const [k, v] of Object.entries(root)) {
|
|
15544
|
+
const p = prefix ? `${prefix}.${k}` : k;
|
|
15545
|
+
collectStrings(v, out, p);
|
|
15546
|
+
}
|
|
15547
|
+
}
|
|
15548
|
+
}
|
|
15549
|
+
var SECRET_PREFIX_PATTERNS = [
|
|
15550
|
+
{ name: "openai-key", re: /^sk-[A-Za-z0-9_\-]{20,}$/ },
|
|
15551
|
+
{ name: "anthropic-key", re: /^sk-ant-[A-Za-z0-9_\-]{20,}$/ },
|
|
15552
|
+
{ name: "github-pat", re: /^ghp_[A-Za-z0-9]{20,}$/ },
|
|
15553
|
+
{ name: "github-fine-grained", re: /^github_pat_[A-Za-z0-9_]{20,}$/ },
|
|
15554
|
+
{ name: "slack-bot", re: /^xoxb-[A-Za-z0-9\-]{10,}$/ },
|
|
15555
|
+
{ name: "slack-user", re: /^xoxp-[A-Za-z0-9\-]{10,}$/ },
|
|
15556
|
+
{ name: "google-api", re: /^AIza[A-Za-z0-9_\-]{30,}$/ },
|
|
15557
|
+
{ name: "aws-access-key", re: /^AKIA[A-Z0-9]{16,}$/ }
|
|
15558
|
+
];
|
|
15559
|
+
var CREDENTIAL_FIELD_RE = /(^|[._\-])(secret|token|password|api[_\-]?key|bot[_\-]?token|client[_\-]?secret|credential)s?($|[._\-])/i;
|
|
15560
|
+
var VAULT_REF_RE = /^vault:[A-Za-z0-9_\-]+(\/[A-Za-z0-9_\-]+)*$/;
|
|
15561
|
+
function masked(s) {
|
|
15562
|
+
if (s.length <= 8)
|
|
15563
|
+
return "***";
|
|
15564
|
+
return `${s.slice(0, 3)}...${s.slice(-3)}`;
|
|
15565
|
+
}
|
|
15566
|
+
function secretLeakGuard(before, after) {
|
|
15567
|
+
const beforeStrings = new Map;
|
|
15568
|
+
const afterStrings = new Map;
|
|
15569
|
+
collectStrings(before, beforeStrings);
|
|
15570
|
+
collectStrings(after, afterStrings);
|
|
15571
|
+
for (const [path2, val] of beforeStrings) {
|
|
15572
|
+
if (!VAULT_REF_RE.test(val))
|
|
15573
|
+
continue;
|
|
15574
|
+
if (!afterStrings.has(path2))
|
|
15575
|
+
continue;
|
|
15576
|
+
const newVal = afterStrings.get(path2);
|
|
15577
|
+
if (!VAULT_REF_RE.test(newVal)) {
|
|
15578
|
+
return {
|
|
15579
|
+
ok: false,
|
|
15580
|
+
code: "E_SECRET_LEAK_DETECTED",
|
|
15581
|
+
detail: `field "${path2}" was a vault reference (${val}) but the ` + `proposed change replaces it with a literal value ` + `(${masked(newVal)}); inlining a secret is not allowed`
|
|
15582
|
+
};
|
|
15583
|
+
}
|
|
15584
|
+
}
|
|
15585
|
+
for (const [path2, val] of afterStrings) {
|
|
15586
|
+
if (VAULT_REF_RE.test(val))
|
|
15587
|
+
continue;
|
|
15588
|
+
if (beforeStrings.get(path2) === val)
|
|
15589
|
+
continue;
|
|
15590
|
+
for (const { name, re } of SECRET_PREFIX_PATTERNS) {
|
|
15591
|
+
if (re.test(val)) {
|
|
15592
|
+
return {
|
|
15593
|
+
ok: false,
|
|
15594
|
+
code: "E_SECRET_LEAK_DETECTED",
|
|
15595
|
+
detail: `field "${path2}" contains a literal ${name}-shaped value ` + `(${masked(val)}); use a vault:<key> reference instead`
|
|
15596
|
+
};
|
|
15597
|
+
}
|
|
15598
|
+
}
|
|
15599
|
+
if (CREDENTIAL_FIELD_RE.test(path2)) {
|
|
15600
|
+
if (val.length >= 40 && /^[A-Za-z0-9+/=_\-]+$/.test(val)) {
|
|
15601
|
+
return {
|
|
15602
|
+
ok: false,
|
|
15603
|
+
code: "E_SECRET_LEAK_DETECTED",
|
|
15604
|
+
detail: `field "${path2}" is credential-named and the proposed ` + `value (${masked(val)}) looks like a literal secret; ` + `use a vault:<key> reference instead`
|
|
15605
|
+
};
|
|
15606
|
+
}
|
|
15607
|
+
}
|
|
15608
|
+
}
|
|
15609
|
+
return null;
|
|
15610
|
+
}
|
|
15611
|
+
function validateConfigEdit(opts) {
|
|
15612
|
+
const shapeErr = validateShape(opts.unifiedDiff, opts.targetPath);
|
|
15613
|
+
if (shapeErr)
|
|
15614
|
+
return shapeErr;
|
|
15615
|
+
const applied = applyPatch(opts.unifiedDiff, opts.configPath, opts.gitBin);
|
|
15616
|
+
if (!("ok" in applied) || applied.ok !== true) {
|
|
15617
|
+
return applied;
|
|
15618
|
+
}
|
|
15619
|
+
const parsedAfter = failsafeParse(applied.after);
|
|
15620
|
+
if (!("ok" in parsedAfter) || parsedAfter.ok !== true) {
|
|
15621
|
+
return parsedAfter;
|
|
15622
|
+
}
|
|
15623
|
+
const schemaErr = schemaValidate(parsedAfter.data);
|
|
15624
|
+
if (schemaErr)
|
|
15625
|
+
return schemaErr;
|
|
15626
|
+
let beforeData = {};
|
|
15627
|
+
try {
|
|
15628
|
+
const beforeRaw = existsSync5(opts.configPath) ? readFileSync3(opts.configPath, "utf8") : "";
|
|
15629
|
+
const beforeDoc = $parseDocument(beforeRaw, { merge: false, strict: false });
|
|
15630
|
+
beforeData = beforeDoc.toJS();
|
|
15631
|
+
} catch {
|
|
15632
|
+
beforeData = {};
|
|
15633
|
+
}
|
|
15634
|
+
const leakErr = secretLeakGuard(beforeData, parsedAfter.data);
|
|
15635
|
+
if (leakErr)
|
|
15636
|
+
return leakErr;
|
|
15637
|
+
return { ok: true };
|
|
15638
|
+
}
|
|
15639
|
+
|
|
15286
15640
|
// src/host-control/server.ts
|
|
15287
15641
|
function resolveDigests(imageRefs) {
|
|
15288
15642
|
const out = new Map;
|
|
15289
15643
|
for (const ref of imageRefs) {
|
|
15290
15644
|
try {
|
|
15291
|
-
const r =
|
|
15645
|
+
const r = spawnSync2("docker", ["inspect", "--format={{index .RepoDigests 0}}", ref], { encoding: "utf-8", timeout: 5000 });
|
|
15292
15646
|
if (r.status !== 0)
|
|
15293
15647
|
continue;
|
|
15294
15648
|
const trimmed = (r.stdout ?? "").trim();
|
|
@@ -15306,11 +15660,11 @@ function resolveDigests(imageRefs) {
|
|
|
15306
15660
|
return out;
|
|
15307
15661
|
}
|
|
15308
15662
|
function readCachedInstallType(bindRoot) {
|
|
15309
|
-
const cacheDir =
|
|
15310
|
-
const cachePath =
|
|
15311
|
-
if (
|
|
15663
|
+
const cacheDir = join3(bindRoot, ".switchroom");
|
|
15664
|
+
const cachePath = join3(cacheDir, "install-type.json");
|
|
15665
|
+
if (existsSync6(cachePath)) {
|
|
15312
15666
|
try {
|
|
15313
|
-
const raw =
|
|
15667
|
+
const raw = readFileSync4(cachePath, "utf-8");
|
|
15314
15668
|
const parsed = JSON.parse(raw);
|
|
15315
15669
|
if (parsed && typeof parsed.install_type === "string" && typeof parsed.detected_at === "string") {
|
|
15316
15670
|
return parsed;
|
|
@@ -15329,7 +15683,7 @@ function readCachedInstallType(bindRoot) {
|
|
|
15329
15683
|
try {
|
|
15330
15684
|
mkdirSync(cacheDir, { recursive: true });
|
|
15331
15685
|
const tmp = `${cachePath}.tmp`;
|
|
15332
|
-
|
|
15686
|
+
writeFileSync2(tmp, JSON.stringify(payload, null, 2), { mode: 420 });
|
|
15333
15687
|
renameSync(tmp, cachePath);
|
|
15334
15688
|
} catch {}
|
|
15335
15689
|
return payload;
|
|
@@ -15350,7 +15704,7 @@ class HostdServer {
|
|
|
15350
15704
|
this.opts = opts;
|
|
15351
15705
|
}
|
|
15352
15706
|
async start() {
|
|
15353
|
-
const hostdDir =
|
|
15707
|
+
const hostdDir = join3(this.opts.homeDir, ".switchroom", "hostd");
|
|
15354
15708
|
await mkdir(hostdDir, { recursive: true });
|
|
15355
15709
|
await chmod(hostdDir, 493).catch(() => {
|
|
15356
15710
|
return;
|
|
@@ -15361,13 +15715,13 @@ class HostdServer {
|
|
|
15361
15715
|
}
|
|
15362
15716
|
try {
|
|
15363
15717
|
for (const name of agentNames) {
|
|
15364
|
-
const dir =
|
|
15365
|
-
const sockPath =
|
|
15718
|
+
const dir = join3(hostdDir, name);
|
|
15719
|
+
const sockPath = join3(dir, "sock");
|
|
15366
15720
|
await mkdir(dir, { recursive: true });
|
|
15367
15721
|
await chmod(dir, 493).catch(() => {
|
|
15368
15722
|
return;
|
|
15369
15723
|
});
|
|
15370
|
-
if (
|
|
15724
|
+
if (existsSync6(sockPath))
|
|
15371
15725
|
await unlink(sockPath).catch(() => {
|
|
15372
15726
|
return;
|
|
15373
15727
|
});
|
|
@@ -15398,13 +15752,13 @@ class HostdServer {
|
|
|
15398
15752
|
process.stderr.write(`hostd: SWITCHROOM_HOSTD_OPERATOR_UID='${opUidStr}' is not a positive integer; skipping operator listener
|
|
15399
15753
|
`);
|
|
15400
15754
|
} else {
|
|
15401
|
-
const dir =
|
|
15402
|
-
const sockPath =
|
|
15755
|
+
const dir = join3(hostdDir, "operator");
|
|
15756
|
+
const sockPath = join3(dir, "sock");
|
|
15403
15757
|
await mkdir(dir, { recursive: true });
|
|
15404
15758
|
await chmod(dir, 493).catch(() => {
|
|
15405
15759
|
return;
|
|
15406
15760
|
});
|
|
15407
|
-
if (
|
|
15761
|
+
if (existsSync6(sockPath))
|
|
15408
15762
|
await unlink(sockPath).catch(() => {
|
|
15409
15763
|
return;
|
|
15410
15764
|
});
|
|
@@ -15561,6 +15915,9 @@ class HostdServer {
|
|
|
15561
15915
|
case "agent_smoke":
|
|
15562
15916
|
resp = await this.handleAgentSmoke(req, started);
|
|
15563
15917
|
break;
|
|
15918
|
+
case "config_propose_edit":
|
|
15919
|
+
resp = this.handleConfigProposeEdit(req, started);
|
|
15920
|
+
break;
|
|
15564
15921
|
}
|
|
15565
15922
|
} catch (err) {
|
|
15566
15923
|
resp = errorResponse(req.request_id, `hostd dispatch failed: ${err.message}`, Date.now() - started);
|
|
@@ -15608,6 +15965,8 @@ class HostdServer {
|
|
|
15608
15965
|
return callerAdmin ? null : `${req.op} cross-agent requires admin: true on caller "${caller.name}"`;
|
|
15609
15966
|
case "doctor":
|
|
15610
15967
|
return callerAdmin ? null : `doctor requires admin: true on caller "${caller.name}"`;
|
|
15968
|
+
case "config_propose_edit":
|
|
15969
|
+
return callerAdmin ? null : `config_propose_edit requires admin: true on caller "${caller.name}"`;
|
|
15611
15970
|
}
|
|
15612
15971
|
}
|
|
15613
15972
|
async handleAgentRestart(req, caller, started) {
|
|
@@ -15687,10 +16046,10 @@ class HostdServer {
|
|
|
15687
16046
|
missingApplyAssets() {
|
|
15688
16047
|
const root = this.opts.applyAssetsRoot ?? resolve5(import.meta.dirname, "../..");
|
|
15689
16048
|
return [
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
].filter((p) => !
|
|
16049
|
+
join3(root, "profiles"),
|
|
16050
|
+
join3(root, "profiles", "default"),
|
|
16051
|
+
join3(root, "vendor", "hindsight-memory")
|
|
16052
|
+
].filter((p) => !existsSync6(p));
|
|
15694
16053
|
}
|
|
15695
16054
|
applyAssetPreflight(request_id, started) {
|
|
15696
16055
|
const missing = this.missingApplyAssets();
|
|
@@ -15854,6 +16213,22 @@ class HostdServer {
|
|
|
15854
16213
|
stderr_tail: tail(res.stderr)
|
|
15855
16214
|
};
|
|
15856
16215
|
}
|
|
16216
|
+
handleConfigProposeEdit(req, started) {
|
|
16217
|
+
const enabled = this.opts.config.hostd?.config_edit_enabled === true;
|
|
16218
|
+
if (!enabled) {
|
|
16219
|
+
return errorResponse(req.request_id, "E_CONFIG_EDIT_DISABLED: config_propose_edit is disabled; " + "operator must set hostd.config_edit_enabled=true in " + "switchroom.yaml to opt in", Date.now() - started);
|
|
16220
|
+
}
|
|
16221
|
+
const configPath = this.opts.configPath ?? req.args.target_path;
|
|
16222
|
+
const verdict = validateConfigEdit({
|
|
16223
|
+
configPath,
|
|
16224
|
+
targetPath: req.args.target_path,
|
|
16225
|
+
unifiedDiff: req.args.unified_diff
|
|
16226
|
+
});
|
|
16227
|
+
if (!verdict.ok) {
|
|
16228
|
+
return errorResponse(req.request_id, `${verdict.code}: ${verdict.detail}`, Date.now() - started);
|
|
16229
|
+
}
|
|
16230
|
+
return errorResponse(req.request_id, "E_NOT_IMPLEMENTED_APPLY_PATH: validation passed (apply path " + "not yet implemented — pending PR 1c)", Date.now() - started);
|
|
16231
|
+
}
|
|
15857
16232
|
async handleAgentSmoke(req, started) {
|
|
15858
16233
|
const container = `switchroom-${req.args.name}`;
|
|
15859
16234
|
const respond = (containerState, probes2) => ({
|
|
@@ -15959,10 +16334,10 @@ class HostdServer {
|
|
|
15959
16334
|
if (this.opts.imageRefsForDigests)
|
|
15960
16335
|
return this.opts.imageRefsForDigests();
|
|
15961
16336
|
try {
|
|
15962
|
-
const composePath =
|
|
15963
|
-
if (!
|
|
16337
|
+
const composePath = join3(this.opts.bindRoot ?? this.opts.homeDir, ".switchroom", "compose", "docker-compose.yml");
|
|
16338
|
+
if (!existsSync6(composePath))
|
|
15964
16339
|
return [];
|
|
15965
|
-
const r =
|
|
16340
|
+
const r = spawnSync2("docker", [
|
|
15966
16341
|
"compose",
|
|
15967
16342
|
"-p",
|
|
15968
16343
|
"switchroom",
|
|
@@ -16044,7 +16419,7 @@ class HostdServer {
|
|
|
16044
16419
|
}
|
|
16045
16420
|
}
|
|
16046
16421
|
auditLogPath() {
|
|
16047
|
-
return this.opts.auditLogPath ??
|
|
16422
|
+
return this.opts.auditLogPath ?? join3(this.opts.homeDir, ".switchroom", "host-control-audit.log");
|
|
16048
16423
|
}
|
|
16049
16424
|
appendAuditRow(row) {
|
|
16050
16425
|
const path2 = this.auditLogPath();
|