@aviaratech/ai-delivery 0.3.42 → 0.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/agentReadiness.test.js +15 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/contributorChecks.test.js +4 -1
- package/dist/contributorChecks.test.js.map +2 -2
- package/dist/currentConsumer.test.js +3 -2
- package/dist/currentConsumer.test.js.map +2 -2
- package/dist/currentTrackingScenario.test.js +3 -2
- package/dist/currentTrackingScenario.test.js.map +2 -2
- package/dist/fixtures/builderReady.d.ts +82 -0
- package/dist/fixtures/builderReady.js +56 -0
- package/dist/fixtures/builderReady.js.map +7 -0
- package/dist/fixtures/inertTarget.d.ts +75 -0
- package/dist/fixtures/inertTarget.js +20 -15
- package/dist/fixtures/inertTarget.js.map +2 -2
- package/dist/fixtures/issue63.d.ts +96 -0
- package/dist/fixtures/issue63.js +21 -2
- package/dist/fixtures/issue63.js.map +2 -2
- package/dist/issue.d.ts +2 -1
- package/dist/issue.js +55 -17
- package/dist/issue.js.map +2 -2
- package/dist/issue63Routes.test.js +3 -3
- package/dist/issue63Routes.test.js.map +2 -2
- package/dist/issueBlockerGuard.test.js +5 -5
- package/dist/issueBlockerGuard.test.js.map +2 -2
- package/dist/issueContract.d.ts +240 -2
- package/dist/issueContract.js +136 -19
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.d.ts +20 -0
- package/dist/issueContract.test.js +210 -13
- package/dist/issueContract.test.js.map +2 -2
- package/dist/issueDates.test.js +5 -6
- package/dist/issueDates.test.js.map +2 -2
- package/dist/issueInfoReadback.test.js +64 -0
- package/dist/issueInfoReadback.test.js.map +2 -2
- package/dist/issueIntake.test.js +173 -35
- package/dist/issueIntake.test.js.map +2 -2
- package/dist/issueWriteRecovery.test.js +12 -12
- package/dist/issueWriteRecovery.test.js.map +2 -2
- package/dist/mcp/tools.d.ts +147 -2
- package/dist/mcp/tools.js +2 -2
- package/dist/mcp/tools.js.map +2 -2
- package/dist/pluginPackaging.test.js +6 -3
- package/dist/pluginPackaging.test.js.map +2 -2
- package/dist/readView.d.ts +1 -0
- package/dist/releaseWorkflow.test.js +2 -2
- package/dist/releaseWorkflow.test.js.map +2 -2
- package/dist/review.d.ts +8 -0
- package/dist/review.js +30 -2
- package/dist/review.js.map +2 -2
- package/dist/review.test.js +64 -1
- package/dist/review.test.js.map +2 -2
- package/dist/services/agentReadinessService.d.ts +2 -1
- package/dist/services/agentReadinessService.js +6 -0
- package/dist/services/agentReadinessService.js.map +2 -2
- package/dist/stdoutRegression.test.js +27 -15
- package/dist/stdoutRegression.test.js.map +2 -2
- package/dist/targetRepositoryExecution.test.js +11 -3
- package/dist/targetRepositoryExecution.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +117 -111
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +1 -11
- package/plugins/ai-delivery/skills/ticket-design/SKILL.md +29 -0
|
@@ -3,7 +3,7 @@ import { test } from "vitest";
|
|
|
3
3
|
import { createIssue, CreatedTrackingIssueError, canonicalIssueBody } from "./issue.js";
|
|
4
4
|
import { issue63Fixture } from "./fixtures/issue63.js";
|
|
5
5
|
import { parseIssueBody, validateIssue } from "./issueContract.js";
|
|
6
|
-
import { inertTarget, fixtureFields } from "./fixtures/inertTarget.js";
|
|
6
|
+
import { inertTarget, fixtureFields, createFields } from "./fixtures/inertTarget.js";
|
|
7
7
|
function fixture() {
|
|
8
8
|
const f = issue63Fixture();
|
|
9
9
|
let parent = null;
|
|
@@ -81,7 +81,7 @@ function fixture() {
|
|
|
81
81
|
const intent = { opId: "synthetic-187", parentIssueNumber: 19, blockedBy: [18] };
|
|
82
82
|
test("create establishes Project status before parent and blockers and reuses completed opId", async () => {
|
|
83
83
|
const f = fixture();
|
|
84
|
-
const input = { ...f.
|
|
84
|
+
const input = { ...f.createInput, ...intent };
|
|
85
85
|
const result = await createIssue(f.context, input);
|
|
86
86
|
assert.equal(result.created.number, 20);
|
|
87
87
|
assert.equal(f.parent(), 19);
|
|
@@ -96,7 +96,7 @@ test("create establishes Project status before parent and blockers and reuses co
|
|
|
96
96
|
test("same opId completes a failed dependency step once and identifies remaining work", async () => {
|
|
97
97
|
const f = fixture();
|
|
98
98
|
f.controls.failAdd = true;
|
|
99
|
-
const input = { ...f.
|
|
99
|
+
const input = { ...f.createInput, ...intent };
|
|
100
100
|
await assert.rejects(createIssue(f.context, input), (error) => {
|
|
101
101
|
assert.ok(error instanceof CreatedTrackingIssueError);
|
|
102
102
|
assert.equal(error.created.number, 20);
|
|
@@ -113,13 +113,13 @@ test("same opId completes a failed dependency step once and identifies remaining
|
|
|
113
113
|
test("opId refuses changed intent, duplicate markers and foreign authors without writes", async () => {
|
|
114
114
|
for (const mode of ["intent", "duplicate", "author"]) {
|
|
115
115
|
const f = fixture();
|
|
116
|
-
const input = { ...f.
|
|
116
|
+
const input = { ...f.createInput, ...intent };
|
|
117
117
|
await createIssue(f.context, input);
|
|
118
118
|
if (mode === "duplicate") f.rows.set(21, { ...f.rows.get(20), number: 21 });
|
|
119
119
|
if (mode === "author") Object.assign(f.rows.get(20), { user: { login: "someone-else" } });
|
|
120
120
|
const writes = [...f.writes];
|
|
121
121
|
await assert.rejects(
|
|
122
|
-
createIssue(f.context, { ...input, ...mode === "intent" ? { priority: "
|
|
122
|
+
createIssue(f.context, { ...input, ...mode === "intent" ? { priority: "Low" } : {} }),
|
|
123
123
|
/conflict|author/iu
|
|
124
124
|
);
|
|
125
125
|
assert.deepEqual(f.writes, writes);
|
|
@@ -145,7 +145,7 @@ test.each(["project", "acknowledgement"])(
|
|
|
145
145
|
"same opId resumes after %s failure without another issue",
|
|
146
146
|
async (stage) => {
|
|
147
147
|
const f = fixture();
|
|
148
|
-
const input = { ...f.
|
|
148
|
+
const input = { ...f.createInput, ...intent };
|
|
149
149
|
f.recovery.failProject = stage === "project";
|
|
150
150
|
f.recovery.lostCreateResponse = stage === "acknowledgement";
|
|
151
151
|
await assert.rejects(
|
|
@@ -170,7 +170,7 @@ test.each(["completed", "partial"])(
|
|
|
170
170
|
["103", "2026-02-02"]
|
|
171
171
|
]) {
|
|
172
172
|
const f = fixture();
|
|
173
|
-
const input = { ...f.
|
|
173
|
+
const input = { ...f.createInput, ...intent, priority: "High", startDate: "2026-01-01" };
|
|
174
174
|
f.controls.failAdd = stage === "partial";
|
|
175
175
|
if (stage === "partial") await assert.rejects(createIssue(f.context, input));
|
|
176
176
|
else await createIssue(f.context, input);
|
|
@@ -186,7 +186,7 @@ test.each(["completed", "partial"])(
|
|
|
186
186
|
test("partial create reports only the requested remaining operations", async () => {
|
|
187
187
|
const f = fixture();
|
|
188
188
|
f.recovery.failProject = true;
|
|
189
|
-
await assert.rejects(createIssue(f.context, { ...f.
|
|
189
|
+
await assert.rejects(createIssue(f.context, { ...f.createInput, opId: "synthetic-simple" }), (error) => {
|
|
190
190
|
assert.ok(error instanceof CreatedTrackingIssueError);
|
|
191
191
|
assert.deepEqual(error.remainingSteps, ["project", "readback"]);
|
|
192
192
|
return true;
|
|
@@ -194,7 +194,7 @@ test("partial create reports only the requested remaining operations", async ()
|
|
|
194
194
|
});
|
|
195
195
|
test("same opId preserves independently added closed blocker relationships", async () => {
|
|
196
196
|
const f = fixture();
|
|
197
|
-
const input = { ...f.
|
|
197
|
+
const input = { ...f.createInput, ...intent };
|
|
198
198
|
await createIssue(f.context, input);
|
|
199
199
|
f.rows.get(19).state = "closed";
|
|
200
200
|
f.edges.get(20).add(19);
|
|
@@ -224,8 +224,8 @@ for (const mode of ["partial", "epic"]) {
|
|
|
224
224
|
}
|
|
225
225
|
return result;
|
|
226
226
|
};
|
|
227
|
-
const { points: _points, ...unsized } =
|
|
228
|
-
const input = { ...mode === "epic" ? { ...unsized, epic: true } :
|
|
227
|
+
const { points: _points, priority: _priority, ...unsized } = createFields;
|
|
228
|
+
const input = { ...mode === "epic" ? { ...unsized, epic: true } : createFields, opId: `synthetic-mcp-${mode}` };
|
|
229
229
|
const connection = await f.connect();
|
|
230
230
|
try {
|
|
231
231
|
if (mode === "partial") {
|
|
@@ -279,7 +279,7 @@ test("MCP create with a fresh opId on a busy repository creates, and a same-opId
|
|
|
279
279
|
};
|
|
280
280
|
const originalGet = f.rest.issues.get;
|
|
281
281
|
f.rest.issues.get = async (input2) => ({ data: { ...(await originalGet(input2)).data, user: { login: "operator" } } });
|
|
282
|
-
const input = { ...
|
|
282
|
+
const input = { ...createFields, opId: "synthetic-busy-repo" };
|
|
283
283
|
const connection = await f.connect();
|
|
284
284
|
try {
|
|
285
285
|
const first = await connection.call("issue_create", input);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/issueWriteRecovery.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { createIssue, CreatedTrackingIssueError, canonicalIssueBody } from './issue.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\nimport { parseIssueBody, validateIssue } from './issueContract.js';\nimport { inertTarget, fixtureFields } from './fixtures/inertTarget.js';\n\nfunction fixture() {\n const f = issue63Fixture();\n let parent: number | null = null;\n let parentCleared = false;\n const nativeValues = new Map<number, Record<string, string>>();\n const rest = f.context.clients.rest;\n const originalRequest = rest.request.bind(rest);\n const originalGraphql = f.context.clients.graphql;\n const recovery = { member: false, failProject: false, lostCreateResponse: false };\n rest.paginate = (async () => (parent === 19 ? [f.rows.get(20)!] : [])) as unknown as typeof rest.paginate;\n rest.issues.addSubIssue = (async () => {\n f.writes.push('parent');\n parent = 19;\n return { data: {} };\n }) as unknown as typeof rest.issues.addSubIssue;\n rest.request = (async (\n route: string,\n args: { issue_number?: number; issue_field_values?: { field_id: number; value: string }[] },\n ) => {\n if (route.includes('/orgs/')) {\n const result = await originalRequest(route, args);\n return { data: [...(result.data as unknown[]), { id: 103, name: 'Start date', data_type: 'date' }] };\n }\n if (args.issue_number === 20) {\n const values = nativeValues.get(20)!;\n if (route.startsWith('POST')) {\n f.writes.push('metadata');\n for (const field of args.issue_field_values ?? []) values[String(field.field_id)] = field.value;\n }\n return {\n data: Object.entries(values).map(([id, value]) => ({\n issue_field_id: Number(id),\n issue_field_name: id === '101' ? 'Estimate' : id === '102' ? 'Urgency' : 'Start date',\n data_type: id === '103' ? 'date' : 'single_select',\n value,\n })),\n };\n }\n if (route.startsWith('DELETE')) {\n parentCleared = true;\n return { data: [] };\n }\n if (parentCleared && args.issue_number === 19) return { data: [] };\n return originalRequest(route, args);\n }) as typeof rest.request;\n f.context.clients.graphql = (async (query: string, variables: Record<string, unknown>) => {\n if (query.includes('AddProjectDeliveryItem')) {\n recovery.member = true;\n f.writes.push('membership');\n return { addProjectV2ItemById: { item: { id: 'ITEM20' } } };\n }\n if (query.includes('UpdateProjectDeliveryStatus') && recovery.failProject)\n throw new Error('Synthetic Project write failure');\n const result = (await originalGraphql(query, variables)) as {\n repository: { issue: { parent: unknown; blockedBy: { nodes: { number: number; state: string }[] } } };\n node: { projectItems: { nodes: { id: string }[] } };\n };\n if (query.includes('ProjectDeliveryIssueItems') && !recovery.member)\n result.node.projectItems.nodes = result.node.projectItems.nodes.filter((row) => row.id !== 'ITEM20');\n if (query.includes('blockedBy(first:'))\n for (const blocker of result.repository.issue.blockedBy.nodes)\n blocker.state = f.rows.get(blocker.number)!.state.toUpperCase();\n if (query.includes('blockedBy(first:') && variables.number === 20 && parent !== null)\n result.repository.issue.parent = {\n id: 'ISSUE19',\n number: parent,\n repository: { nameWithOwner: 'example/widget' },\n };\n return result;\n }) as typeof originalGraphql;\n const originalCreate = rest.issues.create.bind(rest.issues);\n rest.issues.create = (async (input: Parameters<typeof originalCreate>[0]) => {\n const result = await originalCreate(input);\n Object.assign(f.rows.get(result.data.number)!, { user: { login: 'operator' } });\n nativeValues.set(result.data.number, {});\n if (recovery.lostCreateResponse) throw new Error('Synthetic lost creation response');\n return result;\n }) as typeof rest.issues.create;\n return { ...f, recovery, nativeValues, parent: () => parent };\n}\n\nconst intent = { opId: 'synthetic-187', parentIssueNumber: 19, blockedBy: [18] };\n\ntest('create establishes Project status before parent and blockers and reuses completed opId', async () => {\n const f = fixture();\n const input = { ...f.ready, ...intent };\n const result = await createIssue(f.context, input);\n assert.equal(result.created.number, 20);\n assert.equal(f.parent(), 19);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.ok(f.writes.indexOf('membership') < f.writes.indexOf('status'));\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('parent'));\n const writes = [...f.writes];\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.deepEqual(f.writes, writes, 'a completed retry must not repeat native writes');\n});\n\ntest('same opId completes a failed dependency step once and identifies remaining work', async () => {\n const f = fixture();\n f.controls.failAdd = true;\n const input = { ...f.ready, ...intent };\n await assert.rejects(createIssue(f.context, input), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.equal(error.created.number, 20);\n assert.match(error.message, /blockers/u);\n assert.match(error.message, /opId/u);\n return true;\n });\n f.controls.failAdd = false;\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.equal(f.writes.filter((x) => x === 'parent').length, 1);\n assert.equal(f.writes.filter((x) => x === 'add').length, 1);\n});\n\ntest('opId refuses changed intent, duplicate markers and foreign authors without writes', async () => {\n for (const mode of ['intent', 'duplicate', 'author'] as const) {\n const f = fixture();\n const input = { ...f.ready, ...intent };\n await createIssue(f.context, input);\n if (mode === 'duplicate') f.rows.set(21, { ...f.rows.get(20)!, number: 21 });\n if (mode === 'author') Object.assign(f.rows.get(20)!, { user: { login: 'someone-else' } });\n const writes = [...f.writes];\n await assert.rejects(\n createIssue(f.context, { ...input, ...(mode === 'intent' ? { priority: 'High' } : {}) }),\n /conflict|author/iu,\n );\n assert.deepEqual(f.writes, writes);\n }\n});\n\ntest('epic true is an unsized Ready contract and survives canonical roundtrip', () => {\n const f = fixture();\n const { points: _points, ...ready } = f.ready;\n const result = validateIssue({ ...ready, issueType: 'Feature', epic: true }, true);\n assert.equal(result.failures.length, 0, JSON.stringify(result.failures));\n assert.ok(result.issue);\n // Canonical body generation must not force an epic to become a parked draft.\n const input = { ...ready, issueType: 'Feature', epic: true as const };\n const body = canonicalIssueBody(input);\n assert.match(body, /## Status\\n\\nReady/u);\n assert.doesNotMatch(body, /Draft \u2014 parked/u);\n assert.equal(Reflect.get(parseIssueBody(body, { title: ready.title }).issue, 'epic'), true);\n assert.equal(\n validateIssue(ready, true).failures.some((x) => x.code === 'points'),\n true,\n );\n});\n\ntest.each(['project', 'acknowledgement'] as const)(\n 'same opId resumes after %s failure without another issue',\n async (stage) => {\n const f = fixture();\n const input = { ...f.ready, ...intent };\n f.recovery.failProject = stage === 'project';\n f.recovery.lostCreateResponse = stage === 'acknowledgement';\n await assert.rejects(\n createIssue(f.context, input),\n stage === 'project' ? /Failed step: project/u : /lost creation response/u,\n );\n f.recovery.failProject = false;\n f.recovery.lostCreateResponse = false;\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.equal(f.writes.filter((x) => x === 'membership').length, 1);\n assert.equal(f.parent(), 19);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n },\n);\n\ntest.each(['completed', 'partial'] as const)(\n 'create retry preserves independently changed native values after %s operation',\n async (stage) => {\n for (const [field, value] of [\n ['101', '4'],\n ['102', 'Low'],\n ['103', '2026-02-02'],\n ] as const) {\n const f = fixture();\n const input = { ...f.ready, ...intent, priority: 'High', startDate: '2026-01-01' };\n f.controls.failAdd = stage === 'partial';\n if (stage === 'partial') await assert.rejects(createIssue(f.context, input));\n else await createIssue(f.context, input);\n f.controls.failAdd = false;\n f.nativeValues.get(20)![field] = value;\n const writes = [...f.writes];\n await assert.rejects(createIssue(f.context, input), /conflict/iu);\n assert.equal(f.nativeValues.get(20)![field], value);\n assert.deepEqual(f.writes, writes);\n }\n },\n);\n\ntest('partial create reports only the requested remaining operations', async () => {\n const f = fixture();\n f.recovery.failProject = true;\n await assert.rejects(createIssue(f.context, { ...f.ready, opId: 'synthetic-simple' }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.remainingSteps, ['project', 'readback']);\n return true;\n });\n});\n\ntest('same opId preserves independently added closed blocker relationships', async () => {\n const f = fixture();\n const input = { ...f.ready, ...intent };\n await createIssue(f.context, input);\n f.rows.get(19)!.state = 'closed';\n f.edges.get(20)!.add(19);\n const writes = [...f.writes];\n await assert.rejects(createIssue(f.context, input), /conflict/iu);\n assert.deepEqual([...f.edges.get(20)!], [18, 19]);\n assert.deepEqual(f.writes, writes);\n});\n\nfor (const mode of ['partial', 'epic'] as const) {\n test(`MCP ${mode} create retains retry identity across compact and verbose output`, async ({ signal }) => {\n const f = inertTarget(signal);\n const originalGet = f.rest.issues.get;\n f.rest.issues.get = async (input) => ({\n data: { ...(await originalGet(input)).data, user: { login: 'operator' } },\n });\n const originalList = f.rest.issues.listForRepo;\n f.rest.issues.listForRepo = async (input) => ({\n data: (await originalList(input)).data.map((row) => ({ ...row, user: { login: 'operator' } })),\n });\n const originalRequest = f.rest.request;\n let fail = mode === 'partial';\n f.rest.request = async (route, args) => {\n const result = await originalRequest(route, args);\n if (fail && route.startsWith('POST') && route.includes('/issue-field-values')) {\n fail = false;\n throw new Error('Synthetic metadata acknowledgement lost');\n }\n return result;\n };\n const { points: _points, ...unsized } = fixtureFields;\n const input = { ...(mode === 'epic' ? { ...unsized, epic: true } : fixtureFields), opId: `synthetic-mcp-${mode}` };\n const connection = await f.connect();\n try {\n if (mode === 'partial') {\n const partial = await connection.call('issue_create', input);\n assert.equal(partial.response.isError, true);\n assert.match(partial.text, /Issue #17.*Failed step: metadata.*same opId/u);\n }\n const compact = await connection.call('issue_create', input);\n assert.notEqual(compact.response.isError, true, compact.text);\n assert.deepEqual(compact.value?.created, {\n number: 17,\n title: fixtureFields.title,\n url: 'https://github.com/example/widget/issues/17',\n });\n assert.equal(Object.hasOwn(compact.value!, 'body'), false);\n assert.ok(Array.isArray(compact.value?.warnings));\n const verbose = await connection.call('issue_create', { ...input, verbose: true });\n assert.notEqual(verbose.response.isError, true, verbose.text);\n assert.match(String(verbose.value?.body), /State:\\*\\* Ready/u);\n if (mode === 'epic')\n assert.equal(parseIssueBody(String(verbose.value?.body), { title: fixtureFields.title }).issue.epic, true);\n assert.equal(f.calls.filter((call) => call.name === 'issues.create').length, 1);\n assert.equal(\n f.calls.filter((call) => call.name.startsWith('POST') && call.name.includes('/issue-field-values')).length,\n mode === 'partial' ? 1 : 0,\n );\n } finally {\n await f.dispose(connection);\n }\n });\n}\n\n// Nov 1 2026 (#277): aviaratech/ai has about 3,900 issues and PRs, so the retry search never reached a short page.\ntest('MCP create with a fresh opId on a busy repository creates, and a same-opId retry reuses it', async ({\n signal,\n}) => {\n const f = inertTarget(signal);\n const originalList = f.rest.issues.listForRepo;\n const filler = (page: number, size: number) =>\n Array.from({ length: size }, (_, index) => ({\n number: 1000 + page * 100 + index,\n title: 'Unrelated work',\n body: 'No create marker.',\n state: 'open',\n user: { login: 'operator' },\n ...(index % 2 === 0 ? { pull_request: {} } : {}),\n }));\n f.rest.issues.listForRepo = async (input) => {\n const page = input.page ?? 1;\n const head = page === 1 ? (await originalList(input)).data.filter((row) => row.number === 17) : [];\n return {\n data: [...head.map((row) => ({ ...row, user: { login: 'operator' } })), ...filler(page, 100 - head.length)],\n } as Awaited<ReturnType<typeof originalList>>;\n };\n const originalGet = f.rest.issues.get;\n f.rest.issues.get = async (input) => ({ data: { ...(await originalGet(input)).data, user: { login: 'operator' } } });\n const input = { ...fixtureFields, opId: 'synthetic-busy-repo' };\n const connection = await f.connect();\n try {\n const first = await connection.call('issue_create', input);\n assert.notEqual(first.response.isError, true, first.text);\n assert.equal(first.value?.created && (first.value.created as { number: number }).number, 17);\n const retry = await connection.call('issue_create', input);\n assert.notEqual(retry.response.isError, true, retry.text);\n assert.equal(f.calls.filter((call) => call.name === 'issues.create').length, 1);\n } finally {\n await f.dispose(connection);\n }\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,2BAA2B,0BAA0B;AAC3E,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB,qBAAqB;AAC9C,SAAS,aAAa,
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { createIssue, CreatedTrackingIssueError, canonicalIssueBody } from './issue.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\nimport { parseIssueBody, validateIssue } from './issueContract.js';\nimport { inertTarget, fixtureFields, createFields } from './fixtures/inertTarget.js';\n\nfunction fixture() {\n const f = issue63Fixture();\n let parent: number | null = null;\n let parentCleared = false;\n const nativeValues = new Map<number, Record<string, string>>();\n const rest = f.context.clients.rest;\n const originalRequest = rest.request.bind(rest);\n const originalGraphql = f.context.clients.graphql;\n const recovery = { member: false, failProject: false, lostCreateResponse: false };\n rest.paginate = (async () => (parent === 19 ? [f.rows.get(20)!] : [])) as unknown as typeof rest.paginate;\n rest.issues.addSubIssue = (async () => {\n f.writes.push('parent');\n parent = 19;\n return { data: {} };\n }) as unknown as typeof rest.issues.addSubIssue;\n rest.request = (async (\n route: string,\n args: { issue_number?: number; issue_field_values?: { field_id: number; value: string }[] },\n ) => {\n if (route.includes('/orgs/')) {\n const result = await originalRequest(route, args);\n return { data: [...(result.data as unknown[]), { id: 103, name: 'Start date', data_type: 'date' }] };\n }\n if (args.issue_number === 20) {\n const values = nativeValues.get(20)!;\n if (route.startsWith('POST')) {\n f.writes.push('metadata');\n for (const field of args.issue_field_values ?? []) values[String(field.field_id)] = field.value;\n }\n return {\n data: Object.entries(values).map(([id, value]) => ({\n issue_field_id: Number(id),\n issue_field_name: id === '101' ? 'Estimate' : id === '102' ? 'Urgency' : 'Start date',\n data_type: id === '103' ? 'date' : 'single_select',\n value,\n })),\n };\n }\n if (route.startsWith('DELETE')) {\n parentCleared = true;\n return { data: [] };\n }\n if (parentCleared && args.issue_number === 19) return { data: [] };\n return originalRequest(route, args);\n }) as typeof rest.request;\n f.context.clients.graphql = (async (query: string, variables: Record<string, unknown>) => {\n if (query.includes('AddProjectDeliveryItem')) {\n recovery.member = true;\n f.writes.push('membership');\n return { addProjectV2ItemById: { item: { id: 'ITEM20' } } };\n }\n if (query.includes('UpdateProjectDeliveryStatus') && recovery.failProject)\n throw new Error('Synthetic Project write failure');\n const result = (await originalGraphql(query, variables)) as {\n repository: { issue: { parent: unknown; blockedBy: { nodes: { number: number; state: string }[] } } };\n node: { projectItems: { nodes: { id: string }[] } };\n };\n if (query.includes('ProjectDeliveryIssueItems') && !recovery.member)\n result.node.projectItems.nodes = result.node.projectItems.nodes.filter((row) => row.id !== 'ITEM20');\n if (query.includes('blockedBy(first:'))\n for (const blocker of result.repository.issue.blockedBy.nodes)\n blocker.state = f.rows.get(blocker.number)!.state.toUpperCase();\n if (query.includes('blockedBy(first:') && variables.number === 20 && parent !== null)\n result.repository.issue.parent = {\n id: 'ISSUE19',\n number: parent,\n repository: { nameWithOwner: 'example/widget' },\n };\n return result;\n }) as typeof originalGraphql;\n const originalCreate = rest.issues.create.bind(rest.issues);\n rest.issues.create = (async (input: Parameters<typeof originalCreate>[0]) => {\n const result = await originalCreate(input);\n Object.assign(f.rows.get(result.data.number)!, { user: { login: 'operator' } });\n nativeValues.set(result.data.number, {});\n if (recovery.lostCreateResponse) throw new Error('Synthetic lost creation response');\n return result;\n }) as typeof rest.issues.create;\n return { ...f, recovery, nativeValues, parent: () => parent };\n}\n\nconst intent = { opId: 'synthetic-187', parentIssueNumber: 19, blockedBy: [18] };\n\ntest('create establishes Project status before parent and blockers and reuses completed opId', async () => {\n const f = fixture();\n const input = { ...f.createInput, ...intent };\n const result = await createIssue(f.context, input);\n assert.equal(result.created.number, 20);\n assert.equal(f.parent(), 19);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.ok(f.writes.indexOf('membership') < f.writes.indexOf('status'));\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('parent'));\n const writes = [...f.writes];\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.deepEqual(f.writes, writes, 'a completed retry must not repeat native writes');\n});\n\ntest('same opId completes a failed dependency step once and identifies remaining work', async () => {\n const f = fixture();\n f.controls.failAdd = true;\n const input = { ...f.createInput, ...intent };\n await assert.rejects(createIssue(f.context, input), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.equal(error.created.number, 20);\n assert.match(error.message, /blockers/u);\n assert.match(error.message, /opId/u);\n return true;\n });\n f.controls.failAdd = false;\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.equal(f.writes.filter((x) => x === 'parent').length, 1);\n assert.equal(f.writes.filter((x) => x === 'add').length, 1);\n});\n\ntest('opId refuses changed intent, duplicate markers and foreign authors without writes', async () => {\n for (const mode of ['intent', 'duplicate', 'author'] as const) {\n const f = fixture();\n const input = { ...f.createInput, ...intent };\n await createIssue(f.context, input);\n if (mode === 'duplicate') f.rows.set(21, { ...f.rows.get(20)!, number: 21 });\n if (mode === 'author') Object.assign(f.rows.get(20)!, { user: { login: 'someone-else' } });\n const writes = [...f.writes];\n await assert.rejects(\n createIssue(f.context, { ...input, ...(mode === 'intent' ? { priority: 'Low' } : {}) }),\n /conflict|author/iu,\n );\n assert.deepEqual(f.writes, writes);\n }\n});\n\ntest('epic true is an unsized Ready contract and survives canonical roundtrip', () => {\n const f = fixture();\n const { points: _points, ...ready } = f.ready;\n const result = validateIssue({ ...ready, issueType: 'Feature', epic: true }, true);\n assert.equal(result.failures.length, 0, JSON.stringify(result.failures));\n assert.ok(result.issue);\n // Canonical body generation must not force an epic to become a parked draft.\n const input = { ...ready, issueType: 'Feature', epic: true as const };\n const body = canonicalIssueBody(input);\n assert.match(body, /## Status\\n\\nReady/u);\n assert.doesNotMatch(body, /Draft \u2014 parked/u);\n assert.equal(Reflect.get(parseIssueBody(body, { title: ready.title }).issue, 'epic'), true);\n assert.equal(\n validateIssue(ready, true).failures.some((x) => x.code === 'points'),\n true,\n );\n});\n\ntest.each(['project', 'acknowledgement'] as const)(\n 'same opId resumes after %s failure without another issue',\n async (stage) => {\n const f = fixture();\n const input = { ...f.createInput, ...intent };\n f.recovery.failProject = stage === 'project';\n f.recovery.lostCreateResponse = stage === 'acknowledgement';\n await assert.rejects(\n createIssue(f.context, input),\n stage === 'project' ? /Failed step: project/u : /lost creation response/u,\n );\n f.recovery.failProject = false;\n f.recovery.lostCreateResponse = false;\n await createIssue(f.context, input);\n assert.equal(f.writes.filter((x) => x === 'create').length, 1);\n assert.equal(f.writes.filter((x) => x === 'membership').length, 1);\n assert.equal(f.parent(), 19);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n },\n);\n\ntest.each(['completed', 'partial'] as const)(\n 'create retry preserves independently changed native values after %s operation',\n async (stage) => {\n for (const [field, value] of [\n ['101', '4'],\n ['102', 'Low'],\n ['103', '2026-02-02'],\n ] as const) {\n const f = fixture();\n const input = { ...f.createInput, ...intent, priority: 'High', startDate: '2026-01-01' };\n f.controls.failAdd = stage === 'partial';\n if (stage === 'partial') await assert.rejects(createIssue(f.context, input));\n else await createIssue(f.context, input);\n f.controls.failAdd = false;\n f.nativeValues.get(20)![field] = value;\n const writes = [...f.writes];\n await assert.rejects(createIssue(f.context, input), /conflict/iu);\n assert.equal(f.nativeValues.get(20)![field], value);\n assert.deepEqual(f.writes, writes);\n }\n },\n);\n\ntest('partial create reports only the requested remaining operations', async () => {\n const f = fixture();\n f.recovery.failProject = true;\n await assert.rejects(createIssue(f.context, { ...f.createInput, opId: 'synthetic-simple' }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.remainingSteps, ['project', 'readback']);\n return true;\n });\n});\n\ntest('same opId preserves independently added closed blocker relationships', async () => {\n const f = fixture();\n const input = { ...f.createInput, ...intent };\n await createIssue(f.context, input);\n f.rows.get(19)!.state = 'closed';\n f.edges.get(20)!.add(19);\n const writes = [...f.writes];\n await assert.rejects(createIssue(f.context, input), /conflict/iu);\n assert.deepEqual([...f.edges.get(20)!], [18, 19]);\n assert.deepEqual(f.writes, writes);\n});\n\nfor (const mode of ['partial', 'epic'] as const) {\n test(`MCP ${mode} create retains retry identity across compact and verbose output`, async ({ signal }) => {\n const f = inertTarget(signal);\n const originalGet = f.rest.issues.get;\n f.rest.issues.get = async (input) => ({\n data: { ...(await originalGet(input)).data, user: { login: 'operator' } },\n });\n const originalList = f.rest.issues.listForRepo;\n f.rest.issues.listForRepo = async (input) => ({\n data: (await originalList(input)).data.map((row) => ({ ...row, user: { login: 'operator' } })),\n });\n const originalRequest = f.rest.request;\n let fail = mode === 'partial';\n f.rest.request = async (route, args) => {\n const result = await originalRequest(route, args);\n if (fail && route.startsWith('POST') && route.includes('/issue-field-values')) {\n fail = false;\n throw new Error('Synthetic metadata acknowledgement lost');\n }\n return result;\n };\n const { points: _points, priority: _priority, ...unsized } = createFields;\n const input = { ...(mode === 'epic' ? { ...unsized, epic: true } : createFields), opId: `synthetic-mcp-${mode}` };\n const connection = await f.connect();\n try {\n if (mode === 'partial') {\n const partial = await connection.call('issue_create', input);\n assert.equal(partial.response.isError, true);\n assert.match(partial.text, /Issue #17.*Failed step: metadata.*same opId/u);\n }\n const compact = await connection.call('issue_create', input);\n assert.notEqual(compact.response.isError, true, compact.text);\n assert.deepEqual(compact.value?.created, {\n number: 17,\n title: fixtureFields.title,\n url: 'https://github.com/example/widget/issues/17',\n });\n assert.equal(Object.hasOwn(compact.value!, 'body'), false);\n assert.ok(Array.isArray(compact.value?.warnings));\n const verbose = await connection.call('issue_create', { ...input, verbose: true });\n assert.notEqual(verbose.response.isError, true, verbose.text);\n assert.match(String(verbose.value?.body), /State:\\*\\* Ready/u);\n if (mode === 'epic')\n assert.equal(parseIssueBody(String(verbose.value?.body), { title: fixtureFields.title }).issue.epic, true);\n assert.equal(f.calls.filter((call) => call.name === 'issues.create').length, 1);\n assert.equal(\n f.calls.filter((call) => call.name.startsWith('POST') && call.name.includes('/issue-field-values')).length,\n mode === 'partial' ? 1 : 0,\n );\n } finally {\n await f.dispose(connection);\n }\n });\n}\n\n// Nov 1 2026 (#277): aviaratech/ai has about 3,900 issues and PRs, so the retry search never reached a short page.\ntest('MCP create with a fresh opId on a busy repository creates, and a same-opId retry reuses it', async ({\n signal,\n}) => {\n const f = inertTarget(signal);\n const originalList = f.rest.issues.listForRepo;\n const filler = (page: number, size: number) =>\n Array.from({ length: size }, (_, index) => ({\n number: 1000 + page * 100 + index,\n title: 'Unrelated work',\n body: 'No create marker.',\n state: 'open',\n user: { login: 'operator' },\n ...(index % 2 === 0 ? { pull_request: {} } : {}),\n }));\n f.rest.issues.listForRepo = async (input) => {\n const page = input.page ?? 1;\n const head = page === 1 ? (await originalList(input)).data.filter((row) => row.number === 17) : [];\n return {\n data: [...head.map((row) => ({ ...row, user: { login: 'operator' } })), ...filler(page, 100 - head.length)],\n } as Awaited<ReturnType<typeof originalList>>;\n };\n const originalGet = f.rest.issues.get;\n f.rest.issues.get = async (input) => ({ data: { ...(await originalGet(input)).data, user: { login: 'operator' } } });\n const input = { ...createFields, opId: 'synthetic-busy-repo' };\n const connection = await f.connect();\n try {\n const first = await connection.call('issue_create', input);\n assert.notEqual(first.response.isError, true, first.text);\n assert.equal(first.value?.created && (first.value.created as { number: number }).number, 17);\n const retry = await connection.call('issue_create', input);\n assert.notEqual(retry.response.isError, true, retry.text);\n assert.equal(f.calls.filter((call) => call.name === 'issues.create').length, 1);\n } finally {\n await f.dispose(connection);\n }\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,2BAA2B,0BAA0B;AAC3E,SAAS,sBAAsB;AAC/B,SAAS,g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,EAAE;AAClH,QAAM,QAAQ,EAAE,GAAG,cAAc,MAAM,sBAAsB;AAC7D,QAAM,aAAa,MAAM,EAAE,QAAQ;AACnC,MAAI;AACF,UAAM,QAAQ,MAAM,WAAW,KAAK,gBAAgB,KAAK;AACzD,WAAO,SAAS,MAAM,SAAS,SAAS,MAAM,MAAM,IAAI;AACxD,WAAO,MAAM,MAAM,OAAO,WAAY,MAAM,MAAM,QAA+B,QAAQ,EAAE;AAC3F,UAAM,QAAQ,MAAM,WAAW,KAAK,gBAAgB,KAAK;AACzD,WAAO,SAAS,MAAM,SAAS,SAAS,MAAM,MAAM,IAAI;AACxD,WAAO,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,KAAK,SAAS,eAAe,EAAE,QAAQ,CAAC;AAAA,EAChF,UAAE;AACA,UAAM,EAAE,QAAQ,UAAU;AAAA,EAC5B;AACF,CAAC;",
|
|
6
6
|
"names": ["input"]
|
|
7
7
|
}
|
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
39
39
|
}, {
|
|
40
40
|
readonly name: 'issue_create';
|
|
41
41
|
readonly commandName: 'create';
|
|
42
|
-
readonly description: 'Create a native GitHub tracking issue with configured metadata and relationships';
|
|
42
|
+
readonly description: 'Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.';
|
|
43
43
|
readonly issueContract: {
|
|
44
44
|
version: "ai-delivery.issue@1";
|
|
45
45
|
draft: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
@@ -52,6 +52,11 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
52
52
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
53
53
|
behavior: z.ZodString;
|
|
54
54
|
verifiedBy: z.ZodString;
|
|
55
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
input: z.ZodString;
|
|
57
|
+
expected: z.ZodString;
|
|
58
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
59
|
+
}, z.core.$strict>>>;
|
|
55
60
|
}, z.core.$strict>>>;
|
|
56
61
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
57
62
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -72,6 +77,30 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
72
77
|
until: z.ZodOptional<z.ZodISODate>;
|
|
73
78
|
trigger: z.ZodOptional<z.ZodString>;
|
|
74
79
|
}, z.core.$strict>>;
|
|
80
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
|
+
tier: z.ZodLiteral<"standard">;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
tier: z.ZodLiteral<"frontier">;
|
|
84
|
+
reason: z.ZodEnum<{
|
|
85
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
86
|
+
"risk-semantics": "risk-semantics";
|
|
87
|
+
"state-machine": "state-machine";
|
|
88
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
89
|
+
}>;
|
|
90
|
+
}, z.core.$strict>], "tier">>;
|
|
91
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
94
|
+
path: z.ZodString;
|
|
95
|
+
change: z.ZodEnum<{
|
|
96
|
+
add: "add";
|
|
97
|
+
delete: "delete";
|
|
98
|
+
edit: "edit";
|
|
99
|
+
}>;
|
|
100
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
}, z.core.$strict>>>;
|
|
102
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
104
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
76
105
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
77
106
|
}, z.core.$strict>>;
|
|
@@ -94,6 +123,30 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
94
123
|
until: z.ZodOptional<z.ZodISODate>;
|
|
95
124
|
trigger: z.ZodOptional<z.ZodString>;
|
|
96
125
|
}, z.core.$strict>>;
|
|
126
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
127
|
+
tier: z.ZodLiteral<"standard">;
|
|
128
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
129
|
+
tier: z.ZodLiteral<"frontier">;
|
|
130
|
+
reason: z.ZodEnum<{
|
|
131
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
132
|
+
"risk-semantics": "risk-semantics";
|
|
133
|
+
"state-machine": "state-machine";
|
|
134
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strict>], "tier">>;
|
|
137
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
+
path: z.ZodString;
|
|
141
|
+
change: z.ZodEnum<{
|
|
142
|
+
add: "add";
|
|
143
|
+
delete: "delete";
|
|
144
|
+
edit: "edit";
|
|
145
|
+
}>;
|
|
146
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
|
+
}, z.core.$strict>>>;
|
|
148
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
150
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
98
151
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
99
152
|
title: z.ZodString;
|
|
@@ -103,6 +156,11 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
103
156
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
104
157
|
behavior: z.ZodString;
|
|
105
158
|
verifiedBy: z.ZodString;
|
|
159
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
input: z.ZodString;
|
|
161
|
+
expected: z.ZodString;
|
|
162
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
163
|
+
}, z.core.$strict>>>;
|
|
106
164
|
}, z.core.$strict>>;
|
|
107
165
|
outOfScope: z.ZodArray<z.ZodString>;
|
|
108
166
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -120,6 +178,11 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
120
178
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
121
179
|
behavior: z.ZodString;
|
|
122
180
|
verifiedBy: z.ZodString;
|
|
181
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
182
|
+
input: z.ZodString;
|
|
183
|
+
expected: z.ZodString;
|
|
184
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
185
|
+
}, z.core.$strict>>>;
|
|
123
186
|
}, z.core.$strict>>>;
|
|
124
187
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
188
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -135,6 +198,30 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
135
198
|
reproducibility: z.ZodString;
|
|
136
199
|
environment: z.ZodString;
|
|
137
200
|
}, z.core.$strict>>;
|
|
201
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
202
|
+
tier: z.ZodLiteral<"standard">;
|
|
203
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
204
|
+
tier: z.ZodLiteral<"frontier">;
|
|
205
|
+
reason: z.ZodEnum<{
|
|
206
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
207
|
+
"risk-semantics": "risk-semantics";
|
|
208
|
+
"state-machine": "state-machine";
|
|
209
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
210
|
+
}>;
|
|
211
|
+
}, z.core.$strict>], "tier">>;
|
|
212
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
215
|
+
path: z.ZodString;
|
|
216
|
+
change: z.ZodEnum<{
|
|
217
|
+
add: "add";
|
|
218
|
+
delete: "delete";
|
|
219
|
+
edit: "edit";
|
|
220
|
+
}>;
|
|
221
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
}, z.core.$strict>>>;
|
|
223
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
224
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
225
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
139
226
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
140
227
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -156,7 +243,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
156
243
|
}, {
|
|
157
244
|
readonly name: 'issue_start';
|
|
158
245
|
readonly commandName: 'start';
|
|
159
|
-
readonly description: 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.';
|
|
246
|
+
readonly description: 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.';
|
|
160
247
|
readonly inputSchema: z.ZodObject<{
|
|
161
248
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
162
249
|
blockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -251,6 +338,11 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
251
338
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
252
339
|
behavior: z.ZodString;
|
|
253
340
|
verifiedBy: z.ZodString;
|
|
341
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
342
|
+
input: z.ZodString;
|
|
343
|
+
expected: z.ZodString;
|
|
344
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
345
|
+
}, z.core.$strict>>>;
|
|
254
346
|
}, z.core.$strict>>>;
|
|
255
347
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
348
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -266,6 +358,30 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
266
358
|
reproducibility: z.ZodString;
|
|
267
359
|
environment: z.ZodString;
|
|
268
360
|
}, z.core.$strict>>;
|
|
361
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
362
|
+
tier: z.ZodLiteral<"standard">;
|
|
363
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
364
|
+
tier: z.ZodLiteral<"frontier">;
|
|
365
|
+
reason: z.ZodEnum<{
|
|
366
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
367
|
+
"risk-semantics": "risk-semantics";
|
|
368
|
+
"state-machine": "state-machine";
|
|
369
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
370
|
+
}>;
|
|
371
|
+
}, z.core.$strict>], "tier">>;
|
|
372
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
373
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
374
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
375
|
+
path: z.ZodString;
|
|
376
|
+
change: z.ZodEnum<{
|
|
377
|
+
add: "add";
|
|
378
|
+
delete: "delete";
|
|
379
|
+
edit: "edit";
|
|
380
|
+
}>;
|
|
381
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
382
|
+
}, z.core.$strict>>>;
|
|
383
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
384
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
269
385
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
270
386
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
271
387
|
status: z.ZodOptional<z.ZodObject<{
|
|
@@ -330,6 +446,11 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
330
446
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
331
447
|
behavior: z.ZodString;
|
|
332
448
|
verifiedBy: z.ZodString;
|
|
449
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
450
|
+
input: z.ZodString;
|
|
451
|
+
expected: z.ZodString;
|
|
452
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
453
|
+
}, z.core.$strict>>>;
|
|
333
454
|
}, z.core.$strict>>>;
|
|
334
455
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
456
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -345,6 +466,30 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
345
466
|
reproducibility: z.ZodString;
|
|
346
467
|
environment: z.ZodString;
|
|
347
468
|
}, z.core.$strict>>;
|
|
469
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
470
|
+
tier: z.ZodLiteral<"standard">;
|
|
471
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
472
|
+
tier: z.ZodLiteral<"frontier">;
|
|
473
|
+
reason: z.ZodEnum<{
|
|
474
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
475
|
+
"risk-semantics": "risk-semantics";
|
|
476
|
+
"state-machine": "state-machine";
|
|
477
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
478
|
+
}>;
|
|
479
|
+
}, z.core.$strict>], "tier">>;
|
|
480
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
481
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
483
|
+
path: z.ZodString;
|
|
484
|
+
change: z.ZodEnum<{
|
|
485
|
+
add: "add";
|
|
486
|
+
delete: "delete";
|
|
487
|
+
edit: "edit";
|
|
488
|
+
}>;
|
|
489
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
490
|
+
}, z.core.$strict>>>;
|
|
491
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
492
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
348
493
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
349
494
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
350
495
|
status: z.ZodOptional<z.ZodObject<{
|
package/dist/mcp/tools.js
CHANGED
|
@@ -117,7 +117,7 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
117
117
|
{
|
|
118
118
|
name: "issue_create",
|
|
119
119
|
commandName: "create",
|
|
120
|
-
description: "Create a native GitHub tracking issue with configured metadata and relationships",
|
|
120
|
+
description: "Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.",
|
|
121
121
|
issueContract: ISSUE_JSON_SCHEMAS,
|
|
122
122
|
inputSchema: issueInputSchema(
|
|
123
123
|
z.strictObject(
|
|
@@ -138,7 +138,7 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
138
138
|
{
|
|
139
139
|
name: "issue_start",
|
|
140
140
|
commandName: "start",
|
|
141
|
-
description: "Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.",
|
|
141
|
+
description: "Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.",
|
|
142
142
|
inputSchema: NormalStart
|
|
143
143
|
},
|
|
144
144
|
{
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/mcp/tools.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\nimport { NativeIssueDateFields } from '../github/nativeIssueMetadata.js';\nimport { ProjectTradeFields } from '../github/projectNumbers.js';\nimport { OverrideReason } from '../services/blockerGuardService.js';\nimport { JournalInputSchema, JOURNAL_SCHEMA_METADATA } from '../issueJournal.js';\nimport {\n IssueFields,\n IssueWriteFields,\n ISSUE_JSON_SCHEMAS,\n issueInputSchema,\n CreateIssueStatus,\n IssueStatusPatch,\n ProjectStatusPatch,\n IssueDeferralPatch,\n acceptedKeysError,\n} from '../issueContract.js';\n\nconst Verbose = z.boolean().optional().describe('Return the full payload, including bodies, diffs and routing.');\nconst Positive = z.number().int().positive();\nconst Labels = z.array(z.string().trim().min(1));\nconst REPO_HELP =\n 'GitHub owner/name. Pass the repository named by the user. An explicit repo avoids launch-directory Git for ordinary remote issue/PR work; retained local modes keep their own checkout requirements.';\nconst Repo = z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP);\nexport const AI_DELIVERY_MCP_CONTRACT_VERSION = 'ai-delivery.mcp@2' as const;\nconst IssueUpdateInput = issueInputSchema(\n z\n .strictObject(\n {\n ...IssueWriteFields,\n ...NativeIssueDateFields,\n status: IssueStatusPatch.optional(),\n projectStatus: ProjectStatusPatch.optional(),\n repo: Repo,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueNumber: Positive,\n issueType: IssueWriteFields.issueType,\n labels: Labels.optional(),\n milestone: Positive.nullable().optional(),\n parentIssueNumber: Positive.nullable().optional(),\n park: z.literal(true).optional(),\n ...IssueDeferralPatch,\n points: IssueWriteFields.points,\n priority: z.string().min(1).optional(),\n state: z.enum(['open', 'closed']).optional(),\n preserveHistory: z.boolean().optional(),\n closeReason: z.enum(['completed', 'not_planned', 'duplicate']).optional(),\n supersededBy: Positive.optional(),\n title: IssueWriteFields.title,\n },\n { error: acceptedKeysError },\n )\n .superRefine((input, ctx) => {\n if (input.defer !== undefined && input.undefer !== undefined)\n ctx.addIssue({ code: 'custom', message: 'Choose defer or undefer, never both.', path: ['defer'] });\n if ((input.closeReason !== undefined || input.supersededBy !== undefined) && input.state !== 'closed')\n ctx.addIssue({\n code: 'custom',\n path: ['state'],\n message: 'Closure details require a closed issue; set state to closed.',\n params: { issueCode: 'closure.state' },\n });\n }),\n);\n\nconst Tracking = {\n verbose: Verbose,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueType: z.string().min(1).optional(),\n labels: Labels.optional(),\n milestone: Positive.optional(),\n parentIssueNumber: Positive.optional(),\n points: Positive.optional().describe(IssueFields.shape.points.description ?? ''),\n priority: z.string().min(1).optional(),\n repo: z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP),\n title: z\n .string()\n .trim()\n .min(1, 'Issue title is empty; enter a title.')\n .max(256, 'Issue title exceeds 256 characters; shorten the title.')\n .describe(IssueFields.shape.title.description ?? ''),\n};\nconst NormalStart = z.strictObject(\n {\n ...Tracking,\n title: Tracking.title.optional(),\n issueNumber: Positive.optional(),\n request: z.string().min(1).optional(),\n requestId: z.string().trim().min(1).max(256).optional(),\n resumeCreated: z.boolean().optional(),\n branch: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n);\nconst IssueListing = {\n repo: Repo,\n verbose: Verbose,\n state: z.enum(['open', 'closed', 'all']).optional(),\n labels: z\n .array(\n z\n .string()\n .min(1)\n .regex(/^[^\"\\\\\\r\\n]+$/u),\n )\n .optional(),\n parentIssueNumber: Positive.nullable().optional(),\n issueType: z.string().min(1).optional(),\n projectStatus: z.enum(['Todo', 'In Progress', 'Blocked', 'Done']).nullable().optional(),\n updatedSince: z.iso.datetime({ offset: true }).optional(),\n page: Positive.optional(),\n perPage: Positive.max(100).optional(),\n};\nconst SearchText = z\n .string()\n .trim()\n .min(1)\n .max(256)\n .regex(/^[^\"\\\\\\r\\n]+$/u);\n\nexport const AI_DELIVERY_MCP_TOOLS = [\n {\n name: 'issue_comment',\n commandName: 'comment',\n description:\n 'Post a typed issue journal with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.',\n inputSchema: z\n .strictObject({ ...JournalInputSchema.shape, repo: Repo, verbose: Verbose }, { error: acceptedKeysError })\n .superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {\n // Repository routing belongs to the MCP envelope, not the strict journal variants.\n const parsed = JournalInputSchema.safeParse(journal);\n if (!parsed.success)\n for (const issue of parsed.error.issues)\n ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });\n })\n .meta(JOURNAL_SCHEMA_METADATA),\n },\n {\n name: 'issue_create',\n commandName: 'create',\n description: 'Create a native GitHub tracking issue with configured metadata and relationships',\n issueContract: ISSUE_JSON_SCHEMAS,\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n ...Tracking,\n ...NativeIssueDateFields,\n ...IssueWriteFields,\n title: IssueFields.shape.title,\n opId: z\n .string()\n .trim()\n .min(1)\n .max(256)\n .optional()\n .describe(\n 'Stable retry identity: repeat the same original arguments to complete a partial create without another issue.',\n ),\n status: CreateIssueStatus.optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_start',\n commandName: 'start',\n description:\n 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.',\n inputSchema: NormalStart,\n },\n {\n name: 'issue_list',\n readOnly: true,\n commandName: 'list',\n description: 'List repository issues with native filters, named organization fields and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_search',\n readOnly: true,\n commandName: 'search',\n description: 'Search literal issue text in the selected repository with native filters and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_update',\n commandName: 'update',\n description: 'Update native issue fields and exact relationship sets with readback',\n inputSchema: IssueUpdateInput.safeExtend({ ...ProjectTradeFields, verbose: Verbose }),\n },\n {\n name: 'issue_batch_update',\n commandName: 'batch:update',\n description: 'Plan or apply 1\u201350 issue updates in one repository, with ordered partial results and readback',\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n items: z.array(IssueUpdateInput).min(1).max(50),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_info',\n readOnly: true,\n commandName: 'info',\n description:\n 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.',\n inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_ready_check',\n readOnly: true,\n commandName: 'ready:check',\n description: 'Evaluate deterministic readiness from live native issue state',\n inputSchema: z.strictObject(\n { issueNumber: Positive, repo: Tracking.repo, verbose: Verbose },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_create',\n commandName: 'pr:create',\n description:\n 'Create or reuse a PR from any directory using repo, issueNumber and a pushed head. By default it closes the issue and restores a missing closing link on reuse. On an existing closing PR, a new title or body edits it and draft: false marks it ready. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.',\n inputSchema: z\n .strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n expectedHeadSha: z\n .string()\n .regex(\n /^[a-f0-9]{40}$/u,\n 'expectedHeadSha must be a full 40-character commit SHA; pass the pushed head or omit it.',\n )\n .optional(),\n body: z.string().min(1, 'PR body is empty; enter a body or omit it to use the default body.').optional(),\n draft: z.boolean().optional(),\n dryRun: z.boolean().optional(),\n title: z.string().min(1, 'PR title is empty; enter a title or omit it to use the issue title.').optional(),\n headBranch: z.string().min(1).optional(),\n head: z.string().min(1).optional(),\n base: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n )\n .refine(\n (input) => input.head === undefined || input.headBranch === undefined || input.head === input.headBranch,\n 'PR head selectors disagree; use the same branch for head and headBranch.',\n ),\n },\n {\n name: 'issue_pr_info',\n readOnly: true,\n commandName: 'pr:info',\n description:\n \"Inspect a PR by number or its GitHub-linked issue branch: state, merge state, merge commit, checks, reviews and each linked issue's state, Project status and latest journal, in one call\",\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive.optional(),\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'milestone_create',\n commandName: 'milestone:create',\n description:\n 'Create a repository milestone (title, optional ISO due date and description) with readback. Repeating the same call returns the milestone it made; a same-titled milestone with different details is refused.',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n title: z.string().trim().min(1).max(256),\n dueOn: z.iso.date().optional(),\n description: z.string().max(10000).optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_review',\n commandName: 'pr:review',\n description: 'Submit one existing exact-head independent review with the reviewer App role',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive,\n nonClosing: z.boolean().optional(),\n artifact: z.string().min(1, 'Review artifact is empty; provide the independent review artifact JSON.'),\n identity: z.string().min(1).optional(),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n] as const;\n\nexport type AiDeliveryMcpToolName = (typeof AI_DELIVERY_MCP_TOOLS)[number]['name'];\n\nexport function getAiDeliveryMcpTool(name: string): (typeof AI_DELIVERY_MCP_TOOLS)[number] | null {\n return AI_DELIVERY_MCP_TOOLS.find((tool) => tool.name === name) ?? null;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,+BAA+B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,+DAA+D;AAC/G,MAAM,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAC3C,MAAM,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/C,MAAM,YACJ;AACF,MAAM,OAAO,EACV,OAAO,EACP,MAAM,qCAAqC,EAC3C,SAAS,EACT,SAAS,SAAS;AACd,MAAM,mCAAmC;AAChD,MAAM,mBAAmB;AAAA,EACvB,EACG;AAAA,IACC;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,QAAQ,i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TradeFields } from '../github/projectNumbers.js';\nimport { OverrideReason } from '../services/blockerGuardService.js';\nimport { JournalInputSchema, JOURNAL_SCHEMA_METADATA } from '../issueJournal.js';\nimport {\n IssueFields,\n IssueWriteFields,\n ISSUE_JSON_SCHEMAS,\n issueInputSchema,\n CreateIssueStatus,\n IssueStatusPatch,\n ProjectStatusPatch,\n IssueDeferralPatch,\n acceptedKeysError,\n} from '../issueContract.js';\n\nconst Verbose = z.boolean().optional().describe('Return the full payload, including bodies, diffs and routing.');\nconst Positive = z.number().int().positive();\nconst Labels = z.array(z.string().trim().min(1));\nconst REPO_HELP =\n 'GitHub owner/name. Pass the repository named by the user. An explicit repo avoids launch-directory Git for ordinary remote issue/PR work; retained local modes keep their own checkout requirements.';\nconst Repo = z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP);\nexport const AI_DELIVERY_MCP_CONTRACT_VERSION = 'ai-delivery.mcp@2' as const;\nconst IssueUpdateInput = issueInputSchema(\n z\n .strictObject(\n {\n ...IssueWriteFields,\n ...NativeIssueDateFields,\n status: IssueStatusPatch.optional(),\n projectStatus: ProjectStatusPatch.optional(),\n repo: Repo,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueNumber: Positive,\n issueType: IssueWriteFields.issueType,\n labels: Labels.optional(),\n milestone: Positive.nullable().optional(),\n parentIssueNumber: Positive.nullable().optional(),\n park: z.literal(true).optional(),\n ...IssueDeferralPatch,\n points: IssueWriteFields.points,\n priority: z.string().min(1).optional(),\n state: z.enum(['open', 'closed']).optional(),\n preserveHistory: z.boolean().optional(),\n closeReason: z.enum(['completed', 'not_planned', 'duplicate']).optional(),\n supersededBy: Positive.optional(),\n title: IssueWriteFields.title,\n },\n { error: acceptedKeysError },\n )\n .superRefine((input, ctx) => {\n if (input.defer !== undefined && input.undefer !== undefined)\n ctx.addIssue({ code: 'custom', message: 'Choose defer or undefer, never both.', path: ['defer'] });\n if ((input.closeReason !== undefined || input.supersededBy !== undefined) && input.state !== 'closed')\n ctx.addIssue({\n code: 'custom',\n path: ['state'],\n message: 'Closure details require a closed issue; set state to closed.',\n params: { issueCode: 'closure.state' },\n });\n }),\n);\n\nconst Tracking = {\n verbose: Verbose,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueType: z.string().min(1).optional(),\n labels: Labels.optional(),\n milestone: Positive.optional(),\n parentIssueNumber: Positive.optional(),\n points: Positive.optional().describe(IssueFields.shape.points.description ?? ''),\n priority: z.string().min(1).optional(),\n repo: z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP),\n title: z\n .string()\n .trim()\n .min(1, 'Issue title is empty; enter a title.')\n .max(256, 'Issue title exceeds 256 characters; shorten the title.')\n .describe(IssueFields.shape.title.description ?? ''),\n};\nconst NormalStart = z.strictObject(\n {\n ...Tracking,\n title: Tracking.title.optional(),\n issueNumber: Positive.optional(),\n request: z.string().min(1).optional(),\n requestId: z.string().trim().min(1).max(256).optional(),\n resumeCreated: z.boolean().optional(),\n branch: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n);\nconst IssueListing = {\n repo: Repo,\n verbose: Verbose,\n state: z.enum(['open', 'closed', 'all']).optional(),\n labels: z\n .array(\n z\n .string()\n .min(1)\n .regex(/^[^\"\\\\\\r\\n]+$/u),\n )\n .optional(),\n parentIssueNumber: Positive.nullable().optional(),\n issueType: z.string().min(1).optional(),\n projectStatus: z.enum(['Todo', 'In Progress', 'Blocked', 'Done']).nullable().optional(),\n updatedSince: z.iso.datetime({ offset: true }).optional(),\n page: Positive.optional(),\n perPage: Positive.max(100).optional(),\n};\nconst SearchText = z\n .string()\n .trim()\n .min(1)\n .max(256)\n .regex(/^[^\"\\\\\\r\\n]+$/u);\n\nexport const AI_DELIVERY_MCP_TOOLS = [\n {\n name: 'issue_comment',\n commandName: 'comment',\n description:\n 'Post a typed issue journal with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.',\n inputSchema: z\n .strictObject({ ...JournalInputSchema.shape, repo: Repo, verbose: Verbose }, { error: acceptedKeysError })\n .superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {\n // Repository routing belongs to the MCP envelope, not the strict journal variants.\n const parsed = JournalInputSchema.safeParse(journal);\n if (!parsed.success)\n for (const issue of parsed.error.issues)\n ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });\n })\n .meta(JOURNAL_SCHEMA_METADATA),\n },\n {\n name: 'issue_create',\n commandName: 'create',\n description:\n 'Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.',\n issueContract: ISSUE_JSON_SCHEMAS,\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n ...Tracking,\n ...NativeIssueDateFields,\n ...IssueWriteFields,\n title: IssueFields.shape.title,\n opId: z\n .string()\n .trim()\n .min(1)\n .max(256)\n .optional()\n .describe(\n 'Stable retry identity: repeat the same original arguments to complete a partial create without another issue.',\n ),\n status: CreateIssueStatus.optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_start',\n commandName: 'start',\n description:\n 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.',\n inputSchema: NormalStart,\n },\n {\n name: 'issue_list',\n readOnly: true,\n commandName: 'list',\n description: 'List repository issues with native filters, named organization fields and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_search',\n readOnly: true,\n commandName: 'search',\n description: 'Search literal issue text in the selected repository with native filters and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_update',\n commandName: 'update',\n description: 'Update native issue fields and exact relationship sets with readback',\n inputSchema: IssueUpdateInput.safeExtend({ ...ProjectTradeFields, verbose: Verbose }),\n },\n {\n name: 'issue_batch_update',\n commandName: 'batch:update',\n description: 'Plan or apply 1\u201350 issue updates in one repository, with ordered partial results and readback',\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n items: z.array(IssueUpdateInput).min(1).max(50),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_info',\n readOnly: true,\n commandName: 'info',\n description:\n 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.',\n inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_ready_check',\n readOnly: true,\n commandName: 'ready:check',\n description: 'Evaluate deterministic readiness from live native issue state',\n inputSchema: z.strictObject(\n { issueNumber: Positive, repo: Tracking.repo, verbose: Verbose },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_create',\n commandName: 'pr:create',\n description:\n 'Create or reuse a PR from any directory using repo, issueNumber and a pushed head. By default it closes the issue and restores a missing closing link on reuse. On an existing closing PR, a new title or body edits it and draft: false marks it ready. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.',\n inputSchema: z\n .strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n expectedHeadSha: z\n .string()\n .regex(\n /^[a-f0-9]{40}$/u,\n 'expectedHeadSha must be a full 40-character commit SHA; pass the pushed head or omit it.',\n )\n .optional(),\n body: z.string().min(1, 'PR body is empty; enter a body or omit it to use the default body.').optional(),\n draft: z.boolean().optional(),\n dryRun: z.boolean().optional(),\n title: z.string().min(1, 'PR title is empty; enter a title or omit it to use the issue title.').optional(),\n headBranch: z.string().min(1).optional(),\n head: z.string().min(1).optional(),\n base: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n )\n .refine(\n (input) => input.head === undefined || input.headBranch === undefined || input.head === input.headBranch,\n 'PR head selectors disagree; use the same branch for head and headBranch.',\n ),\n },\n {\n name: 'issue_pr_info',\n readOnly: true,\n commandName: 'pr:info',\n description:\n \"Inspect a PR by number or its GitHub-linked issue branch: state, merge state, merge commit, checks, reviews and each linked issue's state, Project status and latest journal, in one call\",\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive.optional(),\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'milestone_create',\n commandName: 'milestone:create',\n description:\n 'Create a repository milestone (title, optional ISO due date and description) with readback. Repeating the same call returns the milestone it made; a same-titled milestone with different details is refused.',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n title: z.string().trim().min(1).max(256),\n dueOn: z.iso.date().optional(),\n description: z.string().max(10000).optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_review',\n commandName: 'pr:review',\n description: 'Submit one existing exact-head independent review with the reviewer App role',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive,\n nonClosing: z.boolean().optional(),\n artifact: z.string().min(1, 'Review artifact is empty; provide the independent review artifact JSON.'),\n identity: z.string().min(1).optional(),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n] as const;\n\nexport type AiDeliveryMcpToolName = (typeof AI_DELIVERY_MCP_TOOLS)[number]['name'];\n\nexport function getAiDeliveryMcpTool(name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AAM;AAAA,QACN,SAAS;AAAA,QACT,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,QACvC,OAAO,EAAE,IAAI,KAAK,EAAE,SAAS;AAAA,QAC7B,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS;AAAA,MAC9C;AAAA,MACA,EAAE,OAAO,kBAAkB;AAAA,IAC7B;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa,EAAE;AAAA,MACb;AAAA,QACE,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,UAAU;AAAA,QACV,YAAY,EAAE,QAAQ,EAAE,SAAS;AAAA,QACjC,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG,yEAAyE;AAAA,QACrG,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,QACrC,QAAQ,EAAE,QAAQ,EAAE,SAAS;AAAA,MAC/B;AAAA,MACA,EAAE,OAAO,kBAAkB;AAAA,IAC7B;AAAA,EACF;AACF;AAIO,SAAS,qBAAqB,MAA6D;AAChG,SAAO,sBAAsB,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK;AACrE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,7 @@ import { test } from "vitest";
|
|
|
10
10
|
import pkg from "../package.json" with { type: "json" };
|
|
11
11
|
import { AI_DELIVERY_MCP_TOOLS } from "./mcp/tools.js";
|
|
12
12
|
import { syntheticDiscoveryConfig } from "./fixtures/discovery.js";
|
|
13
|
+
import { withBuilder } from "./fixtures/builderReady.js";
|
|
13
14
|
const packageRoot = fileURLToPath(new URL("../", import.meta.url));
|
|
14
15
|
const pluginRoot = join(packageRoot, "plugins", "ai-delivery");
|
|
15
16
|
const qualificationOwner = await import(new URL("../scripts/current-qualification.mjs", import.meta.url).href);
|
|
@@ -169,7 +170,7 @@ globalThis.fetch=async(url,init)=>{
|
|
|
169
170
|
if(method==='POST')fieldValues=json.issue_field_values.map(entry=>({issue_field_id:entry.field_id,issue_field_name:fields.find(field=>field.id===entry.field_id).name,data_type:'single_select',value:entry.value}));
|
|
170
171
|
data=fieldValues;
|
|
171
172
|
}
|
|
172
|
-
else if(path.endsWith('/issues')&&method==='POST'){issue={...issue,...json};data=issue;}
|
|
173
|
+
else if(path.endsWith('/issues')&&method==='POST'){issue={...issue,...json,...(json.type?{type:{name:json.type}}:{})};data=issue;}
|
|
173
174
|
else if(path.endsWith('/issues')&&method==='GET')data=[issue];
|
|
174
175
|
else if(path.endsWith('/sub_issues'))data=[];
|
|
175
176
|
else if(path.endsWith('/issues/17')){if(method==='PATCH')issue={...issue,...json};data=issue;}
|
|
@@ -195,10 +196,12 @@ globalThis.fetch=async(url,init)=>{
|
|
|
195
196
|
const client = new Client({ name: "actual-launch-routing", version: "1" });
|
|
196
197
|
try {
|
|
197
198
|
await client.connect(transport, { timeout: 3e4 });
|
|
198
|
-
const readyInput = {
|
|
199
|
+
const readyInput = withBuilder({
|
|
199
200
|
repo: "example/b",
|
|
200
201
|
title: "Validate widget launch routing across repositories",
|
|
202
|
+
issueType: "Task",
|
|
201
203
|
points: 2,
|
|
204
|
+
priority: "High",
|
|
202
205
|
problem: "A launcher can bind a widget issue to the checkout repository instead of the explicit caller.",
|
|
203
206
|
outcome: "Create and update the issue only in explicitly selected repository B.",
|
|
204
207
|
acceptanceCriteria: [
|
|
@@ -208,7 +211,7 @@ globalThis.fetch=async(url,init)=>{
|
|
|
208
211
|
}
|
|
209
212
|
],
|
|
210
213
|
outOfScope: ["Live authentication and host configuration."]
|
|
211
|
-
};
|
|
214
|
+
});
|
|
212
215
|
const created = await client.callTool({
|
|
213
216
|
name: "issue_create",
|
|
214
217
|
arguments: { ...readyInput, labels: ["enhancement"] }
|