wyrm-mcp 7.2.1 → 7.2.3
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/LICENSE +26 -667
- package/NOTICE +14 -33
- package/dist/activation.d.ts +8 -9
- package/dist/activation.d.ts.map +1 -1
- package/dist/activation.js +1 -60
- package/dist/activation.js.map +1 -1
- package/dist/agent-daemon.d.ts +1 -1
- package/dist/agent-daemon.js +4 -281
- package/dist/agent-loop.d.ts +1 -1
- package/dist/agent-loop.js +7 -332
- package/dist/analytics.d.ts +1 -1
- package/dist/analytics.js +13 -236
- package/dist/attribution.d.ts +1 -1
- package/dist/attribution.js +1 -49
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +2 -457
- package/dist/auto-capture.js +3 -138
- package/dist/auto-orchestrator.d.ts +1 -1
- package/dist/auto-orchestrator.js +1 -325
- package/dist/autoconfig.d.ts +1 -1
- package/dist/autoconfig.js +39 -840
- package/dist/buddy-runner.d.ts +1 -1
- package/dist/buddy-runner.js +1 -109
- package/dist/buddy.d.ts +1 -1
- package/dist/buddy.js +14 -564
- package/dist/build-flags.d.ts +6 -8
- package/dist/build-flags.d.ts.map +1 -1
- package/dist/build-flags.js +1 -17
- package/dist/build-flags.js.map +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/capabilities.js +3 -183
- package/dist/capture.d.ts +1 -1
- package/dist/capture.js +1 -56
- package/dist/causality.d.ts +1 -1
- package/dist/causality.js +6 -107
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +20 -281
- package/dist/cloud/cli.js +5 -541
- package/dist/cloud/client.js +1 -221
- package/dist/cloud/crypto.js +1 -85
- package/dist/cloud/machine-id.d.ts +1 -1
- package/dist/cloud/machine-id.js +2 -113
- package/dist/cloud/recovery.js +1 -60
- package/dist/cloud/sync-engine.js +7 -543
- package/dist/cloud-backup.d.ts +1 -1
- package/dist/cloud-backup.js +5 -579
- package/dist/cloud-profile.d.ts +1 -1
- package/dist/cloud-profile.js +1 -138
- package/dist/cloud-sync-entrypoint.d.ts +1 -1
- package/dist/cloud-sync-entrypoint.js +1 -47
- package/dist/cloud-sync.d.ts +1 -1
- package/dist/cloud-sync.js +2 -309
- package/dist/constellation.d.ts +1 -1
- package/dist/constellation.js +12 -168
- package/dist/context-build-budgeted.d.ts +1 -1
- package/dist/context-build-budgeted.js +4 -144
- package/dist/context-ranking.d.ts +1 -1
- package/dist/context-ranking.js +1 -69
- package/dist/crypto.d.ts +1 -1
- package/dist/crypto.js +1 -179
- package/dist/daemon-write-endpoint.d.ts +1 -1
- package/dist/daemon-write-endpoint.js +1 -290
- package/dist/daemon-writer.d.ts +1 -1
- package/dist/daemon-writer.js +2 -406
- package/dist/database.d.ts +1 -1
- package/dist/database.js +43 -1110
- package/dist/deprecations.js +2 -162
- package/dist/design.d.ts +1 -1
- package/dist/design.js +13 -141
- package/dist/event-replication.d.ts +1 -1
- package/dist/event-replication.js +1 -112
- package/dist/events-sse.d.ts +1 -1
- package/dist/events-sse.js +7 -43
- package/dist/events.js +6 -238
- package/dist/failure-patterns.d.ts +1 -1
- package/dist/failure-patterns.js +42 -659
- package/dist/federation.d.ts +1 -1
- package/dist/federation.js +12 -236
- package/dist/goals.d.ts +1 -1
- package/dist/goals.js +13 -101
- package/dist/golden.js +3 -355
- package/dist/handlers/agent.d.ts +1 -1
- package/dist/handlers/agent.js +4 -165
- package/dist/handlers/alias-adapters.d.ts +1 -1
- package/dist/handlers/alias-adapters.js +1 -129
- package/dist/handlers/aliases.d.ts +1 -1
- package/dist/handlers/aliases.js +1 -171
- package/dist/handlers/audit.d.ts +1 -1
- package/dist/handlers/audit.js +1 -87
- package/dist/handlers/boundary.d.ts +1 -1
- package/dist/handlers/boundary.js +1 -221
- package/dist/handlers/capture.d.ts +1 -1
- package/dist/handlers/capture.js +73 -1109
- package/dist/handlers/causality.d.ts +1 -1
- package/dist/handlers/causality.js +7 -114
- package/dist/handlers/cloud.d.ts +1 -1
- package/dist/handlers/cloud.js +85 -382
- package/dist/handlers/companion.d.ts +1 -1
- package/dist/handlers/companion.js +28 -459
- package/dist/handlers/datalake.d.ts +1 -1
- package/dist/handlers/datalake.js +7 -187
- package/dist/handlers/dispatch-context.d.ts +1 -1
- package/dist/handlers/dispatch-context.js +0 -22
- package/dist/handlers/entity.d.ts +1 -1
- package/dist/handlers/entity.js +25 -256
- package/dist/handlers/events.d.ts +1 -1
- package/dist/handlers/events.js +16 -335
- package/dist/handlers/failure.d.ts +1 -1
- package/dist/handlers/failure.js +13 -340
- package/dist/handlers/goals.d.ts +1 -1
- package/dist/handlers/goals.js +4 -296
- package/dist/handlers/intelligence.d.ts +1 -1
- package/dist/handlers/intelligence.js +126 -674
- package/dist/handlers/invoicing.d.ts +1 -1
- package/dist/handlers/invoicing.js +1 -70
- package/dist/handlers/mcpclient.d.ts +1 -1
- package/dist/handlers/mcpclient.js +6 -137
- package/dist/handlers/orchestration.d.ts +1 -1
- package/dist/handlers/orchestration.js +40 -125
- package/dist/handlers/output-schemas.d.ts +1 -1
- package/dist/handlers/output-schemas.js +1 -24
- package/dist/handlers/presence.d.ts +1 -1
- package/dist/handlers/presence.js +3 -99
- package/dist/handlers/project.d.ts +1 -1
- package/dist/handlers/project.js +28 -182
- package/dist/handlers/prompts.d.ts +1 -1
- package/dist/handlers/prompts.js +6 -157
- package/dist/handlers/quest.d.ts +1 -1
- package/dist/handlers/quest.js +4 -224
- package/dist/handlers/recall.d.ts +1 -1
- package/dist/handlers/recall.js +11 -218
- package/dist/handlers/registry.d.ts +1 -1
- package/dist/handlers/registry.js +1 -167
- package/dist/handlers/resources.d.ts +1 -1
- package/dist/handlers/resources.js +1 -288
- package/dist/handlers/review.d.ts +1 -1
- package/dist/handlers/review.js +11 -74
- package/dist/handlers/run.d.ts +1 -1
- package/dist/handlers/run.js +17 -487
- package/dist/handlers/search.d.ts +1 -1
- package/dist/handlers/search.js +15 -326
- package/dist/handlers/session.d.ts +1 -1
- package/dist/handlers/session.js +28 -615
- package/dist/handlers/share.d.ts +1 -1
- package/dist/handlers/share.js +8 -184
- package/dist/handlers/shims.d.ts +1 -1
- package/dist/handlers/shims.js +1 -464
- package/dist/handlers/skill.d.ts +1 -1
- package/dist/handlers/skill.js +67 -449
- package/dist/handlers/survivors.d.ts +1 -1
- package/dist/handlers/survivors.js +1 -120
- package/dist/handlers/symbols.d.ts +1 -1
- package/dist/handlers/symbols.js +8 -109
- package/dist/handlers/syncops.d.ts +1 -1
- package/dist/handlers/syncops.js +4 -302
- package/dist/handlers/types.d.ts +1 -1
- package/dist/handlers/types.js +1 -27
- package/dist/harvest.d.ts +1 -1
- package/dist/harvest.js +5 -191
- package/dist/hours.d.ts +1 -1
- package/dist/hours.js +7 -156
- package/dist/http-auth.d.ts +1 -1
- package/dist/http-auth.js +3 -321
- package/dist/http-fast.js +21 -1137
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -47
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -924
- package/dist/index.js.map +1 -1
- package/dist/indexer.d.ts +1 -1
- package/dist/indexer.js +4 -145
- package/dist/intelligence.d.ts +1 -1
- package/dist/intelligence.js +31 -261
- package/dist/internal-dispatch.d.ts +1 -1
- package/dist/internal-dispatch.js +3 -212
- package/dist/keyset.d.ts +1 -1
- package/dist/keyset.js +1 -110
- package/dist/knowledge-graph.d.ts +1 -1
- package/dist/knowledge-graph.js +12 -176
- package/dist/license.d.ts +1 -1
- package/dist/license.js +2 -441
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +2 -199
- package/dist/maintenance.d.ts +1 -1
- package/dist/maintenance.js +2 -148
- package/dist/mcp-client.d.ts +1 -1
- package/dist/mcp-client.js +6 -262
- package/dist/memory-artifacts.d.ts +1 -1
- package/dist/memory-artifacts.js +30 -449
- package/dist/migrate-prompt.d.ts +1 -1
- package/dist/migrate-prompt.js +2 -124
- package/dist/migrations.d.ts +1 -1
- package/dist/migrations.js +40 -655
- package/dist/performance.js +1 -228
- package/dist/presence.d.ts +1 -1
- package/dist/presence.js +11 -140
- package/dist/priority-embed.d.ts +1 -1
- package/dist/priority-embed.js +5 -164
- package/dist/providers/embedding-provider.d.ts +1 -1
- package/dist/providers/embedding-provider.js +1 -196
- package/dist/readonly-gate.js +1 -29
- package/dist/rehydration.d.ts +1 -1
- package/dist/rehydration.js +9 -157
- package/dist/reindex.d.ts +1 -1
- package/dist/reindex.js +1 -88
- package/dist/render-target.d.ts +1 -1
- package/dist/render-target.js +21 -514
- package/dist/render.d.ts +1 -1
- package/dist/render.js +4 -280
- package/dist/repl-guard.d.ts +1 -1
- package/dist/repl-guard.js +1 -173
- package/dist/replication-daemon-entrypoint.d.ts +1 -1
- package/dist/replication-daemon-entrypoint.js +1 -31
- package/dist/replication-daemon.d.ts +1 -1
- package/dist/replication-daemon.js +2 -262
- package/dist/resilience.d.ts +1 -1
- package/dist/resilience.js +1 -591
- package/dist/reverse-bridge.d.ts +1 -1
- package/dist/reverse-bridge.js +5 -360
- package/dist/security.d.ts +1 -1
- package/dist/security.js +1 -244
- package/dist/session-seen.d.ts +1 -1
- package/dist/session-seen.js +3 -51
- package/dist/setup.d.ts +1 -1
- package/dist/setup.js +1 -260
- package/dist/skill-author.d.ts +1 -1
- package/dist/skill-author.js +5 -168
- package/dist/spec-kit.d.ts +1 -1
- package/dist/spec-kit.js +1 -191
- package/dist/sqlite-busy.d.ts +1 -1
- package/dist/sqlite-busy.js +1 -154
- package/dist/statusline.d.ts +1 -1
- package/dist/statusline.js +11 -315
- package/dist/sub-agent.d.ts +1 -1
- package/dist/sub-agent.js +13 -262
- package/dist/summarizer.js +13 -139
- package/dist/symbols.d.ts +1 -1
- package/dist/symbols.js +7 -283
- package/dist/sync.d.ts +1 -1
- package/dist/sync.js +5 -359
- package/dist/tasks-dispatch.js +1 -84
- package/dist/tasks.js +1 -282
- package/dist/token-budget.d.ts +1 -1
- package/dist/token-budget.js +1 -143
- package/dist/tool-analytics.d.ts +1 -1
- package/dist/tool-analytics.js +7 -129
- package/dist/tool-annotations.js +1 -365
- package/dist/tool-manifest-v2.json +1 -1
- package/dist/tool-manifest.json +1 -1
- package/dist/tool-profiles.d.ts +1 -1
- package/dist/tool-profiles.js +1 -75
- package/dist/trace-harvest.d.ts +1 -1
- package/dist/trace-harvest.js +6 -244
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -30
- package/dist/ui-dashboard.d.ts +1 -1
- package/dist/ui-dashboard.js +41 -50
- package/dist/ulid.d.ts +1 -1
- package/dist/ulid.js +1 -81
- package/dist/validate.d.ts +1 -1
- package/dist/validate.js +1 -129
- package/dist/vault.js +1 -534
- package/dist/vectors.d.ts +1 -1
- package/dist/vectors.js +3 -184
- package/dist/version-check.d.ts +1 -1
- package/dist/version-check.js +4 -136
- package/dist/visibility.d.ts +1 -1
- package/dist/visibility.js +19 -155
- package/dist/wyrm-cli.d.ts +1 -1
- package/dist/wyrm-cli.js +98 -2464
- package/dist/wyrm-cli.js.map +1 -1
- package/dist/wyrm-guard.d.ts +1 -1
- package/dist/wyrm-guard.js +14 -424
- package/dist/wyrm-loop.js +3 -150
- package/dist/wyrm-manifest.json +1 -1
- package/dist/wyrm-statusline-daemon.js +1 -11
- package/dist/wyrm-statusline.js +4 -56
- package/dist/wyrm-ui.d.ts +1 -1
- package/dist/wyrm-ui.js +9 -77
- package/package.json +4 -2
package/dist/handlers/events.js
CHANGED
|
@@ -1,335 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
projectPath: { type: "string", description: "Project path" },
|
|
18
|
-
window: { type: "number", description: "How many recent events to return (1-200, default 20)" },
|
|
19
|
-
},
|
|
20
|
-
required: ["projectPath"],
|
|
21
|
-
},
|
|
22
|
-
annotations: TOOL_ANNOTATIONS["wyrm_events_subscribe"],
|
|
23
|
-
aliases: [],
|
|
24
|
-
handler: async (args, ctx) => {
|
|
25
|
-
const { db } = ctx;
|
|
26
|
-
const a = args || {};
|
|
27
|
-
const requireArgs = (fields) => {
|
|
28
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
29
|
-
if (missing.length > 0) {
|
|
30
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
};
|
|
34
|
-
const argErr = requireArgs(['projectPath']);
|
|
35
|
-
if (argErr)
|
|
36
|
-
return argErr;
|
|
37
|
-
const { projectPath, window } = args;
|
|
38
|
-
if (!db.liveMemoryEnabled()) {
|
|
39
|
-
return { content: [{ type: "text", text: JSON.stringify({ disabled: true, hint: "Set WYRM_LIVE_MEMORY=1 to enable the event log." }) }] };
|
|
40
|
-
}
|
|
41
|
-
const project = db.getProject(projectPath);
|
|
42
|
-
if (!project)
|
|
43
|
-
return { content: [{ type: "text", text: "Project not found" }] };
|
|
44
|
-
const sub = db.subscribeEvents(project.id, window);
|
|
45
|
-
return { content: [{ type: "text", text: JSON.stringify({ project: project.name, cursor: sub.cursor, count: sub.recent.length, events: sub.recent }) }] };
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "wyrm_events_since",
|
|
50
|
-
description: "Live Memory: pull events newer than a cursor for a project, in chronological order. Idempotent — safe to re-poll. Returns the events and the new head cursor to pass next time.",
|
|
51
|
-
inputSchema: {
|
|
52
|
-
type: "object",
|
|
53
|
-
properties: {
|
|
54
|
-
projectPath: { type: "string", description: "Project path" },
|
|
55
|
-
cursor: { type: "number", description: "Return events with cursor greater than this (default 0 = from start)" },
|
|
56
|
-
limit: { type: "number", description: "Max events to return (1-1000, default 100)" },
|
|
57
|
-
},
|
|
58
|
-
required: ["projectPath"],
|
|
59
|
-
},
|
|
60
|
-
annotations: TOOL_ANNOTATIONS["wyrm_events_since"],
|
|
61
|
-
aliases: [],
|
|
62
|
-
handler: async (args, ctx) => {
|
|
63
|
-
const { db } = ctx;
|
|
64
|
-
const a = args || {};
|
|
65
|
-
const requireArgs = (fields) => {
|
|
66
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
67
|
-
if (missing.length > 0) {
|
|
68
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
};
|
|
72
|
-
const argErr = requireArgs(['projectPath']);
|
|
73
|
-
if (argErr)
|
|
74
|
-
return argErr;
|
|
75
|
-
const { projectPath, cursor, limit } = args;
|
|
76
|
-
if (!db.liveMemoryEnabled()) {
|
|
77
|
-
return { content: [{ type: "text", text: JSON.stringify({ disabled: true, hint: "Set WYRM_LIVE_MEMORY=1 to enable the event log." }) }] };
|
|
78
|
-
}
|
|
79
|
-
const project = db.getProject(projectPath);
|
|
80
|
-
if (!project)
|
|
81
|
-
return { content: [{ type: "text", text: "Project not found" }] };
|
|
82
|
-
const events = db.eventsSince(project.id, cursor || 0, limit || 100);
|
|
83
|
-
const head = events.length ? events[events.length - 1].cursor : (cursor || 0);
|
|
84
|
-
return { content: [{ type: "text", text: JSON.stringify({ project: project.name, cursor: head, count: events.length, events }) }] };
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "wyrm_events_publish",
|
|
89
|
-
description: "Live Memory: manually publish an event onto a project's stream (e.g. a tool_call or presence marker). Failure-isolated — never throws. Payload is stored only when isShared is true (reference-only otherwise).",
|
|
90
|
-
inputSchema: {
|
|
91
|
-
type: "object",
|
|
92
|
-
properties: {
|
|
93
|
-
projectPath: { type: "string", description: "Project path" },
|
|
94
|
-
kind: { type: "string", enum: ["capture", "session_update", "quest", "truth", "presence", "tool_call"], description: "Event kind" },
|
|
95
|
-
refTable: { type: "string", description: "Canonical table this event refers to (optional)" },
|
|
96
|
-
refId: { type: "string", description: "Canonical row id this event refers to (optional)" },
|
|
97
|
-
actor: { type: "string", description: "Who/what produced the event (optional)" },
|
|
98
|
-
isShared: { type: "boolean", description: "If true, the payload is denormalized into the event (default false = reference-only)" },
|
|
99
|
-
payload: { type: "object", description: "Denormalized snapshot, stored only when isShared is true" },
|
|
100
|
-
},
|
|
101
|
-
required: ["projectPath", "kind"],
|
|
102
|
-
},
|
|
103
|
-
annotations: TOOL_ANNOTATIONS["wyrm_events_publish"],
|
|
104
|
-
aliases: [],
|
|
105
|
-
handler: async (args, ctx) => {
|
|
106
|
-
const { db, presence } = ctx;
|
|
107
|
-
const a = args || {};
|
|
108
|
-
const requireArgs = (fields) => {
|
|
109
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
110
|
-
if (missing.length > 0) {
|
|
111
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
112
|
-
}
|
|
113
|
-
return null;
|
|
114
|
-
};
|
|
115
|
-
const argErr = requireArgs(['projectPath', 'kind']);
|
|
116
|
-
if (argErr)
|
|
117
|
-
return argErr;
|
|
118
|
-
const { projectPath, kind, refTable, refId, actor, isShared, payload } = args;
|
|
119
|
-
if (!db.liveMemoryEnabled()) {
|
|
120
|
-
return { content: [{ type: "text", text: JSON.stringify({ disabled: true, hint: "Set WYRM_LIVE_MEMORY=1 to enable the event log." }) }] };
|
|
121
|
-
}
|
|
122
|
-
const project = db.getProject(projectPath);
|
|
123
|
-
if (!project)
|
|
124
|
-
return { content: [{ type: "text", text: "Project not found" }] };
|
|
125
|
-
db.publishEvent({ projectId: project.id, kind, refTable, refId, actor, isShared, payload });
|
|
126
|
-
return { content: [{ type: "text", text: ` Event published to ${project.name} stream (${kind})` }] };
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: "wyrm_events_replicate",
|
|
131
|
-
description: "Live Memory (Phase 3): one-shot cross-device replication with a peer Wyrm node — pulls the peer's shared events and pushes ours over the peer's HTTP surface. Privacy-gated (only is_shared events leave the box; reference-only rows carry no payload), with automatic dedup + echo-suppression. Watermarks persist, so repeat calls are incremental. Returns pulled/pushed/duplicate counts.",
|
|
132
|
-
inputSchema: {
|
|
133
|
-
type: "object",
|
|
134
|
-
properties: {
|
|
135
|
-
projectPath: { type: "string", description: "Local project path" },
|
|
136
|
-
// v7 T033: wyrm-http was deleted — the peer surface is `wyrm serve` (http-fast).
|
|
137
|
-
peerUrl: { type: "string", description: "Peer Wyrm HTTP (wyrm serve) base URL, e.g. http://other-host:3333" },
|
|
138
|
-
token: { type: "string", description: "Bearer token for the peer (optional if the peer runs open / dev mode)" },
|
|
139
|
-
remoteProject: { type: "string", description: "Project path or name on the peer (defaults to this project's name)" },
|
|
140
|
-
},
|
|
141
|
-
required: ["projectPath", "peerUrl"],
|
|
142
|
-
},
|
|
143
|
-
annotations: TOOL_ANNOTATIONS["wyrm_events_replicate"],
|
|
144
|
-
aliases: [],
|
|
145
|
-
handler: async (args, ctx) => {
|
|
146
|
-
const { db } = ctx;
|
|
147
|
-
const a = args || {};
|
|
148
|
-
const requireArgs = (fields) => {
|
|
149
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
150
|
-
if (missing.length > 0) {
|
|
151
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
152
|
-
}
|
|
153
|
-
return null;
|
|
154
|
-
};
|
|
155
|
-
const argErr = requireArgs(['projectPath', 'peerUrl']);
|
|
156
|
-
if (argErr)
|
|
157
|
-
return argErr;
|
|
158
|
-
if (!db.liveMemoryEnabled()) {
|
|
159
|
-
return { content: [{ type: "text", text: JSON.stringify({ disabled: true, hint: "Set WYRM_LIVE_MEMORY=1 to enable replication." }) }] };
|
|
160
|
-
}
|
|
161
|
-
const { projectPath, peerUrl, token, remoteProject } = args;
|
|
162
|
-
const project = db.getProject(projectPath);
|
|
163
|
-
if (!project)
|
|
164
|
-
return { content: [{ type: "text", text: "Project not found" }] };
|
|
165
|
-
const peer = {
|
|
166
|
-
baseUrl: String(peerUrl).replace(/\/+$/, ''),
|
|
167
|
-
token,
|
|
168
|
-
localProjectId: project.id,
|
|
169
|
-
remoteProject: remoteProject || project.name,
|
|
170
|
-
};
|
|
171
|
-
const r = await replicateOnce(db, peer, fetch);
|
|
172
|
-
const summary = ` Replicated ${project.name} ↔ ${peer.baseUrl}: pulled ${r.pulled}, pushed ${r.pushed}, dup ${r.duplicates}, echo ${r.echoes}` +
|
|
173
|
-
(r.errors.length ? `\n⚠️ ${r.errors.join('; ')}` : '');
|
|
174
|
-
return { content: [{ type: "text", text: summary }] };
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: "wyrm_replication",
|
|
179
|
-
description: "Use to sync memory between machines and watch the live event mesh - action=start|stop|status|tick (daemon + peers; tokens via tokenEnv), conflicts (did the last sync leave conflicts to resolve?), resolve, publish, since, subscribe (watch a project's live activity feed for changes from other agents), replicate (one-shot: sync my memory over to another machine or peer). Back up the memory database off this machine, encrypted: wyrm cloud backup (CLI).",
|
|
180
|
-
// v7 F3 (T022, spec FR-4): wyrm_replication absorbs sync_conflicts/
|
|
181
|
-
// sync_resolve (action=conflicts|resolve) and the events quartet
|
|
182
|
-
// (action=publish|since|subscribe|replicate — the Live-Memory event
|
|
183
|
-
// mesh IS the replication domain); resolveShimCall translates each
|
|
184
|
-
// onto the original dispatcher case. Existing actions unchanged.
|
|
185
|
-
inputSchema: {
|
|
186
|
-
type: "object",
|
|
187
|
-
properties: {
|
|
188
|
-
// v7 F3 (T026): property prose compressed to fund the hot-path
|
|
189
|
-
// outputSchemas under the 8K default-surface pin (the T022/T025
|
|
190
|
-
// schema-chars trade; BM25 ranks name+description only).
|
|
191
|
-
action: { type: "string", enum: ["start", "stop", "status", "tick", "peer_add", "peer_remove", "peer_list", "conflicts", "resolve", "publish", "since", "subscribe", "replicate"] },
|
|
192
|
-
interval_minutes: { type: "number", description: "start (default 1)" },
|
|
193
|
-
baseUrl: { type: "string", description: "peer_add/peer_remove" },
|
|
194
|
-
projectPath: { type: "string" },
|
|
195
|
-
remoteProject: { type: "string", description: "peer_add/replicate" },
|
|
196
|
-
tokenEnv: { type: "string", description: "peer_add: env var NAME with the peer token" },
|
|
197
|
-
limit: { type: "number", description: "conflicts/since" },
|
|
198
|
-
conflict_id: { type: "number", description: "resolve" },
|
|
199
|
-
mode: { type: "string", description: "resolve: kept_local|kept_remote|merged" },
|
|
200
|
-
// T027 budget trim: merged_payload/isShared/window pass through
|
|
201
|
-
// undeclared (T022 lean-union rule).
|
|
202
|
-
kind: { type: "string", description: "publish" },
|
|
203
|
-
payload: { type: "object", description: "publish" },
|
|
204
|
-
cursor: { type: "number", description: "since" },
|
|
205
|
-
peerUrl: { type: "string", description: "replicate" },
|
|
206
|
-
token: { type: "string", description: "replicate: bearer" },
|
|
207
|
-
},
|
|
208
|
-
required: ["action"],
|
|
209
|
-
},
|
|
210
|
-
annotations: TOOL_ANNOTATIONS["wyrm_replication"],
|
|
211
|
-
aliases: [],
|
|
212
|
-
handler: async (args, ctx) => {
|
|
213
|
-
const { db, replicationManager } = ctx;
|
|
214
|
-
const a = args || {};
|
|
215
|
-
const requireArgs = (fields) => {
|
|
216
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
217
|
-
if (missing.length > 0) {
|
|
218
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
219
|
-
}
|
|
220
|
-
return null;
|
|
221
|
-
};
|
|
222
|
-
const argErr = requireArgs(['action']);
|
|
223
|
-
if (argErr)
|
|
224
|
-
return argErr;
|
|
225
|
-
const { action, interval_minutes, baseUrl, projectPath, remoteProject, tokenEnv } = args;
|
|
226
|
-
switch (action) {
|
|
227
|
-
case 'start': {
|
|
228
|
-
if (!db.liveMemoryEnabled())
|
|
229
|
-
return { content: [{ type: "text", text: "Live Memory is off (WYRM_LIVE_MEMORY=0) — daemon not started." }] };
|
|
230
|
-
const res = replicationManager.start({ interval_minutes });
|
|
231
|
-
return { content: [{ type: "text", text: res.ok ? ` Replication daemon started (pid ${res.pid})` : `Not started: ${res.reason}` }] };
|
|
232
|
-
}
|
|
233
|
-
case 'stop': {
|
|
234
|
-
const res = replicationManager.stop();
|
|
235
|
-
return { content: [{ type: "text", text: res.ok ? " Replication daemon stopping" : `Not stopped: ${res.reason}` }] };
|
|
236
|
-
}
|
|
237
|
-
case 'status': {
|
|
238
|
-
const st = replicationManager.status();
|
|
239
|
-
const peers = listPeers(db);
|
|
240
|
-
return { content: [{ type: "text", text: JSON.stringify({ running: st.running, pid: st.pid, peers }) }] };
|
|
241
|
-
}
|
|
242
|
-
case 'tick': {
|
|
243
|
-
const daemon = new ReplicationDaemon(db);
|
|
244
|
-
const results = await daemon.tick(fetch);
|
|
245
|
-
return { content: [{ type: "text", text: JSON.stringify({ peers: results.length, results }) }] };
|
|
246
|
-
}
|
|
247
|
-
case 'peer_add': {
|
|
248
|
-
if (!baseUrl || !projectPath)
|
|
249
|
-
return { content: [{ type: "text", text: "peer_add requires baseUrl and projectPath" }] };
|
|
250
|
-
const project = db.getProject(projectPath);
|
|
251
|
-
if (!project)
|
|
252
|
-
return { content: [{ type: "text", text: "Project not found" }] };
|
|
253
|
-
try {
|
|
254
|
-
const peers = addPeer(db, { baseUrl, projectPath, remoteProject, tokenEnv });
|
|
255
|
-
return { content: [{ type: "text", text: ` Peer added. Registry now has ${peers.length} peer(s).` }] };
|
|
256
|
-
}
|
|
257
|
-
catch (e) {
|
|
258
|
-
return { content: [{ type: "text", text: `Peer rejected: ${e instanceof Error ? e.message : String(e)}` }] };
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
case 'peer_remove': {
|
|
262
|
-
if (!baseUrl || !projectPath)
|
|
263
|
-
return { content: [{ type: "text", text: "peer_remove requires baseUrl and projectPath" }] };
|
|
264
|
-
const peers = removePeer(db, baseUrl, projectPath);
|
|
265
|
-
return { content: [{ type: "text", text: ` Peer removed. Registry now has ${peers.length} peer(s).` }] };
|
|
266
|
-
}
|
|
267
|
-
case 'peer_list': {
|
|
268
|
-
return { content: [{ type: "text", text: JSON.stringify({ peers: listPeers(db) }) }] };
|
|
269
|
-
}
|
|
270
|
-
default:
|
|
271
|
-
return { content: [{ type: "text", text: `Unknown action: ${action}` }] };
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: "wyrm_embed",
|
|
277
|
-
description: "Make Wyrm FIRST-PRIORITY, always-loaded memory across Claude Code and other CLIs — so it isn't ignored and is consulted proactively, not just when called. Prepends a managed 'Wyrm is your memory — consult it FIRST' directive to the TOP of each client's always-loaded instruction file (~/.claude/CLAUDE.md globally; project CLAUDE.md/AGENTS.md, and with allClients also .cursorrules/.windsurfrules/.github/copilot-instructions.md). install also installs the proactive SessionStart/predictive hooks. Idempotent + fully reversible. action=install|status|remove.",
|
|
278
|
-
inputSchema: {
|
|
279
|
-
type: "object",
|
|
280
|
-
properties: {
|
|
281
|
-
action: { type: "string", enum: ["install", "status", "remove"], description: "Operation to perform" },
|
|
282
|
-
projectPath: { type: "string", description: "Also embed into this project's instruction files (CLAUDE.md + AGENTS.md)" },
|
|
283
|
-
allClients: { type: "boolean", description: "With projectPath: also write Cursor/.cursorrules, Windsurf/.windsurfrules, and GitHub Copilot instructions (default false)" },
|
|
284
|
-
},
|
|
285
|
-
required: ["action"],
|
|
286
|
-
},
|
|
287
|
-
annotations: TOOL_ANNOTATIONS["wyrm_embed"],
|
|
288
|
-
aliases: [],
|
|
289
|
-
handler: async (args, ctx) => {
|
|
290
|
-
const { memory } = ctx;
|
|
291
|
-
const a = args || {};
|
|
292
|
-
const requireArgs = (fields) => {
|
|
293
|
-
const missing = fields.filter(f => !a[f] && a[f] !== 0 && a[f] !== false);
|
|
294
|
-
if (missing.length > 0) {
|
|
295
|
-
return { content: [{ type: "text", text: `Missing required arguments: ${missing.join(', ')}` }], isError: true };
|
|
296
|
-
}
|
|
297
|
-
return null;
|
|
298
|
-
};
|
|
299
|
-
const argErr = requireArgs(['action']);
|
|
300
|
-
if (argErr)
|
|
301
|
-
return argErr;
|
|
302
|
-
const { action, projectPath, allClients } = args;
|
|
303
|
-
const opts = { projectDir: projectPath, allClients };
|
|
304
|
-
const fmt = (rows) => rows.map(r => ` ${String(r.result ?? r.status).padEnd(9)} [${r.scope}] ${r.file}`).join('\n');
|
|
305
|
-
if (action === 'status') {
|
|
306
|
-
return { content: [{ type: "text", text: ` Wyrm priority embedding status:\n${fmt(statusAll(opts))}` }] };
|
|
307
|
-
}
|
|
308
|
-
if (action === 'remove') {
|
|
309
|
-
return { content: [{ type: "text", text: ` Removed Wyrm priority embedding:\n${fmt(removeAll(opts))}` }] };
|
|
310
|
-
}
|
|
311
|
-
// install — all three: priority blocks + proactive hooks + persistent buddy statusline
|
|
312
|
-
const embedded = embedAll(opts);
|
|
313
|
-
let hookNote = '';
|
|
314
|
-
try {
|
|
315
|
-
const hooks = installClaudeCodeHooks();
|
|
316
|
-
hookNote = hooks ? `\n\n✅ Proactive hooks installed (${hooks.message ?? 'SessionStart rehydrate + capture + trace'}).` : '\n\n(Claude Code not detected — skipped hook install.)';
|
|
317
|
-
}
|
|
318
|
-
catch (e) {
|
|
319
|
-
hookNote = `\n\n(Hook install skipped: ${e instanceof Error ? e.message : String(e)})`;
|
|
320
|
-
}
|
|
321
|
-
let slNote = '';
|
|
322
|
-
try {
|
|
323
|
-
const sl = installClaudeStatusline();
|
|
324
|
-
if (sl)
|
|
325
|
-
slNote = `\n✅ Buddy statusline: ${sl.message}`;
|
|
326
|
-
}
|
|
327
|
-
catch (e) {
|
|
328
|
-
slNote = `\n(Statusline skipped: ${e instanceof Error ? e.message : String(e)})`;
|
|
329
|
-
}
|
|
330
|
-
return { content: [{ type: "text", text: ` Wyrm is now FIRST-PRIORITY memory:\n${fmt(embedded)}${hookNote}${slNote}\n\n` +
|
|
331
|
-
`Wyrm will now be read at the top of every session, primed proactively, and shown in the TUI at all times — not waiting to be called.` }] };
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
];
|
|
335
|
-
//# sourceMappingURL=events.js.map
|
|
1
|
+
import{TOOL_ANNOTATIONS as f}from"../tool-annotations.js";import{installClaudeCodeHooks as j,installClaudeStatusline as x}from"../autoconfig.js";import{replicateOnce as w}from"../event-replication.js";import{embedAll as P,removeAll as _,statusAll as E}from"../priority-embed.js";import{ReplicationDaemon as S,addPeer as k,listPeers as b,removePeer as M}from"../replication-daemon.js";const O=[{name:"wyrm_events_subscribe",description:"Use to START consuming a project's Live Memory event stream: returns the current head cursor plus a recent chronological window of events in one read-only call. Nothing persists server-side \u2014 poll wyrm_events_since with the returned cursor for new events. Returns disabled:true if WYRM_LIVE_MEMORY is off. Keywords: events, live memory, event stream, cursor, tail events, watch project, replication feed.",inputSchema:{type:"object",properties:{projectPath:{type:"string",description:"Project path"},window:{type:"number",description:"How many recent events to return (1-200, default 20)"}},required:["projectPath"]},annotations:f.wyrm_events_subscribe,aliases:[],handler:async(a,y)=>{const{db:t}=y,o=a||{},d=(r=>{const m=r.filter(i=>!o[i]&&o[i]!==0&&o[i]!==!1);return m.length>0?{content:[{type:"text",text:`Missing required arguments: ${m.join(", ")}`}],isError:!0}:null})(["projectPath"]);if(d)return d;const{projectPath:p,window:u}=a;if(!t.liveMemoryEnabled())return{content:[{type:"text",text:JSON.stringify({disabled:!0,hint:"Set WYRM_LIVE_MEMORY=1 to enable the event log."})}]};const l=t.getProject(p);if(!l)return{content:[{type:"text",text:"Project not found"}]};const s=t.subscribeEvents(l.id,u);return{content:[{type:"text",text:JSON.stringify({project:l.name,cursor:s.cursor,count:s.recent.length,events:s.recent})}]}}},{name:"wyrm_events_since",description:"Live Memory: pull events newer than a cursor for a project, in chronological order. Idempotent \u2014 safe to re-poll. Returns the events and the new head cursor to pass next time.",inputSchema:{type:"object",properties:{projectPath:{type:"string",description:"Project path"},cursor:{type:"number",description:"Return events with cursor greater than this (default 0 = from start)"},limit:{type:"number",description:"Max events to return (1-1000, default 100)"}},required:["projectPath"]},annotations:f.wyrm_events_since,aliases:[],handler:async(a,y)=>{const{db:t}=y,o=a||{},d=(i=>{const n=i.filter(e=>!o[e]&&o[e]!==0&&o[e]!==!1);return n.length>0?{content:[{type:"text",text:`Missing required arguments: ${n.join(", ")}`}],isError:!0}:null})(["projectPath"]);if(d)return d;const{projectPath:p,cursor:u,limit:l}=a;if(!t.liveMemoryEnabled())return{content:[{type:"text",text:JSON.stringify({disabled:!0,hint:"Set WYRM_LIVE_MEMORY=1 to enable the event log."})}]};const s=t.getProject(p);if(!s)return{content:[{type:"text",text:"Project not found"}]};const r=t.eventsSince(s.id,u||0,l||100),m=r.length?r[r.length-1].cursor:u||0;return{content:[{type:"text",text:JSON.stringify({project:s.name,cursor:m,count:r.length,events:r})}]}}},{name:"wyrm_events_publish",description:"Live Memory: manually publish an event onto a project's stream (e.g. a tool_call or presence marker). Failure-isolated \u2014 never throws. Payload is stored only when isShared is true (reference-only otherwise).",inputSchema:{type:"object",properties:{projectPath:{type:"string",description:"Project path"},kind:{type:"string",enum:["capture","session_update","quest","truth","presence","tool_call"],description:"Event kind"},refTable:{type:"string",description:"Canonical table this event refers to (optional)"},refId:{type:"string",description:"Canonical row id this event refers to (optional)"},actor:{type:"string",description:"Who/what produced the event (optional)"},isShared:{type:"boolean",description:"If true, the payload is denormalized into the event (default false = reference-only)"},payload:{type:"object",description:"Denormalized snapshot, stored only when isShared is true"}},required:["projectPath","kind"]},annotations:f.wyrm_events_publish,aliases:[],handler:async(a,y)=>{const{db:t,presence:o}=y,h=a||{},p=(c=>{const g=c.filter(v=>!h[v]&&h[v]!==0&&h[v]!==!1);return g.length>0?{content:[{type:"text",text:`Missing required arguments: ${g.join(", ")}`}],isError:!0}:null})(["projectPath","kind"]);if(p)return p;const{projectPath:u,kind:l,refTable:s,refId:r,actor:m,isShared:i,payload:n}=a;if(!t.liveMemoryEnabled())return{content:[{type:"text",text:JSON.stringify({disabled:!0,hint:"Set WYRM_LIVE_MEMORY=1 to enable the event log."})}]};const e=t.getProject(u);return e?(t.publishEvent({projectId:e.id,kind:l,refTable:s,refId:r,actor:m,isShared:i,payload:n}),{content:[{type:"text",text:`\u{F115D} Event published to ${e.name} stream (${l})`}]}):{content:[{type:"text",text:"Project not found"}]}}},{name:"wyrm_events_replicate",description:"Live Memory (Phase 3): one-shot cross-device replication with a peer Wyrm node \u2014 pulls the peer's shared events and pushes ours over the peer's HTTP surface. Privacy-gated (only is_shared events leave the box; reference-only rows carry no payload), with automatic dedup + echo-suppression. Watermarks persist, so repeat calls are incremental. Returns pulled/pushed/duplicate counts.",inputSchema:{type:"object",properties:{projectPath:{type:"string",description:"Local project path"},peerUrl:{type:"string",description:"Peer Wyrm HTTP (wyrm serve) base URL, e.g. http://other-host:3333"},token:{type:"string",description:"Bearer token for the peer (optional if the peer runs open / dev mode)"},remoteProject:{type:"string",description:"Project path or name on the peer (defaults to this project's name)"}},required:["projectPath","peerUrl"]},annotations:f.wyrm_events_replicate,aliases:[],handler:async(a,y)=>{const{db:t}=y,o=a||{},d=(e=>{const c=e.filter(g=>!o[g]&&o[g]!==0&&o[g]!==!1);return c.length>0?{content:[{type:"text",text:`Missing required arguments: ${c.join(", ")}`}],isError:!0}:null})(["projectPath","peerUrl"]);if(d)return d;if(!t.liveMemoryEnabled())return{content:[{type:"text",text:JSON.stringify({disabled:!0,hint:"Set WYRM_LIVE_MEMORY=1 to enable replication."})}]};const{projectPath:p,peerUrl:u,token:l,remoteProject:s}=a,r=t.getProject(p);if(!r)return{content:[{type:"text",text:"Project not found"}]};const m={baseUrl:String(u).replace(/\/+$/,""),token:l,localProjectId:r.id,remoteProject:s||r.name},i=await w(t,m,fetch);return{content:[{type:"text",text:`\u{F115D} Replicated ${r.name} \u2194 ${m.baseUrl}: pulled ${i.pulled}, pushed ${i.pushed}, dup ${i.duplicates}, echo ${i.echoes}`+(i.errors.length?`
|
|
2
|
+
\u26A0\uFE0F ${i.errors.join("; ")}`:"")}]}}},{name:"wyrm_replication",description:"Use to sync memory between machines and watch the live event mesh - action=start|stop|status|tick (daemon + peers; tokens via tokenEnv), conflicts (did the last sync leave conflicts to resolve?), resolve, publish, since, subscribe (watch a project's live activity feed for changes from other agents), replicate (one-shot: sync my memory over to another machine or peer). Back up the memory database off this machine, encrypted: wyrm cloud backup (CLI).",inputSchema:{type:"object",properties:{action:{type:"string",enum:["start","stop","status","tick","peer_add","peer_remove","peer_list","conflicts","resolve","publish","since","subscribe","replicate"]},interval_minutes:{type:"number",description:"start (default 1)"},baseUrl:{type:"string",description:"peer_add/peer_remove"},projectPath:{type:"string"},remoteProject:{type:"string",description:"peer_add/replicate"},tokenEnv:{type:"string",description:"peer_add: env var NAME with the peer token"},limit:{type:"number",description:"conflicts/since"},conflict_id:{type:"number",description:"resolve"},mode:{type:"string",description:"resolve: kept_local|kept_remote|merged"},kind:{type:"string",description:"publish"},payload:{type:"object",description:"publish"},cursor:{type:"number",description:"since"},peerUrl:{type:"string",description:"replicate"},token:{type:"string",description:"replicate: bearer"}},required:["action"]},annotations:f.wyrm_replication,aliases:[],handler:async(a,y)=>{const{db:t,replicationManager:o}=y,h=a||{},p=(n=>{const e=n.filter(c=>!h[c]&&h[c]!==0&&h[c]!==!1);return e.length>0?{content:[{type:"text",text:`Missing required arguments: ${e.join(", ")}`}],isError:!0}:null})(["action"]);if(p)return p;const{action:u,interval_minutes:l,baseUrl:s,projectPath:r,remoteProject:m,tokenEnv:i}=a;switch(u){case"start":{if(!t.liveMemoryEnabled())return{content:[{type:"text",text:"Live Memory is off (WYRM_LIVE_MEMORY=0) \u2014 daemon not started."}]};const n=o.start({interval_minutes:l});return{content:[{type:"text",text:n.ok?`\u{F115D} Replication daemon started (pid ${n.pid})`:`Not started: ${n.reason}`}]}}case"stop":{const n=o.stop();return{content:[{type:"text",text:n.ok?"\u{F115D} Replication daemon stopping":`Not stopped: ${n.reason}`}]}}case"status":{const n=o.status(),e=b(t);return{content:[{type:"text",text:JSON.stringify({running:n.running,pid:n.pid,peers:e})}]}}case"tick":{const e=await new S(t).tick(fetch);return{content:[{type:"text",text:JSON.stringify({peers:e.length,results:e})}]}}case"peer_add":{if(!s||!r)return{content:[{type:"text",text:"peer_add requires baseUrl and projectPath"}]};if(!t.getProject(r))return{content:[{type:"text",text:"Project not found"}]};try{return{content:[{type:"text",text:`\u{F115D} Peer added. Registry now has ${k(t,{baseUrl:s,projectPath:r,remoteProject:m,tokenEnv:i}).length} peer(s).`}]}}catch(e){return{content:[{type:"text",text:`Peer rejected: ${e instanceof Error?e.message:String(e)}`}]}}}case"peer_remove":return!s||!r?{content:[{type:"text",text:"peer_remove requires baseUrl and projectPath"}]}:{content:[{type:"text",text:`\u{F115D} Peer removed. Registry now has ${M(t,s,r).length} peer(s).`}]};case"peer_list":return{content:[{type:"text",text:JSON.stringify({peers:b(t)})}]};default:return{content:[{type:"text",text:`Unknown action: ${u}`}]}}}},{name:"wyrm_embed",description:"Make Wyrm FIRST-PRIORITY, always-loaded memory across Claude Code and other CLIs \u2014 so it isn't ignored and is consulted proactively, not just when called. Prepends a managed 'Wyrm is your memory \u2014 consult it FIRST' directive to the TOP of each client's always-loaded instruction file (~/.claude/CLAUDE.md globally; project CLAUDE.md/AGENTS.md, and with allClients also .cursorrules/.windsurfrules/.github/copilot-instructions.md). install also installs the proactive SessionStart/predictive hooks. Idempotent + fully reversible. action=install|status|remove.",inputSchema:{type:"object",properties:{action:{type:"string",enum:["install","status","remove"],description:"Operation to perform"},projectPath:{type:"string",description:"Also embed into this project's instruction files (CLAUDE.md + AGENTS.md)"},allClients:{type:"boolean",description:"With projectPath: also write Cursor/.cursorrules, Windsurf/.windsurfrules, and GitHub Copilot instructions (default false)"}},required:["action"]},annotations:f.wyrm_embed,aliases:[],handler:async(a,y)=>{const{memory:t}=y,o=a||{},d=(e=>{const c=e.filter(g=>!o[g]&&o[g]!==0&&o[g]!==!1);return c.length>0?{content:[{type:"text",text:`Missing required arguments: ${c.join(", ")}`}],isError:!0}:null})(["action"]);if(d)return d;const{action:p,projectPath:u,allClients:l}=a,s={projectDir:u,allClients:l},r=e=>e.map(c=>` ${String(c.result??c.status).padEnd(9)} [${c.scope}] ${c.file}`).join(`
|
|
3
|
+
`);if(p==="status")return{content:[{type:"text",text:`\u{F115D} Wyrm priority embedding status:
|
|
4
|
+
${r(E(s))}`}]};if(p==="remove")return{content:[{type:"text",text:`\u{F115D} Removed Wyrm priority embedding:
|
|
5
|
+
${r(_(s))}`}]};const m=P(s);let i="";try{const e=j();i=e?`
|
|
6
|
+
|
|
7
|
+
\u2705 Proactive hooks installed (${e.message??"SessionStart rehydrate + capture + trace"}).`:`
|
|
8
|
+
|
|
9
|
+
(Claude Code not detected \u2014 skipped hook install.)`}catch(e){i=`
|
|
10
|
+
|
|
11
|
+
(Hook install skipped: ${e instanceof Error?e.message:String(e)})`}let n="";try{const e=x();e&&(n=`
|
|
12
|
+
\u2705 Buddy statusline: ${e.message}`)}catch(e){n=`
|
|
13
|
+
(Statusline skipped: ${e instanceof Error?e.message:String(e)})`}return{content:[{type:"text",text:`\u{F115D} Wyrm is now FIRST-PRIORITY memory:
|
|
14
|
+
${r(m)}${i}${n}
|
|
15
|
+
|
|
16
|
+
Wyrm will now be read at the top of every session, primed proactively, and shown in the TUI at all times \u2014 not waiting to be called.`}]}}}];export{O as eventsToolSpecs};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* prose was advisory (the T022/T025 schema-chars-fund-the-surface trade).
|
|
18
18
|
*
|
|
19
19
|
* @copyright 2026 Ghost Protocol (Pvt) Ltd.
|
|
20
|
-
* @license
|
|
20
|
+
* @license Proprietary — (c) 2026 Ghost Protocol (Pvt) Ltd. All rights reserved. See LICENSE.
|
|
21
21
|
*/
|
|
22
22
|
import type { HotPathContext, JsonSchema, ToolSpec } from './types.js';
|
|
23
23
|
/** Narrow slice this domain declares (T026). */
|