@rubytech/create-maxy-code 0.1.567 → 0.1.568

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.
Files changed (95) hide show
  1. package/dist/__tests__/brand-agent-root.test.js +91 -0
  2. package/dist/brand-agent-root.js +58 -0
  3. package/dist/index.js +25 -28
  4. package/package.json +1 -1
  5. package/payload/platform/plugins/admin/mcp/dist/index.js +7 -1
  6. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  7. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.d.ts +10 -1
  8. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.d.ts.map +1 -1
  9. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.js +6 -1
  10. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.js.map +1 -1
  11. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts +9 -0
  12. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts.map +1 -1
  13. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js +1 -1
  14. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js.map +1 -1
  15. package/payload/platform/plugins/admin/skills/capabilities-here/SKILL.md +1 -1
  16. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +44 -1
  17. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +7 -0
  18. package/payload/platform/plugins/docs/references/channel-wake-and-prompt.md +43 -0
  19. package/payload/platform/scripts/lib/provision-account-dir.sh +0 -2
  20. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.d.ts +19 -0
  21. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.d.ts.map +1 -0
  22. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.js +146 -0
  23. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.js.map +1 -0
  24. package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts +5 -0
  25. package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -1
  26. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +5 -5
  27. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -1
  28. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +11 -1
  29. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  30. package/payload/platform/services/claude-session-manager/dist/http-server.js +58 -12
  31. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  32. package/payload/platform/services/claude-session-manager/dist/index.js +25 -13
  33. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  34. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +6 -1
  35. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -1
  36. package/payload/platform/services/claude-session-manager/dist/pty-census.js +6 -3
  37. package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -1
  38. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +21 -8
  39. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  40. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +38 -15
  41. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  42. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +2 -0
  43. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  44. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +4 -1
  45. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  46. package/payload/platform/services/claude-session-manager/dist/reaper.d.ts +3 -0
  47. package/payload/platform/services/claude-session-manager/dist/reaper.d.ts.map +1 -1
  48. package/payload/platform/services/claude-session-manager/dist/reaper.js +2 -1
  49. package/payload/platform/services/claude-session-manager/dist/reaper.js.map +1 -1
  50. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.d.ts +2 -0
  51. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.d.ts.map +1 -1
  52. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.js +5 -2
  53. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.js.map +1 -1
  54. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts +2 -0
  55. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts.map +1 -1
  56. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js +5 -3
  57. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js.map +1 -1
  58. package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts +26 -16
  59. package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts.map +1 -1
  60. package/payload/platform/services/claude-session-manager/dist/systemd-scope.js +84 -31
  61. package/payload/platform/services/claude-session-manager/dist/systemd-scope.js.map +1 -1
  62. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.d.ts +7 -0
  63. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.d.ts.map +1 -1
  64. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.js +6 -0
  65. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.js.map +1 -1
  66. package/payload/platform/services/telegram-channel/dist/notification.d.ts +10 -2
  67. package/payload/platform/services/telegram-channel/dist/notification.d.ts.map +1 -1
  68. package/payload/platform/services/telegram-channel/dist/notification.js +15 -3
  69. package/payload/platform/services/telegram-channel/dist/notification.js.map +1 -1
  70. package/payload/platform/services/telegram-channel/dist/server.d.ts.map +1 -1
  71. package/payload/platform/services/telegram-channel/dist/server.js +35 -3
  72. package/payload/platform/services/telegram-channel/dist/server.js.map +1 -1
  73. package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts +10 -0
  74. package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts.map +1 -1
  75. package/payload/platform/services/telegram-channel/dist/turn-follow.js +38 -1
  76. package/payload/platform/services/telegram-channel/dist/turn-follow.js.map +1 -1
  77. package/payload/platform/services/webchat-channel/dist/server.d.ts.map +1 -1
  78. package/payload/platform/services/webchat-channel/dist/server.js +31 -2
  79. package/payload/platform/services/webchat-channel/dist/server.js.map +1 -1
  80. package/payload/platform/services/webchat-channel/dist/turn-follow.d.ts +10 -0
  81. package/payload/platform/services/webchat-channel/dist/turn-follow.d.ts.map +1 -1
  82. package/payload/platform/services/webchat-channel/dist/turn-follow.js +38 -1
  83. package/payload/platform/services/webchat-channel/dist/turn-follow.js.map +1 -1
  84. package/payload/platform/services/whatsapp-channel/dist/instructions.d.ts +9 -0
  85. package/payload/platform/services/whatsapp-channel/dist/instructions.d.ts.map +1 -0
  86. package/payload/platform/services/whatsapp-channel/dist/instructions.js +22 -0
  87. package/payload/platform/services/whatsapp-channel/dist/instructions.js.map +1 -0
  88. package/payload/platform/services/whatsapp-channel/dist/notification.d.ts +3 -1
  89. package/payload/platform/services/whatsapp-channel/dist/notification.d.ts.map +1 -1
  90. package/payload/platform/services/whatsapp-channel/dist/notification.js +10 -2
  91. package/payload/platform/services/whatsapp-channel/dist/notification.js.map +1 -1
  92. package/payload/platform/services/whatsapp-channel/dist/server.d.ts.map +1 -1
  93. package/payload/platform/services/whatsapp-channel/dist/server.js +26 -2
  94. package/payload/platform/services/whatsapp-channel/dist/server.js.map +1 -1
  95. package/payload/server/server.js +254 -96
@@ -1,8 +1,17 @@
1
1
  export interface RosterCensusInput {
2
2
  /** `<accountDir>/agents/admin/AGENTS.md` — the admin's routing prose. */
3
3
  agentsMdPath: string;
4
- /** `<accountDir>/specialists/agents` — the directory spawn-context reads. */
4
+ /** `<accountDir>/specialists/agents` — the source directory spawn-context
5
+ * reads for the `<specialist-domains>` prompt block, and the directory the
6
+ * registry mirrors. Not what dispatch resolves against; see `registryDir`.
7
+ * Drives `undurable` and `bundleOrphans` only. */
5
8
  specialistsAgentsDir: string;
9
+ /** Task 2460 — `<accountDir>/.claude/agents`, the one directory the CLI
10
+ * resolves a subagent name from once the brand-wide root is retired.
11
+ * `syncAccountAgentRegistry` writes it at every spawn. Required, not
12
+ * optional: a caller that omitted it would report every declared specialist
13
+ * as orphaned. */
14
+ registryDir: string;
6
15
  /** Directories whose own `*.md` files are durable copies. Today just
7
16
  * `$PLATFORM_ROOT/templates/specialists/agents`. Required, not optional:
8
17
  * a caller that omitted them would report every live specialist as
@@ -1 +1 @@
1
- {"version":3,"file":"roster-census.d.ts","sourceRoot":"","sources":["../../src/lib/roster-census.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;qBAGiB;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB;;;;4EAIwE;IACxE,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B;;qEAEiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;oEAEgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;sEAIkE;IAClE,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAyCD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CAgC5E"}
1
+ {"version":3,"file":"roster-census.d.ts","sourceRoot":"","sources":["../../src/lib/roster-census.ts"],"names":[],"mappings":"AAmCA,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB;;;uDAGmD;IACnD,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;uBAImB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB;;;qBAGiB;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB;;;;4EAIwE;IACxE,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B;;qEAEiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;oEAEgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;sEAIkE;IAClE,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAyCD,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CAqC5E"}
@@ -43,7 +43,12 @@ export function runRosterCensus(input) {
43
43
  for (const match of body.matchAll(/^- \*\*specialists:([^*]+)\*\*:/gm)) {
44
44
  declared.push(match[1]);
45
45
  }
46
- const orphaned = declared.filter((name) => !existsSync(join(input.specialistsAgentsDir, `${name}.md`)));
46
+ // Task 2460 measured against the registry, not the source directory. Those
47
+ // two disagreed on the account that filed that task: 13 authored, 12
48
+ // registered, and this line reported zero orphans three times. existsSync
49
+ // follows symlinks, so a dangling registry link reads as absent, which is
50
+ // correct — it does not resolve.
51
+ const orphaned = declared.filter((name) => !existsSync(join(input.registryDir, `${name}.md`)));
47
52
  const durable = new Set();
48
53
  for (const dir of input.durableDirs) {
49
54
  for (const filename of markdownIn(dir))
@@ -1 +1 @@
1
- {"version":3,"file":"roster-census.js","sourceRoot":"","sources":["../../src/lib/roster-census.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAsEjC;;;;uDAIuD;AACvD,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAChC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,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CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChE,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAC5C,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,KAAK,MAAM,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;IACD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAC7D,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CACrC,CAAC;IAEF,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,MAAM;QACzB,YAAY,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM;QAC/C,QAAQ;QACR,SAAS;QACT,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,iBAAiB,CAAC;KACtF,CAAC;AACJ,CAAC"}
@@ -11,7 +11,16 @@ export interface CapabilitiesHereInput {
11
11
  brandConfigPath: string;
12
12
  platformRoot: string;
13
13
  premiumPluginsRoot: string;
14
+ /** Still needed: `listConnectorsRaw` runs `claude mcp list` under it. No
15
+ * longer the source of `registeredAgentTypes`; see `agentRegistryDir`. */
14
16
  claudeConfigDir: string;
17
+ /** Task 2460 — `<accountDir>/.claude/agents`, the account's agent registry.
18
+ * `registeredAgentTypes` used to enumerate `$CLAUDE_CONFIG_DIR/agents`, the
19
+ * brand-wide root the installer wrote; that root is retired and cleared on
20
+ * upgrade, so reading it would report an empty registry on every install.
21
+ * This tool's contract is that a caller may rely on it before claiming what
22
+ * is dispatchable, so it must name the directory dispatch resolves against. */
23
+ agentRegistryDir: string;
15
24
  /** Task 1160 — returns the raw combined output of `claude mcp list` run under
16
25
  * the brand config dir. Injected by the adapter (index.ts) so this function
17
26
  * stays a pure resolver and so the subprocess never runs in unit tests. When
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities-here.d.ts","sourceRoot":"","sources":["../../src/tools/capabilities-here.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,CAAC;AAEhF,MAAM,WAAW,iBAAiB;IAChC;qFACiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;yCAKqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,4BAA4B,EAAE,MAAM,EAAE,CAAC;IACvC,2BAA2B,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,KAAK,EAAE;QACL,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,mBAAmB,EAAE,MAAM,EAAE,CA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CAAC,CAAC;IACrE,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,KAAK,EAAE;QACL,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,mBAAmB,EAAE,MAAM,EAAE,CAAC;KAC/B,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAwBlF;AAuCD,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,sBAAsB,CAAC,CAiDjC"}
@@ -101,7 +101,7 @@ export async function resolveCapabilitiesHere(input, nowIso) {
101
101
  for (const name of names)
102
102
  installedPremiumSpecialists.push({ bundle, name });
103
103
  }
104
- const registeredAgentTypes = listAgentRegistry(resolve(input.claudeConfigDir, "agents"));
104
+ const registeredAgentTypes = listAgentRegistry(input.agentRegistryDir);
105
105
  const claudeAiConnectors = await resolveClaudeAiConnectors(input.listConnectorsRaw);
106
106
  return {
107
107
  accountId: input.accountId,
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities-here.js","sourceRoot":"","sources":["../../src/tools/capabilities-here.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAqD1C,8EAA8E;AAC9E,kFAAkF;AAClF,mFAAmF;AACnF,gEAAgE;AAChE,gFAAgF;AAChF,mFAAmF;AACnF,8EAA8E;AAC9E,MAAM,UAAU,uBAAuB,CAAC,aAAqB;IAC3D,MAAM,GAAG,GAAwB,EAAE,CAAC;IACpC,KAAK,MAAM,OAAO,IAAI,aAAa,CAAC,KAAK,CAA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IAAI;QACJ,UAAU;QACV,WAAW;QACX,cAAc;QACd,4BAA4B;QAC5B,2BAA2B;QAC3B,oBAAoB;QACpB,kBAAkB;QAClB,KAAK,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE;QAC3C,UAAU,EAAE,MAAM;KACnB,CAAC;AACJ,CAAC"}
@@ -22,7 +22,7 @@ Call `mcp__plugin_admin_admin__capabilities-here` with no arguments. The tool re
22
22
  - `brand.json` for `productName` and `shipsPremiumBundles`.
23
23
  - `platform/templates/specialists/agents/` for `installedPlatformSpecialists`.
24
24
  - Each enabled premium bundle's `agents/` for `installedPremiumSpecialists`.
25
- - `$CLAUDE_CONFIG_DIR/agents/` for `registeredAgentTypes` (the same registry the Agent tool resolves against).
25
+ - `<accountDir>/.claude/agents/` for `registeredAgentTypes` (this account's agent registry, the same one the Agent tool resolves against). It is mirrored from `<accountDir>/specialists/agents/` before every spawn. The brand-wide `$CLAUDE_CONFIG_DIR/agents/` is not a registration surface and registers nothing.
26
26
 
27
27
  Returns one JSON object with those fields plus `accountId`, `capturedAt`, and the `brand` block. No LLM in the resolution path; pure disk + JSON reads.
28
28
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: platform-architecture
3
3
  description: Use when grounding any documented-surface claim about what Maxy ships — plugins, skills, specialists, install/deploy flows, internals. This is the install catalogue, not evidence of what is enabled on the current account. For install state on this account, call `capabilities-here`; for documented surface, cite the `Source:` URL inline.
4
- content-hash: sha256:a5382f5dffc8946000b831c6433f7312cae263450bd9e97bfacb58017ae7b783
4
+ content-hash: sha256:021d3690d7d8100b010cc7d9669e51707f501b5be58dac2399a2d751ca9844e1
5
5
  brand: maxy-code
6
6
  product-name: Maxy
7
7
  ---
@@ -1820,6 +1820,49 @@ grep -E 'op=(turn-drop|census)' ~/.<brand>/logs/mcp-telegram-channel-*.log | tai
1820
1820
  grep -E 'op=(turn-end|turn-answer-absent)' ~/.<brand>/logs/server.log | grep <sessionId>
1821
1821
  ```
1822
1822
 
1823
+ **A seventh discard site, and the one nothing was reading.** An answer that
1824
+ survived every guard above could still be produced and thrown away at the last
1825
+ step, because the gateway resolved its destination from admin identity rather
1826
+ than from the channel it came in on. A public visitor has no admin identity, so
1827
+ the resolver returned no target: nothing was attempted, no transport failed, and
1828
+ the line read `reached=none notReached=none`.
1829
+
1830
+ The turn-end body now carries the channel server's own spawn `role`, and that is
1831
+ the only thing that decides the destination:
1832
+
1833
+ | `role=` | Where the answer goes | `op=fan-out` |
1834
+ |---|---|---|
1835
+ | `public` | every segment through the posting key's own transport; no identity resolver, no registry read | never emitted |
1836
+ | `admin` | every live door the person is reachable on, via `fanTargetsFor` | emitted |
1837
+ | absent or unrecognised | nowhere. 400, plus one `op=turn-role-absent … evicted=<yes\|no>` | never emitted |
1838
+
1839
+ `op=turn-end` and `op=turn-strand-anomaly` both name the role, so no outcome is
1840
+ unattributable.
1841
+
1842
+ A roleless POST has one cause: a channel server from a build predating the field,
1843
+ still attached to a session that outlived the platform restart. It reconnects its
1844
+ stream, so nothing respawns it, and left alone it would post roleless turn-ends for
1845
+ the life of that session. `evicted=yes` says the gateway dropped its subscriber, so
1846
+ the next inbound spawns a server on the current build: one turn is lost per session
1847
+ rather than all of them. That turn's answer is deliberately not delivered to the
1848
+ posting key, because doing so would restore the very fallback whose reachability hid
1849
+ the original defect. The standing check is one line per door per minute, over a
1850
+ rolling hour:
1851
+
1852
+ ```bash
1853
+ # the standing read; any undeliveredPublic>0 is a failure
1854
+ grep -E 'op=census' ~/.<brand>/logs/server.log | grep delivery-census | tail -5
1855
+ # a visitor's answer that reached nobody, or a turn-end that named no role
1856
+ grep -E 'op=(turn-role-absent|turn-strand-anomaly)' ~/.<brand>/logs/server.log | tail -20
1857
+ ```
1858
+
1859
+ `[<door>-delivery-census] op=census windowMin=60 turnEnds=… record=… none=…
1860
+ undelivered=… undeliveredPublic=… undeliveredAdmin=… roleAbsent=…`. Healthy is
1861
+ `undeliveredPublic=0 roleAbsent=0` with `record` tracking `turnEnds` minus
1862
+ `none`. A door with no turn-end in the hour emits nothing; the
1863
+ `op=arm name=channel-delivery-census` line at boot is what separates that from a
1864
+ census that is not running.
1865
+
1823
1866
  ---
1824
1867
  # Settings
1825
1868
  Source: https://docs.getmaxy.com/settings.md
@@ -9,6 +9,13 @@ Invoked by the admin agent directly.
9
9
 
10
10
  This is the platform's release timeline, newest first. Each entry shows the date it shipped and the version it shipped in, so you can tell the operator how current their install is. To compare, read the installed version from `capabilities-here` and match it against the versions below. Keep answers high level and in plain English; this is a summary, not a full commit log.
11
11
 
12
+ ## 2026-08-06 (0.1.568)
13
+
14
+ - Answers reach the conversation they came from again. An answer was being routed by who the account's admin is rather than by the conversation it was sent to, so a public agent's reply could go nowhere and an admin answer could strand with nothing said about it. Delivery now returns to the door the message arrived on, and every failure to find one is named rather than passing silently. If you rolled an install back because of this, you can move forward again.
15
+ - Starting one product no longer kills conversations belonging to another on the same machine. A product starting up was clearing away stale conversations by a pattern that matched every other co-resident product's live ones too.
16
+ - A specialist you wrote is now actually dispatchable. It was being listed to the assistant while never being registered where dispatch looks, so asking for it did nothing.
17
+ - Telegram and webchat no longer spend one of your inbound allowances on a turn that answered nothing.
18
+
12
19
  ## 2026-08-05 (0.1.567)
13
20
 
14
21
  - An answer you can see in the reader is now delivered to the channel it belongs to. A turn that ended on a thinking block was closing before its answer row arrived, and that answer was dropped. Every channel now holds a close that carries no message, merges a split answer back into one message, and records a line at each of the six points where a turn used to be discarded silently.
@@ -133,3 +133,46 @@ grep -E 'op=(turn-drop|census)' ~/.<brand>/logs/mcp-telegram-channel-*.log | tai
133
133
  # the gateway's view of the same turn
134
134
  grep -E 'op=(turn-end|turn-answer-absent)' ~/.<brand>/logs/server.log | grep <sessionId>
135
135
  ```
136
+
137
+ **A seventh discard site, and the one nothing was reading.** An answer that
138
+ survived every guard above could still be produced and thrown away at the last
139
+ step, because the gateway resolved its destination from admin identity rather
140
+ than from the channel it came in on. A public visitor has no admin identity, so
141
+ the resolver returned no target: nothing was attempted, no transport failed, and
142
+ the line read `reached=none notReached=none`.
143
+
144
+ The turn-end body now carries the channel server's own spawn `role`, and that is
145
+ the only thing that decides the destination:
146
+
147
+ | `role=` | Where the answer goes | `op=fan-out` |
148
+ |---|---|---|
149
+ | `public` | every segment through the posting key's own transport; no identity resolver, no registry read | never emitted |
150
+ | `admin` | every live door the person is reachable on, via `fanTargetsFor` | emitted |
151
+ | absent or unrecognised | nowhere. 400, plus one `op=turn-role-absent … evicted=<yes\|no>` | never emitted |
152
+
153
+ `op=turn-end` and `op=turn-strand-anomaly` both name the role, so no outcome is
154
+ unattributable.
155
+
156
+ A roleless POST has one cause: a channel server from a build predating the field,
157
+ still attached to a session that outlived the platform restart. It reconnects its
158
+ stream, so nothing respawns it, and left alone it would post roleless turn-ends for
159
+ the life of that session. `evicted=yes` says the gateway dropped its subscriber, so
160
+ the next inbound spawns a server on the current build: one turn is lost per session
161
+ rather than all of them. That turn's answer is deliberately not delivered to the
162
+ posting key, because doing so would restore the very fallback whose reachability hid
163
+ the original defect. The standing check is one line per door per minute, over a
164
+ rolling hour:
165
+
166
+ ```bash
167
+ # the standing read; any undeliveredPublic>0 is a failure
168
+ grep -E 'op=census' ~/.<brand>/logs/server.log | grep delivery-census | tail -5
169
+ # a visitor's answer that reached nobody, or a turn-end that named no role
170
+ grep -E 'op=(turn-role-absent|turn-strand-anomaly)' ~/.<brand>/logs/server.log | tail -20
171
+ ```
172
+
173
+ `[<door>-delivery-census] op=census windowMin=60 turnEnds=… record=… none=…
174
+ undelivered=… undeliveredPublic=… undeliveredAdmin=… roleAbsent=…`. Healthy is
175
+ `undeliveredPublic=0 roleAbsent=0` with `record` tracking `turnEnds` minus
176
+ `none`. A door with no turn-end in the hour emits nothing; the
177
+ `op=arm name=channel-delivery-census` line at boot is what separates that from a
178
+ census that is not running.
@@ -420,8 +420,6 @@ for n in names:
420
420
  echo " op=specialist-orphan-reconcile orphaned=$_orphaned"
421
421
  fi
422
422
 
423
- rm -f "$ACCOUNT_DIR/.claude/agents/"*.md 2>/dev/null || true
424
-
425
423
  # SOUL.md — user-controlled. Only create if missing. Never overwrite.
426
424
  if [ -f "$ACCOUNT_DIR/agents/admin/SOUL.md" ]; then
427
425
  echo " agents/admin/SOUL.md preserved ($(wc -c < "$ACCOUNT_DIR/agents/admin/SOUL.md" | tr -d ' ') bytes)"
@@ -0,0 +1,19 @@
1
+ /** Two spawns in the same account sync concurrently — an admin session and a
2
+ * channel session are routine — and they write identical content. Whoever
3
+ * loses a link gets EEXIST on create or ENOENT on remove for work the winner
4
+ * has already done. Swallowing exactly those two codes keeps the loser going
5
+ * instead of aborting its remaining files and logging a failure that never
6
+ * happened, into the one surface this task exists to make trustworthy.
7
+ *
8
+ * Only the named code is swallowed. Every other errno propagates to the
9
+ * caller's own catch, which is what still turns a genuine EACCES or ENOTDIR
10
+ * into `op=account-agent-registry error`. Exported for its own unit test: the
11
+ * propagation half cannot be provoked through the filesystem from outside. */
12
+ export declare function ignoringRaceWith(code: 'EEXIST' | 'ENOENT', act: () => void): void;
13
+ /** Mirror `<accountDir>/specialists/agents/*.md` into
14
+ * `<accountDir>/.claude/agents/` as symlinks, and remove every registry
15
+ * symlink the source no longer has. Emits exactly one line:
16
+ * `op=account-agent-registry synced=<N> pruned=<N> collisions=<basenames>`,
17
+ * or one `op=account-agent-registry error reason=<msg>` if anything threw. */
18
+ export declare function syncAccountAgentRegistry(accountDir: string, log: (line: string) => void): void;
19
+ //# sourceMappingURL=account-agent-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-agent-registry.d.ts","sourceRoot":"","sources":["../src/account-agent-registry.ts"],"names":[],"mappings":"AA6BA;;;;;;;;;;+EAU+E;AAC/E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EAAE,GAAG,EAAE,MAAM,IAAI,GAAG,IAAI,CAOjF;AAED;;;;+EAI+E;AAC/E,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAmF9F"}
@@ -0,0 +1,146 @@
1
+ // Task 2460 — the one agent registry per account.
2
+ //
3
+ // Claude Code resolves a subagent name from exactly two directories, both
4
+ // string constants in the shipped binary: `$CLAUDE_CONFIG_DIR/agents/` and
5
+ // `<cwd>/.claude/agents/`. Three directories held agent files and nothing
6
+ // reconciled them, which produced three measured symptoms: an authored
7
+ // specialist was never registered; a retired template stayed registered forever
8
+ // (clare-craig's dangling `archive-ingest-operator.md`); and a specialist
9
+ // disabled on one account stayed resolvable in every account on the install.
10
+ //
11
+ // This module makes `<accountDir>/.claude/agents/` a mirror of
12
+ // `<accountDir>/specialists/agents/` and nothing else. cwd at every spawn is
13
+ // the account dir, so that path is the second constant, and the brand-wide root
14
+ // is cleared by the installer, so it is the only one.
15
+ //
16
+ // Symlinks rather than copies: the source stays the single writable surface, so
17
+ // authoring, disabling and provisioning keep working on it unchanged.
18
+ //
19
+ // It is called at spawn rather than at authoring so an account already in a
20
+ // broken state is repaired by its next session, with no manual step and no
21
+ // second disk writer that can drift from provisioning.
22
+ //
23
+ // It never throws. A registry that cannot be written is a specialist that
24
+ // cannot be dispatched, which is the state before this module existed; a spawn
25
+ // that dies instead is strictly worse.
26
+ import { existsSync, lstatSync, mkdirSync, readdirSync, readlinkSync, symlinkSync, unlinkSync } from 'node:fs';
27
+ import { dirname, join, resolve } from 'node:path';
28
+ /** Two spawns in the same account sync concurrently — an admin session and a
29
+ * channel session are routine — and they write identical content. Whoever
30
+ * loses a link gets EEXIST on create or ENOENT on remove for work the winner
31
+ * has already done. Swallowing exactly those two codes keeps the loser going
32
+ * instead of aborting its remaining files and logging a failure that never
33
+ * happened, into the one surface this task exists to make trustworthy.
34
+ *
35
+ * Only the named code is swallowed. Every other errno propagates to the
36
+ * caller's own catch, which is what still turns a genuine EACCES or ENOTDIR
37
+ * into `op=account-agent-registry error`. Exported for its own unit test: the
38
+ * propagation half cannot be provoked through the filesystem from outside. */
39
+ export function ignoringRaceWith(code, act) {
40
+ try {
41
+ act();
42
+ }
43
+ catch (err) {
44
+ if (err.code === code)
45
+ return;
46
+ throw err;
47
+ }
48
+ }
49
+ /** Mirror `<accountDir>/specialists/agents/*.md` into
50
+ * `<accountDir>/.claude/agents/` as symlinks, and remove every registry
51
+ * symlink the source no longer has. Emits exactly one line:
52
+ * `op=account-agent-registry synced=<N> pruned=<N> collisions=<basenames>`,
53
+ * or one `op=account-agent-registry error reason=<msg>` if anything threw. */
54
+ export function syncAccountAgentRegistry(accountDir, log) {
55
+ const sourceDir = join(accountDir, 'specialists', 'agents');
56
+ const registryDir = join(accountDir, '.claude', 'agents');
57
+ let synced = 0;
58
+ let pruned = 0;
59
+ const collisions = [];
60
+ try {
61
+ mkdirSync(registryDir, { recursive: true });
62
+ // An absent source directory is an account with no specialists, not an
63
+ // error. The prune pass below still runs, so a registry left behind by a
64
+ // removed source directory is cleared rather than frozen.
65
+ const sources = existsSync(sourceDir)
66
+ ? readdirSync(sourceDir).filter((n) => n.endsWith('.md')).sort()
67
+ : [];
68
+ for (const file of sources) {
69
+ const targetAbs = join(sourceDir, file);
70
+ const linkPath = join(registryDir, file);
71
+ let stat = null;
72
+ try {
73
+ stat = lstatSync(linkPath);
74
+ }
75
+ catch (err) {
76
+ if (err.code !== 'ENOENT')
77
+ throw err;
78
+ }
79
+ if (stat === null) {
80
+ // A concurrent sync may have created it between the lstat and here. It
81
+ // writes the same target, so counting it synced is accurate either way.
82
+ ignoringRaceWith('EEXIST', () => symlinkSync(targetAbs, linkPath));
83
+ synced++;
84
+ continue;
85
+ }
86
+ // A regular file here is an operator's own placement. Never overwritten,
87
+ // never silently ignored: it is named so the operator can resolve it, and
88
+ // not counted as synced, because that name does not resolve to the
89
+ // account's specialist.
90
+ if (!stat.isSymbolicLink()) {
91
+ collisions.push(file);
92
+ continue;
93
+ }
94
+ let current;
95
+ try {
96
+ current = resolve(dirname(linkPath), readlinkSync(linkPath));
97
+ }
98
+ catch {
99
+ current = '';
100
+ }
101
+ if (current !== targetAbs) {
102
+ // Both steps tolerate a concurrent sync doing the same retarget: an
103
+ // ENOENT unlink means the stale link is already gone, which is exactly
104
+ // when the create below still has to run, and an EEXIST create means
105
+ // the other process already wrote this same target.
106
+ ignoringRaceWith('ENOENT', () => unlinkSync(linkPath));
107
+ ignoringRaceWith('EEXIST', () => symlinkSync(targetAbs, linkPath));
108
+ }
109
+ synced++;
110
+ }
111
+ // Set difference, not dangling-target. A link the source no longer has is
112
+ // removed whether or not its target survives: symptom 2 was exactly a link
113
+ // that outlived its source, and a dangling-only rule would leave that class
114
+ // of drift reachable in the new registry. This is the half of the mirror
115
+ // that makes the registry's basename set equal the source's in both
116
+ // directions.
117
+ const sourceSet = new Set(sources);
118
+ for (const entry of readdirSync(registryDir)) {
119
+ if (!entry.endsWith('.md'))
120
+ continue;
121
+ if (sourceSet.has(entry))
122
+ continue;
123
+ const linkPath = join(registryDir, entry);
124
+ let stat;
125
+ try {
126
+ stat = lstatSync(linkPath);
127
+ }
128
+ catch {
129
+ continue;
130
+ }
131
+ // A regular file is the operator's, at a name the source does not claim.
132
+ // Left alone for the same reason as a collision above.
133
+ if (!stat.isSymbolicLink())
134
+ continue;
135
+ // A concurrent sync may have pruned it already; that is the same outcome,
136
+ // so count it either way rather than aborting the rest of the pass.
137
+ ignoringRaceWith('ENOENT', () => unlinkSync(linkPath));
138
+ pruned++;
139
+ }
140
+ log(`op=account-agent-registry synced=${synced} pruned=${pruned} collisions=${collisions.join(',')}`);
141
+ }
142
+ catch (err) {
143
+ log(`op=account-agent-registry error reason=${err instanceof Error ? err.message : String(err)}`);
144
+ }
145
+ }
146
+ //# sourceMappingURL=account-agent-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-agent-registry.js","sourceRoot":"","sources":["../src/account-agent-registry.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,0EAA0E;A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,CAAC,EAAE,CAAC,CAAA;IACvG,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,0CAA0C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACnG,CAAC;AACH,CAAC"}
@@ -190,5 +190,10 @@ export declare function createFsWatcher(opts: {
190
190
  * orphan-stop escalation. Default 5_000 ms (matches the scope's
191
191
  * `TimeoutStopSec`). Tests pass small values to keep run time bounded. */
192
192
  killGraceMs?: number;
193
+ /** Task 2457 — the brand that owns this manager's scopes. REQUIRED, with no
194
+ * default: the boot-seed reconciler stops every scope it cannot reattach,
195
+ * and a guessed brand would make it stop a co-resident brand's live
196
+ * sessions — the exact fault this field exists to close. */
197
+ brandSlug: string;
193
198
  }): FsWatcher;
194
199
  //# sourceMappingURL=fs-watcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fs-watcher.d.ts","sourceRoot":"","sources":["../src/fs-watcher.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAI5D,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,oBAAoB,CAAA;AAsC3B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AACpD;;;;;;;;gCAQgC;AAChC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;AAE7D,MAAM,WAAW,UAAU;IACzB;;mDAE+C;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,wEAAwE;IACxE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;mEAC+D;IAC/D,KAAK,EAAE,MAAM,GA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AAC,EAAE,MAAM,CAAA;IACxB;;;;6EAIyE;IACzE,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B;;8EAE0E;IAC1E,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B;;+EAE2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;iEAG6D;IAC7D,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,SAAS,CA63BZ"}
@@ -125,7 +125,7 @@ function parsePidFile(path) {
125
125
  return { sessionId, pid, bridgeSessionId, bridgeSuffix, agent, cwd, status, updatedAt, processStartedAt, pidFilePath: path };
126
126
  }
127
127
  export function createFsWatcher(opts) {
128
- const { sessionsDir, projectsDir, logger } = opts;
128
+ const { sessionsDir, projectsDir, logger, brandSlug } = opts;
129
129
  // Task 1433 — resolveFromDisk scans `<claudeConfigDir>/projects/**`. The boot
130
130
  // layout is `<cfg>/projects/<slug>`, so the config root is two levels up from
131
131
  // projectsDir when not passed explicitly.
@@ -743,7 +743,7 @@ export function createFsWatcher(opts) {
743
743
  * orphaned-stopped=N` even when every count is zero so the operator
744
744
  * can confirm the reconciliation ran. */
745
745
  function reconcileSurvivingScopes(scopeRecords) {
746
- const { scopes, result } = listSurvivingScopes(runSystemctl);
746
+ const { scopes, result } = listSurvivingScopes(runSystemctl, brandSlug);
747
747
  if (result.exitCode !== 0) {
748
748
  logger(`[boot-seed] systemctl-list-units-failed exit-code=${result.exitCode} stderr=${JSON.stringify(result.stderr.slice(-200))} survived-scopes=0 reattached=0 orphaned=0 orphaned-stopped=0`);
749
749
  return;
@@ -769,9 +769,9 @@ export function createFsWatcher(opts) {
769
769
  // ms when escalation runs and we don't want to serialise boot on it).
770
770
  const pidForStop = decision.match === 'orphan-pid-dead'
771
771
  ? null
772
- : getScopeMainPid(runSystemctl, scope.unitToken);
772
+ : getScopeMainPid(runSystemctl, brandSlug, scope.unitToken);
773
773
  orphanedStopped += 1;
774
- void stopScopeUnit(runSystemctl, scope.unitToken, {
774
+ void stopScopeUnit(runSystemctl, brandSlug, scope.unitToken, {
775
775
  pid: pidForStop,
776
776
  killGraceMs,
777
777
  signals: processSignals,
@@ -829,7 +829,7 @@ export function createFsWatcher(opts) {
829
829
  // rc-spawn survivor's row has pid=null. Fall back to the scope's MainPID,
830
830
  // and adopt that pid onto the row so the operator's End and the standing
831
831
  // reconciler have a real process to act on.
832
- const effectivePid = row.pid ?? getScopeMainPid(runSystemctl, scope.unitToken);
832
+ const effectivePid = row.pid ?? getScopeMainPid(runSystemctl, brandSlug, scope.unitToken);
833
833
  if (effectivePid === null || !processSignals.isAlive(effectivePid)) {
834
834
  logger(`[boot-seed] scope-classify unit=${scope.unitName} sessionId=${sessionId.slice(0, 8)} match=orphan-pid-dead reason=pid-already-dead`);
835
835
  return { match: 'orphan-pid-dead', reason: 'pid-already-dead' };