@rubytech/create-maxy-code 0.1.417 → 0.1.423
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/__tests__/brand-port-uniqueness.test.js +74 -0
- package/dist/known-brands.js +1 -0
- package/package.json +1 -1
- package/payload/platform/config/brand-registry.json +8 -0
- package/payload/platform/lib/active-rules/dist/index.d.ts +35 -0
- package/payload/platform/lib/active-rules/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/active-rules/dist/index.js +94 -0
- package/payload/platform/lib/active-rules/dist/index.js.map +1 -0
- package/payload/platform/lib/active-rules/package.json +7 -0
- package/payload/platform/lib/active-rules/src/index.test.ts +89 -0
- package/payload/platform/lib/active-rules/src/index.ts +133 -0
- package/payload/platform/lib/active-rules/tsconfig.json +9 -0
- package/payload/platform/package-lock.json +5158 -2922
- package/payload/platform/package.json +4 -3
- package/payload/platform/plugins/admin/hooks/__tests__/prompt-optimiser-compliance.test.sh +22 -0
- package/payload/platform/plugins/admin/hooks/prompt-optimiser-compliance.sh +14 -1
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +16 -2
- package/payload/platform/plugins/docs/references/internals.md +10 -0
- package/payload/platform/plugins/docs/references/memory-guide.md +4 -0
- package/payload/platform/plugins/docs/references/outlook-guide.md +1 -1
- package/payload/platform/plugins/memory/PLUGIN.md +3 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js +49 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-reconcile.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-reconcile.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-reconcile.test.js +99 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-reconcile.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +11 -3
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts +21 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +106 -14
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -1
- package/payload/platform/plugins/memory/skills/conversational-memory/SKILL.md +30 -1
- package/payload/platform/plugins/memory/skills/preference-audit/SKILL.md +50 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/calendar-write.test.js +24 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/calendar-write.test.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-create.d.ts +15 -2
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-create.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-create.js +16 -7
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-create.js.map +1 -1
- package/payload/platform/plugins/whatsapp/PLUGIN.md +3 -1
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/resolve-read-account.test.d.ts +2 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/resolve-read-account.test.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/resolve-read-account.test.js +15 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/resolve-read-account.test.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js +14 -8
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/whatsapp/mcp/dist/resolve-read-account.d.ts +7 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/resolve-read-account.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/resolve-read-account.js +13 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/resolve-read-account.js.map +1 -0
- package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +9 -1
- package/payload/platform/plugins/work/mcp/dist/__tests__/work-create-raised-by-env.test.d.ts +2 -0
- package/payload/platform/plugins/work/mcp/dist/__tests__/work-create-raised-by-env.test.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/__tests__/work-create-raised-by-env.test.js +66 -0
- package/payload/platform/plugins/work/mcp/dist/__tests__/work-create-raised-by-env.test.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.d.ts.map +1 -1
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.js +8 -1
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.js.map +1 -1
- package/payload/platform/scripts/__tests__/provision-role-stamp.test.sh +3 -0
- package/payload/platform/scripts/lib/provision-account-dir.sh +9 -1
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.d.ts +1 -1
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.js +5 -1
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +1 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +65 -4
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +53 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/passive-dispatch-prune.d.ts +37 -0
- package/payload/platform/services/claude-session-manager/dist/passive-dispatch-prune.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/passive-dispatch-prune.js +80 -0
- package/payload/platform/services/claude-session-manager/dist/passive-dispatch-prune.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/passive-intake-audit.d.ts +70 -0
- package/payload/platform/services/claude-session-manager/dist/passive-intake-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/passive-intake-audit.js +129 -0
- package/payload/platform/services/claude-session-manager/dist/passive-intake-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts +46 -0
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js +96 -0
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +39 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +66 -5
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.js +5 -1
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +6 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +20 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
- package/payload/platform/services/telegram-channel/dist/instructions.d.ts +9 -0
- package/payload/platform/services/telegram-channel/dist/instructions.d.ts.map +1 -0
- package/payload/platform/services/telegram-channel/dist/instructions.js +80 -0
- package/payload/platform/services/telegram-channel/dist/instructions.js.map +1 -0
- package/payload/platform/services/telegram-channel/dist/notification.d.ts +93 -0
- package/payload/platform/services/telegram-channel/dist/notification.d.ts.map +1 -0
- package/payload/platform/services/telegram-channel/dist/notification.js +119 -0
- package/payload/platform/services/telegram-channel/dist/notification.js.map +1 -0
- package/payload/platform/services/telegram-channel/dist/server.d.ts +40 -0
- package/payload/platform/services/telegram-channel/dist/server.d.ts.map +1 -0
- package/payload/platform/services/telegram-channel/dist/server.js +291 -0
- package/payload/platform/services/telegram-channel/dist/server.js.map +1 -0
- package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts +28 -0
- package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts.map +1 -0
- package/payload/platform/services/telegram-channel/dist/turn-follow.js +188 -0
- package/payload/platform/services/telegram-channel/dist/turn-follow.js.map +1 -0
- package/payload/platform/services/webchat-channel/dist/instructions.d.ts.map +1 -1
- package/payload/platform/services/webchat-channel/dist/instructions.js +37 -78
- package/payload/platform/services/webchat-channel/dist/instructions.js.map +1 -1
- package/payload/platform/services/webchat-channel/dist/notification.d.ts +5 -0
- package/payload/platform/services/webchat-channel/dist/notification.d.ts.map +1 -1
- package/payload/platform/services/webchat-channel/dist/notification.js +6 -1
- package/payload/platform/services/webchat-channel/dist/notification.js.map +1 -1
- package/payload/platform/services/whatsapp-channel/dist/notification.d.ts +20 -36
- package/payload/platform/services/whatsapp-channel/dist/notification.d.ts.map +1 -1
- package/payload/platform/services/whatsapp-channel/dist/notification.js +43 -81
- package/payload/platform/services/whatsapp-channel/dist/notification.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +2 -1
- package/payload/platform/templates/agents/passive/IDENTITY.md +21 -0
- package/payload/platform/templates/specialists/agents/content-producer.md +4 -0
- package/payload/server/public/assets/{AdminLoginScreens-CBTx7ZPK.js → AdminLoginScreens-B1P6PrZ3.js} +1 -1
- package/payload/server/public/assets/AdminShell-Y1fHQApK.js +2 -0
- package/payload/server/public/assets/{Checkbox-BHTxekRB.js → Checkbox-CgCqOslz.js} +1 -1
- package/payload/server/public/assets/{Transcript-5kLbBInN.js → Transcript-DZzFjhoq.js} +1 -1
- package/payload/server/public/assets/{admin-BWCLE32N.js → admin-BRBjJEci.js} +1 -1
- package/payload/server/public/assets/{browser-CRvCPsvV.js → browser-ID7iqIi4.js} +1 -1
- package/payload/server/public/assets/{calendar-BI-kd-QP.js → calendar-BEQPMTtd.js} +1 -1
- package/payload/server/public/assets/chat-D0GDSWM-.js +1 -0
- package/payload/server/public/assets/chevron-left-A0HYKwGY.js +1 -0
- package/payload/server/public/assets/data-CV38dClT.js +1 -0
- package/payload/server/public/assets/{graph-BFSyW_5i.js → graph-BK0MjKRy.js} +1 -1
- package/payload/server/public/assets/{graph-labels-DEjD_qJh.js → graph-labels-BfG6FO25.js} +1 -1
- package/payload/server/public/assets/{maximize-2-BcMJNeCB.js → maximize-2-DrBaKD3z.js} +1 -1
- package/payload/server/public/assets/{operator-Dtvm9ero.js → operator-CnpNyIJ8.js} +1 -1
- package/payload/server/public/assets/page-DC_L-IS1.js +32 -0
- package/payload/server/public/assets/{page-TXi9dmaB.js → page-DKHLflh7.js} +1 -1
- package/payload/server/public/assets/{public-DBx3U0r8.js → public-ByUJr48E.js} +1 -1
- package/payload/server/public/assets/{rotate-ccw-8ti3QkeY.js → rotate-ccw-D45TbeAI.js} +1 -1
- package/payload/server/public/assets/useSubAccountSwitcher-CCn22f98.css +1 -0
- package/payload/server/public/assets/useSubAccountSwitcher-CprHkBnZ.js +9 -0
- package/payload/server/public/browser.html +4 -4
- package/payload/server/public/calendar.html +5 -5
- package/payload/server/public/chat.html +9 -9
- package/payload/server/public/data.html +8 -8
- package/payload/server/public/graph.html +9 -9
- package/payload/server/public/index.html +11 -11
- package/payload/server/public/operator.html +11 -11
- package/payload/server/public/public.html +9 -9
- package/payload/server/server.js +406 -99
- package/payload/server/public/assets/AdminShell-DPHUeXea.js +0 -2
- package/payload/server/public/assets/chat-DFy8hb1y.js +0 -1
- package/payload/server/public/assets/chevron-left-Bggm5B5U.js +0 -1
- package/payload/server/public/assets/data-HvZ69Ya1.js +0 -1
- package/payload/server/public/assets/page-C_pm3hl3.js +0 -32
- package/payload/server/public/assets/useSubAccountSwitcher-BUvlETHN.css +0 -1
- package/payload/server/public/assets/useSubAccountSwitcher-Bc5dOBdI.js +0 -9
package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Task 1486 — standing preference-reconciliation audit. The failure this task
|
|
2
|
+
// fixes emitted NO signal: rules piled up as unreconciled same-subject
|
|
3
|
+
// duplicates and the only detector was the operator complaining. Write-side
|
|
4
|
+
// reconcile collapses FUTURE writes, but a legacy store (the 24 GL Smith rows)
|
|
5
|
+
// keeps its rephrasings until a backfill that is out of scope. So an independent
|
|
6
|
+
// periodic read is the only signal that the store and what injection surfaces
|
|
7
|
+
// have drifted apart.
|
|
8
|
+
//
|
|
9
|
+
// For each account with active preferences it compares the stored active count
|
|
10
|
+
// against the de-conflicted count that injection would actually surface (via the
|
|
11
|
+
// same @maxy/active-rules definition). A positive gap is unreconciled
|
|
12
|
+
// same-subject duplicates. Best-effort by construction: a Neo4j-unreachable read
|
|
13
|
+
// logs and returns nothing rather than crashing the manager (Neo4j may not be up
|
|
14
|
+
// at boot). Shape mirrors rootless-client-audit.ts.
|
|
15
|
+
import neo4j from 'neo4j-driver';
|
|
16
|
+
import { queryActiveRuleCandidates, deconflictBySubject, } from '../../../lib/active-rules/dist/index.js';
|
|
17
|
+
const TAG = '[preference-audit]';
|
|
18
|
+
/** One drift line per flagged account. accountId truncated to 8 for readability;
|
|
19
|
+
* the three counts are greppable fields. */
|
|
20
|
+
export function formatAuditLine(f) {
|
|
21
|
+
return `${TAG} op=drift accountId=${f.accountId.slice(0, 8)} storedActive=${f.storedActive} injectedActive=${f.injectedActive} duplicateClusters=${f.duplicateClusters}`;
|
|
22
|
+
}
|
|
23
|
+
/** For every account that holds active preferences, measure stored-vs-injected
|
|
24
|
+
* divergence. Returns a finding ONLY for accounts where the two differ (i.e.
|
|
25
|
+
* the store holds unreconciled same-subject duplicates). Measures against the
|
|
26
|
+
* exact injection definition (queryActiveRuleCandidates + deconflictBySubject),
|
|
27
|
+
* so the audit and injection can never disagree about what "active" means. */
|
|
28
|
+
export async function auditPreferenceReconciliation(session) {
|
|
29
|
+
const accountsRes = await session.run(`MATCH (pref:Preference {scope: 'admin'})
|
|
30
|
+
WHERE NOT pref:Trashed AND pref.deletedAt IS NULL
|
|
31
|
+
AND coalesce(pref.notApplicable, false) = false
|
|
32
|
+
RETURN DISTINCT pref.accountId AS accountId`, {});
|
|
33
|
+
const findings = [];
|
|
34
|
+
for (const rec of accountsRes.records) {
|
|
35
|
+
const accountId = String(rec.get('accountId'));
|
|
36
|
+
const candidates = await queryActiveRuleCandidates(session, accountId);
|
|
37
|
+
const injectedActive = deconflictBySubject(candidates).length;
|
|
38
|
+
const storedActive = candidates.length;
|
|
39
|
+
const duplicateClusters = storedActive - injectedActive;
|
|
40
|
+
if (duplicateClusters > 0) {
|
|
41
|
+
findings.push({ accountId, storedActive, injectedActive, duplicateClusters });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return findings;
|
|
45
|
+
}
|
|
46
|
+
/** Run one audit pass and log a drift line per flagged account. Best-effort
|
|
47
|
+
* Neo4j — absent env or an unreachable/erroring read logs `unavailable` and
|
|
48
|
+
* never throws. A clean pass logs a single `op=ok` line so the audit's own
|
|
49
|
+
* liveness is visible. */
|
|
50
|
+
export async function emitPreferenceAudit(deps) {
|
|
51
|
+
if (!deps.neo4jUri || !deps.neo4jPassword) {
|
|
52
|
+
deps.logger(`${TAG} op=unavailable reason=no-neo4j-env`);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const driver = neo4j.driver(deps.neo4jUri, neo4j.auth.basic(deps.neo4jUser, deps.neo4jPassword));
|
|
56
|
+
const session = driver.session();
|
|
57
|
+
try {
|
|
58
|
+
const findings = await auditPreferenceReconciliation(session);
|
|
59
|
+
if (findings.length === 0) {
|
|
60
|
+
deps.logger(`${TAG} op=ok drifted=0`);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
for (const f of findings)
|
|
64
|
+
deps.logger(formatAuditLine(f));
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
deps.logger(`${TAG} op=unavailable reason=${err instanceof Error ? err.message : String(err)}`);
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
await session.close();
|
|
71
|
+
await driver.close();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Standing periodic audit. Unref'd interval so it never holds the process open;
|
|
75
|
+
* each tick re-emits best-effort. */
|
|
76
|
+
export function createPreferenceAudit(deps) {
|
|
77
|
+
let timer = null;
|
|
78
|
+
return {
|
|
79
|
+
start() {
|
|
80
|
+
if (timer)
|
|
81
|
+
return;
|
|
82
|
+
timer = setInterval(() => {
|
|
83
|
+
void emitPreferenceAudit(deps);
|
|
84
|
+
}, deps.intervalMs);
|
|
85
|
+
if (typeof timer.unref === 'function')
|
|
86
|
+
timer.unref();
|
|
87
|
+
},
|
|
88
|
+
stop() {
|
|
89
|
+
if (timer) {
|
|
90
|
+
clearInterval(timer);
|
|
91
|
+
timer = null;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=preference-reconciliation-audit.js.map
|
package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preference-reconciliation-audit.js","sourceRoot":"","sources":["../src/preference-reconciliation-audit.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,uEAAuE;AACvE,4EAA4E;AAC5E,+EAA+E;AAC/E,iFAAiF;AACjF,8EAA8E;AAC9E,sBAAsB;AACtB,EAAE;AACF,+EAA+E;AAC/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AAA;IACvC,OAAO;QACL,KAAK;YACH,IAAI,KAAK;gBAAE,OAAM;YACjB,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;gBACvB,KAAK,mBAAmB,CAAC,IAAI,CAAC,CAAA;YAChC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;YACnB,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;gBAAE,KAAK,CAAC,KAAK,EAAE,CAAA;QACtD,CAAC;QACD,IAAI;YACF,IAAI,KAAK,EAAE,CAAC;gBACV,aAAa,CAAC,KAAK,CAAC,CAAA;gBACpB,KAAK,GAAG,IAAI,CAAA;YACd,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -403,6 +403,17 @@ export interface SpawnArgs {
|
|
|
403
403
|
* composeAppendSystemPrompt as an extra so the toolless public agent reads
|
|
404
404
|
* its prior-visit context without any tool. Gated public spawns only. */
|
|
405
405
|
previousContext?: string;
|
|
406
|
+
/** Task 1483 — a WhatsApp passive account-manager spawn: a fresh, one-shot
|
|
407
|
+
* process structurally confined to only `work-create`, no reply channel, no
|
|
408
|
+
* HOUSE_ADMIN_SCOPE. Rides `role:'public'` (so it inherits the public
|
|
409
|
+
* restricted `--strict-mcp-config` + dontAsk posture) but registers the `work`
|
|
410
|
+
* server (not zero servers) and allows only `mcp__work__work-create`. */
|
|
411
|
+
passive?: boolean;
|
|
412
|
+
/** Task 1483 — the sub-account a passive spawn is scoped to. Passed as the
|
|
413
|
+
* per-spawn mcp-config `accountId`, so the `work` MCP server's env block carries
|
|
414
|
+
* `ACCOUNT_ID` = this sub-account and `work-create` stamps the sub-account on
|
|
415
|
+
* the `:Task`. Ignored unless `passive` is set. */
|
|
416
|
+
targetAccountId?: string;
|
|
406
417
|
}
|
|
407
418
|
export type PermissionMode = SpawnPermissionMode;
|
|
408
419
|
export declare const PERMISSION_MODES: readonly PermissionMode[];
|
|
@@ -449,7 +460,34 @@ interface McpConfigWriteParams {
|
|
|
449
460
|
* spawn is not a specialist; the role-based admin/public projection
|
|
450
461
|
* applies. */
|
|
451
462
|
specialistTools: readonly string[] | null;
|
|
463
|
+
/** Task 1483 — a WhatsApp passive spawn. Registers ONLY the `work` server
|
|
464
|
+
* (overriding the public zero-server projection), so under
|
|
465
|
+
* `--strict-mcp-config` its sole tool is `mcp__work__work-create`. `accountId`
|
|
466
|
+
* is the sub-account, so the work server's env block carries `ACCOUNT_ID` =
|
|
467
|
+
* sub-account and `work-create` stamps it on the `:Task`. */
|
|
468
|
+
passive?: boolean;
|
|
469
|
+
/** Task 1493 — the elementId of the :Person who sent the passive intake
|
|
470
|
+
* (the sub-account manager). Injected into the work server's env block as
|
|
471
|
+
* `RAISED_BY_PERSON_ID`, which `work-create` reads to default `raisedBy` so
|
|
472
|
+
* the intake :Task links RAISED_BY the manager without the one-tool agent
|
|
473
|
+
* resolving anything. Passive-only; ignored on every other spawn. */
|
|
474
|
+
raisedByPersonId?: string;
|
|
452
475
|
}
|
|
476
|
+
type McpConfigWriteResult = {
|
|
477
|
+
ok: true;
|
|
478
|
+
path: string;
|
|
479
|
+
bytes: number;
|
|
480
|
+
serverCount: number;
|
|
481
|
+
/** Task 178 — same descriptors written to the per-spawn mcp.json,
|
|
482
|
+
* after placeholder expansion. The tool-inventory probe re-spawns
|
|
483
|
+
* these to learn what each MCP server offers; routing through this
|
|
484
|
+
* field guarantees the probe sees the exact command/args/env claude
|
|
485
|
+
* code does, not a parallel rebuild of the same logic. */
|
|
486
|
+
resolvedServers: ReadonlyMap<string, McpProbeServerDescriptor>;
|
|
487
|
+
} | {
|
|
488
|
+
ok: false;
|
|
489
|
+
detail: string;
|
|
490
|
+
};
|
|
453
491
|
/** Task 165 — read the agent's `tools:` frontmatter line from
|
|
454
492
|
* `$CLAUDE_CONFIG_DIR/agents/<specialist>.md`. Loud-fails when the file
|
|
455
493
|
* is missing or when no `tools:` line exists in the frontmatter, since
|
|
@@ -504,6 +542,7 @@ export declare function classifySpecialistTools(tools: readonly string[], toolSu
|
|
|
504
542
|
* Task 476 unit coverage that asserts SESSION_ID equals the passed
|
|
505
543
|
* sessionId and never the accountId. */
|
|
506
544
|
export declare function buildMcpPlaceholders(p: Pick<McpConfigWriteParams, 'platformRoot' | 'accountId' | 'userId' | 'sessionId' | 'agentSlug' | 'agentScopeSlug' | 'logDir'>, env?: NodeJS.ProcessEnv): Record<string, string>;
|
|
545
|
+
export declare function writePerSpawnMcpConfig(p: McpConfigWriteParams): McpConfigWriteResult;
|
|
507
546
|
/** Test seam. Production never calls this; the `__` prefix matches the
|
|
508
547
|
* in-repo convention for non-API helpers. */
|
|
509
548
|
export declare function __setFirstTurnTimeoutMsForTests(ms: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty-spawner.d.ts","sourceRoot":"","sources":["../src/pty-spawner.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAA;AAiB3B,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAA;AAuF7B,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AA4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AE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,0BAA0B,EAAE,MAAM,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,uBAAuB,CAgDvF;AAED;;;;;;;;;sBASsB;AACtB,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAM,GAChB,UAAU,CAoBZ;AAED;;;;;;;;qBAQqB;AACrB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACd;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CASrC;AAED;2DAC2D;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAA;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;iFASiF;AACjF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAA;AAG5C,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,gBAAgB,CAalB"}
|
|
@@ -134,6 +134,11 @@ import { SPAWN_PERMISSION_MODES } from '../../../lib/models/dist/index.js';
|
|
|
134
134
|
// so an allowlist anchored on it stays native-excluding. Its only job is to
|
|
135
135
|
// make `--allowed-tools` present and non-empty so dontAsk fails closed.
|
|
136
136
|
const DONTASK_DENY_BASIS = 'mcp__none__deny-basis';
|
|
137
|
+
// Task 1483 — the single tool a WhatsApp passive spawn is allowed. Registered via
|
|
138
|
+
// the per-spawn `--mcp-config` (server key `work`, the plugin slug), so under
|
|
139
|
+
// `--strict-mcp-config` it is the ONLY tool the spawn can call. Same short-prefix
|
|
140
|
+
// shape as WEBCHAT_CHANNEL_REPLY_TOOL.
|
|
141
|
+
const WORK_CREATE_TOOL = 'mcp__work__work-create';
|
|
137
142
|
// Task 612 / 615 — every public spawn gets ZERO tool surface (webchat,
|
|
138
143
|
// whatsapp, telegram). Measured on realagent-code (claude 2.1.160, brand
|
|
139
144
|
// settings.json permissions.allow:["*"]): a per-spawn permissions.deny in the
|
|
@@ -532,7 +537,7 @@ export function buildMcpPlaceholders(p, env = process.env) {
|
|
|
532
537
|
CDP_PORT: env.CDP_PORT ?? '',
|
|
533
538
|
};
|
|
534
539
|
}
|
|
535
|
-
function writePerSpawnMcpConfig(p) {
|
|
540
|
+
export function writePerSpawnMcpConfig(p) {
|
|
536
541
|
const serversForRole = [];
|
|
537
542
|
if (p.specialistTools !== null) {
|
|
538
543
|
// Task 165 — specialist spawn. Project the agent's `tools:`
|
|
@@ -558,6 +563,20 @@ function writePerSpawnMcpConfig(p) {
|
|
|
558
563
|
for (const [name, desc] of p.toolSurface.mcpServers)
|
|
559
564
|
serversForRole.push([name, desc]);
|
|
560
565
|
}
|
|
566
|
+
else if (p.passive) {
|
|
567
|
+
// Task 1483 — a passive WhatsApp spawn rides role:'public' (so it inherits the
|
|
568
|
+
// restricted --strict-mcp-config + dontAsk posture) but registers ONLY the
|
|
569
|
+
// `work` server. Under --strict-mcp-config that makes mcp__work__work-create
|
|
570
|
+
// its sole tool. Fail closed if the work server is absent from the surface —
|
|
571
|
+
// never silently register nothing, which would leave the spawn unable to file
|
|
572
|
+
// the task it exists to file.
|
|
573
|
+
const work = p.toolSurface.mcpServers.get('work');
|
|
574
|
+
if (!work) {
|
|
575
|
+
p.logger('[wa-passive] op=mcp-config-error reason=work-server-absent');
|
|
576
|
+
return { ok: false, detail: 'passive spawn: work server absent from tool surface' };
|
|
577
|
+
}
|
|
578
|
+
serversForRole.push(['work', work]);
|
|
579
|
+
}
|
|
561
580
|
// Task 615 — the public agent is toolless by construction. Its per-spawn
|
|
562
581
|
// `.mcp.json` registers ZERO servers; booting any MCP child for a surface
|
|
563
582
|
// whose `--allowed-tools` is empty and whose permissions.deny blocks every
|
|
@@ -583,6 +602,14 @@ function writePerSpawnMcpConfig(p) {
|
|
|
583
602
|
}
|
|
584
603
|
mcpServers[name] = entry;
|
|
585
604
|
}
|
|
605
|
+
// Task 1493 — inject the raising manager's elementId into the passive work
|
|
606
|
+
// server's env so `work-create` defaults `raisedBy` from it and the intake
|
|
607
|
+
// :Task links RAISED_BY the manager. Passive-only and gated on a resolved
|
|
608
|
+
// elementId; every other spawn (and a passive spawn whose manager did not
|
|
609
|
+
// resolve) leaves the work env untouched.
|
|
610
|
+
if (p.passive && p.raisedByPersonId && mcpServers.work) {
|
|
611
|
+
mcpServers.work.env = { ...(mcpServers.work.env ?? {}), RAISED_BY_PERSON_ID: p.raisedByPersonId };
|
|
612
|
+
}
|
|
586
613
|
const payload = JSON.stringify({ mcpServers }, null, 2);
|
|
587
614
|
// Task 476 — filename uses the minted sessionId so two concurrent
|
|
588
615
|
// spawns never collide. Pre-476 this used `bridgeSuffixHint` (==
|
|
@@ -892,6 +919,15 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
892
919
|
// on every turn since Task 147. Operator (non-specialist) spawns retain
|
|
893
920
|
// the full composer.
|
|
894
921
|
const isSpecialistSpawn = typeof args.specialist === 'string' && args.specialist.length > 0;
|
|
922
|
+
// Task 1483 — a WhatsApp passive account-manager spawn. It ALWAYS rides
|
|
923
|
+
// role:'public' (the gateway dispatches it that way): the role gate is part of
|
|
924
|
+
// the invariant, so a passive flag on any other role is ignored rather than
|
|
925
|
+
// silently registering a different (e.g. full-admin) server surface while the
|
|
926
|
+
// allowlist locks to work-create. Never a specialist.
|
|
927
|
+
const isPassiveSpawn = args.passive === true && args.role === 'public' && !isSpecialistSpawn;
|
|
928
|
+
// The sub-account a passive spawn is scoped to; drives the per-spawn mcp-config
|
|
929
|
+
// accountId so the work server's env block carries ACCOUNT_ID = sub-account.
|
|
930
|
+
const passiveAccountId = isPassiveSpawn && args.targetAccountId ? args.targetAccountId : deps.accountId;
|
|
895
931
|
let appendSystemPrompt = '';
|
|
896
932
|
// The compose-system-prompt block carries per-section byte counts the
|
|
897
933
|
// [pty-spawn] log line emits later in this function. When the spawn is
|
|
@@ -904,9 +940,11 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
904
940
|
// args.agentSlug (Task 346), falling back to the bundled default public
|
|
905
941
|
// agent 'public' when a public spawn arrives with no slug. Admin reads
|
|
906
942
|
// agents/admin and carries no slug.
|
|
907
|
-
|
|
908
|
-
? { accountDir: deps.accountDir, role: '
|
|
909
|
-
:
|
|
943
|
+
isPassiveSpawn
|
|
944
|
+
? { accountDir: deps.accountDir, role: 'passive' }
|
|
945
|
+
: args.role === 'public'
|
|
946
|
+
? { accountDir: deps.accountDir, role: 'public', agentSlug: args.agentSlug ?? 'public' }
|
|
947
|
+
: { accountDir: deps.accountDir, role: 'admin' }, {
|
|
910
948
|
aboutOwner: args.aboutOwner,
|
|
911
949
|
dormantPlugins: args.dormantPlugins,
|
|
912
950
|
activePlugins: args.activePlugins,
|
|
@@ -1054,6 +1092,11 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
1054
1092
|
// exactly one tool: the channel reply tool. dontAsk auto-denies every
|
|
1055
1093
|
// other tool (the deny set is belt-and-suspenders over that), so the
|
|
1056
1094
|
// visitor can reply and do nothing else.
|
|
1095
|
+
// Task 1483 — a passive WhatsApp spawn (rides role:'public') exposes
|
|
1096
|
+
// exactly one tool: work-create. dontAsk auto-denies everything else, and
|
|
1097
|
+
// --strict-mcp-config registers no other server, so this is the sole tool.
|
|
1098
|
+
if (isPassiveSpawn)
|
|
1099
|
+
return [WORK_CREATE_TOOL];
|
|
1057
1100
|
if (isPublic) {
|
|
1058
1101
|
// A public spawn is wa XOR webchat XOR telegram; expose exactly the
|
|
1059
1102
|
// reply tool for whichever channel is attached (nothing otherwise).
|
|
@@ -1090,6 +1133,15 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
1090
1133
|
const memoryField = isPublic ? ` memory=denied(zero-tool-surface)` : '';
|
|
1091
1134
|
deps.logger(`tool-allowlist role=${args.role} count=${allowed.length} excluded=${excludedSample}${memoryField}`);
|
|
1092
1135
|
}
|
|
1136
|
+
// Task 1483 — the passive-spawn structural census. Emitted at spawn time with
|
|
1137
|
+
// the REALIZED surface: replyServer is whether any channel reply server is
|
|
1138
|
+
// attached (none for passive), tools is the resolved --allowed-tools. Healthy
|
|
1139
|
+
// is `replyServer=false tools=[mcp__work__work-create]`; replyServer=true or any
|
|
1140
|
+
// extra tool is a P0 structural breach (the lockdown regressed).
|
|
1141
|
+
if (isPassiveSpawn) {
|
|
1142
|
+
const replyServer = Boolean(args.webchatChannel || args.telegramChannel);
|
|
1143
|
+
deps.logger(`[wa-passive] op=spawn account=${passiveAccountId} sessionId=${sessionId} replyServer=${replyServer} tools=[${allowed.join(',')}]`);
|
|
1144
|
+
}
|
|
1093
1145
|
// Task 485 — observability for the gated/open public-spawn split. Mode
|
|
1094
1146
|
// is inferred from the presence of the slice token (caller's bridge has
|
|
1095
1147
|
// already gated the spawn on the cookie + accessMode). admin spawns are
|
|
@@ -1271,7 +1323,11 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
1271
1323
|
mcpConfigResult = writePerSpawnMcpConfig({
|
|
1272
1324
|
role: args.role,
|
|
1273
1325
|
toolSurface: deps.toolSurface,
|
|
1274
|
-
|
|
1326
|
+
// Task 1483 — a passive spawn registers the work server under the
|
|
1327
|
+
// sub-account, so its env block carries ACCOUNT_ID = sub-account and
|
|
1328
|
+
// work-create stamps the sub-account on the :Task. A non-passive public
|
|
1329
|
+
// spawn keeps the house account (it registers zero servers anyway).
|
|
1330
|
+
accountId: passiveAccountId,
|
|
1275
1331
|
userId: args.userId,
|
|
1276
1332
|
platformRoot: deps.platformRoot,
|
|
1277
1333
|
logDir: deps.logDir,
|
|
@@ -1281,6 +1337,11 @@ export async function spawnClaudeSession(deps, args) {
|
|
|
1281
1337
|
targetDir: deps.mcpConfigDir ?? tmpdir(),
|
|
1282
1338
|
logger: deps.logger,
|
|
1283
1339
|
specialistTools,
|
|
1340
|
+
passive: isPassiveSpawn,
|
|
1341
|
+
// Task 1493 — on a passive intake the personId carries the sub-account
|
|
1342
|
+
// manager who sent the inbound; feed it to the work env as the :Task's
|
|
1343
|
+
// RAISED_BY target. Undefined on every non-passive spawn.
|
|
1344
|
+
raisedByPersonId: isPassiveSpawn ? args.personId : undefined,
|
|
1284
1345
|
});
|
|
1285
1346
|
if (!mcpConfigResult.ok) {
|
|
1286
1347
|
return { ok: false, reason: 'mcp-config-write-failed', stderrTail: mcpConfigResult.detail };
|