@aviaratech/ai-delivery 0.3.41 → 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 +7 -1
- package/dist/agentReadiness.test.js +15 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/callerErrors.test.js +11 -1
- package/dist/callerErrors.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/fixtures/readView.d.ts +9 -1
- package/dist/fixtures/readView.js +4 -0
- package/dist/fixtures/readView.js.map +2 -2
- package/dist/issue.d.ts +2 -2
- package/dist/issue.js +96 -27
- 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 +242 -2
- package/dist/issueContract.js +147 -28
- 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 +144 -7
- package/dist/issueInfoReadback.test.js.map +2 -2
- package/dist/issueIntake.test.js +201 -33
- package/dist/issueIntake.test.js.map +2 -2
- package/dist/issueJournal.js +4 -2
- package/dist/issueJournal.js.map +2 -2
- package/dist/issueJournal.test.js +22 -0
- package/dist/issueJournal.test.js.map +2 -2
- package/dist/issueTracking.test.js +4 -1
- package/dist/issueTracking.test.js.map +2 -2
- package/dist/issueWriteRecovery.test.js +12 -12
- package/dist/issueWriteRecovery.test.js.map +2 -2
- package/dist/mcp/index.js +3 -3
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools.d.ts +155 -5
- package/dist/mcp/tools.js +136 -103
- 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/pr.d.ts +2 -0
- package/dist/pr.js +28 -3
- package/dist/pr.js.map +2 -2
- package/dist/pr.test.js +0 -7
- package/dist/pr.test.js.map +2 -2
- package/dist/prAssociation.test.js +82 -9
- package/dist/prAssociation.test.js.map +2 -2
- package/dist/projectNumbers.test.js +1 -1
- package/dist/projectNumbers.test.js.map +1 -1
- package/dist/readView.d.ts +32 -3
- package/dist/readView.js +29 -12
- package/dist/readView.js.map +2 -2
- package/dist/readView.test.js +63 -1
- package/dist/readView.test.js.map +2 -2
- 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/targetPolicyEntrypoints.test.js +1 -1
- package/dist/targetPolicyEntrypoints.test.js.map +2 -2
- package/dist/targetPolicyRoutes.test.js +1 -1
- package/dist/targetPolicyRoutes.test.js.map +2 -2
- package/dist/targetRepositoryExecution.test.js +11 -3
- package/dist/targetRepositoryExecution.test.js.map +2 -2
- package/dist/toolOutput.test.js +14 -0
- package/dist/toolOutput.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 +130 -124
- 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
|
@@ -34,8 +34,8 @@ test("public update/create schemas preserve guard fields and refuse invalid reas
|
|
|
34
34
|
{ issueNumber: 20, blocks: [17], overrideReason: "Reason" }
|
|
35
35
|
);
|
|
36
36
|
const create = getAiDeliveryMcpTool("issue_create").inputSchema;
|
|
37
|
-
assert.equal(create.safeParse({ ...f.
|
|
38
|
-
assert.throws(() => create.parse({ ...f.
|
|
37
|
+
assert.equal(create.safeParse({ ...f.createInput, blocks: [17], overrideReason: "Reason" }).success, true);
|
|
38
|
+
assert.throws(() => create.parse({ ...f.createInput, blocks: [17], overrideReason: " ".repeat(4) }));
|
|
39
39
|
assert.throws(
|
|
40
40
|
() => getAiDeliveryMcpTool("issue_update").inputSchema.parse({ ...input, overrideReason: "x".repeat(2001) })
|
|
41
41
|
);
|
|
@@ -57,7 +57,7 @@ test("actual issue_start recovery executes guarded reciprocal tracking against t
|
|
|
57
57
|
const { f } = routes();
|
|
58
58
|
f.controls.failAdd = true;
|
|
59
59
|
await assert.rejects(
|
|
60
|
-
issues.createIssue(f.context, { ...f.
|
|
60
|
+
issues.createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: "Recorded prerequisite" })
|
|
61
61
|
);
|
|
62
62
|
assert.ok(f.rows.has(20));
|
|
63
63
|
f.controls.failAdd = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/issue63Routes.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { spawnSync } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\nimport { afterEach, test, vi } from 'vitest';\nimport * as settings from './config/deliveryConfig.js';\nimport * as issues from './issue.js';\nimport { executeTool, resumedIssueUpdate } from './dispatch.js';\nimport { getAiDeliveryMcpTool } from './mcp/tools.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\n\nafterEach(() => vi.restoreAllMocks());\nconst execution = { repoRoot: '/unrelated', repo: 'example/widget' };\nfunction routes() {\n const f = issue63Fixture();\n vi.spyOn(settings, 'loadDeliverySettings').mockResolvedValue({\n roles: { author: { identity: 'author', authSource: 'personal' }, reviewer: { identity: 'reviewer' } },\n } as unknown as Awaited<ReturnType<typeof settings.loadDeliverySettings>>);\n const load = vi.spyOn(issues, 'loadDeliveryContext').mockResolvedValue(f.context);\n return { f, load };\n}\ntest('public update/create schemas preserve guard fields and refuse invalid reasons', async () => {\n const { f, load } = routes();\n const input = { issueNumber: 17, blockedBy: [18], overrideReason: 'Explicit prerequisite' };\n await executeTool('issue_update', input, execution);\n assert.equal(f.comments.length, 1);\n assert.equal(load.mock.calls[0]![0].repository, 'example/widget');\n assert.deepEqual(\n resumedIssueUpdate({\n repo: 'example/widget',\n issueNumber: 20,\n blocks: [17],\n overrideReason: 'Reason',\n resumeCreated: true,\n }),\n { issueNumber: 20, blocks: [17], overrideReason: 'Reason' },\n );\n const create = getAiDeliveryMcpTool('issue_create')!.inputSchema;\n assert.equal(create.safeParse({ ...f.
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,WAAW,MAAM,UAAU;AACpC,YAAY,cAAc;AAC1B,YAAY,YAAY;AACxB,SAAS,aAAa,0BAA0B;AAChD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAE/B,UAAU,MAAM,GAAG,gBAAgB,CAAC;AACpC,MAAM,YAAY,EAAE,UAAU,cAAc,MAAM,iBAAiB;AACnE,SAAS,SAAS;AAChB,QAAM,IAAI,eAAe;AACzB,KAAG,MAAM,UAAU,sBAAsB,EAAE,kBAAkB;AAAA,IAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,UAAU,YAAY,WAAW,GAAG,UAAU,EAAE,UAAU,WAAW,EAAE;AAAA,EACtG,CAAyE;AACzE,QAAM,OAAO,GAAG,MAAM,QAAQ,qBAAqB,EAAE,kBAAkB,EAAE,OAAO;AAChF,SAAO,EAAE,GAAG,KAAK;AACnB;AACA,KAAK,iFAAiF,YAAY;AAChG,QAAM,EAAE,GAAG,KAAK,IAAI,OAAO;AAC3B,QAAM,QAAQ,EAAE,aAAa,IAAI,WAAW,CAAC,EAAE,GAAG,gBAAgB,wBAAwB;AAC1F,QAAM,YAAY,gBAAgB,OAAO,SAAS;AAClD,SAAO,MAAM,EAAE,SAAS,QAAQ,CAAC;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,CAAC,EAAG,CAAC,EAAE,YAAY,gBAAgB;AAChE,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ,CAAC,EAAE;AAAA,MACX,gBAAgB;AAAA,MAChB,eAAe;AAAA,IACjB,CAAC;AAAA,IACD,EAAE,aAAa,IAAI,QAAQ,CAAC,EAAE,GAAG,gBAAgB,SAAS;AAAA,EAC5D;AACA,QAAM,SAAS,qBAAqB,cAAc,EAAG;AACrD,SAAO,MAAM,OAAO,UAAU,EAAE,GAAG,EAAE,
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { spawnSync } from 'node:child_process';\nimport { fileURLToPath } from 'node:url';\nimport { afterEach, test, vi } from 'vitest';\nimport * as settings from './config/deliveryConfig.js';\nimport * as issues from './issue.js';\nimport { executeTool, resumedIssueUpdate } from './dispatch.js';\nimport { getAiDeliveryMcpTool } from './mcp/tools.js';\nimport { issue63Fixture } from './fixtures/issue63.js';\n\nafterEach(() => vi.restoreAllMocks());\nconst execution = { repoRoot: '/unrelated', repo: 'example/widget' };\nfunction routes() {\n const f = issue63Fixture();\n vi.spyOn(settings, 'loadDeliverySettings').mockResolvedValue({\n roles: { author: { identity: 'author', authSource: 'personal' }, reviewer: { identity: 'reviewer' } },\n } as unknown as Awaited<ReturnType<typeof settings.loadDeliverySettings>>);\n const load = vi.spyOn(issues, 'loadDeliveryContext').mockResolvedValue(f.context);\n return { f, load };\n}\ntest('public update/create schemas preserve guard fields and refuse invalid reasons', async () => {\n const { f, load } = routes();\n const input = { issueNumber: 17, blockedBy: [18], overrideReason: 'Explicit prerequisite' };\n await executeTool('issue_update', input, execution);\n assert.equal(f.comments.length, 1);\n assert.equal(load.mock.calls[0]![0].repository, 'example/widget');\n assert.deepEqual(\n resumedIssueUpdate({\n repo: 'example/widget',\n issueNumber: 20,\n blocks: [17],\n overrideReason: 'Reason',\n resumeCreated: true,\n }),\n { issueNumber: 20, blocks: [17], overrideReason: 'Reason' },\n );\n const create = getAiDeliveryMcpTool('issue_create')!.inputSchema;\n assert.equal(create.safeParse({ ...f.createInput, blocks: [17], overrideReason: 'Reason' }).success, true);\n assert.throws(() => create.parse({ ...f.createInput, blocks: [17], overrideReason: ' '.repeat(4) }));\n assert.throws(() =>\n getAiDeliveryMcpTool('issue_update')!.inputSchema.parse({ ...input, overrideReason: 'x'.repeat(2001) }),\n );\n});\ntest('actual CLI declares guard fields on every alias', { tags: ['release'] }, () => {\n const cli = fileURLToPath(new URL('./cli.js', import.meta.url));\n for (const command of ['create', 'start', 'update']) {\n const result = spawnSync(process.execPath, ['--max-old-space-size=96', cli, command, '--help'], {\n encoding: 'utf8',\n timeout: 5000,\n maxBuffer: 64 * 1024,\n });\n assert.equal(result.status, 0, result.stderr);\n assert.match(result.stdout, /--blocks/u);\n assert.match(result.stdout, /--override-reason/u);\n }\n});\n\ntest('actual issue_start recovery executes guarded reciprocal tracking against the known created issue', async () => {\n const { f } = routes();\n f.controls.failAdd = true;\n await assert.rejects(\n issues.createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: 'Recorded prerequisite' }),\n );\n assert.ok(f.rows.has(20));\n f.controls.failAdd = false;\n vi.spyOn(issues, 'startIssueBranch').mockResolvedValue({\n issueNumber: 20,\n issueUrl: 'https://github.com/example/widget/issues/20',\n branch: 'issue/20',\n headSha: 'a'.repeat(40),\n reused: false,\n });\n vi.spyOn(issues, 'journalIssueStart').mockResolvedValue({\n commentId: 1,\n url: 'https://github.com/example/widget/issues/20#issuecomment-1',\n body: 'Start',\n reused: false,\n });\n const result = (await executeTool(\n 'issue_start',\n {\n repo: 'example/widget',\n issueNumber: 20,\n resumeCreated: true,\n blocks: [17],\n overrideReason: 'Recorded prerequisite',\n },\n execution,\n )) as { issueNumber: number };\n assert.equal(result.issueNumber, 20);\n assert.equal(f.rows.size, 4);\n assert.deepEqual([...f.edges.get(17)!], [20]);\n assert.equal(f.comments.length, 1);\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,WAAW,MAAM,UAAU;AACpC,YAAY,cAAc;AAC1B,YAAY,YAAY;AACxB,SAAS,aAAa,0BAA0B;AAChD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAE/B,UAAU,MAAM,GAAG,gBAAgB,CAAC;AACpC,MAAM,YAAY,EAAE,UAAU,cAAc,MAAM,iBAAiB;AACnE,SAAS,SAAS;AAChB,QAAM,IAAI,eAAe;AACzB,KAAG,MAAM,UAAU,sBAAsB,EAAE,kBAAkB;AAAA,IAC3D,OAAO,EAAE,QAAQ,EAAE,UAAU,UAAU,YAAY,WAAW,GAAG,UAAU,EAAE,UAAU,WAAW,EAAE;AAAA,EACtG,CAAyE;AACzE,QAAM,OAAO,GAAG,MAAM,QAAQ,qBAAqB,EAAE,kBAAkB,EAAE,OAAO;AAChF,SAAO,EAAE,GAAG,KAAK;AACnB;AACA,KAAK,iFAAiF,YAAY;AAChG,QAA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{ issue63Fixture as guardFixture } from "./fixtures/issue63.js";
|
|
|
5
5
|
test("forward creation reads a known Blocked item when its list status projection is empty", async () => {
|
|
6
6
|
const f = guardFixture();
|
|
7
7
|
f.controls.missingProjectStatus = 20;
|
|
8
|
-
const result = await createIssue(f.context, { ...f.
|
|
8
|
+
const result = await createIssue(f.context, { ...f.createInput, blockedBy: [18] });
|
|
9
9
|
assert.equal(result.created.number, 20);
|
|
10
10
|
assert.equal(result.created.url, "https://github.com/example/widget/issues/20");
|
|
11
11
|
assert.deepEqual([...f.edges.get(20)], [18]);
|
|
@@ -24,7 +24,7 @@ test("a forward dependency failure preserves the created issue and update repair
|
|
|
24
24
|
const f = guardFixture();
|
|
25
25
|
f.controls.missingProjectStatus = 20;
|
|
26
26
|
f.controls.failAdd = true;
|
|
27
|
-
await assert.rejects(createIssue(f.context, { ...f.
|
|
27
|
+
await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), (error) => {
|
|
28
28
|
assert.ok(error instanceof CreatedTrackingIssueError);
|
|
29
29
|
assert.deepEqual(error.created, {
|
|
30
30
|
number: 20,
|
|
@@ -91,7 +91,7 @@ test("new blocker on active work refuses before every affected write without an
|
|
|
91
91
|
test("reciprocal creation preflights the active dependent before creating an issue", async () => {
|
|
92
92
|
const f = guardFixture();
|
|
93
93
|
await assert.rejects(
|
|
94
|
-
createIssue(f.context, { ...f.
|
|
94
|
+
createIssue(f.context, { ...f.createInput, blocks: [17] }),
|
|
95
95
|
/overrideReason/u
|
|
96
96
|
);
|
|
97
97
|
assert.deepEqual(f.writes, []);
|
|
@@ -200,7 +200,7 @@ test("reciprocal create preserves unrelated edges and provides known-created rec
|
|
|
200
200
|
f.edges.get(17).add(19);
|
|
201
201
|
f.controls.failAdd = true;
|
|
202
202
|
await assert.rejects(
|
|
203
|
-
createIssue(f.context, { ...f.
|
|
203
|
+
createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: "New prerequisite" }),
|
|
204
204
|
(error) => error instanceof CreatedTrackingIssueError && error.created.number === 20
|
|
205
205
|
);
|
|
206
206
|
assert.deepEqual([...f.edges.get(17)], [19]);
|
|
@@ -214,7 +214,7 @@ test("forward create refuses PR and foreign endpoint identities before creation"
|
|
|
214
214
|
for (const bad of [{ pull_request: {} }, { html_url: "https://github.com/foreign/repo/issues/18" }, { number: 19 }]) {
|
|
215
215
|
const f = guardFixture();
|
|
216
216
|
Object.assign(f.rows.get(18), bad);
|
|
217
|
-
await assert.rejects(createIssue(f.context, { ...f.
|
|
217
|
+
await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), /endpoint|repository issue/u);
|
|
218
218
|
assert.deepEqual(f.writes, []);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/issueBlockerGuard.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { updateIssue, createIssue, CreatedTrackingIssueError } from './issue.js';\nimport { issue63Fixture as guardFixture } from './fixtures/issue63.js';\n\ntest('forward creation reads a known Blocked item when its list status projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n const result = await createIssue(f.context, { ...f.ready, blockedBy: [18] });\n assert.equal(result.created.number, 20);\n assert.equal(result.created.url, 'https://github.com/example/widget/issues/20');\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('add'));\n assert.deepEqual(\n f.graphqlCalls.filter((call) => call.query.includes('addBlockedBy')).map((call) => call.variables),\n [{ blocking: 'ISSUE18', issue: 'ISSUE20' }],\n );\n const reads = f.graphqlCalls.filter((call) => call.query.includes('ProjectDeliveryItemReadback'));\n assert.ok(reads.length >= 2, 'Status synchronization and dependency guard must read the exact item.');\n assert.ok(reads.every((call) => call.variables.itemId === 'ITEM20' && call.variables.statusField === 'Flow'));\n assert.equal(f.comments.length, 0);\n});\n\ntest('a forward dependency failure preserves the created issue and update repairs its Blocked item', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n f.controls.failAdd = true;\n await assert.rejects(createIssue(f.context, { ...f.ready, blockedBy: [18] }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.created, {\n number: 20,\n title: f.ready.title,\n url: 'https://github.com/example/widget/issues/20',\n });\n assert.match(error.message, /Native add failed/u);\n assert.match(error.message, /Resume this known issue/u);\n return true;\n });\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.deepEqual([...f.edges.get(20)!], []);\n f.controls.failAdd = false;\n const repaired = await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(repaired.issueNumber, 20);\n assert.equal(repaired.projectStatus, 'Blocked');\n assert.deepEqual(repaired.blockedBy, [18]);\n await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(f.writes.filter((write) => write === 'create').length, 1);\n assert.equal(f.writes.filter((write) => write === 'add').length, 1);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n});\n\ntest('an exact active item still requires an override when the list projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 17;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Wait for the newly identified prerequisite.',\n });\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('missing or contradictory exact item evidence refuses a dependency without writes', async () => {\n for (const readback of [\n { fieldValueByName: null },\n { isArchived: true },\n { id: 'ITEM18' },\n { project: { id: 'OTHER', number: 1 } },\n { project: { id: 'PROJECT', number: 2 } },\n { content: { id: 'ISSUE18' } },\n { fieldValueByName: { name: 'Waiting', optionId: 'ACTIVE' } },\n ]) {\n const f = guardFixture();\n f.statuses.set(17, 'Waiting');\n f.controls.missingProjectStatus = 17;\n f.controls.projectItemReadback = readback;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /Project/u);\n assert.deepEqual(f.writes, []);\n assert.deepEqual([...f.edges.get(17)!], []);\n }\n const absent = guardFixture();\n absent.controls.missingProjectIssue = 17;\n await assert.rejects(updateIssue(absent.context, { issueNumber: 17, blockedBy: [18] }), /unresolved/u);\n assert.deepEqual(absent.writes, []);\n});\n\ntest('new blocker on active work refuses before every affected write without an override reason', async () => {\n const f = guardFixture();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n});\n\ntest('reciprocal creation preflights the active dependent before creating an issue', async () => {\n const f = guardFixture();\n await assert.rejects(\n createIssue(f.context, { ...f.ready, blocks: [17] } as Parameters<typeof createIssue>[1]),\n /overrideReason/u,\n );\n assert.deepEqual(f.writes, []);\n});\n\ntest('an authorized active addition records verified evidence before the edge and retries once', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' }),\n /Native add failed/u,\n );\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const evidence = f.comments[0]!.body;\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' });\n assert.equal(f.comments.length, 1);\n assert.equal(f.comments[0]!.body, evidence);\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.ok(f.writes.indexOf('comment') < f.writes.indexOf('add'));\n});\ntest('verified evidence conflicts and comment readback drift refuse the native edge', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Original reason' }));\n f.controls.failAdd = false;\n const priorWrites = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Changed reason' }),\n /conflicts/u,\n );\n assert.deepEqual(f.writes, priorWrites);\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const other = guardFixture();\n other.controls.corruptComment = true;\n await assert.rejects(\n updateIssue(other.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Documented prerequisite' }),\n /readback/u,\n );\n assert.equal(other.edges.get(17)?.size, 0);\n});\ntest('actual additions are guarded after an initially existing edge disappears', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(18);\n f.controls.race = () => f.edges.get(17)!.clear();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\ntest('preflight active observation remains sticky after a concurrent status change', async () => {\n const f = guardFixture();\n f.controls.race = () => f.statuses.set(17, 'Queued');\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Required despite concurrent parking',\n });\n assert.equal(f.comments.length, 1);\n assert.match(f.comments[0]!.body, /In Progress/u);\n});\ntest('inactive addition needs no override while a newly active dependent is guarded', async () => {\n const f = guardFixture();\n f.statuses.set(17, 'Queued');\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18] });\n assert.equal(f.comments.length, 0);\n const race = guardFixture();\n race.statuses.set(17, 'Queued');\n race.controls.race = () => race.statuses.set(17, 'Active');\n await assert.rejects(updateIssue(race.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.ok(!race.writes.includes('add'));\n});\ntest('remove and re-add uses a new native removal episode', async () => {\n const f = guardFixture();\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'First episode' });\n f.edges.get(17)!.clear();\n f.statuses.set(17, 'Active');\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'REMOVE1',\n createdAt: '2026-01-02T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Second episode' });\n assert.equal(f.comments.length, 2);\n assert.match(f.comments[1]!.body, /REMOVE1/u);\n});\ntest('incomplete active history and unavailable author refuse before writes', async () => {\n const f = guardFixture();\n f.controls.timelineIncomplete = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const noAuthor = guardFixture();\n noAuthor.controls.actor = '';\n await assert.rejects(\n updateIssue(noAuthor.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Author unavailable/u,\n );\n assert.deepEqual(noAuthor.writes, []);\n});\ntest('reciprocal create preserves unrelated edges and provides known-created recovery', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(19);\n f.controls.failAdd = true;\n await assert.rejects(\n createIssue(f.context, { ...f.ready, blocks: [17], overrideReason: 'New prerequisite' }),\n (error) => error instanceof CreatedTrackingIssueError && error.created.number === 20,\n );\n assert.deepEqual([...f.edges.get(17)!], [19]);\n assert.equal(f.comments.length, 1);\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 20, blocks: [17], overrideReason: 'New prerequisite' });\n assert.deepEqual([...f.edges.get(17)!], [19, 20]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('forward create refuses PR and foreign endpoint identities before creation', async () => {\n for (const bad of [{ pull_request: {} }, { html_url: 'https://github.com/foreign/repo/issues/18' }, { number: 19 }]) {\n const f = guardFixture();\n Object.assign(f.rows.get(18)!, bad);\n await assert.rejects(createIssue(f.context, { ...f.ready, blockedBy: [18] }), /endpoint|repository issue/u);\n assert.deepEqual(f.writes, []);\n }\n});\ntest('missing blocker identity and ambiguous removal history refuse during preflight', async () => {\n const f = guardFixture();\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'R',\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: null,\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const ambiguous = guardFixture();\n for (const id of ['R1', 'R2'])\n ambiguous.history.push({\n __typename: 'BlockedByRemovedEvent',\n id,\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(ambiguous.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /ambiguous/u,\n );\n assert.deepEqual(ambiguous.writes, []);\n});\ntest('a removal during comment readback refuses authority from the earlier episode', async () => {\n const f = guardFixture();\n f.controls.commentRace = () =>\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'LATER',\n createdAt: '2026-01-03T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /episode changed/u,\n );\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\n\ntest('duplicate authority markers are refused before another content write', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }));\n f.comments.push({ ...f.comments[0]!, id: 999 });\n f.controls.failAdd = false;\n const before = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /duplicate/u,\n );\n assert.deepEqual(f.writes, before);\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,aAAa,iCAAiC;AACpE,SAAS,kBAAkB,oBAAoB;AAE/C,KAAK,wFAAwF,YAAY;AACvG,QAAM,IAAI,aAAa;AACvB,IAAE,SAAS,uBAAuB;AAClC,QAAM,SAAS,MAAM,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { test } from 'vitest';\nimport { updateIssue, createIssue, CreatedTrackingIssueError } from './issue.js';\nimport { issue63Fixture as guardFixture } from './fixtures/issue63.js';\n\ntest('forward creation reads a known Blocked item when its list status projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n const result = await createIssue(f.context, { ...f.createInput, blockedBy: [18] });\n assert.equal(result.created.number, 20);\n assert.equal(result.created.url, 'https://github.com/example/widget/issues/20');\n assert.deepEqual([...f.edges.get(20)!], [18]);\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.ok(f.writes.indexOf('status') < f.writes.indexOf('add'));\n assert.deepEqual(\n f.graphqlCalls.filter((call) => call.query.includes('addBlockedBy')).map((call) => call.variables),\n [{ blocking: 'ISSUE18', issue: 'ISSUE20' }],\n );\n const reads = f.graphqlCalls.filter((call) => call.query.includes('ProjectDeliveryItemReadback'));\n assert.ok(reads.length >= 2, 'Status synchronization and dependency guard must read the exact item.');\n assert.ok(reads.every((call) => call.variables.itemId === 'ITEM20' && call.variables.statusField === 'Flow'));\n assert.equal(f.comments.length, 0);\n});\n\ntest('a forward dependency failure preserves the created issue and update repairs its Blocked item', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 20;\n f.controls.failAdd = true;\n await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), (error) => {\n assert.ok(error instanceof CreatedTrackingIssueError);\n assert.deepEqual(error.created, {\n number: 20,\n title: f.ready.title,\n url: 'https://github.com/example/widget/issues/20',\n });\n assert.match(error.message, /Native add failed/u);\n assert.match(error.message, /Resume this known issue/u);\n return true;\n });\n assert.equal(f.statuses.get(20), 'Waiting');\n assert.deepEqual([...f.edges.get(20)!], []);\n f.controls.failAdd = false;\n const repaired = await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(repaired.issueNumber, 20);\n assert.equal(repaired.projectStatus, 'Blocked');\n assert.deepEqual(repaired.blockedBy, [18]);\n await updateIssue(f.context, { issueNumber: 20, blockedBy: [18] });\n assert.equal(f.writes.filter((write) => write === 'create').length, 1);\n assert.equal(f.writes.filter((write) => write === 'add').length, 1);\n assert.deepEqual([...f.edges.get(20)!], [18]);\n});\n\ntest('an exact active item still requires an override when the list projection is empty', async () => {\n const f = guardFixture();\n f.controls.missingProjectStatus = 17;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Wait for the newly identified prerequisite.',\n });\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('missing or contradictory exact item evidence refuses a dependency without writes', async () => {\n for (const readback of [\n { fieldValueByName: null },\n { isArchived: true },\n { id: 'ITEM18' },\n { project: { id: 'OTHER', number: 1 } },\n { project: { id: 'PROJECT', number: 2 } },\n { content: { id: 'ISSUE18' } },\n { fieldValueByName: { name: 'Waiting', optionId: 'ACTIVE' } },\n ]) {\n const f = guardFixture();\n f.statuses.set(17, 'Waiting');\n f.controls.missingProjectStatus = 17;\n f.controls.projectItemReadback = readback;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /Project/u);\n assert.deepEqual(f.writes, []);\n assert.deepEqual([...f.edges.get(17)!], []);\n }\n const absent = guardFixture();\n absent.controls.missingProjectIssue = 17;\n await assert.rejects(updateIssue(absent.context, { issueNumber: 17, blockedBy: [18] }), /unresolved/u);\n assert.deepEqual(absent.writes, []);\n});\n\ntest('new blocker on active work refuses before every affected write without an override reason', async () => {\n const f = guardFixture();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.deepEqual(f.writes, []);\n});\n\ntest('reciprocal creation preflights the active dependent before creating an issue', async () => {\n const f = guardFixture();\n await assert.rejects(\n createIssue(f.context, { ...f.createInput, blocks: [17] } as Parameters<typeof createIssue>[1]),\n /overrideReason/u,\n );\n assert.deepEqual(f.writes, []);\n});\n\ntest('an authorized active addition records verified evidence before the edge and retries once', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' }),\n /Native add failed/u,\n );\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const evidence = f.comments[0]!.body;\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Await prerequisite validation.' });\n assert.equal(f.comments.length, 1);\n assert.equal(f.comments[0]!.body, evidence);\n assert.deepEqual([...f.edges.get(17)!], [18]);\n assert.ok(f.writes.indexOf('comment') < f.writes.indexOf('add'));\n});\ntest('verified evidence conflicts and comment readback drift refuse the native edge', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Original reason' }));\n f.controls.failAdd = false;\n const priorWrites = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Changed reason' }),\n /conflicts/u,\n );\n assert.deepEqual(f.writes, priorWrites);\n assert.equal(f.comments.length, 1);\n assert.equal(f.edges.get(17)?.size, 0);\n const other = guardFixture();\n other.controls.corruptComment = true;\n await assert.rejects(\n updateIssue(other.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Documented prerequisite' }),\n /readback/u,\n );\n assert.equal(other.edges.get(17)?.size, 0);\n});\ntest('actual additions are guarded after an initially existing edge disappears', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(18);\n f.controls.race = () => f.edges.get(17)!.clear();\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\ntest('preflight active observation remains sticky after a concurrent status change', async () => {\n const f = guardFixture();\n f.controls.race = () => f.statuses.set(17, 'Queued');\n await updateIssue(f.context, {\n issueNumber: 17,\n blockedBy: [18],\n overrideReason: 'Required despite concurrent parking',\n });\n assert.equal(f.comments.length, 1);\n assert.match(f.comments[0]!.body, /In Progress/u);\n});\ntest('inactive addition needs no override while a newly active dependent is guarded', async () => {\n const f = guardFixture();\n f.statuses.set(17, 'Queued');\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18] });\n assert.equal(f.comments.length, 0);\n const race = guardFixture();\n race.statuses.set(17, 'Queued');\n race.controls.race = () => race.statuses.set(17, 'Active');\n await assert.rejects(updateIssue(race.context, { issueNumber: 17, blockedBy: [18] }), /overrideReason/u);\n assert.ok(!race.writes.includes('add'));\n});\ntest('remove and re-add uses a new native removal episode', async () => {\n const f = guardFixture();\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'First episode' });\n f.edges.get(17)!.clear();\n f.statuses.set(17, 'Active');\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'REMOVE1',\n createdAt: '2026-01-02T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Second episode' });\n assert.equal(f.comments.length, 2);\n assert.match(f.comments[1]!.body, /REMOVE1/u);\n});\ntest('incomplete active history and unavailable author refuse before writes', async () => {\n const f = guardFixture();\n f.controls.timelineIncomplete = true;\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const noAuthor = guardFixture();\n noAuthor.controls.actor = '';\n await assert.rejects(\n updateIssue(noAuthor.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Author unavailable/u,\n );\n assert.deepEqual(noAuthor.writes, []);\n});\ntest('reciprocal create preserves unrelated edges and provides known-created recovery', async () => {\n const f = guardFixture();\n f.edges.get(17)!.add(19);\n f.controls.failAdd = true;\n await assert.rejects(\n createIssue(f.context, { ...f.createInput, blocks: [17], overrideReason: 'New prerequisite' }),\n (error) => error instanceof CreatedTrackingIssueError && error.created.number === 20,\n );\n assert.deepEqual([...f.edges.get(17)!], [19]);\n assert.equal(f.comments.length, 1);\n f.controls.failAdd = false;\n await updateIssue(f.context, { issueNumber: 20, blocks: [17], overrideReason: 'New prerequisite' });\n assert.deepEqual([...f.edges.get(17)!], [19, 20]);\n assert.equal(f.comments.length, 1);\n});\n\ntest('forward create refuses PR and foreign endpoint identities before creation', async () => {\n for (const bad of [{ pull_request: {} }, { html_url: 'https://github.com/foreign/repo/issues/18' }, { number: 19 }]) {\n const f = guardFixture();\n Object.assign(f.rows.get(18)!, bad);\n await assert.rejects(createIssue(f.context, { ...f.createInput, blockedBy: [18] }), /endpoint|repository issue/u);\n assert.deepEqual(f.writes, []);\n }\n});\ntest('missing blocker identity and ambiguous removal history refuse during preflight', async () => {\n const f = guardFixture();\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'R',\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: null,\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /Complete dependency history/u,\n );\n assert.deepEqual(f.writes, []);\n const ambiguous = guardFixture();\n for (const id of ['R1', 'R2'])\n ambiguous.history.push({\n __typename: 'BlockedByRemovedEvent',\n id,\n createdAt: '2026-01-01T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(ambiguous.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /ambiguous/u,\n );\n assert.deepEqual(ambiguous.writes, []);\n});\ntest('a removal during comment readback refuses authority from the earlier episode', async () => {\n const f = guardFixture();\n f.controls.commentRace = () =>\n f.history.push({\n __typename: 'BlockedByRemovedEvent',\n id: 'LATER',\n createdAt: '2026-01-03T00:00:00Z',\n blockingIssue: { id: 'ISSUE18', number: 18, repository: { nameWithOwner: 'example/widget' } },\n });\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /episode changed/u,\n );\n assert.equal(f.edges.get(17)?.size, 0);\n assert.ok(!f.writes.includes('add'));\n});\n\ntest('duplicate authority markers are refused before another content write', async () => {\n const f = guardFixture();\n f.controls.failAdd = true;\n await assert.rejects(updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }));\n f.comments.push({ ...f.comments[0]!, id: 999 });\n f.controls.failAdd = false;\n const before = [...f.writes];\n await assert.rejects(\n updateIssue(f.context, { issueNumber: 17, blockedBy: [18], overrideReason: 'Reason' }),\n /duplicate/u,\n );\n assert.deepEqual(f.writes, before);\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,aAAa,aAAa,iCAAiC;AACpE,SAAS,kBAAkB,oBAAoB;AAE/C,KAAK,wFAAwF,YAAY;AACvG,QAAM,IAAI,aAAa;AACvB,IAAE,SAAS,uBAAuB;AAClC,QAAM,SAAS,MAAM,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,WAAW,CAAC,EAAE,EAAE,CAAC;AACjF,SAAO,MAAM,OAAO,QAAQ,QAAQ,EAAE;AACtC,SAAO,MAAM,OAAO,QAAQ,KAAK,6CAA6C;AAC9E,SAAO,UAAU,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,CAAE,GAAG,CAAC,EAAE,CAAC;AAC5C,SAAO,MAAM,EAAE,SAAS,IAAI,EAAE,GAAG,SAAS;AAC1C,SAAO,GAAG,EAAE,OAAO,QAAQ,QAAQ,IAAI,EAAE,OAAO,QAAQ,KAAK,CAAC;AAC9D,SAAO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AQ,YAAY,EAAE,SAAS,EAAE,aAAa,IAAI,WAAW,CAAC,EAAE,GAAG,gBAAgB,SAAS,CAAC,CAAC;AAC3G,IAAE,SAAS,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,GAAI,IAAI,IAAI,CAAC;AAC9C,IAAE,SAAS,UAAU;AACrB,QAAM,SAAS,CAAC,GAAG,EAAE,MAAM;AAC3B,QAAM,OAAO;AAAA,IACX,YAAY,EAAE,SAAS,EAAE,aAAa,IAAI,WAAW,CAAC,EAAE,GAAG,gBAAgB,SAAS,CAAC;AAAA,IACrF;AAAA,EACF;AACA,SAAO,UAAU,EAAE,QAAQ,MAAM;AACnC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/issueContract.d.ts
CHANGED
|
@@ -4,6 +4,38 @@ export declare const ISSUE_CONTRACT_VERSION: 'ai-delivery.issue@1';
|
|
|
4
4
|
export declare const ISSUE_BODY_MARKER = "<!-- ai-delivery:issue@1 -->";
|
|
5
5
|
export declare function issueStartFooter(body: string): string;
|
|
6
6
|
export declare function issueTrackingFooter(body: string): string;
|
|
7
|
+
export declare const IssueExample: z.ZodObject<{
|
|
8
|
+
input: z.ZodString;
|
|
9
|
+
expected: z.ZodString;
|
|
10
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const FrontierReason: z.ZodEnum<{
|
|
13
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
14
|
+
"risk-semantics": "risk-semantics";
|
|
15
|
+
"state-machine": "state-machine";
|
|
16
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
17
|
+
}>;
|
|
18
|
+
export declare const BuilderTier: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
tier: z.ZodLiteral<"standard">;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
tier: z.ZodLiteral<"frontier">;
|
|
22
|
+
reason: z.ZodEnum<{
|
|
23
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
24
|
+
"risk-semantics": "risk-semantics";
|
|
25
|
+
"state-machine": "state-machine";
|
|
26
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
27
|
+
}>;
|
|
28
|
+
}, z.core.$strict>], "tier">;
|
|
29
|
+
export type BuilderTierData = z.infer<typeof BuilderTier>;
|
|
30
|
+
export declare const SurfaceEntry: z.ZodObject<{
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
change: z.ZodEnum<{
|
|
33
|
+
add: "add";
|
|
34
|
+
delete: "delete";
|
|
35
|
+
edit: "edit";
|
|
36
|
+
}>;
|
|
37
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
7
39
|
export declare const IssueDeferral: z.ZodObject<{
|
|
8
40
|
until: z.ZodOptional<z.ZodISODate>;
|
|
9
41
|
trigger: z.ZodOptional<z.ZodString>;
|
|
@@ -31,6 +63,11 @@ export declare const IssueFields: z.ZodObject<{
|
|
|
31
63
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
32
64
|
behavior: z.ZodString;
|
|
33
65
|
verifiedBy: z.ZodString;
|
|
66
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
input: z.ZodString;
|
|
68
|
+
expected: z.ZodString;
|
|
69
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
70
|
+
}, z.core.$strict>>>;
|
|
34
71
|
}, z.core.$strict>>>;
|
|
35
72
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
73
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -51,6 +88,30 @@ export declare const IssueFields: z.ZodObject<{
|
|
|
51
88
|
until: z.ZodOptional<z.ZodISODate>;
|
|
52
89
|
trigger: z.ZodOptional<z.ZodString>;
|
|
53
90
|
}, z.core.$strict>>;
|
|
91
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
+
tier: z.ZodLiteral<"standard">;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
tier: z.ZodLiteral<"frontier">;
|
|
95
|
+
reason: z.ZodEnum<{
|
|
96
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
97
|
+
"risk-semantics": "risk-semantics";
|
|
98
|
+
"state-machine": "state-machine";
|
|
99
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
100
|
+
}>;
|
|
101
|
+
}, z.core.$strict>], "tier">>;
|
|
102
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
103
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
path: z.ZodString;
|
|
106
|
+
change: z.ZodEnum<{
|
|
107
|
+
add: "add";
|
|
108
|
+
delete: "delete";
|
|
109
|
+
edit: "edit";
|
|
110
|
+
}>;
|
|
111
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
}, z.core.$strict>>>;
|
|
113
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
115
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
55
116
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
56
117
|
}, z.core.$strict>;
|
|
@@ -101,6 +162,11 @@ export declare const DraftIssue: z.ZodObject<{
|
|
|
101
162
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
102
163
|
behavior: z.ZodString;
|
|
103
164
|
verifiedBy: z.ZodString;
|
|
165
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
+
input: z.ZodString;
|
|
167
|
+
expected: z.ZodString;
|
|
168
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
169
|
+
}, z.core.$strict>>>;
|
|
104
170
|
}, z.core.$strict>>>;
|
|
105
171
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
106
172
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -121,6 +187,30 @@ export declare const DraftIssue: z.ZodObject<{
|
|
|
121
187
|
until: z.ZodOptional<z.ZodISODate>;
|
|
122
188
|
trigger: z.ZodOptional<z.ZodString>;
|
|
123
189
|
}, z.core.$strict>>;
|
|
190
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
191
|
+
tier: z.ZodLiteral<"standard">;
|
|
192
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
193
|
+
tier: z.ZodLiteral<"frontier">;
|
|
194
|
+
reason: z.ZodEnum<{
|
|
195
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
196
|
+
"risk-semantics": "risk-semantics";
|
|
197
|
+
"state-machine": "state-machine";
|
|
198
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
199
|
+
}>;
|
|
200
|
+
}, z.core.$strict>], "tier">>;
|
|
201
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
202
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
203
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
path: z.ZodString;
|
|
205
|
+
change: z.ZodEnum<{
|
|
206
|
+
add: "add";
|
|
207
|
+
delete: "delete";
|
|
208
|
+
edit: "edit";
|
|
209
|
+
}>;
|
|
210
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
+
}, z.core.$strict>>>;
|
|
212
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
214
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
125
215
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
126
216
|
}, z.core.$strict>;
|
|
@@ -145,6 +235,30 @@ export declare const ReadyIssue: z.ZodObject<{
|
|
|
145
235
|
until: z.ZodOptional<z.ZodISODate>;
|
|
146
236
|
trigger: z.ZodOptional<z.ZodString>;
|
|
147
237
|
}, z.core.$strict>>;
|
|
238
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
239
|
+
tier: z.ZodLiteral<"standard">;
|
|
240
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
241
|
+
tier: z.ZodLiteral<"frontier">;
|
|
242
|
+
reason: z.ZodEnum<{
|
|
243
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
244
|
+
"risk-semantics": "risk-semantics";
|
|
245
|
+
"state-machine": "state-machine";
|
|
246
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
247
|
+
}>;
|
|
248
|
+
}, z.core.$strict>], "tier">>;
|
|
249
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
252
|
+
path: z.ZodString;
|
|
253
|
+
change: z.ZodEnum<{
|
|
254
|
+
add: "add";
|
|
255
|
+
delete: "delete";
|
|
256
|
+
edit: "edit";
|
|
257
|
+
}>;
|
|
258
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
}, z.core.$strict>>>;
|
|
260
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
261
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
262
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
149
263
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
150
264
|
title: z.ZodString;
|
|
@@ -154,6 +268,11 @@ export declare const ReadyIssue: z.ZodObject<{
|
|
|
154
268
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
155
269
|
behavior: z.ZodString;
|
|
156
270
|
verifiedBy: z.ZodString;
|
|
271
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
272
|
+
input: z.ZodString;
|
|
273
|
+
expected: z.ZodString;
|
|
274
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
275
|
+
}, z.core.$strict>>>;
|
|
157
276
|
}, z.core.$strict>>;
|
|
158
277
|
outOfScope: z.ZodArray<z.ZodString>;
|
|
159
278
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -173,6 +292,11 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
173
292
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
174
293
|
behavior: z.ZodString;
|
|
175
294
|
verifiedBy: z.ZodString;
|
|
295
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
296
|
+
input: z.ZodString;
|
|
297
|
+
expected: z.ZodString;
|
|
298
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
299
|
+
}, z.core.$strict>>>;
|
|
176
300
|
}, z.core.$strict>>>;
|
|
177
301
|
outOfScope: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
178
302
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -193,6 +317,30 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
193
317
|
until: z.ZodOptional<z.ZodISODate>;
|
|
194
318
|
trigger: z.ZodOptional<z.ZodString>;
|
|
195
319
|
}, z.core.$strict>>;
|
|
320
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
321
|
+
tier: z.ZodLiteral<"standard">;
|
|
322
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
323
|
+
tier: z.ZodLiteral<"frontier">;
|
|
324
|
+
reason: z.ZodEnum<{
|
|
325
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
326
|
+
"risk-semantics": "risk-semantics";
|
|
327
|
+
"state-machine": "state-machine";
|
|
328
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
329
|
+
}>;
|
|
330
|
+
}, z.core.$strict>], "tier">>;
|
|
331
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
332
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
|
+
path: z.ZodString;
|
|
335
|
+
change: z.ZodEnum<{
|
|
336
|
+
add: "add";
|
|
337
|
+
delete: "delete";
|
|
338
|
+
edit: "edit";
|
|
339
|
+
}>;
|
|
340
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
341
|
+
}, z.core.$strict>>>;
|
|
342
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
343
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
196
344
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
197
345
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
198
346
|
}, z.core.$strict>>;
|
|
@@ -215,6 +363,30 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
215
363
|
until: z.ZodOptional<z.ZodISODate>;
|
|
216
364
|
trigger: z.ZodOptional<z.ZodString>;
|
|
217
365
|
}, z.core.$strict>>;
|
|
366
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
367
|
+
tier: z.ZodLiteral<"standard">;
|
|
368
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
369
|
+
tier: z.ZodLiteral<"frontier">;
|
|
370
|
+
reason: z.ZodEnum<{
|
|
371
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
372
|
+
"risk-semantics": "risk-semantics";
|
|
373
|
+
"state-machine": "state-machine";
|
|
374
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
375
|
+
}>;
|
|
376
|
+
}, z.core.$strict>], "tier">>;
|
|
377
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
378
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
379
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
380
|
+
path: z.ZodString;
|
|
381
|
+
change: z.ZodEnum<{
|
|
382
|
+
add: "add";
|
|
383
|
+
delete: "delete";
|
|
384
|
+
edit: "edit";
|
|
385
|
+
}>;
|
|
386
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
387
|
+
}, z.core.$strict>>>;
|
|
388
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
389
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
390
|
legacyBody: z.ZodOptional<z.ZodString>;
|
|
219
391
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
220
392
|
title: z.ZodString;
|
|
@@ -224,6 +396,11 @@ export declare const ISSUE_JSON_SCHEMAS: {
|
|
|
224
396
|
acceptanceCriteria: z.ZodArray<z.ZodObject<{
|
|
225
397
|
behavior: z.ZodString;
|
|
226
398
|
verifiedBy: z.ZodString;
|
|
399
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
400
|
+
input: z.ZodString;
|
|
401
|
+
expected: z.ZodString;
|
|
402
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
403
|
+
}, z.core.$strict>>>;
|
|
227
404
|
}, z.core.$strict>>;
|
|
228
405
|
outOfScope: z.ZodArray<z.ZodString>;
|
|
229
406
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -241,6 +418,11 @@ export declare const IssueWriteFields: {
|
|
|
241
418
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
419
|
behavior: z.ZodString;
|
|
243
420
|
verifiedBy: z.ZodString;
|
|
421
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
422
|
+
input: z.ZodString;
|
|
423
|
+
expected: z.ZodString;
|
|
424
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
425
|
+
}, z.core.$strict>>>;
|
|
244
426
|
}, z.core.$strict>>>;
|
|
245
427
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
428
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -256,6 +438,30 @@ export declare const IssueWriteFields: {
|
|
|
256
438
|
reproducibility: z.ZodString;
|
|
257
439
|
environment: z.ZodString;
|
|
258
440
|
}, z.core.$strict>>;
|
|
441
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
442
|
+
tier: z.ZodLiteral<"standard">;
|
|
443
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
444
|
+
tier: z.ZodLiteral<"frontier">;
|
|
445
|
+
reason: z.ZodEnum<{
|
|
446
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
447
|
+
"risk-semantics": "risk-semantics";
|
|
448
|
+
"state-machine": "state-machine";
|
|
449
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
450
|
+
}>;
|
|
451
|
+
}, z.core.$strict>], "tier">>;
|
|
452
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
453
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
455
|
+
path: z.ZodString;
|
|
456
|
+
change: z.ZodEnum<{
|
|
457
|
+
add: "add";
|
|
458
|
+
delete: "delete";
|
|
459
|
+
edit: "edit";
|
|
460
|
+
}>;
|
|
461
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
462
|
+
}, z.core.$strict>>>;
|
|
463
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
464
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
465
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
260
466
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
261
467
|
};
|
|
@@ -269,6 +475,11 @@ export declare const IssueWriteSchema: z.ZodObject<{
|
|
|
269
475
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
476
|
behavior: z.ZodString;
|
|
271
477
|
verifiedBy: z.ZodString;
|
|
478
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
479
|
+
input: z.ZodString;
|
|
480
|
+
expected: z.ZodString;
|
|
481
|
+
failure: z.ZodOptional<z.ZodLiteral<true>>;
|
|
482
|
+
}, z.core.$strict>>>;
|
|
272
483
|
}, z.core.$strict>>>;
|
|
273
484
|
outOfScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
485
|
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -284,11 +495,37 @@ export declare const IssueWriteSchema: z.ZodObject<{
|
|
|
284
495
|
reproducibility: z.ZodString;
|
|
285
496
|
environment: z.ZodString;
|
|
286
497
|
}, z.core.$strict>>;
|
|
498
|
+
builder: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
499
|
+
tier: z.ZodLiteral<"standard">;
|
|
500
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
501
|
+
tier: z.ZodLiteral<"frontier">;
|
|
502
|
+
reason: z.ZodEnum<{
|
|
503
|
+
"concurrency-recovery": "concurrency-recovery";
|
|
504
|
+
"risk-semantics": "risk-semantics";
|
|
505
|
+
"state-machine": "state-machine";
|
|
506
|
+
"unprovable-refactor": "unprovable-refactor";
|
|
507
|
+
}>;
|
|
508
|
+
}, z.core.$strict>], "tier">>;
|
|
509
|
+
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
510
|
+
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
511
|
+
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
512
|
+
path: z.ZodString;
|
|
513
|
+
change: z.ZodEnum<{
|
|
514
|
+
add: "add";
|
|
515
|
+
delete: "delete";
|
|
516
|
+
edit: "edit";
|
|
517
|
+
}>;
|
|
518
|
+
signatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
519
|
+
}, z.core.$strict>>>;
|
|
520
|
+
fences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
521
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
522
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
288
523
|
retainLegacyBody: z.ZodOptional<z.ZodBoolean>;
|
|
289
524
|
}, z.core.$strict>;
|
|
290
525
|
/** Keep advertised structural schemas while returning domain diagnostics before SDK error wrapping. */
|
|
291
526
|
export declare function issueInputSchema<T extends z.ZodObject>(schema: T): T;
|
|
527
|
+
/** One refusal for unknown keys on every tool: list what is accepted, never echo the unknown key (#140). */
|
|
528
|
+
export declare function acceptedKeysError(issue: z.core.$ZodRawIssue): string | undefined;
|
|
292
529
|
export declare function validateIssue(value: unknown, ready?: boolean): {
|
|
293
530
|
issue?: DraftIssueData;
|
|
294
531
|
failures: IssueDiagnostic[];
|
|
@@ -297,7 +534,10 @@ export declare class IssueValidationError extends DeliveryError {
|
|
|
297
534
|
readonly failures: IssueDiagnostic[];
|
|
298
535
|
constructor(failures: IssueDiagnostic[]);
|
|
299
536
|
}
|
|
300
|
-
|
|
537
|
+
/** `requireBuilder` is set at Ready create and draft-to-Ready; legacy content updates never set it. */
|
|
538
|
+
export declare function requireIssue(value: unknown, options?: {
|
|
539
|
+
requireBuilder?: true;
|
|
540
|
+
}): DraftIssueData;
|
|
301
541
|
export declare function renderIssueBody(value: DraftIssueData, status?: IssueStatusData, legacyFormatting?: boolean): string;
|
|
302
542
|
/** Lenient conversion retains every legacy byte, and never invents verification or bug evidence. */
|
|
303
543
|
export declare function parseIssueBody(body: string, metadata: {
|
|
@@ -310,6 +550,6 @@ export declare function parseIssueBody(body: string, metadata: {
|
|
|
310
550
|
status?: IssueStatusData;
|
|
311
551
|
legacyFormatting?: boolean;
|
|
312
552
|
};
|
|
313
|
-
export declare function issueWarnings(issue: DraftIssueData
|
|
553
|
+
export declare function issueWarnings(issue: DraftIssueData): IssueDiagnostic[];
|
|
314
554
|
export declare function issueBodyDiff(before: string, after: string): string;
|
|
315
555
|
export {};
|