switchroom 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -16
- package/dist/agent-scheduler/index.js +216 -97
- package/dist/auth-broker/index.js +176 -97
- package/dist/cli/drive-write-pretool.mjs +26 -11
- package/dist/cli/skill-validate-pretool.mjs +7209 -0
- package/dist/cli/switchroom.js +45571 -42642
- package/dist/cli/ui/index.html +1281 -0
- package/dist/host-control/main.js +3628 -309
- package/dist/vault/approvals/kernel-server.js +207 -98
- package/dist/vault/broker/server.js +249 -119
- package/examples/personal-google-workspace-mcp/README.md +8 -3
- package/examples/switchroom.yaml +91 -42
- package/package.json +4 -3
- package/profiles/_base/start.sh.hbs +76 -36
- package/profiles/_shared/agent-self-service.md.hbs +1 -1
- package/profiles/default/CLAUDE.md.hbs +4 -2
- package/skills/file-bug/SKILL.md +6 -4
- package/skills/skill-creator/SKILL.md +52 -0
- package/skills/switchroom-cli/SKILL.md +20 -4
- package/skills/switchroom-install/SKILL.md +3 -3
- package/telegram-plugin/auth-snapshot-format.ts +9 -9
- package/telegram-plugin/card-format.ts +3 -3
- package/telegram-plugin/dist/bridge/bridge.js +112 -112
- package/telegram-plugin/dist/gateway/gateway.js +853 -414
- package/telegram-plugin/dist/server.js +162 -161
- package/telegram-plugin/format.ts +71 -0
- package/telegram-plugin/gateway/access-validator.test.ts +8 -8
- package/telegram-plugin/gateway/access-validator.ts +1 -1
- package/telegram-plugin/gateway/approval-card.test.ts +18 -18
- package/telegram-plugin/gateway/approval-card.ts +1 -1
- package/telegram-plugin/gateway/auth-command.ts +2 -2
- package/telegram-plugin/gateway/boot-card.ts +40 -3
- package/telegram-plugin/gateway/boot-probes.ts +114 -30
- package/telegram-plugin/gateway/diff-preview-card.test.ts +15 -15
- package/telegram-plugin/gateway/diff-preview-card.ts +1 -1
- package/telegram-plugin/gateway/drive-write-approval.test.ts +2 -2
- package/telegram-plugin/gateway/gateway.ts +265 -22
- package/telegram-plugin/gateway/update-announce.ts +167 -0
- package/telegram-plugin/quota-check.ts +0 -195
- package/telegram-plugin/recent-outbound-dedup.ts +1 -1
- package/telegram-plugin/registry/turns-schema.ts +1 -1
- package/telegram-plugin/retry-api-call.ts +24 -0
- package/telegram-plugin/server.ts +8 -5
- package/telegram-plugin/tests/auth-add-flow.test.ts +32 -3
- package/telegram-plugin/tests/auth-command-format2.test.ts +4 -4
- package/telegram-plugin/tests/auth-snapshot-format.test.ts +17 -17
- package/telegram-plugin/tests/auto-fallback-fleet.test.ts +10 -10
- package/telegram-plugin/tests/boot-probes.test.ts +90 -2
- package/telegram-plugin/tests/bot-runtime.test.ts +23 -1
- package/telegram-plugin/tests/fixtures/service-log-current-claude-code.bin +1 -1
- package/telegram-plugin/tests/fleet-state.test.ts +3 -2
- package/telegram-plugin/tests/quota-check.test.ts +0 -409
- package/telegram-plugin/tests/retry-api-call.test.ts +76 -0
- package/telegram-plugin/tests/secret-detect-audit.test.ts +1 -1
- package/telegram-plugin/tests/secret-detect-pipeline.test.ts +7 -6
- package/telegram-plugin/tests/secret-detect-suppressor-no-silent-allow.test.ts +6 -5
- package/telegram-plugin/tests/secret-detect.test.ts +8 -8
- package/telegram-plugin/tests/telegram-format.test.ts +84 -1
- package/telegram-plugin/tests/update-announce.test.ts +154 -0
- package/telegram-plugin/tests/vault-grant-inbound-builders.test.ts +8 -8
- package/telegram-plugin/tests/vault-request-access-tool.test.ts +51 -0
- package/telegram-plugin/welcome-text.ts +1 -8
- package/profiles/default/CLAUDE.md +0 -192
- package/skills/docx/scripts/office/validators/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/docx/scripts/office/validators/__pycache__/base.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/generate_report.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/improve_description.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_eval.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/run_loop.cpython-313.pyc +0 -0
- package/skills/skill-creator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
- package/telegram-plugin/first-paint.ts +0 -225
- package/telegram-plugin/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/telegram-plugin/server.js +0 -41795
- package/telegram-plugin/tests/html-balanced.ts +0 -63
- package/telegram-plugin/tests/snapshot-serializer.ts +0 -79
- package/telegram-plugin/tool-error-filter.ts +0 -89
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
};
|
|
15
15
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
16
16
|
|
|
17
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
17
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
18
18
|
var util, objectUtil, ZodParsedType, getParsedType = (data) => {
|
|
19
19
|
const t = typeof data;
|
|
20
20
|
switch (t) {
|
|
@@ -145,7 +145,7 @@ var init_util = __esm(() => {
|
|
|
145
145
|
]);
|
|
146
146
|
});
|
|
147
147
|
|
|
148
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
148
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
149
149
|
var ZodIssueCode, quotelessJson = (obj) => {
|
|
150
150
|
const json = JSON.stringify(obj, null, 2);
|
|
151
151
|
return json.replace(/"([^"]+)":/g, "$1:");
|
|
@@ -266,7 +266,7 @@ var init_ZodError = __esm(() => {
|
|
|
266
266
|
};
|
|
267
267
|
});
|
|
268
268
|
|
|
269
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
269
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
270
270
|
var errorMap = (issue, _ctx) => {
|
|
271
271
|
let message;
|
|
272
272
|
switch (issue.code) {
|
|
@@ -373,7 +373,7 @@ var init_en = __esm(() => {
|
|
|
373
373
|
en_default = errorMap;
|
|
374
374
|
});
|
|
375
375
|
|
|
376
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
376
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
377
377
|
function setErrorMap(map) {
|
|
378
378
|
overrideErrorMap = map;
|
|
379
379
|
}
|
|
@@ -386,7 +386,7 @@ var init_errors = __esm(() => {
|
|
|
386
386
|
overrideErrorMap = en_default;
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
389
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
390
390
|
function addIssueToContext(ctx, issueData) {
|
|
391
391
|
const overrideMap = getErrorMap();
|
|
392
392
|
const issue = makeIssue({
|
|
@@ -491,10 +491,10 @@ var init_parseUtil = __esm(() => {
|
|
|
491
491
|
});
|
|
492
492
|
});
|
|
493
493
|
|
|
494
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js
|
|
494
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js
|
|
495
495
|
var init_typeAliases = () => {};
|
|
496
496
|
|
|
497
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
497
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
498
498
|
var errorUtil;
|
|
499
499
|
var init_errorUtil = __esm(() => {
|
|
500
500
|
(function(errorUtil2) {
|
|
@@ -503,7 +503,7 @@ var init_errorUtil = __esm(() => {
|
|
|
503
503
|
})(errorUtil || (errorUtil = {}));
|
|
504
504
|
});
|
|
505
505
|
|
|
506
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
506
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
507
507
|
class ParseInputLazyPath {
|
|
508
508
|
constructor(parent, value, path, key) {
|
|
509
509
|
this._cachedPath = [];
|
|
@@ -3854,7 +3854,7 @@ var init_types = __esm(() => {
|
|
|
3854
3854
|
NEVER = INVALID;
|
|
3855
3855
|
});
|
|
3856
3856
|
|
|
3857
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
3857
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
3858
3858
|
var exports_external = {};
|
|
3859
3859
|
__export(exports_external, {
|
|
3860
3860
|
void: () => voidType,
|
|
@@ -3974,7 +3974,7 @@ var init_external = __esm(() => {
|
|
|
3974
3974
|
init_ZodError();
|
|
3975
3975
|
});
|
|
3976
3976
|
|
|
3977
|
-
// node_modules/.bun/zod@3.25.76/node_modules/zod/index.js
|
|
3977
|
+
// ../switchroom/node_modules/.bun/zod@3.25.76/node_modules/zod/index.js
|
|
3978
3978
|
var init_zod = __esm(() => {
|
|
3979
3979
|
init_external();
|
|
3980
3980
|
init_external();
|
|
@@ -4218,6 +4218,14 @@ import { existsSync } from "node:fs";
|
|
|
4218
4218
|
import { homedir } from "node:os";
|
|
4219
4219
|
import { randomUUID } from "node:crypto";
|
|
4220
4220
|
import { join } from "node:path";
|
|
4221
|
+
function reviveDate(v) {
|
|
4222
|
+
if (v == null)
|
|
4223
|
+
return null;
|
|
4224
|
+
if (v instanceof Date)
|
|
4225
|
+
return Number.isNaN(v.getTime()) ? null : v;
|
|
4226
|
+
const d = new Date(v);
|
|
4227
|
+
return Number.isNaN(d.getTime()) ? null : d;
|
|
4228
|
+
}
|
|
4221
4229
|
function operatorSocketPath(home = homedir()) {
|
|
4222
4230
|
return join(home, ".switchroom", "state", "auth-broker-operator", "sock");
|
|
4223
4231
|
}
|
|
@@ -4293,7 +4301,14 @@ class AuthBrokerClient {
|
|
|
4293
4301
|
accounts: [...accounts],
|
|
4294
4302
|
...timeoutMs !== undefined ? { timeoutMs } : {}
|
|
4295
4303
|
});
|
|
4296
|
-
|
|
4304
|
+
const parsed = data;
|
|
4305
|
+
for (const entry of parsed.results) {
|
|
4306
|
+
if (entry.result.ok) {
|
|
4307
|
+
entry.result.data.fiveHourResetAt = reviveDate(entry.result.data.fiveHourResetAt);
|
|
4308
|
+
entry.result.data.sevenDayResetAt = reviveDate(entry.result.data.sevenDayResetAt);
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
4311
|
+
return parsed;
|
|
4297
4312
|
}
|
|
4298
4313
|
async setActive(account) {
|
|
4299
4314
|
const data = await this.send({
|