@devflow-tools/mcp-server 0.18.27 → 0.18.28

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.
@@ -2,6 +2,22 @@
2
2
  "version": 2,
3
3
  "compatibility": 1,
4
4
  "commands": {
5
+ "devflow:doctor": {
6
+ "mcpTools": [
7
+ "devflow_runtime_status"
8
+ ],
9
+ "blockedNative": [],
10
+ "source": "core",
11
+ "sourceVersion": "0.18.28",
12
+ "requiresContext": false,
13
+ "evidenceMode": "runtime",
14
+ "skillPath": "skills/devflow:doctor/SKILL.md",
15
+ "hostTools": {
16
+ "claude-code": [
17
+ "mcp__plugin_devflow_devflow__devflow_runtime_status"
18
+ ]
19
+ }
20
+ },
5
21
  "devflow:context": {
6
22
  "mcpTools": [
7
23
  "get_project_context",
@@ -19,14 +35,14 @@
19
35
  "WebFetch"
20
36
  ],
21
37
  "source": "core",
22
- "sourceVersion": "0.18.27",
38
+ "sourceVersion": "0.18.28",
23
39
  "requiresContext": true,
24
40
  "evidenceMode": "mixed",
25
41
  "skillPath": "skills/devflow:context/SKILL.md",
26
42
  "hostTools": {
27
43
  "claude-code": [
28
- "mcp__devflow__get_project_context",
29
- "mcp__devflow__search_symbol"
44
+ "mcp__plugin_devflow_devflow__get_project_context",
45
+ "mcp__plugin_devflow_devflow__search_symbol"
30
46
  ]
31
47
  }
32
48
  },
@@ -44,13 +60,13 @@
44
60
  "Explore"
45
61
  ],
46
62
  "source": "core",
47
- "sourceVersion": "0.18.27",
63
+ "sourceVersion": "0.18.28",
48
64
  "requiresContext": true,
49
65
  "evidenceMode": "mixed",
50
66
  "skillPath": "skills/devflow:graph/SKILL.md",
51
67
  "hostTools": {
52
68
  "claude-code": [
53
- "mcp__devflow__get_dependency_graph"
69
+ "mcp__plugin_devflow_devflow__get_dependency_graph"
54
70
  ]
55
71
  }
56
72
  },
@@ -63,13 +79,13 @@
63
79
  "WebFetch"
64
80
  ],
65
81
  "source": "core",
66
- "sourceVersion": "0.18.27",
82
+ "sourceVersion": "0.18.28",
67
83
  "requiresContext": true,
68
84
  "evidenceMode": "mixed",
69
85
  "skillPath": "skills/devflow:knowledge/SKILL.md",
70
86
  "hostTools": {
71
87
  "claude-code": [
72
- "mcp__devflow__get_knowledge"
88
+ "mcp__plugin_devflow_devflow__get_knowledge"
73
89
  ]
74
90
  }
75
91
  },
@@ -87,13 +103,13 @@
87
103
  "Explore"
88
104
  ],
89
105
  "source": "core",
90
- "sourceVersion": "0.18.27",
106
+ "sourceVersion": "0.18.28",
91
107
  "requiresContext": true,
92
108
  "evidenceMode": "mixed",
93
109
  "skillPath": "skills/devflow:memory/SKILL.md",
94
110
  "hostTools": {
95
111
  "claude-code": [
96
- "mcp__devflow__get_memory"
112
+ "mcp__plugin_devflow_devflow__get_memory"
97
113
  ]
98
114
  }
99
115
  },
@@ -103,13 +119,13 @@
103
119
  ],
104
120
  "blockedNative": [],
105
121
  "source": "core",
106
- "sourceVersion": "0.18.27",
122
+ "sourceVersion": "0.18.28",
107
123
  "requiresContext": true,
108
124
  "evidenceMode": "mixed",
109
125
  "skillPath": "skills/devflow:workflow/SKILL.md",
110
126
  "hostTools": {
111
127
  "claude-code": [
112
- "mcp__devflow__run_workflow"
128
+ "mcp__plugin_devflow_devflow__run_workflow"
113
129
  ]
114
130
  }
115
131
  },
@@ -134,28 +150,28 @@
134
150
  ],
135
151
  "blockedNative": [],
136
152
  "source": "core",
137
- "sourceVersion": "0.18.27",
153
+ "sourceVersion": "0.18.28",
138
154
  "requiresContext": true,
139
155
  "evidenceMode": "mixed",
140
156
  "skillPath": "skills/devflow:delivery/SKILL.md",
141
157
  "hostTools": {
142
158
  "claude-code": [
143
- "mcp__devflow__delivery_status",
144
- "mcp__devflow__delivery_create_case",
145
- "mcp__devflow__delivery_answer",
146
- "mcp__devflow__delivery_revise",
147
- "mcp__devflow__delivery_compare_options",
148
- "mcp__devflow__delivery_approve",
149
- "mcp__devflow__delivery_reject",
150
- "mcp__devflow__delivery_resume",
151
- "mcp__devflow__delivery_recover_task",
152
- "mcp__devflow__delivery_admit_worktree",
153
- "mcp__devflow__delivery_refresh_activation",
154
- "mcp__devflow__delivery_advance",
155
- "mcp__devflow__delivery_retry_task",
156
- "mcp__devflow__delivery_import_external_change",
157
- "mcp__devflow__delivery_export",
158
- "mcp__devflow__delivery_cancel"
159
+ "mcp__plugin_devflow_devflow__delivery_status",
160
+ "mcp__plugin_devflow_devflow__delivery_create_case",
161
+ "mcp__plugin_devflow_devflow__delivery_answer",
162
+ "mcp__plugin_devflow_devflow__delivery_revise",
163
+ "mcp__plugin_devflow_devflow__delivery_compare_options",
164
+ "mcp__plugin_devflow_devflow__delivery_approve",
165
+ "mcp__plugin_devflow_devflow__delivery_reject",
166
+ "mcp__plugin_devflow_devflow__delivery_resume",
167
+ "mcp__plugin_devflow_devflow__delivery_recover_task",
168
+ "mcp__plugin_devflow_devflow__delivery_admit_worktree",
169
+ "mcp__plugin_devflow_devflow__delivery_refresh_activation",
170
+ "mcp__plugin_devflow_devflow__delivery_advance",
171
+ "mcp__plugin_devflow_devflow__delivery_retry_task",
172
+ "mcp__plugin_devflow_devflow__delivery_import_external_change",
173
+ "mcp__plugin_devflow_devflow__delivery_export",
174
+ "mcp__plugin_devflow_devflow__delivery_cancel"
159
175
  ]
160
176
  }
161
177
  },
@@ -181,7 +197,7 @@
181
197
  "skillPath": "skills/devflow:animation/SKILL.md",
182
198
  "hostTools": {
183
199
  "claude-code": [
184
- "mcp__devflow__animation_suggest"
200
+ "mcp__plugin_devflow_devflow__animation_suggest"
185
201
  ]
186
202
  }
187
203
  },
@@ -207,7 +223,7 @@
207
223
  "skillPath": "skills/devflow:css/SKILL.md",
208
224
  "hostTools": {
209
225
  "claude-code": [
210
- "mcp__devflow__css_audit_selectors"
226
+ "mcp__plugin_devflow_devflow__css_audit_selectors"
211
227
  ]
212
228
  }
213
229
  },
@@ -233,7 +249,7 @@
233
249
  "skillPath": "skills/devflow:docker/SKILL.md",
234
250
  "hostTools": {
235
251
  "claude-code": [
236
- "mcp__devflow__docker_dockerize_project"
252
+ "mcp__plugin_devflow_devflow__docker_dockerize_project"
237
253
  ]
238
254
  }
239
255
  },
@@ -262,7 +278,7 @@
262
278
  ],
263
279
  "hostTools": {
264
280
  "claude-code": [
265
- "mcp__devflow__electron_diagnose_bug"
281
+ "mcp__plugin_devflow_devflow__electron_diagnose_bug"
266
282
  ]
267
283
  }
268
284
  },
@@ -288,7 +304,7 @@
288
304
  "skillPath": "skills/devflow:git/SKILL.md",
289
305
  "hostTools": {
290
306
  "claude-code": [
291
- "mcp__devflow__git_analyze_repo"
307
+ "mcp__plugin_devflow_devflow__git_analyze_repo"
292
308
  ]
293
309
  }
294
310
  },
@@ -317,7 +333,7 @@
317
333
  ],
318
334
  "hostTools": {
319
335
  "claude-code": [
320
- "mcp__devflow__graphql_diagnose_bug"
336
+ "mcp__plugin_devflow_devflow__graphql_diagnose_bug"
321
337
  ]
322
338
  }
323
339
  },
@@ -347,8 +363,8 @@
347
363
  ],
348
364
  "hostTools": {
349
365
  "claude-code": [
350
- "mcp__devflow__nest_diagnose_bug",
351
- "mcp__devflow__nest_new_module"
366
+ "mcp__plugin_devflow_devflow__nest_diagnose_bug",
367
+ "mcp__plugin_devflow_devflow__nest_new_module"
352
368
  ]
353
369
  }
354
370
  },
@@ -379,8 +395,8 @@
379
395
  ],
380
396
  "hostTools": {
381
397
  "claude-code": [
382
- "mcp__devflow__nextjs_diagnose_bug",
383
- "mcp__devflow__nextjs_new_page"
398
+ "mcp__plugin_devflow_devflow__nextjs_diagnose_bug",
399
+ "mcp__plugin_devflow_devflow__nextjs_new_page"
384
400
  ]
385
401
  }
386
402
  },
@@ -406,7 +422,7 @@
406
422
  "skillPath": "skills/devflow:performance/SKILL.md",
407
423
  "hostTools": {
408
424
  "claude-code": [
409
- "mcp__devflow__performance_audit_performance"
425
+ "mcp__plugin_devflow_devflow__performance_audit_performance"
410
426
  ]
411
427
  }
412
428
  },
@@ -440,11 +456,11 @@
440
456
  ],
441
457
  "hostTools": {
442
458
  "claude-code": [
443
- "mcp__devflow__react_review_hooks",
444
- "mcp__devflow__react_audit_performance",
445
- "mcp__devflow__react_refactor_component",
446
- "mcp__devflow__react_diagnose_bug",
447
- "mcp__devflow__react_new_component"
459
+ "mcp__plugin_devflow_devflow__react_review_hooks",
460
+ "mcp__plugin_devflow_devflow__react_audit_performance",
461
+ "mcp__plugin_devflow_devflow__react_refactor_component",
462
+ "mcp__plugin_devflow_devflow__react_diagnose_bug",
463
+ "mcp__plugin_devflow_devflow__react_new_component"
448
464
  ]
449
465
  }
450
466
  },
@@ -474,8 +490,8 @@
474
490
  ],
475
491
  "hostTools": {
476
492
  "claude-code": [
477
- "mcp__devflow__tailwind_new_component",
478
- "mcp__devflow__tailwind_optimize_classes"
493
+ "mcp__plugin_devflow_devflow__tailwind_new_component",
494
+ "mcp__plugin_devflow_devflow__tailwind_optimize_classes"
479
495
  ]
480
496
  }
481
497
  },
@@ -504,7 +520,7 @@
504
520
  ],
505
521
  "hostTools": {
506
522
  "claude-code": [
507
- "mcp__devflow__taro_new_page"
523
+ "mcp__plugin_devflow_devflow__taro_new_page"
508
524
  ]
509
525
  }
510
526
  },
@@ -530,7 +546,7 @@
530
546
  "skillPath": "skills/devflow:ui-layout/SKILL.md",
531
547
  "hostTools": {
532
548
  "claude-code": [
533
- "mcp__devflow__ui_layout_generate"
549
+ "mcp__plugin_devflow_devflow__ui_layout_generate"
534
550
  ]
535
551
  }
536
552
  },
@@ -560,8 +576,8 @@
560
576
  ],
561
577
  "hostTools": {
562
578
  "claude-code": [
563
- "mcp__devflow__vue_diagnose_bug",
564
- "mcp__devflow__vue_debug_reactivity"
579
+ "mcp__plugin_devflow_devflow__vue_diagnose_bug",
580
+ "mcp__plugin_devflow_devflow__vue_debug_reactivity"
565
581
  ]
566
582
  }
567
583
  }
@@ -54,6 +54,21 @@ export declare function loadSemanticExecutionContext(input: {
54
54
  context: SemanticExecutionContext;
55
55
  definition: TaskDefinitionV1;
56
56
  } | null;
57
+ export type SemanticExecutionContextInspection = {
58
+ status: 'ready';
59
+ revision: number;
60
+ context: SemanticExecutionContext;
61
+ definition: TaskDefinitionV1;
62
+ } | {
63
+ status: 'unavailable';
64
+ reasonCode: 'task_identity_required' | 'semantic_execution_context_missing' | 'task_aggregate_snapshot_missing' | 'task_definition_missing' | 'runtime_activation_missing' | 'semantic_facts_hash_mismatch' | 'semantic_context_hash_mismatch' | 'channel_plan_hash_mismatch' | 'task_definition_hash_mismatch' | 'activation_snapshot_hash_mismatch';
65
+ revision?: number;
66
+ };
67
+ export declare function inspectSemanticExecutionContext(input: {
68
+ projectRoot: string;
69
+ sessionId?: string;
70
+ turnId?: string;
71
+ }): SemanticExecutionContextInspection;
57
72
  export declare function projectDiagnosticCodeResult(result: import('@devflow-tools/sdk').TaskContextResult & {
58
73
  selectedEvidence: EvidenceCandidateV1[];
59
74
  }, freshnessMs: number, input: {
@@ -1 +1 @@
1
- {"version":3,"file":"retrieval-composition.d.ts","sourceRoot":"","sources":["../src/retrieval-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,cAAc,EAGnB,KAAK,wBAAwB,EAE7B,KAAK,gBAAgB,EAGrB,KAAK,WAAW,EAIjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyB,KAAK,oBAAoB,EAAyC,KAAK,oBAAoB,EAA0B,MAAM,8BAA8B,CAAC;AAW1L,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAEjF,UAAU,8BAA8B;IACtC,QAAQ,EAA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OAAO,CAAC,CAAC;KAChD,CAAC,CAAC;CACJ,EACD,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9D,QAAQ,EAAE,2BAA2B,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAiC7B;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,oBAAoB,EAAE,iBAAiB,EACvD,MAAM,EAAE,OAAO,oBAAoB,EAAE,0BAA0B,EAC/D,eAAe,EAAE,OAAO,oBAAoB,EAAE,wBAAwB,GACrE,uBAAuB,CA2KzB"}
@@ -1,4 +1,4 @@
1
- import { stableRuntimeHash, resolveRuntimeActivationSnapshot, resolveStableProjectIdentity, semanticTextHash, claudeCodeHostAdapter, resolveProjectCapabilityProfile, TASK_CONTEXT_RECEIPT_TTL_MS, } from '@devflow-tools/sdk';
1
+ import { stableRuntimeHash, resolveRuntimeActivationSnapshot, resolveStableProjectIdentity, semanticTextHash, claudeCodeHostAdapter, projectClaudeToolName, resolveProjectCapabilityProfile, TASK_CONTEXT_RECEIPT_TTL_MS, } from '@devflow-tools/sdk';
2
2
  import { ProjectRuntimeFactory } from '@devflow-tools/delivery-line';
3
3
  import { openGlobalDevFlowDatabase } from '@devflow-tools/database';
4
4
  import { RetrievalCoordinator, RetrievalSessionRepository, RetrievalTaskKernelAdapter, } from '@devflow-tools/retrieval-engine';
@@ -13,6 +13,7 @@ export { createSamplingEvidenceReranker } from './sampling-evidence-reranker.js'
13
13
  // read-only projections concurrently, so serialize the coordinator execution
14
14
  // by the immutable task identity and let every projection reuse its receipt.
15
15
  const canonicalRetrievals = new Map();
16
+ const deliverySemanticInitializations = new Map();
16
17
  const PUBLIC_EVIDENCE_TOP_K = 5;
17
18
  export function createDeliveryContextRetrieval(input) {
18
19
  return {
@@ -26,27 +27,12 @@ export function createDeliveryContextRetrieval(input) {
26
27
  requestId: request.requestId,
27
28
  turnId: request.turnId,
28
29
  };
29
- const activation = resolveRuntimeActivationSnapshot({ projectRoot: request.projectRoot });
30
- const resolved = await resolveTaskSemanticContext({
31
- normalizedPrompt: request.query,
30
+ const resolved = await ensureDeliverySemanticTask({
31
+ projectRoot: request.projectRoot,
32
+ query: request.query,
32
33
  identity,
33
34
  revision: request.taskRevision,
34
- activation,
35
- // Delivery has an explicit skill boundary and its own role-aware
36
- // retrieval policy. Do not let the generic host route classifier
37
- // turn an otherwise valid delivery title into out_of_scope or an
38
- // ambiguous minimum-margin escalation.
39
- policy: {
40
- policyHash: 'delivery-context-policy.v1',
41
- budgets: {
42
- hookDeadlineMs: 3_000,
43
- contextTokens: 8_000,
44
- responseReserveTokens: 2_000,
45
- perChannelMs: { code: 1_500, memory: 800, knowledge: 1_500 },
46
- },
47
- },
48
35
  });
49
- persistDeliverySemanticTask({ activation, context: resolved.context, definition: resolved.definition });
50
36
  const result = await executeProjectEvidence({
51
37
  engines: input.engines,
52
38
  context: resolved.context,
@@ -89,6 +75,68 @@ export function createDeliveryContextRetrieval(input) {
89
75
  },
90
76
  };
91
77
  }
78
+ async function ensureDeliverySemanticTask(input) {
79
+ const key = stableRuntimeHash({ identity: input.identity, revision: input.revision });
80
+ const pending = deliverySemanticInitializations.get(key);
81
+ if (pending)
82
+ return pending;
83
+ const current = resolveDeliverySemanticTask(input);
84
+ deliverySemanticInitializations.set(key, current);
85
+ try {
86
+ return await current;
87
+ }
88
+ finally {
89
+ if (deliverySemanticInitializations.get(key) === current) {
90
+ deliverySemanticInitializations.delete(key);
91
+ }
92
+ }
93
+ }
94
+ async function resolveDeliverySemanticTask(input) {
95
+ const existing = loadSemanticExecutionContext({
96
+ projectRoot: input.identity.projectRoot,
97
+ sessionId: input.identity.sessionId,
98
+ turnId: input.identity.turnId,
99
+ });
100
+ if (existing?.definition.revision === input.revision)
101
+ return existing;
102
+ const database = openGlobalDevFlowDatabase(undefined, { busyTimeoutMs: 500 });
103
+ let activation;
104
+ try {
105
+ activation = database.getOrCreateRuntimeActivation({
106
+ identity: input.identity,
107
+ revision: input.revision,
108
+ snapshot: resolveRuntimeActivationSnapshot({ projectRoot: input.projectRoot }),
109
+ }).snapshot;
110
+ }
111
+ finally {
112
+ database.close();
113
+ }
114
+ const resolved = await resolveTaskSemanticContext({
115
+ normalizedPrompt: input.query,
116
+ identity: input.identity,
117
+ revision: input.revision,
118
+ activation,
119
+ // Delivery has an explicit skill boundary and its own role-aware
120
+ // retrieval policy. Do not let the generic host route classifier
121
+ // turn an otherwise valid delivery title into out_of_scope or an
122
+ // ambiguous minimum-margin escalation.
123
+ policy: {
124
+ policyHash: 'delivery-context-policy.v1',
125
+ budgets: {
126
+ hookDeadlineMs: 3_000,
127
+ contextTokens: 8_000,
128
+ responseReserveTokens: 2_000,
129
+ perChannelMs: { code: 1_500, memory: 800, knowledge: 1_500 },
130
+ },
131
+ },
132
+ });
133
+ persistDeliverySemanticTask({
134
+ activation,
135
+ context: resolved.context,
136
+ definition: resolved.definition,
137
+ });
138
+ return { context: resolved.context, definition: resolved.definition };
139
+ }
92
140
  /**
93
141
  * Delivery consumes the semantic-engine authority; it never classifies a
94
142
  * request from business words of its own. The resolver may abstain or return
@@ -394,27 +442,48 @@ function releaseEvidenceIdentity() {
394
442
  return releaseRunId && bundleId ? { releaseRunId, bundleId } : {};
395
443
  }
396
444
  export function loadSemanticExecutionContext(input) {
397
- if (!input.sessionId || !input.turnId)
398
- return null;
445
+ const result = inspectSemanticExecutionContext(input);
446
+ return result.status === 'ready'
447
+ ? { context: result.context, definition: result.definition }
448
+ : null;
449
+ }
450
+ export function inspectSemanticExecutionContext(input) {
451
+ if (!input.sessionId || !input.turnId) {
452
+ return { status: 'unavailable', reasonCode: 'task_identity_required' };
453
+ }
399
454
  const database = openGlobalDevFlowDatabase(undefined, { busyTimeoutMs: 250 });
400
455
  try {
401
456
  const latest = database.getLatestSemanticExecutionContext({
402
457
  projectRoot: input.projectRoot, sessionId: input.sessionId, turnId: input.turnId,
403
458
  });
404
459
  if (!latest)
405
- return null;
460
+ return { status: 'unavailable', reasonCode: 'semantic_execution_context_missing' };
406
461
  const { context, revision } = latest;
407
462
  const snapshot = database.getTaskAggregateSnapshot(input.projectRoot, input.sessionId, input.turnId, revision);
408
463
  const definition = database.getTaskDefinitionV2(context.taskDefinitionHash);
409
464
  const activation = database.getRuntimeActivation(input.projectRoot, input.sessionId, input.turnId, revision);
410
- if (!snapshot || !definition || !activation
411
- || snapshot.semanticFactsHash !== context.facts.factsHash
412
- || snapshot.semanticContextHash !== context.contextHash
413
- || snapshot.channelPlanHash !== context.plan.planHash
414
- || context.taskDefinitionHash !== definition.definitionHash
415
- || context.activationSnapshotHash !== activation.snapshotHash)
416
- return null;
417
- return { definition, context };
465
+ if (!snapshot)
466
+ return { status: 'unavailable', reasonCode: 'task_aggregate_snapshot_missing', revision };
467
+ if (!definition)
468
+ return { status: 'unavailable', reasonCode: 'task_definition_missing', revision };
469
+ if (!activation)
470
+ return { status: 'unavailable', reasonCode: 'runtime_activation_missing', revision };
471
+ if (snapshot.semanticFactsHash !== context.facts.factsHash) {
472
+ return { status: 'unavailable', reasonCode: 'semantic_facts_hash_mismatch', revision };
473
+ }
474
+ if (snapshot.semanticContextHash !== context.contextHash) {
475
+ return { status: 'unavailable', reasonCode: 'semantic_context_hash_mismatch', revision };
476
+ }
477
+ if (snapshot.channelPlanHash !== context.plan.planHash) {
478
+ return { status: 'unavailable', reasonCode: 'channel_plan_hash_mismatch', revision };
479
+ }
480
+ if (context.taskDefinitionHash !== definition.definitionHash) {
481
+ return { status: 'unavailable', reasonCode: 'task_definition_hash_mismatch', revision };
482
+ }
483
+ if (context.activationSnapshotHash !== activation.snapshotHash) {
484
+ return { status: 'unavailable', reasonCode: 'activation_snapshot_hash_mismatch', revision };
485
+ }
486
+ return { status: 'ready', revision, definition, context };
418
487
  }
419
488
  finally {
420
489
  database.close();
@@ -763,7 +832,9 @@ function buildCanonicalAction(input) {
763
832
  ? action : 'unknown';
764
833
  return {
765
834
  tool: toolDefinition.tool,
766
- projectedTool: context.identity.hostId === 'claude-code' ? `mcp__devflow__${toolDefinition.tool}` : toolDefinition.tool,
835
+ projectedTool: context.identity.hostId === 'claude-code'
836
+ ? projectClaudeToolName(toolDefinition.tool)
837
+ : toolDefinition.tool,
767
838
  input: input.input,
768
839
  status: required ? 'required' : 'recommended',
769
840
  required,