@specforge/cli 0.2.8 → 0.2.10
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/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +23 -23
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.types.d.ts +38 -0
- package/dist/cli/commands/status.types.d.ts.map +1 -1
- package/dist/cli/commands/status.types.js.map +1 -1
- package/dist/tools/index.js +3 -3
- package/dist/tools/index.js.map +1 -1
- package/node_modules/@specforge/report-types/package.json +1 -1
- package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.d.ts +52 -2
- package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.d.ts.map +1 -1
- package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.js +61 -1
- package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.js.map +1 -1
- package/node_modules/@specforge/spec-types/package.json +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EACL,aAAa,EAKd,MAAM,mBAAmB,CAAC;AAqD3B;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ExE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkB5D"}
|
|
@@ -11,29 +11,27 @@ function renderStatus(report, next, specificationId) {
|
|
|
11
11
|
printBlank();
|
|
12
12
|
console.log(colors.bold("Context"));
|
|
13
13
|
console.log(colors.muted("\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
14
|
-
console.log(`Project: ${report
|
|
15
|
-
const
|
|
14
|
+
console.log(`Project: ${report?.project?.name ?? colors.muted("(unknown)")}`);
|
|
15
|
+
const specs = report?.specifications ?? [];
|
|
16
|
+
const specEntry = specificationId ? specs.find((s) => s.id === specificationId) : specs[0];
|
|
16
17
|
if (specEntry) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
console.log(
|
|
19
|
+
`Spec: ${specEntry.title}${specEntry.status ? colors.muted(` (${specEntry.status})`) : ""}`
|
|
20
|
+
);
|
|
20
21
|
printBlank();
|
|
21
22
|
console.log(colors.bold("Progress"));
|
|
22
23
|
console.log(colors.muted("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
23
|
-
const pct = specEntry.
|
|
24
|
-
console.log(`
|
|
25
|
-
|
|
24
|
+
const pct = typeof specEntry.progress === "number" ? Math.round(specEntry.progress) : 0;
|
|
25
|
+
console.log(`Progress: ${pct}%`);
|
|
26
|
+
if (typeof specEntry.ticketsRemaining === "number") {
|
|
27
|
+
console.log(`Remaining: ${specEntry.ticketsRemaining} ticket${specEntry.ticketsRemaining === 1 ? "" : "s"}`);
|
|
28
|
+
}
|
|
29
|
+
if (specEntry.blockerCount && specEntry.blockerCount > 0) {
|
|
30
|
+
console.log(`Blockers: ${specEntry.blockerCount}`);
|
|
31
|
+
}
|
|
26
32
|
} else {
|
|
27
33
|
console.log(colors.muted("Spec: (none active \u2014 run `specforge switch <id>`)"));
|
|
28
34
|
}
|
|
29
|
-
if (report.recentActivity && report.recentActivity.length > 0) {
|
|
30
|
-
printBlank();
|
|
31
|
-
console.log(colors.bold("Recent activity"));
|
|
32
|
-
console.log(colors.muted("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
33
|
-
for (const a of report.recentActivity.slice(0, 3)) {
|
|
34
|
-
console.log(` ${a.action} \u2014 ${a.ticketTitle}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
35
|
if (next && next.items.length > 0) {
|
|
38
36
|
printBlank();
|
|
39
37
|
console.log(colors.bold("Next actionable"));
|
|
@@ -64,18 +62,20 @@ async function statusAction(options) {
|
|
|
64
62
|
);
|
|
65
63
|
}
|
|
66
64
|
const spinner = ora({ text: "Fetching status...", color: "cyan" }).start();
|
|
65
|
+
let report;
|
|
66
|
+
let next;
|
|
67
67
|
try {
|
|
68
68
|
const client = new ApiClient({
|
|
69
69
|
apiKey: config.apiKey,
|
|
70
70
|
apiUrl: config.apiUrl,
|
|
71
71
|
debug: config.debug
|
|
72
72
|
});
|
|
73
|
-
const
|
|
73
|
+
const response = await client.call("get_report", {
|
|
74
74
|
type: "implementation",
|
|
75
75
|
scope,
|
|
76
76
|
scopeId
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
report = response?.report;
|
|
79
79
|
if (config.specificationId) {
|
|
80
80
|
try {
|
|
81
81
|
next = await client.call("get_next_actionable_tickets", {
|
|
@@ -85,11 +85,6 @@ async function statusAction(options) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
spinner.stop();
|
|
88
|
-
if (options.json) {
|
|
89
|
-
console.log(JSON.stringify({ report, nextActionable: next ?? null }, null, 2));
|
|
90
|
-
} else {
|
|
91
|
-
renderStatus(report, next, config.specificationId);
|
|
92
|
-
}
|
|
93
88
|
} catch (error) {
|
|
94
89
|
spinner.fail("Failed to fetch status");
|
|
95
90
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
@@ -102,6 +97,11 @@ async function statusAction(options) {
|
|
|
102
97
|
}
|
|
103
98
|
throw new NetworkError(`Failed to fetch status: ${message}`);
|
|
104
99
|
}
|
|
100
|
+
if (options.json) {
|
|
101
|
+
console.log(JSON.stringify({ report: report ?? null, nextActionable: next ?? null }, null, 2));
|
|
102
|
+
} else {
|
|
103
|
+
renderStatus(report, next, config.specificationId);
|
|
104
|
+
}
|
|
105
105
|
}
|
|
106
106
|
function registerStatusCommand(program) {
|
|
107
107
|
program.command("status").description("Show active project/spec, implementation progress, and next actionable tickets").option("--json", "Output as JSON").addHelpText("after", `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/status.ts"],"sourcesContent":["/**\n * Status Command\n *\n * Shows what this terminal is pointed at (project / spec from\n * `.specforge/config.json`) plus a live implementation report for the active\n * spec and the next actionable tickets. Uses only canonical tools —\n * `get_report` (type='implementation') + `get_next_actionable_tickets`.\n */\n\nimport { Command } from 'commander';\nimport ora from 'ora';\nimport { resolveConfig } from '../config/index.js';\nimport { withErrorHandler, CliError, NetworkError } from '../middleware/error-handler.js';\nimport { printBlank } from '../ui/output.js';\nimport { colors } from '../ui/colors.js';\nimport { ApiClient } from '../../client/api-client.js';\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/status.ts"],"sourcesContent":["/**\n * Status Command\n *\n * Shows what this terminal is pointed at (project / spec from\n * `.specforge/config.json`) plus a live implementation report for the active\n * spec and the next actionable tickets. Uses only canonical tools —\n * `get_report` (type='implementation') + `get_next_actionable_tickets`.\n */\n\nimport { Command } from 'commander';\nimport ora from 'ora';\nimport { resolveConfig } from '../config/index.js';\nimport { withErrorHandler, CliError, NetworkError } from '../middleware/error-handler.js';\nimport { printBlank } from '../ui/output.js';\nimport { colors } from '../ui/colors.js';\nimport { ApiClient } from '../../client/api-client.js';\nimport {\n StatusOptions,\n NextActionableResponse,\n GetReportResponse,\n ImplementationReport,\n formatTicketNumber,\n} from './status.types.js';\n\n/**\n * Render the human-facing status view.\n */\nfunction renderStatus(\n report: ImplementationReport | undefined,\n next: NextActionableResponse | undefined,\n specificationId: string | null\n): void {\n printBlank();\n console.log(colors.bold('Context'));\n console.log(colors.muted('───────'));\n console.log(`Project: ${report?.project?.name ?? colors.muted('(unknown)')}`);\n\n const specs = report?.specifications ?? [];\n const specEntry = specificationId\n ? specs.find((s) => s.id === specificationId)\n : specs[0];\n\n if (specEntry) {\n console.log(\n `Spec: ${specEntry.title}${specEntry.status ? colors.muted(` (${specEntry.status})`) : ''}`\n );\n\n printBlank();\n console.log(colors.bold('Progress'));\n console.log(colors.muted('────────'));\n const pct = typeof specEntry.progress === 'number' ? Math.round(specEntry.progress) : 0;\n console.log(`Progress: ${pct}%`);\n if (typeof specEntry.ticketsRemaining === 'number') {\n console.log(`Remaining: ${specEntry.ticketsRemaining} ticket${specEntry.ticketsRemaining === 1 ? '' : 's'}`);\n }\n if (specEntry.blockerCount && specEntry.blockerCount > 0) {\n console.log(`Blockers: ${specEntry.blockerCount}`);\n }\n } else {\n console.log(colors.muted('Spec: (none active — run `specforge switch <id>`)'));\n }\n\n if (next && next.items.length > 0) {\n printBlank();\n console.log(colors.bold('Next actionable'));\n console.log(colors.muted('───────────────'));\n for (const t of next.items.slice(0, 5)) {\n const priority = t.priority ? colors.muted(` [${t.priority}]`) : '';\n console.log(` ${formatTicketNumber(t.ticketNumber)} ${t.title}${priority}`);\n }\n }\n\n printBlank();\n}\n\n/**\n * Status command action handler\n */\nexport async function statusAction(options: StatusOptions): Promise<void> {\n const config = resolveConfig();\n\n if (!config.apiKey) {\n throw new CliError(\n 'Not authenticated',\n 1,\n 'Run `specforge login` to authenticate first'\n );\n }\n\n const scope = config.specificationId ? 'specification' : 'project';\n const scopeId = config.specificationId ?? config.projectId;\n if (!scopeId) {\n throw new CliError(\n 'No active project or specification',\n 1,\n 'Run `specforge init` or `specforge switch <id>` first'\n );\n }\n\n const spinner = ora({ text: 'Fetching status...', color: 'cyan' }).start();\n\n let report: ImplementationReport | undefined;\n let next: NextActionableResponse | undefined;\n\n try {\n const client = new ApiClient({\n apiKey: config.apiKey,\n apiUrl: config.apiUrl,\n debug: config.debug,\n });\n\n // `get_report` returns a metadata wrapper — { type, scope, scopeId, format,\n // report } — with the implementation report nested under `report` (NOT the\n // top-level body). The `/local` transport has no `{ data }` envelope to\n // unwrap here, so we reach into `.report` ourselves.\n const response = await client.call<GetReportResponse>('get_report', {\n type: 'implementation',\n scope,\n scopeId,\n });\n report = response?.report;\n\n if (config.specificationId) {\n try {\n next = await client.call<NextActionableResponse>('get_next_actionable_tickets', {\n specificationId: config.specificationId,\n });\n } catch {\n // Next-actionable is a best-effort enrichment — ignore failures.\n }\n }\n\n spinner.stop();\n } catch (error) {\n spinner.fail('Failed to fetch status');\n\n const message = error instanceof Error ? error.message : 'Unknown error';\n if (message.includes('401') || message.includes('Unauthorized')) {\n throw new CliError(\n 'Authentication failed',\n 1,\n 'Your API key may be invalid. Run `specforge login` to re-authenticate'\n );\n }\n\n throw new NetworkError(`Failed to fetch status: ${message}`);\n }\n\n // Render OUTSIDE the try: a rendering bug must surface as itself, never as a\n // mislabelled \"Failed to fetch status\" network error (the fetch already\n // succeeded by this point).\n if (options.json) {\n console.log(JSON.stringify({ report: report ?? null, nextActionable: next ?? null }, null, 2));\n } else {\n renderStatus(report, next, config.specificationId);\n }\n}\n\n/**\n * Register status command with Commander\n */\nexport function registerStatusCommand(program: Command): void {\n program\n .command('status')\n .description('Show active project/spec, implementation progress, and next actionable tickets')\n .option('--json', 'Output as JSON')\n .addHelpText('after', `\nExamples:\n $ specforge status # Active project/spec + progress + next tickets\n $ specforge status --json # Machine-readable output\n\nShows:\n - Context: active project and specification (from .specforge/config.json)\n - Progress: epic/ticket completion for the active spec\n - Next actionable: ready-to-work tickets\n\nUse 'specforge switch <id>' to change the active project or specification.\n`)\n .action(withErrorHandler(statusAction));\n}\n"],"mappings":"AAUA,OAAO,SAAS;AAChB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB,UAAU,oBAAoB;AACzD,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B;AAAA,EAKE;AAAA,OACK;AAKP,SAAS,aACP,QACA,MACA,iBACM;AACN,aAAW;AACX,UAAQ,IAAI,OAAO,KAAK,SAAS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,EAC7D;AAKA,MAAI,QAAQ,MAAM;AAChB,YAAQ,IAAI,KAAK,UAAU,EAAE,QAAQ,UAAU,MAAM,gBAAgB,QAAQ,KAAK,GAAG,MAAM,CAAC,CAAC;AAAA,EAC/F,OAAO;AACL,iBAAa,QAAQ,MAAM,OAAO,eAAe;AAAA,EACnD;AACF;AAKO,SAAS,sBAAsB,SAAwB;AAC5D,UACG,QAAQ,QAAQ,EAChB,YAAY,gFAAgF,EAC5F,OAAO,UAAU,gBAAgB,EACjC,YAAY,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAWzB,EACI,OAAO,iBAAiB,YAAY,CAAC;AAC1C;","names":[]}
|
|
@@ -30,6 +30,44 @@ export interface NextActionableResponse {
|
|
|
30
30
|
items: NextActionableItem[];
|
|
31
31
|
total: number;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* One spec's progress row inside the implementation report. The live
|
|
35
|
+
* `get_report` (type='implementation') returns FLAT spec rows — id/title/status
|
|
36
|
+
* at the top of each entry, plus progress metrics — NOT a nested
|
|
37
|
+
* `{ specification, completedTickets, … }` object (the stale
|
|
38
|
+
* `@specforge/report-types` shape). This local type mirrors the real wire.
|
|
39
|
+
*/
|
|
40
|
+
export interface SpecProgressEntry {
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
status?: string;
|
|
44
|
+
/** Completion percentage, 0–100. */
|
|
45
|
+
progress?: number;
|
|
46
|
+
ticketsRemaining?: number;
|
|
47
|
+
estimatedCompletion?: string | null;
|
|
48
|
+
blockerCount?: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The `report` payload nested inside the get_report response wrapper.
|
|
52
|
+
*/
|
|
53
|
+
export interface ImplementationReport {
|
|
54
|
+
project?: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
specifications?: SpecProgressEntry[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The full get_report response — a metadata wrapper carrying the actual
|
|
62
|
+
* implementation report under `report`.
|
|
63
|
+
*/
|
|
64
|
+
export interface GetReportResponse {
|
|
65
|
+
type?: string;
|
|
66
|
+
scope?: string;
|
|
67
|
+
scopeId?: string;
|
|
68
|
+
format?: string;
|
|
69
|
+
report?: ImplementationReport;
|
|
70
|
+
}
|
|
33
71
|
/**
|
|
34
72
|
* Format a ticket number with padding (e.g. 7 → "TKT-007").
|
|
35
73
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.types.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qBAAqB;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,MAAM,SAAQ,EACd,OAAO,SAAI,GACV,MAAM,CAER"}
|
|
1
|
+
{"version":3,"file":"status.types.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qBAAqB;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,MAAM,SAAQ,EACd,OAAO,SAAI,GACV,MAAM,CAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/status.types.ts"],"sourcesContent":["/**\n * Status Command Types\n *\n * Post-M9: status shows the active project/spec (from config) plus a live\n * implementation report and the next actionable tickets. The pre-M9\n * working-context / session / dashboard / teams model was removed with its\n * backing ops (M9.4).\n */\n\n/**\n * Status command options from Commander\n */\nexport interface StatusOptions {\n /** Output as JSON */\n json?: boolean;\n}\n\n/**\n * A single next-actionable ticket (subset of get_next_actionable_tickets items).\n */\nexport interface NextActionableItem {\n id: string;\n ticketNumber: number;\n title: string;\n priority?: string;\n epicTitle?: string;\n}\n\n/**\n * Response shape of get_next_actionable_tickets.\n */\nexport interface NextActionableResponse {\n items: NextActionableItem[];\n total: number;\n}\n\n/**\n * Format a ticket number with padding (e.g. 7 → \"TKT-007\").\n */\nexport function formatTicketNumber(\n ticketNumber: number,\n prefix = 'TKT',\n padding = 3\n): string {\n return `${prefix}-${ticketNumber.toString().padStart(padding, '0')}`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/status.types.ts"],"sourcesContent":["/**\n * Status Command Types\n *\n * Post-M9: status shows the active project/spec (from config) plus a live\n * implementation report and the next actionable tickets. The pre-M9\n * working-context / session / dashboard / teams model was removed with its\n * backing ops (M9.4).\n */\n\n/**\n * Status command options from Commander\n */\nexport interface StatusOptions {\n /** Output as JSON */\n json?: boolean;\n}\n\n/**\n * A single next-actionable ticket (subset of get_next_actionable_tickets items).\n */\nexport interface NextActionableItem {\n id: string;\n ticketNumber: number;\n title: string;\n priority?: string;\n epicTitle?: string;\n}\n\n/**\n * Response shape of get_next_actionable_tickets.\n */\nexport interface NextActionableResponse {\n items: NextActionableItem[];\n total: number;\n}\n\n/**\n * One spec's progress row inside the implementation report. The live\n * `get_report` (type='implementation') returns FLAT spec rows — id/title/status\n * at the top of each entry, plus progress metrics — NOT a nested\n * `{ specification, completedTickets, … }` object (the stale\n * `@specforge/report-types` shape). This local type mirrors the real wire.\n */\nexport interface SpecProgressEntry {\n id: string;\n title: string;\n status?: string;\n /** Completion percentage, 0–100. */\n progress?: number;\n ticketsRemaining?: number;\n estimatedCompletion?: string | null;\n blockerCount?: number;\n}\n\n/**\n * The `report` payload nested inside the get_report response wrapper.\n */\nexport interface ImplementationReport {\n project?: { id: string; name: string };\n specifications?: SpecProgressEntry[];\n}\n\n/**\n * The full get_report response — a metadata wrapper carrying the actual\n * implementation report under `report`.\n */\nexport interface GetReportResponse {\n type?: string;\n scope?: string;\n scopeId?: string;\n format?: string;\n report?: ImplementationReport;\n}\n\n/**\n * Format a ticket number with padding (e.g. 7 → \"TKT-007\").\n */\nexport function formatTicketNumber(\n ticketNumber: number,\n prefix = 'TKT',\n padding = 3\n): string {\n return `${prefix}-${ticketNumber.toString().padStart(padding, '0')}`;\n}\n"],"mappings":"AA6EO,SAAS,mBACd,cACA,SAAS,OACT,UAAU,GACF;AACR,SAAO,GAAG,MAAM,IAAI,aAAa,SAAS,EAAE,SAAS,SAAS,GAAG,CAAC;AACpE;","names":[]}
|
package/dist/tools/index.js
CHANGED
|
@@ -409,12 +409,12 @@ Format options:
|
|
|
409
409
|
},
|
|
410
410
|
// ticket_step_actions — batch add/edit/remove/reorder of implementation steps.
|
|
411
411
|
{
|
|
412
|
-
description: "Batch-edit a ticket's implementation steps (add/edit/remove/reorder in one call). A step is a unit of FUNCTIONAL WORK \u2014 describe the functions/components/adjustments it makes AND what each does, never a bare filename. Declare the file(s) each step touches INLINE via `files: [{path, role}]`, role one of creates|modifies|deletes|imports|reads (imports couples to a build/run dependency; reads is a context-only glance). Fields that do not apply are declared with the `justify` op, never by writing empty values here.",
|
|
412
|
+
description: "Batch-edit a ticket's implementation steps (add/edit/remove/reorder in one call). A step is a unit of FUNCTIONAL WORK \u2014 describe the functions/components/adjustments it makes AND what each does, never a bare filename. Declare the file(s) each step touches INLINE via `files: [{path, role}]`, role one of creates|modifies|deletes|imports|reads (imports couples to a build/run dependency; reads is a context-only glance). Author code/type snippets INLINE via `codeSnippets`/`typeSnippets: [{content, language}]` \u2014 each becomes a ticket-level snippet row linked to this step (no separate snippet verb). NOTE: a call that declares snippets sets the ticket's COMPLETE snippet set, so re-declare all when editing. Fields that do not apply are declared with the `justify` op, never by writing empty values here.",
|
|
413
413
|
properties: {
|
|
414
414
|
type: { const: "ticket_step_actions" },
|
|
415
415
|
ticketId: { type: "string", description: "Ticket id (use list_tickets / lookup_ticket to find)." },
|
|
416
|
-
add: { type: "array", description: "New steps to append.", items: { type: "object", properties: { text: { type: "string" }, files: { type: "array", description: "Files this step touches, by role \u2014 derives the step\u2194file link + the TicketFileChange row.", items: { type: "object", properties: { path: { type: "string" }, role: { type: "string", enum: ["creates", "modifies", "deletes", "imports", "reads"] }, symbol: { type: "string" }, why: { type: "string" } }, required: ["path", "role"] } } }, required: ["text"] } },
|
|
417
|
-
edit: { type: "array", description: "Existing steps to edit (by stepId).", items: { type: "object", properties: { stepId: { type: "string" }, text: { type: "string" }, files: { type: "array", items: { type: "object", properties: { path: { type: "string" }, role: { type: "string", enum: ["creates", "modifies", "deletes", "imports", "reads"] }, symbol: { type: "string" }, why: { type: "string" } }, required: ["path", "role"] } } }, required: ["stepId"] } },
|
|
416
|
+
add: { type: "array", description: "New steps to append.", items: { type: "object", properties: { text: { type: "string" }, files: { type: "array", description: "Files this step touches, by role \u2014 derives the step\u2194file link + the TicketFileChange row.", items: { type: "object", properties: { path: { type: "string" }, role: { type: "string", enum: ["creates", "modifies", "deletes", "imports", "reads"] }, symbol: { type: "string" }, why: { type: "string" } }, required: ["path", "role"] } }, codeSnippets: { type: "array", description: "Code snippets authored on this step \u2192 TicketCodeSnippet rows + step\u2194snippet links.", items: { type: "object", properties: { content: { type: "string" }, language: { type: "string" }, description: { type: "string" } }, required: ["content"] } }, typeSnippets: { type: "array", description: "Type snippets authored on this step \u2192 TicketTypeSnippet rows + step\u2194snippet links.", items: { type: "object", properties: { content: { type: "string" }, language: { type: "string" }, description: { type: "string" } }, required: ["content"] } } }, required: ["text"] } },
|
|
417
|
+
edit: { type: "array", description: "Existing steps to edit (by stepId).", items: { type: "object", properties: { stepId: { type: "string" }, text: { type: "string" }, files: { type: "array", items: { type: "object", properties: { path: { type: "string" }, role: { type: "string", enum: ["creates", "modifies", "deletes", "imports", "reads"] }, symbol: { type: "string" }, why: { type: "string" } }, required: ["path", "role"] } }, codeSnippets: { type: "array", description: "Code snippets authored on this step \u2192 TicketCodeSnippet rows + step\u2194snippet links.", items: { type: "object", properties: { content: { type: "string" }, language: { type: "string" }, description: { type: "string" } }, required: ["content"] } }, typeSnippets: { type: "array", description: "Type snippets authored on this step \u2192 TicketTypeSnippet rows + step\u2194snippet links.", items: { type: "object", properties: { content: { type: "string" }, language: { type: "string" }, description: { type: "string" } }, required: ["content"] } } }, required: ["stepId"] } },
|
|
418
418
|
remove: { type: "array", items: { type: "string" }, description: "Step ids to remove." },
|
|
419
419
|
reorder: { type: "array", items: { type: "string" }, description: "Step ids in the desired order." }
|
|
420
420
|
},
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/tools/index.ts"],"sourcesContent":["import { appendFileSync } from 'node:fs';\n/**\n * MCP Tools Registry\n *\n * This module defines and exports all available MCP tools.\n * 22 tools organized into: Queries, Lifecycle, Mutation, Utilities, Orchestration.\n */\n\nimport { ApiClient } from '../client/api-client.js';\nimport {\n ValidationError,\n ApiError,\n validateToolArgs,\n formatMCPError,\n transformError,\n MCPErrorResponse,\n} from '../validation/index.js';\nimport { injectContext, injectContextRequired } from './core/context-helper.js';\nimport { probeExistingFiles } from './core/file-existence-injection.js';\nimport { readWorktreeGitEvidence, readHeadCommitSha } from './core/git-injection.js';\nimport { tryLoadProjectConfig, saveProjectConfig } from '../cli/config/index.js';\nimport {\n appendPlanningSessionRegistry,\n markPlanningSessionRegistryCompleted,\n} from '../cli/config/planning-sessions-registry.js';\n\n/**\n * Tool definition matching MCP protocol schema\n */\nexport interface Tool {\n name: string;\n description: string;\n inputSchema: {\n type: 'object';\n properties: Record<string, unknown>;\n required?: string[];\n };\n}\n\n/**\n * Get list of all available tools\n *\n * @returns Array of tool definitions (22 tools)\n */\nexport function getTools(): Tool[] {\n const tools: Tool[] = [\n // ========================================================================\n // Queries (6)\n // ========================================================================\n {\n name: 'get',\n description: 'Get a single entity by type and ID.',\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['project', 'specification', 'epic', 'ticket', 'blueprint'],\n description: 'Entity type to retrieve',\n },\n id: {\n type: 'string',\n description: 'Entity ID',\n },\n },\n required: ['type', 'id'],\n },\n },\n {\n name: 'list',\n description: 'List entities by type.',\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['projects', 'specifications', 'epics', 'tickets', 'blueprints'],\n description: 'Entity type to list',\n },\n projectId: {\n type: 'string',\n description: 'Filter by project (for specifications)',\n },\n specificationId: {\n type: 'string',\n description: 'Filter by specification (for epics, tickets)',\n },\n epicId: {\n type: 'string',\n description: 'Filter by epic (for tickets)',\n },\n },\n required: ['type'],\n },\n },\n {\n name: 'search',\n description: `Unified ticket search with multiple filter options.\n\nCombines:\n- Full-text search (query)\n- File matching (files) - replaces find_tickets_by_file\n- Tag filtering (tags) - replaces find_tickets_by_tag\n- Related tickets (relatedTo) - replaces find_related_tickets\n- Status, complexity, priority filters\n\nAt least one of: query, files, tags, or relatedTo is required.\nAt least one scope filter (projectId, specificationId, or epicId) is required.`,\n inputSchema: {\n type: 'object',\n properties: {\n query: {\n type: 'string',\n description: 'Full-text search query',\n },\n files: {\n type: 'array',\n items: { type: 'string' },\n description: 'Glob patterns to match ticket files (e.g., \"**/channel/*.ts\")',\n },\n tags: {\n type: 'array',\n items: { type: 'string' },\n description: 'Tags to filter by',\n },\n matchAllTags: {\n type: 'boolean',\n description: 'If true, match all tags (AND). If false, match any (OR). Default: false',\n },\n relatedTo: {\n type: 'string',\n description: 'Find tickets related to this ticket ID (by tags, files, tech stack)',\n },\n status: {\n type: 'array',\n items: {\n type: 'string',\n enum: ['pending', 'ready', 'active', 'done', 'blocked'],\n },\n description: 'Filter by status',\n },\n complexity: {\n type: 'array',\n items: {\n type: 'string',\n enum: ['small', 'medium', 'large', 'xlarge'],\n },\n description: 'Filter by complexity',\n },\n projectId: {\n type: 'string',\n description: 'Limit search to project',\n },\n specificationId: {\n type: 'string',\n description: 'Limit search to specification',\n },\n epicId: {\n type: 'string',\n description: 'Limit search to epic',\n },\n limit: {\n type: 'number',\n description: 'Maximum results (default: 20, max: 100)',\n },\n offset: {\n type: 'number',\n description: 'Pagination offset (default: 0)',\n },\n fields: {\n type: 'array',\n items: {\n type: 'string',\n enum: [\n 'id',\n 'epicId',\n 'ticketNumber',\n 'title',\n 'description',\n 'status',\n 'priority',\n 'complexity',\n 'estimatedHours',\n 'actualHours',\n 'acceptanceCriteria',\n 'implementation',\n 'technicalDetails',\n 'notes',\n 'tags',\n 'progress',\n 'testsPassed',\n 'order',\n 'startedAt',\n 'completedAt',\n 'createdAt',\n 'updatedAt',\n ],\n },\n description:\n 'Select specific fields to return. Returns all fields if not specified. id is always included.',\n },\n },\n },\n },\n {\n name: 'get_next_actionable_tickets',\n description: 'Get tickets with status \"ready\" (all dependencies satisfied). Use start_work_session() to begin work on these tickets.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification (optional if projectId provided)',\n },\n projectId: {\n type: 'string',\n description: 'The ID of the project to get actionable tickets across all specifications',\n },\n limit: {\n type: 'number',\n description: 'Maximum number of tickets to return (default: 5)',\n },\n },\n },\n },\n {\n name: 'get_blocked_tickets',\n description: 'Get tickets with status \"pending\", each with the `blockedBy` list of unsatisfied dependency tickets computed from the dependency tree.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification',\n },\n },\n required: ['specificationId'],\n },\n },\n {\n name: 'get_report',\n description: `Generate unified reports for implementation, time tracking, blockers, work summary, or active sessions.\n\nReport types:\n- 'implementation': Progress, velocity, completions (replaces get_implementation_summary)\n- 'time': Estimated vs actual hours (replaces get_time_report)\n- 'blockers': Blocked tickets with reasons (replaces get_blockers_report)\n- 'work': Completed work summary from WorkSession records (replaces get_work_summary)\n- 'sessions': Live planning/work/review sessions for a project (requires scope='project')\n\nFormat options:\n- 'json': Full structured data (default)\n- 'summary': Condensed text summary`,\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['implementation', 'time', 'blockers', 'work', 'sessions'],\n description: 'Type of report to generate',\n },\n scope: {\n type: 'string',\n enum: ['project', 'specification', 'epic'],\n description: \"Scope of the report. 'sessions' requires scope='project'.\",\n },\n scopeId: {\n type: 'string',\n description: 'ID of the scoped entity (projectId, specificationId, or epicId)',\n },\n startDate: {\n type: 'string',\n description: 'Start date for work report (ISO 8601)',\n },\n endDate: {\n type: 'string',\n description: 'End date for work report (ISO 8601)',\n },\n format: {\n type: 'string',\n enum: ['json', 'summary'],\n description: \"Response format: 'json' (default) or 'summary'.\",\n },\n },\n required: ['type', 'scope', 'scopeId'],\n },\n },\n\n // ========================================================================\n // Lifecycle (10)\n // ========================================================================\n {\n name: 'start_planning_session',\n description: 'Start or resume a guided planning session for a specification. Project-scoped lock: only one active planning session per project. Calling with the same spec resumes the existing session (idempotent). Calling with a different spec while one is active returns a rejection with the active session details. Planning is independent of implementation and review — they can run concurrently.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The specification to plan. Optional — defaults to the active spec in the local config (.specforge/config.json), so you normally omit it.',\n },\n projectId: {\n type: 'string',\n description: 'The owning project. Optional — defaults to the active project in the local config (.specforge/config.json); injected automatically, so you normally omit it.',\n },\n },\n // Nothing is required: specificationId/projectId fall back to local config, and\n // the returned sessionId is persisted + injected into subsequent calls.\n required: [],\n },\n },\n {\n name: 'action_planning_session',\n description: \"Execute a planning action within an active session. Wraps the planning write operations (create/update/delete for epics, tickets and blueprints; plus the dependency, blueprint-link, step-link, justify and creator-election operations) and the read operation get_planning_status. The operation.type IS the backend PlanningOperationName; the remaining fields are the operation payload. To read a single ticket, use the `get` tool (type:'ticket').\",\n inputSchema: {\n type: 'object',\n properties: {\n operation: {\n type: 'object',\n description: 'The operation to perform. Must include a \"type\" field. Per-op required fields are declared in `oneOf` below — agents should consult their own tool schema parser for the exact shape per type. Do NOT pass sessionId/projectId/specificationId: the active planning session is injected from local config.',\n properties: {\n type: {\n type: 'string',\n enum: [\n 'update_spec',\n 'create_epic',\n 'update_epic',\n 'delete_epic',\n 'create_ticket',\n 'ticket_general_actions',\n 'ticket_step_actions',\n 'ticket_criteria_actions',\n 'ticket_test_actions',\n 'delete_ticket',\n 'create_blueprint',\n 'update_blueprint',\n 'delete_blueprint',\n 'link_blueprint_to_tickets',\n 'unlink_blueprint_to_tickets',\n 'link_step_file',\n 'unlink_step_file',\n 'link_step_snippet',\n 'unlink_step_snippet',\n 'create_dependencies',\n 'delete_dependencies',\n 'apply_creator_election',\n 'justify',\n 'unjustify',\n 'get_planning_status',\n ],\n description: 'The planning operation to perform (lifecycle vocabulary). The type IS the backend PlanningOperationName; remaining fields are the operation payload.',\n },\n },\n required: ['type'],\n oneOf: [\n {\n properties: {\n type: { const: 'update_spec' },\n fields: { type: 'object', description: 'Partial spec update — only the keys you send are changed (e.g. background, goals, nonGoals, constraints, successCriteria). Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.' },\n },\n required: ['type', 'fields'],\n },\n // create_epic — SHELL only (epic_decomposition). Body fields are authored\n // by update_epic in epic_expansion; only title/description/objective are\n // persisted on create, so only those are advertised.\n {\n properties: {\n type: { const: 'create_epic' },\n title: { type: 'string', minLength: 1, description: 'Epic title (non-empty)' },\n description: { type: 'string', description: 'What this epic delivers' },\n objective: { type: 'string', description: 'Goal achieved for the user' },\n },\n required: ['type', 'title'],\n },\n {\n properties: {\n type: { const: 'update_epic' },\n id: { type: 'string', description: 'Epic id (use list_epics / lookup_epic to find).' },\n fields: {\n type: 'object',\n description: 'Partial epic update — only the keys you send are changed. Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.',\n properties: {\n title: { type: 'string' },\n description: { type: 'string' },\n objective: { type: 'string', description: 'Goal achieved for the user.' },\n architecture: { type: 'string', description: 'Structural approach specific to this epic.' },\n scope: { type: 'object', description: 'Epic scope.', properties: { inScope: { type: 'array', items: { type: 'string' } }, outOfScope: { type: 'array', items: { type: 'string' } }, assumptions: { type: 'array', items: { type: 'string' } }, externalDependencies: { type: 'array', items: { type: 'string' } } } },\n goals: { type: 'array', description: 'Epic goals as objects (Epic.goals is a json object[], not string[]).', items: { type: 'object', properties: { title: { type: 'string' }, description: { type: 'string' }, type: { type: 'string', enum: ['business', 'technical', 'user', 'operational'] }, successCriteria: { type: 'array', items: { type: 'string' } } }, required: ['title', 'description'] } },\n acceptanceCriteria: { type: 'array', description: 'BDD criteria objects (Epic.acceptanceCriteria is a json object[], not string[]).', items: { type: 'object', properties: { given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['given', 'when', 'then'] } },\n validationCommands: { type: 'array', items: { type: 'string' }, description: 'Commands that verify this epic end-to-end.' },\n apiContracts: { type: 'array', description: 'API contracts this epic exposes.', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, type: { type: 'string' }, description: { type: 'string' } } } },\n sharedPatterns: { type: 'array', description: 'Reusable patterns the epic\\'s tickets should follow.', items: { type: 'object' } },\n fileStructures: { type: 'array', description: 'Concrete files this epic creates/modifies.', items: { type: 'object', properties: { id: { type: 'string' }, scope: { type: 'string' }, description: { type: 'string' }, content: { type: 'string' } } } },\n requirementsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec requirement ids this epic covers.' },\n nfrsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec NFR ids this epic covers.' },\n goalsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec goal ids this epic advances.' },\n },\n },\n },\n required: ['type', 'id', 'fields'],\n },\n // create_ticket — SHELL (ticket_decomposition): epicId/title/description\n // + ticketType (the impl/verification decision, set HERE). The remaining body\n // fields are authored by the ticket node verbs in ticket_expansion;\n // dependencies via create_dependencies in cross_validation.\n {\n properties: {\n type: { const: 'create_ticket' },\n epicId: { type: 'string', description: 'Parent epic id' },\n title: { type: 'string', minLength: 1, description: 'Ticket title (non-empty)' },\n description: { type: 'string' },\n ticketType: { type: 'string', enum: ['implementation', 'verification'], description: 'Ticket type — set here (decomposition); defaults to implementation. Editing it later via ticket_general_actions rolls the session back to ticket_decomposition.' },\n },\n required: ['type', 'epicId', 'title'],\n },\n // ME.19.1 (D8/D20) — the four ticket NODE VERBS replace the retired free-form\n // `update_ticket`. Each targets ONE scope with a TYPED payload (no `fields`\n // bag); complexity/planningType/ticketType are enums, so an out-of-enum value\n // is denied at the schema gate before persistence. `status` is NOT settable\n // (system/event-driven). Blueprint links are NOT settable here — use\n // link_blueprint_to_tickets.\n // ticket_general_actions — shell/general fields (partial edit).\n {\n description: 'Edit a ticket\\'s shell/general fields. Only the keys you send are changed. Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.',\n properties: {\n type: { const: 'ticket_general_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n title: { type: 'string', description: 'Concise imperative title.' },\n description: { type: 'string', description: 'What this ticket delivers and why.' },\n complexity: { type: 'string', enum: ['small', 'medium', 'large', 'xlarge'] },\n planningType: { type: 'string', enum: ['planning', 'on_flight'], description: 'Changing this rolls the session back to ticket_decomposition to re-score.' },\n ticketType: { type: 'string', enum: ['implementation', 'verification'], description: 'Changing this rolls the session back to ticket_decomposition to re-score.' },\n epicId: { type: 'string', description: 'Re-parent the ticket to another epic.' },\n order: { type: 'integer', description: 'Rank hint within the epic.' },\n guardrails: { type: 'array', items: { type: 'string' }, description: 'Per-ticket guardrail ids or descriptions.' },\n estimatedMinutes: { type: 'integer', minimum: 0 },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_step_actions — batch add/edit/remove/reorder of implementation steps.\n {\n description: 'Batch-edit a ticket\\'s implementation steps (add/edit/remove/reorder in one call). A step is a unit of FUNCTIONAL WORK — describe the functions/components/adjustments it makes AND what each does, never a bare filename. Declare the file(s) each step touches INLINE via `files: [{path, role}]`, role one of creates|modifies|deletes|imports|reads (imports couples to a build/run dependency; reads is a context-only glance). Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_step_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n add: { type: 'array', description: 'New steps to append.', items: { type: 'object', properties: { text: { type: 'string' }, files: { type: 'array', description: 'Files this step touches, by role — derives the step↔file link + the TicketFileChange row.', items: { type: 'object', properties: { path: { type: 'string' }, role: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'] }, symbol: { type: 'string' }, why: { type: 'string' } }, required: ['path', 'role'] } } }, required: ['text'] } },\n edit: { type: 'array', description: 'Existing steps to edit (by stepId).', items: { type: 'object', properties: { stepId: { type: 'string' }, text: { type: 'string' }, files: { type: 'array', items: { type: 'object', properties: { path: { type: 'string' }, role: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'] }, symbol: { type: 'string' }, why: { type: 'string' } }, required: ['path', 'role'] } } }, required: ['stepId'] } },\n remove: { type: 'array', items: { type: 'string' }, description: 'Step ids to remove.' },\n reorder: { type: 'array', items: { type: 'string' }, description: 'Step ids in the desired order.' },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_criteria_actions — batch add/edit/remove/reorder of acceptance criteria.\n {\n description: 'Batch-edit a ticket\\'s acceptance criteria (given/when/then; add/edit/remove/reorder in one call). Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_criteria_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n add: { type: 'array', description: 'New acceptance criteria to append.', items: { type: 'object', properties: { given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['given', 'when', 'then'] } },\n edit: { type: 'array', description: 'Existing criteria to edit (by criterionId).', items: { type: 'object', properties: { criterionId: { type: 'string' }, given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['criterionId'] } },\n remove: { type: 'array', items: { type: 'string' }, description: 'Criterion ids to remove.' },\n reorder: { type: 'array', items: { type: 'string' }, description: 'Criterion ids in the desired order.' },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_test_actions — author the existing single-object testSpecification.\n {\n description: 'Author a ticket\\'s testSpecification (testTypes, qualityGates, testCommands, coverageTarget). Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_test_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n testSpecification: { type: 'object', properties: { testTypes: { type: 'array', items: { type: 'string', enum: ['unit', 'integration', 'e2e', 'typecheck', 'lint', 'build', 'contract', 'structural', 'layout', 'a11y', 'performance'] } }, qualityGates: { type: 'array', items: { type: 'string' } }, testCommands: { type: 'array', items: { type: 'string' } }, coverageTarget: { type: 'integer', minimum: 0, maximum: 100 } } },\n },\n required: ['type', 'ticketId', 'testSpecification'],\n },\n {\n properties: {\n type: { const: 'delete_epic' },\n id: { type: 'string', description: 'Epic id; cascades to all tickets in the epic.' },\n cascadeRemoveDependencies: { type: 'boolean', description: 'Confirm removing dependency edges pointing at this epic\\'s tickets from outside the epic. Required (true) when such referrers exist, else the delete is denied.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'delete_ticket' },\n id: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n cascadeRemoveDependencies: { type: 'boolean', description: 'Confirm removing dependency edges from other tickets that point at this ticket. Required (true) when such referrers exist, else the delete is denied.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'create_dependencies' },\n dependencies: {\n type: 'array',\n minItems: 1,\n maxItems: 5000,\n description: 'Up to 5000 dependency pairs, each a \"requires\" edge (fromTicketId depends on toTicketId). The batch is validated atomically: a cycle or an all-duplicate batch is rejected with guidance; already-existing edges are skipped.',\n items: {\n type: 'object',\n properties: {\n fromTicketId: { type: 'string', description: 'The dependent ticket (this one depends on the other).' },\n toTicketId: { type: 'string', description: 'The blocker ticket it depends on.' },\n },\n required: ['fromTicketId', 'toTicketId'],\n },\n },\n },\n required: ['type', 'dependencies'],\n },\n {\n properties: {\n type: { const: 'delete_dependencies' },\n dependencyIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'TicketDependency ids to remove (use lookup/list to find).' },\n },\n required: ['type', 'dependencyIds'],\n },\n // apply_creator_election (MB.16.1) — the atomic creator-election batch: file\n // moves + producing steps + ordering deps in ONE cross-phase op. Only the\n // status:'clean' partition is applied; conflicts are excluded + surfaced to\n // get_ticket. `dependencies` may be empty (single-toucher flips).\n {\n properties: {\n type: { const: 'apply_creator_election' },\n elections: {\n type: 'array',\n minItems: 1,\n maxItems: 5000,\n description: 'The per-file creator elections. Each moves an orphan shared file to filesToBeCreated on its elected creator ticket + declares the producing step so the moved file is not a new orphan.',\n items: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'The orphan shared file path to resolve.' },\n kind: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'], description: 'The step-file role the elected ticket takes for this path (normally creates).' },\n creatorTicketId: { type: 'string', description: 'The elected creator ticket (topologically-earliest toucher).' },\n producingStep: {\n type: 'object',\n description: 'The step that produces the moved file: pass an existing step id to link it, OR text to create-and-link a new step.',\n properties: {\n text: { type: 'string', description: 'Text of a NEW producing step to create + link.' },\n stepId: { type: 'string', description: 'Id of an EXISTING step to link to the moved file.' },\n },\n },\n },\n required: ['path', 'kind', 'creatorTicketId', 'producingStep'],\n },\n },\n dependencies: {\n type: 'array',\n maxItems: 5000,\n description: 'The ordering deps (each a \"requires\" edge). May be empty. Only the CLEAN partition\\'s deps are persisted (recomputed + cycle-checked server-side).',\n items: {\n type: 'object',\n properties: {\n fromTicketId: { type: 'string', description: 'The dependent ticket (a non-elected toucher).' },\n toTicketId: { type: 'string', description: 'The elected creator it depends on.' },\n },\n required: ['fromTicketId', 'toTicketId'],\n },\n },\n },\n required: ['type', 'elections', 'dependencies'],\n },\n {\n properties: {\n type: { const: 'create_blueprint' },\n title: { type: 'string', minLength: 1, description: 'Blueprint title (non-empty)' },\n content: { type: 'string', description: 'Body — diagram source or markdown, persisted as-is on create.' },\n format: { type: 'string', enum: ['markdown', 'mermaid', 'ascii', 'mixed', 'html', 'svg', 'image'], description: 'Defaults to \"mermaid\"' },\n category: { type: 'string', enum: ['flowchart', 'architecture', 'state', 'sequence', 'erd', 'mockup', 'adr', 'component', 'deployment', 'api', 'algorithm', 'protocol', 'glossary', 'design_system'], description: 'Blueprint category (SpecificationBlueprint.category model enum).' },\n description: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n required: ['type', 'title', 'category'],\n },\n {\n properties: {\n type: { const: 'update_blueprint' },\n id: { type: 'string', description: 'Blueprint id.' },\n fields: {\n type: 'object',\n description: 'Partial blueprint update — only the keys you send are changed.',\n properties: {\n title: { type: 'string' },\n content: { type: 'string' },\n category: { type: 'string' },\n description: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n },\n },\n required: ['type', 'id', 'fields'],\n },\n {\n properties: {\n type: { const: 'delete_blueprint' },\n id: { type: 'string', description: 'Blueprint id.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'link_blueprint_to_tickets' },\n blueprintId: { type: 'string', description: 'Blueprint to link.' },\n ticketIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'Tickets to link the blueprint to.' },\n },\n required: ['type', 'blueprintId', 'ticketIds'],\n },\n {\n properties: {\n type: { const: 'unlink_blueprint_to_tickets' },\n blueprintId: { type: 'string', description: 'Blueprint to unlink.' },\n ticketIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'Tickets to unlink the blueprint from.' },\n },\n required: ['type', 'blueprintId', 'ticketIds'],\n },\n // MB.14.1 — step↔artifact link verbs (create/delete a join row keyed on\n // stepId + fileChangeId/snippetId). Get the ids from the ticket read-shape.\n {\n properties: {\n type: { const: 'link_step_file' },\n stepId: { type: 'string', description: 'Implementation step id (the functional unit of work).' },\n fileChangeId: { type: 'string', description: 'Declared file-change id the step produces (from the ticket read-shape).' },\n },\n required: ['type', 'stepId', 'fileChangeId'],\n },\n {\n properties: {\n type: { const: 'unlink_step_file' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n fileChangeId: { type: 'string', description: 'Declared file-change id to unlink from the step.' },\n },\n required: ['type', 'stepId', 'fileChangeId'],\n },\n {\n properties: {\n type: { const: 'link_step_snippet' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n snippetType: { type: 'string', enum: ['code', 'type'], description: \"'code' → TicketCodeSnippet, 'type' → TicketTypeSnippet.\" },\n snippetId: { type: 'string', description: 'Code/type snippet id the step follows (recommended, not required per step — but a snippet linking NO step is dangling and blocks the ticket; link or drop it).' },\n },\n required: ['type', 'stepId', 'snippetType', 'snippetId'],\n },\n {\n properties: {\n type: { const: 'unlink_step_snippet' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n snippetType: { type: 'string', enum: ['code', 'type'], description: 'Which snippet table to unlink from.' },\n snippetId: { type: 'string', description: 'Code/type snippet id to unlink from the step.' },\n },\n required: ['type', 'stepId', 'snippetType', 'snippetId'],\n },\n // justify — declare a field N/A (the paired declare op; unjustify removes it).\n // Structural-neutral: it writes only the fieldDeclarations[scope] declaration,\n // so it is native in EVERY planning phase and never rolls back. `scope` is the\n // canonical field name the checks read (e.g. dependencies, codeReferences,\n // apiContracts) — NOT a `fieldDeclarations`-shaped payload on update_*.\n {\n properties: {\n type: { const: 'justify' },\n scope: { type: 'string', description: \"Canonical field name to mark not-applicable (e.g. 'dependencies', 'codeReferences', 'apiContracts').\" },\n entityId: { type: 'string', description: 'The spec/epic/ticket id the field belongs to (resolved server-side; ids are unique across the spec).' },\n reason: { type: 'string', description: 'Why the field does not apply (must be at least 20 characters).' },\n },\n required: ['type', 'scope', 'entityId', 'reason'],\n },\n // unjustify — remove a previously declared N/A (clears fieldDeclarations[scope]).\n // A no-op if the scope was never justified. No reason (a delete is unconditional).\n {\n properties: {\n type: { const: 'unjustify' },\n scope: { type: 'string', description: 'Canonical field name whose not-applicable declaration to remove.' },\n entityId: { type: 'string', description: 'The spec/epic/ticket id the field belongs to.' },\n },\n required: ['type', 'scope', 'entityId'],\n },\n {\n // Read-only poll/resume. To read a single ticket, use the `get` tool (type:'ticket').\n properties: {\n type: { const: 'get_planning_status' },\n },\n required: ['type'],\n },\n ],\n },\n },\n required: ['operation'],\n },\n },\n {\n name: 'complete_planning_session',\n description: \"Complete the planning session and submit the spec for final review. Spec must be in 'planning' status. Runs the planning gate (consistency checks + readinessThreshold from project/spec settings). Transitions the spec directly to 'ready' on pass. Takes no arguments — the active planning session is injected from local config.\",\n inputSchema: {\n type: 'object',\n // No inputs: the active planning session (sessionId) is injected from\n // local config (.specforge/config.json). Do NOT pass sessionId/projectId/specificationId.\n properties: {},\n required: [],\n },\n },\n {\n name: 'start_work_session',\n description: \"Start working on a ticket. Returns full ticket details (description, implementation steps, AC, technicalDetails, codeReferences, typeReferences, tags, notes, complexity, priority) alongside checklistState and workSessionId. No need to call the `get` tool (type:'ticket') separately. Returns error with statusReason if ticket is pending.\",\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket to start',\n },\n },\n required: ['ticketId'],\n },\n },\n {\n name: 'action_work_session',\n description: `Update checklist state during an active WorkSession. Combines step completion, AC validation, test result reporting, file tracking, reference review confirmation, and discovery reporting into a single atomic operation. All state changes are recorded on the WorkSession and its related validation/completion records.\n\nUse this instead of reopening the planning session for checklist changes. Provides:\n- Step completion (individual or bulk via WorkSessionImplStepCompletion)\n- Acceptance criteria validation (individual or bulk via WorkSessionAcceptanceCheck)\n- Test result reporting (merged by test type via WorkSessionTestResult)\n- File tracking (created, modified, deleted on WorkSession)\n- Discovery reporting (create discoveries for blockers, bugs, tech debt)\n- Blocker management (set block reason; requires existing discovery)\n- Reference review tracking (codeSnippetsReviewed, typeReferencesReviewed)\n- Auto-calculated progress percentage\n- Completion readiness hints\n\nIMPORTANT: All acceptance criteria must be validated and all implementation steps must be completed via this tool before calling complete_work_session. The completion gate enforces this.\n\nIf the ticket has codeReferences or typeReferences, set codeSnippetsReviewed/typeReferencesReviewed to true after reviewing them — completion readiness will block until these are confirmed.\n\nSet getTicket: true to fetch full ticket details in the response — useful for re-reading ticket context mid-implementation. Can be the sole operation or combined with other actions.`,\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket being worked on (must be in active status)',\n },\n action: {\n type: 'object',\n description:\n 'The assay action to record — the AWS action vocabulary. `action` (the discriminator) is one of: mark_implementation_step_completion, mark_acceptance_check, record_test_result, add_skip_justification, amend_skip_justification, add_failure_justification, amend_failure_justification, record_file_change, add_file_change_justification, amend_file_change_justification, create_discovery (with `blocking`), update_discovery, set_discovery_resolved. Include `workSessionId` and the per-action fields. Forwarded verbatim as the lifecycle inner payload.',\n properties: {\n action: {\n type: 'string',\n enum: [\n 'mark_implementation_step_completion',\n 'mark_acceptance_check',\n 'record_test_result',\n 'add_skip_justification',\n 'amend_skip_justification',\n 'add_failure_justification',\n 'amend_failure_justification',\n 'record_file_change',\n 'add_file_change_justification',\n 'amend_file_change_justification',\n 'create_discovery',\n 'update_discovery',\n 'set_discovery_resolved',\n ],\n description: 'The AWS action discriminator.',\n },\n workSessionId: { type: 'string', description: 'The active WorkSession id (from start_work_session).' },\n },\n required: ['action'],\n },\n notes: {\n type: 'string',\n description: 'Additional notes to append to the ticket',\n },\n filesCreated: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files created during this session. Accumulated incrementally.',\n },\n filesModified: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files modified during this session. Accumulated incrementally.',\n },\n filesDeleted: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files deleted during this session. Accumulated incrementally.',\n },\n discovery: {\n type: 'object',\n description: 'Create a discovery (observation about the implementation). Use this to report blockers, bugs, tech debt, scope changes, etc.',\n properties: {\n description: { type: 'string', description: 'Description of the discovery' },\n type: { type: 'string', description: 'Discovery type: bug, tech_debt, blocker, clarification, scope_change, dependency, risk, ticket, epic' },\n severity: { type: 'string', description: 'Severity: blocker, critical, major, minor' },\n suggestedTitle: { type: 'string', description: 'Suggested title for the new ticket/epic' },\n suggestedPriority: { type: 'string', description: 'Suggested priority: high, medium, low' },\n relatedFiles: { type: 'array', items: { type: 'string' }, description: 'Related file paths' },\n notes: { type: 'string', description: 'Additional notes' },\n },\n required: ['description'],\n },\n blockReason: {\n type: 'string',\n description: 'Set a blocker on this ticket. Requires an existing discovery (create via discovery parameter first).',\n },\n getTicket: {\n type: 'boolean',\n description: 'Fetch full ticket details. Can be the sole operation or combined with other actions.',\n },\n includeFullContext: {\n type: 'boolean',\n description: 'Include full implementation context in response',\n },\n codeSnippetsReviewed: {\n type: 'boolean',\n description: 'Confirm that code snippets (codeReferences) on the ticket have been reviewed. Required before completion when the ticket has non-empty codeReferences.',\n },\n typeReferencesReviewed: {\n type: 'boolean',\n description: 'Confirm that type references (typeReferences) on the ticket have been reviewed. Required before completion when the ticket has non-empty typeReferences.',\n },\n },\n required: ['ticketId'],\n },\n },\n {\n name: 'complete_work_session',\n description:\n 'Mark a ticket as complete and finalize the active WorkSession. Transitions active -> done. Session data (files, test results, time) is stored on the WorkSession record.\\n\\n' +\n 'All acceptance criteria must be validated and all implementation steps must be completed via action_work_session before calling this. The completion gate enforces this — shortcuts are not available.\\n\\n' +\n 'Automatically recalculates status for dependent tickets and returns cascade info.\\n\\n' +\n 'Optional validation flags can be provided to report test results inline:\\n' +\n '- tests: Unit/integration test results\\n' +\n '- lint: Linting results\\n' +\n '- typeCheck: TypeScript type checking\\n' +\n '- build: Build/compilation results',\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket',\n },\n summary: {\n type: 'string',\n description: 'Summary of work completed',\n },\n filesModified: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files modified',\n },\n filesCreated: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files created',\n },\n filesDeleted: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files deleted',\n },\n actualHours: {\n type: 'number',\n description: 'Actual hours spent on the ticket',\n },\n validation: {\n type: 'object',\n description: 'Detailed validation flags for reporting test/lint/build results',\n properties: {\n tests: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Unit/integration test results',\n },\n lint: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Linting results',\n },\n typeCheck: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'TypeScript type checking results',\n },\n build: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Build/compilation results',\n },\n notes: {\n type: 'string',\n description: 'Additional validation notes',\n },\n },\n },\n },\n required: ['ticketId', 'summary'],\n },\n },\n {\n name: 'reopen_specification',\n description: 'Reopen a specification in \"ready\" status, regressing to \"planning\". Use when action_planning_session reports the spec is no longer in planning. After reopening, call start_planning_session to begin a new planning session.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification to reopen',\n },\n },\n required: ['specificationId'],\n },\n },\n\n // Spec creation is a HUMAN bootstrap step, NOT an agent MCP tool: specs are\n // created via `specforge init` (cli-rest surface), which also writes the new\n // spec id into the local config so the agent's per-call injection finds it.\n // The agent assumes the spec already exists and starts from\n // `start_planning_session`. (Backend keeps `create_specification` REST-only;\n // it was never dispatchable on /local.)\n\n // ========================================================================\n // Utilities (3)\n // ========================================================================\n {\n name: 'feedback',\n description: `Submit and manage feedback about MCP tools. Operations:\n- submit: Submit new feedback (requires category, summary)\n- list: List recent feedback entries\n- get: Get a specific feedback entry by ID`,\n inputSchema: {\n type: 'object',\n properties: {\n operation: {\n type: 'string',\n enum: ['submit', 'list', 'get'],\n description: 'The operation to perform',\n },\n // For submit operation\n category: {\n type: 'string',\n enum: ['bug', 'feature_request', 'usability', 'documentation', 'performance'],\n description: 'Feedback category (required for submit)',\n },\n summary: {\n type: 'string',\n description: 'Brief summary of the feedback (required for submit)',\n },\n severity: {\n type: 'string',\n enum: ['critical', 'high', 'medium', 'low'],\n description: 'Severity level (default: medium)',\n },\n tool: {\n type: 'string',\n description: 'Which MCP tool this relates to',\n },\n toolOperation: {\n type: 'string',\n description: 'Specific operation within the tool',\n },\n details: {\n type: 'string',\n description: 'Extended description',\n },\n expected: {\n type: 'string',\n description: 'Expected behavior',\n },\n actual: {\n type: 'string',\n description: 'Actual behavior',\n },\n errorMessage: {\n type: 'string',\n description: 'Error message if reporting a bug',\n },\n ticketId: {\n type: 'string',\n description: 'Related ticket ID',\n },\n // For list operation\n limit: {\n type: 'number',\n description: 'Maximum entries to return (default: 10)',\n },\n categoryFilter: {\n type: 'string',\n enum: ['bug', 'feature_request', 'usability', 'documentation', 'performance'],\n description: 'Filter by category',\n },\n // For get operation\n feedbackId: {\n type: 'string',\n description: 'Feedback ID to retrieve (required for get)',\n },\n },\n required: ['operation'],\n },\n },\n {\n name: 'link_pull_request',\n description: 'Associate a pull request with a ticket',\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket',\n },\n prNumber: {\n type: 'number',\n description: 'PR number (provide this or prUrl)',\n },\n prUrl: {\n type: 'string',\n description: 'Full PR URL (GitHub, GitLab, or Bitbucket)',\n },\n title: {\n type: 'string',\n description: 'PR title',\n },\n author: {\n type: 'string',\n description: 'PR author',\n },\n repoUrl: {\n type: 'string',\n description: 'Repository URL (required if using prNumber)',\n },\n },\n required: ['ticketId'],\n },\n },\n\n // ========================================================================\n // Orchestration (2)\n // ========================================================================\n {\n name: 'get_critical_path',\n description: 'Get the critical execution path for a specification.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'Specification ID',\n },\n },\n required: ['specificationId'],\n },\n },\n {\n name: 'get_dependency_tree',\n description: 'Get the full dependency tree for a specification.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'Specification ID',\n },\n },\n required: ['specificationId'],\n },\n },\n ];\n\n // Mark the work verbs as in_development — mirrors @specforge/core\n // getToolDefinitions so a mcp-local agent also gets the \"coming soon\" affordance\n // (calling them returns a typed stub) instead of believing they are stable.\n // The review lifecycle (SRS/ARS/CRS) was purged in M27.\n const IN_DEVELOPMENT_PLANNED_FOR: Record<string, string> = {\n start_work_session: '0.2.0',\n action_work_session: '0.2.0',\n complete_work_session: '0.2.0',\n };\n for (const t of tools) {\n const plannedFor = IN_DEVELOPMENT_PLANNED_FOR[t.name];\n if (plannedFor) {\n t.description =\n `**In development — ships with ${plannedFor}.** Calling returns a typed stub ` +\n `response the client should render as a \"coming soon\" affordance.\\n\\n${t.description}`;\n }\n }\n\n return tools;\n}\n\n/**\n * Tool handler type - processes arguments and returns a result\n */\ntype ToolHandler = (\n apiClient: ApiClient,\n args: Record<string, unknown>\n) => Promise<unknown>;\n\n/**\n * Retry configuration for transient failures\n */\nconst RETRY_CONFIG = {\n maxRetries: 3,\n initialDelayMs: 500,\n maxDelayMs: 5000,\n backoffMultiplier: 2,\n};\n\n/**\n * Transient error patterns that should trigger retry\n */\nconst TRANSIENT_ERROR_PATTERNS = [\n /ETIMEDOUT/i,\n /ECONNRESET/i,\n /ECONNREFUSED/i,\n /socket hang up/i,\n /network error/i,\n /too many requests/i,\n /rate limit/i,\n /5\\d{2}/, // 5xx status codes\n];\n\n/**\n * Check if an error is transient and should be retried\n */\nfunction isTransientError(error: Error): boolean {\n return TRANSIENT_ERROR_PATTERNS.some(pattern =>\n pattern.test(error.message)\n );\n}\n\n/**\n * Sleep for a given number of milliseconds\n */\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n/**\n * Execute a function with retry logic for transient failures\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n toolName: string,\n debug: boolean\n): Promise<T> {\n let lastError: Error | null = null;\n let delay = RETRY_CONFIG.initialDelayMs;\n\n for (let attempt = 1; attempt <= RETRY_CONFIG.maxRetries; attempt++) {\n try {\n return await fn();\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error));\n\n if (attempt < RETRY_CONFIG.maxRetries && isTransientError(lastError)) {\n if (debug) {\n console.error(\n `[DEBUG] Tool ${toolName} attempt ${attempt} failed with transient error, retrying in ${delay}ms:`,\n lastError.message\n );\n }\n await sleep(delay);\n delay = Math.min(delay * RETRY_CONFIG.backoffMultiplier, RETRY_CONFIG.maxDelayMs);\n } else {\n break;\n }\n }\n }\n\n throw lastError;\n}\n\n/**\n * Create tool handlers that call the API with proper request formatting\n *\n * @param apiClient - The API client to use for making requests\n * @returns Record of tool handlers keyed by tool name\n */\nexport function createToolHandlers(\n apiClient: ApiClient\n): Record<string, ToolHandler> {\n // Agent `/local` path (M9, approach A): the transport returns the raw M8 body;\n // interpret the envelope here. Lifecycle → unwrap to `agentResponse`; standard\n // error → throw the composed guidance prose (M9.3); raw success → pass through.\n const callLocal = async <T = unknown>(\n op: string,\n args: Record<string, unknown>,\n ): Promise<T> => {\n // SPECFORGE_DEBUG=true → trace the EXACT wire request/response for what a tool handler\n // forwards to /local after its arg-mapping (e.g. the inner `payload` shape\n // `action_work_session` sends). Prefers a file (SPECFORGE_DEBUG_FILE) since an MCP-serve\n // subprocess's stderr may be swallowed by the host; falls back to stderr (stdout is the\n // MCP JSON protocol and must stay clean).\n const debug = process.env.SPECFORGE_DEBUG === 'true';\n const debugFile = process.env.SPECFORGE_DEBUG_FILE;\n const trace = (line: string) => {\n if (!debug) return;\n if (debugFile) { try { appendFileSync(debugFile, line + '\\n'); return; } catch { /* fall through */ } }\n process.stderr.write(line + '\\n');\n };\n trace(`[cli:wire →] ${op} ${JSON.stringify(args)}`);\n const body = await apiClient.getTransport().execute<Record<string, unknown>>(op, args);\n trace(`[cli:wire ←] ${op} ${JSON.stringify(body).slice(0, 800)}`);\n if (body && typeof body === 'object') {\n if (body.kind === 'standard_error') {\n // M9.3: the error-guidance composer's `guidance.prose` is the canonical\n // agent-facing message (same verbatim convention as lifecycle guidance);\n // surface it for query-tool errors, falling back to `message` (and to a\n // generic line for INTERNAL, where guidance is always null).\n const guidance = body.guidance as { prose?: unknown } | null | undefined;\n const prose = guidance && typeof guidance.prose === 'string' ? guidance.prose : undefined;\n throw new Error(\n prose ?? (typeof body.message === 'string' ? body.message : `Operation failed: ${op}`),\n );\n }\n if (body.kind === 'lifecycle' && 'agentResponse' in body) {\n return body.agentResponse as T;\n }\n }\n return body as T;\n };\n\n return {\n // ========================================================================\n // Queries — forward the canonical super-tools straight through (the backend\n // owns the `type` dispatch; M9 dropped the old granular-op fan-out).\n // ========================================================================\n get: async (_client, args) => {\n if (!args.type) throw new Error('Missing required argument: type');\n // Project/spec ids inject from config when the agent omits them.\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n return await callLocal('get', withCtx);\n },\n\n list: async (_client, args) => {\n if (!args.type) throw new Error('Missing required argument: type');\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n return await callLocal('list', withCtx);\n },\n\n search: async (_client, args) => {\n if (!args.query && !args.files && !args.tags && !args.relatedTo) {\n throw new Error('At least one filter is required: query, files, tags, or relatedTo');\n }\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n if (!withCtx.projectId && !withCtx.specificationId && !withCtx.epicId) {\n throw new Error('One of projectId, specificationId, or epicId is required. Run \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('search', withCtx);\n },\n\n get_next_actionable_tickets: async (_client, args) => {\n // Inject projectId/specificationId from .specforge.json if not provided\n const argsWithContext = injectContext(args, ['projectId', 'specificationId']);\n\n // Either specificationId or projectId is required (after injection)\n if (!argsWithContext.specificationId && !argsWithContext.projectId) {\n throw new Error('Either specificationId or projectId is required. Set working context with \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('get_next_actionable_tickets', {\n specificationId: argsWithContext.specificationId,\n projectId: argsWithContext.projectId,\n limit: argsWithContext.limit ?? 5,\n });\n },\n\n get_blocked_tickets: async (_client, args) => {\n // Inject specificationId from .specforge.json if not provided\n const argsWithContext = injectContext(args, ['specificationId']);\n\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required. Set working context with \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('get_blocked_tickets', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n get_report: async (_client, args) => {\n validateRequired(args, 'type', 'scope', 'scopeId');\n return await callLocal('get_report', {\n type: args.type,\n scope: args.scope,\n scopeId: args.scopeId,\n format: args.format ?? 'json',\n startDate: args.startDate,\n endDate: args.endDate,\n });\n },\n\n // ========================================================================\n // Lifecycle\n // ========================================================================\n // Planning lifecycle (M9.6b) — identity/session injected from the\n // `.specforge` config; SPS persists the session id, a `closed` status\n // clears it. Payloads match the post-M8 boundary (SPS {specificationId};\n // APS {sessionId, operation:{type,...}}; CPS {sessionId}).\n start_planning_session: async (_client, args) => {\n const cfg = tryLoadProjectConfig();\n const specificationId = (args.specificationId as string) ?? cfg?.specificationId;\n if (!specificationId) {\n throw new Error('No active specification. Run `specforge switch <spec-id>` or pass specificationId.');\n }\n // projectId is injected from local config (client-authoritative scope);\n // SPS no longer derives it server-side from the spec row.\n const projectId = (args.projectId as string) ?? cfg?.projectId;\n if (!projectId) {\n throw new Error('No active project. Run `specforge switch <spec-id>` or pass projectId.');\n }\n const agentResponse = await callLocal<{ sessionId?: string }>(\n 'start_planning_session',\n { projectId, specificationId },\n );\n if (agentResponse?.sessionId) {\n saveProjectConfig({ planningSessionId: agentResponse.sessionId });\n appendPlanningSessionRegistry({\n specificationId,\n planningSessionId: agentResponse.sessionId,\n startedAt: new Date().toISOString(),\n });\n }\n return agentResponse;\n },\n\n action_planning_session: async (_client, args) => {\n if (!args.operation || typeof args.operation !== 'object') {\n throw new Error('Missing required argument: operation (e.g. { type: \"get_planning_status\" })');\n }\n const cfg = tryLoadProjectConfig();\n const sessionId = (args.sessionId as string) ?? cfg?.planningSessionId;\n if (!sessionId) {\n throw new Error('No active planning session. Call start_planning_session first.');\n }\n const agentResponse = await callLocal<{ planningStatus?: string }>(\n 'action_planning_session',\n { sessionId, operation: args.operation },\n );\n // Close detection: clear the persisted session id once it closes.\n if (agentResponse?.planningStatus === 'closed' && cfg?.specificationId) {\n saveProjectConfig({ planningSessionId: undefined });\n markPlanningSessionRegistryCompleted({\n specificationId: cfg.specificationId,\n completedAt: new Date().toISOString(),\n });\n }\n return agentResponse;\n },\n\n complete_planning_session: async (_client, args) => {\n const cfg = tryLoadProjectConfig();\n const sessionId = (args.sessionId as string) ?? cfg?.planningSessionId;\n if (!sessionId) {\n throw new Error('No active planning session. Call start_planning_session first.');\n }\n // CPS-success flips to awaiting_human_review (not closed) — keep the id.\n // MB.10.5 — grep double-call. Pass-1 sends NO evidence: in cross_validation\n // the server may reply `evidence_required` with a `grepRequest` (the exact\n // paths it can't resolve spec-internally). Probe JUST those paths locally,\n // then re-call CPS with the existing subset injected as `existingFiles`\n // (pass-2, the committing verdict). Outside a worktree the probe returns []\n // → re-call with [] → strict verdict (never blocks a repo-less caller).\n // From the agent's view this stays ONE tool call: only pass-2 is returned.\n const first = await callLocal<{ outcome?: string; grepRequest?: { paths?: string[] } }>(\n 'complete_planning_session',\n { sessionId },\n );\n if (first?.outcome !== 'evidence_required') {\n return first;\n }\n const requested = Array.isArray(first.grepRequest?.paths) ? first.grepRequest.paths : [];\n const existingFiles = probeExistingFiles(requested);\n return await callLocal('complete_planning_session', { sessionId, existingFiles });\n },\n\n start_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId');\n // MCP-local git injection (M23.2): the CLM/agent runs on the worktree the\n // Lambda can't see, so THIS process reads the git evidence and injects it —\n // `gitClean` feeds the SWS git-clean precondition; `worktreePath`/`branch`\n // are persisted onto the WorkSession (M16.2). Provenance is `null` when the\n // agent is not inside a git worktree (SWS still records the session).\n const git = readWorktreeGitEvidence();\n return await callLocal('start_work_session', {\n ticketId: args.ticketId,\n gitClean: git.gitClean,\n worktreePath: git.worktreePath,\n branch: git.branch,\n });\n },\n\n action_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId');\n // The AWS action vocab (mark_implementation_step_completion / mark_acceptance_check /\n // record_test_result / add_*_justification / record_file_change / create_discovery\n // (with `blocking`) / update_discovery / set_discovery_resolved) rides in `action`\n // — the discriminated `AwsActionInput`. The CLI forwards it verbatim as the inner\n // `payload` (the work analog of action_planning_session forwarding `operation`);\n // the lifecycle dispatches on `payload.action`.\n return await callLocal('action_work_session', {\n ticketId: args.ticketId,\n payload: args.action ?? args.payload,\n });\n },\n\n complete_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId', 'summary');\n // MCP-local git-commit binding (M23.2): the deployed Lambda has no worktree, so\n // THIS process reads the HEAD commit hash and injects it as `commitSha`. CWS's\n // git-evidence gate binds it onto the WorkSession and finalizes — without it a\n // passing session holds forever (\"commit your work first\"). `null` when the agent\n // is not inside a git worktree (the gate then holds, as intended for non-git callers).\n const commitSha = readHeadCommitSha();\n return await callLocal('complete_work_session', {\n ticketId: args.ticketId,\n summary: args.summary,\n filesModified: args.filesModified,\n filesCreated: args.filesCreated,\n filesDeleted: args.filesDeleted,\n actualHours: args.actualHours,\n validation: args.validation,\n ...(commitSha !== null && { commitSha }),\n });\n },\n\n reopen_specification: async (_client, args) => {\n const argsWithContext = injectContextRequired(args, ['specificationId']);\n return await callLocal('reopen_specification', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n // ========================================================================\n // Mutation\n // ========================================================================\n\n // ========================================================================\n // Utilities\n // ========================================================================\n feedback: async (_client, args) => {\n // M9.7: origin is server-derived from the `X-SpecForge-Origin` header\n // (default `mcp` on the agent transport) — never a request-body `source`.\n return await callLocal('feedback', args);\n },\n\n link_pull_request: async (_client, args) => {\n validateRequired(args, 'ticketId');\n if (!args.prNumber && !args.prUrl) {\n throw new Error('Either prNumber or prUrl must be provided');\n }\n return await callLocal('link_pull_request', {\n ticketId: args.ticketId,\n prNumber: args.prNumber,\n prUrl: args.prUrl,\n title: args.title,\n author: args.author,\n repoUrl: args.repoUrl,\n });\n },\n\n // ========================================================================\n // Orchestration\n // ========================================================================\n get_critical_path: async (_client, args) => {\n const argsWithContext = injectContext(args, ['specificationId']);\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required');\n }\n return await callLocal('get_critical_path', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n get_dependency_tree: async (_client, args) => {\n const argsWithContext = injectContext(args, ['specificationId']);\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required');\n }\n return await callLocal('get_dependency_tree', {\n specificationId: argsWithContext.specificationId,\n });\n },\n };\n}\n\n/**\n * Validate that required arguments are present\n * @throws Error if any required argument is missing\n */\nfunction validateRequired(args: Record<string, unknown>, ...required: string[]): void {\n for (const field of required) {\n if (args[field] === undefined || args[field] === null || args[field] === '') {\n throw new Error(`Missing required argument: ${field}`);\n }\n }\n}\n\n// Create a cached instance of tool handlers\nlet cachedHandlers: Record<string, ToolHandler> | null = null;\n\n/**\n * Reset the cached tool handlers (for testing purposes)\n */\nexport function resetToolHandlers(): void {\n cachedHandlers = null;\n}\n\n/**\n * Handle a tool call by routing to the appropriate handler\n *\n * @param apiClient - The API client to use for making requests\n * @param toolName - Name of the tool being called\n * @param args - Arguments passed to the tool\n * @param debug - Whether to enable debug logging\n * @returns Promise resolving to the tool result\n */\nexport async function handleToolCall(\n apiClient: ApiClient,\n toolName: string,\n args: Record<string, unknown>,\n debug: boolean = false\n): Promise<unknown> {\n const startTime = Date.now();\n\n // Create handlers if not cached\n if (!cachedHandlers) {\n cachedHandlers = createToolHandlers(apiClient);\n }\n\n // Get the handler for this tool\n const handler = cachedHandlers[toolName];\n if (!handler) {\n throw new Error(`Unknown tool: ${toolName}`);\n }\n\n if (debug) {\n console.error(`[DEBUG] Calling tool: ${toolName}`, {\n args: JSON.stringify(args),\n });\n }\n\n try {\n // Run comprehensive validation before executing\n validateToolArgs(toolName, args);\n\n // Execute with retry logic\n const result = await withRetry(\n () => handler(apiClient, args),\n toolName,\n debug\n );\n\n const duration = Date.now() - startTime;\n if (debug) {\n console.error(`[DEBUG] Tool ${toolName} completed in ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - startTime;\n\n // Transform error for proper handling\n const transformedError = transformError(error);\n const message = transformedError.message;\n\n if (debug) {\n console.error(`[DEBUG] Tool ${toolName} failed after ${duration}ms:`, message);\n if (transformedError instanceof ValidationError) {\n console.error(`[DEBUG] Validation field: ${transformedError.field}, code: ${transformedError.code}`);\n }\n }\n\n // Rethrow with context\n if (transformedError instanceof ValidationError) {\n throw transformedError;\n }\n if (transformedError instanceof ApiError) {\n throw transformedError;\n }\n throw new Error(`Tool ${toolName} failed: ${message}`);\n }\n}\n\n/**\n * Handle a tool call and return MCP-formatted response\n * This wraps handleToolCall with proper error formatting for MCP protocol\n */\nexport async function handleToolCallSafe(\n apiClient: ApiClient,\n toolName: string,\n args: Record<string, unknown>,\n debug: boolean = false\n): Promise<unknown | MCPErrorResponse> {\n try {\n return await handleToolCall(apiClient, toolName, args, debug);\n } catch (error) {\n const err = error instanceof Error ? error : new Error(String(error));\n return formatMCPError(err);\n }\n}\n\n// Re-export validation utilities for use by other modules\nexport {\n ValidationError,\n ApiError,\n validateToolArgs,\n formatMCPError,\n transformError,\n type MCPErrorResponse,\n} from '../validation/index.js';\n"],"mappings":"AAAA,SAAS,sBAAsB;AAS/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe,6BAA6B;AACrD,SAAS,0BAA0B;AACnC,SAAS,yBAAyB,yBAAyB;AAC3D,SAAS,sBAAsB,yBAAyB;AACxD;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAoBA,SAAS,WAAmB;AACjC,QAAM,QAAgB;AAAA;AAAA;AAAA;AAAA,IAIpB;AAAA,MACE,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,QACX,MAAM;AAAA,QACN,YAA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AA,IACrE;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,UAAM,WAAW,KAAK,IAAI,IAAI;AAG9B,UAAM,mBAAmB,eAAe,KAAK;AAC7C,UAAM,UAAU,iBAAiB;AAEjC,QAAI,OAAO;AACT,cAAQ,MAAM,gBAAgB,QAAQ,iBAAiB,QAAQ,OAAO,OAAO;AAC7E,UAAI,4BAA4B,iBAAiB;AAC/C,gBAAQ,MAAM,6BAA6B,iBAAiB,KAAK,WAAW,iBAAiB,IAAI,EAAE;AAAA,MACrG;AAAA,IACF;AAGA,QAAI,4BAA4B,iBAAiB;AAC/C,YAAM;AAAA,IACR;AACA,QAAI,4BAA4B,UAAU;AACxC,YAAM;AAAA,IACR;AACA,UAAM,IAAI,MAAM,QAAQ,QAAQ,YAAY,OAAO,EAAE;AAAA,EACvD;AACF;AAMA,eAAsB,mBACpB,WACA,UACA,MACA,QAAiB,OACoB;AACrC,MAAI;AACF,WAAO,MAAM,eAAe,WAAW,UAAU,MAAM,KAAK;AAAA,EAC9D,SAAS,OAAO;AACd,UAAM,MAAM,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AACpE,WAAO,eAAe,GAAG;AAAA,EAC3B;AACF;AAGA;AAAA,EACE,mBAAAA;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AAAA,OAEK;","names":["ValidationError","ApiError","validateToolArgs","formatMCPError","transformError"]}
|
|
1
|
+
{"version":3,"sources":["../../src/tools/index.ts"],"sourcesContent":["import { appendFileSync } from 'node:fs';\n/**\n * MCP Tools Registry\n *\n * This module defines and exports all available MCP tools.\n * 22 tools organized into: Queries, Lifecycle, Mutation, Utilities, Orchestration.\n */\n\nimport { ApiClient } from '../client/api-client.js';\nimport {\n ValidationError,\n ApiError,\n validateToolArgs,\n formatMCPError,\n transformError,\n MCPErrorResponse,\n} from '../validation/index.js';\nimport { injectContext, injectContextRequired } from './core/context-helper.js';\nimport { probeExistingFiles } from './core/file-existence-injection.js';\nimport { readWorktreeGitEvidence, readHeadCommitSha } from './core/git-injection.js';\nimport { tryLoadProjectConfig, saveProjectConfig } from '../cli/config/index.js';\nimport {\n appendPlanningSessionRegistry,\n markPlanningSessionRegistryCompleted,\n} from '../cli/config/planning-sessions-registry.js';\n\n/**\n * Tool definition matching MCP protocol schema\n */\nexport interface Tool {\n name: string;\n description: string;\n inputSchema: {\n type: 'object';\n properties: Record<string, unknown>;\n required?: string[];\n };\n}\n\n/**\n * Get list of all available tools\n *\n * @returns Array of tool definitions (22 tools)\n */\nexport function getTools(): Tool[] {\n const tools: Tool[] = [\n // ========================================================================\n // Queries (6)\n // ========================================================================\n {\n name: 'get',\n description: 'Get a single entity by type and ID.',\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['project', 'specification', 'epic', 'ticket', 'blueprint'],\n description: 'Entity type to retrieve',\n },\n id: {\n type: 'string',\n description: 'Entity ID',\n },\n },\n required: ['type', 'id'],\n },\n },\n {\n name: 'list',\n description: 'List entities by type.',\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['projects', 'specifications', 'epics', 'tickets', 'blueprints'],\n description: 'Entity type to list',\n },\n projectId: {\n type: 'string',\n description: 'Filter by project (for specifications)',\n },\n specificationId: {\n type: 'string',\n description: 'Filter by specification (for epics, tickets)',\n },\n epicId: {\n type: 'string',\n description: 'Filter by epic (for tickets)',\n },\n },\n required: ['type'],\n },\n },\n {\n name: 'search',\n description: `Unified ticket search with multiple filter options.\n\nCombines:\n- Full-text search (query)\n- File matching (files) - replaces find_tickets_by_file\n- Tag filtering (tags) - replaces find_tickets_by_tag\n- Related tickets (relatedTo) - replaces find_related_tickets\n- Status, complexity, priority filters\n\nAt least one of: query, files, tags, or relatedTo is required.\nAt least one scope filter (projectId, specificationId, or epicId) is required.`,\n inputSchema: {\n type: 'object',\n properties: {\n query: {\n type: 'string',\n description: 'Full-text search query',\n },\n files: {\n type: 'array',\n items: { type: 'string' },\n description: 'Glob patterns to match ticket files (e.g., \"**/channel/*.ts\")',\n },\n tags: {\n type: 'array',\n items: { type: 'string' },\n description: 'Tags to filter by',\n },\n matchAllTags: {\n type: 'boolean',\n description: 'If true, match all tags (AND). If false, match any (OR). Default: false',\n },\n relatedTo: {\n type: 'string',\n description: 'Find tickets related to this ticket ID (by tags, files, tech stack)',\n },\n status: {\n type: 'array',\n items: {\n type: 'string',\n enum: ['pending', 'ready', 'active', 'done', 'blocked'],\n },\n description: 'Filter by status',\n },\n complexity: {\n type: 'array',\n items: {\n type: 'string',\n enum: ['small', 'medium', 'large', 'xlarge'],\n },\n description: 'Filter by complexity',\n },\n projectId: {\n type: 'string',\n description: 'Limit search to project',\n },\n specificationId: {\n type: 'string',\n description: 'Limit search to specification',\n },\n epicId: {\n type: 'string',\n description: 'Limit search to epic',\n },\n limit: {\n type: 'number',\n description: 'Maximum results (default: 20, max: 100)',\n },\n offset: {\n type: 'number',\n description: 'Pagination offset (default: 0)',\n },\n fields: {\n type: 'array',\n items: {\n type: 'string',\n enum: [\n 'id',\n 'epicId',\n 'ticketNumber',\n 'title',\n 'description',\n 'status',\n 'priority',\n 'complexity',\n 'estimatedHours',\n 'actualHours',\n 'acceptanceCriteria',\n 'implementation',\n 'technicalDetails',\n 'notes',\n 'tags',\n 'progress',\n 'testsPassed',\n 'order',\n 'startedAt',\n 'completedAt',\n 'createdAt',\n 'updatedAt',\n ],\n },\n description:\n 'Select specific fields to return. Returns all fields if not specified. id is always included.',\n },\n },\n },\n },\n {\n name: 'get_next_actionable_tickets',\n description: 'Get tickets with status \"ready\" (all dependencies satisfied). Use start_work_session() to begin work on these tickets.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification (optional if projectId provided)',\n },\n projectId: {\n type: 'string',\n description: 'The ID of the project to get actionable tickets across all specifications',\n },\n limit: {\n type: 'number',\n description: 'Maximum number of tickets to return (default: 5)',\n },\n },\n },\n },\n {\n name: 'get_blocked_tickets',\n description: 'Get tickets with status \"pending\", each with the `blockedBy` list of unsatisfied dependency tickets computed from the dependency tree.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification',\n },\n },\n required: ['specificationId'],\n },\n },\n {\n name: 'get_report',\n description: `Generate unified reports for implementation, time tracking, blockers, work summary, or active sessions.\n\nReport types:\n- 'implementation': Progress, velocity, completions (replaces get_implementation_summary)\n- 'time': Estimated vs actual hours (replaces get_time_report)\n- 'blockers': Blocked tickets with reasons (replaces get_blockers_report)\n- 'work': Completed work summary from WorkSession records (replaces get_work_summary)\n- 'sessions': Live planning/work/review sessions for a project (requires scope='project')\n\nFormat options:\n- 'json': Full structured data (default)\n- 'summary': Condensed text summary`,\n inputSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['implementation', 'time', 'blockers', 'work', 'sessions'],\n description: 'Type of report to generate',\n },\n scope: {\n type: 'string',\n enum: ['project', 'specification', 'epic'],\n description: \"Scope of the report. 'sessions' requires scope='project'.\",\n },\n scopeId: {\n type: 'string',\n description: 'ID of the scoped entity (projectId, specificationId, or epicId)',\n },\n startDate: {\n type: 'string',\n description: 'Start date for work report (ISO 8601)',\n },\n endDate: {\n type: 'string',\n description: 'End date for work report (ISO 8601)',\n },\n format: {\n type: 'string',\n enum: ['json', 'summary'],\n description: \"Response format: 'json' (default) or 'summary'.\",\n },\n },\n required: ['type', 'scope', 'scopeId'],\n },\n },\n\n // ========================================================================\n // Lifecycle (10)\n // ========================================================================\n {\n name: 'start_planning_session',\n description: 'Start or resume a guided planning session for a specification. Project-scoped lock: only one active planning session per project. Calling with the same spec resumes the existing session (idempotent). Calling with a different spec while one is active returns a rejection with the active session details. Planning is independent of implementation and review — they can run concurrently.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The specification to plan. Optional — defaults to the active spec in the local config (.specforge/config.json), so you normally omit it.',\n },\n projectId: {\n type: 'string',\n description: 'The owning project. Optional — defaults to the active project in the local config (.specforge/config.json); injected automatically, so you normally omit it.',\n },\n },\n // Nothing is required: specificationId/projectId fall back to local config, and\n // the returned sessionId is persisted + injected into subsequent calls.\n required: [],\n },\n },\n {\n name: 'action_planning_session',\n description: \"Execute a planning action within an active session. Wraps the planning write operations (create/update/delete for epics, tickets and blueprints; plus the dependency, blueprint-link, step-link, justify and creator-election operations) and the read operation get_planning_status. The operation.type IS the backend PlanningOperationName; the remaining fields are the operation payload. To read a single ticket, use the `get` tool (type:'ticket').\",\n inputSchema: {\n type: 'object',\n properties: {\n operation: {\n type: 'object',\n description: 'The operation to perform. Must include a \"type\" field. Per-op required fields are declared in `oneOf` below — agents should consult their own tool schema parser for the exact shape per type. Do NOT pass sessionId/projectId/specificationId: the active planning session is injected from local config.',\n properties: {\n type: {\n type: 'string',\n enum: [\n 'update_spec',\n 'create_epic',\n 'update_epic',\n 'delete_epic',\n 'create_ticket',\n 'ticket_general_actions',\n 'ticket_step_actions',\n 'ticket_criteria_actions',\n 'ticket_test_actions',\n 'delete_ticket',\n 'create_blueprint',\n 'update_blueprint',\n 'delete_blueprint',\n 'link_blueprint_to_tickets',\n 'unlink_blueprint_to_tickets',\n 'link_step_file',\n 'unlink_step_file',\n 'link_step_snippet',\n 'unlink_step_snippet',\n 'create_dependencies',\n 'delete_dependencies',\n 'apply_creator_election',\n 'justify',\n 'unjustify',\n 'get_planning_status',\n ],\n description: 'The planning operation to perform (lifecycle vocabulary). The type IS the backend PlanningOperationName; remaining fields are the operation payload.',\n },\n },\n required: ['type'],\n oneOf: [\n {\n properties: {\n type: { const: 'update_spec' },\n fields: { type: 'object', description: 'Partial spec update — only the keys you send are changed (e.g. background, goals, nonGoals, constraints, successCriteria). Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.' },\n },\n required: ['type', 'fields'],\n },\n // create_epic — SHELL only (epic_decomposition). Body fields are authored\n // by update_epic in epic_expansion; only title/description/objective are\n // persisted on create, so only those are advertised.\n {\n properties: {\n type: { const: 'create_epic' },\n title: { type: 'string', minLength: 1, description: 'Epic title (non-empty)' },\n description: { type: 'string', description: 'What this epic delivers' },\n objective: { type: 'string', description: 'Goal achieved for the user' },\n },\n required: ['type', 'title'],\n },\n {\n properties: {\n type: { const: 'update_epic' },\n id: { type: 'string', description: 'Epic id (use list_epics / lookup_epic to find).' },\n fields: {\n type: 'object',\n description: 'Partial epic update — only the keys you send are changed. Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.',\n properties: {\n title: { type: 'string' },\n description: { type: 'string' },\n objective: { type: 'string', description: 'Goal achieved for the user.' },\n architecture: { type: 'string', description: 'Structural approach specific to this epic.' },\n scope: { type: 'object', description: 'Epic scope.', properties: { inScope: { type: 'array', items: { type: 'string' } }, outOfScope: { type: 'array', items: { type: 'string' } }, assumptions: { type: 'array', items: { type: 'string' } }, externalDependencies: { type: 'array', items: { type: 'string' } } } },\n goals: { type: 'array', description: 'Epic goals as objects (Epic.goals is a json object[], not string[]).', items: { type: 'object', properties: { title: { type: 'string' }, description: { type: 'string' }, type: { type: 'string', enum: ['business', 'technical', 'user', 'operational'] }, successCriteria: { type: 'array', items: { type: 'string' } } }, required: ['title', 'description'] } },\n acceptanceCriteria: { type: 'array', description: 'BDD criteria objects (Epic.acceptanceCriteria is a json object[], not string[]).', items: { type: 'object', properties: { given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['given', 'when', 'then'] } },\n validationCommands: { type: 'array', items: { type: 'string' }, description: 'Commands that verify this epic end-to-end.' },\n apiContracts: { type: 'array', description: 'API contracts this epic exposes.', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, type: { type: 'string' }, description: { type: 'string' } } } },\n sharedPatterns: { type: 'array', description: 'Reusable patterns the epic\\'s tickets should follow.', items: { type: 'object' } },\n fileStructures: { type: 'array', description: 'Concrete files this epic creates/modifies.', items: { type: 'object', properties: { id: { type: 'string' }, scope: { type: 'string' }, description: { type: 'string' }, content: { type: 'string' } } } },\n requirementsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec requirement ids this epic covers.' },\n nfrsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec NFR ids this epic covers.' },\n goalsCovered: { type: 'array', items: { type: 'string' }, description: 'Spec goal ids this epic advances.' },\n },\n },\n },\n required: ['type', 'id', 'fields'],\n },\n // create_ticket — SHELL (ticket_decomposition): epicId/title/description\n // + ticketType (the impl/verification decision, set HERE). The remaining body\n // fields are authored by the ticket node verbs in ticket_expansion;\n // dependencies via create_dependencies in cross_validation.\n {\n properties: {\n type: { const: 'create_ticket' },\n epicId: { type: 'string', description: 'Parent epic id' },\n title: { type: 'string', minLength: 1, description: 'Ticket title (non-empty)' },\n description: { type: 'string' },\n ticketType: { type: 'string', enum: ['implementation', 'verification'], description: 'Ticket type — set here (decomposition); defaults to implementation. Editing it later via ticket_general_actions rolls the session back to ticket_decomposition.' },\n },\n required: ['type', 'epicId', 'title'],\n },\n // ME.19.1 (D8/D20) — the four ticket NODE VERBS replace the retired free-form\n // `update_ticket`. Each targets ONE scope with a TYPED payload (no `fields`\n // bag); complexity/planningType/ticketType are enums, so an out-of-enum value\n // is denied at the schema gate before persistence. `status` is NOT settable\n // (system/event-driven). Blueprint links are NOT settable here — use\n // link_blueprint_to_tickets.\n // ticket_general_actions — shell/general fields (partial edit).\n {\n description: 'Edit a ticket\\'s shell/general fields. Only the keys you send are changed. Fields that do not apply are declared with the `justify` op (undo with `unjustify`), never by writing values here.',\n properties: {\n type: { const: 'ticket_general_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n title: { type: 'string', description: 'Concise imperative title.' },\n description: { type: 'string', description: 'What this ticket delivers and why.' },\n complexity: { type: 'string', enum: ['small', 'medium', 'large', 'xlarge'] },\n planningType: { type: 'string', enum: ['planning', 'on_flight'], description: 'Changing this rolls the session back to ticket_decomposition to re-score.' },\n ticketType: { type: 'string', enum: ['implementation', 'verification'], description: 'Changing this rolls the session back to ticket_decomposition to re-score.' },\n epicId: { type: 'string', description: 'Re-parent the ticket to another epic.' },\n order: { type: 'integer', description: 'Rank hint within the epic.' },\n guardrails: { type: 'array', items: { type: 'string' }, description: 'Per-ticket guardrail ids or descriptions.' },\n estimatedMinutes: { type: 'integer', minimum: 0 },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_step_actions — batch add/edit/remove/reorder of implementation steps.\n {\n description: 'Batch-edit a ticket\\'s implementation steps (add/edit/remove/reorder in one call). A step is a unit of FUNCTIONAL WORK — describe the functions/components/adjustments it makes AND what each does, never a bare filename. Declare the file(s) each step touches INLINE via `files: [{path, role}]`, role one of creates|modifies|deletes|imports|reads (imports couples to a build/run dependency; reads is a context-only glance). Author code/type snippets INLINE via `codeSnippets`/`typeSnippets: [{content, language}]` — each becomes a ticket-level snippet row linked to this step (no separate snippet verb). NOTE: a call that declares snippets sets the ticket\\'s COMPLETE snippet set, so re-declare all when editing. Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_step_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n add: { type: 'array', description: 'New steps to append.', items: { type: 'object', properties: { text: { type: 'string' }, files: { type: 'array', description: 'Files this step touches, by role — derives the step↔file link + the TicketFileChange row.', items: { type: 'object', properties: { path: { type: 'string' }, role: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'] }, symbol: { type: 'string' }, why: { type: 'string' } }, required: ['path', 'role'] } }, codeSnippets: { type: 'array', description: 'Code snippets authored on this step → TicketCodeSnippet rows + step↔snippet links.', items: { type: 'object', properties: { content: { type: 'string' }, language: { type: 'string' }, description: { type: 'string' } }, required: ['content'] } }, typeSnippets: { type: 'array', description: 'Type snippets authored on this step → TicketTypeSnippet rows + step↔snippet links.', items: { type: 'object', properties: { content: { type: 'string' }, language: { type: 'string' }, description: { type: 'string' } }, required: ['content'] } } }, required: ['text'] } },\n edit: { type: 'array', description: 'Existing steps to edit (by stepId).', items: { type: 'object', properties: { stepId: { type: 'string' }, text: { type: 'string' }, files: { type: 'array', items: { type: 'object', properties: { path: { type: 'string' }, role: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'] }, symbol: { type: 'string' }, why: { type: 'string' } }, required: ['path', 'role'] } }, codeSnippets: { type: 'array', description: 'Code snippets authored on this step → TicketCodeSnippet rows + step↔snippet links.', items: { type: 'object', properties: { content: { type: 'string' }, language: { type: 'string' }, description: { type: 'string' } }, required: ['content'] } }, typeSnippets: { type: 'array', description: 'Type snippets authored on this step → TicketTypeSnippet rows + step↔snippet links.', items: { type: 'object', properties: { content: { type: 'string' }, language: { type: 'string' }, description: { type: 'string' } }, required: ['content'] } } }, required: ['stepId'] } },\n remove: { type: 'array', items: { type: 'string' }, description: 'Step ids to remove.' },\n reorder: { type: 'array', items: { type: 'string' }, description: 'Step ids in the desired order.' },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_criteria_actions — batch add/edit/remove/reorder of acceptance criteria.\n {\n description: 'Batch-edit a ticket\\'s acceptance criteria (given/when/then; add/edit/remove/reorder in one call). Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_criteria_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n add: { type: 'array', description: 'New acceptance criteria to append.', items: { type: 'object', properties: { given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['given', 'when', 'then'] } },\n edit: { type: 'array', description: 'Existing criteria to edit (by criterionId).', items: { type: 'object', properties: { criterionId: { type: 'string' }, given: { type: 'string' }, when: { type: 'string' }, then: { type: 'string' } }, required: ['criterionId'] } },\n remove: { type: 'array', items: { type: 'string' }, description: 'Criterion ids to remove.' },\n reorder: { type: 'array', items: { type: 'string' }, description: 'Criterion ids in the desired order.' },\n },\n required: ['type', 'ticketId'],\n },\n // ticket_test_actions — author the existing single-object testSpecification.\n {\n description: 'Author a ticket\\'s testSpecification (testTypes, qualityGates, testCommands, coverageTarget). Fields that do not apply are declared with the `justify` op, never by writing empty values here.',\n properties: {\n type: { const: 'ticket_test_actions' },\n ticketId: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n testSpecification: { type: 'object', properties: { testTypes: { type: 'array', items: { type: 'string', enum: ['unit', 'integration', 'e2e', 'typecheck', 'lint', 'build', 'contract', 'structural', 'layout', 'a11y', 'performance'] } }, qualityGates: { type: 'array', items: { type: 'string' } }, testCommands: { type: 'array', items: { type: 'string' } }, coverageTarget: { type: 'integer', minimum: 0, maximum: 100 } } },\n },\n required: ['type', 'ticketId', 'testSpecification'],\n },\n {\n properties: {\n type: { const: 'delete_epic' },\n id: { type: 'string', description: 'Epic id; cascades to all tickets in the epic.' },\n cascadeRemoveDependencies: { type: 'boolean', description: 'Confirm removing dependency edges pointing at this epic\\'s tickets from outside the epic. Required (true) when such referrers exist, else the delete is denied.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'delete_ticket' },\n id: { type: 'string', description: 'Ticket id (use list_tickets / lookup_ticket to find).' },\n cascadeRemoveDependencies: { type: 'boolean', description: 'Confirm removing dependency edges from other tickets that point at this ticket. Required (true) when such referrers exist, else the delete is denied.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'create_dependencies' },\n dependencies: {\n type: 'array',\n minItems: 1,\n maxItems: 5000,\n description: 'Up to 5000 dependency pairs, each a \"requires\" edge (fromTicketId depends on toTicketId). The batch is validated atomically: a cycle or an all-duplicate batch is rejected with guidance; already-existing edges are skipped.',\n items: {\n type: 'object',\n properties: {\n fromTicketId: { type: 'string', description: 'The dependent ticket (this one depends on the other).' },\n toTicketId: { type: 'string', description: 'The blocker ticket it depends on.' },\n },\n required: ['fromTicketId', 'toTicketId'],\n },\n },\n },\n required: ['type', 'dependencies'],\n },\n {\n properties: {\n type: { const: 'delete_dependencies' },\n dependencyIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'TicketDependency ids to remove (use lookup/list to find).' },\n },\n required: ['type', 'dependencyIds'],\n },\n // apply_creator_election (MB.16.1) — the atomic creator-election batch: file\n // moves + producing steps + ordering deps in ONE cross-phase op. Only the\n // status:'clean' partition is applied; conflicts are excluded + surfaced to\n // get_ticket. `dependencies` may be empty (single-toucher flips).\n {\n properties: {\n type: { const: 'apply_creator_election' },\n elections: {\n type: 'array',\n minItems: 1,\n maxItems: 5000,\n description: 'The per-file creator elections. Each moves an orphan shared file to filesToBeCreated on its elected creator ticket + declares the producing step so the moved file is not a new orphan.',\n items: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'The orphan shared file path to resolve.' },\n kind: { type: 'string', enum: ['creates', 'modifies', 'deletes', 'imports', 'reads'], description: 'The step-file role the elected ticket takes for this path (normally creates).' },\n creatorTicketId: { type: 'string', description: 'The elected creator ticket (topologically-earliest toucher).' },\n producingStep: {\n type: 'object',\n description: 'The step that produces the moved file: pass an existing step id to link it, OR text to create-and-link a new step.',\n properties: {\n text: { type: 'string', description: 'Text of a NEW producing step to create + link.' },\n stepId: { type: 'string', description: 'Id of an EXISTING step to link to the moved file.' },\n },\n },\n },\n required: ['path', 'kind', 'creatorTicketId', 'producingStep'],\n },\n },\n dependencies: {\n type: 'array',\n maxItems: 5000,\n description: 'The ordering deps (each a \"requires\" edge). May be empty. Only the CLEAN partition\\'s deps are persisted (recomputed + cycle-checked server-side).',\n items: {\n type: 'object',\n properties: {\n fromTicketId: { type: 'string', description: 'The dependent ticket (a non-elected toucher).' },\n toTicketId: { type: 'string', description: 'The elected creator it depends on.' },\n },\n required: ['fromTicketId', 'toTicketId'],\n },\n },\n },\n required: ['type', 'elections', 'dependencies'],\n },\n {\n properties: {\n type: { const: 'create_blueprint' },\n title: { type: 'string', minLength: 1, description: 'Blueprint title (non-empty)' },\n content: { type: 'string', description: 'Body — diagram source or markdown, persisted as-is on create.' },\n format: { type: 'string', enum: ['markdown', 'mermaid', 'ascii', 'mixed', 'html', 'svg', 'image'], description: 'Defaults to \"mermaid\"' },\n category: { type: 'string', enum: ['flowchart', 'architecture', 'state', 'sequence', 'erd', 'mockup', 'adr', 'component', 'deployment', 'api', 'algorithm', 'protocol', 'glossary', 'design_system'], description: 'Blueprint category (SpecificationBlueprint.category model enum).' },\n description: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n required: ['type', 'title', 'category'],\n },\n {\n properties: {\n type: { const: 'update_blueprint' },\n id: { type: 'string', description: 'Blueprint id.' },\n fields: {\n type: 'object',\n description: 'Partial blueprint update — only the keys you send are changed.',\n properties: {\n title: { type: 'string' },\n content: { type: 'string' },\n category: { type: 'string' },\n description: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n },\n },\n required: ['type', 'id', 'fields'],\n },\n {\n properties: {\n type: { const: 'delete_blueprint' },\n id: { type: 'string', description: 'Blueprint id.' },\n },\n required: ['type', 'id'],\n },\n {\n properties: {\n type: { const: 'link_blueprint_to_tickets' },\n blueprintId: { type: 'string', description: 'Blueprint to link.' },\n ticketIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'Tickets to link the blueprint to.' },\n },\n required: ['type', 'blueprintId', 'ticketIds'],\n },\n {\n properties: {\n type: { const: 'unlink_blueprint_to_tickets' },\n blueprintId: { type: 'string', description: 'Blueprint to unlink.' },\n ticketIds: { type: 'array', minItems: 1, items: { type: 'string' }, description: 'Tickets to unlink the blueprint from.' },\n },\n required: ['type', 'blueprintId', 'ticketIds'],\n },\n // MB.14.1 — step↔artifact link verbs (create/delete a join row keyed on\n // stepId + fileChangeId/snippetId). Get the ids from the ticket read-shape.\n {\n properties: {\n type: { const: 'link_step_file' },\n stepId: { type: 'string', description: 'Implementation step id (the functional unit of work).' },\n fileChangeId: { type: 'string', description: 'Declared file-change id the step produces (from the ticket read-shape).' },\n },\n required: ['type', 'stepId', 'fileChangeId'],\n },\n {\n properties: {\n type: { const: 'unlink_step_file' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n fileChangeId: { type: 'string', description: 'Declared file-change id to unlink from the step.' },\n },\n required: ['type', 'stepId', 'fileChangeId'],\n },\n {\n properties: {\n type: { const: 'link_step_snippet' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n snippetType: { type: 'string', enum: ['code', 'type'], description: \"'code' → TicketCodeSnippet, 'type' → TicketTypeSnippet.\" },\n snippetId: { type: 'string', description: 'Code/type snippet id the step follows (recommended, not required per step — but a snippet linking NO step is dangling and blocks the ticket; link or drop it).' },\n },\n required: ['type', 'stepId', 'snippetType', 'snippetId'],\n },\n {\n properties: {\n type: { const: 'unlink_step_snippet' },\n stepId: { type: 'string', description: 'Implementation step id.' },\n snippetType: { type: 'string', enum: ['code', 'type'], description: 'Which snippet table to unlink from.' },\n snippetId: { type: 'string', description: 'Code/type snippet id to unlink from the step.' },\n },\n required: ['type', 'stepId', 'snippetType', 'snippetId'],\n },\n // justify — declare a field N/A (the paired declare op; unjustify removes it).\n // Structural-neutral: it writes only the fieldDeclarations[scope] declaration,\n // so it is native in EVERY planning phase and never rolls back. `scope` is the\n // canonical field name the checks read (e.g. dependencies, codeReferences,\n // apiContracts) — NOT a `fieldDeclarations`-shaped payload on update_*.\n {\n properties: {\n type: { const: 'justify' },\n scope: { type: 'string', description: \"Canonical field name to mark not-applicable (e.g. 'dependencies', 'codeReferences', 'apiContracts').\" },\n entityId: { type: 'string', description: 'The spec/epic/ticket id the field belongs to (resolved server-side; ids are unique across the spec).' },\n reason: { type: 'string', description: 'Why the field does not apply (must be at least 20 characters).' },\n },\n required: ['type', 'scope', 'entityId', 'reason'],\n },\n // unjustify — remove a previously declared N/A (clears fieldDeclarations[scope]).\n // A no-op if the scope was never justified. No reason (a delete is unconditional).\n {\n properties: {\n type: { const: 'unjustify' },\n scope: { type: 'string', description: 'Canonical field name whose not-applicable declaration to remove.' },\n entityId: { type: 'string', description: 'The spec/epic/ticket id the field belongs to.' },\n },\n required: ['type', 'scope', 'entityId'],\n },\n {\n // Read-only poll/resume. To read a single ticket, use the `get` tool (type:'ticket').\n properties: {\n type: { const: 'get_planning_status' },\n },\n required: ['type'],\n },\n ],\n },\n },\n required: ['operation'],\n },\n },\n {\n name: 'complete_planning_session',\n description: \"Complete the planning session and submit the spec for final review. Spec must be in 'planning' status. Runs the planning gate (consistency checks + readinessThreshold from project/spec settings). Transitions the spec directly to 'ready' on pass. Takes no arguments — the active planning session is injected from local config.\",\n inputSchema: {\n type: 'object',\n // No inputs: the active planning session (sessionId) is injected from\n // local config (.specforge/config.json). Do NOT pass sessionId/projectId/specificationId.\n properties: {},\n required: [],\n },\n },\n {\n name: 'start_work_session',\n description: \"Start working on a ticket. Returns full ticket details (description, implementation steps, AC, technicalDetails, codeReferences, typeReferences, tags, notes, complexity, priority) alongside checklistState and workSessionId. No need to call the `get` tool (type:'ticket') separately. Returns error with statusReason if ticket is pending.\",\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket to start',\n },\n },\n required: ['ticketId'],\n },\n },\n {\n name: 'action_work_session',\n description: `Update checklist state during an active WorkSession. Combines step completion, AC validation, test result reporting, file tracking, reference review confirmation, and discovery reporting into a single atomic operation. All state changes are recorded on the WorkSession and its related validation/completion records.\n\nUse this instead of reopening the planning session for checklist changes. Provides:\n- Step completion (individual or bulk via WorkSessionImplStepCompletion)\n- Acceptance criteria validation (individual or bulk via WorkSessionAcceptanceCheck)\n- Test result reporting (merged by test type via WorkSessionTestResult)\n- File tracking (created, modified, deleted on WorkSession)\n- Discovery reporting (create discoveries for blockers, bugs, tech debt)\n- Blocker management (set block reason; requires existing discovery)\n- Reference review tracking (codeSnippetsReviewed, typeReferencesReviewed)\n- Auto-calculated progress percentage\n- Completion readiness hints\n\nIMPORTANT: All acceptance criteria must be validated and all implementation steps must be completed via this tool before calling complete_work_session. The completion gate enforces this.\n\nIf the ticket has codeReferences or typeReferences, set codeSnippetsReviewed/typeReferencesReviewed to true after reviewing them — completion readiness will block until these are confirmed.\n\nSet getTicket: true to fetch full ticket details in the response — useful for re-reading ticket context mid-implementation. Can be the sole operation or combined with other actions.`,\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket being worked on (must be in active status)',\n },\n action: {\n type: 'object',\n description:\n 'The assay action to record — the AWS action vocabulary. `action` (the discriminator) is one of: mark_implementation_step_completion, mark_acceptance_check, record_test_result, add_skip_justification, amend_skip_justification, add_failure_justification, amend_failure_justification, record_file_change, add_file_change_justification, amend_file_change_justification, create_discovery (with `blocking`), update_discovery, set_discovery_resolved. Include `workSessionId` and the per-action fields. Forwarded verbatim as the lifecycle inner payload.',\n properties: {\n action: {\n type: 'string',\n enum: [\n 'mark_implementation_step_completion',\n 'mark_acceptance_check',\n 'record_test_result',\n 'add_skip_justification',\n 'amend_skip_justification',\n 'add_failure_justification',\n 'amend_failure_justification',\n 'record_file_change',\n 'add_file_change_justification',\n 'amend_file_change_justification',\n 'create_discovery',\n 'update_discovery',\n 'set_discovery_resolved',\n ],\n description: 'The AWS action discriminator.',\n },\n workSessionId: { type: 'string', description: 'The active WorkSession id (from start_work_session).' },\n },\n required: ['action'],\n },\n notes: {\n type: 'string',\n description: 'Additional notes to append to the ticket',\n },\n filesCreated: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files created during this session. Accumulated incrementally.',\n },\n filesModified: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files modified during this session. Accumulated incrementally.',\n },\n filesDeleted: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files deleted during this session. Accumulated incrementally.',\n },\n discovery: {\n type: 'object',\n description: 'Create a discovery (observation about the implementation). Use this to report blockers, bugs, tech debt, scope changes, etc.',\n properties: {\n description: { type: 'string', description: 'Description of the discovery' },\n type: { type: 'string', description: 'Discovery type: bug, tech_debt, blocker, clarification, scope_change, dependency, risk, ticket, epic' },\n severity: { type: 'string', description: 'Severity: blocker, critical, major, minor' },\n suggestedTitle: { type: 'string', description: 'Suggested title for the new ticket/epic' },\n suggestedPriority: { type: 'string', description: 'Suggested priority: high, medium, low' },\n relatedFiles: { type: 'array', items: { type: 'string' }, description: 'Related file paths' },\n notes: { type: 'string', description: 'Additional notes' },\n },\n required: ['description'],\n },\n blockReason: {\n type: 'string',\n description: 'Set a blocker on this ticket. Requires an existing discovery (create via discovery parameter first).',\n },\n getTicket: {\n type: 'boolean',\n description: 'Fetch full ticket details. Can be the sole operation or combined with other actions.',\n },\n includeFullContext: {\n type: 'boolean',\n description: 'Include full implementation context in response',\n },\n codeSnippetsReviewed: {\n type: 'boolean',\n description: 'Confirm that code snippets (codeReferences) on the ticket have been reviewed. Required before completion when the ticket has non-empty codeReferences.',\n },\n typeReferencesReviewed: {\n type: 'boolean',\n description: 'Confirm that type references (typeReferences) on the ticket have been reviewed. Required before completion when the ticket has non-empty typeReferences.',\n },\n },\n required: ['ticketId'],\n },\n },\n {\n name: 'complete_work_session',\n description:\n 'Mark a ticket as complete and finalize the active WorkSession. Transitions active -> done. Session data (files, test results, time) is stored on the WorkSession record.\\n\\n' +\n 'All acceptance criteria must be validated and all implementation steps must be completed via action_work_session before calling this. The completion gate enforces this — shortcuts are not available.\\n\\n' +\n 'Automatically recalculates status for dependent tickets and returns cascade info.\\n\\n' +\n 'Optional validation flags can be provided to report test results inline:\\n' +\n '- tests: Unit/integration test results\\n' +\n '- lint: Linting results\\n' +\n '- typeCheck: TypeScript type checking\\n' +\n '- build: Build/compilation results',\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket',\n },\n summary: {\n type: 'string',\n description: 'Summary of work completed',\n },\n filesModified: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files modified',\n },\n filesCreated: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files created',\n },\n filesDeleted: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of files deleted',\n },\n actualHours: {\n type: 'number',\n description: 'Actual hours spent on the ticket',\n },\n validation: {\n type: 'object',\n description: 'Detailed validation flags for reporting test/lint/build results',\n properties: {\n tests: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Unit/integration test results',\n },\n lint: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Linting results',\n },\n typeCheck: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'TypeScript type checking results',\n },\n build: {\n type: 'string',\n enum: ['passed', 'failed', 'partial', 'pending'],\n description: 'Build/compilation results',\n },\n notes: {\n type: 'string',\n description: 'Additional validation notes',\n },\n },\n },\n },\n required: ['ticketId', 'summary'],\n },\n },\n {\n name: 'reopen_specification',\n description: 'Reopen a specification in \"ready\" status, regressing to \"planning\". Use when action_planning_session reports the spec is no longer in planning. After reopening, call start_planning_session to begin a new planning session.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'The ID of the specification to reopen',\n },\n },\n required: ['specificationId'],\n },\n },\n\n // Spec creation is a HUMAN bootstrap step, NOT an agent MCP tool: specs are\n // created via `specforge init` (cli-rest surface), which also writes the new\n // spec id into the local config so the agent's per-call injection finds it.\n // The agent assumes the spec already exists and starts from\n // `start_planning_session`. (Backend keeps `create_specification` REST-only;\n // it was never dispatchable on /local.)\n\n // ========================================================================\n // Utilities (3)\n // ========================================================================\n {\n name: 'feedback',\n description: `Submit and manage feedback about MCP tools. Operations:\n- submit: Submit new feedback (requires category, summary)\n- list: List recent feedback entries\n- get: Get a specific feedback entry by ID`,\n inputSchema: {\n type: 'object',\n properties: {\n operation: {\n type: 'string',\n enum: ['submit', 'list', 'get'],\n description: 'The operation to perform',\n },\n // For submit operation\n category: {\n type: 'string',\n enum: ['bug', 'feature_request', 'usability', 'documentation', 'performance'],\n description: 'Feedback category (required for submit)',\n },\n summary: {\n type: 'string',\n description: 'Brief summary of the feedback (required for submit)',\n },\n severity: {\n type: 'string',\n enum: ['critical', 'high', 'medium', 'low'],\n description: 'Severity level (default: medium)',\n },\n tool: {\n type: 'string',\n description: 'Which MCP tool this relates to',\n },\n toolOperation: {\n type: 'string',\n description: 'Specific operation within the tool',\n },\n details: {\n type: 'string',\n description: 'Extended description',\n },\n expected: {\n type: 'string',\n description: 'Expected behavior',\n },\n actual: {\n type: 'string',\n description: 'Actual behavior',\n },\n errorMessage: {\n type: 'string',\n description: 'Error message if reporting a bug',\n },\n ticketId: {\n type: 'string',\n description: 'Related ticket ID',\n },\n // For list operation\n limit: {\n type: 'number',\n description: 'Maximum entries to return (default: 10)',\n },\n categoryFilter: {\n type: 'string',\n enum: ['bug', 'feature_request', 'usability', 'documentation', 'performance'],\n description: 'Filter by category',\n },\n // For get operation\n feedbackId: {\n type: 'string',\n description: 'Feedback ID to retrieve (required for get)',\n },\n },\n required: ['operation'],\n },\n },\n {\n name: 'link_pull_request',\n description: 'Associate a pull request with a ticket',\n inputSchema: {\n type: 'object',\n properties: {\n ticketId: {\n type: 'string',\n description: 'The ID of the ticket',\n },\n prNumber: {\n type: 'number',\n description: 'PR number (provide this or prUrl)',\n },\n prUrl: {\n type: 'string',\n description: 'Full PR URL (GitHub, GitLab, or Bitbucket)',\n },\n title: {\n type: 'string',\n description: 'PR title',\n },\n author: {\n type: 'string',\n description: 'PR author',\n },\n repoUrl: {\n type: 'string',\n description: 'Repository URL (required if using prNumber)',\n },\n },\n required: ['ticketId'],\n },\n },\n\n // ========================================================================\n // Orchestration (2)\n // ========================================================================\n {\n name: 'get_critical_path',\n description: 'Get the critical execution path for a specification.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'Specification ID',\n },\n },\n required: ['specificationId'],\n },\n },\n {\n name: 'get_dependency_tree',\n description: 'Get the full dependency tree for a specification.',\n inputSchema: {\n type: 'object',\n properties: {\n specificationId: {\n type: 'string',\n description: 'Specification ID',\n },\n },\n required: ['specificationId'],\n },\n },\n ];\n\n // Mark the work verbs as in_development — mirrors @specforge/core\n // getToolDefinitions so a mcp-local agent also gets the \"coming soon\" affordance\n // (calling them returns a typed stub) instead of believing they are stable.\n // The review lifecycle (SRS/ARS/CRS) was purged in M27.\n const IN_DEVELOPMENT_PLANNED_FOR: Record<string, string> = {\n start_work_session: '0.2.0',\n action_work_session: '0.2.0',\n complete_work_session: '0.2.0',\n };\n for (const t of tools) {\n const plannedFor = IN_DEVELOPMENT_PLANNED_FOR[t.name];\n if (plannedFor) {\n t.description =\n `**In development — ships with ${plannedFor}.** Calling returns a typed stub ` +\n `response the client should render as a \"coming soon\" affordance.\\n\\n${t.description}`;\n }\n }\n\n return tools;\n}\n\n/**\n * Tool handler type - processes arguments and returns a result\n */\ntype ToolHandler = (\n apiClient: ApiClient,\n args: Record<string, unknown>\n) => Promise<unknown>;\n\n/**\n * Retry configuration for transient failures\n */\nconst RETRY_CONFIG = {\n maxRetries: 3,\n initialDelayMs: 500,\n maxDelayMs: 5000,\n backoffMultiplier: 2,\n};\n\n/**\n * Transient error patterns that should trigger retry\n */\nconst TRANSIENT_ERROR_PATTERNS = [\n /ETIMEDOUT/i,\n /ECONNRESET/i,\n /ECONNREFUSED/i,\n /socket hang up/i,\n /network error/i,\n /too many requests/i,\n /rate limit/i,\n /5\\d{2}/, // 5xx status codes\n];\n\n/**\n * Check if an error is transient and should be retried\n */\nfunction isTransientError(error: Error): boolean {\n return TRANSIENT_ERROR_PATTERNS.some(pattern =>\n pattern.test(error.message)\n );\n}\n\n/**\n * Sleep for a given number of milliseconds\n */\nfunction sleep(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n/**\n * Execute a function with retry logic for transient failures\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n toolName: string,\n debug: boolean\n): Promise<T> {\n let lastError: Error | null = null;\n let delay = RETRY_CONFIG.initialDelayMs;\n\n for (let attempt = 1; attempt <= RETRY_CONFIG.maxRetries; attempt++) {\n try {\n return await fn();\n } catch (error) {\n lastError = error instanceof Error ? error : new Error(String(error));\n\n if (attempt < RETRY_CONFIG.maxRetries && isTransientError(lastError)) {\n if (debug) {\n console.error(\n `[DEBUG] Tool ${toolName} attempt ${attempt} failed with transient error, retrying in ${delay}ms:`,\n lastError.message\n );\n }\n await sleep(delay);\n delay = Math.min(delay * RETRY_CONFIG.backoffMultiplier, RETRY_CONFIG.maxDelayMs);\n } else {\n break;\n }\n }\n }\n\n throw lastError;\n}\n\n/**\n * Create tool handlers that call the API with proper request formatting\n *\n * @param apiClient - The API client to use for making requests\n * @returns Record of tool handlers keyed by tool name\n */\nexport function createToolHandlers(\n apiClient: ApiClient\n): Record<string, ToolHandler> {\n // Agent `/local` path (M9, approach A): the transport returns the raw M8 body;\n // interpret the envelope here. Lifecycle → unwrap to `agentResponse`; standard\n // error → throw the composed guidance prose (M9.3); raw success → pass through.\n const callLocal = async <T = unknown>(\n op: string,\n args: Record<string, unknown>,\n ): Promise<T> => {\n // SPECFORGE_DEBUG=true → trace the EXACT wire request/response for what a tool handler\n // forwards to /local after its arg-mapping (e.g. the inner `payload` shape\n // `action_work_session` sends). Prefers a file (SPECFORGE_DEBUG_FILE) since an MCP-serve\n // subprocess's stderr may be swallowed by the host; falls back to stderr (stdout is the\n // MCP JSON protocol and must stay clean).\n const debug = process.env.SPECFORGE_DEBUG === 'true';\n const debugFile = process.env.SPECFORGE_DEBUG_FILE;\n const trace = (line: string) => {\n if (!debug) return;\n if (debugFile) { try { appendFileSync(debugFile, line + '\\n'); return; } catch { /* fall through */ } }\n process.stderr.write(line + '\\n');\n };\n trace(`[cli:wire →] ${op} ${JSON.stringify(args)}`);\n const body = await apiClient.getTransport().execute<Record<string, unknown>>(op, args);\n trace(`[cli:wire ←] ${op} ${JSON.stringify(body).slice(0, 800)}`);\n if (body && typeof body === 'object') {\n if (body.kind === 'standard_error') {\n // M9.3: the error-guidance composer's `guidance.prose` is the canonical\n // agent-facing message (same verbatim convention as lifecycle guidance);\n // surface it for query-tool errors, falling back to `message` (and to a\n // generic line for INTERNAL, where guidance is always null).\n const guidance = body.guidance as { prose?: unknown } | null | undefined;\n const prose = guidance && typeof guidance.prose === 'string' ? guidance.prose : undefined;\n throw new Error(\n prose ?? (typeof body.message === 'string' ? body.message : `Operation failed: ${op}`),\n );\n }\n if (body.kind === 'lifecycle' && 'agentResponse' in body) {\n return body.agentResponse as T;\n }\n }\n return body as T;\n };\n\n return {\n // ========================================================================\n // Queries — forward the canonical super-tools straight through (the backend\n // owns the `type` dispatch; M9 dropped the old granular-op fan-out).\n // ========================================================================\n get: async (_client, args) => {\n if (!args.type) throw new Error('Missing required argument: type');\n // Project/spec ids inject from config when the agent omits them.\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n return await callLocal('get', withCtx);\n },\n\n list: async (_client, args) => {\n if (!args.type) throw new Error('Missing required argument: type');\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n return await callLocal('list', withCtx);\n },\n\n search: async (_client, args) => {\n if (!args.query && !args.files && !args.tags && !args.relatedTo) {\n throw new Error('At least one filter is required: query, files, tags, or relatedTo');\n }\n const withCtx = injectContext(args, ['projectId', 'specificationId']);\n if (!withCtx.projectId && !withCtx.specificationId && !withCtx.epicId) {\n throw new Error('One of projectId, specificationId, or epicId is required. Run \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('search', withCtx);\n },\n\n get_next_actionable_tickets: async (_client, args) => {\n // Inject projectId/specificationId from .specforge.json if not provided\n const argsWithContext = injectContext(args, ['projectId', 'specificationId']);\n\n // Either specificationId or projectId is required (after injection)\n if (!argsWithContext.specificationId && !argsWithContext.projectId) {\n throw new Error('Either specificationId or projectId is required. Set working context with \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('get_next_actionable_tickets', {\n specificationId: argsWithContext.specificationId,\n projectId: argsWithContext.projectId,\n limit: argsWithContext.limit ?? 5,\n });\n },\n\n get_blocked_tickets: async (_client, args) => {\n // Inject specificationId from .specforge.json if not provided\n const argsWithContext = injectContext(args, ['specificationId']);\n\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required. Set working context with \"specforge switch\" or provide explicitly.');\n }\n return await callLocal('get_blocked_tickets', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n get_report: async (_client, args) => {\n validateRequired(args, 'type', 'scope', 'scopeId');\n return await callLocal('get_report', {\n type: args.type,\n scope: args.scope,\n scopeId: args.scopeId,\n format: args.format ?? 'json',\n startDate: args.startDate,\n endDate: args.endDate,\n });\n },\n\n // ========================================================================\n // Lifecycle\n // ========================================================================\n // Planning lifecycle (M9.6b) — identity/session injected from the\n // `.specforge` config; SPS persists the session id, a `closed` status\n // clears it. Payloads match the post-M8 boundary (SPS {specificationId};\n // APS {sessionId, operation:{type,...}}; CPS {sessionId}).\n start_planning_session: async (_client, args) => {\n const cfg = tryLoadProjectConfig();\n const specificationId = (args.specificationId as string) ?? cfg?.specificationId;\n if (!specificationId) {\n throw new Error('No active specification. Run `specforge switch <spec-id>` or pass specificationId.');\n }\n // projectId is injected from local config (client-authoritative scope);\n // SPS no longer derives it server-side from the spec row.\n const projectId = (args.projectId as string) ?? cfg?.projectId;\n if (!projectId) {\n throw new Error('No active project. Run `specforge switch <spec-id>` or pass projectId.');\n }\n const agentResponse = await callLocal<{ sessionId?: string }>(\n 'start_planning_session',\n { projectId, specificationId },\n );\n if (agentResponse?.sessionId) {\n saveProjectConfig({ planningSessionId: agentResponse.sessionId });\n appendPlanningSessionRegistry({\n specificationId,\n planningSessionId: agentResponse.sessionId,\n startedAt: new Date().toISOString(),\n });\n }\n return agentResponse;\n },\n\n action_planning_session: async (_client, args) => {\n if (!args.operation || typeof args.operation !== 'object') {\n throw new Error('Missing required argument: operation (e.g. { type: \"get_planning_status\" })');\n }\n const cfg = tryLoadProjectConfig();\n const sessionId = (args.sessionId as string) ?? cfg?.planningSessionId;\n if (!sessionId) {\n throw new Error('No active planning session. Call start_planning_session first.');\n }\n const agentResponse = await callLocal<{ planningStatus?: string }>(\n 'action_planning_session',\n { sessionId, operation: args.operation },\n );\n // Close detection: clear the persisted session id once it closes.\n if (agentResponse?.planningStatus === 'closed' && cfg?.specificationId) {\n saveProjectConfig({ planningSessionId: undefined });\n markPlanningSessionRegistryCompleted({\n specificationId: cfg.specificationId,\n completedAt: new Date().toISOString(),\n });\n }\n return agentResponse;\n },\n\n complete_planning_session: async (_client, args) => {\n const cfg = tryLoadProjectConfig();\n const sessionId = (args.sessionId as string) ?? cfg?.planningSessionId;\n if (!sessionId) {\n throw new Error('No active planning session. Call start_planning_session first.');\n }\n // CPS-success flips to awaiting_human_review (not closed) — keep the id.\n // MB.10.5 — grep double-call. Pass-1 sends NO evidence: in cross_validation\n // the server may reply `evidence_required` with a `grepRequest` (the exact\n // paths it can't resolve spec-internally). Probe JUST those paths locally,\n // then re-call CPS with the existing subset injected as `existingFiles`\n // (pass-2, the committing verdict). Outside a worktree the probe returns []\n // → re-call with [] → strict verdict (never blocks a repo-less caller).\n // From the agent's view this stays ONE tool call: only pass-2 is returned.\n const first = await callLocal<{ outcome?: string; grepRequest?: { paths?: string[] } }>(\n 'complete_planning_session',\n { sessionId },\n );\n if (first?.outcome !== 'evidence_required') {\n return first;\n }\n const requested = Array.isArray(first.grepRequest?.paths) ? first.grepRequest.paths : [];\n const existingFiles = probeExistingFiles(requested);\n return await callLocal('complete_planning_session', { sessionId, existingFiles });\n },\n\n start_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId');\n // MCP-local git injection (M23.2): the CLM/agent runs on the worktree the\n // Lambda can't see, so THIS process reads the git evidence and injects it —\n // `gitClean` feeds the SWS git-clean precondition; `worktreePath`/`branch`\n // are persisted onto the WorkSession (M16.2). Provenance is `null` when the\n // agent is not inside a git worktree (SWS still records the session).\n const git = readWorktreeGitEvidence();\n return await callLocal('start_work_session', {\n ticketId: args.ticketId,\n gitClean: git.gitClean,\n worktreePath: git.worktreePath,\n branch: git.branch,\n });\n },\n\n action_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId');\n // The AWS action vocab (mark_implementation_step_completion / mark_acceptance_check /\n // record_test_result / add_*_justification / record_file_change / create_discovery\n // (with `blocking`) / update_discovery / set_discovery_resolved) rides in `action`\n // — the discriminated `AwsActionInput`. The CLI forwards it verbatim as the inner\n // `payload` (the work analog of action_planning_session forwarding `operation`);\n // the lifecycle dispatches on `payload.action`.\n return await callLocal('action_work_session', {\n ticketId: args.ticketId,\n payload: args.action ?? args.payload,\n });\n },\n\n complete_work_session: async (_client, args) => {\n validateRequired(args, 'ticketId', 'summary');\n // MCP-local git-commit binding (M23.2): the deployed Lambda has no worktree, so\n // THIS process reads the HEAD commit hash and injects it as `commitSha`. CWS's\n // git-evidence gate binds it onto the WorkSession and finalizes — without it a\n // passing session holds forever (\"commit your work first\"). `null` when the agent\n // is not inside a git worktree (the gate then holds, as intended for non-git callers).\n const commitSha = readHeadCommitSha();\n return await callLocal('complete_work_session', {\n ticketId: args.ticketId,\n summary: args.summary,\n filesModified: args.filesModified,\n filesCreated: args.filesCreated,\n filesDeleted: args.filesDeleted,\n actualHours: args.actualHours,\n validation: args.validation,\n ...(commitSha !== null && { commitSha }),\n });\n },\n\n reopen_specification: async (_client, args) => {\n const argsWithContext = injectContextRequired(args, ['specificationId']);\n return await callLocal('reopen_specification', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n // ========================================================================\n // Mutation\n // ========================================================================\n\n // ========================================================================\n // Utilities\n // ========================================================================\n feedback: async (_client, args) => {\n // M9.7: origin is server-derived from the `X-SpecForge-Origin` header\n // (default `mcp` on the agent transport) — never a request-body `source`.\n return await callLocal('feedback', args);\n },\n\n link_pull_request: async (_client, args) => {\n validateRequired(args, 'ticketId');\n if (!args.prNumber && !args.prUrl) {\n throw new Error('Either prNumber or prUrl must be provided');\n }\n return await callLocal('link_pull_request', {\n ticketId: args.ticketId,\n prNumber: args.prNumber,\n prUrl: args.prUrl,\n title: args.title,\n author: args.author,\n repoUrl: args.repoUrl,\n });\n },\n\n // ========================================================================\n // Orchestration\n // ========================================================================\n get_critical_path: async (_client, args) => {\n const argsWithContext = injectContext(args, ['specificationId']);\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required');\n }\n return await callLocal('get_critical_path', {\n specificationId: argsWithContext.specificationId,\n });\n },\n\n get_dependency_tree: async (_client, args) => {\n const argsWithContext = injectContext(args, ['specificationId']);\n if (!argsWithContext.specificationId) {\n throw new Error('specificationId is required');\n }\n return await callLocal('get_dependency_tree', {\n specificationId: argsWithContext.specificationId,\n });\n },\n };\n}\n\n/**\n * Validate that required arguments are present\n * @throws Error if any required argument is missing\n */\nfunction validateRequired(args: Record<string, unknown>, ...required: string[]): void {\n for (const field of required) {\n if (args[field] === undefined || args[field] === null || args[field] === '') {\n throw new Error(`Missing required argument: ${field}`);\n }\n }\n}\n\n// Create a cached instance of tool handlers\nlet cachedHandlers: Record<string, ToolHandler> | null = null;\n\n/**\n * Reset the cached tool handlers (for testing purposes)\n */\nexport function resetToolHandlers(): void {\n cachedHandlers = null;\n}\n\n/**\n * Handle a tool call by routing to the appropriate handler\n *\n * @param apiClient - The API client to use for making requests\n * @param toolName - Name of the tool being called\n * @param args - Arguments passed to the tool\n * @param debug - Whether to enable debug logging\n * @returns Promise resolving to the tool result\n */\nexport async function handleToolCall(\n apiClient: ApiClient,\n toolName: string,\n args: Record<string, unknown>,\n debug: boolean = false\n): Promise<unknown> {\n const startTime = Date.now();\n\n // Create handlers if not cached\n if (!cachedHandlers) {\n cachedHandlers = createToolHandlers(apiClient);\n }\n\n // Get the handler for this tool\n const handler = cachedHandlers[toolName];\n if (!handler) {\n throw new Error(`Unknown tool: ${toolName}`);\n }\n\n if (debug) {\n console.error(`[DEBUG] Calling tool: ${toolName}`, {\n args: JSON.stringify(args),\n });\n }\n\n try {\n // Run comprehensive validation before executing\n validateToolArgs(toolName, args);\n\n // Execute with retry logic\n const result = await withRetry(\n () => handler(apiClient, args),\n toolName,\n debug\n );\n\n const duration = Date.now() - startTime;\n if (debug) {\n console.error(`[DEBUG] Tool ${toolName} completed in ${duration}ms`);\n }\n\n return result;\n } catch (error) {\n const duration = Date.now() - startTime;\n\n // Transform error for proper handling\n const transformedError = transformError(error);\n const message = transformedError.message;\n\n if (debug) {\n console.error(`[DEBUG] Tool ${toolName} failed after ${duration}ms:`, message);\n if (transformedError instanceof ValidationError) {\n console.error(`[DEBUG] Validation field: ${transformedError.field}, code: ${transformedError.code}`);\n }\n }\n\n // Rethrow with context\n if (transformedError instanceof ValidationError) {\n throw transformedError;\n }\n if (transformedError instanceof ApiError) {\n throw transformedError;\n }\n throw new Error(`Tool ${toolName} failed: ${message}`);\n }\n}\n\n/**\n * Handle a tool call and return MCP-formatted response\n * This wraps handleToolCall with proper error formatting for MCP protocol\n */\nexport async function handleToolCallSafe(\n apiClient: ApiClient,\n toolName: string,\n args: Record<string, unknown>,\n debug: boolean = false\n): Promise<unknown | MCPErrorResponse> {\n try {\n return await handleToolCall(apiClient, toolName, args, debug);\n } catch (error) {\n const err = error instanceof Error ? error : new Error(String(error));\n return formatMCPError(err);\n }\n}\n\n// Re-export validation utilities for use by other modules\nexport {\n ValidationError,\n ApiError,\n validateToolArgs,\n formatMCPError,\n transformError,\n type MCPErrorResponse,\n} from '../validation/index.js';\n"],"mappings":"AAAA,SAAS,sBAAsB;AAS/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe,6BAA6B;AACrD,SAAS,0BAA0B;AACnC,SAAS,yBAAyB,yBAAyB;AAC3D,SAAS,sBAAsB,yBAAyB;AACxD;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAoBA,SAAS,WAAmB;AACjC,QAAM,QAAgB;AAAA;AAAA;AAAA;AAAA,IAIpB;AAAA,MACE,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,QACX,MAAM;AAAA,QACN,YAAY;AAAA,UACV,MAAM;AAAA,YACJ,MAAM;AAAA,YACN,MAAM,CAAC,WAAW,iBAAiB,QAAQ,UAAU,WAAW;AAAA,YAChE,aAAa;AAAA,UACf;AAAA,UACA,IAAI;AAAA,YACF,MAAM;AAAA,YACN,aAAa;AAAA,UACf;AAAA,QACF;A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Ae,WAAW,UAAU,MAAM,KAAK;AAAA,EAC9D,SAAS,OAAO;AACd,UAAM,MAAM,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;AACpE,WAAO,eAAe,GAAG;AAAA,EAC3B;AACF;AAGA;AAAA,EACE,mBAAAA;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AAAA,OAEK;","names":["ValidationError","ApiError","validateToolArgs","formatMCPError","transformError"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specforge/report-types",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "SpecForge status/analytic report types (specification/epic status, implementation/time/blockers). Embeds the canonical spec-domain entities (spec-types) + Project (api-types).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,16 +25,52 @@ export interface ResolvedStepFile {
|
|
|
25
25
|
symbol?: string;
|
|
26
26
|
why?: string;
|
|
27
27
|
}
|
|
28
|
+
/** A code/type snippet AUTHORED inline on a step (pre-id — the deterministic,
|
|
29
|
+
* ticket-scoped positional id is minted in `deriveSnippetsFromSteps`). */
|
|
30
|
+
export interface AuthoredSnippet {
|
|
31
|
+
content: string;
|
|
32
|
+
language: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
}
|
|
28
35
|
/** A fully-resolved implementation step after the batch is applied. */
|
|
29
36
|
export interface ResolvedStep {
|
|
30
37
|
id: string;
|
|
31
38
|
text: string;
|
|
32
39
|
order: number;
|
|
33
40
|
files: ResolvedStepFile[];
|
|
34
|
-
/** Snippet links PRESERVED off the current step (
|
|
35
|
-
* snippets
|
|
41
|
+
/** Snippet links PRESERVED off the current step (used when the batch does NOT
|
|
42
|
+
* author snippets — a text/file-only edit must not drop established links). */
|
|
36
43
|
linkedCodeSnippetIds: string[];
|
|
37
44
|
linkedTypeSnippetIds: string[];
|
|
45
|
+
/** Snippets AUTHORED on this step in the batch (MB.x — snippets-on-step). Empty
|
|
46
|
+
* unless the step's add/edit entry carried `codeSnippets`/`typeSnippets`. */
|
|
47
|
+
codeSnippets: AuthoredSnippet[];
|
|
48
|
+
typeSnippets: AuthoredSnippet[];
|
|
49
|
+
}
|
|
50
|
+
/** Ticket-level snippet rows + inherent step↔snippet joins derived from steps. */
|
|
51
|
+
export interface DerivedSnippets {
|
|
52
|
+
codeRows: Array<{
|
|
53
|
+
id: string;
|
|
54
|
+
content: string;
|
|
55
|
+
language: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
order: number;
|
|
58
|
+
}>;
|
|
59
|
+
typeRows: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
content: string;
|
|
62
|
+
language: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
order: number;
|
|
65
|
+
}>;
|
|
66
|
+
codeLinks: Array<{
|
|
67
|
+
stepId: string;
|
|
68
|
+
codeSnippetId: string;
|
|
69
|
+
}>;
|
|
70
|
+
typeLinks: Array<{
|
|
71
|
+
stepId: string;
|
|
72
|
+
typeSnippetId: string;
|
|
73
|
+
}>;
|
|
38
74
|
}
|
|
39
75
|
/** A fully-resolved acceptance criterion after the batch is applied. */
|
|
40
76
|
export interface ResolvedCriterion {
|
|
@@ -81,11 +117,15 @@ export interface StepBatch {
|
|
|
81
117
|
add?: Array<{
|
|
82
118
|
text?: unknown;
|
|
83
119
|
files?: unknown;
|
|
120
|
+
codeSnippets?: unknown;
|
|
121
|
+
typeSnippets?: unknown;
|
|
84
122
|
}>;
|
|
85
123
|
edit?: Array<{
|
|
86
124
|
stepId?: unknown;
|
|
87
125
|
text?: unknown;
|
|
88
126
|
files?: unknown;
|
|
127
|
+
codeSnippets?: unknown;
|
|
128
|
+
typeSnippets?: unknown;
|
|
89
129
|
}>;
|
|
90
130
|
remove?: unknown[];
|
|
91
131
|
reorder?: unknown[];
|
|
@@ -137,6 +177,16 @@ export declare function applyCriteriaBatch(ticketId: string, currentCriteria: re
|
|
|
137
177
|
* — the kind-embedded `deriveFileChangeId` trap is gone.
|
|
138
178
|
*/
|
|
139
179
|
export declare function deriveFileChangesFromSteps(ticketId: string, steps: readonly ResolvedStep[]): DerivedFileChanges;
|
|
180
|
+
/**
|
|
181
|
+
* Derive the ticket-level `TicketCodeSnippet`/`TicketTypeSnippet` rows + inherent
|
|
182
|
+
* step↔snippet joins from the snippets AUTHORED inline on the resolved steps.
|
|
183
|
+
* Snippets are flattened across steps in step order and given the deterministic,
|
|
184
|
+
* ticket-scoped positional ids (`${ticketId}-cs-${i}` / `-ts-${i}`) the persistence
|
|
185
|
+
* decompose + projection share (MB.15.3). The join is inherent: each snippet links
|
|
186
|
+
* the step that authored it. Returns empty arrays when no step authored snippets —
|
|
187
|
+
* the caller then leaves the ticket's existing snippet set untouched.
|
|
188
|
+
*/
|
|
189
|
+
export declare function deriveSnippetsFromSteps(ticketId: string, steps: readonly ResolvedStep[]): DerivedSnippets;
|
|
140
190
|
/** ME.19.1 (D8/D17) — one `apply_creator_election` move: put `path` at `role`
|
|
141
191
|
* (normally `creates` — the elected ticket becomes the file's creator) onto its
|
|
142
192
|
* producing step (an existing `stepId`, else a NEW `text` step). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-verb-steps.d.ts","sourceRoot":"","sources":["../../src/schema/node-verb-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"node-verb-steps.d.ts","sourceRoot":"","sources":["../../src/schema/node-verb-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;2EAC2E;AAC3E,MAAM,W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AAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B,CAiBA"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* join is INHERENT (each step links exactly the files it declares) — killing the
|
|
19
19
|
* old "resolve a produced path against a separate `filesToBe*` array" trap.
|
|
20
20
|
*/
|
|
21
|
-
import { deriveFileChangeId, deriveStepId } from './step-link-ids.js';
|
|
21
|
+
import { deriveFileChangeId, deriveStepId, deriveCodeSnippetId, deriveTypeSnippetId, } from './step-link-ids.js';
|
|
22
22
|
/** Role precedence for path dedup: a path is ONE `TicketFileChange` row (path-only
|
|
23
23
|
* id), so when the same path carries several roles across steps the
|
|
24
24
|
* highest-precedence role wins — deterministic (create > modify > delete >
|
|
@@ -49,6 +49,27 @@ function normalizeFiles(files) {
|
|
|
49
49
|
}
|
|
50
50
|
return out;
|
|
51
51
|
}
|
|
52
|
+
/** Normalize an inline snippet array (`codeSnippets`/`typeSnippets`) authored on a
|
|
53
|
+
* step. Drops entries without content; language defaults to `'text'`. Ids are
|
|
54
|
+
* minted later (positional, ticket-scoped) in `deriveSnippetsFromSteps`. */
|
|
55
|
+
function normalizeSnippets(input) {
|
|
56
|
+
if (!Array.isArray(input))
|
|
57
|
+
return [];
|
|
58
|
+
const out = [];
|
|
59
|
+
for (const s of input) {
|
|
60
|
+
if (!s || typeof s !== 'object')
|
|
61
|
+
continue;
|
|
62
|
+
const o = s;
|
|
63
|
+
if (typeof o['content'] !== 'string' || !o['content'])
|
|
64
|
+
continue;
|
|
65
|
+
out.push({
|
|
66
|
+
content: o['content'],
|
|
67
|
+
language: typeof o['language'] === 'string' && o['language'] ? o['language'] : 'text',
|
|
68
|
+
...(typeof o['description'] === 'string' ? { description: o['description'] } : {}),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
52
73
|
/** Reconstruct a step's authored `files[]` from its recomposed `linkedFileIds`
|
|
53
74
|
* resolved against the ticket's `fileChangeRefs` sidecar — so an EDIT that does
|
|
54
75
|
* not re-declare files preserves the step's existing file roles. */
|
|
@@ -84,6 +105,8 @@ export function applyStepBatch(ticketId, currentSteps, refsById, batch) {
|
|
|
84
105
|
files: currentStepFiles(s, refsById),
|
|
85
106
|
linkedCodeSnippetIds: [...(s.linkedCodeSnippetIds ?? [])],
|
|
86
107
|
linkedTypeSnippetIds: [...(s.linkedTypeSnippetIds ?? [])],
|
|
108
|
+
codeSnippets: [],
|
|
109
|
+
typeSnippets: [],
|
|
87
110
|
}));
|
|
88
111
|
for (const e of batch.edit ?? []) {
|
|
89
112
|
const stepId = typeof e?.stepId === 'string' ? e.stepId : '';
|
|
@@ -96,6 +119,10 @@ export function applyStepBatch(ticketId, currentSteps, refsById, batch) {
|
|
|
96
119
|
st.text = e.text;
|
|
97
120
|
if (Array.isArray(e.files))
|
|
98
121
|
st.files = normalizeFiles(e.files);
|
|
122
|
+
if (Array.isArray(e.codeSnippets))
|
|
123
|
+
st.codeSnippets = normalizeSnippets(e.codeSnippets);
|
|
124
|
+
if (Array.isArray(e.typeSnippets))
|
|
125
|
+
st.typeSnippets = normalizeSnippets(e.typeSnippets);
|
|
99
126
|
}
|
|
100
127
|
if (Array.isArray(batch.remove) && batch.remove.length > 0) {
|
|
101
128
|
const rm = new Set(batch.remove.filter((x) => typeof x === 'string'));
|
|
@@ -108,6 +135,8 @@ export function applyStepBatch(ticketId, currentSteps, refsById, batch) {
|
|
|
108
135
|
files: normalizeFiles(a?.files),
|
|
109
136
|
linkedCodeSnippetIds: [],
|
|
110
137
|
linkedTypeSnippetIds: [],
|
|
138
|
+
codeSnippets: normalizeSnippets(a?.codeSnippets),
|
|
139
|
+
typeSnippets: normalizeSnippets(a?.typeSnippets),
|
|
111
140
|
});
|
|
112
141
|
}
|
|
113
142
|
if (Array.isArray(batch.reorder) && batch.reorder.length > 0) {
|
|
@@ -134,6 +163,8 @@ export function applyStepBatch(ticketId, currentSteps, refsById, batch) {
|
|
|
134
163
|
files: s.files,
|
|
135
164
|
linkedCodeSnippetIds: s.linkedCodeSnippetIds,
|
|
136
165
|
linkedTypeSnippetIds: s.linkedTypeSnippetIds,
|
|
166
|
+
codeSnippets: s.codeSnippets,
|
|
167
|
+
typeSnippets: s.typeSnippets,
|
|
137
168
|
}));
|
|
138
169
|
}
|
|
139
170
|
/**
|
|
@@ -242,6 +273,35 @@ export function deriveFileChangesFromSteps(ticketId, steps) {
|
|
|
242
273
|
}
|
|
243
274
|
return { rows, stepLinks };
|
|
244
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Derive the ticket-level `TicketCodeSnippet`/`TicketTypeSnippet` rows + inherent
|
|
278
|
+
* step↔snippet joins from the snippets AUTHORED inline on the resolved steps.
|
|
279
|
+
* Snippets are flattened across steps in step order and given the deterministic,
|
|
280
|
+
* ticket-scoped positional ids (`${ticketId}-cs-${i}` / `-ts-${i}`) the persistence
|
|
281
|
+
* decompose + projection share (MB.15.3). The join is inherent: each snippet links
|
|
282
|
+
* the step that authored it. Returns empty arrays when no step authored snippets —
|
|
283
|
+
* the caller then leaves the ticket's existing snippet set untouched.
|
|
284
|
+
*/
|
|
285
|
+
export function deriveSnippetsFromSteps(ticketId, steps) {
|
|
286
|
+
const out = { codeRows: [], typeRows: [], codeLinks: [], typeLinks: [] };
|
|
287
|
+
let ci = 0;
|
|
288
|
+
let ti = 0;
|
|
289
|
+
for (const step of steps) {
|
|
290
|
+
for (const s of step.codeSnippets ?? []) {
|
|
291
|
+
const id = deriveCodeSnippetId(ticketId, ci);
|
|
292
|
+
out.codeRows.push({ id, content: s.content, language: s.language, ...(s.description !== undefined ? { description: s.description } : {}), order: ci });
|
|
293
|
+
out.codeLinks.push({ stepId: step.id, codeSnippetId: id });
|
|
294
|
+
ci += 1;
|
|
295
|
+
}
|
|
296
|
+
for (const s of step.typeSnippets ?? []) {
|
|
297
|
+
const id = deriveTypeSnippetId(ticketId, ti);
|
|
298
|
+
out.typeRows.push({ id, content: s.content, language: s.language, ...(s.description !== undefined ? { description: s.description } : {}), order: ti });
|
|
299
|
+
out.typeLinks.push({ stepId: step.id, typeSnippetId: id });
|
|
300
|
+
ti += 1;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return out;
|
|
304
|
+
}
|
|
245
305
|
/**
|
|
246
306
|
* Resolve an `apply_creator_election` batch for ONE creator ticket onto its steps:
|
|
247
307
|
* flip each elected file's role onto its producing step (MERGING with the step's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-verb-steps.js","sourceRoot":"","sources":["../../src/schema/node-verb-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAqCtE;;;sBAGsB;AACtB,MAAM,SAAS,GAA2B;IACxC,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,MAAM,GAAG,GAAuB,EAAE,CAAC;IACnC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,SAAS;QAC1C,MAAM,CAAC,GAAG,CAA4B,CAAC;QACvC,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;YAAE,SAAS;QAC1D,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,C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AO,CAAC,CAAC,EAAE,KAAK,QAAQ;YAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;0DAC0D;AAC1D,MAAM,UAAU,iBAAiB,CAAC,IAA+C;IAM/E,MAAM,GAAG,GAAG;QACV,gBAAgB,EAAE,EAAc;QAChC,iBAAiB,EAAE,EAAc;QACjC,gBAAgB,EAAE,EAAc;QAChC,mBAAmB,EAAE,EAAc;KACpC,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;YACf,KAAK,SAAS;gBAAE,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;YACzD,KAAK,UAAU;gBAAE,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;YAC3D,KAAK,SAAS;gBAAE,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;YACzD,KAAK,SAAS;gBAAE,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;YAC5D,KAAK,OAAO;gBAAE,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAC,MAAM;QAC5D,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specforge/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "MCP server for SpecForge - AI agent integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"ora": "^8.2.0",
|
|
20
20
|
"zod": "^3.22.0",
|
|
21
21
|
"@specforge/api-types": "0.4.14",
|
|
22
|
-
"@specforge/report-types": "0.4.
|
|
22
|
+
"@specforge/report-types": "0.4.4",
|
|
23
23
|
"@specforge/session-types": "0.4.13",
|
|
24
|
-
"@specforge/spec-types": "0.4.
|
|
24
|
+
"@specforge/spec-types": "0.4.14"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/inquirer": "^9.0.9",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"tsx": "^4.7.0",
|
|
34
34
|
"typescript": "^5.0.0",
|
|
35
35
|
"vitest": "4.0.18",
|
|
36
|
-
"@specforge/lifecycle": "0.3.
|
|
36
|
+
"@specforge/lifecycle": "0.3.14"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=18.0.0"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@specforge/session-types",
|
|
62
62
|
"@specforge/report-types"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "ed5a3ed20616a962d74564ba4e98d429b9da27d4",
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "tsup && tsc --emitDeclarationOnly --outDir dist",
|
|
67
67
|
"typecheck": "tsc --noEmit",
|