@rubytech/create-maxy 1.0.881 → 1.0.884

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 (67) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-mcp/dist/index.js +45 -0
  3. package/payload/platform/lib/graph-mcp/dist/index.js.map +1 -1
  4. package/payload/platform/lib/graph-mcp/src/index.ts +47 -0
  5. package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.js +57 -9
  6. package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.js.map +1 -1
  7. package/payload/platform/lib/graph-write/dist/conversation-provenance.d.ts +26 -0
  8. package/payload/platform/lib/graph-write/dist/conversation-provenance.d.ts.map +1 -0
  9. package/payload/platform/lib/graph-write/dist/conversation-provenance.js +81 -0
  10. package/payload/platform/lib/graph-write/dist/conversation-provenance.js.map +1 -0
  11. package/payload/platform/lib/graph-write/dist/index.d.ts +38 -16
  12. package/payload/platform/lib/graph-write/dist/index.d.ts.map +1 -1
  13. package/payload/platform/lib/graph-write/dist/index.js +75 -35
  14. package/payload/platform/lib/graph-write/dist/index.js.map +1 -1
  15. package/payload/platform/lib/graph-write/src/__tests__/action-provenance-gate.test.ts +59 -9
  16. package/payload/platform/lib/graph-write/src/conversation-provenance.ts +140 -0
  17. package/payload/platform/lib/graph-write/src/index.ts +76 -35
  18. package/payload/platform/lib/mcp-eager/dist/index.d.ts +61 -0
  19. package/payload/platform/lib/mcp-eager/dist/index.d.ts.map +1 -0
  20. package/payload/platform/lib/mcp-eager/dist/index.js +49 -0
  21. package/payload/platform/lib/mcp-eager/dist/index.js.map +1 -0
  22. package/payload/platform/lib/mcp-eager/src/index.ts +78 -0
  23. package/payload/platform/lib/mcp-eager/tsconfig.json +8 -0
  24. package/payload/platform/package.json +2 -2
  25. package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.js +26 -2
  26. package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.js.map +1 -1
  27. package/payload/platform/plugins/admin/mcp/dist/index.js +36 -33
  28. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  29. package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts +5 -1
  30. package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts.map +1 -1
  31. package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js +24 -8
  32. package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js.map +1 -1
  33. package/payload/platform/plugins/contacts/PLUGIN.md +8 -0
  34. package/payload/platform/plugins/contacts/mcp/dist/index.js +10 -9
  35. package/payload/platform/plugins/contacts/mcp/dist/index.js.map +1 -1
  36. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.d.ts.map +1 -1
  37. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.js +17 -2
  38. package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.js.map +1 -1
  39. package/payload/platform/plugins/docs/references/internals.md +15 -2
  40. package/payload/platform/plugins/docs/references/plugins-guide.md +2 -0
  41. package/payload/platform/plugins/email/mcp/dist/index.js +10 -9
  42. package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -1
  43. package/payload/platform/plugins/memory/PLUGIN.md +5 -3
  44. package/payload/platform/plugins/memory/mcp/dist/index.js +10 -9
  45. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  46. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -1
  47. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +18 -1
  48. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -1
  49. package/payload/platform/plugins/scheduling/mcp/dist/index.js +9 -8
  50. package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -1
  51. package/payload/platform/plugins/tasks/mcp/dist/index.js +15 -14
  52. package/payload/platform/plugins/tasks/mcp/dist/index.js.map +1 -1
  53. package/payload/platform/plugins/telegram/mcp/dist/index.js +4 -3
  54. package/payload/platform/plugins/telegram/mcp/dist/index.js.map +1 -1
  55. package/payload/platform/plugins/workflows/mcp/dist/index.js +9 -8
  56. package/payload/platform/plugins/workflows/mcp/dist/index.js.map +1 -1
  57. package/payload/platform/scripts/__tests__/logs-read-prefix.sh +341 -0
  58. package/payload/platform/scripts/logs-read.sh +108 -41
  59. package/payload/platform/scripts/logs-read.test.sh +6 -2
  60. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
  61. package/payload/premium-plugins/real-agency/BUNDLE.md +1 -1
  62. package/payload/server/chunk-5PQU2HW2.js +11672 -0
  63. package/payload/server/chunk-ECAQVMRA.js +759 -0
  64. package/payload/server/chunk-K7S5T4VG.js +11534 -0
  65. package/payload/server/cloudflare-task-tracker-JNZXLW32.js +22 -0
  66. package/payload/server/maxy-edge.js +2 -2
  67. package/payload/server/server.js +38 -6
@@ -3,6 +3,11 @@
3
3
  // `[graph-*]` log family colocated.
4
4
  export * from "./audit.js";
5
5
 
6
+ // Task 997: re-export the conversation-provenance injector. MCP wrappers
7
+ // (contacts, memory) import it from the package root so the helper, the
8
+ // gate, and the label set live in one import surface.
9
+ export * from "./conversation-provenance.js";
10
+
6
11
  /**
7
12
  * Write doctrine (Task 673): a node without at least one adjacency is noise,
8
13
  * not knowledge. `writeNodeWithEdges` is the single primitive every graph
@@ -13,21 +18,33 @@ export * from "./audit.js";
13
18
  * maps, and flat props are queryable — `MATCH (n) WHERE n.createdBySession
14
19
  * = $id RETURN n` is the forensic entry point).
15
20
  *
16
- * Process provenance doctrine (Task 885): writes targeting any label in
17
- * `ACTION_PROVENANCE_LABELS` (Person, UserProfile, AdminUser, Organization,
18
- * LocalBusiness, CloudflareTunnel, CloudflareHostname) must include exactly
19
- * one inbound `:PRODUCED` edge whose source is a `:Task` node. This makes
20
- * every durable LLM-tool-driven entity creation traversable from the Task
21
- * node that produced it, and forward from Task→Conversation via
22
- * `:RAISED_DURING`. Bootstrap writes (`createdBy.agent === 'system'`) are
23
- * exempt installer / migration / lazy-create paths run as system writers.
21
+ * Process provenance doctrine (Task 885, widened by Task 997): writes
22
+ * targeting any label in `ACTION_PROVENANCE_LABELS` (Person, UserProfile,
23
+ * AdminUser, Organization, LocalBusiness, CloudflareTunnel,
24
+ * CloudflareHostname) must include at least one inbound `:PRODUCED` edge
25
+ * whose source carries one of `:Task`, `:Conversation`, or `:Message` (the
26
+ * label set is checked against the actual `labels()` of the target node, so
27
+ * subtype labels like `:AdminConversation`, `:UserMessage`, `:AssistantMessage`,
28
+ * and `:AdminMessage` all qualify). This makes every durable LLM-tool-driven
29
+ * entity creation traversable from either:
30
+ * - the Task that produced it (autonomous workflows: onboarding skill,
31
+ * cloudflare tunnel-login, etc.), or
32
+ * - the Conversation/Message turn that triggered it (direct admin asks —
33
+ * "add Anneke Roux as person" stamps a `:PRODUCED` edge from the active
34
+ * `:AdminConversation` so the entity is traceable to its causal turn
35
+ * without forcing the agent to mint a synthetic `:Task` per ask).
36
+ * Task 997 broadened the gate after the Task-only requirement created
37
+ * redundant-Task bloat for direct admin asks; the Task-mediated path stays
38
+ * canonical for autonomous workflows. Bootstrap writes
39
+ * (`createdBy.agent === 'system'`) are exempt — installer / migration /
40
+ * lazy-create paths run as system writers.
24
41
  *
25
42
  * Rejection paths (every one emits a stderr log the admin server pipes to
26
43
  * server.log, so orphan pressure is visible per-write not just in the
27
44
  * hourly [graph-health] signal):
28
45
  * - zero relationships → `[graph-write] reject reason=zero-relationships`
29
46
  * - unresolved target id → `[graph-write] reject reason=unresolved-target`
30
- * - missing action provenance → `[graph-write] reject reason=missing-action-provenance`
47
+ * - missing provenance → `[graph-write] reject reason=missing-provenance`
31
48
  * - removed-feature write → `[graph-write] reject reason=removed-feature`
32
49
  * (`:ReviewAlert` and `:Event {actionTool:"review-digest-compose"}` are
33
50
  * deleted features; the gate catches doctrine-compliant writers
@@ -42,16 +59,18 @@ export * from "./audit.js";
42
59
  */
43
60
 
44
61
  /**
45
- * Labels that require an inbound `:PRODUCED` edge from a `:Task` (Task 885).
46
- * Bootstrap writes with `createdBy.agent === 'system'` are exempt that
47
- * carve-out covers PIN-setup `writeAdminUserAndPerson`, schema migrations,
48
- * and the lazy `loadUserProfile` MERGE path that bypasses this primitive
49
- * entirely (raw Cypher in `platform/ui/app/lib/neo4j-store.ts`).
62
+ * Labels that require an inbound `:PRODUCED` edge from a `:Task`,
63
+ * `:Conversation`, or `:Message` (Task 885, widened by Task 997). Bootstrap
64
+ * writes with `createdBy.agent === 'system'` are exempt — that carve-out
65
+ * covers PIN-setup `writeAdminUserAndPerson`, schema migrations, and the
66
+ * lazy `loadUserProfile` MERGE path that bypasses this primitive entirely
67
+ * (raw Cypher in `platform/ui/app/lib/neo4j-store.ts`).
50
68
  *
51
69
  * The set is intentionally not exhaustive — labels added here become a
52
70
  * blocking gate for every LLM-tool write of that label. Add a label only
53
- * after every legitimate writer of it can either (a) carry a Task-PRODUCED
54
- * edge, or (b) declare itself as `agent: 'system'`.
71
+ * after every legitimate writer of it can either (a) carry a PRODUCED edge
72
+ * from one of the accepted source families, or (b) declare itself as
73
+ * `agent: 'system'`.
55
74
  */
56
75
  export const ACTION_PROVENANCE_LABELS: ReadonlySet<string> = new Set([
57
76
  "Person",
@@ -63,6 +82,18 @@ export const ACTION_PROVENANCE_LABELS: ReadonlySet<string> = new Set([
63
82
  "CloudflareHostname",
64
83
  ]);
65
84
 
85
+ /**
86
+ * Source labels that satisfy the inbound-PRODUCED gate. The check is
87
+ * performed against the full `labels()` array of the target node, so
88
+ * subtype labels (`:AdminConversation`, `:UserMessage`, etc.) qualify
89
+ * because they carry the parent `:Conversation` / `:Message` label too.
90
+ */
91
+ export const PROVENANCE_SOURCE_LABELS: ReadonlySet<string> = new Set([
92
+ "Task",
93
+ "Conversation",
94
+ "Message",
95
+ ]);
96
+
66
97
  function requiresActionProvenance(labels: readonly string[]): boolean {
67
98
  for (const label of labels) {
68
99
  if (ACTION_PROVENANCE_LABELS.has(label)) return true;
@@ -70,7 +101,7 @@ function requiresActionProvenance(labels: readonly string[]): boolean {
70
101
  return false;
71
102
  }
72
103
 
73
- function findProducedFromTaskCandidates(
104
+ function findProvenanceCandidates(
74
105
  relationships: readonly GraphRelationship[],
75
106
  ): GraphRelationship[] {
76
107
  return relationships.filter(
@@ -239,32 +270,42 @@ export async function writeNodeWithEdges(
239
270
  );
240
271
  }
241
272
 
242
- // Process provenance gate (Task 885). Labels in
243
- // ACTION_PROVENANCE_LABELS require a `:Task` source on at least one
244
- // inbound :PRODUCED edge so every durable LLM-tool entity write is
245
- // traversable from the Task that produced it. Bootstrap writes
246
- // (createdBy.agent === 'system') are exempt installer + migration
247
- // paths predate any Task. The check runs INSIDE the transaction so
248
- // the labels-by-target map is consistent with target resolution.
249
- let producedByTaskId: string | null = null;
273
+ // Process provenance gate (Task 885, widened by Task 997). Labels in
274
+ // ACTION_PROVENANCE_LABELS require an inbound :PRODUCED edge from a
275
+ // node carrying one of PROVENANCE_SOURCE_LABELS (:Task, :Conversation,
276
+ // :Message subtype labels qualify via the labels() array). This
277
+ // makes every durable LLM-tool entity write traversable to either the
278
+ // Task that produced it (autonomous workflows) or the
279
+ // Conversation/Message turn that triggered it (direct admin asks).
280
+ // Bootstrap writes (createdBy.agent === 'system') are exempt —
281
+ // installer + migration paths predate any provenance node. The check
282
+ // runs INSIDE the transaction so the labels-by-target map is
283
+ // consistent with target resolution.
284
+ let provenanceSourceId: string | null = null;
285
+ let provenanceSourceLabel: string | null = null;
250
286
  if (
251
287
  requiresActionProvenance(labels) &&
252
288
  (createdBy.agent ?? "") !== "system"
253
289
  ) {
254
- const candidates = findProducedFromTaskCandidates(relationships);
255
- const taskCandidates = candidates.filter((r) => {
256
- const lbls = labelsByTarget.get(r.targetNodeId);
257
- return Array.isArray(lbls) && lbls.includes("Task");
258
- });
259
- if (taskCandidates.length === 0) {
290
+ const candidates = findProvenanceCandidates(relationships);
291
+ const matched = candidates
292
+ .map((r) => {
293
+ const lbls = labelsByTarget.get(r.targetNodeId);
294
+ if (!Array.isArray(lbls)) return null;
295
+ const sourceLabel = lbls.find((l) => PROVENANCE_SOURCE_LABELS.has(l));
296
+ return sourceLabel ? { rel: r, sourceLabel } : null;
297
+ })
298
+ .filter((m): m is { rel: GraphRelationship; sourceLabel: string } => m !== null);
299
+ if (matched.length === 0) {
260
300
  process.stderr.write(
261
- `[graph-write] reject reason=missing-action-provenance labels=${labelCsv} agent=${agentLabel}\n`
301
+ `[graph-write] reject reason=missing-provenance labels=${labelCsv} agent=${agentLabel}\n`
262
302
  );
263
303
  throw new Error(
264
- `missing-action-provenance: write to ${labelCsv} requires an inbound :PRODUCED edge from a :Task (createdBy.agent='${agentLabel}'). Pass producedByTaskId on the write call task-create at the start of the flow and thread the returned taskId through every subsequent memory-write for one of these labels.`
304
+ `missing-provenance: write to ${labelCsv} requires an inbound :PRODUCED edge from a :Task, :Conversation, or :Message (createdBy.agent='${agentLabel}'). Either pass producedByTaskId on the write (autonomous workflows: call task-create at the start of the flow and thread the returned taskId), or rely on the MCP wrapper's CONVERSATION_NODE_ID env-stamp injection (direct admin asks).`
265
305
  );
266
306
  }
267
- producedByTaskId = taskCandidates[0].targetNodeId;
307
+ provenanceSourceId = matched[0].rel.targetNodeId;
308
+ provenanceSourceLabel = matched[0].sourceLabel;
268
309
  }
269
310
 
270
311
  let nodeRes;
@@ -337,7 +378,7 @@ export async function writeNodeWithEdges(
337
378
  }
338
379
 
339
380
  process.stderr.write(
340
- `[graph-write] accepted labels=${labelCsv} edges=${edgesCreated} createdByAgent=${createdBy.agent ?? "unknown"} createdByTool=${createdBy.tool ?? createdBy.source ?? "unknown"} producedByTask=${producedByTaskId ?? "none"}\n`
381
+ `[graph-write] accepted labels=${labelCsv} edges=${edgesCreated} createdByAgent=${createdBy.agent ?? "unknown"} createdByTool=${createdBy.tool ?? createdBy.source ?? "unknown"} producedBy=${provenanceSourceLabel ?? "none"}:${provenanceSourceId ?? "none"}\n`
341
382
  );
342
383
 
343
384
  return { nodeId, labels: nodeLabels, edgesCreated };
@@ -0,0 +1,61 @@
1
+ /**
2
+ * MCP eager-load helper (Task 1001).
3
+ *
4
+ * The Claude Code SDK marks every MCP tool as deferred-by-default: the model
5
+ * cannot invoke an MCP tool until it has first called `ToolSearch` to load
6
+ * the schema, which costs one extra turn per unique schema. The SDK's per-
7
+ * tool override is `_meta["anthropic/alwaysLoad"]: true` on the tool's
8
+ * `tools/list` entry, which `isDeferredTool` reads to flip the default.
9
+ *
10
+ * The MCP SDK exposes that channel only via `server.registerTool(name,
11
+ * config, handler)` (legacy `server.tool(name, desc, schema, handler)`
12
+ * has no `_meta` parameter). This helper wraps the registerTool call so
13
+ * every plugin's index.ts can opt a tool into eager-load with one line
14
+ * matching the shape of the existing four-arg `server.tool` overload.
15
+ *
16
+ * Use for every tool that appears in `ADMIN_CORE_TOOLS` — the permission
17
+ * allow-list IS the curation per the CEO review on Task 1001. Tools the
18
+ * admin should not see should be removed from the allow-list, not merely
19
+ * left deferred.
20
+ */
21
+ /** Wire-format metadata key the Claude Code SDK reads. */
22
+ export declare const ALWAYS_LOAD_META_KEY: "anthropic/alwaysLoad";
23
+ /**
24
+ * Loose structural type for any object exposing a `registerTool` method. The
25
+ * MCP SDK ships dual ESM/CJS packages with conditional exports, so importing
26
+ * the concrete `McpServer` type here would force every consumer to compile
27
+ * under the same resolution mode — they don't. Keep this contract minimal:
28
+ * we only need the method to exist; we cast internally to drive the
29
+ * upstream generic overloads which differ between SDK versions.
30
+ */
31
+ type EagerCapableServer = {
32
+ registerTool: (...args: any[]) => any;
33
+ };
34
+ /**
35
+ * Local structural type for a Zod raw shape. We deliberately do NOT import
36
+ * `ZodRawShape` from zod itself — plugin workspaces ship pinned zod v3 in
37
+ * their nested `node_modules/zod`, while `platform/node_modules/zod` is v4,
38
+ * and the two `ZodRawShape` types are structurally incompatible (v4
39
+ * introduced the `_zod` brand on `ZodType`). A typed-by-value `unknown`
40
+ * member is enough: TypeScript treats it as compatible with both v3 and v4
41
+ * shapes, while still constraining the generic to "an object whose values
42
+ * are zod-like" so the caller's destructured handler args stay typed via
43
+ * the SDK's own overload resolution downstream.
44
+ */
45
+ type LocalZodRawShape = Record<string, unknown>;
46
+ /**
47
+ * Register an MCP tool that the Claude Code SDK eager-loads into the
48
+ * model's prompt at session boot, bypassing the ToolSearch round-trip.
49
+ *
50
+ * Mirrors the four-arg `server.tool(name, description, inputSchema, handler)`
51
+ * call shape — the only overload in use across our plugins — so migration
52
+ * is mechanical: replace `server.tool(` with `eagerTool(server, `.
53
+ *
54
+ * The helper deliberately does not constrain handler-arg types itself; the
55
+ * downstream `server.registerTool` invocation inside this function passes
56
+ * the shape through, and the upstream MCP SDK's overload (resolved against
57
+ * the consumer's own zod version) infers the handler args.
58
+ */
59
+ export declare function eagerTool<Args extends LocalZodRawShape>(server: EagerCapableServer, name: string, description: string, inputSchema: Args, handler: (...args: any[]) => any): void;
60
+ export {};
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,EAAG,sBAA+B,CAAC;AAEpE;;;;;;;GAOG;AAEH,KAAK,kBAAkB,GAAG;IAAE,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CAAE,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,SAAS,gBAAgB,EACrD,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,IAAI,EAEjB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAC/B,IAAI,CAUN"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALWAYS_LOAD_META_KEY = void 0;
4
+ exports.eagerTool = eagerTool;
5
+ /**
6
+ * MCP eager-load helper (Task 1001).
7
+ *
8
+ * The Claude Code SDK marks every MCP tool as deferred-by-default: the model
9
+ * cannot invoke an MCP tool until it has first called `ToolSearch` to load
10
+ * the schema, which costs one extra turn per unique schema. The SDK's per-
11
+ * tool override is `_meta["anthropic/alwaysLoad"]: true` on the tool's
12
+ * `tools/list` entry, which `isDeferredTool` reads to flip the default.
13
+ *
14
+ * The MCP SDK exposes that channel only via `server.registerTool(name,
15
+ * config, handler)` (legacy `server.tool(name, desc, schema, handler)`
16
+ * has no `_meta` parameter). This helper wraps the registerTool call so
17
+ * every plugin's index.ts can opt a tool into eager-load with one line
18
+ * matching the shape of the existing four-arg `server.tool` overload.
19
+ *
20
+ * Use for every tool that appears in `ADMIN_CORE_TOOLS` — the permission
21
+ * allow-list IS the curation per the CEO review on Task 1001. Tools the
22
+ * admin should not see should be removed from the allow-list, not merely
23
+ * left deferred.
24
+ */
25
+ /** Wire-format metadata key the Claude Code SDK reads. */
26
+ exports.ALWAYS_LOAD_META_KEY = "anthropic/alwaysLoad";
27
+ /**
28
+ * Register an MCP tool that the Claude Code SDK eager-loads into the
29
+ * model's prompt at session boot, bypassing the ToolSearch round-trip.
30
+ *
31
+ * Mirrors the four-arg `server.tool(name, description, inputSchema, handler)`
32
+ * call shape — the only overload in use across our plugins — so migration
33
+ * is mechanical: replace `server.tool(` with `eagerTool(server, `.
34
+ *
35
+ * The helper deliberately does not constrain handler-arg types itself; the
36
+ * downstream `server.registerTool` invocation inside this function passes
37
+ * the shape through, and the upstream MCP SDK's overload (resolved against
38
+ * the consumer's own zod version) infers the handler args.
39
+ */
40
+ function eagerTool(server, name, description, inputSchema,
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ handler) {
43
+ server.registerTool(name, {
44
+ description,
45
+ inputSchema,
46
+ _meta: { [exports.ALWAYS_LOAD_META_KEY]: true },
47
+ }, handler);
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA4DA,8BAiBC;AA7ED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,0DAA0D;AAC7C,QAAA,oBAAoB,GAAG,sBAA+B,CAAC;AA0BpE;;;;;;;;;;;;GAYG;AACH,SAAgB,SAAS,CACvB,MAA0B,EAC1B,IAAY,EACZ,WAAmB,EACnB,WAAiB;AACjB,8DAA8D;AAC9D,OAAgC;IAEhC,MAAM,CAAC,YAAY,CACjB,IAAI,EACJ;QACE,WAAW;QACX,WAAW;QACX,KAAK,EAAE,EAAE,CAAC,4BAAoB,CAAC,EAAE,IAAI,EAAE;KACxC,EACD,OAAO,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * MCP eager-load helper (Task 1001).
3
+ *
4
+ * The Claude Code SDK marks every MCP tool as deferred-by-default: the model
5
+ * cannot invoke an MCP tool until it has first called `ToolSearch` to load
6
+ * the schema, which costs one extra turn per unique schema. The SDK's per-
7
+ * tool override is `_meta["anthropic/alwaysLoad"]: true` on the tool's
8
+ * `tools/list` entry, which `isDeferredTool` reads to flip the default.
9
+ *
10
+ * The MCP SDK exposes that channel only via `server.registerTool(name,
11
+ * config, handler)` (legacy `server.tool(name, desc, schema, handler)`
12
+ * has no `_meta` parameter). This helper wraps the registerTool call so
13
+ * every plugin's index.ts can opt a tool into eager-load with one line
14
+ * matching the shape of the existing four-arg `server.tool` overload.
15
+ *
16
+ * Use for every tool that appears in `ADMIN_CORE_TOOLS` — the permission
17
+ * allow-list IS the curation per the CEO review on Task 1001. Tools the
18
+ * admin should not see should be removed from the allow-list, not merely
19
+ * left deferred.
20
+ */
21
+ /** Wire-format metadata key the Claude Code SDK reads. */
22
+ export const ALWAYS_LOAD_META_KEY = "anthropic/alwaysLoad" as const;
23
+
24
+ /**
25
+ * Loose structural type for any object exposing a `registerTool` method. The
26
+ * MCP SDK ships dual ESM/CJS packages with conditional exports, so importing
27
+ * the concrete `McpServer` type here would force every consumer to compile
28
+ * under the same resolution mode — they don't. Keep this contract minimal:
29
+ * we only need the method to exist; we cast internally to drive the
30
+ * upstream generic overloads which differ between SDK versions.
31
+ */
32
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
+ type EagerCapableServer = { registerTool: (...args: any[]) => any };
34
+
35
+ /**
36
+ * Local structural type for a Zod raw shape. We deliberately do NOT import
37
+ * `ZodRawShape` from zod itself — plugin workspaces ship pinned zod v3 in
38
+ * their nested `node_modules/zod`, while `platform/node_modules/zod` is v4,
39
+ * and the two `ZodRawShape` types are structurally incompatible (v4
40
+ * introduced the `_zod` brand on `ZodType`). A typed-by-value `unknown`
41
+ * member is enough: TypeScript treats it as compatible with both v3 and v4
42
+ * shapes, while still constraining the generic to "an object whose values
43
+ * are zod-like" so the caller's destructured handler args stay typed via
44
+ * the SDK's own overload resolution downstream.
45
+ */
46
+ type LocalZodRawShape = Record<string, unknown>;
47
+
48
+ /**
49
+ * Register an MCP tool that the Claude Code SDK eager-loads into the
50
+ * model's prompt at session boot, bypassing the ToolSearch round-trip.
51
+ *
52
+ * Mirrors the four-arg `server.tool(name, description, inputSchema, handler)`
53
+ * call shape — the only overload in use across our plugins — so migration
54
+ * is mechanical: replace `server.tool(` with `eagerTool(server, `.
55
+ *
56
+ * The helper deliberately does not constrain handler-arg types itself; the
57
+ * downstream `server.registerTool` invocation inside this function passes
58
+ * the shape through, and the upstream MCP SDK's overload (resolved against
59
+ * the consumer's own zod version) infers the handler args.
60
+ */
61
+ export function eagerTool<Args extends LocalZodRawShape>(
62
+ server: EagerCapableServer,
63
+ name: string,
64
+ description: string,
65
+ inputSchema: Args,
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ handler: (...args: any[]) => any,
68
+ ): void {
69
+ server.registerTool(
70
+ name,
71
+ {
72
+ description,
73
+ inputSchema,
74
+ _meta: { [ALWAYS_LOAD_META_KEY]: true },
75
+ },
76
+ handler,
77
+ );
78
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["src"]
8
+ }
@@ -6,8 +6,8 @@
6
6
  "plugins/*/mcp"
7
7
  ],
8
8
  "scripts": {
9
- "build": "tsc -p lib/models/tsconfig.json && tsc -p lib/anthropic-key/tsconfig.json && tsc -p lib/oauth-llm/tsconfig.json && tsc -p lib/mcp-stderr-tee/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/screening-patterns/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && NODE_OPTIONS='--max-old-space-size=8192' tsc -b plugins/*/mcp/tsconfig.json",
10
- "build:lib": "tsc -p lib/models/tsconfig.json && tsc -p lib/anthropic-key/tsconfig.json && tsc -p lib/oauth-llm/tsconfig.json && tsc -p lib/mcp-stderr-tee/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/screening-patterns/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json",
9
+ "build": "tsc -p lib/models/tsconfig.json && tsc -p lib/anthropic-key/tsconfig.json && tsc -p lib/oauth-llm/tsconfig.json && tsc -p lib/mcp-stderr-tee/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/screening-patterns/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && NODE_OPTIONS='--max-old-space-size=8192' tsc -b plugins/*/mcp/tsconfig.json",
10
+ "build:lib": "tsc -p lib/models/tsconfig.json && tsc -p lib/anthropic-key/tsconfig.json && tsc -p lib/oauth-llm/tsconfig.json && tsc -p lib/mcp-stderr-tee/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/screening-patterns/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json",
11
11
  "build:memory": "tsc -p plugins/memory/mcp/tsconfig.json",
12
12
  "build:contacts": "tsc -p plugins/contacts/mcp/tsconfig.json",
13
13
  "build:telegram": "tsc -p plugins/telegram/mcp/tsconfig.json",
@@ -53,15 +53,39 @@ describe("findSkillOwners", () => {
53
53
  });
54
54
  });
55
55
  describe("computePluginReadHint", () => {
56
- it("returns the owning plugin name when exactly one sibling owns the skill", () => {
56
+ it("returns the owner and canonical SKILL.md path when one sibling owns the skill referenced via file", () => {
57
57
  seedSkill("cloudflare", "setup-tunnel");
58
58
  const hint = computePluginReadHint(root, "admin", "skills/setup-tunnel/SKILL.md");
59
- expect(hint).toBe("cloudflare");
59
+ expect(hint).toEqual({ pluginName: "cloudflare", file: "skills/setup-tunnel/SKILL.md" });
60
60
  });
61
61
  it("returns null when no plugin owns the requested skill", () => {
62
62
  seedSkill("admin", "onboarding");
63
63
  const hint = computePluginReadHint(root, "admin", "skills/imaginary/SKILL.md");
64
64
  expect(hint).toBeNull();
65
65
  });
66
+ // Task 1000 — wrong-`pluginName` shape: the skill slug is buried inside
67
+ // pluginName instead of the file path. The hint must still surface both
68
+ // the corrected pluginName and the canonical SKILL.md file path.
69
+ it("hints when skills/<slug> is buried in pluginName and file defaults to PLUGIN.md", () => {
70
+ seedSkill("admin", "plainly");
71
+ const hint = computePluginReadHint(root, "admin/skills/plainly", "PLUGIN.md");
72
+ expect(hint).toEqual({ pluginName: "admin", file: "skills/plainly/SKILL.md" });
73
+ });
74
+ it("hints when skills/<slug> is buried in pluginName and file is the bare SKILL.md", () => {
75
+ seedSkill("admin", "plainly");
76
+ const hint = computePluginReadHint(root, "admin/skills/plainly", "SKILL.md");
77
+ expect(hint).toEqual({ pluginName: "admin", file: "skills/plainly/SKILL.md" });
78
+ });
79
+ it("hints with the real owner when the pluginName prefix is wrong (contacts/skills/plainly → admin)", () => {
80
+ seedSkill("admin", "plainly");
81
+ const hint = computePluginReadHint(root, "contacts/skills/plainly", "PLUGIN.md");
82
+ expect(hint).toEqual({ pluginName: "admin", file: "skills/plainly/SKILL.md" });
83
+ });
84
+ it("returns null when the skill name extracted from pluginName is ambiguous across plugins", () => {
85
+ seedSkill("admin", "plainly");
86
+ seedSkill("contacts", "plainly");
87
+ const hint = computePluginReadHint(root, "admin/skills/plainly", "PLUGIN.md");
88
+ expect(hint).toBeNull();
89
+ });
66
90
  });
67
91
  //# sourceMappingURL=plugin-read-skill-resolution.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-read-skill-resolution.test.js","sourceRoot":"","sources":["../../src/__tests__/plugin-read-skill-resolution.test.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,oEAAoE;AACpE,6DAA6D;AAC7D,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,mEAAmE;AACnE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,IAAI,IAAY,CAAC;AAEjB,UAAU,CAAC,GAAG,EAAE;IACd,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC;AACpD,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,GAAG,EAAE;IACb,MAAM,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC,CAAC;AAEH,SAAS,SAAS,CAAC,MAAc,EAAE,KAAa;IAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK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