nodebench-mcp 2.31.2 → 2.33.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 +14 -6
- package/dist/engine/server.js +14 -4
- package/dist/engine/server.js.map +1 -1
- package/dist/index.js +1581 -670
- package/dist/index.js.map +1 -1
- package/dist/security/SecurityError.d.ts +18 -0
- package/dist/security/SecurityError.js +22 -0
- package/dist/security/SecurityError.js.map +1 -0
- package/dist/security/__tests__/security.test.d.ts +8 -0
- package/dist/security/__tests__/security.test.js +295 -0
- package/dist/security/__tests__/security.test.js.map +1 -0
- package/dist/security/auditLog.d.ts +36 -0
- package/dist/security/auditLog.js +178 -0
- package/dist/security/auditLog.js.map +1 -0
- package/dist/security/commandSandbox.d.ts +33 -0
- package/dist/security/commandSandbox.js +159 -0
- package/dist/security/commandSandbox.js.map +1 -0
- package/dist/security/config.d.ts +23 -0
- package/dist/security/config.js +43 -0
- package/dist/security/config.js.map +1 -0
- package/dist/security/credentialRedactor.d.ts +22 -0
- package/dist/security/credentialRedactor.js +118 -0
- package/dist/security/credentialRedactor.js.map +1 -0
- package/dist/security/index.d.ts +20 -0
- package/dist/security/index.js +21 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/pathSandbox.d.ts +23 -0
- package/dist/security/pathSandbox.js +160 -0
- package/dist/security/pathSandbox.js.map +1 -0
- package/dist/security/urlValidator.d.ts +23 -0
- package/dist/security/urlValidator.js +125 -0
- package/dist/security/urlValidator.js.map +1 -0
- package/dist/tools/agentBootstrapTools.js +22 -29
- package/dist/tools/agentBootstrapTools.js.map +1 -1
- package/dist/tools/contextSandboxTools.js +7 -9
- package/dist/tools/contextSandboxTools.js.map +1 -1
- package/dist/tools/deepSimTools.d.ts +2 -0
- package/dist/tools/deepSimTools.js +404 -0
- package/dist/tools/deepSimTools.js.map +1 -0
- package/dist/tools/dimensionTools.d.ts +2 -0
- package/dist/tools/dimensionTools.js +246 -0
- package/dist/tools/dimensionTools.js.map +1 -0
- package/dist/tools/executionTraceTools.d.ts +2 -0
- package/dist/tools/executionTraceTools.js +446 -0
- package/dist/tools/executionTraceTools.js.map +1 -0
- package/dist/tools/founderTools.d.ts +13 -0
- package/dist/tools/founderTools.js +595 -0
- package/dist/tools/founderTools.js.map +1 -0
- package/dist/tools/founderTrackingTools.d.ts +9 -0
- package/dist/tools/founderTrackingTools.js +644 -0
- package/dist/tools/founderTrackingTools.js.map +1 -0
- package/dist/tools/gitWorkflowTools.js +14 -10
- package/dist/tools/gitWorkflowTools.js.map +1 -1
- package/dist/tools/githubTools.js +19 -2
- package/dist/tools/githubTools.js.map +1 -1
- package/dist/tools/index.d.ts +87 -0
- package/dist/tools/index.js +102 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/localFileTools.js +24 -12
- package/dist/tools/localFileTools.js.map +1 -1
- package/dist/tools/memoryDecay.d.ts +70 -0
- package/dist/tools/memoryDecay.js +247 -0
- package/dist/tools/memoryDecay.js.map +1 -0
- package/dist/tools/missionHarnessTools.d.ts +32 -0
- package/dist/tools/missionHarnessTools.js +972 -0
- package/dist/tools/missionHarnessTools.js.map +1 -0
- package/dist/tools/observabilityTools.d.ts +15 -0
- package/dist/tools/observabilityTools.js +787 -0
- package/dist/tools/observabilityTools.js.map +1 -0
- package/dist/tools/openclawTools.js +151 -36
- package/dist/tools/openclawTools.js.map +1 -1
- package/dist/tools/progressiveDiscoveryTools.js +5 -4
- package/dist/tools/progressiveDiscoveryTools.js.map +1 -1
- package/dist/tools/qualityGateTools.js +118 -2
- package/dist/tools/qualityGateTools.js.map +1 -1
- package/dist/tools/rssTools.js +3 -0
- package/dist/tools/rssTools.js.map +1 -1
- package/dist/tools/scraplingTools.js +15 -0
- package/dist/tools/scraplingTools.js.map +1 -1
- package/dist/tools/seoTools.js +66 -1
- package/dist/tools/seoTools.js.map +1 -1
- package/dist/tools/sessionMemoryTools.js +50 -11
- package/dist/tools/sessionMemoryTools.js.map +1 -1
- package/dist/tools/temporalIntelligenceTools.d.ts +12 -0
- package/dist/tools/temporalIntelligenceTools.js +1068 -0
- package/dist/tools/temporalIntelligenceTools.js.map +1 -0
- package/dist/tools/toolRegistry.d.ts +19 -0
- package/dist/tools/toolRegistry.js +956 -31
- package/dist/tools/toolRegistry.js.map +1 -1
- package/dist/tools/webTools.js +14 -1
- package/dist/tools/webTools.js.map +1 -1
- package/dist/tools/webmcpTools.js +13 -2
- package/dist/tools/webmcpTools.js.map +1 -1
- package/dist/toolsetRegistry.js +14 -0
- package/dist/toolsetRegistry.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/package.json +124 -124
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founderTools — MCP tools for the Founder Operating Memory system.
|
|
3
|
+
*
|
|
4
|
+
* Core tool: `founder_deep_context_gather` — a structured nudge that forces
|
|
5
|
+
* calling agents to perform OCD-level deep-wide searches across all relevant
|
|
6
|
+
* information sources before generating or updating an artifact packet.
|
|
7
|
+
*
|
|
8
|
+
* This is the "DNA packet" tool: it always gets triggered when an agent is
|
|
9
|
+
* about to produce a founder artifact, ensuring the agent has gathered
|
|
10
|
+
* every piece of context it needs.
|
|
11
|
+
*/
|
|
12
|
+
const GATHER_PROTOCOL = [
|
|
13
|
+
{
|
|
14
|
+
id: "company_identity",
|
|
15
|
+
label: "Company Identity & Canonical Truth",
|
|
16
|
+
description: "Establish the single-sentence mission, current wedge, company state, founding mode, and identity confidence. This is the anchor — everything else is measured against it.",
|
|
17
|
+
sources: [
|
|
18
|
+
"company profile (localStorage or Convex)",
|
|
19
|
+
"founder setup wizard outputs",
|
|
20
|
+
"recent identity clarification actions",
|
|
21
|
+
"pitch deck or one-pager if available",
|
|
22
|
+
],
|
|
23
|
+
required: true,
|
|
24
|
+
searchPatterns: [
|
|
25
|
+
"company name",
|
|
26
|
+
"canonical mission",
|
|
27
|
+
"wedge",
|
|
28
|
+
"identity confidence",
|
|
29
|
+
"company state",
|
|
30
|
+
"founding mode",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "what_changed",
|
|
35
|
+
label: "What Changed Since Last Review",
|
|
36
|
+
description: "Gather ALL changes: signals from external sources, agent outputs, initiative status transitions, user decisions, and any context drift. Do not stop at the first 3 — scan exhaustively.",
|
|
37
|
+
sources: [
|
|
38
|
+
"change feed / timeline events",
|
|
39
|
+
"agent activity logs and heartbeats",
|
|
40
|
+
"initiative status transitions",
|
|
41
|
+
"user action history",
|
|
42
|
+
"external signal queue",
|
|
43
|
+
"daily brief if available",
|
|
44
|
+
],
|
|
45
|
+
required: true,
|
|
46
|
+
searchPatterns: [
|
|
47
|
+
"changes since",
|
|
48
|
+
"recent signals",
|
|
49
|
+
"agent completed",
|
|
50
|
+
"status changed",
|
|
51
|
+
"decision made",
|
|
52
|
+
"new information",
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "contradictions",
|
|
57
|
+
label: "Contradictions & Tensions",
|
|
58
|
+
description: "Identify where current actions contradict stated mission, where initiative timelines conflict, where agent work drifts from the wedge, and where external signals challenge assumptions. Look for: identity confidence below 70%, keyword misalignment between wedge and active initiatives, timing conflicts between partnerships and compliance, and any unresolved items from prior packets.",
|
|
59
|
+
sources: [
|
|
60
|
+
"identity confidence score vs threshold",
|
|
61
|
+
"initiative alignment with wedge keywords",
|
|
62
|
+
"agent drift indicators",
|
|
63
|
+
"unresolved items from prior artifact packets",
|
|
64
|
+
"compliance/partnership timing conflicts",
|
|
65
|
+
],
|
|
66
|
+
required: true,
|
|
67
|
+
searchPatterns: [
|
|
68
|
+
"contradiction",
|
|
69
|
+
"conflict",
|
|
70
|
+
"misalignment",
|
|
71
|
+
"drift",
|
|
72
|
+
"blocked",
|
|
73
|
+
"unresolved",
|
|
74
|
+
"risk",
|
|
75
|
+
"tension",
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "interventions",
|
|
80
|
+
label: "Ranked Interventions & Next Actions",
|
|
81
|
+
description: "Pull the full intervention queue with priority scores, confidence levels, and linked initiatives. Include both accepted and deferred interventions. Rank by priority score descending.",
|
|
82
|
+
sources: [
|
|
83
|
+
"intervention records with states",
|
|
84
|
+
"initiative dependencies",
|
|
85
|
+
"agent task queue",
|
|
86
|
+
"pending actions by due date",
|
|
87
|
+
],
|
|
88
|
+
required: true,
|
|
89
|
+
searchPatterns: [
|
|
90
|
+
"intervention",
|
|
91
|
+
"priority score",
|
|
92
|
+
"next action",
|
|
93
|
+
"pending",
|
|
94
|
+
"due date",
|
|
95
|
+
"accepted",
|
|
96
|
+
"deferred",
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "initiatives",
|
|
101
|
+
label: "Active Initiatives & Their Health",
|
|
102
|
+
description: "Map every active initiative: status, risk level, priority score, agent count, and objective. Flag any with risk=high or status=blocked. Cross-reference with interventions.",
|
|
103
|
+
sources: [
|
|
104
|
+
"initiative records",
|
|
105
|
+
"initiative-to-agent mapping",
|
|
106
|
+
"initiative risk assessments",
|
|
107
|
+
"milestone progress",
|
|
108
|
+
],
|
|
109
|
+
required: true,
|
|
110
|
+
searchPatterns: [
|
|
111
|
+
"initiative",
|
|
112
|
+
"active",
|
|
113
|
+
"blocked",
|
|
114
|
+
"high risk",
|
|
115
|
+
"milestone",
|
|
116
|
+
"objective",
|
|
117
|
+
"progress",
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "agents",
|
|
122
|
+
label: "Agent Status & Drift Detection",
|
|
123
|
+
description: "Check every connected agent: heartbeat recency, current goal alignment with wedge, any blocked or drifting status. If an agent's goal doesn't contain keywords from the current wedge, flag it.",
|
|
124
|
+
sources: [
|
|
125
|
+
"agent presence records",
|
|
126
|
+
"heartbeat timestamps",
|
|
127
|
+
"current goal descriptions",
|
|
128
|
+
"agent status overrides",
|
|
129
|
+
],
|
|
130
|
+
required: true,
|
|
131
|
+
searchPatterns: [
|
|
132
|
+
"agent",
|
|
133
|
+
"heartbeat",
|
|
134
|
+
"status",
|
|
135
|
+
"goal",
|
|
136
|
+
"blocked",
|
|
137
|
+
"drifting",
|
|
138
|
+
"waiting",
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "nearby_entities",
|
|
143
|
+
label: "Nearby Entities & Comparables",
|
|
144
|
+
description: "Identify the core company, its products, top 3-5 competitors/comparables, and any design partners or customers. Keep narrow — this is supportive context, not a graph explorer.",
|
|
145
|
+
sources: [
|
|
146
|
+
"nearby entity records",
|
|
147
|
+
"competitor tracking",
|
|
148
|
+
"partnership records",
|
|
149
|
+
"product catalog",
|
|
150
|
+
],
|
|
151
|
+
required: false,
|
|
152
|
+
searchPatterns: [
|
|
153
|
+
"competitor",
|
|
154
|
+
"comparable",
|
|
155
|
+
"partner",
|
|
156
|
+
"customer",
|
|
157
|
+
"product",
|
|
158
|
+
"entity",
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: "prior_packets",
|
|
163
|
+
label: "Prior Artifact Packets & Drift",
|
|
164
|
+
description: "Load the last 2-3 artifact packets. Compare: what contradictions were flagged then vs now? What actions were recommended then — were they completed? What identity confidence was recorded — has it changed? This temporal comparison is what makes the packet valuable.",
|
|
165
|
+
sources: [
|
|
166
|
+
"artifact packet history (localStorage)",
|
|
167
|
+
"packet diff comparison",
|
|
168
|
+
"action completion tracking",
|
|
169
|
+
],
|
|
170
|
+
required: false,
|
|
171
|
+
searchPatterns: [
|
|
172
|
+
"prior packet",
|
|
173
|
+
"previous",
|
|
174
|
+
"history",
|
|
175
|
+
"resolved",
|
|
176
|
+
"completed action",
|
|
177
|
+
"drift since",
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: "daily_memo",
|
|
182
|
+
label: "Daily Briefing & Operating Memo",
|
|
183
|
+
description: "Pull the latest daily memo: what matters today, what to do next, unresolved items. This feeds the operating memo section of the artifact packet.",
|
|
184
|
+
sources: [
|
|
185
|
+
"daily brief / morning digest",
|
|
186
|
+
"research hub signals",
|
|
187
|
+
"narrative status",
|
|
188
|
+
],
|
|
189
|
+
required: false,
|
|
190
|
+
searchPatterns: [
|
|
191
|
+
"daily brief",
|
|
192
|
+
"what matters",
|
|
193
|
+
"unresolved",
|
|
194
|
+
"morning digest",
|
|
195
|
+
"operating memo",
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "evidence",
|
|
200
|
+
label: "Evidence & Provenance Chain",
|
|
201
|
+
description: "For every claim in the packet, trace it back to a source: which signal, which agent output, which user action, which external document. The packet must be auditable — no ungrounded assertions.",
|
|
202
|
+
sources: [
|
|
203
|
+
"evidence records",
|
|
204
|
+
"signal source URLs",
|
|
205
|
+
"agent output logs",
|
|
206
|
+
"document references",
|
|
207
|
+
"user action timestamps",
|
|
208
|
+
],
|
|
209
|
+
required: false,
|
|
210
|
+
searchPatterns: [
|
|
211
|
+
"evidence",
|
|
212
|
+
"source",
|
|
213
|
+
"provenance",
|
|
214
|
+
"citation",
|
|
215
|
+
"reference",
|
|
216
|
+
"grounded",
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
];
|
|
220
|
+
/* ------------------------------------------------------------------ */
|
|
221
|
+
/* Tools */
|
|
222
|
+
/* ------------------------------------------------------------------ */
|
|
223
|
+
export const founderTools = [
|
|
224
|
+
{
|
|
225
|
+
name: "founder_deep_context_gather",
|
|
226
|
+
description: "MUST be called before generating or updating a Founder Artifact Packet. " +
|
|
227
|
+
"Returns a structured context-gathering protocol that forces the agent to " +
|
|
228
|
+
"systematically search across ALL relevant information sources with OCD-level " +
|
|
229
|
+
"thoroughness. The protocol covers: company identity, what changed, contradictions, " +
|
|
230
|
+
"interventions, initiatives, agents, nearby entities, prior packets, daily memo, " +
|
|
231
|
+
"and evidence provenance. Each step includes specific search patterns and sources. " +
|
|
232
|
+
"The agent MUST complete all required steps and report findings before packet generation. " +
|
|
233
|
+
"This prevents shallow or incomplete artifact packets.",
|
|
234
|
+
inputSchema: {
|
|
235
|
+
type: "object",
|
|
236
|
+
properties: {
|
|
237
|
+
packetType: {
|
|
238
|
+
type: "string",
|
|
239
|
+
enum: ["weekly_reset", "pre_delegation", "important_change"],
|
|
240
|
+
description: "The type of artifact packet being prepared. Affects which gather steps are emphasized.",
|
|
241
|
+
},
|
|
242
|
+
priorPacketSummary: {
|
|
243
|
+
type: "string",
|
|
244
|
+
description: "Optional summary of the most recent prior packet, for temporal comparison.",
|
|
245
|
+
},
|
|
246
|
+
focusAreas: {
|
|
247
|
+
type: "array",
|
|
248
|
+
items: { type: "string" },
|
|
249
|
+
description: "Optional list of specific areas to emphasize in the gather (e.g., 'compliance', 'fundraising').",
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
required: ["packetType"],
|
|
253
|
+
},
|
|
254
|
+
handler: async (args) => {
|
|
255
|
+
const packetType = args.packetType;
|
|
256
|
+
const priorPacketSummary = args.priorPacketSummary ?? null;
|
|
257
|
+
const focusAreas = args.focusAreas ?? [];
|
|
258
|
+
if (!["weekly_reset", "pre_delegation", "important_change"].includes(packetType)) {
|
|
259
|
+
return {
|
|
260
|
+
error: true,
|
|
261
|
+
message: `Invalid packetType: ${packetType}. Must be one of: weekly_reset, pre_delegation, important_change.`,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
// Build the gather protocol with type-specific emphasis
|
|
265
|
+
const typeEmphasis = {
|
|
266
|
+
weekly_reset: [
|
|
267
|
+
"company_identity",
|
|
268
|
+
"what_changed",
|
|
269
|
+
"contradictions",
|
|
270
|
+
"interventions",
|
|
271
|
+
"prior_packets",
|
|
272
|
+
],
|
|
273
|
+
pre_delegation: [
|
|
274
|
+
"company_identity",
|
|
275
|
+
"interventions",
|
|
276
|
+
"agents",
|
|
277
|
+
"initiatives",
|
|
278
|
+
"evidence",
|
|
279
|
+
],
|
|
280
|
+
important_change: [
|
|
281
|
+
"what_changed",
|
|
282
|
+
"contradictions",
|
|
283
|
+
"interventions",
|
|
284
|
+
"evidence",
|
|
285
|
+
"nearby_entities",
|
|
286
|
+
],
|
|
287
|
+
};
|
|
288
|
+
const emphasized = typeEmphasis[packetType] ?? [];
|
|
289
|
+
const steps = GATHER_PROTOCOL.map((step) => ({
|
|
290
|
+
...step,
|
|
291
|
+
emphasized: emphasized.includes(step.id),
|
|
292
|
+
focusRelevant: focusAreas.some((area) => step.searchPatterns.some((pattern) => pattern.toLowerCase().includes(area.toLowerCase()) ||
|
|
293
|
+
area.toLowerCase().includes(pattern.toLowerCase()))),
|
|
294
|
+
}));
|
|
295
|
+
const requiredSteps = steps.filter((s) => s.required);
|
|
296
|
+
const optionalSteps = steps.filter((s) => !s.required);
|
|
297
|
+
const protocol = {
|
|
298
|
+
protocolVersion: "1.0",
|
|
299
|
+
packetType,
|
|
300
|
+
totalSteps: steps.length,
|
|
301
|
+
requiredSteps: requiredSteps.length,
|
|
302
|
+
instructions: [
|
|
303
|
+
"You MUST complete ALL required gather steps before generating the artifact packet.",
|
|
304
|
+
"For each step, search the listed sources using the provided search patterns.",
|
|
305
|
+
"Do NOT skip a step because it seems redundant — redundancy catches blind spots.",
|
|
306
|
+
"If a source is unavailable, note it explicitly in your findings.",
|
|
307
|
+
"Steps marked 'emphasized' are critical for this packet type — spend extra effort.",
|
|
308
|
+
"Steps marked 'focusRelevant' match the user's focus areas — prioritize these.",
|
|
309
|
+
"After completing all steps, synthesize findings into a single coherent packet.",
|
|
310
|
+
"The packet must be auditable: every claim traces to a source from your gather.",
|
|
311
|
+
],
|
|
312
|
+
gatherSteps: steps.map((step) => ({
|
|
313
|
+
id: step.id,
|
|
314
|
+
label: step.label,
|
|
315
|
+
description: step.description,
|
|
316
|
+
sources: step.sources,
|
|
317
|
+
searchPatterns: step.searchPatterns,
|
|
318
|
+
required: step.required,
|
|
319
|
+
emphasized: step.emphasized,
|
|
320
|
+
focusRelevant: step.focusRelevant,
|
|
321
|
+
status: "pending",
|
|
322
|
+
})),
|
|
323
|
+
temporalComparison: priorPacketSummary
|
|
324
|
+
? {
|
|
325
|
+
enabled: true,
|
|
326
|
+
priorSummary: priorPacketSummary,
|
|
327
|
+
compareInstructions: [
|
|
328
|
+
"Compare each finding against the prior packet summary.",
|
|
329
|
+
"Flag: new contradictions, resolved contradictions, completed actions, new risks.",
|
|
330
|
+
"Track identity confidence delta.",
|
|
331
|
+
"Note any recommended actions from the prior packet that were NOT completed.",
|
|
332
|
+
],
|
|
333
|
+
}
|
|
334
|
+
: {
|
|
335
|
+
enabled: false,
|
|
336
|
+
note: "No prior packet provided. Generate the packet as a baseline.",
|
|
337
|
+
},
|
|
338
|
+
outputContract: {
|
|
339
|
+
description: "After completing all gather steps, produce a FounderPacketSourceInput object with these fields:",
|
|
340
|
+
fields: [
|
|
341
|
+
"company: { name, canonicalMission, wedge, companyState, foundingMode, identityConfidence }",
|
|
342
|
+
"changes: Array<{ id, timestamp, relativeTime, type, description, linkedInitiativeId? }>",
|
|
343
|
+
"interventions: Array<{ id, title, linkedInitiative, linkedInitiativeId, priorityScore, confidence }>",
|
|
344
|
+
"initiatives: Array<{ id, title, status, risk, priorityScore, objective }>",
|
|
345
|
+
"agents: Array<{ id, name, status, currentGoal }>",
|
|
346
|
+
"dailyMemo: { whatMatters: string[], whatToDoNext: string[], unresolved: string[] }",
|
|
347
|
+
"nearbyEntities: Array<{ id, name, relationship, whyItMatters }>",
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
qualityGates: [
|
|
351
|
+
"Every required step must have at least one finding.",
|
|
352
|
+
"Contradictions step must produce at least 1 contradiction or explicitly state none found.",
|
|
353
|
+
"Evidence step must trace at least 3 claims to sources.",
|
|
354
|
+
"If identity confidence < 0.7, the packet MUST recommend a 'Clarify Identity' action.",
|
|
355
|
+
"If any agent is drifting or blocked, the packet MUST flag it in contradictions.",
|
|
356
|
+
"No field in the output contract may be an empty array without explanation.",
|
|
357
|
+
],
|
|
358
|
+
};
|
|
359
|
+
return protocol;
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "founder_packet_validate",
|
|
364
|
+
description: "Validates a draft Founder Artifact Packet against quality gates before saving. " +
|
|
365
|
+
"Checks: all required sections populated, contradictions are non-empty, evidence " +
|
|
366
|
+
"traces to sources, actions are ranked by priority, and identity confidence is " +
|
|
367
|
+
"consistent with the company state. Returns pass/fail with specific failure reasons.",
|
|
368
|
+
inputSchema: {
|
|
369
|
+
type: "object",
|
|
370
|
+
properties: {
|
|
371
|
+
packet: {
|
|
372
|
+
type: "object",
|
|
373
|
+
description: "The draft FounderArtifactPacket object to validate.",
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
required: ["packet"],
|
|
377
|
+
},
|
|
378
|
+
handler: async (args) => {
|
|
379
|
+
const packet = args.packet;
|
|
380
|
+
const failures = [];
|
|
381
|
+
const warnings = [];
|
|
382
|
+
// Required fields check
|
|
383
|
+
const requiredFields = [
|
|
384
|
+
"packetId",
|
|
385
|
+
"packetType",
|
|
386
|
+
"canonicalEntity",
|
|
387
|
+
"whatChanged",
|
|
388
|
+
"contradictions",
|
|
389
|
+
"nextActions",
|
|
390
|
+
"operatingMemo",
|
|
391
|
+
"agentInstructions",
|
|
392
|
+
"keyEvidence",
|
|
393
|
+
"nearbyEntities",
|
|
394
|
+
"provenance",
|
|
395
|
+
];
|
|
396
|
+
for (const field of requiredFields) {
|
|
397
|
+
if (!(field in packet) || packet[field] === null || packet[field] === undefined) {
|
|
398
|
+
failures.push(`Missing required field: ${field}`);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
// Canonical entity checks
|
|
402
|
+
const entity = packet.canonicalEntity;
|
|
403
|
+
if (entity) {
|
|
404
|
+
if (!entity.name)
|
|
405
|
+
failures.push("canonicalEntity.name is empty");
|
|
406
|
+
if (!entity.mission)
|
|
407
|
+
failures.push("canonicalEntity.mission is empty");
|
|
408
|
+
if (!entity.wedge)
|
|
409
|
+
failures.push("canonicalEntity.wedge is empty");
|
|
410
|
+
const confidence = entity.identityConfidence;
|
|
411
|
+
if (typeof confidence === "number" && confidence < 0.7) {
|
|
412
|
+
const actions = packet.nextActions;
|
|
413
|
+
const hasClarifyAction = actions?.some((a) => typeof a.label === "string" &&
|
|
414
|
+
a.label.toLowerCase().includes("clarify"));
|
|
415
|
+
if (!hasClarifyAction) {
|
|
416
|
+
warnings.push(`Identity confidence is ${Math.round(confidence * 100)}% (below 70%) but no "Clarify Identity" action was included.`);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
// Contradictions check
|
|
421
|
+
const contradictions = packet.contradictions;
|
|
422
|
+
if (Array.isArray(contradictions) && contradictions.length === 0) {
|
|
423
|
+
warnings.push("contradictions array is empty — are there truly no tensions?");
|
|
424
|
+
}
|
|
425
|
+
// Next actions check
|
|
426
|
+
const actions = packet.nextActions;
|
|
427
|
+
if (Array.isArray(actions)) {
|
|
428
|
+
if (actions.length === 0) {
|
|
429
|
+
failures.push("nextActions is empty — every packet must recommend at least one action.");
|
|
430
|
+
}
|
|
431
|
+
// Check priority ordering
|
|
432
|
+
for (let i = 1; i < actions.length; i++) {
|
|
433
|
+
const prevPriority = actions[i - 1].priority;
|
|
434
|
+
const currPriority = actions[i].priority;
|
|
435
|
+
const order = ["high", "medium", "low"];
|
|
436
|
+
if (order.indexOf(prevPriority) > order.indexOf(currPriority)) {
|
|
437
|
+
warnings.push(`nextActions are not sorted by priority: action ${i} (${currPriority}) comes after action ${i - 1} (${prevPriority}).`);
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
// Evidence check
|
|
443
|
+
const evidence = packet.keyEvidence;
|
|
444
|
+
if (Array.isArray(evidence) && evidence.length < 3) {
|
|
445
|
+
warnings.push(`Only ${evidence.length} evidence items — aim for at least 3 for auditability.`);
|
|
446
|
+
}
|
|
447
|
+
// Operating memo check
|
|
448
|
+
if (typeof packet.operatingMemo === "string" && packet.operatingMemo.length < 50) {
|
|
449
|
+
warnings.push("operatingMemo is very short — ensure it captures the key narrative.");
|
|
450
|
+
}
|
|
451
|
+
const passed = failures.length === 0;
|
|
452
|
+
return {
|
|
453
|
+
valid: passed,
|
|
454
|
+
failures,
|
|
455
|
+
warnings,
|
|
456
|
+
summary: passed
|
|
457
|
+
? `Packet validates with ${warnings.length} warning(s).`
|
|
458
|
+
: `Packet FAILED validation: ${failures.length} error(s), ${warnings.length} warning(s).`,
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
name: "founder_packet_diff",
|
|
464
|
+
description: "Compares two Founder Artifact Packets and returns a structured diff showing " +
|
|
465
|
+
"what changed between them: new contradictions, resolved contradictions, completed " +
|
|
466
|
+
"actions, identity confidence delta, new/removed nearby entities, and narrative drift. " +
|
|
467
|
+
"Use this to power the history review and important-change detection.",
|
|
468
|
+
inputSchema: {
|
|
469
|
+
type: "object",
|
|
470
|
+
properties: {
|
|
471
|
+
currentPacket: {
|
|
472
|
+
type: "object",
|
|
473
|
+
description: "The current (newer) artifact packet.",
|
|
474
|
+
},
|
|
475
|
+
previousPacket: {
|
|
476
|
+
type: "object",
|
|
477
|
+
description: "The previous (older) artifact packet to compare against.",
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
required: ["currentPacket", "previousPacket"],
|
|
481
|
+
},
|
|
482
|
+
handler: async (args) => {
|
|
483
|
+
const current = args.currentPacket;
|
|
484
|
+
const previous = args.previousPacket;
|
|
485
|
+
// Identity confidence delta
|
|
486
|
+
const currentEntity = current.canonicalEntity;
|
|
487
|
+
const prevEntity = previous.canonicalEntity;
|
|
488
|
+
const currentConfidence = currentEntity?.identityConfidence ?? 0;
|
|
489
|
+
const prevConfidence = prevEntity?.identityConfidence ?? 0;
|
|
490
|
+
const confidenceDelta = currentConfidence - prevConfidence;
|
|
491
|
+
// Contradiction diff
|
|
492
|
+
const currentContradictions = current.contradictions ?? [];
|
|
493
|
+
const prevContradictions = previous.contradictions ?? [];
|
|
494
|
+
const prevTitles = new Set(prevContradictions.map((c) => c.title));
|
|
495
|
+
const currTitles = new Set(currentContradictions.map((c) => c.title));
|
|
496
|
+
const newContradictions = currentContradictions.filter((c) => !prevTitles.has(c.title));
|
|
497
|
+
const resolvedContradictions = prevContradictions.filter((c) => !currTitles.has(c.title));
|
|
498
|
+
const persistingContradictions = currentContradictions.filter((c) => prevTitles.has(c.title));
|
|
499
|
+
// Action diff
|
|
500
|
+
const currentActions = current.nextActions ?? [];
|
|
501
|
+
const prevActions = previous.nextActions ?? [];
|
|
502
|
+
const prevActionLabels = new Set(prevActions.map((a) => a.label));
|
|
503
|
+
const currActionLabels = new Set(currentActions.map((a) => a.label));
|
|
504
|
+
const newActions = currentActions.filter((a) => !prevActionLabels.has(a.label));
|
|
505
|
+
const completedOrDropped = prevActions.filter((a) => !currActionLabels.has(a.label));
|
|
506
|
+
// Nearby entities diff
|
|
507
|
+
const currentEntities = current.nearbyEntities ?? [];
|
|
508
|
+
const prevEntities = previous.nearbyEntities ?? [];
|
|
509
|
+
const prevEntityNames = new Set(prevEntities.map((e) => e.name));
|
|
510
|
+
const currEntityNames = new Set(currentEntities.map((e) => e.name));
|
|
511
|
+
const newEntities = currentEntities.filter((e) => !prevEntityNames.has(e.name));
|
|
512
|
+
const removedEntities = prevEntities.filter((e) => !currEntityNames.has(e.name));
|
|
513
|
+
// Narrative drift detection
|
|
514
|
+
const currentMemo = current.operatingMemo ?? "";
|
|
515
|
+
const prevMemo = previous.operatingMemo ?? "";
|
|
516
|
+
const memoChanged = currentMemo !== prevMemo;
|
|
517
|
+
const currentWedge = currentEntity?.wedge ?? "";
|
|
518
|
+
const prevWedge = prevEntity?.wedge ?? "";
|
|
519
|
+
const wedgeChanged = currentWedge !== prevWedge;
|
|
520
|
+
return {
|
|
521
|
+
identity: {
|
|
522
|
+
confidenceDelta: Math.round(confidenceDelta * 100) / 100,
|
|
523
|
+
confidenceCurrent: currentConfidence,
|
|
524
|
+
confidencePrevious: prevConfidence,
|
|
525
|
+
direction: confidenceDelta > 0.05
|
|
526
|
+
? "improving"
|
|
527
|
+
: confidenceDelta < -0.05
|
|
528
|
+
? "declining"
|
|
529
|
+
: "stable",
|
|
530
|
+
wedgeChanged,
|
|
531
|
+
currentWedge: wedgeChanged ? currentWedge : undefined,
|
|
532
|
+
previousWedge: wedgeChanged ? prevWedge : undefined,
|
|
533
|
+
},
|
|
534
|
+
contradictions: {
|
|
535
|
+
new: newContradictions.map((c) => ({
|
|
536
|
+
title: c.title,
|
|
537
|
+
severity: c.severity,
|
|
538
|
+
})),
|
|
539
|
+
resolved: resolvedContradictions.map((c) => ({
|
|
540
|
+
title: c.title,
|
|
541
|
+
severity: c.severity,
|
|
542
|
+
})),
|
|
543
|
+
persisting: persistingContradictions.map((c) => ({
|
|
544
|
+
title: c.title,
|
|
545
|
+
severity: c.severity,
|
|
546
|
+
})),
|
|
547
|
+
},
|
|
548
|
+
actions: {
|
|
549
|
+
new: newActions.map((a) => ({
|
|
550
|
+
label: a.label,
|
|
551
|
+
priority: a.priority,
|
|
552
|
+
})),
|
|
553
|
+
completedOrDropped: completedOrDropped.map((a) => ({
|
|
554
|
+
label: a.label,
|
|
555
|
+
priority: a.priority,
|
|
556
|
+
})),
|
|
557
|
+
},
|
|
558
|
+
entities: {
|
|
559
|
+
added: newEntities.map((e) => ({ name: e.name, relationship: e.relationship })),
|
|
560
|
+
removed: removedEntities.map((e) => ({ name: e.name, relationship: e.relationship })),
|
|
561
|
+
},
|
|
562
|
+
narrative: {
|
|
563
|
+
memoChanged,
|
|
564
|
+
wedgeChanged,
|
|
565
|
+
overallDrift: wedgeChanged
|
|
566
|
+
? "significant"
|
|
567
|
+
: memoChanged && newContradictions.length > 0
|
|
568
|
+
? "moderate"
|
|
569
|
+
: memoChanged || newContradictions.length > 0
|
|
570
|
+
? "minor"
|
|
571
|
+
: "stable",
|
|
572
|
+
},
|
|
573
|
+
summary: [
|
|
574
|
+
confidenceDelta !== 0
|
|
575
|
+
? `Identity confidence ${confidenceDelta > 0 ? "+" : ""}${Math.round(confidenceDelta * 100)}%`
|
|
576
|
+
: null,
|
|
577
|
+
newContradictions.length > 0
|
|
578
|
+
? `${newContradictions.length} new contradiction(s)`
|
|
579
|
+
: null,
|
|
580
|
+
resolvedContradictions.length > 0
|
|
581
|
+
? `${resolvedContradictions.length} resolved contradiction(s)`
|
|
582
|
+
: null,
|
|
583
|
+
newActions.length > 0
|
|
584
|
+
? `${newActions.length} new action(s)`
|
|
585
|
+
: null,
|
|
586
|
+
completedOrDropped.length > 0
|
|
587
|
+
? `${completedOrDropped.length} completed/dropped action(s)`
|
|
588
|
+
: null,
|
|
589
|
+
wedgeChanged ? "Wedge changed" : null,
|
|
590
|
+
].filter(Boolean),
|
|
591
|
+
};
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
];
|
|
595
|
+
//# sourceMappingURL=founderTools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"founderTools.js","sourceRoot":"","sources":["../../src/tools/founderTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiBH,MAAM,eAAe,GAAiB;IACpC;QACE,EAAE,EAAE,kBAAkB;QACtB,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EACT,2KAA2K;QAC7K,OAAO,EAAE;YACP,0CAA0C;YAC1C,8BAA8B;YAC9B,uCAAuC;YACvC,sCAAsC;SACvC;QACD,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACd,cAAc;YACd,mBAAmB;YACnB,OAAO;YACP,qBAAqB;YACrB,eAAe;YACf,eAAe;SAChB;KACF;IACD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,gCAAgC;QACvC,WAAW,EACT,yLAAyL;QAC3L,OAAO,EAAE;YACP,+BAA+B;YAC/B,oCAAoC;YACpC,+BAA+B;YAC/B,qBAAqB;YACrB,uBAAuB;YACvB,0BAA0B;SA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AAC,eAAe,CAAC,CAAC,CAAC,IAAI;iBACtC,CAAC,MAAM,CAAC,OAAO,CAAC;aAClB,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founderTrackingTools — Temporal action tracking across sessions, days, weeks,
|
|
3
|
+
* months, quarters, and years.
|
|
4
|
+
*
|
|
5
|
+
* Every significant action records before/after state and reasoning.
|
|
6
|
+
* Aggregation queries run in SQL for efficiency.
|
|
7
|
+
*/
|
|
8
|
+
import type { McpTool } from "../types.js";
|
|
9
|
+
export declare const founderTrackingTools: McpTool[];
|