switchroom 0.19.0 → 0.19.2
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 +29 -1
- package/dist/auth-broker/index.js +552 -48
- package/dist/cli/autoaccept-poll.js +29 -1
- package/dist/cli/drive-write-pretool.mjs +30 -2
- package/dist/cli/ms-365-write-pretool.mjs +30 -2
- package/dist/cli/switchroom.js +751 -36
- 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/skills/switchroom-cli/SKILL.md +25 -0
- package/telegram-plugin/auth-snapshot-format.ts +39 -0
- package/telegram-plugin/dist/gateway/gateway.js +363 -25
- package/telegram-plugin/external-spend.ts +135 -0
- package/telegram-plugin/gateway/gateway.ts +83 -67
- package/telegram-plugin/gateway/model-command.ts +106 -0
- package/telegram-plugin/gateway/narrative-lane.ts +23 -9
- package/telegram-plugin/gateway/status-pin-store.ts +64 -4
- 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 +18 -0
- package/telegram-plugin/quota-check.ts +17 -2
- package/telegram-plugin/tests/activity-card-wiring.test.ts +47 -0
- package/telegram-plugin/tests/external-spend.test.ts +168 -0
- package/telegram-plugin/tests/gateway-session-model-relaunch.test.ts +57 -23
- 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/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
|
@@ -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(),
|
|
@@ -13994,6 +14001,18 @@ var SetOverrideDataSchema = exports_external.object({
|
|
|
13994
14001
|
var ClaimNotificationDataSchema = exports_external.object({
|
|
13995
14002
|
granted: exports_external.boolean()
|
|
13996
14003
|
});
|
|
14004
|
+
var GetExternalSpendDataSchema = exports_external.object({
|
|
14005
|
+
available: exports_external.boolean(),
|
|
14006
|
+
day24hUsd: exports_external.number().optional(),
|
|
14007
|
+
day7dUsd: exports_external.number().optional(),
|
|
14008
|
+
top: exports_external.array(exports_external.object({
|
|
14009
|
+
label: exports_external.string(),
|
|
14010
|
+
usd: exports_external.number()
|
|
14011
|
+
})).optional(),
|
|
14012
|
+
capturedAtMs: exports_external.number().int().nonnegative().optional(),
|
|
14013
|
+
served: exports_external.enum(["live", "cache"]).optional(),
|
|
14014
|
+
reason: exports_external.string().optional()
|
|
14015
|
+
});
|
|
13997
14016
|
var GoogleAccountStateSchema = exports_external.object({
|
|
13998
14017
|
account: exports_external.string(),
|
|
13999
14018
|
expiresAt: exports_external.number(),
|
|
@@ -14191,6 +14210,15 @@ class AuthBrokerClient {
|
|
|
14191
14210
|
}
|
|
14192
14211
|
return parsed;
|
|
14193
14212
|
}
|
|
14213
|
+
async getExternalSpend(forceLive) {
|
|
14214
|
+
const data = await this.send({
|
|
14215
|
+
v: PROTOCOL_VERSION,
|
|
14216
|
+
id: randomUUID(),
|
|
14217
|
+
op: "get-external-spend",
|
|
14218
|
+
...forceLive ? { forceLive: true } : {}
|
|
14219
|
+
});
|
|
14220
|
+
return data;
|
|
14221
|
+
}
|
|
14194
14222
|
async setActive(account) {
|
|
14195
14223
|
const data = await this.send({
|
|
14196
14224
|
v: PROTOCOL_VERSION,
|