@rubytech/create-maxy-code 0.1.550 → 0.1.552
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/package.json +1 -1
- package/payload/platform/lib/agent-dispatch-rule/dist/index.d.ts +22 -8
- package/payload/platform/lib/agent-dispatch-rule/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/agent-dispatch-rule/dist/index.js +47 -13
- package/payload/platform/lib/agent-dispatch-rule/dist/index.js.map +1 -1
- package/payload/platform/lib/agent-dispatch-rule/src/__tests__/rule.test.ts +68 -9
- package/payload/platform/lib/agent-dispatch-rule/src/index.ts +60 -16
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +3 -3
- package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +9 -0
- package/payload/platform/plugins/docs/references/admin-ui.md +2 -2
- package/payload/platform/plugins/scheduling/PLUGIN.md +4 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js +62 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/agent-dispatch.test.js +2 -2
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/agent-dispatch.test.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.js +2 -2
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/connector-sync-provision.test.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-audits.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-audits.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-audits.test.js +128 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate-audits.test.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.js +135 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/gate.test.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.js +21 -8
- package/payload/platform/plugins/scheduling/mcp/dist/lib/connector-sync-provision.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.d.ts +92 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.js +185 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/gate.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.d.ts +8 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/routine-run.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/schedule-audit.d.ts +49 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/schedule-audit.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/schedule-audit.js +165 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/schedule-audit.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.js +146 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/gate-dispatch-wiring.test.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts +27 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js +18 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +106 -64
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.js +218 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-gate-write.test.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.js +291 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/scheduling-gate.test.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.d.ts +31 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js +44 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.d.ts +3 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js +57 -3
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.d.ts +148 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.js +410 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/scheduling-gate.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/package.json +1 -0
- package/payload/platform/plugins/telegram/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/telegram/PLUGIN.md +6 -4
- package/payload/platform/plugins/telegram/mcp/dist/index.js +62 -38
- package/payload/platform/plugins/telegram/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-token.d.ts +18 -5
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-token.d.ts.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-token.js +34 -6
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-token.js.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-write.d.ts +25 -8
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-write.d.ts.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-write.js +28 -16
- package/payload/platform/plugins/telegram/mcp/dist/lib/account-write.js.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/agent-active.d.ts +12 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/agent-active.d.ts.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/agent-active.js +26 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/agent-active.js.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/secret-path.d.ts +16 -13
- package/payload/platform/plugins/telegram/mcp/dist/lib/secret-path.d.ts.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/secret-path.js +19 -23
- package/payload/platform/plugins/telegram/mcp/dist/lib/secret-path.js.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/webhook-url.d.ts +9 -7
- package/payload/platform/plugins/telegram/mcp/dist/lib/webhook-url.d.ts.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/lib/webhook-url.js +11 -8
- package/payload/platform/plugins/telegram/mcp/dist/lib/webhook-url.js.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts +4 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts.map +1 -1
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.js +13 -3
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.js.map +1 -1
- package/payload/platform/plugins/telegram/references/setup-guide.md +16 -8
- package/payload/platform/plugins/telegram/skills/configure/SKILL.md +30 -32
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +51 -4
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-census.js +60 -10
- package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts +64 -1
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js +189 -6
- package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js.map +1 -1
- package/payload/server/server.js +510 -240
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
export declare function configDirName(): string;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
2
|
+
/** The directory holding one secret file per registered bot. Created mode 700
|
|
3
|
+
* by the register tool; the secrets themselves are 600. */
|
|
4
|
+
export declare function telegramSecretsDir(): string;
|
|
5
|
+
/** Task 2368 — the webhook secret path, keyed on the bot's own Telegram id.
|
|
4
6
|
*
|
|
5
|
-
* Task 2365
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
7
|
+
* Task 2365 keyed on (account, botType), which cannot express N bots in one
|
|
8
|
+
* account: a second admin bot in one account would overwrite the first's
|
|
9
|
+
* secret and break it with no signal. The bot id can, and it is the same
|
|
10
|
+
* value the registered URL names, so the file and the URL cannot disagree.
|
|
11
|
+
* The reader (platform/ui/server/routes/telegram.ts secretPath) builds the
|
|
12
|
+
* same string; the duplication across the plugin/platform boundary is
|
|
13
|
+
* deliberate and ui/server/__tests__/telegram-secret-path.test.ts asserts the
|
|
14
|
+
* two agree.
|
|
15
|
+
*
|
|
16
|
+
* `botId` is digits by construction (botIdFromToken rejects anything else), so
|
|
17
|
+
* it cannot contribute a traversal. */
|
|
18
|
+
export declare function resolveSecretFilePath(botId: string): string;
|
|
16
19
|
//# sourceMappingURL=secret-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-path.d.ts","sourceRoot":"","sources":["../../src/lib/secret-path.ts"],"names":[],"mappings":"AAYA,wBAAgB,aAAa,IAAI,MAAM,CAWtC;AAED
|
|
1
|
+
{"version":3,"file":"secret-path.d.ts","sourceRoot":"","sources":["../../src/lib/secret-path.ts"],"names":[],"mappings":"AAYA,wBAAgB,aAAa,IAAI,MAAM,CAWtC;AAED;4DAC4D;AAC5D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;;;;;;;wCAYwC;AACxC,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -22,29 +22,25 @@ export function configDirName() {
|
|
|
22
22
|
}
|
|
23
23
|
return ".maxy";
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* per bot type, so a second account registering an admin bot overwrote the
|
|
30
|
-
* first account's secret and broke it with no signal. The reader
|
|
31
|
-
* (platform/ui/server/routes/telegram.ts secretPath) builds the same string;
|
|
32
|
-
* the duplication across the plugin/platform boundary is deliberate and
|
|
33
|
-
* ui/server/__tests__/telegram-secret-path.test.ts asserts the two agree. */
|
|
34
|
-
export function resolveSecretFilePath(botType, accountId) {
|
|
35
|
-
const maxyDir = resolve(homedir(), configDirName());
|
|
36
|
-
const stem = botType === "admin"
|
|
37
|
-
? ".telegram-admin-webhook-secret"
|
|
38
|
-
: ".telegram-webhook-secret";
|
|
39
|
-
return resolve(maxyDir, `${stem}.${accountId}`);
|
|
25
|
+
/** The directory holding one secret file per registered bot. Created mode 700
|
|
26
|
+
* by the register tool; the secrets themselves are 600. */
|
|
27
|
+
export function telegramSecretsDir() {
|
|
28
|
+
return resolve(homedir(), configDirName(), "telegram-secrets");
|
|
40
29
|
}
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
/** Task 2368 — the webhook secret path, keyed on the bot's own Telegram id.
|
|
31
|
+
*
|
|
32
|
+
* Task 2365 keyed on (account, botType), which cannot express N bots in one
|
|
33
|
+
* account: a second admin bot in one account would overwrite the first's
|
|
34
|
+
* secret and break it with no signal. The bot id can, and it is the same
|
|
35
|
+
* value the registered URL names, so the file and the URL cannot disagree.
|
|
36
|
+
* The reader (platform/ui/server/routes/telegram.ts secretPath) builds the
|
|
37
|
+
* same string; the duplication across the plugin/platform boundary is
|
|
38
|
+
* deliberate and ui/server/__tests__/telegram-secret-path.test.ts asserts the
|
|
39
|
+
* two agree.
|
|
40
|
+
*
|
|
41
|
+
* `botId` is digits by construction (botIdFromToken rejects anything else), so
|
|
42
|
+
* it cannot contribute a traversal. */
|
|
43
|
+
export function resolveSecretFilePath(botId) {
|
|
44
|
+
return resolve(telegramSecretsDir(), botId);
|
|
49
45
|
}
|
|
50
46
|
//# sourceMappingURL=secret-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-path.js","sourceRoot":"","sources":["../../src/lib/secret-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,2EAA2E;AAC3E,uEAAuE;AACvE,mCAAmC;AACnC,EAAE;AACF,wDAAwD;AACxD,6EAA6E;AAC7E,0EAA0E;AAC1E,kEAAkE;AAClE,MAAM,UAAU,aAAa;IAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC/C,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,CAAC;YAC3E,CAAC;YAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"secret-path.js","sourceRoot":"","sources":["../../src/lib/secret-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,2EAA2E;AAC3E,uEAAuE;AACvE,mCAAmC;AACnC,EAAE;AACF,wDAAwD;AACxD,6EAA6E;AAC7E,0EAA0E;AAC1E,kEAAkE;AAClE,MAAM,UAAU,aAAa;IAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC/C,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,OAAO,CAAC;YAC3E,CAAC;YAAC,MAAM,CAAC,CAAC,wBAAwB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;4DAC4D;AAC5D,MAAM,UAAU,kBAAkB;IAChC,OAAO,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,kBAAkB,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;wCAYwC;AACxC,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,OAAO,OAAO,CAAC,kBAAkB,EAAE,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
/** Task
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* is overwritten
|
|
6
|
-
*
|
|
7
|
-
|
|
1
|
+
/** Task 2368 — stamp the bot's own id onto the webhook URL.
|
|
2
|
+
*
|
|
3
|
+
* It supersedes Task 2365's `account=`: a bot id already determines its
|
|
4
|
+
* account, and carrying both would be two authorities for one fact. Any `bot`
|
|
5
|
+
* the caller supplied is overwritten and any `account` is removed — the token
|
|
6
|
+
* this registration carries is the only authority on which bot it is for, and
|
|
7
|
+
* an operator transcribing either from a skill file is the failure mode this
|
|
8
|
+
* builder exists to remove. */
|
|
9
|
+
export declare function buildWebhookUrl(webhookUrl: string, botId: string): string;
|
|
8
10
|
//# sourceMappingURL=webhook-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-url.d.ts","sourceRoot":"","sources":["../../src/lib/webhook-url.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"webhook-url.d.ts","sourceRoot":"","sources":["../../src/lib/webhook-url.ts"],"names":[],"mappings":"AAAA;;;;;;;gCAOgC;AAChC,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKzE"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
/** Task
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* is overwritten
|
|
6
|
-
*
|
|
7
|
-
|
|
1
|
+
/** Task 2368 — stamp the bot's own id onto the webhook URL.
|
|
2
|
+
*
|
|
3
|
+
* It supersedes Task 2365's `account=`: a bot id already determines its
|
|
4
|
+
* account, and carrying both would be two authorities for one fact. Any `bot`
|
|
5
|
+
* the caller supplied is overwritten and any `account` is removed — the token
|
|
6
|
+
* this registration carries is the only authority on which bot it is for, and
|
|
7
|
+
* an operator transcribing either from a skill file is the failure mode this
|
|
8
|
+
* builder exists to remove. */
|
|
9
|
+
export function buildWebhookUrl(webhookUrl, botId) {
|
|
8
10
|
const u = new URL(webhookUrl);
|
|
9
|
-
u.searchParams.
|
|
11
|
+
u.searchParams.delete("account");
|
|
12
|
+
u.searchParams.set("bot", botId);
|
|
10
13
|
return u.toString();
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=webhook-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-url.js","sourceRoot":"","sources":["../../src/lib/webhook-url.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"webhook-url.js","sourceRoot":"","sources":["../../src/lib/webhook-url.ts"],"names":[],"mappings":"AAAA;;;;;;;gCAOgC;AAChC,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,KAAa;IAC/D,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
interface MessageParams {
|
|
2
2
|
channel: "telegram";
|
|
3
|
+
/** Task 2368 — which registered bot to send as. An account holds N bots, each
|
|
4
|
+
* with its own token, so "the account's token" is no longer a thing that can
|
|
5
|
+
* be resolved without naming one. */
|
|
6
|
+
botId: string;
|
|
3
7
|
chatId: string | number;
|
|
4
8
|
text: string;
|
|
5
9
|
parseMode?: "HTML" | "Markdown" | "MarkdownV2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/tools/message.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CACpB,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAC7D,CAAC;CACH;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/tools/message.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB;;0CAEsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CACpB,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAC7D,CAAC;CACH;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAiD3E"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { sendMessage } from "../lib/telegram.js";
|
|
2
|
-
import { resolveBotToken } from "../lib/account-token.js";
|
|
2
|
+
import { resolveBotToken, listRegisteredBots } from "../lib/account-token.js";
|
|
3
3
|
export async function message(params) {
|
|
4
4
|
const platformRoot = process.env.PLATFORM_ROOT;
|
|
5
5
|
const accountId = process.env.ACCOUNT_ID;
|
|
6
|
-
const botToken = platformRoot && accountId ? resolveBotToken(platformRoot, accountId) : null;
|
|
6
|
+
const botToken = platformRoot && accountId ? resolveBotToken(platformRoot, accountId, params.botId) : null;
|
|
7
7
|
if (!botToken) {
|
|
8
|
+
// Task 2368 — an account holds N bots and nothing else surfaces their ids to
|
|
9
|
+
// an agent, so the refusal enumerates them rather than failing opaquely. A
|
|
10
|
+
// caller that named the wrong bot, or guessed, gets the right answer here and
|
|
11
|
+
// succeeds on its next call. It never picks one: which bot a message goes out
|
|
12
|
+
// on is the caller's decision, and choosing would put a stranger's message on
|
|
13
|
+
// the operator's own bot.
|
|
14
|
+
const registered = platformRoot && accountId ? listRegisteredBots(platformRoot, accountId) : [];
|
|
15
|
+
const known = registered.length === 0
|
|
16
|
+
? "This account has no Telegram bot registered — run telegram:configure first."
|
|
17
|
+
: `This account's registered bots: ${registered.map((b) => `${b.id} (${b.role}${b.agent ? `, ${b.agent}` : ""})`).join("; ")}.`;
|
|
8
18
|
return {
|
|
9
19
|
sent: false,
|
|
10
20
|
channel: params.channel,
|
|
11
|
-
error:
|
|
21
|
+
error: `No Telegram bot "${params.botId}" is registered on this account. ${known}`,
|
|
12
22
|
};
|
|
13
23
|
}
|
|
14
24
|
let replyMarkup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/tools/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA+B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/tools/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA+B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAuB9E,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,MAAqB;IACjD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACzC,MAAM,QAAQ,GACZ,YAAY,IAAI,SAAS,CAAC,CAAC,CAAC,eAA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ACF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE;QACzC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,EAAE;QACf,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -15,22 +15,30 @@ Setup happens entirely in the admin chat — there is no settings page to click
|
|
|
15
15
|
1. Tell the admin agent: "I want to connect a Telegram bot." The agent runs the `telegram:configure` skill.
|
|
16
16
|
2. Paste the bot token from BotFather when the agent asks.
|
|
17
17
|
3. Tell the agent whether this is an **admin bot** or a **public bot** (see below).
|
|
18
|
-
4. For an admin bot, give the agent the numeric Telegram user IDs that should have admin access. For a public bot, choose a DM policy (who can message it) and, for a whitelist, the allowed numeric IDs.
|
|
19
|
-
5. The agent verifies the token, registers the webhook on the brand's edge path, stores the
|
|
20
|
-
6. The agent confirms the bot is connected. Message the bot; the reply comes back from the agent.
|
|
18
|
+
4. For an admin bot, give the agent the numeric Telegram user IDs that should have admin access. For a public bot, choose which of your agents answers on it, a DM policy (who can message it), and, for a whitelist, the allowed numeric IDs.
|
|
19
|
+
5. The agent verifies the token, registers the webhook on the brand's edge path, and stores the bot under the brand install.
|
|
20
|
+
6. The agent confirms the bot is connected. Message the bot; the reply comes back from the agent you chose.
|
|
21
21
|
|
|
22
22
|
The token is stored in your account config under the brand install (never in a shared `~/.claude` directory), and the webhook is registered on the `/api/telegram/` path the brand's edge admits.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## How Many Bots You Can Have
|
|
25
|
+
|
|
26
|
+
As many as you like. Your account holds a list of bots, and each one is its own thing: its own token, its own role, its own list of who may message it, and — for a public bot — its own agent. Adding, re-pointing or removing one bot never touches another, in your account or anyone else's.
|
|
27
|
+
|
|
28
|
+
Each bot is identified by its own Telegram id, which is the part of the token before the colon. The agent reads it off the token you paste, puts it on the registered address for you, and gives that bot its own secret file. You never type it.
|
|
29
|
+
|
|
30
|
+
Two people talking to two of your bots are two separate conversations, and so are one person talking to two of them: each bot keeps its own thread with each person.
|
|
31
|
+
|
|
32
|
+
If you connected a bot before this changed, it stops delivering until you run the setup once more. The agent can tell you which ones from the standing check.
|
|
25
33
|
|
|
26
34
|
## Admin Bot vs Public Bot
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
Every bot is one or the other, and you say which when you set it up. It is not worked out from anything else.
|
|
29
37
|
|
|
30
|
-
- **Admin bot
|
|
31
|
-
- **Public bot
|
|
38
|
+
- **Admin bot**: only the numeric Telegram IDs you listed for THAT bot can message it. Everyone else is silently denied. It answers as your admin agent, with your account's tools.
|
|
39
|
+
- **Public bot**: customer-facing. A DM policy decides who may message it, and it answers as the agent you named when you set it up. That agent has to be one of your account's active agents; if you switch the agent off later, the bot stops answering and says so rather than falling back to another one.
|
|
32
40
|
|
|
33
|
-
A common setup is two bots: one admin bot for the business owner, one public bot for customers.
|
|
41
|
+
A common setup is two bots: one admin bot for the business owner, one public bot for customers. Nothing stops you having five.
|
|
34
42
|
|
|
35
43
|
## Finding Your Telegram User ID
|
|
36
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure
|
|
3
|
-
description: Guide the user through connecting a Telegram bot entirely via the admin chat — store the BotFather token under the brand install, register the webhook on the maxy edge-admitted path, set access policy, and
|
|
3
|
+
description: Guide the user through connecting a Telegram bot entirely via the admin chat — store the BotFather token under the brand install, register the webhook on the maxy edge-admitted path, set the bot's role and access policy, and pair a public bot to one of the account's agents. An account may hold any number of bots. Complete PTY setup, no UI clicks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Configure Telegram
|
|
@@ -15,11 +15,14 @@ User says anything about connecting, linking, or setting up Telegram, BotFather,
|
|
|
15
15
|
|
|
16
16
|
A finished Telegram setup has all of these, and the skill is not done until each is true:
|
|
17
17
|
|
|
18
|
-
- The bot
|
|
19
|
-
- The webhook is registered against a URL whose path is `/api/telegram/` (the only path the maxy edge admits). The register tool refuses any other path and logs `op=webhook-register path=… account=… admitted=false` when it does.
|
|
20
|
-
- The registered URL carries `
|
|
21
|
-
-
|
|
22
|
-
-
|
|
18
|
+
- The bot is stored as one entry in `account.json`'s `telegram.bots` array (under the brand install, never `~/.claude/`). The `telegram-webhook-register` tool writes it there and logs `[telegram-setup] op=token-write dir=… brand=…`.
|
|
19
|
+
- The webhook is registered against a URL whose path is `/api/telegram/` (the only path the maxy edge admits). The register tool refuses any other path and logs `op=webhook-register path=… botId=… account=… admitted=false` when it does.
|
|
20
|
+
- The registered URL carries `bot=<botId>`, the bot's own Telegram id. The register tool derives it from the token and appends it, so you never type it. The receiver requires it and rejects `reason=unknown-bot`; the bot id is what determines the account, so no `account=` is carried.
|
|
21
|
+
- The bot's `role` is stated, not inferred: `admin` or `public`. It selects the spawn path, so it is a privilege decision.
|
|
22
|
+
- Access policy is set **on that entry**: an admin bot carries the operator's numeric Telegram user IDs (`adminUsers`); a public bot carries a DM policy (and an allowlist when the policy is `allowlist`). Nothing is shared with the account's other bots.
|
|
23
|
+
- A public bot names the `agent` it answers as, and that agent is active. An admin bot names none: it reads `agents/admin` by construction.
|
|
24
|
+
|
|
25
|
+
An account may hold any number of bots. Registering, re-pointing or removing one never disturbs another, in any account.
|
|
23
26
|
|
|
24
27
|
## Flow
|
|
25
28
|
|
|
@@ -29,54 +32,48 @@ Read `references/setup-guide.md` (cited throughout this flow) with the `plugin-r
|
|
|
29
32
|
|
|
30
33
|
Follow `references/setup-guide.md` "Creating a Bot": the operator creates the bot via @BotFather and gives you the token (e.g. `123456:ABC-DEF…`). Confirm you have it before continuing.
|
|
31
34
|
|
|
32
|
-
### Step 2 — Decide
|
|
35
|
+
### Step 2 — Decide the role, and for a public bot its agent
|
|
36
|
+
|
|
37
|
+
Ask which role this bot serves (see `references/setup-guide.md` "Admin Bot vs Public Bot"). The role is stated by the operator, never worked out from anything else: it decides which spawn path the bot's messages take.
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
- **Admin bot** — only the numeric Telegram user IDs the operator names for THIS bot may message it; everything else is denied. Collect those IDs (`references/setup-guide.md` "Finding Your Telegram User ID"). It answers as the admin agent.
|
|
40
|
+
- **Public bot** — customer-facing; choose a DM policy (`open`, `allowlist`, or `disabled`), for `allowlist` the allowed numeric IDs, and **which of this account's agents answers on it**. Call `account-manage` to list the account's agents and let the operator pick one. The agent must be active; the register tool refuses an inactive or unknown slug.
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
- **Public bot** — customer-facing; choose a DM policy (`open`, `allowlist`, or `disabled`) and, for `allowlist`, the allowed numeric IDs.
|
|
42
|
+
The account may already hold other bots. This one is added alongside them and shares nothing with them.
|
|
38
43
|
|
|
39
44
|
### Step 3 — Build the webhook URL
|
|
40
45
|
|
|
41
|
-
The path MUST be `/api/telegram
|
|
46
|
+
The path MUST be `/api/telegram/`. Use the account's domain for the host — the admin domain for an admin bot, the public domain for a public bot (read them from `brand-settings` / the account config). Example: `https://<admin-domain>/api/telegram/`.
|
|
42
47
|
|
|
43
|
-
Do NOT add `?account=`. The register tool
|
|
48
|
+
Do NOT add `?bot=` or `?account=`. The register tool derives the bot id from the token and stamps `?bot=<botId>` on for you; the token is the only authority on which bot it is, and a value typed by hand could name a different one.
|
|
44
49
|
|
|
45
50
|
The register tool aborts on any other path, so do not invent `/channels/telegram` or similar.
|
|
46
51
|
|
|
47
|
-
### Step 4 — Register (stores
|
|
52
|
+
### Step 4 — Register (stores the entry + webhook + secret in one call)
|
|
48
53
|
|
|
49
54
|
Call `telegram-webhook-register` with:
|
|
50
55
|
- `botToken` — the BotFather token
|
|
51
56
|
- `webhookUrl` — the URL from Step 3
|
|
52
|
-
- `
|
|
57
|
+
- `role` — `admin` or `public`
|
|
53
58
|
- admin bot: `adminUsers` — the numeric IDs from Step 2
|
|
54
|
-
- public bot: `dmPolicy` and, for `allowlist`, `allowFrom`
|
|
55
|
-
|
|
56
|
-
On success the tool has: verified the token, set the webhook with a generated secret (written to the brand configDir), persisted the token + policy into `account.json`'s `telegram` block, and logged `op=token-write` + `op=webhook-register admitted=true`. If it returns an error, read it back to the operator verbatim — the common ones are a wrong path (`admitted=false`) or a token write blocked outside the brand install (`op=token-write-rejected`).
|
|
57
|
-
|
|
58
|
-
### Step 5 — Select the agent (public bot)
|
|
59
|
-
|
|
60
|
-
Public inbound routes to the account's `defaultAgent`. Set it and confirm:
|
|
61
|
-
|
|
62
|
-
1. `account-manage` to list available public agents.
|
|
63
|
-
2. `account-update` with `field: "defaultAgent"`, `value: "<slug>"`.
|
|
64
|
-
3. Re-read by calling `account-manage` (or `account-update` reports the change) and confirm `defaultAgent` is the chosen slug. The post-condition is a non-empty `defaultAgent`, not the intent to set it.
|
|
59
|
+
- public bot: `agent` — the slug from Step 2, plus `dmPolicy` and, for `allowlist`, `allowFrom`
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
On success the tool has: verified the token, derived the bot id, set the webhook with a generated secret (written to `~/.<brand>/telegram-secrets/<botId>`), persisted the entry into `account.json`'s `telegram.bots` array, and logged `op=token-write` + `op=webhook-register admitted=true`. It replaces only the entry with this bot's id, so the account's other bots are untouched. If it returns an error, read it back to the operator verbatim — the common ones are a wrong path (`admitted=false`), a public bot with no or an inactive `agent` (`op=token-write-rejected reason=no-agent|agent-inactive`), or a token write blocked outside the brand install.
|
|
67
62
|
|
|
68
|
-
### Step
|
|
63
|
+
### Step 5 — Confirm
|
|
69
64
|
|
|
70
|
-
Tell the operator the bot is connected, which role it has, and that messaging the bot now reaches the agent and a reply returns. For a public bot, name the agent that will respond.
|
|
65
|
+
Tell the operator the bot is connected, which role it has, and that messaging the bot now reaches the agent and a reply returns. For a public bot, name the agent that will respond. If the account holds other bots, say that this one is separate from them: its own people, its own agent, its own conversations.
|
|
71
66
|
|
|
72
67
|
## Failure modes (state these loudly, do not paper over)
|
|
73
68
|
|
|
74
69
|
- **Wrong webhook path** — register returns an error and logs `op=webhook-register admitted=false`. Fix the URL to use `/api/telegram/`.
|
|
75
70
|
- **Token write outside the brand** — `op=token-write-rejected reason=non-brand-path`. The MCP env is misconfigured; do not retry blindly — report it.
|
|
76
|
-
-
|
|
77
|
-
- **Bad secret on inbound** — `[telegram-inbound] op=
|
|
78
|
-
- **Bot registered before
|
|
79
|
-
- **
|
|
71
|
+
- **Paired agent switched off** — `[telegram-inbound] op=agent … active=false` then `op=reject reason=agent-inactive`, and the standing `[telegram-audit] op=entry-agent-inactive` names the bot. Re-activate that agent or re-register the bot against another. There is no fall back to a different agent: answering as an agent the operator switched off is exactly what this refusal prevents.
|
|
72
|
+
- **Bad secret on inbound** — `[telegram-inbound] op=secret … result=mismatch` means the registered secret and the stored secret diverged; re-run register.
|
|
73
|
+
- **Bot registered before the bot registry** — `[telegram-inbound] op=reject reason=unknown-bot`, and `[telegram-audit] op=configured … secretFile=absent` names it. The registered URL predates `?bot=<botId>`; re-run register once for that bot. There is no compatibility branch, so it 401s until you do. The boot converter rewrites the stored config but cannot re-point a registered webhook: that is an outbound call, and the converter makes none.
|
|
74
|
+
- **One bot id claimed by two accounts** — inbound is refused `[telegram-inbound] op=reject reason=duplicate-bot-id`, and the standing `[telegram-audit] op=duplicate-bot-id` names it every tick. Two accounts hold the same token. Remove it from the one that should not have it; nothing picks between them.
|
|
75
|
+
- **Chat id claimed by two bots** — a scheduled dispatch logs `[schedule-inject] op=telegram-destination-ambiguous … dispatched=no`. Two bots, in one account or two, list the same numeric ID in their `adminUsers`. Remove it from the one that should not have it; the dispatch refuses rather than guessing which bot the person should hear from.
|
|
76
|
+
- **A secret file with no bot, or a bot with no secret file** — `[telegram-audit] op=secret-orphan botId=… side=file|entry`. Neither shows up any other way. `side=entry` means that bot cannot receive anything until it re-registers; `side=file` is left-over state from a bot that has been removed.
|
|
80
77
|
|
|
81
78
|
## Language
|
|
82
79
|
|
|
@@ -84,3 +81,4 @@ Use plain English:
|
|
|
84
81
|
- "bot token" not "Bot API credential"
|
|
85
82
|
- "your numeric Telegram ID" not "user_id integer"
|
|
86
83
|
- "the bot is connected" not "webhook registered with secret_token"
|
|
84
|
+
- "which of your agents should answer on this bot" not "the agentSlug for the entry"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-tool-names.generated.d.ts","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAQA,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAyB7C,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"canonical-tool-names.generated.d.ts","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAQA,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAyB7C,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAkVtD,CAAA"}
|
package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js
CHANGED
|
@@ -313,6 +313,7 @@ export const CANONICAL_MAXY_TOOL_NAMES = [
|
|
|
313
313
|
"mcp__plugin_scheduling_scheduling__schedule-list",
|
|
314
314
|
"mcp__plugin_scheduling_scheduling__schedule-runs",
|
|
315
315
|
"mcp__plugin_scheduling_scheduling__schedule-update",
|
|
316
|
+
"mcp__plugin_scheduling_scheduling__scheduling-gate",
|
|
316
317
|
"mcp__plugin_scheduling_scheduling__time-resolve",
|
|
317
318
|
"mcp__plugin_storage-broker_storage-broker__storage-d1-create",
|
|
318
319
|
"mcp__plugin_storage-broker_storage-broker__storage-d1-list",
|
package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-tool-names.generated.js","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,kEAAkE;AAClE,yDAAyD;AACzD,kFAAkF;AAClF,EAAE;AACF,yEAAyE;AACzE,6DAA6D;AAE7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,OAAO;IACP,KAAK;IACL,SAAS;IACT,WAAW;IACX,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,cAAc;IACd,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,SAAS;IACT,cAAc;IACd,UAAU;IACV,MAAM;IACN,WAAW;CACZ,CAAA;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,yCAAyC;IACzC,yCAAyC;IACzC,kDAAkD;IAClD,sDAAsD;IACtD,yCAAyC;IACzC,yCAAyC;IACzC,uCAAuC;IACvC,wCAAwC;IACxC,iDAAiD;IACjD,yCAAyC;IACzC,iDAAiD;IACjD,yCAAyC;IACzC,sCAAsC;IACtC,yCAAyC;IACzC,wCAAwC;IACxC,oCAAoC;IACpC,yCAAyC;IACzC,qCAAqC;IACrC,uCAAuC;IACvC,2CAA2C;IAC3C,4CAA4C;IAC5C,uCAAuC;IACvC,uCAAuC;IACvC,sCAAsC;IACtC,qCAAqC;IACrC,uCAAuC;IACvC,yCAAyC;IACzC,4CAA4C;IAC5C,0CAA0C;IAC1C,2CAA2C;IAC3C,gDAAgD;IAChD,oCAAoC;IACpC,sCAAsC;IACtC,gDAAgD;IAChD,0CAA0C;IAC1C,uCAAuC;IACvC,0CAA0C;IAC1C,uCAAuC;IACvC,sCAAsC;IACtC,sDAAsD;IACtD,mDAAmD;IACnD,6CAA6C;IAC7C,wCA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EAAkE;IAClE,wCAAwC;IACxC,gDAAgD;IAChD,0DAA0D;IAC1D,sCAAsC;IACtC,6DAA6D;IAC7D,kEAAkE;IAClE,8DAA8D;IAC9D,oEAAoE;IACpE,0DAA0D;IAC1D,kDAAkD;IAClD,gDAAgD;IAChD,kEAAkE;IAClE,uDAAuD;IACvD,oDAAoD;IACpD,oDAAoD;IACpD,qDAAqD;IACrD,oDAAoD;IACpD,kDAAkD;IAClD,+CAA+C;IAC/C,oDAAoD;IACpD,gDAAgD;IAChD,yCAAyC;IACzC,uCAAuC;IACvC,oCAAoC;IACpC,qCAAqC;IACrC,uCAAuC;IACvC,qCAAqC;IACrC,yCAAyC;IACzC,qCAAqC;IACrC,sCAAsC;IACtC,oCAAoC;IACpC,iCAAiC;IACjC,kCAAkC;IAClC,mCAAmC;IACnC,oCAAoC;IACpC,oCAAoC;IACpC,kDAAkD;IAClD,kDAAkD;IAClD,mDAAmD;IACnD,+CAA+C;IAC/C,gDAAgD;IAChD,gDAAgD;IAChD,kDAAkD;IAClD,oDAAoD;CACrD,CAAA"}
|
|
1
|
+
{"version":3,"file":"canonical-tool-names.generated.js","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,kEAAkE;AAClE,yDAAyD;AACzD,kFAAkF;AAClF,EAAE;AACF,yEAAyE;AACzE,6DAA6D;AAE7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,OAAO;IACP,KAAK;IACL,SAAS;IACT,WAAW;IACX,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,cAAc;IACd,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,SAAS;IACT,cAAc;IACd,UAAU;IACV,MAAM;IACN,WAAW;CACZ,CAAA;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,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;IACnD,+CAA+C;IAC/C,gDAAgD;IAChD,gDAAgD;IAChD,kDAAkD;IAClD,oDAAoD;CACrD,CAAA"}
|
|
@@ -103,11 +103,23 @@ export interface PtyCensusSnapshot {
|
|
|
103
103
|
* writes this bound can compare against reality rather than its own memory
|
|
104
104
|
* of what it wrote — four co-resident brands write the one file. */
|
|
105
105
|
sliceHighKb: number | null;
|
|
106
|
+
/** Task 2382 — `claude-ptys.slice` memory.events `high` (a count), or null
|
|
107
|
+
* on the same terms as sliceKb. Not rendered on the census line. Carried
|
|
108
|
+
* for the swap tier, which reads its delta across ticks to tell an actively
|
|
109
|
+
* throttled cohort from one merely sitting near its bound. */
|
|
110
|
+
sliceHighEvents: number | null;
|
|
106
111
|
/** /proc/meminfo MemTotal (kB). */
|
|
107
112
|
sysTotalKb: number;
|
|
108
113
|
/** /proc/meminfo MemAvailable (kB). Named "avail" (not "free") because the
|
|
109
114
|
* source is MemAvailable and the rendered field is sysAvailMb. */
|
|
110
115
|
sysAvailKb: number;
|
|
116
|
+
/** Task 2382 — /proc/meminfo SwapTotal (kB). 0 means NO SWAP CONFIGURED,
|
|
117
|
+
* which the swap tier reads as "do not act", never as "swap is full". */
|
|
118
|
+
swapTotalKb: number;
|
|
119
|
+
/** Task 2382 — /proc/meminfo SwapFree (kB). Carried because sysAvailKb
|
|
120
|
+
* cannot stand in for it: zram holds the swapped pages compressed in RAM,
|
|
121
|
+
* so swap filling RAISES MemAvailable rather than lowering it. */
|
|
122
|
+
swapFreeKb: number;
|
|
111
123
|
/** /proc/sys/fs/file-nr field 1 — allocated file handles. */
|
|
112
124
|
fdOpen: number;
|
|
113
125
|
/** /proc/sys/fs/file-nr field 3 — max file handles. */
|
|
@@ -134,7 +146,40 @@ export declare function parseCgroupAnonBytes(blob: string): number | null;
|
|
|
134
146
|
* match is load-bearing: `user_usec` and `system_usec` are siblings in the
|
|
135
147
|
* same file and each is a fraction of the total, so a loose match would
|
|
136
148
|
* silently understate every session's CPU. */
|
|
149
|
+
/** The `high` line of a cgroup's memory.events, as a COUNT — not bytes, so no
|
|
150
|
+
* kB conversion. Null when absent or unparseable.
|
|
151
|
+
*
|
|
152
|
+
* Task 2382 — the kernel increments this every time it throttles an
|
|
153
|
+
* allocation because the cgroup is over memory.high. Its GROWTH is the only
|
|
154
|
+
* signal that the cohort is being actively throttled right now; the level
|
|
155
|
+
* alone says nothing, being cumulative since the slice was created. Null
|
|
156
|
+
* rather than 0 on an unreadable file, because 0 is a real value meaning
|
|
157
|
+
* "never throttled" and would read as the counter having reset. */
|
|
158
|
+
export declare function parseCgroupHighEvents(blob: string): number | null;
|
|
137
159
|
export declare function parseCgroupUsageUsec(blob: string): number | null;
|
|
160
|
+
export interface MeminfoKb {
|
|
161
|
+
sysTotalKb: number;
|
|
162
|
+
sysAvailKb: number;
|
|
163
|
+
swapTotalKb: number;
|
|
164
|
+
swapFreeKb: number;
|
|
165
|
+
}
|
|
166
|
+
/** MemTotal / MemAvailable / SwapTotal / SwapFree (kB) from a /proc/meminfo
|
|
167
|
+
* blob. Missing field → 0.
|
|
168
|
+
*
|
|
169
|
+
* Task 1709 — the fallbacks are INDEPENDENT per field: a blob that parses for
|
|
170
|
+
* MemTotal but not MemAvailable yields a positive sysTotalKb beside a
|
|
171
|
+
* sysAvailKb of 0. A consumer that reads sysAvailKb as "free RAM" must
|
|
172
|
+
* therefore treat 0 as unmeasured, not as "no free RAM" — see the guard in
|
|
173
|
+
* slice-memory-policy.ts.
|
|
174
|
+
*
|
|
175
|
+
* Task 2382 — the same holds for the swap pair, with one addition: a box with
|
|
176
|
+
* swap disabled has no SwapTotal line at all, so swapTotalKb === 0 means NO
|
|
177
|
+
* SWAP CONFIGURED, and the swap tier declines to act on it rather than
|
|
178
|
+
* dividing by it. The pair exists because MemAvailable cannot see swap
|
|
179
|
+
* exhaustion: with zram fronting the swap devices the swapped pages are held
|
|
180
|
+
* compressed IN RAM, so swap filling RAISES MemAvailable. On realagency,
|
|
181
|
+
* 2026-08-02, swap went to 10156 of 10157 MB while MemAvailable rose to 35%. */
|
|
182
|
+
export declare function parseMeminfoKb(blob: string): MeminfoKb;
|
|
138
183
|
/** One session's read outcome. Discriminated rather than a bare null so the
|
|
139
184
|
* collector can keep "the RAM went away" (gone) apart from "the RAM is still
|
|
140
185
|
* held but I could not attribute it" (unattributed) — see the counters on
|
|
@@ -168,6 +213,11 @@ export interface CensusIo {
|
|
|
168
213
|
* the live value, not against what it believes it last wrote: four
|
|
169
214
|
* co-resident brands write this one file. */
|
|
170
215
|
sliceHigh(scopeCgroup: string): number | null;
|
|
216
|
+
/** Task 2382 — claude-ptys.slice memory.events `high`: the cumulative count
|
|
217
|
+
* of throttle events. Null on the same terms as sliceMem. Read for its
|
|
218
|
+
* DELTA between ticks, never its level — the level is cumulative since the
|
|
219
|
+
* slice was created and says nothing about now. */
|
|
220
|
+
sliceHighEvents(scopeCgroup: string): number | null;
|
|
171
221
|
/** Task 1749 — the scope's cumulative CPU microseconds (cpu.stat
|
|
172
222
|
* `usage_usec`). Null when the file is absent or malformed: a scope torn
|
|
173
223
|
* down mid-tick, a host without the cpu controller enabled, or a non-Linux
|
|
@@ -177,10 +227,7 @@ export interface CensusIo {
|
|
|
177
227
|
/** Wall clock. Injected so the CPU delta arithmetic is testable without
|
|
178
228
|
* sleeping, and so `sampleAtMs` is deterministic under test. */
|
|
179
229
|
now(): number;
|
|
180
|
-
meminfoKb():
|
|
181
|
-
sysTotalKb: number;
|
|
182
|
-
sysAvailKb: number;
|
|
183
|
-
};
|
|
230
|
+
meminfoKb(): MeminfoKb;
|
|
184
231
|
fileNr(): {
|
|
185
232
|
fdOpen: number;
|
|
186
233
|
fdMax: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty-census.d.ts","sourceRoot":"","sources":["../src/pty-census.ts"],"names":[],"mappings":"AA2DA;;wCAEwC;AACxC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAED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