switchroom 0.19.1 → 0.19.3
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/dist/agent-scheduler/index.js +31 -1
- package/dist/auth-broker/index.js +565 -48
- package/dist/cli/autoaccept-poll.js +31 -1
- package/dist/cli/drive-write-pretool.mjs +32 -2
- package/dist/cli/ms-365-write-pretool.mjs +32 -2
- package/dist/cli/switchroom.js +1148 -274
- package/dist/host-control/main.js +3 -3
- package/dist/vault/approvals/kernel-server.js +2 -2
- package/dist/vault/broker/server.js +2 -2
- package/package.json +3 -2
- package/profiles/_base/start.sh.hbs +1 -0
- package/profiles/default/CLAUDE.md.hbs +8 -0
- package/skills/mental-model-curator/SKILL.md +68 -2
- package/skills/switchroom-cli/SKILL.md +25 -0
- package/telegram-plugin/auth-snapshot-format.ts +143 -12
- package/telegram-plugin/dist/bridge/bridge.js +8 -2
- package/telegram-plugin/dist/gateway/gateway.js +1427 -689
- package/telegram-plugin/dist/server.js +8 -2
- package/telegram-plugin/external-spend.ts +135 -0
- package/telegram-plugin/flushed-turn-supersede.ts +117 -13
- package/telegram-plugin/gateway/auth-add-flow.ts +215 -6
- package/telegram-plugin/gateway/auth-command.ts +138 -5
- package/telegram-plugin/gateway/gateway.ts +141 -158
- package/telegram-plugin/gateway/inbound-interceptors.ts +13 -3
- package/telegram-plugin/gateway/model-command.ts +309 -1
- package/telegram-plugin/gateway/narrative-lane.ts +23 -9
- package/telegram-plugin/gateway/outbound-send-path.ts +68 -15
- package/telegram-plugin/gateway/session-model-source.ts +90 -10
- package/telegram-plugin/gateway/status-pin-store.ts +64 -4
- package/telegram-plugin/gateway/stream-render.ts +22 -5
- package/telegram-plugin/gateway/usage-mask.ts +29 -0
- package/telegram-plugin/hooks/subagent-tracker-pretool.mjs +19 -2
- package/telegram-plugin/quota-bar-format.ts +78 -12
- package/telegram-plugin/quota-check.ts +17 -2
- package/telegram-plugin/reply-owner-resolve.ts +76 -11
- package/telegram-plugin/session-tail.ts +27 -3
- package/telegram-plugin/tests/activity-card-wiring.test.ts +47 -0
- package/telegram-plugin/tests/auth-add-flow.test.ts +367 -5
- package/telegram-plugin/tests/auth-snapshot-format.test.ts +41 -0
- package/telegram-plugin/tests/external-spend.test.ts +168 -0
- package/telegram-plugin/tests/flushed-turn-supersede.test.ts +117 -0
- package/telegram-plugin/tests/gateway-session-model-relaunch.test.ts +219 -29
- package/telegram-plugin/tests/model-command.test.ts +220 -0
- package/telegram-plugin/tests/quota-bar-format.test.ts +43 -0
- package/telegram-plugin/tests/quota-check.test.ts +57 -0
- package/telegram-plugin/tests/reply-owner-resolve.test.ts +257 -13
- package/telegram-plugin/tests/send-reply-golden.test.ts +154 -0
- package/telegram-plugin/tests/session-model-source.test.ts +142 -0
- package/telegram-plugin/tests/session-tail-first-attach.test.ts +115 -2
- package/telegram-plugin/tests/status-pin-store.test.ts +198 -0
- package/telegram-plugin/tests/subagent-tracker-hooks.test.ts +50 -0
- package/telegram-plugin/tests/usage-footer-freshness.test.ts +141 -0
- package/telegram-plugin/tests/usage-mask.test.ts +35 -0
- package/telegram-plugin/tests/worker-feed-dispatch.test.ts +27 -0
- package/telegram-plugin/tests/worker-feed-pin-persistence.test.ts +131 -1
- package/vendor/hindsight-memory/CHANGELOG.md +102 -0
- package/vendor/hindsight-memory/README.md +2 -1
- package/vendor/hindsight-memory/hooks/hooks.json +12 -0
- package/vendor/hindsight-memory/scripts/directive_verify.py +100 -3
- package/vendor/hindsight-memory/scripts/lib/config.py +150 -1
- package/vendor/hindsight-memory/scripts/lib/content.py +55 -5
- package/vendor/hindsight-memory/scripts/lib/directives.py +152 -15
- package/vendor/hindsight-memory/scripts/lib/parallel_recall.py +142 -0
- package/vendor/hindsight-memory/scripts/lib/state.py +31 -0
- package/vendor/hindsight-memory/scripts/recall.py +789 -143
- package/vendor/hindsight-memory/scripts/reconcile_tail.py +22 -1
- package/vendor/hindsight-memory/scripts/retain.py +71 -2
- package/vendor/hindsight-memory/scripts/subagent_retain.py +501 -0
- package/vendor/hindsight-memory/scripts/tests/test_directive_verify.py +169 -0
- package/vendor/hindsight-memory/scripts/tests/test_directives.py +177 -0
- package/vendor/hindsight-memory/scripts/tests/test_lesson_tagging.py +200 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_context_turns_default.py +200 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_envelope_strip_telemetry.py +477 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_integration.py +51 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_parallel_deadline.py +409 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_tag_weights.py +96 -0
- package/vendor/hindsight-memory/scripts/tests/test_recall_transcript_fallback.py +413 -0
- package/vendor/hindsight-memory/scripts/tests/test_reconcile_durability.py +49 -0
- package/vendor/hindsight-memory/scripts/tests/test_subagent_retain.py +439 -0
- package/vendor/hindsight-memory/settings.json +3 -1
|
@@ -13914,6 +13914,12 @@ var ClaimNotificationRequestSchema = exports_external.object({
|
|
|
13914
13914
|
key: exports_external.string().min(1).max(512),
|
|
13915
13915
|
windowMs: exports_external.number().int().positive().max(86400000)
|
|
13916
13916
|
});
|
|
13917
|
+
var GetExternalSpendRequestSchema = exports_external.object({
|
|
13918
|
+
v: exports_external.literal(PROTOCOL_VERSION),
|
|
13919
|
+
op: exports_external.literal("get-external-spend"),
|
|
13920
|
+
id: exports_external.string().min(1),
|
|
13921
|
+
forceLive: exports_external.boolean().optional()
|
|
13922
|
+
});
|
|
13917
13923
|
var RequestSchema2 = exports_external.discriminatedUnion("op", [
|
|
13918
13924
|
GetCredentialsRequestSchema,
|
|
13919
13925
|
ListStateRequestSchema,
|
|
@@ -13927,7 +13933,8 @@ var RequestSchema2 = exports_external.discriminatedUnion("op", [
|
|
|
13927
13933
|
ListGoogleAccountsRequestSchema,
|
|
13928
13934
|
ListMicrosoftAccountsRequestSchema,
|
|
13929
13935
|
ProbeQuotaRequestSchema,
|
|
13930
|
-
ClaimNotificationRequestSchema
|
|
13936
|
+
ClaimNotificationRequestSchema,
|
|
13937
|
+
GetExternalSpendRequestSchema
|
|
13931
13938
|
]);
|
|
13932
13939
|
var GetCredentialsDataSchema = exports_external.object({
|
|
13933
13940
|
account: exports_external.string(),
|
|
@@ -13938,6 +13945,8 @@ var AccountStateSchema = exports_external.object({
|
|
|
13938
13945
|
label: exports_external.string(),
|
|
13939
13946
|
expiresAt: exports_external.number().optional(),
|
|
13940
13947
|
exhausted: exports_external.boolean(),
|
|
13948
|
+
in_service: exports_external.boolean().optional(),
|
|
13949
|
+
entitlement_blocked: exports_external.boolean().optional(),
|
|
13941
13950
|
exhausted_until: exports_external.number().optional(),
|
|
13942
13951
|
throttled_until: exports_external.number().optional(),
|
|
13943
13952
|
threshold_violations: exports_external.number().int().nonnegative().optional(),
|
|
@@ -13994,6 +14003,18 @@ var SetOverrideDataSchema = exports_external.object({
|
|
|
13994
14003
|
var ClaimNotificationDataSchema = exports_external.object({
|
|
13995
14004
|
granted: exports_external.boolean()
|
|
13996
14005
|
});
|
|
14006
|
+
var GetExternalSpendDataSchema = exports_external.object({
|
|
14007
|
+
available: exports_external.boolean(),
|
|
14008
|
+
day24hUsd: exports_external.number().optional(),
|
|
14009
|
+
day7dUsd: exports_external.number().optional(),
|
|
14010
|
+
top: exports_external.array(exports_external.object({
|
|
14011
|
+
label: exports_external.string(),
|
|
14012
|
+
usd: exports_external.number()
|
|
14013
|
+
})).optional(),
|
|
14014
|
+
capturedAtMs: exports_external.number().int().nonnegative().optional(),
|
|
14015
|
+
served: exports_external.enum(["live", "cache"]).optional(),
|
|
14016
|
+
reason: exports_external.string().optional()
|
|
14017
|
+
});
|
|
13997
14018
|
var GoogleAccountStateSchema = exports_external.object({
|
|
13998
14019
|
account: exports_external.string(),
|
|
13999
14020
|
expiresAt: exports_external.number(),
|
|
@@ -14191,6 +14212,15 @@ class AuthBrokerClient {
|
|
|
14191
14212
|
}
|
|
14192
14213
|
return parsed;
|
|
14193
14214
|
}
|
|
14215
|
+
async getExternalSpend(forceLive) {
|
|
14216
|
+
const data = await this.send({
|
|
14217
|
+
v: PROTOCOL_VERSION,
|
|
14218
|
+
id: randomUUID(),
|
|
14219
|
+
op: "get-external-spend",
|
|
14220
|
+
...forceLive ? { forceLive: true } : {}
|
|
14221
|
+
});
|
|
14222
|
+
return data;
|
|
14223
|
+
}
|
|
14194
14224
|
async setActive(account) {
|
|
14195
14225
|
const data = await this.send({
|
|
14196
14226
|
v: PROTOCOL_VERSION,
|