proofscan 0.10.22 → 0.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-shell.d.ts +7 -0
- package/dist/cli-shell.d.ts.map +1 -0
- package/dist/cli-shell.js +34 -0
- package/dist/cli-shell.js.map +1 -0
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +112 -57
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/plans.d.ts +7 -0
- package/dist/commands/plans.d.ts.map +1 -0
- package/dist/commands/plans.js +486 -0
- package/dist/commands/plans.js.map +1 -0
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +7 -2
- package/dist/commands/scan.js.map +1 -1
- package/dist/db/connection.d.ts +22 -0
- package/dist/db/connection.d.ts.map +1 -1
- package/dist/db/connection.js +141 -8
- package/dist/db/connection.js.map +1 -1
- package/dist/db/schema.d.ts +10 -5
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +85 -6
- package/dist/db/schema.js.map +1 -1
- package/dist/db/types.d.ts +1 -1
- package/dist/db/types.d.ts.map +1 -1
- package/dist/help/categories.d.ts.map +1 -1
- package/dist/help/categories.js +15 -0
- package/dist/help/categories.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +31 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +32 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +32 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/plans/artifacts.d.ts +53 -0
- package/dist/plans/artifacts.d.ts.map +1 -0
- package/dist/plans/artifacts.js +186 -0
- package/dist/plans/artifacts.js.map +1 -0
- package/dist/plans/builtin.d.ts +40 -0
- package/dist/plans/builtin.d.ts.map +1 -0
- package/dist/plans/builtin.js +75 -0
- package/dist/plans/builtin.js.map +1 -0
- package/dist/plans/digest.d.ts +24 -0
- package/dist/plans/digest.d.ts.map +1 -0
- package/dist/plans/digest.js +49 -0
- package/dist/plans/digest.js.map +1 -0
- package/dist/plans/index.d.ts +11 -0
- package/dist/plans/index.d.ts.map +1 -0
- package/dist/plans/index.js +11 -0
- package/dist/plans/index.js.map +1 -0
- package/dist/plans/runner.d.ts +47 -0
- package/dist/plans/runner.d.ts.map +1 -0
- package/dist/plans/runner.js +360 -0
- package/dist/plans/runner.js.map +1 -0
- package/dist/plans/schema.d.ts +192 -0
- package/dist/plans/schema.d.ts.map +1 -0
- package/dist/plans/schema.js +81 -0
- package/dist/plans/schema.js.map +1 -0
- package/dist/plans/store.d.ts +111 -0
- package/dist/plans/store.d.ts.map +1 -0
- package/dist/plans/store.js +350 -0
- package/dist/plans/store.js.map +1 -0
- package/dist/popl/index.d.ts +1 -1
- package/dist/popl/index.d.ts.map +1 -1
- package/dist/popl/index.js +1 -1
- package/dist/popl/index.js.map +1 -1
- package/dist/popl/service.d.ts +12 -0
- package/dist/popl/service.d.ts.map +1 -1
- package/dist/popl/service.js +213 -0
- package/dist/popl/service.js.map +1 -1
- package/dist/popl/types.d.ts +5 -1
- package/dist/popl/types.d.ts.map +1 -1
- package/dist/shell/context-applicator.d.ts.map +1 -1
- package/dist/shell/context-applicator.js +7 -0
- package/dist/shell/context-applicator.js.map +1 -1
- package/dist/shell/ref-resolver.d.ts +34 -3
- package/dist/shell/ref-resolver.d.ts.map +1 -1
- package/dist/shell/ref-resolver.js +128 -1
- package/dist/shell/ref-resolver.js.map +1 -1
- package/dist/shell/router-commands.d.ts.map +1 -1
- package/dist/shell/router-commands.js +108 -25
- package/dist/shell/router-commands.js.map +1 -1
- package/dist/shell/types.d.ts.map +1 -1
- package/dist/shell/types.js +12 -0
- package/dist/shell/types.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan runner - executes validation plans against MCP servers
|
|
3
|
+
* Phase 5.2: MCP validation scenario execution
|
|
4
|
+
* Phase 5.3: Unified session recording (events.db + proofs.db)
|
|
5
|
+
*/
|
|
6
|
+
import { ulid } from 'ulid';
|
|
7
|
+
import { StdioConnection } from '../transports/stdio.js';
|
|
8
|
+
import { PlansStore } from './store.js';
|
|
9
|
+
import { EventsStore } from '../db/events-store.js';
|
|
10
|
+
import { writeAllArtifacts } from './artifacts.js';
|
|
11
|
+
export class PlanRunner {
|
|
12
|
+
configDir;
|
|
13
|
+
store;
|
|
14
|
+
eventsStore;
|
|
15
|
+
constructor(configDir) {
|
|
16
|
+
this.configDir = configDir;
|
|
17
|
+
this.store = new PlansStore(configDir);
|
|
18
|
+
this.eventsStore = new EventsStore(configDir);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Run a plan against a connector
|
|
22
|
+
* Records session in both proofs.db (runs table) and events.db (sessions/events)
|
|
23
|
+
*/
|
|
24
|
+
async run(plan, connector, options = {}) {
|
|
25
|
+
const timeout = (options.timeout || 30) * 1000;
|
|
26
|
+
const dryRun = options.dryRun || false;
|
|
27
|
+
const runId = ulid();
|
|
28
|
+
const startedAt = new Date().toISOString();
|
|
29
|
+
// Parse plan definition
|
|
30
|
+
const def = JSON.parse(JSON.stringify(await import('yaml').then(yaml => yaml.parse(plan.content_yaml))));
|
|
31
|
+
// Create run record in proofs.db (unless dry run)
|
|
32
|
+
if (!dryRun) {
|
|
33
|
+
this.store.createRun({
|
|
34
|
+
runId,
|
|
35
|
+
planName: plan.name,
|
|
36
|
+
planDigest: plan.digest_sha256,
|
|
37
|
+
connectorId: connector.id,
|
|
38
|
+
artifactPath: `artifacts/${runId}`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Create session in events.db (unless dry run)
|
|
42
|
+
const session = dryRun
|
|
43
|
+
? { session_id: `dry-run-${Date.now()}` }
|
|
44
|
+
: this.eventsStore.createSession(connector.id);
|
|
45
|
+
const sessionId = session.session_id;
|
|
46
|
+
// Track RPC calls for events.db
|
|
47
|
+
const rpcIdMap = new Map();
|
|
48
|
+
const steps = [];
|
|
49
|
+
const inventory = {};
|
|
50
|
+
let finalStatus = 'completed';
|
|
51
|
+
// Check transport type
|
|
52
|
+
if (connector.transport.type !== 'stdio') {
|
|
53
|
+
const endedAt = new Date().toISOString();
|
|
54
|
+
if (!dryRun) {
|
|
55
|
+
this.eventsStore.saveEvent(sessionId, 'client_to_server', 'transport_event', {
|
|
56
|
+
rawJson: JSON.stringify({ type: 'error', message: `Unsupported transport type: ${connector.transport.type}` }),
|
|
57
|
+
});
|
|
58
|
+
this.eventsStore.endSession(sessionId, 'error');
|
|
59
|
+
}
|
|
60
|
+
const errorResult = {
|
|
61
|
+
runId,
|
|
62
|
+
planName: plan.name,
|
|
63
|
+
planDigest: plan.digest_sha256,
|
|
64
|
+
connectorId: connector.id,
|
|
65
|
+
status: 'failed',
|
|
66
|
+
steps: [],
|
|
67
|
+
inventory,
|
|
68
|
+
startedAt,
|
|
69
|
+
endedAt,
|
|
70
|
+
sessionId: dryRun ? undefined : sessionId,
|
|
71
|
+
};
|
|
72
|
+
if (!dryRun) {
|
|
73
|
+
this.store.completeRun(runId, 'failed');
|
|
74
|
+
writeAllArtifacts(options.outDir || this.configDir, errorResult, def, plan.content_yaml, plan.content_normalized);
|
|
75
|
+
}
|
|
76
|
+
return errorResult;
|
|
77
|
+
}
|
|
78
|
+
const transport = connector.transport;
|
|
79
|
+
const connection = new StdioConnection(transport);
|
|
80
|
+
try {
|
|
81
|
+
// Log connection attempt
|
|
82
|
+
if (!dryRun) {
|
|
83
|
+
this.eventsStore.saveEvent(sessionId, 'client_to_server', 'transport_event', {
|
|
84
|
+
rawJson: JSON.stringify({
|
|
85
|
+
type: 'connect_attempt',
|
|
86
|
+
command: transport.command,
|
|
87
|
+
args: transport.args,
|
|
88
|
+
plan: plan.name,
|
|
89
|
+
runId,
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Set up message logging for events.db
|
|
94
|
+
connection.on('message', (msg, raw) => {
|
|
95
|
+
if (dryRun)
|
|
96
|
+
return;
|
|
97
|
+
const isRequest = 'method' in msg && 'id' in msg && msg.id !== null;
|
|
98
|
+
const isNotification = 'method' in msg && !('id' in msg);
|
|
99
|
+
const isResponse = 'id' in msg && !('method' in msg);
|
|
100
|
+
const direction = isResponse ? 'server_to_client' :
|
|
101
|
+
(isRequest || isNotification) && !('id' in msg && 'result' in msg) ? 'client_to_server' : 'server_to_client';
|
|
102
|
+
let kind;
|
|
103
|
+
if (isRequest)
|
|
104
|
+
kind = 'request';
|
|
105
|
+
else if (isNotification)
|
|
106
|
+
kind = 'notification';
|
|
107
|
+
else if (isResponse)
|
|
108
|
+
kind = 'response';
|
|
109
|
+
else
|
|
110
|
+
kind = 'transport_event';
|
|
111
|
+
let rpcId;
|
|
112
|
+
// Handle RPC tracking
|
|
113
|
+
if (isRequest && 'id' in msg && msg.id !== null && 'method' in msg) {
|
|
114
|
+
const rpcCall = this.eventsStore.saveRpcCall(sessionId, String(msg.id), msg.method);
|
|
115
|
+
rpcIdMap.set(msg.id, rpcCall.rpc_id);
|
|
116
|
+
rpcId = rpcCall.rpc_id;
|
|
117
|
+
}
|
|
118
|
+
else if (isResponse && 'id' in msg && msg.id !== null) {
|
|
119
|
+
rpcId = rpcIdMap.get(msg.id);
|
|
120
|
+
if (rpcId) {
|
|
121
|
+
const resp = msg;
|
|
122
|
+
this.eventsStore.completeRpcCall(sessionId, String(msg.id), !resp.error, resp.error?.code);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
this.eventsStore.saveEvent(sessionId, direction, kind, {
|
|
126
|
+
rpcId: rpcId || (('id' in msg && msg.id !== null) ? String(msg.id) : undefined),
|
|
127
|
+
rawJson: raw,
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
connection.on('stderr', (data) => {
|
|
131
|
+
if (!dryRun) {
|
|
132
|
+
this.eventsStore.saveEvent(sessionId, 'server_to_client', 'transport_event', {
|
|
133
|
+
rawJson: JSON.stringify({ type: 'stderr', data: data.trim() }),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
connection.on('error', (error) => {
|
|
138
|
+
if (!dryRun) {
|
|
139
|
+
this.eventsStore.saveEvent(sessionId, 'server_to_client', 'transport_event', {
|
|
140
|
+
rawJson: JSON.stringify({ type: 'error', message: error.message }),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
// Connect to MCP server
|
|
145
|
+
await connection.connect();
|
|
146
|
+
if (!dryRun) {
|
|
147
|
+
this.eventsStore.saveEvent(sessionId, 'server_to_client', 'transport_event', {
|
|
148
|
+
rawJson: JSON.stringify({ type: 'connected' }),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// Execute each step
|
|
152
|
+
for (let i = 0; i < def.steps.length; i++) {
|
|
153
|
+
const step = def.steps[i];
|
|
154
|
+
const stepResult = await this.executeStep(connection, step, i, inventory, timeout);
|
|
155
|
+
steps.push(stepResult);
|
|
156
|
+
// Update inventory based on response
|
|
157
|
+
if (!stepResult.skipped && stepResult.response?.result) {
|
|
158
|
+
this.updateInventory(inventory, step.mcp, stepResult.response.result);
|
|
159
|
+
}
|
|
160
|
+
// Track failures
|
|
161
|
+
if (!stepResult.skipped && stepResult.response?.error) {
|
|
162
|
+
if (finalStatus === 'completed') {
|
|
163
|
+
finalStatus = 'partial';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// Check if all non-skipped steps failed
|
|
168
|
+
const executed = steps.filter(s => !s.skipped);
|
|
169
|
+
const failed = executed.filter(s => s.response?.error);
|
|
170
|
+
if (executed.length > 0 && failed.length === executed.length) {
|
|
171
|
+
finalStatus = 'failed';
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
// Fatal error during execution
|
|
176
|
+
finalStatus = 'failed';
|
|
177
|
+
const errorStep = {
|
|
178
|
+
stepIndex: steps.length,
|
|
179
|
+
method: 'execution_error',
|
|
180
|
+
skipped: false,
|
|
181
|
+
request: { method: 'execution_error', params: {} },
|
|
182
|
+
response: { error: { message: err instanceof Error ? err.message : String(err) } },
|
|
183
|
+
startedAt: new Date().toISOString(),
|
|
184
|
+
endedAt: new Date().toISOString(),
|
|
185
|
+
durationMs: 0,
|
|
186
|
+
};
|
|
187
|
+
steps.push(errorStep);
|
|
188
|
+
if (!dryRun) {
|
|
189
|
+
this.eventsStore.saveEvent(sessionId, 'client_to_server', 'transport_event', {
|
|
190
|
+
rawJson: JSON.stringify({ type: 'execution_error', error: err instanceof Error ? err.message : String(err) }),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
finally {
|
|
195
|
+
connection.close();
|
|
196
|
+
}
|
|
197
|
+
const endedAt = new Date().toISOString();
|
|
198
|
+
// End session in events.db
|
|
199
|
+
if (!dryRun) {
|
|
200
|
+
this.eventsStore.saveEvent(sessionId, 'client_to_server', 'transport_event', {
|
|
201
|
+
rawJson: JSON.stringify({ type: 'disconnected', plan: plan.name, runId, status: finalStatus }),
|
|
202
|
+
});
|
|
203
|
+
this.eventsStore.endSession(sessionId, finalStatus === 'failed' ? 'error' : 'normal');
|
|
204
|
+
}
|
|
205
|
+
const result = {
|
|
206
|
+
runId,
|
|
207
|
+
planName: plan.name,
|
|
208
|
+
planDigest: plan.digest_sha256,
|
|
209
|
+
connectorId: connector.id,
|
|
210
|
+
status: finalStatus,
|
|
211
|
+
steps,
|
|
212
|
+
inventory,
|
|
213
|
+
startedAt,
|
|
214
|
+
endedAt,
|
|
215
|
+
sessionId: dryRun ? undefined : sessionId,
|
|
216
|
+
};
|
|
217
|
+
// Complete run in proofs.db and write artifacts (unless dry run)
|
|
218
|
+
if (!dryRun) {
|
|
219
|
+
this.store.completeRun(runId, finalStatus);
|
|
220
|
+
writeAllArtifacts(options.outDir || this.configDir, result, def, plan.content_yaml, plan.content_normalized);
|
|
221
|
+
}
|
|
222
|
+
return result;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Execute a single plan step
|
|
226
|
+
*/
|
|
227
|
+
async executeStep(connection, step, index, inventory, timeout) {
|
|
228
|
+
const startedAt = new Date().toISOString();
|
|
229
|
+
// Check when condition
|
|
230
|
+
if (step.when) {
|
|
231
|
+
const shouldExecute = this.evaluateWhenCondition(step.when, inventory);
|
|
232
|
+
if (!shouldExecute) {
|
|
233
|
+
const endedAt = new Date().toISOString();
|
|
234
|
+
return {
|
|
235
|
+
stepIndex: index,
|
|
236
|
+
method: step.mcp,
|
|
237
|
+
skipped: true,
|
|
238
|
+
skipReason: `Condition not met: ${step.when}`,
|
|
239
|
+
request: { method: step.mcp, params: {} },
|
|
240
|
+
startedAt,
|
|
241
|
+
endedAt,
|
|
242
|
+
durationMs: new Date(endedAt).getTime() - new Date(startedAt).getTime(),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Build request params based on method
|
|
247
|
+
const params = this.buildRequestParams(step.mcp);
|
|
248
|
+
try {
|
|
249
|
+
const response = await connection.sendRequest(step.mcp, params, timeout);
|
|
250
|
+
const endedAt = new Date().toISOString();
|
|
251
|
+
return {
|
|
252
|
+
stepIndex: index,
|
|
253
|
+
method: step.mcp,
|
|
254
|
+
skipped: false,
|
|
255
|
+
request: { method: step.mcp, params },
|
|
256
|
+
response: {
|
|
257
|
+
result: response.result,
|
|
258
|
+
error: response.error,
|
|
259
|
+
},
|
|
260
|
+
startedAt,
|
|
261
|
+
endedAt,
|
|
262
|
+
durationMs: new Date(endedAt).getTime() - new Date(startedAt).getTime(),
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
catch (err) {
|
|
266
|
+
const endedAt = new Date().toISOString();
|
|
267
|
+
return {
|
|
268
|
+
stepIndex: index,
|
|
269
|
+
method: step.mcp,
|
|
270
|
+
skipped: false,
|
|
271
|
+
request: { method: step.mcp, params },
|
|
272
|
+
response: {
|
|
273
|
+
error: {
|
|
274
|
+
code: -1,
|
|
275
|
+
message: err instanceof Error ? err.message : String(err),
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
startedAt,
|
|
279
|
+
endedAt,
|
|
280
|
+
durationMs: new Date(endedAt).getTime() - new Date(startedAt).getTime(),
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Build request params for MCP method
|
|
286
|
+
*/
|
|
287
|
+
buildRequestParams(method) {
|
|
288
|
+
switch (method) {
|
|
289
|
+
case 'initialize':
|
|
290
|
+
return {
|
|
291
|
+
protocolVersion: '2024-11-05',
|
|
292
|
+
capabilities: {},
|
|
293
|
+
clientInfo: {
|
|
294
|
+
name: 'proofscan',
|
|
295
|
+
version: '1.0.0',
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
case 'tools/list':
|
|
299
|
+
case 'resources/list':
|
|
300
|
+
case 'prompts/list':
|
|
301
|
+
return {};
|
|
302
|
+
default:
|
|
303
|
+
return {};
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Evaluate a when condition against current inventory
|
|
308
|
+
*/
|
|
309
|
+
evaluateWhenCondition(condition, inventory) {
|
|
310
|
+
// Parse condition: capabilities.<field>
|
|
311
|
+
const match = condition.match(/^capabilities\.(\w+)$/);
|
|
312
|
+
if (!match) {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
const field = match[1];
|
|
316
|
+
const capabilities = inventory.capabilities;
|
|
317
|
+
if (!capabilities) {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
// Check if field exists and is truthy
|
|
321
|
+
const value = capabilities[field];
|
|
322
|
+
return value !== undefined && value !== null && value !== false;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Update inventory based on response
|
|
326
|
+
*/
|
|
327
|
+
updateInventory(inventory, method, result) {
|
|
328
|
+
switch (method) {
|
|
329
|
+
case 'initialize': {
|
|
330
|
+
const initResult = result;
|
|
331
|
+
if (initResult.capabilities) {
|
|
332
|
+
inventory.capabilities = initResult.capabilities;
|
|
333
|
+
}
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
case 'tools/list': {
|
|
337
|
+
const toolsResult = result;
|
|
338
|
+
if (toolsResult.tools) {
|
|
339
|
+
inventory.tools = toolsResult.tools;
|
|
340
|
+
}
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case 'resources/list': {
|
|
344
|
+
const resourcesResult = result;
|
|
345
|
+
if (resourcesResult.resources) {
|
|
346
|
+
inventory.resources = resourcesResult.resources;
|
|
347
|
+
}
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case 'prompts/list': {
|
|
351
|
+
const promptsResult = result;
|
|
352
|
+
if (promptsResult.prompts) {
|
|
353
|
+
inventory.prompts = promptsResult.prompts;
|
|
354
|
+
}
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/plans/runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAmC,MAAM,wBAAwB,CAAC;AAE1F,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAkBnD,MAAM,OAAO,UAAU;IACb,SAAS,CAAS;IAClB,KAAK,CAAa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a,GAAG,MAAiC,CAAC;gBACxD,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;oBAC1B,SAAS,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;gBAC5C,CAAC;gBACD,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plans schema definitions
|
|
3
|
+
* Phase 5.2: Validation plans for MCP servers
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Plan step definition - a single MCP method call
|
|
7
|
+
*/
|
|
8
|
+
export interface PlanStep {
|
|
9
|
+
/** MCP method to call: 'initialize' | 'tools/list' | 'resources/list' | 'prompts/list' */
|
|
10
|
+
mcp: string;
|
|
11
|
+
/** Conditional execution: 'capabilities.tools' | 'capabilities.resources' | 'capabilities.prompts' */
|
|
12
|
+
when?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Plan definition as parsed from YAML
|
|
16
|
+
*/
|
|
17
|
+
export interface PlanDefinition {
|
|
18
|
+
/** Schema version (must be 1) */
|
|
19
|
+
version: 1;
|
|
20
|
+
/** Optional plan name (overridden by DB record name) */
|
|
21
|
+
name?: string;
|
|
22
|
+
/** Optional description */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** Validation steps to execute */
|
|
25
|
+
steps: PlanStep[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Plan record stored in database
|
|
29
|
+
*/
|
|
30
|
+
export interface Plan {
|
|
31
|
+
/** Unique plan name (identifier) */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Schema version */
|
|
34
|
+
schema_version: number;
|
|
35
|
+
/** Original YAML content */
|
|
36
|
+
content_yaml: string;
|
|
37
|
+
/** Normalized YAML/JSON for digest calculation */
|
|
38
|
+
content_normalized: string;
|
|
39
|
+
/** SHA-256 digest of normalized content */
|
|
40
|
+
digest_sha256: string;
|
|
41
|
+
/** Optional description */
|
|
42
|
+
description: string | null;
|
|
43
|
+
/** Default connector ID */
|
|
44
|
+
default_connector: string | null;
|
|
45
|
+
/** Source of the plan: 'manual' | 'import' | 'builtin' */
|
|
46
|
+
source: 'manual' | 'import' | 'builtin';
|
|
47
|
+
/** Creation timestamp (ISO) */
|
|
48
|
+
created_at: string;
|
|
49
|
+
/** Last update timestamp (ISO) */
|
|
50
|
+
updated_at: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Run status
|
|
54
|
+
*/
|
|
55
|
+
export type RunStatus = 'running' | 'completed' | 'failed' | 'partial' | 'crashed';
|
|
56
|
+
/**
|
|
57
|
+
* Run record stored in database
|
|
58
|
+
*/
|
|
59
|
+
export interface Run {
|
|
60
|
+
/** Unique run ID (ULID) */
|
|
61
|
+
run_id: string;
|
|
62
|
+
/** Plan name (may be null if plan was deleted) */
|
|
63
|
+
plan_name: string | null;
|
|
64
|
+
/** Plan digest at time of execution */
|
|
65
|
+
plan_digest: string;
|
|
66
|
+
/** Connector ID used for execution */
|
|
67
|
+
connector_id: string;
|
|
68
|
+
/** Run status */
|
|
69
|
+
status: RunStatus;
|
|
70
|
+
/** Relative path to artifacts directory */
|
|
71
|
+
artifact_path: string;
|
|
72
|
+
/** Start timestamp (ISO) */
|
|
73
|
+
started_at: string;
|
|
74
|
+
/** End timestamp (ISO) - null if still running */
|
|
75
|
+
ended_at: string | null;
|
|
76
|
+
/** Record creation timestamp (ISO) */
|
|
77
|
+
created_at: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Step result from plan execution
|
|
81
|
+
*/
|
|
82
|
+
export interface StepResult {
|
|
83
|
+
/** Step index (0-based) */
|
|
84
|
+
stepIndex: number;
|
|
85
|
+
/** MCP method called */
|
|
86
|
+
method: string;
|
|
87
|
+
/** Whether step was skipped due to when condition */
|
|
88
|
+
skipped: boolean;
|
|
89
|
+
/** Reason for skipping (if skipped) */
|
|
90
|
+
skipReason?: string;
|
|
91
|
+
/** Request sent */
|
|
92
|
+
request: {
|
|
93
|
+
method: string;
|
|
94
|
+
params: unknown;
|
|
95
|
+
};
|
|
96
|
+
/** Response received (if not skipped) */
|
|
97
|
+
response?: {
|
|
98
|
+
result?: unknown;
|
|
99
|
+
error?: unknown;
|
|
100
|
+
};
|
|
101
|
+
/** Start timestamp (ISO) */
|
|
102
|
+
startedAt: string;
|
|
103
|
+
/** End timestamp (ISO) */
|
|
104
|
+
endedAt: string;
|
|
105
|
+
/** Duration in milliseconds */
|
|
106
|
+
durationMs: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Inventory collected during plan execution
|
|
110
|
+
*/
|
|
111
|
+
export interface RunInventory {
|
|
112
|
+
/** Capabilities from initialize response */
|
|
113
|
+
capabilities?: unknown;
|
|
114
|
+
/** Tools from tools/list response */
|
|
115
|
+
tools?: unknown[];
|
|
116
|
+
/** Resources from resources/list response */
|
|
117
|
+
resources?: unknown[];
|
|
118
|
+
/** Prompts from prompts/list response */
|
|
119
|
+
prompts?: unknown[];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Complete run result
|
|
123
|
+
*/
|
|
124
|
+
export interface RunResult {
|
|
125
|
+
/** Run ID */
|
|
126
|
+
runId: string;
|
|
127
|
+
/** Plan name */
|
|
128
|
+
planName: string;
|
|
129
|
+
/** Plan digest */
|
|
130
|
+
planDigest: string;
|
|
131
|
+
/** Connector ID */
|
|
132
|
+
connectorId: string;
|
|
133
|
+
/** Final status */
|
|
134
|
+
status: 'completed' | 'failed' | 'partial';
|
|
135
|
+
/** Step results */
|
|
136
|
+
steps: StepResult[];
|
|
137
|
+
/** Collected inventory */
|
|
138
|
+
inventory: RunInventory;
|
|
139
|
+
/** Start timestamp */
|
|
140
|
+
startedAt: string;
|
|
141
|
+
/** End timestamp */
|
|
142
|
+
endedAt: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Run metadata written to meta.json
|
|
146
|
+
*/
|
|
147
|
+
export interface RunMeta {
|
|
148
|
+
/** Run ID */
|
|
149
|
+
runId: string;
|
|
150
|
+
/** Plan name */
|
|
151
|
+
planName: string;
|
|
152
|
+
/** Plan digest at time of run */
|
|
153
|
+
planDigest: string;
|
|
154
|
+
/** Connector ID */
|
|
155
|
+
connectorId: string;
|
|
156
|
+
/** Run status */
|
|
157
|
+
status: RunStatus;
|
|
158
|
+
/** Start timestamp */
|
|
159
|
+
startedAt: string;
|
|
160
|
+
/** End timestamp */
|
|
161
|
+
endedAt?: string;
|
|
162
|
+
/** Total steps count */
|
|
163
|
+
totalSteps: number;
|
|
164
|
+
/** Passed steps count */
|
|
165
|
+
passedSteps: number;
|
|
166
|
+
/** Failed steps count */
|
|
167
|
+
failedSteps: number;
|
|
168
|
+
/** Skipped steps count */
|
|
169
|
+
skippedSteps: number;
|
|
170
|
+
/** Relative artifact path */
|
|
171
|
+
artifactPath: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Supported MCP methods in plans
|
|
175
|
+
*/
|
|
176
|
+
export declare const SUPPORTED_MCP_METHODS: readonly ["initialize", "tools/list", "resources/list", "prompts/list"];
|
|
177
|
+
/**
|
|
178
|
+
* Supported when conditions
|
|
179
|
+
*/
|
|
180
|
+
export declare const SUPPORTED_WHEN_CONDITIONS: readonly ["capabilities.tools", "capabilities.resources", "capabilities.prompts"];
|
|
181
|
+
/**
|
|
182
|
+
* Validate plan name format
|
|
183
|
+
*/
|
|
184
|
+
export declare function isValidPlanName(name: string): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Validate plan definition
|
|
187
|
+
*/
|
|
188
|
+
export declare function validatePlanDefinition(def: unknown): {
|
|
189
|
+
valid: boolean;
|
|
190
|
+
errors: string[];
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/plans/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA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EAAE,CAAA;CAAE,CA4DzF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plans schema definitions
|
|
3
|
+
* Phase 5.2: Validation plans for MCP servers
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Supported MCP methods in plans
|
|
7
|
+
*/
|
|
8
|
+
export const SUPPORTED_MCP_METHODS = [
|
|
9
|
+
'initialize',
|
|
10
|
+
'tools/list',
|
|
11
|
+
'resources/list',
|
|
12
|
+
'prompts/list',
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Supported when conditions
|
|
16
|
+
*/
|
|
17
|
+
export const SUPPORTED_WHEN_CONDITIONS = [
|
|
18
|
+
'capabilities.tools',
|
|
19
|
+
'capabilities.resources',
|
|
20
|
+
'capabilities.prompts',
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Validate plan name format
|
|
24
|
+
*/
|
|
25
|
+
export function isValidPlanName(name) {
|
|
26
|
+
return /^[a-z0-9_-]+$/.test(name);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Validate plan definition
|
|
30
|
+
*/
|
|
31
|
+
export function validatePlanDefinition(def) {
|
|
32
|
+
const errors = [];
|
|
33
|
+
if (!def || typeof def !== 'object') {
|
|
34
|
+
return { valid: false, errors: ['Plan must be an object'] };
|
|
35
|
+
}
|
|
36
|
+
const plan = def;
|
|
37
|
+
// Check version
|
|
38
|
+
if (plan.version !== 1) {
|
|
39
|
+
errors.push(`Invalid version: expected 1, got ${plan.version}`);
|
|
40
|
+
}
|
|
41
|
+
// Check steps
|
|
42
|
+
if (!Array.isArray(plan.steps)) {
|
|
43
|
+
errors.push('steps must be an array');
|
|
44
|
+
return { valid: false, errors };
|
|
45
|
+
}
|
|
46
|
+
if (plan.steps.length === 0) {
|
|
47
|
+
errors.push('steps array cannot be empty');
|
|
48
|
+
}
|
|
49
|
+
// Validate each step
|
|
50
|
+
for (let i = 0; i < plan.steps.length; i++) {
|
|
51
|
+
const step = plan.steps[i];
|
|
52
|
+
if (!step || typeof step !== 'object') {
|
|
53
|
+
errors.push(`Step ${i}: must be an object`);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (typeof step.mcp !== 'string') {
|
|
57
|
+
errors.push(`Step ${i}: mcp must be a string`);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (!SUPPORTED_MCP_METHODS.includes(step.mcp)) {
|
|
61
|
+
errors.push(`Step ${i}: unsupported mcp method '${step.mcp}'`);
|
|
62
|
+
}
|
|
63
|
+
if (step.when !== undefined) {
|
|
64
|
+
if (typeof step.when !== 'string') {
|
|
65
|
+
errors.push(`Step ${i}: when must be a string`);
|
|
66
|
+
}
|
|
67
|
+
else if (!SUPPORTED_WHEN_CONDITIONS.includes(step.when)) {
|
|
68
|
+
errors.push(`Step ${i}: unsupported when condition '${step.when}'`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Check that initialize is first step (if present)
|
|
73
|
+
if (plan.steps.length > 0) {
|
|
74
|
+
const firstStep = plan.steps[0];
|
|
75
|
+
if (firstStep.mcp !== 'initialize') {
|
|
76
|
+
errors.push('First step must be "initialize"');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return { valid: errors.length === 0, errors };
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/plans/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmLH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,cAAc;CACN,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,oBAAoB;IACpB,wBAAwB;IACxB,sBAAsB;CACd,CAAC;AAEX;;GAEG;AACH,MAAM,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