wyrm-mcp 7.3.2 → 7.4.0
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/README.md +12 -18
- package/dist/activation.js +59 -1
- package/dist/agent-daemon.js +281 -4
- package/dist/agent-loop.js +332 -7
- package/dist/analytics.js +236 -13
- package/dist/attribution.js +49 -1
- package/dist/audit.js +457 -2
- package/dist/auto-capture.js +138 -3
- package/dist/auto-orchestrator.js +325 -1
- package/dist/autoconfig.d.ts +51 -0
- package/dist/autoconfig.d.ts.map +1 -1
- package/dist/autoconfig.js +1121 -39
- package/dist/autoconfig.js.map +1 -1
- package/dist/buddy-runner.js +109 -1
- package/dist/buddy.js +564 -14
- package/dist/build-flags.js +15 -1
- package/dist/capabilities.js +183 -3
- package/dist/capture.js +56 -1
- package/dist/causality.js +148 -8
- package/dist/cli.js +281 -20
- package/dist/cloud/cli.js +541 -5
- package/dist/cloud/client.js +221 -1
- package/dist/cloud/crypto.js +85 -1
- package/dist/cloud/machine-id.js +113 -2
- package/dist/cloud/recovery.js +60 -1
- package/dist/cloud/sync-engine.js +543 -7
- package/dist/cloud-backup.js +579 -5
- package/dist/cloud-profile.js +138 -1
- package/dist/cloud-sync-entrypoint.js +47 -1
- package/dist/cloud-sync.js +309 -2
- package/dist/connectors/bridge-source.d.ts +46 -0
- package/dist/connectors/bridge-source.d.ts.map +1 -0
- package/dist/connectors/bridge-source.js +77 -0
- package/dist/connectors/bridge-source.js.map +1 -0
- package/dist/connectors/index.d.ts +24 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +69 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/ingest.d.ts +16 -0
- package/dist/connectors/ingest.d.ts.map +1 -0
- package/dist/connectors/ingest.js +116 -0
- package/dist/connectors/ingest.js.map +1 -0
- package/dist/connectors/types.d.ts +99 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +17 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/constellation.js +168 -12
- package/dist/content-signature.js +45 -1
- package/dist/context-build-budgeted.js +144 -4
- package/dist/context-ranking.js +69 -1
- package/dist/crypto.js +179 -1
- package/dist/daemon-write-endpoint.js +290 -1
- package/dist/daemon-writer.js +406 -2
- package/dist/database.js +1278 -53
- package/dist/deprecations.js +162 -2
- package/dist/design.js +141 -13
- package/dist/event-replication.js +112 -1
- package/dist/events-sse.js +43 -7
- package/dist/events.js +238 -6
- package/dist/failure-patterns.d.ts +107 -0
- package/dist/failure-patterns.d.ts.map +1 -1
- package/dist/failure-patterns.js +924 -43
- package/dist/failure-patterns.js.map +1 -1
- package/dist/federation.js +236 -12
- package/dist/goals.js +101 -13
- package/dist/golden.js +355 -3
- package/dist/handlers/agent.js +165 -4
- package/dist/handlers/alias-adapters.js +129 -1
- package/dist/handlers/aliases.js +171 -1
- package/dist/handlers/audit.js +87 -1
- package/dist/handlers/boundary.js +221 -1
- package/dist/handlers/capture.js +1114 -73
- package/dist/handlers/causality.js +119 -9
- package/dist/handlers/cloud.js +382 -85
- package/dist/handlers/companion.js +459 -28
- package/dist/handlers/datalake.js +187 -7
- package/dist/handlers/dispatch-context.js +22 -0
- package/dist/handlers/entity.js +256 -25
- package/dist/handlers/events.js +335 -16
- package/dist/handlers/failure.d.ts +1 -0
- package/dist/handlers/failure.d.ts.map +1 -1
- package/dist/handlers/failure.js +458 -13
- package/dist/handlers/failure.js.map +1 -1
- package/dist/handlers/goals.js +296 -4
- package/dist/handlers/intelligence.d.ts.map +1 -1
- package/dist/handlers/intelligence.js +690 -126
- package/dist/handlers/intelligence.js.map +1 -1
- package/dist/handlers/invoicing.js +70 -1
- package/dist/handlers/mcpclient.js +137 -6
- package/dist/handlers/orchestration.js +125 -40
- package/dist/handlers/output-schemas.js +24 -1
- package/dist/handlers/presence.js +99 -3
- package/dist/handlers/project.js +182 -28
- package/dist/handlers/prompts.js +157 -6
- package/dist/handlers/quest.js +224 -4
- package/dist/handlers/recall.js +237 -13
- package/dist/handlers/registry.js +167 -1
- package/dist/handlers/resources.js +288 -1
- package/dist/handlers/review.js +74 -11
- package/dist/handlers/run.js +498 -16
- package/dist/handlers/search.js +338 -15
- package/dist/handlers/session.js +643 -31
- package/dist/handlers/share.js +184 -8
- package/dist/handlers/shims.js +464 -1
- package/dist/handlers/skill.js +449 -67
- package/dist/handlers/survivors.js +120 -1
- package/dist/handlers/symbols.js +109 -8
- package/dist/handlers/syncops.js +302 -4
- package/dist/handlers/types.js +27 -1
- package/dist/harvest.js +191 -5
- package/dist/hours.js +156 -7
- package/dist/http-auth.js +321 -3
- package/dist/http-fast.d.ts.map +1 -1
- package/dist/http-fast.js +1308 -22
- package/dist/http-fast.js.map +1 -1
- package/dist/icons.js +47 -1
- package/dist/importers.js +268 -1
- package/dist/index.js +844 -2
- package/dist/index.js.map +1 -1
- package/dist/indexer.js +145 -4
- package/dist/intelligence.d.ts +16 -0
- package/dist/intelligence.d.ts.map +1 -1
- package/dist/intelligence.js +283 -31
- package/dist/intelligence.js.map +1 -1
- package/dist/internal-dispatch.js +212 -3
- package/dist/keyset.js +110 -1
- package/dist/knowledge-graph.js +176 -12
- package/dist/license.js +441 -2
- package/dist/logger.js +199 -2
- package/dist/maintenance.js +148 -2
- package/dist/mcp-client.js +262 -6
- package/dist/memory-artifacts.js +596 -32
- package/dist/migrate-prompt.js +124 -2
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +799 -42
- package/dist/migrations.js.map +1 -1
- package/dist/performance.js +228 -1
- package/dist/presence.js +140 -11
- package/dist/priority-embed.js +164 -5
- package/dist/providers/embedding-provider.js +196 -1
- package/dist/readonly-gate.js +29 -1
- package/dist/receipt.js +43 -1
- package/dist/rehydration.js +157 -9
- package/dist/reindex.js +88 -1
- package/dist/render-target.js +544 -21
- package/dist/render.js +280 -4
- package/dist/repl-guard.js +173 -1
- package/dist/replication-daemon-entrypoint.js +31 -1
- package/dist/replication-daemon.js +262 -2
- package/dist/rerank.js +142 -1
- package/dist/resilience.js +591 -1
- package/dist/reverse-bridge.js +360 -5
- package/dist/security.js +244 -1
- package/dist/session-seen.js +51 -3
- package/dist/setup.js +260 -1
- package/dist/skill-author.js +168 -5
- package/dist/spec-kit.js +191 -1
- package/dist/sqlite-busy.js +154 -1
- package/dist/statusline.js +315 -11
- package/dist/sub-agent.js +262 -13
- package/dist/summarizer.js +139 -13
- package/dist/symbols.js +283 -7
- package/dist/sync.js +359 -5
- package/dist/tasks-dispatch.js +84 -1
- package/dist/tasks.js +282 -1
- package/dist/token-budget.js +143 -1
- package/dist/tool-analytics.js +129 -7
- package/dist/tool-annotations.js +365 -1
- package/dist/tool-manifest-v2.json +1 -1
- package/dist/tool-manifest.json +1 -1
- package/dist/tool-profiles.js +75 -1
- package/dist/trace-harvest.js +244 -6
- package/dist/truth-cascade.d.ts +13 -0
- package/dist/truth-cascade.d.ts.map +1 -0
- package/dist/truth-cascade.js +4 -0
- package/dist/truth-cascade.js.map +1 -0
- package/dist/types.js +30 -1
- package/dist/ui-dashboard.js +50 -41
- package/dist/ulid.js +81 -1
- package/dist/usage-tracker.js +66 -1
- package/dist/validate.js +129 -1
- package/dist/vault.js +534 -1
- package/dist/vector-init.js +67 -1
- package/dist/vectors.js +184 -3
- package/dist/version-check.d.ts.map +1 -1
- package/dist/version-check.js +145 -4
- package/dist/version-check.js.map +1 -1
- package/dist/visibility.js +155 -19
- package/dist/wyrm-cli.js +2849 -101
- package/dist/wyrm-cli.js.map +1 -1
- package/dist/wyrm-guard.d.ts.map +1 -1
- package/dist/wyrm-guard.js +475 -14
- package/dist/wyrm-guard.js.map +1 -1
- package/dist/wyrm-loop.js +174 -3
- package/dist/wyrm-loop.js.map +1 -1
- package/dist/wyrm-manifest.json +1 -1
- package/dist/wyrm-statusline-daemon.js +11 -1
- package/dist/wyrm-statusline.js +56 -4
- package/dist/wyrm-ui.js +77 -9
- package/package.json +3 -2
package/dist/handlers/goals.js
CHANGED
|
@@ -1,4 +1,296 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Goals domain — ToolSpec contract v2 (v7 F3 T018, the proof-of-contract
|
|
3
|
+
* migration; originally extracted verbatim from the index.ts dispatch switch
|
|
4
|
+
* in v7 A2 slice 1).
|
|
5
|
+
*
|
|
6
|
+
* Each tool is ONE ToolSpec: the advertised definition (name/description/
|
|
7
|
+
* inputSchema — moved here VERBATIM from buildAllTools(), byte-identical on
|
|
8
|
+
* the wire) and the handler live on the same object, so the surface and the
|
|
9
|
+
* behavior cannot drift. Handlers are typed against the narrow GoalsContext
|
|
10
|
+
* slice ({projects, goals}) — NOT the WyrmDB god-object.
|
|
11
|
+
*
|
|
12
|
+
* v7 F3 (T019): the domain is the first consumer of the single dual-emit
|
|
13
|
+
* renderer (src/render.ts) — every success response carries a canonical
|
|
14
|
+
* `structuredContent` body validated by the declared `outputSchema`, and
|
|
15
|
+
* `content[0].text` is DERIVED from that body by a pure template (plain
|
|
16
|
+
* ASCII by default, brand glyphs behind WYRM_FANCY=1). The 6.x prose
|
|
17
|
+
* reformats accordingly (spec §6: text persists but reformats; the glyph
|
|
18
|
+
* decoration moved behind WYRM_FANCY). Not-found responses stay plain
|
|
19
|
+
* `isError` text — error responses are exempt from outputSchema per MCP
|
|
20
|
+
* convention (SEP-1303 bodies are T020's, domain not-founds are 6.x prose).
|
|
21
|
+
*
|
|
22
|
+
* @copyright 2026 Ghost Protocol (Pvt) Ltd.
|
|
23
|
+
* @license Proprietary — (c) 2026 Ghost Protocol (Pvt) Ltd. All rights reserved. See LICENSE.
|
|
24
|
+
*/
|
|
25
|
+
import { TOOL_ANNOTATIONS } from '../tool-annotations.js';
|
|
26
|
+
import { renderResult, withGlyph } from '../render.js';
|
|
27
|
+
export const goalToolSpecs = [
|
|
28
|
+
{
|
|
29
|
+
name: "wyrm_goal_set",
|
|
30
|
+
description: "Set a persistent goal Wyrm will pursue across sessions. Goals carry title, success_criteria, deadline, priority, and a max_iterations cap. The wyrm-loop daemon picks the highest-priority active goal each tick.",
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
title: { type: "string", description: "Short, action-oriented title" },
|
|
35
|
+
description: { type: "string", description: "Longer context" },
|
|
36
|
+
success_criteria: { type: "string", description: "How Wyrm knows when the goal is done — checked each iteration" },
|
|
37
|
+
deadline: { type: "string", description: "Optional ISO timestamp (YYYY-MM-DD or full)" },
|
|
38
|
+
priority: { type: "string", enum: ["critical", "high", "medium", "low"], description: "Default: medium" },
|
|
39
|
+
max_iterations: { type: "number", description: "Cap on OODA iterations (default 20, max 200) — guard against infinite spinning" },
|
|
40
|
+
projectPath: { type: "string", description: "Scope to a project (optional)" },
|
|
41
|
+
},
|
|
42
|
+
required: ["title"],
|
|
43
|
+
},
|
|
44
|
+
outputSchema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
id: { type: "integer" },
|
|
48
|
+
title: { type: "string" },
|
|
49
|
+
priority: { type: "string", enum: ["critical", "high", "medium", "low"] },
|
|
50
|
+
status: { type: "string", enum: ["active", "paused", "completed", "abandoned"] },
|
|
51
|
+
project_id: { type: ["integer", "null"] },
|
|
52
|
+
},
|
|
53
|
+
required: ["id", "title", "priority", "status", "project_id"],
|
|
54
|
+
},
|
|
55
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_set,
|
|
56
|
+
aliases: [],
|
|
57
|
+
handler: (args, { projects, goals }) => {
|
|
58
|
+
const a = args;
|
|
59
|
+
const project = a.projectPath ? projects.getProject(a.projectPath) : null;
|
|
60
|
+
const goal = goals.set({
|
|
61
|
+
project_id: project?.id ?? null,
|
|
62
|
+
title: a.title,
|
|
63
|
+
description: a.description,
|
|
64
|
+
success_criteria: a.success_criteria,
|
|
65
|
+
deadline: a.deadline,
|
|
66
|
+
priority: a.priority,
|
|
67
|
+
max_iterations: a.max_iterations,
|
|
68
|
+
});
|
|
69
|
+
return renderResult({ id: goal.id, title: goal.title, priority: goal.priority, status: goal.status, project_id: goal.project_id }, (b, g) => withGlyph(g.brand, `Goal #${b.id} set [${b.priority}]: ${b.title}`));
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "wyrm_goal_list",
|
|
74
|
+
description: "List goals, optionally filtered by status / project. Default: active goals, prioritized.",
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
status: { type: "string", enum: ["active", "paused", "completed", "abandoned"] },
|
|
79
|
+
projectPath: { type: "string" },
|
|
80
|
+
limit: { type: "number" },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
outputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
count: { type: "integer" },
|
|
87
|
+
goals: {
|
|
88
|
+
type: "array",
|
|
89
|
+
items: {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
id: { type: "integer" },
|
|
93
|
+
title: { type: "string" },
|
|
94
|
+
priority: { type: "string", enum: ["critical", "high", "medium", "low"] },
|
|
95
|
+
status: { type: "string", enum: ["active", "paused", "completed", "abandoned"] },
|
|
96
|
+
iterations_count: { type: "integer" },
|
|
97
|
+
max_iterations: { type: "integer" },
|
|
98
|
+
progress_pct: { type: "integer", minimum: 0 },
|
|
99
|
+
last_outcome: { type: ["string", "null"] },
|
|
100
|
+
},
|
|
101
|
+
required: ["id", "title", "priority", "status", "iterations_count", "max_iterations", "progress_pct", "last_outcome"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ["count", "goals"],
|
|
106
|
+
},
|
|
107
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_list,
|
|
108
|
+
aliases: [],
|
|
109
|
+
handler: (args, { projects, goals }) => {
|
|
110
|
+
const a = args;
|
|
111
|
+
const project = a.projectPath ? projects.getProject(a.projectPath) : null;
|
|
112
|
+
const rows = goals.list({ status: a.status, project_id: project?.id, limit: a.limit });
|
|
113
|
+
const body = {
|
|
114
|
+
count: rows.length,
|
|
115
|
+
goals: rows.map((row) => ({
|
|
116
|
+
id: row.id,
|
|
117
|
+
title: row.title,
|
|
118
|
+
priority: row.priority,
|
|
119
|
+
status: row.status,
|
|
120
|
+
iterations_count: row.iterations_count,
|
|
121
|
+
max_iterations: row.max_iterations,
|
|
122
|
+
progress_pct: Math.round(100 * row.iterations_count / Math.max(1, row.max_iterations)),
|
|
123
|
+
last_outcome: row.last_outcome,
|
|
124
|
+
})),
|
|
125
|
+
};
|
|
126
|
+
return renderResult(body, (b, g) => {
|
|
127
|
+
if (b.count === 0)
|
|
128
|
+
return withGlyph(g.brand, 'No goals.');
|
|
129
|
+
const lines = b.goals.map((row) => `${g.bullet} #${row.id} [${row.priority}/${row.status}] ${row.title} -- ${row.iterations_count}/${row.max_iterations} iter (${row.progress_pct}%)` +
|
|
130
|
+
(row.last_outcome ? ` last:${row.last_outcome}` : ''));
|
|
131
|
+
return `${withGlyph(g.brand, `${b.count} goal(s):`)}\n${lines.join('\n')}`;
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "wyrm_goal_complete",
|
|
137
|
+
description: "Manually mark a goal completed (e.g. when the agent reports done or the operator finishes it).",
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: "object",
|
|
140
|
+
properties: {
|
|
141
|
+
id: { type: "number" },
|
|
142
|
+
note: { type: "string", description: "Final outcome note" },
|
|
143
|
+
},
|
|
144
|
+
required: ["id"],
|
|
145
|
+
},
|
|
146
|
+
outputSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
id: { type: "integer" },
|
|
150
|
+
title: { type: "string" },
|
|
151
|
+
status: { type: "string", enum: ["completed"] },
|
|
152
|
+
},
|
|
153
|
+
required: ["id", "title", "status"],
|
|
154
|
+
},
|
|
155
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_complete,
|
|
156
|
+
aliases: [],
|
|
157
|
+
handler: (args, { goals }) => {
|
|
158
|
+
const a = args;
|
|
159
|
+
const row = goals.complete(a.id, a.note);
|
|
160
|
+
if (!row)
|
|
161
|
+
return { content: [{ type: "text", text: `Goal #${a.id} not found.` }], isError: true };
|
|
162
|
+
return renderResult({ id: row.id, title: row.title, status: 'completed' }, (b, g) => withGlyph(g.ok, `Goal #${b.id} completed.`));
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "wyrm_goal_pause",
|
|
167
|
+
description: "Pause a goal — wyrm-loop will skip it until resumed.",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: { id: { type: "number" } },
|
|
171
|
+
required: ["id"],
|
|
172
|
+
},
|
|
173
|
+
outputSchema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
id: { type: "integer" },
|
|
177
|
+
title: { type: "string" },
|
|
178
|
+
status: { type: "string", enum: ["paused"] },
|
|
179
|
+
},
|
|
180
|
+
required: ["id", "title", "status"],
|
|
181
|
+
},
|
|
182
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_pause,
|
|
183
|
+
aliases: [],
|
|
184
|
+
handler: (args, { goals }) => {
|
|
185
|
+
const a = args;
|
|
186
|
+
const row = goals.pause(a.id);
|
|
187
|
+
if (!row)
|
|
188
|
+
return { content: [{ type: "text", text: `Goal #${a.id} not found.` }], isError: true };
|
|
189
|
+
return renderResult({ id: row.id, title: row.title, status: 'paused' }, (b, g) => withGlyph(g.paused, `Goal #${b.id} paused.`));
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "wyrm_goal_resume",
|
|
194
|
+
description: "Resume a paused goal.",
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: "object",
|
|
197
|
+
properties: { id: { type: "number" } },
|
|
198
|
+
required: ["id"],
|
|
199
|
+
},
|
|
200
|
+
outputSchema: {
|
|
201
|
+
type: "object",
|
|
202
|
+
properties: {
|
|
203
|
+
id: { type: "integer" },
|
|
204
|
+
title: { type: "string" },
|
|
205
|
+
status: { type: "string", enum: ["active"] },
|
|
206
|
+
},
|
|
207
|
+
required: ["id", "title", "status"],
|
|
208
|
+
},
|
|
209
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_resume,
|
|
210
|
+
aliases: [],
|
|
211
|
+
handler: (args, { goals }) => {
|
|
212
|
+
const a = args;
|
|
213
|
+
const row = goals.resume(a.id);
|
|
214
|
+
if (!row)
|
|
215
|
+
return { content: [{ type: "text", text: `Goal #${a.id} not found.` }], isError: true };
|
|
216
|
+
return renderResult({ id: row.id, title: row.title, status: 'active' }, (b, g) => withGlyph(g.resumed, `Goal #${b.id} resumed.`));
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "wyrm_goal_abandon",
|
|
221
|
+
description: "Abandon a goal (won't be auto-pursued; record kept for audit).",
|
|
222
|
+
inputSchema: {
|
|
223
|
+
type: "object",
|
|
224
|
+
properties: {
|
|
225
|
+
id: { type: "number" },
|
|
226
|
+
reason: { type: "string" },
|
|
227
|
+
},
|
|
228
|
+
required: ["id"],
|
|
229
|
+
},
|
|
230
|
+
outputSchema: {
|
|
231
|
+
type: "object",
|
|
232
|
+
properties: {
|
|
233
|
+
id: { type: "integer" },
|
|
234
|
+
title: { type: "string" },
|
|
235
|
+
status: { type: "string", enum: ["abandoned"] },
|
|
236
|
+
},
|
|
237
|
+
required: ["id", "title", "status"],
|
|
238
|
+
},
|
|
239
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_abandon,
|
|
240
|
+
aliases: [],
|
|
241
|
+
handler: (args, { goals }) => {
|
|
242
|
+
const a = args;
|
|
243
|
+
const row = goals.abandon(a.id, a.reason);
|
|
244
|
+
if (!row)
|
|
245
|
+
return { content: [{ type: "text", text: `Goal #${a.id} not found.` }], isError: true };
|
|
246
|
+
return renderResult({ id: row.id, title: row.title, status: 'abandoned' }, (b, g) => withGlyph(g.brand, `Goal #${b.id} abandoned.`));
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "wyrm_goal_iterations",
|
|
251
|
+
description: "List the OODA iterations Wyrm has run for a goal — what it observed, decided, and resulted.",
|
|
252
|
+
inputSchema: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
goal_id: { type: "number" },
|
|
256
|
+
limit: { type: "number" },
|
|
257
|
+
},
|
|
258
|
+
required: ["goal_id"],
|
|
259
|
+
},
|
|
260
|
+
outputSchema: {
|
|
261
|
+
type: "object",
|
|
262
|
+
properties: {
|
|
263
|
+
goal_id: { type: "integer" },
|
|
264
|
+
count: { type: "integer" },
|
|
265
|
+
iterations: {
|
|
266
|
+
type: "array",
|
|
267
|
+
items: {
|
|
268
|
+
type: "object",
|
|
269
|
+
properties: {
|
|
270
|
+
id: { type: "integer" },
|
|
271
|
+
iteration_num: { type: "integer" },
|
|
272
|
+
observe_summary: { type: ["string", "null"] },
|
|
273
|
+
decided_action: { type: ["string", "null"] },
|
|
274
|
+
action_result: { type: ["string", "null"] },
|
|
275
|
+
outcome: { type: "string", enum: ["progressed", "blocked", "done", "error"] },
|
|
276
|
+
ran_at: { type: "string" },
|
|
277
|
+
},
|
|
278
|
+
required: ["id", "iteration_num", "outcome", "ran_at"],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
required: ["goal_id", "count", "iterations"],
|
|
283
|
+
},
|
|
284
|
+
annotations: TOOL_ANNOTATIONS.wyrm_goal_iterations,
|
|
285
|
+
aliases: [],
|
|
286
|
+
handler: (args, { goals }) => {
|
|
287
|
+
const a = args;
|
|
288
|
+
const rows = goals.iterationsFor(a.goal_id, Math.min(100, a.limit ?? 20));
|
|
289
|
+
const body = { goal_id: a.goal_id, count: rows.length, iterations: rows };
|
|
290
|
+
return renderResult(body, (b, g) => b.count === 0
|
|
291
|
+
? withGlyph(g.brand, `Goal #${b.goal_id} has no iterations yet.`)
|
|
292
|
+
: `${withGlyph(g.brand, `${b.count} iteration(s) for goal #${b.goal_id}:`)}\n${JSON.stringify(b.iterations, null, 2)}`);
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
];
|
|
296
|
+
//# sourceMappingURL=goals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../src/handlers/intelligence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAkBzE,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../src/handlers/intelligence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAkBzE,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAkuB5E,CAAC"}
|