@aviaratech/ai-delivery 0.3.47 → 0.3.49
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 +1 -1
- package/dist/agentReadiness.test.js +12 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +2 -2
- package/dist/dispatch.js +6 -2
- package/dist/dispatch.js.map +2 -2
- package/dist/issue.js +1 -4
- package/dist/issue.js.map +2 -2
- package/dist/issueBatchUpdate.test.js +9 -1
- package/dist/issueBatchUpdate.test.js.map +2 -2
- package/dist/issueContract.js +7 -0
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.js +33 -0
- package/dist/issueContract.test.js.map +2 -2
- package/dist/mcp/index.js +16 -19
- package/dist/mcp/index.js.map +2 -2
- package/dist/pr.d.ts +2 -0
- package/dist/pr.js +6 -1
- package/dist/pr.js.map +2 -2
- package/dist/pr.test.js +44 -0
- package/dist/pr.test.js.map +2 -2
- package/dist/services/agentReadinessService.js +6 -2
- package/dist/services/agentReadinessService.js.map +2 -2
- package/dist/staleServer.test.d.ts +1 -0
- package/dist/staleServer.test.js +148 -0
- package/dist/staleServer.test.js.map +7 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +20 -1
- package/dist/version.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 +96 -96
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -117,4 +117,4 @@ Release still requires the exact mandatory archive inventory, complete release/c
|
|
|
117
117
|
|
|
118
118
|
Release is manual, main-only and uses npm trusted publishing. A packaged README edit changes the release candidate: retain accepted archives and independently qualify the new exact source/archive before dispatching.
|
|
119
119
|
|
|
120
|
-
Source version **0.3.
|
|
120
|
+
Source version **0.3.49** and green PR checks do not establish its qualification; see [#199](https://github.com/aviaratech/ai-delivery/issues/199). Wrappers and workflow definitions do not prove [#200](https://github.com/aviaratech/ai-delivery/issues/200)'s **under-60-second regular checks / under-five-minute qualification** targets. Functional removals and remaining documentation obligations stay with [#201](https://github.com/aviaratech/ai-delivery/issues/201).
|
|
@@ -114,4 +114,16 @@ test("an already-Ready issue with a local path, no Prior work and a long contrac
|
|
|
114
114
|
const codes = result.warnings.map((w) => w.code);
|
|
115
115
|
for (const code of ["priorWork", "local-path", "contract-words"]) assert.ok(codes.includes(code), code);
|
|
116
116
|
});
|
|
117
|
+
test("a start-order fence warns fences.start-order and does not block readiness", () => {
|
|
118
|
+
const issue = { ...fixture(), fences: ["Start after ai#6481 merges (same files)"] };
|
|
119
|
+
const result = evaluate({ body: renderIssueBody(issue) });
|
|
120
|
+
assert.equal(result.ready, true);
|
|
121
|
+
assert.equal(result.warnings.filter((w) => w.code === "fences.start-order").length, 1);
|
|
122
|
+
});
|
|
123
|
+
test("the blocked failure names each open native blocker", () => {
|
|
124
|
+
const message = (blockedBy) => evaluate({ blockedBy }).failures.find((f) => f.code === "blocked")?.message;
|
|
125
|
+
assert.equal(message([17]), "Resolve open native blockers #17 before autonomous development.");
|
|
126
|
+
assert.match(message([17, 18]) ?? "", /#17, #18/u);
|
|
127
|
+
assert.equal(message([]), void 0);
|
|
128
|
+
});
|
|
117
129
|
//# sourceMappingURL=agentReadiness.test.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/agentReadiness.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { mkdtempSync, rmSync } from 'node:fs';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { test } from 'vitest';\nimport { evaluateAgentReadiness } from './agent.js';\nimport { IssueFields, renderIssueBody } from './issueContract.js';\nimport { builderReady } from './fixtures/builderReady.js';\n\nfunction fixture() {\n return IssueFields.parse({\n title: 'Reject invalid widget identifiers before persistence',\n issueType: 'Task',\n points: 2,\n problem: 'The Project Todo column tracks work; TODO/TBD are literal documentation.',\n outcome: 'Reject malformed widget identifiers.',\n acceptanceCriteria: [\n {\n behavior: 'An invalid widget identifier returns an error without a write.',\n verifiedBy: 'A synthetic mock asserts no write.',\n },\n ],\n outOfScope: ['Changing storage.'],\n context: { files: ['src/absent.ts'], components: [], evidence: [] },\n });\n}\nfunction evaluate(overrides: Partial<Parameters<typeof evaluateAgentReadiness>[0]> = {}) {\n const issue = fixture();\n return evaluateAgentReadiness({\n title: issue.title,\n body: renderIssueBody(issue),\n points: 2,\n priority: 'High',\n issueType: 'Task',\n repoRoot: undefined,\n ...overrides,\n });\n}\n\ntest('readiness from a non-git directory accepts Todo prose, absent paths and portable non-command verification', () => {\n const prior = process.cwd();\n const root = mkdtempSync(join(tmpdir(), 'typed-readiness-'));\n try {\n process.chdir(root);\n const result = evaluate();\n assert.equal(result.ready, true);\n assert.deepEqual(result.failures, []);\n } finally {\n process.chdir(prior);\n rmSync(root, { recursive: true, force: true });\n }\n});\ntest('one or eight observable criteria are valid; count warns above seven', () => {\n for (const count of [1, 8]) {\n const issue = fixture();\n issue.acceptanceCriteria = Array.from({ length: count }, () => ({ ...issue.acceptanceCriteria[0]! }));\n const result = evaluate({ body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n assert.equal(\n result.warnings.some((w) => w.code === 'many-criteria'),\n count === 8,\n );\n }\n});\nfor (const [name, override, code] of [\n ['missing live Points', { points: undefined }, 'points'],\n ['missing live Priority', { priority: undefined }, 'priority'],\n ['missing live issue type', { issueType: undefined }, 'issue-type'],\n ['open native blocker', { blockedBy: [17] }, 'blocked'],\n ['tracking parent', { trackingParent: true }, 'tracking-parent'],\n] as const)\n test(name + ' blocks independently of a valid body', () => {\n const result = evaluate(override);\n assert.equal(result.ready, false);\n assert.ok(result.failures.some((f) => f.code === code));\n });\ntest('draft and structured open questions block even without TODO markers', () => {\n for (const changed of [{ draft: true }, { openQuestions: ['Select the persistence contract.'] }]) {\n const issue = { ...fixture(), ...changed };\n assert.equal(evaluate({ body: renderIssueBody(issue) }).ready, false);\n }\n});\ntest('native Points drift and visible/payload divergence cannot pass canonical readiness', () => {\n assert.ok(evaluate({ points: 3 }).failures.some((f) => f.code === 'points.sync'));\n assert.ok(\n evaluate({ body: renderIssueBody(fixture()).replace('## Status', '## Changed status') }).failures.some(\n (f) => f.code === 'body.canonical',\n ),\n );\n});\n\ntest('a legacy Ready issue without builder is ready and warns builder.unset; a builder-ready one does not', () => {\n const legacy = evaluate();\n assert.equal(legacy.ready, true);\n assert.ok(legacy.warnings.some((w) => w.code === 'builder.unset'));\n const built = builderReady();\n const result = evaluate({ title: built.title, body: renderIssueBody(built) });\n assert.equal(result.ready, true);\n assert.deepEqual(result.warnings, []);\n});\n\ntest('a moneyPath issue with no Owner OK is ready and carries the ownerOk warning', () => {\n const issue = IssueFields.parse({ ...builderReady(), moneyPath: true });\n const result = evaluate({ title: issue.title, body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n assert.deepEqual(result.failures, []);\n assert.ok(result.warnings.some((w) => w.code === 'ownerOk'));\n});\n\ntest('an already-Ready issue with a local path, no Prior work and a long contract is ready and warns', () => {\n const issue = {\n ...builderReady(),\n priorWork: undefined,\n outcome: Array.from({ length: 800 }, () => 'w').join(' '),\n proof: ['.local/operator/run.sh'],\n };\n const result = evaluate({ title: issue.title, body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n const codes = result.warnings.map((w) => w.code);\n for (const code of ['priorWork', 'local-path', 'contract-words']) assert.ok(codes.includes(code), code);\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,aAAa,cAAc;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,aAAa,uBAAuB;AAC7C,SAAS,oBAAoB;AAE7B,SAA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AM,SAAS,IAAI,GAAG,IAAI;AACxG,CAAC;",
|
|
4
|
+
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { mkdtempSync, rmSync } from 'node:fs';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { test } from 'vitest';\nimport { evaluateAgentReadiness } from './agent.js';\nimport { IssueFields, renderIssueBody } from './issueContract.js';\nimport { builderReady } from './fixtures/builderReady.js';\n\nfunction fixture() {\n return IssueFields.parse({\n title: 'Reject invalid widget identifiers before persistence',\n issueType: 'Task',\n points: 2,\n problem: 'The Project Todo column tracks work; TODO/TBD are literal documentation.',\n outcome: 'Reject malformed widget identifiers.',\n acceptanceCriteria: [\n {\n behavior: 'An invalid widget identifier returns an error without a write.',\n verifiedBy: 'A synthetic mock asserts no write.',\n },\n ],\n outOfScope: ['Changing storage.'],\n context: { files: ['src/absent.ts'], components: [], evidence: [] },\n });\n}\nfunction evaluate(overrides: Partial<Parameters<typeof evaluateAgentReadiness>[0]> = {}) {\n const issue = fixture();\n return evaluateAgentReadiness({\n title: issue.title,\n body: renderIssueBody(issue),\n points: 2,\n priority: 'High',\n issueType: 'Task',\n repoRoot: undefined,\n ...overrides,\n });\n}\n\ntest('readiness from a non-git directory accepts Todo prose, absent paths and portable non-command verification', () => {\n const prior = process.cwd();\n const root = mkdtempSync(join(tmpdir(), 'typed-readiness-'));\n try {\n process.chdir(root);\n const result = evaluate();\n assert.equal(result.ready, true);\n assert.deepEqual(result.failures, []);\n } finally {\n process.chdir(prior);\n rmSync(root, { recursive: true, force: true });\n }\n});\ntest('one or eight observable criteria are valid; count warns above seven', () => {\n for (const count of [1, 8]) {\n const issue = fixture();\n issue.acceptanceCriteria = Array.from({ length: count }, () => ({ ...issue.acceptanceCriteria[0]! }));\n const result = evaluate({ body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n assert.equal(\n result.warnings.some((w) => w.code === 'many-criteria'),\n count === 8,\n );\n }\n});\nfor (const [name, override, code] of [\n ['missing live Points', { points: undefined }, 'points'],\n ['missing live Priority', { priority: undefined }, 'priority'],\n ['missing live issue type', { issueType: undefined }, 'issue-type'],\n ['open native blocker', { blockedBy: [17] }, 'blocked'],\n ['tracking parent', { trackingParent: true }, 'tracking-parent'],\n] as const)\n test(name + ' blocks independently of a valid body', () => {\n const result = evaluate(override);\n assert.equal(result.ready, false);\n assert.ok(result.failures.some((f) => f.code === code));\n });\ntest('draft and structured open questions block even without TODO markers', () => {\n for (const changed of [{ draft: true }, { openQuestions: ['Select the persistence contract.'] }]) {\n const issue = { ...fixture(), ...changed };\n assert.equal(evaluate({ body: renderIssueBody(issue) }).ready, false);\n }\n});\ntest('native Points drift and visible/payload divergence cannot pass canonical readiness', () => {\n assert.ok(evaluate({ points: 3 }).failures.some((f) => f.code === 'points.sync'));\n assert.ok(\n evaluate({ body: renderIssueBody(fixture()).replace('## Status', '## Changed status') }).failures.some(\n (f) => f.code === 'body.canonical',\n ),\n );\n});\n\ntest('a legacy Ready issue without builder is ready and warns builder.unset; a builder-ready one does not', () => {\n const legacy = evaluate();\n assert.equal(legacy.ready, true);\n assert.ok(legacy.warnings.some((w) => w.code === 'builder.unset'));\n const built = builderReady();\n const result = evaluate({ title: built.title, body: renderIssueBody(built) });\n assert.equal(result.ready, true);\n assert.deepEqual(result.warnings, []);\n});\n\ntest('a moneyPath issue with no Owner OK is ready and carries the ownerOk warning', () => {\n const issue = IssueFields.parse({ ...builderReady(), moneyPath: true });\n const result = evaluate({ title: issue.title, body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n assert.deepEqual(result.failures, []);\n assert.ok(result.warnings.some((w) => w.code === 'ownerOk'));\n});\n\ntest('an already-Ready issue with a local path, no Prior work and a long contract is ready and warns', () => {\n const issue = {\n ...builderReady(),\n priorWork: undefined,\n outcome: Array.from({ length: 800 }, () => 'w').join(' '),\n proof: ['.local/operator/run.sh'],\n };\n const result = evaluate({ title: issue.title, body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n const codes = result.warnings.map((w) => w.code);\n for (const code of ['priorWork', 'local-path', 'contract-words']) assert.ok(codes.includes(code), code);\n});\n\ntest('a start-order fence warns fences.start-order and does not block readiness', () => {\n const issue = { ...fixture(), fences: ['Start after ai#6481 merges (same files)'] };\n const result = evaluate({ body: renderIssueBody(issue) });\n assert.equal(result.ready, true);\n assert.equal(result.warnings.filter((w) => w.code === 'fences.start-order').length, 1);\n});\ntest('the blocked failure names each open native blocker', () => {\n const message = (blockedBy: number[]) => evaluate({ blockedBy }).failures.find((f) => f.code === 'blocked')?.message;\n assert.equal(message([17]), 'Resolve open native blockers #17 before autonomous development.');\n assert.match(message([17, 18]) ?? '', /#17, #18/u);\n assert.equal(message([]), undefined);\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,aAAa,cAAc;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,aAAa,uBAAuB;AAC7C,SAAS,oBAAoB;AAE7B,SAAS,UAAU;AACjB,SAAO,YAAY,MAAM;AAAA,IACvB,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,oBAAoB;AAAA,MAClB;AAAA,QACE,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACA,YAAY,CAAC,mBAAmB;AAAA,IAChC,SAAS,EAAE,OAAO,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,UAAU,CAAC,EAAE;AAAA,EACpE,CAAC;AACH;AACA,SAAS,SAAS,YAAmE,CAAC,GAAG;AACvF,QAAM,QAAQ,QAAQ;AACtB,SAAO,uBAAuB;AAAA,IAC5B,OAAO,MAAM;AAAA,IACb,MAAM,gBAAgB,KAAK;AAAA,IAC3B,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV,GAAG;AAAA,EACL,CAAC;AACH;AAEA,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;AACjD,SAAO,MAAM,QAAQ,CAAC,CAAC,GAAG,MAAS;AACrC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { closeSync, constants, fstatSync, openSync, readFileSync, readSync } from "node:fs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { createDeliveryGitHubClients } from "./github/client.js";
|
|
5
6
|
import { appCredentialSource, loadDeliverySettings } from "./config/deliveryConfig.js";
|
|
6
7
|
import { Command } from "commander";
|
|
@@ -391,7 +392,7 @@ program.command("config:resolve").description("Read the effective GitHub destina
|
|
|
391
392
|
reviewRoute: await preflightReviewRoute(context, void 0, void 0, "development")
|
|
392
393
|
});
|
|
393
394
|
});
|
|
394
|
-
program.command("mcp:serve").action(async () => serveAiDeliveryMcp(execution()));
|
|
395
|
+
program.command("mcp:serve").action(async () => serveAiDeliveryMcp({ ...execution(), runtimeEntryPath: fileURLToPath(import.meta.url) }));
|
|
395
396
|
program.parseAsync(process.argv).catch((error) => {
|
|
396
397
|
const options = program.opts();
|
|
397
398
|
printCommandError(error, options.json === true && options.verbose === true);
|
package/dist/cli.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli.ts"],
|
|
4
|
-
"sourcesContent": ["#!/usr/bin/env node\nimport { closeSync, constants, fstatSync, openSync, readFileSync, readSync } from 'node:fs';\nimport { createHash } from 'node:crypto';\nimport { createDeliveryGitHubClients } from './github/client.js';\nimport { appCredentialSource, loadDeliverySettings } from './config/deliveryConfig.js';\nimport { Command } from 'commander';\nimport { z } from 'zod';\n\nimport { printCommandError, printCommandResult } from './cliResult.js';\nimport { contextFor, executeTool, type ExecutionContext } from './dispatch.js';\nimport { listPrs, preflightReviewRoute, prChecks, submitFormalReview } from './pr.js';\nimport {\n assertReviewVerdictTarget,\n buildReviewArtifact,\n parseReviewVerdict,\n readGitHubReviewBase,\n ReviewSubmissionError,\n validateReviewTarget,\n} from './review.js';\nimport { serveAiDeliveryMcp } from './mcp/index.js';\nimport type { AiDeliveryMcpToolName } from './mcp/tools.js';\nimport { PACKAGE_VERSION } from './version.js';\nimport { managePlugin } from './pluginInstaller.js';\nimport { IssueWriteSchema, IssueStatusPatch, IssueDeferralPatch, ProjectStatusPatch } from './issueContract.js';\nimport { NativeIssueDateFields } from './github/nativeIssueMetadata.js';\nimport { ProjectTradeFields } from './github/projectNumbers.js';\nimport { DeliveryError } from './errors.js';\n\nconst program = new Command();\nprogram\n .name('ai-delivery')\n .description('Generic GitHub issue and pull request delivery')\n .version(PACKAGE_VERSION)\n .option('--identity <name>', 'Configured author or reviewer identity')\n .option('--personal-auth', 'Explicit legacy personal-token author override')\n .option('--json', 'Print JSON output')\n .option('--verbose', 'Include full bodies, diffs and routing with --json')\n .option('--repo <owner/name>', 'GitHub repository owner/name; works from any directory')\n .option('--repo-root <path>', 'Launch directory or explicit clone for local operations', process.cwd());\n\n// Only the plugin command group owns a local --version input. Skip global option\n// values when selecting its parser so an unrelated argument named plugin has no effect.\nfor (let index = 2; index < process.argv.length; index++) {\n const argument = process.argv[index]!;\n const option = program.options.find((value) => value.long === argument.split('=')[0] || value.short === argument);\n if (option) {\n if (option.required && !argument.includes('=')) index++;\n continue;\n }\n if (argument === 'plugin') program.enablePositionalOptions();\n break;\n}\n\nfunction execution(): ExecutionContext {\n const options = program.opts<{\n identity?: string;\n personalAuth?: boolean;\n repo?: string;\n repoRoot: string;\n verbose?: boolean;\n }>();\n const identity = (options.identity ?? process.env.AI_DELIVERY_IDENTITY)?.trim() || undefined;\n return {\n repoRoot: options.repoRoot,\n ...(options.verbose === true ? { verbose: true } : {}),\n ...(identity === undefined ? {} : { identity }),\n personalAuth: options.personalAuth === true,\n ...(options.repo === undefined ? {} : { repo: options.repo }),\n };\n}\nfunction int(value: string | undefined): number | undefined {\n return value === undefined ? undefined : Number(value);\n}\nfunction list(value: string | undefined): string[] | undefined {\n return value === undefined\n ? undefined\n : value\n .split(',')\n .map((part) => part.trim())\n .filter(Boolean);\n}\nfunction ints(value: string | undefined): number[] | undefined {\n return list(value)?.map(Number);\n}\nfunction body(value: string | undefined, file: string | undefined): string | undefined {\n if (value !== undefined && file !== undefined) throw new Error('Pass either --body or --body-file.');\n return file === undefined ? value : readFileSync(file, 'utf8');\n}\nfunction fields(file: string | undefined, overrides: Record<string, unknown>, update = false): Record<string, unknown> {\n const value: unknown = file === undefined ? {} : JSON.parse(readFileSync(file, 'utf8'));\n return {\n ...IssueWriteSchema.extend({\n ...NativeIssueDateFields,\n ...(update ? ProjectTradeFields : {}),\n ...IssueDeferralPatch,\n status: IssueStatusPatch.optional(),\n ...(update ? { projectStatus: ProjectStatusPatch.optional() } : {}),\n preserveHistory: z.boolean().optional(),\n }).parse(value),\n ...Object.fromEntries(Object.entries(overrides).filter(([, item]) => item !== undefined)),\n };\n}\nfunction run(name: AiDeliveryMcpToolName, input: Record<string, unknown>): Promise<void> {\n const options = program.opts<{ json?: boolean; verbose?: boolean }>();\n return executeTool(name, input, execution()).then((value) =>\n printCommandResult(name, value, options.json === true && options.verbose === true),\n );\n}\nfunction print(value: unknown): void {\n process.stdout.write(`${JSON.stringify(value, null, 2)}\\n`);\n}\n\nconst plugin = program.command('plugin').description('Manage the ai-delivery native plugin');\nfor (const action of ['install', 'doctor', 'preview', 'update', 'rollback', 'remove'] as const) {\n const command = plugin\n .command(action)\n .requiredOption('--host <host>', 'Native host: codex or claude-code')\n .option('--scope <scope>', 'Native scope: user, project, or local; Codex supports user', 'user')\n .option('--dry-run', 'Describe the selected target without changing files or contacting native tools')\n .option('--json', 'Print the result as JSON');\n if (action === 'install' || action === 'update')\n command.requiredOption('--version <version>', 'Explicit published package version');\n if (action === 'doctor')\n command.option('--check-auth', 'Read configured role identities and repository access; requires explicit --repo');\n command.action(\n async (options: {\n host: string;\n scope: string;\n version?: string;\n dryRun?: boolean;\n json?: boolean;\n checkAuth?: boolean;\n }) => {\n const result = await managePlugin({\n action,\n host: options.host,\n scope: options.scope,\n ...(options.version === undefined ? {} : { version: options.version }),\n dryRun: options.dryRun === true,\n checkAuth: options.checkAuth === true,\n ...(options.checkAuth && execution().repo ? { repo: execution().repo } : {}),\n repoRoot: execution().repoRoot,\n });\n if (options.json) {\n print(result);\n return;\n }\n process.stdout.write(\n `${result.dryRun ? 'Dry run: ' : ''}${result.host} ${result.scope}: ${action}; version ${result.version ?? 'none'}; installed ${result.installed}; changed ${result.changed}\\n`,\n );\n if (result.mcp)\n process.stdout.write(\n `Bundled MCP startup: ${result.mcp.startup}${result.mcp.error ? ` (${result.mcp.error})` : ''}\\n`,\n );\n if (result.diagnostics) {\n process.stdout.write(\n `Registration observations: ${result.diagnostics.registrations.length}; completeness ${result.diagnostics.completeness}; migration ${result.diagnostics.migration}; planned changes ${result.diagnostics.plannedChanges.length}\\n`,\n );\n for (const entry of result.diagnostics.registrations)\n process.stdout.write(\n `${entry.kind} ${entry.scope}: ownership ${entry.ownership}; source ${entry.source}; version ${entry.version ?? 'unknown'}\\n`,\n );\n process.stdout.write(`Unverified conditions: ${result.diagnostics.findings.join(', ')}\\n`);\n }\n if (result.activation)\n process.stdout.write(\n `Native session loaded version: unverified. Installed observation: ${result.activation.installedVersion ?? 'unknown'}; separate startup: ${result.activation.startupVersion ?? 'not checked'}. Use the host's surface-specific activation guidance.\\n`,\n );\n if (result.recoveryRequired)\n process.stdout.write('Resume the interrupted original plugin command to recover this target.\\n');\n if (result.authProbe)\n process.stdout.write(\n `Selected-runtime CLI auth probe: ${result.authProbe.outcome}; settings ${result.authProbe.settings}; process references ${result.authProbe.processReferences.status}; authentication ${result.authProbe.authentication.status}; repository access ${result.authProbe.repositoryAccess.status}${result.authProbe.reason ? ` (${result.authProbe.reason})` : ''}\\nNative GUI credential propagation and counted exact-head approval remain unverified.\\n`,\n );\n },\n );\n}\n\nprogram\n .command('create')\n .requiredOption('--title <title>')\n .option('--fields-file <path>', 'UTF-8 JSON typed fields; explicit CLI fields take precedence')\n .option('--epic', 'Create an active unsized parent issue')\n .option('--op-id <id>', 'Stable identity for retrying the same create')\n .option('--draft', 'Explicitly write an incomplete parked draft')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Required explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .action(async (o: Record<string, string> & { draft?: boolean; epic?: boolean }) =>\n run(\n 'issue_create',\n fields(o.fieldsFile, {\n title: o.title,\n epic: o.epic,\n opId: o.opId,\n body: body(o.body, o.bodyFile),\n issueType: o.type,\n points: int(o.points),\n priority: o.priority,\n labels: list(o.labels),\n blockedBy: ints(o.blockedBy),\n blocks: ints(o.blocks),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone),\n parentIssueNumber: int(o.parent),\n ...(o.draft === true ? { draft: true } : {}),\n }),\n ),\n );\n\nprogram\n .command('start')\n .option('--issue <number>')\n .option('--request <text>')\n .option('--request-id <id>', 'Stable retry identity for a new issue start')\n .option('--title <title>')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Capacity override reason, or explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .option('--branch <branch>')\n .option('--resume-created')\n .action(async (o: Record<string, string | boolean>) =>\n run('issue_start', {\n issueNumber: int(o.issue as string),\n request: o.request,\n requestId: o.requestId,\n title: o.title,\n body: body(o.body as string, o.bodyFile as string),\n issueType: o.type,\n points: int(o.points as string),\n priority: o.priority,\n labels: list(o.labels as string),\n blockedBy: ints(o.blockedBy as string),\n blocks: ints(o.blocks as string),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone as string),\n parentIssueNumber: int(o.parent as string),\n branch: o.branch,\n resumeCreated: o.resumeCreated === true,\n }),\n );\n\nfor (const name of ['list', 'search'] as const) {\n program\n .command(name)\n .option('--query <text>', 'Literal text to search in the selected repository')\n .option('--state <state>')\n .option('--labels <labels>')\n .option('--parent <number>')\n .option('--type <type>')\n .option('--project-status <status>')\n .option('--updated-since <timestamp>')\n .option('--page <number>')\n .option('--per-page <number>')\n .action(async (o: Record<string, string>) =>\n run(name === 'list' ? 'issue_list' : 'issue_search', {\n query: o.query,\n state: o.state,\n labels: list(o.labels),\n parentIssueNumber: int(o.parent),\n issueType: o.type,\n projectStatus: o.projectStatus,\n updatedSince: o.updatedSince,\n page: int(o.page),\n perPage: int(o.perPage),\n }),\n );\n}\n\nprogram\n .command('update')\n .requiredOption('--issue <number>')\n .option('--fields-file <path>', 'UTF-8 JSON typed issue field patch')\n .option('--draft', 'Explicitly write an incomplete parked draft')\n .option('--title <title>')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Required explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .option('--state <state>')\n .option('--project-status <status>', 'Set Todo, In Progress, Blocked or Done with a public reason')\n .option('--project-status-reason <reason>', 'Required public reason for an explicit Project Status')\n .option('--preserve-history', 'Preserve the previous title and body before a rewrite')\n .option('--close-reason <reason>')\n .option('--closeout-verdict <text>', 'Study verdict (1\u20133 lines); required to close a study as completed')\n .option('--closeout-result-file <path>', \"File holding the study READOUT's Result section, verbatim\")\n .option('--superseded-by <number>')\n .option('--park', 'Park execution while retaining the issue worktree')\n .option('--defer', 'Defer until an explicit undefer')\n .option('--defer-until <date>', 'Record an ISO date condition without automatic undeferral')\n .option('--defer-trigger <text>', 'Record the condition for reconsidering deferred work')\n .option('--undefer', 'Explicitly clear deferral; draft and park remain unchanged')\n .action(\n async (\n o: Record<string, string> & {\n park?: boolean;\n preserveHistory?: boolean;\n draft?: boolean;\n defer?: boolean;\n undefer?: boolean;\n },\n ) =>\n run(\n 'issue_update',\n fields(\n o.fieldsFile,\n {\n issueNumber: int(o.issue),\n title: o.title,\n ...(o.draft === true ? { draft: true } : {}),\n body: body(o.body, o.bodyFile),\n issueType: o.type,\n points: int(o.points),\n priority: o.priority,\n labels: list(o.labels),\n blockedBy: ints(o.blockedBy),\n blocks: ints(o.blocks),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone),\n parentIssueNumber: int(o.parent),\n state: o.state,\n projectStatus:\n o.projectStatus === undefined && o.projectStatusReason === undefined\n ? undefined\n : ProjectStatusPatch.parse({ status: o.projectStatus, reason: o.projectStatusReason }),\n preserveHistory: o.preserveHistory === true ? true : undefined,\n closeReason: o.closeReason,\n closeout:\n o.closeoutVerdict === undefined && o.closeoutResultFile === undefined\n ? undefined\n : { verdict: o.closeoutVerdict, result: body(undefined, o.closeoutResultFile) },\n supersededBy: int(o.supersededBy),\n park: o.park === true ? true : undefined,\n defer:\n o.defer === true || o.deferUntil !== undefined || o.deferTrigger !== undefined\n ? {\n ...(o.deferUntil === undefined ? {} : { until: o.deferUntil }),\n ...(o.deferTrigger === undefined ? {} : { trigger: o.deferTrigger }),\n }\n : undefined,\n undefer: o.undefer === true ? true : undefined,\n },\n true,\n ),\n ),\n );\n\nprogram\n .command('batch:update')\n .description('Plan or apply 1\u201350 current-repository issue updates with ordered readback')\n .requiredOption('--items-file <path>', 'UTF-8 JSON array of complete issue_update inputs')\n .option('--dry-run', 'Return plans and readback without any native writes')\n .action(async (o: { itemsFile: string; dryRun?: boolean }) =>\n run('issue_batch_update', {\n items: JSON.parse(readFileSync(o.itemsFile, 'utf8')) as unknown,\n dryRun: o.dryRun === true,\n }),\n );\n\nprogram\n .command('milestone:create')\n .description('Create a repository milestone with an optional due date and description')\n .requiredOption('--title <title>')\n .option('--due-on <date>', 'ISO date, YYYY-MM-DD')\n .option('--description <text>')\n .action(async (o: { title: string; dueOn?: string; description?: string }) =>\n run('milestone_create', {\n title: o.title,\n ...(o.dueOn === undefined ? {} : { dueOn: o.dueOn }),\n ...(o.description === undefined ? {} : { description: o.description }),\n }),\n );\n\nprogram\n .command('info')\n .requiredOption('--issue <number>')\n .action(async (o: { issue: string }) => run('issue_info', { issueNumber: int(o.issue) }));\nprogram\n .command('ready:check')\n .requiredOption('--issue <number>')\n .action(async (o: { issue: string }) => run('issue_ready_check', { issueNumber: int(o.issue) }));\nprogram\n .command('pr:create')\n .description('Create or reuse an issue-closing PR from a pushed --head, from any directory.')\n .requiredOption('--issue <number>')\n .option('--pr <number>', 'Exact existing PR selector; never creates a replacement')\n .option('--non-closing', 'Open a draft PR that references the issue and leaves it open')\n .option('--expected-head <sha>', 'Refuse unless the pushed head is this SHA')\n .option('--title <title>')\n .option('--body-file <path>')\n .option('--head <branch>', 'Pushed remote head; no ai-delivery branch or worktree setup required')\n .option('--base <branch>', 'Repository default branch (inferred when omitted)')\n .option('--ready', 'Publish ready, or promote the author-owned PR selected by --head')\n .option('--dry-run')\n .action(\n async (o: {\n issue: string;\n pr?: string;\n nonClosing?: boolean;\n expectedHead?: string;\n title?: string;\n bodyFile?: string;\n head?: string;\n base?: string;\n ready?: boolean;\n dryRun?: boolean;\n }) =>\n run('issue_pr_create', {\n issueNumber: int(o.issue),\n prNumber: int(o.pr),\n nonClosing: o.nonClosing,\n expectedHeadSha: o.expectedHead,\n title: o.title,\n body: body(undefined, o.bodyFile),\n headBranch: o.head,\n base: o.base,\n draft: o.ready !== true,\n dryRun: o.dryRun === true,\n }),\n );\nprogram\n .command('pr:info')\n .description('Inspect an exact PR; combine --issue and --pr to verify its native closing-issue association.')\n .option('--non-closing', 'Verify an exact native non-closing PR-to-issue reference')\n .option('--issue <number>', 'Issue to verify; issue-only lookup requires a GitHub-linked branch')\n .option('--pr <number>', 'Exact PR number; include --issue after issue branch links are replaced on publication')\n .action(async (o: { issue?: string; pr?: string; nonClosing?: boolean }) =>\n run('issue_pr_info', { issueNumber: int(o.issue), prNumber: int(o.pr), nonClosing: o.nonClosing }),\n );\nprogram\n .command('pr:list')\n .option('--state <state>', 'open, closed or all', 'open')\n .action(async (o: { state: string }) => {\n if (!['open', 'closed', 'all'].includes(o.state)) throw new Error('Invalid PR state.');\n const context = await contextFor(execution(), 'pr:list');\n print(await listPrs(context, o.state as 'open' | 'closed' | 'all'));\n });\nprogram\n .command('pr:checks')\n .requiredOption('--pr <number>')\n .action(async (o: { pr: string }) => {\n const context = await contextFor(execution(), 'pr:checks');\n print(await prChecks(context, Number(o.pr)));\n });\nprogram\n .command('pr:review')\n .requiredOption('--issue <number>')\n .requiredOption('--pr <number>')\n .requiredOption('--artifact <path>', 'Path to a UTF-8 JSON review artifact file (not inline JSON)')\n .option('--non-closing', 'Retain the referenced issue OPEN; finish refuses this mode')\n .option('--dry-run')\n .action(async (o: { issue: string; pr: string; artifact: string; dryRun?: boolean; nonClosing?: boolean }) =>\n run('issue_pr_review', {\n issueNumber: int(o.issue),\n prNumber: int(o.pr),\n artifact: readFileSync(o.artifact, 'utf8'),\n dryRun: o.dryRun === true,\n nonClosing: o.nonClosing,\n }),\n );\nprogram\n .command('review')\n .argument('<action>', 'submit or doctor')\n .description('Submit an independent verdict or check its configured App')\n .option('--pr <number>', 'Required for submit')\n .option('--head <sha>', 'Required exact head for submit')\n .option('--identity <name>', 'Required configured reviewer profile')\n .option('--verdict <path>', 'Required for submit: UTF-8 JSON verdict, at most 64 KiB')\n .action(async (action: string, o: { pr?: string; head?: string; identity?: string; verdict?: string }) => {\n if (!['submit', 'doctor'].includes(action)) throw new DeliveryError('review action must be submit or doctor.');\n const identity = o.identity ?? execution().identity ?? '';\n const settings = await loadDeliverySettings(undefined, { reviewerIdentity: identity, prepareEnvironment: true });\n const profile = settings.roles.reviewer;\n if (!('appId' in profile))\n throw new DeliveryError('identity: Select a reviewer profile with explicit App/provider binding.');\n if (action === 'doctor') {\n if (o.pr !== undefined || o.head !== undefined || o.verdict !== undefined)\n throw new DeliveryError('review doctor does not accept submission inputs.');\n const clients = await createDeliveryGitHubClients({\n config: settings,\n identity,\n role: 'reviewer',\n env: settings.environment!,\n });\n const actorLogin = await clients.appActorLogin!();\n printCommandResult('review:doctor', {\n status: 'authenticated',\n identity,\n provider: profile.provider,\n appId: profile.appId,\n installationId: profile.installationId,\n actorLogin,\n source: appCredentialSource(profile).type,\n });\n return;\n }\n if (o.pr === undefined || o.head === undefined || o.verdict === undefined)\n throw new DeliveryError('review submit requires --pr, --head and --verdict.');\n const fd = openSync(o.verdict, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);\n let raw: string;\n let verdictFileSha256: string;\n try {\n if (!fstatSync(fd).isFile()) throw new DeliveryError('verdict: Expected a regular file.');\n const bytes = Buffer.alloc(64 * 1024 + 1);\n let size = 0;\n while (size < bytes.length) {\n const count = readSync(fd, bytes, size, bytes.length - size, null);\n if (count === 0) break;\n size += count;\n }\n if (size > 64 * 1024) throw new DeliveryError('verdict: File exceeds 64 KiB.');\n const content = bytes.subarray(0, size);\n raw = content.toString('utf8');\n if (!Buffer.from(raw, 'utf8').equals(content)) throw new DeliveryError('verdict: Expected valid UTF-8.');\n verdictFileSha256 = `sha256:${createHash('sha256').update(content).digest('hex')}`;\n } finally {\n closeSync(fd);\n }\n const verdict = parseReviewVerdict(raw);\n assertReviewVerdictTarget(verdict, profile.provider, o.head);\n const prNumber = z.number().int().positive().parse(Number(o.pr));\n const authorContext = await contextFor(\n { ...execution(), settings, identity, reviewSubmission: true },\n 'pr:info',\n 'author',\n );\n const reviewBase = await readGitHubReviewBase(authorContext, prNumber, o.head);\n const artifact = buildReviewArtifact({\n verdict,\n verdictFileSha256,\n identity,\n provider: profile.provider,\n expectedHead: o.head,\n prNumber,\n authorIdentity: settings.roles.author.identity,\n reviewBase,\n });\n await validateReviewTarget(authorContext, artifact, prNumber);\n const clients = await createDeliveryGitHubClients({\n config: authorContext.config,\n identity,\n role: 'reviewer',\n selectedAuthor: authorContext.clients,\n ...(authorContext.credentialEnvironment === undefined ? {} : { env: authorContext.credentialEnvironment }),\n });\n const context = { ...authorContext, clients };\n try {\n printCommandResult(\n 'review:submit',\n await submitFormalReview(context, {\n artifact: JSON.stringify(artifact),\n issueNumber: verdict.issueNumber,\n prNumber,\n ...(verdict.nonClosing === undefined ? {} : { nonClosing: verdict.nonClosing }),\n }),\n );\n } catch (error) {\n if (!(error instanceof ReviewSubmissionError)) throw error;\n process.stdout.write(\n `${JSON.stringify({ status: 'submission-unverified', submission: error.submission, nextAction: error.message })}\\n`,\n );\n process.exitCode = 1;\n }\n });\n\nprogram\n .command('config:resolve')\n .description('Read the effective GitHub destination and admission digest')\n .action(async () => {\n const context = await contextFor(execution(), 'config:resolve');\n print({\n configDigest: context.configuration?.configDigest,\n routing: context.configuration?.routing,\n reviewRoute: await preflightReviewRoute(context, undefined, undefined, 'development'),\n });\n });\nprogram.command('mcp:serve').action(async () => serveAiDeliveryMcp(execution()));\n\nprogram.parseAsync(process.argv).catch((error: unknown) => {\n const options = program.opts<{ json?: boolean; verbose?: boolean }>();\n printCommandError(error, options.json === true && options.verbose === true);\n});\n"],
|
|
5
|
-
"mappings": ";AACA,SAAS,WAAW,WAAW,WAAW,UAAU,cAAc,gBAAgB;AAClF,SAAS,kBAAkB;AAC3B,SAAS,mCAAmC;AAC5C,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,SAAS,SAAS;AAElB,SAAS,mBAAmB,0BAA0B;AACtD,SAAS,YAAY,mBAA0C;AAC/D,SAAS,SAAS,sBAAsB,UAAU,0BAA0B;AAC5E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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,QACjC,aAAa,QAAQ;AAAA,QACrB;AAAA,QACA,GAAI,QAAQ,eAAe,SAAY,CAAC,IAAI,EAAE,YAAY,QAAQ,WAAW;AAAA,MAC/E,CAAC;AAAA,IACH;AAAA,EACF,SAAS,OAAO;AACd,QAAI,EAAE,iBAAiB,uBAAwB,OAAM;AACrD,YAAQ,OAAO;AAAA,MACb,GAAG,KAAK,UAAU,EAAE,QAAQ,yBAAyB,YAAY,MAAM,YAAY,YAAY,MAAM,QAAQ,CAAC,CAAC;AAAA;AAAA,IACjH;AACA,YAAQ,WAAW;AAAA,EACrB;AACF,CAAC;AAEH,QACG,QAAQ,gBAAgB,EACxB,YAAY,4DAA4D,EACxE,OAAO,YAAY;AAClB,QAAM,UAAU,MAAM,WAAW,UAAU,GAAG,gBAAgB;AAC9D,QAAM;AAAA,IACJ,cAAc,QAAQ,eAAe;AAAA,IACrC,SAAS,QAAQ,eAAe;AAAA,IAChC,aAAa,MAAM,qBAAqB,SAAS,QAAW,QAAW,aAAa;AAAA,EACtF,CAAC;AACH,CAAC;AACH,QAAQ,QAAQ,WAAW,EAAE,OAAO,YAAY,mBAAmB,UAAU,CAAC,CAAC;AAE/E,QAAQ,WAAW,QAAQ,IAAI,EAAE,MAAM,CAAC,UAAmB;AACzD,QAAM,UAAU,QAAQ,KAA4C;AACpE,oBAAkB,OAAO,QAAQ,SAAS,QAAQ,QAAQ,YAAY,IAAI;AAC5E,CAAC;",
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\nimport { closeSync, constants, fstatSync, openSync, readFileSync, readSync } from 'node:fs';\nimport { createHash } from 'node:crypto';\nimport { fileURLToPath } from 'node:url';\nimport { createDeliveryGitHubClients } from './github/client.js';\nimport { appCredentialSource, loadDeliverySettings } from './config/deliveryConfig.js';\nimport { Command } from 'commander';\nimport { z } from 'zod';\n\nimport { printCommandError, printCommandResult } from './cliResult.js';\nimport { contextFor, executeTool, type ExecutionContext } from './dispatch.js';\nimport { listPrs, preflightReviewRoute, prChecks, submitFormalReview } from './pr.js';\nimport {\n assertReviewVerdictTarget,\n buildReviewArtifact,\n parseReviewVerdict,\n readGitHubReviewBase,\n ReviewSubmissionError,\n validateReviewTarget,\n} from './review.js';\nimport { serveAiDeliveryMcp } from './mcp/index.js';\nimport type { AiDeliveryMcpToolName } from './mcp/tools.js';\nimport { PACKAGE_VERSION } from './version.js';\nimport { managePlugin } from './pluginInstaller.js';\nimport { IssueWriteSchema, IssueStatusPatch, IssueDeferralPatch, ProjectStatusPatch } from './issueContract.js';\nimport { NativeIssueDateFields } from './github/nativeIssueMetadata.js';\nimport { ProjectTradeFields } from './github/projectNumbers.js';\nimport { DeliveryError } from './errors.js';\n\nconst program = new Command();\nprogram\n .name('ai-delivery')\n .description('Generic GitHub issue and pull request delivery')\n .version(PACKAGE_VERSION)\n .option('--identity <name>', 'Configured author or reviewer identity')\n .option('--personal-auth', 'Explicit legacy personal-token author override')\n .option('--json', 'Print JSON output')\n .option('--verbose', 'Include full bodies, diffs and routing with --json')\n .option('--repo <owner/name>', 'GitHub repository owner/name; works from any directory')\n .option('--repo-root <path>', 'Launch directory or explicit clone for local operations', process.cwd());\n\n// Only the plugin command group owns a local --version input. Skip global option\n// values when selecting its parser so an unrelated argument named plugin has no effect.\nfor (let index = 2; index < process.argv.length; index++) {\n const argument = process.argv[index]!;\n const option = program.options.find((value) => value.long === argument.split('=')[0] || value.short === argument);\n if (option) {\n if (option.required && !argument.includes('=')) index++;\n continue;\n }\n if (argument === 'plugin') program.enablePositionalOptions();\n break;\n}\n\nfunction execution(): ExecutionContext {\n const options = program.opts<{\n identity?: string;\n personalAuth?: boolean;\n repo?: string;\n repoRoot: string;\n verbose?: boolean;\n }>();\n const identity = (options.identity ?? process.env.AI_DELIVERY_IDENTITY)?.trim() || undefined;\n return {\n repoRoot: options.repoRoot,\n ...(options.verbose === true ? { verbose: true } : {}),\n ...(identity === undefined ? {} : { identity }),\n personalAuth: options.personalAuth === true,\n ...(options.repo === undefined ? {} : { repo: options.repo }),\n };\n}\nfunction int(value: string | undefined): number | undefined {\n return value === undefined ? undefined : Number(value);\n}\nfunction list(value: string | undefined): string[] | undefined {\n return value === undefined\n ? undefined\n : value\n .split(',')\n .map((part) => part.trim())\n .filter(Boolean);\n}\nfunction ints(value: string | undefined): number[] | undefined {\n return list(value)?.map(Number);\n}\nfunction body(value: string | undefined, file: string | undefined): string | undefined {\n if (value !== undefined && file !== undefined) throw new Error('Pass either --body or --body-file.');\n return file === undefined ? value : readFileSync(file, 'utf8');\n}\nfunction fields(file: string | undefined, overrides: Record<string, unknown>, update = false): Record<string, unknown> {\n const value: unknown = file === undefined ? {} : JSON.parse(readFileSync(file, 'utf8'));\n return {\n ...IssueWriteSchema.extend({\n ...NativeIssueDateFields,\n ...(update ? ProjectTradeFields : {}),\n ...IssueDeferralPatch,\n status: IssueStatusPatch.optional(),\n ...(update ? { projectStatus: ProjectStatusPatch.optional() } : {}),\n preserveHistory: z.boolean().optional(),\n }).parse(value),\n ...Object.fromEntries(Object.entries(overrides).filter(([, item]) => item !== undefined)),\n };\n}\nfunction run(name: AiDeliveryMcpToolName, input: Record<string, unknown>): Promise<void> {\n const options = program.opts<{ json?: boolean; verbose?: boolean }>();\n return executeTool(name, input, execution()).then((value) =>\n printCommandResult(name, value, options.json === true && options.verbose === true),\n );\n}\nfunction print(value: unknown): void {\n process.stdout.write(`${JSON.stringify(value, null, 2)}\\n`);\n}\n\nconst plugin = program.command('plugin').description('Manage the ai-delivery native plugin');\nfor (const action of ['install', 'doctor', 'preview', 'update', 'rollback', 'remove'] as const) {\n const command = plugin\n .command(action)\n .requiredOption('--host <host>', 'Native host: codex or claude-code')\n .option('--scope <scope>', 'Native scope: user, project, or local; Codex supports user', 'user')\n .option('--dry-run', 'Describe the selected target without changing files or contacting native tools')\n .option('--json', 'Print the result as JSON');\n if (action === 'install' || action === 'update')\n command.requiredOption('--version <version>', 'Explicit published package version');\n if (action === 'doctor')\n command.option('--check-auth', 'Read configured role identities and repository access; requires explicit --repo');\n command.action(\n async (options: {\n host: string;\n scope: string;\n version?: string;\n dryRun?: boolean;\n json?: boolean;\n checkAuth?: boolean;\n }) => {\n const result = await managePlugin({\n action,\n host: options.host,\n scope: options.scope,\n ...(options.version === undefined ? {} : { version: options.version }),\n dryRun: options.dryRun === true,\n checkAuth: options.checkAuth === true,\n ...(options.checkAuth && execution().repo ? { repo: execution().repo } : {}),\n repoRoot: execution().repoRoot,\n });\n if (options.json) {\n print(result);\n return;\n }\n process.stdout.write(\n `${result.dryRun ? 'Dry run: ' : ''}${result.host} ${result.scope}: ${action}; version ${result.version ?? 'none'}; installed ${result.installed}; changed ${result.changed}\\n`,\n );\n if (result.mcp)\n process.stdout.write(\n `Bundled MCP startup: ${result.mcp.startup}${result.mcp.error ? ` (${result.mcp.error})` : ''}\\n`,\n );\n if (result.diagnostics) {\n process.stdout.write(\n `Registration observations: ${result.diagnostics.registrations.length}; completeness ${result.diagnostics.completeness}; migration ${result.diagnostics.migration}; planned changes ${result.diagnostics.plannedChanges.length}\\n`,\n );\n for (const entry of result.diagnostics.registrations)\n process.stdout.write(\n `${entry.kind} ${entry.scope}: ownership ${entry.ownership}; source ${entry.source}; version ${entry.version ?? 'unknown'}\\n`,\n );\n process.stdout.write(`Unverified conditions: ${result.diagnostics.findings.join(', ')}\\n`);\n }\n if (result.activation)\n process.stdout.write(\n `Native session loaded version: unverified. Installed observation: ${result.activation.installedVersion ?? 'unknown'}; separate startup: ${result.activation.startupVersion ?? 'not checked'}. Use the host's surface-specific activation guidance.\\n`,\n );\n if (result.recoveryRequired)\n process.stdout.write('Resume the interrupted original plugin command to recover this target.\\n');\n if (result.authProbe)\n process.stdout.write(\n `Selected-runtime CLI auth probe: ${result.authProbe.outcome}; settings ${result.authProbe.settings}; process references ${result.authProbe.processReferences.status}; authentication ${result.authProbe.authentication.status}; repository access ${result.authProbe.repositoryAccess.status}${result.authProbe.reason ? ` (${result.authProbe.reason})` : ''}\\nNative GUI credential propagation and counted exact-head approval remain unverified.\\n`,\n );\n },\n );\n}\n\nprogram\n .command('create')\n .requiredOption('--title <title>')\n .option('--fields-file <path>', 'UTF-8 JSON typed fields; explicit CLI fields take precedence')\n .option('--epic', 'Create an active unsized parent issue')\n .option('--op-id <id>', 'Stable identity for retrying the same create')\n .option('--draft', 'Explicitly write an incomplete parked draft')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Required explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .action(async (o: Record<string, string> & { draft?: boolean; epic?: boolean }) =>\n run(\n 'issue_create',\n fields(o.fieldsFile, {\n title: o.title,\n epic: o.epic,\n opId: o.opId,\n body: body(o.body, o.bodyFile),\n issueType: o.type,\n points: int(o.points),\n priority: o.priority,\n labels: list(o.labels),\n blockedBy: ints(o.blockedBy),\n blocks: ints(o.blocks),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone),\n parentIssueNumber: int(o.parent),\n ...(o.draft === true ? { draft: true } : {}),\n }),\n ),\n );\n\nprogram\n .command('start')\n .option('--issue <number>')\n .option('--request <text>')\n .option('--request-id <id>', 'Stable retry identity for a new issue start')\n .option('--title <title>')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Capacity override reason, or explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .option('--branch <branch>')\n .option('--resume-created')\n .action(async (o: Record<string, string | boolean>) =>\n run('issue_start', {\n issueNumber: int(o.issue as string),\n request: o.request,\n requestId: o.requestId,\n title: o.title,\n body: body(o.body as string, o.bodyFile as string),\n issueType: o.type,\n points: int(o.points as string),\n priority: o.priority,\n labels: list(o.labels as string),\n blockedBy: ints(o.blockedBy as string),\n blocks: ints(o.blocks as string),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone as string),\n parentIssueNumber: int(o.parent as string),\n branch: o.branch,\n resumeCreated: o.resumeCreated === true,\n }),\n );\n\nfor (const name of ['list', 'search'] as const) {\n program\n .command(name)\n .option('--query <text>', 'Literal text to search in the selected repository')\n .option('--state <state>')\n .option('--labels <labels>')\n .option('--parent <number>')\n .option('--type <type>')\n .option('--project-status <status>')\n .option('--updated-since <timestamp>')\n .option('--page <number>')\n .option('--per-page <number>')\n .action(async (o: Record<string, string>) =>\n run(name === 'list' ? 'issue_list' : 'issue_search', {\n query: o.query,\n state: o.state,\n labels: list(o.labels),\n parentIssueNumber: int(o.parent),\n issueType: o.type,\n projectStatus: o.projectStatus,\n updatedSince: o.updatedSince,\n page: int(o.page),\n perPage: int(o.perPage),\n }),\n );\n}\n\nprogram\n .command('update')\n .requiredOption('--issue <number>')\n .option('--fields-file <path>', 'UTF-8 JSON typed issue field patch')\n .option('--draft', 'Explicitly write an incomplete parked draft')\n .option('--title <title>')\n .option('--body <markdown>')\n .option('--body-file <path>')\n .option('--type <type>')\n .option('--points <number>')\n .option('--priority <priority>')\n .option('--labels <labels>')\n .option('--blocked-by <numbers>')\n .option('--blocks <numbers>', 'Add this issue as a blocker of these dependents')\n .option('--override-reason <reason>', 'Required explanation when adding a blocker to active work')\n .option('--milestone <number>')\n .option('--parent <number>')\n .option('--state <state>')\n .option('--project-status <status>', 'Set Todo, In Progress, Blocked or Done with a public reason')\n .option('--project-status-reason <reason>', 'Required public reason for an explicit Project Status')\n .option('--preserve-history', 'Preserve the previous title and body before a rewrite')\n .option('--close-reason <reason>')\n .option('--closeout-verdict <text>', 'Study verdict (1\u20133 lines); required to close a study as completed')\n .option('--closeout-result-file <path>', \"File holding the study READOUT's Result section, verbatim\")\n .option('--superseded-by <number>')\n .option('--park', 'Park execution while retaining the issue worktree')\n .option('--defer', 'Defer until an explicit undefer')\n .option('--defer-until <date>', 'Record an ISO date condition without automatic undeferral')\n .option('--defer-trigger <text>', 'Record the condition for reconsidering deferred work')\n .option('--undefer', 'Explicitly clear deferral; draft and park remain unchanged')\n .action(\n async (\n o: Record<string, string> & {\n park?: boolean;\n preserveHistory?: boolean;\n draft?: boolean;\n defer?: boolean;\n undefer?: boolean;\n },\n ) =>\n run(\n 'issue_update',\n fields(\n o.fieldsFile,\n {\n issueNumber: int(o.issue),\n title: o.title,\n ...(o.draft === true ? { draft: true } : {}),\n body: body(o.body, o.bodyFile),\n issueType: o.type,\n points: int(o.points),\n priority: o.priority,\n labels: list(o.labels),\n blockedBy: ints(o.blockedBy),\n blocks: ints(o.blocks),\n overrideReason: o.overrideReason,\n milestone: int(o.milestone),\n parentIssueNumber: int(o.parent),\n state: o.state,\n projectStatus:\n o.projectStatus === undefined && o.projectStatusReason === undefined\n ? undefined\n : ProjectStatusPatch.parse({ status: o.projectStatus, reason: o.projectStatusReason }),\n preserveHistory: o.preserveHistory === true ? true : undefined,\n closeReason: o.closeReason,\n closeout:\n o.closeoutVerdict === undefined && o.closeoutResultFile === undefined\n ? undefined\n : { verdict: o.closeoutVerdict, result: body(undefined, o.closeoutResultFile) },\n supersededBy: int(o.supersededBy),\n park: o.park === true ? true : undefined,\n defer:\n o.defer === true || o.deferUntil !== undefined || o.deferTrigger !== undefined\n ? {\n ...(o.deferUntil === undefined ? {} : { until: o.deferUntil }),\n ...(o.deferTrigger === undefined ? {} : { trigger: o.deferTrigger }),\n }\n : undefined,\n undefer: o.undefer === true ? true : undefined,\n },\n true,\n ),\n ),\n );\n\nprogram\n .command('batch:update')\n .description('Plan or apply 1\u201350 current-repository issue updates with ordered readback')\n .requiredOption('--items-file <path>', 'UTF-8 JSON array of complete issue_update inputs')\n .option('--dry-run', 'Return plans and readback without any native writes')\n .action(async (o: { itemsFile: string; dryRun?: boolean }) =>\n run('issue_batch_update', {\n items: JSON.parse(readFileSync(o.itemsFile, 'utf8')) as unknown,\n dryRun: o.dryRun === true,\n }),\n );\n\nprogram\n .command('milestone:create')\n .description('Create a repository milestone with an optional due date and description')\n .requiredOption('--title <title>')\n .option('--due-on <date>', 'ISO date, YYYY-MM-DD')\n .option('--description <text>')\n .action(async (o: { title: string; dueOn?: string; description?: string }) =>\n run('milestone_create', {\n title: o.title,\n ...(o.dueOn === undefined ? {} : { dueOn: o.dueOn }),\n ...(o.description === undefined ? {} : { description: o.description }),\n }),\n );\n\nprogram\n .command('info')\n .requiredOption('--issue <number>')\n .action(async (o: { issue: string }) => run('issue_info', { issueNumber: int(o.issue) }));\nprogram\n .command('ready:check')\n .requiredOption('--issue <number>')\n .action(async (o: { issue: string }) => run('issue_ready_check', { issueNumber: int(o.issue) }));\nprogram\n .command('pr:create')\n .description('Create or reuse an issue-closing PR from a pushed --head, from any directory.')\n .requiredOption('--issue <number>')\n .option('--pr <number>', 'Exact existing PR selector; never creates a replacement')\n .option('--non-closing', 'Open a draft PR that references the issue and leaves it open')\n .option('--expected-head <sha>', 'Refuse unless the pushed head is this SHA')\n .option('--title <title>')\n .option('--body-file <path>')\n .option('--head <branch>', 'Pushed remote head; no ai-delivery branch or worktree setup required')\n .option('--base <branch>', 'Repository default branch (inferred when omitted)')\n .option('--ready', 'Publish ready, or promote the author-owned PR selected by --head')\n .option('--dry-run')\n .action(\n async (o: {\n issue: string;\n pr?: string;\n nonClosing?: boolean;\n expectedHead?: string;\n title?: string;\n bodyFile?: string;\n head?: string;\n base?: string;\n ready?: boolean;\n dryRun?: boolean;\n }) =>\n run('issue_pr_create', {\n issueNumber: int(o.issue),\n prNumber: int(o.pr),\n nonClosing: o.nonClosing,\n expectedHeadSha: o.expectedHead,\n title: o.title,\n body: body(undefined, o.bodyFile),\n headBranch: o.head,\n base: o.base,\n draft: o.ready !== true,\n dryRun: o.dryRun === true,\n }),\n );\nprogram\n .command('pr:info')\n .description('Inspect an exact PR; combine --issue and --pr to verify its native closing-issue association.')\n .option('--non-closing', 'Verify an exact native non-closing PR-to-issue reference')\n .option('--issue <number>', 'Issue to verify; issue-only lookup requires a GitHub-linked branch')\n .option('--pr <number>', 'Exact PR number; include --issue after issue branch links are replaced on publication')\n .action(async (o: { issue?: string; pr?: string; nonClosing?: boolean }) =>\n run('issue_pr_info', { issueNumber: int(o.issue), prNumber: int(o.pr), nonClosing: o.nonClosing }),\n );\nprogram\n .command('pr:list')\n .option('--state <state>', 'open, closed or all', 'open')\n .action(async (o: { state: string }) => {\n if (!['open', 'closed', 'all'].includes(o.state)) throw new Error('Invalid PR state.');\n const context = await contextFor(execution(), 'pr:list');\n print(await listPrs(context, o.state as 'open' | 'closed' | 'all'));\n });\nprogram\n .command('pr:checks')\n .requiredOption('--pr <number>')\n .action(async (o: { pr: string }) => {\n const context = await contextFor(execution(), 'pr:checks');\n print(await prChecks(context, Number(o.pr)));\n });\nprogram\n .command('pr:review')\n .requiredOption('--issue <number>')\n .requiredOption('--pr <number>')\n .requiredOption('--artifact <path>', 'Path to a UTF-8 JSON review artifact file (not inline JSON)')\n .option('--non-closing', 'Retain the referenced issue OPEN; finish refuses this mode')\n .option('--dry-run')\n .action(async (o: { issue: string; pr: string; artifact: string; dryRun?: boolean; nonClosing?: boolean }) =>\n run('issue_pr_review', {\n issueNumber: int(o.issue),\n prNumber: int(o.pr),\n artifact: readFileSync(o.artifact, 'utf8'),\n dryRun: o.dryRun === true,\n nonClosing: o.nonClosing,\n }),\n );\nprogram\n .command('review')\n .argument('<action>', 'submit or doctor')\n .description('Submit an independent verdict or check its configured App')\n .option('--pr <number>', 'Required for submit')\n .option('--head <sha>', 'Required exact head for submit')\n .option('--identity <name>', 'Required configured reviewer profile')\n .option('--verdict <path>', 'Required for submit: UTF-8 JSON verdict, at most 64 KiB')\n .action(async (action: string, o: { pr?: string; head?: string; identity?: string; verdict?: string }) => {\n if (!['submit', 'doctor'].includes(action)) throw new DeliveryError('review action must be submit or doctor.');\n const identity = o.identity ?? execution().identity ?? '';\n const settings = await loadDeliverySettings(undefined, { reviewerIdentity: identity, prepareEnvironment: true });\n const profile = settings.roles.reviewer;\n if (!('appId' in profile))\n throw new DeliveryError('identity: Select a reviewer profile with explicit App/provider binding.');\n if (action === 'doctor') {\n if (o.pr !== undefined || o.head !== undefined || o.verdict !== undefined)\n throw new DeliveryError('review doctor does not accept submission inputs.');\n const clients = await createDeliveryGitHubClients({\n config: settings,\n identity,\n role: 'reviewer',\n env: settings.environment!,\n });\n const actorLogin = await clients.appActorLogin!();\n printCommandResult('review:doctor', {\n status: 'authenticated',\n identity,\n provider: profile.provider,\n appId: profile.appId,\n installationId: profile.installationId,\n actorLogin,\n source: appCredentialSource(profile).type,\n });\n return;\n }\n if (o.pr === undefined || o.head === undefined || o.verdict === undefined)\n throw new DeliveryError('review submit requires --pr, --head and --verdict.');\n const fd = openSync(o.verdict, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);\n let raw: string;\n let verdictFileSha256: string;\n try {\n if (!fstatSync(fd).isFile()) throw new DeliveryError('verdict: Expected a regular file.');\n const bytes = Buffer.alloc(64 * 1024 + 1);\n let size = 0;\n while (size < bytes.length) {\n const count = readSync(fd, bytes, size, bytes.length - size, null);\n if (count === 0) break;\n size += count;\n }\n if (size > 64 * 1024) throw new DeliveryError('verdict: File exceeds 64 KiB.');\n const content = bytes.subarray(0, size);\n raw = content.toString('utf8');\n if (!Buffer.from(raw, 'utf8').equals(content)) throw new DeliveryError('verdict: Expected valid UTF-8.');\n verdictFileSha256 = `sha256:${createHash('sha256').update(content).digest('hex')}`;\n } finally {\n closeSync(fd);\n }\n const verdict = parseReviewVerdict(raw);\n assertReviewVerdictTarget(verdict, profile.provider, o.head);\n const prNumber = z.number().int().positive().parse(Number(o.pr));\n const authorContext = await contextFor(\n { ...execution(), settings, identity, reviewSubmission: true },\n 'pr:info',\n 'author',\n );\n const reviewBase = await readGitHubReviewBase(authorContext, prNumber, o.head);\n const artifact = buildReviewArtifact({\n verdict,\n verdictFileSha256,\n identity,\n provider: profile.provider,\n expectedHead: o.head,\n prNumber,\n authorIdentity: settings.roles.author.identity,\n reviewBase,\n });\n await validateReviewTarget(authorContext, artifact, prNumber);\n const clients = await createDeliveryGitHubClients({\n config: authorContext.config,\n identity,\n role: 'reviewer',\n selectedAuthor: authorContext.clients,\n ...(authorContext.credentialEnvironment === undefined ? {} : { env: authorContext.credentialEnvironment }),\n });\n const context = { ...authorContext, clients };\n try {\n printCommandResult(\n 'review:submit',\n await submitFormalReview(context, {\n artifact: JSON.stringify(artifact),\n issueNumber: verdict.issueNumber,\n prNumber,\n ...(verdict.nonClosing === undefined ? {} : { nonClosing: verdict.nonClosing }),\n }),\n );\n } catch (error) {\n if (!(error instanceof ReviewSubmissionError)) throw error;\n process.stdout.write(\n `${JSON.stringify({ status: 'submission-unverified', submission: error.submission, nextAction: error.message })}\\n`,\n );\n process.exitCode = 1;\n }\n });\n\nprogram\n .command('config:resolve')\n .description('Read the effective GitHub destination and admission digest')\n .action(async () => {\n const context = await contextFor(execution(), 'config:resolve');\n print({\n configDigest: context.configuration?.configDigest,\n routing: context.configuration?.routing,\n reviewRoute: await preflightReviewRoute(context, undefined, undefined, 'development'),\n });\n });\nprogram\n .command('mcp:serve')\n .action(async () => serveAiDeliveryMcp({ ...execution(), runtimeEntryPath: fileURLToPath(import.meta.url) }));\n\nprogram.parseAsync(process.argv).catch((error: unknown) => {\n const options = program.opts<{ json?: boolean; verbose?: boolean }>();\n printCommandError(error, options.json === true && options.verbose === true);\n});\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,WAAW,WAAW,WAAW,UAAU,cAAc,gBAAgB;AAClF,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,mCAAmC;AAC5C,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,SAAS,SAAS;AAElB,SAAS,mBAAmB,0BAA0B;AACtD,SAAS,YAAY,mBAA0C;AAC/D,SAAS,SAAS,sBAAsB,UAAU,0BAA0B;AAC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AAAA,MACA,MAAM,mBAAmB,SAAS;AAAA,QAChC,UAAU,KAAK,UAAU,QAAQ;AAAA,QACjC,aAAa,QAAQ;AAAA,QACrB;AAAA,QACA,GAAI,QAAQ,eAAe,SAAY,CAAC,IAAI,EAAE,YAAY,QAAQ,WAAW;AAAA,MAC/E,CAAC;AAAA,IACH;AAAA,EACF,SAAS,OAAO;AACd,QAAI,EAAE,iBAAiB,uBAAwB,OAAM;AACrD,YAAQ,OAAO;AAAA,MACb,GAAG,KAAK,UAAU,EAAE,QAAQ,yBAAyB,YAAY,MAAM,YAAY,YAAY,MAAM,QAAQ,CAAC,CAAC;AAAA;AAAA,IACjH;AACA,YAAQ,WAAW;AAAA,EACrB;AACF,CAAC;AAEH,QACG,QAAQ,gBAAgB,EACxB,YAAY,4DAA4D,EACxE,OAAO,YAAY;AAClB,QAAM,UAAU,MAAM,WAAW,UAAU,GAAG,gBAAgB;AAC9D,QAAM;AAAA,IACJ,cAAc,QAAQ,eAAe;AAAA,IACrC,SAAS,QAAQ,eAAe;AAAA,IAChC,aAAa,MAAM,qBAAqB,SAAS,QAAW,QAAW,aAAa;AAAA,EACtF,CAAC;AACH,CAAC;AACH,QACG,QAAQ,WAAW,EACnB,OAAO,YAAY,mBAAmB,EAAE,GAAG,UAAU,GAAG,kBAAkB,cAAc,YAAY,GAAG,EAAE,CAAC,CAAC;AAE9G,QAAQ,WAAW,QAAQ,IAAI,EAAE,MAAM,CAAC,UAAmB;AACzD,QAAM,UAAU,QAAQ,KAA4C;AACpE,oBAAkB,OAAO,QAAQ,SAAS,QAAQ,QAAQ,YAAY,IAAI;AAC5E,CAAC;",
|
|
6
6
|
"names": ["clients"]
|
|
7
7
|
}
|
package/dist/dispatch.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { publishPr, submitFormalReview } from "./pr.js";
|
|
24
24
|
import { getAiDeliveryMcpTool } from "./mcp/tools.js";
|
|
25
25
|
import { IssueValidationError } from "./issueContract.js";
|
|
26
|
+
import { staleServerNotice } from "./version.js";
|
|
26
27
|
function requiredNumber(input, key) {
|
|
27
28
|
const value = input[key];
|
|
28
29
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0)
|
|
@@ -254,7 +255,8 @@ async function executeTool(name, raw, execution) {
|
|
|
254
255
|
return issueView(context, requiredNumber(input, "issueNumber"), { verbose: execution.verbose === true });
|
|
255
256
|
case "issue_ready_check":
|
|
256
257
|
return readyCheck(context, requiredNumber(input, "issueNumber"));
|
|
257
|
-
case "issue_pr_create":
|
|
258
|
+
case "issue_pr_create": {
|
|
259
|
+
const staleNotice = staleServerNotice(execution.runtimeEntryPath);
|
|
258
260
|
return publishPr(context, {
|
|
259
261
|
...input.prNumber === void 0 ? {} : { prNumber: requiredNumber(input, "prNumber") },
|
|
260
262
|
issueNumber: requiredNumber(input, "issueNumber"),
|
|
@@ -265,8 +267,10 @@ async function executeTool(name, raw, execution) {
|
|
|
265
267
|
...input.head === void 0 && input.headBranch === void 0 ? {} : { headBranch: requireString(input, input.head === void 0 ? "headBranch" : "head") },
|
|
266
268
|
...input.base === void 0 ? {} : { baseBranch: requireString(input, "base") },
|
|
267
269
|
draft: input.draft !== false,
|
|
268
|
-
dryRun: input.dryRun === true
|
|
270
|
+
dryRun: input.dryRun === true,
|
|
271
|
+
...staleNotice === void 0 ? {} : { staleNotice }
|
|
269
272
|
});
|
|
273
|
+
}
|
|
270
274
|
case "milestone_create":
|
|
271
275
|
return createMilestone(context, {
|
|
272
276
|
title: requireString(input, "title"),
|
package/dist/dispatch.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/dispatch.ts"],
|
|
4
|
-
"sourcesContent": ["import { issueView, prView } from './readView.js';\nimport { loadDeliverySettings, type LoadedDeliverySettings } from './config/deliveryConfig.js';\nimport { DeliveryError } from './errors.js';\nimport { digestValue } from './delivery/common.js';\nimport { createMilestone } from './milestone.js';\nimport { evaluateCommandIdentityPolicy } from './github/commandIdentityPolicy.js';\nimport {\n CreatedTrackingIssueError,\n createIssue,\n canonicalIssueBody,\n commentIssue,\n listIssues,\n journalIssueStart,\n loadDeliveryContext,\n readyCheck,\n resumeCreatedIssue,\n startIssueBranch,\n startIssueProject,\n assertIssueStartCapacity,\n updateIssue,\n batchUpdateIssues,\n type BatchUpdateIssueInput,\n type CreateIssueInput,\n type IssueCommentInput,\n type ListIssuesInput,\n type UpdateIssueInput,\n} from './issue.js';\nimport { publishPr, submitFormalReview } from './pr.js';\nimport { getAiDeliveryMcpTool, type AiDeliveryMcpToolName } from './mcp/tools.js';\nimport { IssueValidationError } from './issueContract.js';\n\nexport interface ExecutionContext {\n settings?: LoadedDeliverySettings;\n reviewSubmission?: boolean;\n identity?: string;\n personalAuth?: boolean;\n repo?: string;\n repoRoot: string;\n runtimeEntryPath?: string;\n signal?: AbortSignal;\n /** Presentation only: lets issue_info skip the per-child rollup unless the caller asked for the full readback. */\n verbose?: boolean;\n}\nfunction requiredNumber(input: Record<string, unknown>, key: string): number {\n const value = input[key];\n if (typeof value !== 'number' || !Number.isSafeInteger(value) || value <= 0)\n throw new DeliveryError(`${key} must be positive.`);\n return value;\n}\nfunction optionalString(input: Record<string, unknown>, key: string): string | undefined {\n return typeof input[key] === 'string' ? input[key] : undefined;\n}\nfunction requireString(input: Record<string, unknown>, key: string): string {\n const value = optionalString(input, key);\n if (!value?.trim()) throw new DeliveryError(`${key} is required.`);\n return value;\n}\n/** Preserve every accepted tracking field when completing a partially created issue. */\nexport function resumedIssueUpdate(input: Record<string, unknown>): UpdateIssueInput {\n const {\n issueNumber,\n request: _request,\n requestId: _requestId,\n repo: _repo,\n resumeCreated: _resume,\n branch: _branch,\n ...fields\n } = input;\n return { ...fields, issueNumber: requiredNumber({ issueNumber }, 'issueNumber') } as UpdateIssueInput;\n}\nexport async function contextFor(\n input: ExecutionContext,\n commandName: string,\n role: 'author' | 'reviewer' = 'author',\n readPageLimit?: number,\n requireWritableProject?: boolean,\n) {\n const settings =\n input.settings ??\n (await loadDeliverySettings(\n undefined,\n input.reviewSubmission === true\n ? { reviewerIdentity: input.identity ?? '', prepareEnvironment: true }\n : undefined,\n ));\n if (input.reviewSubmission === true && role === 'author' && settings.roles.author.authSource !== 'personal')\n throw new DeliveryError(\n 'review submit requires the configured personal author for pre-key reads; another App key will not be loaded.',\n );\n const identity =\n input.reviewSubmission === true && role === 'author'\n ? settings.roles.author.identity\n : (input.identity ?? settings.roles[role].identity);\n const policy = evaluateCommandIdentityPolicy({\n commandName,\n deliveryConfig: settings,\n identity,\n ...(input.personalAuth === undefined ? {} : { personalAuth: input.personalAuth }),\n });\n if (policy.error) throw new DeliveryError(policy.error);\n return loadDeliveryContext({\n settings,\n ...(settings.environment === undefined ? {} : { env: settings.environment }),\n identity,\n repoRoot: input.repoRoot,\n role,\n ...(input.repo === undefined ? {} : { repository: input.repo }),\n ...(input.personalAuth === undefined ? {} : { personalAuth: input.personalAuth }),\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n ...(readPageLimit === undefined ? {} : { readPageLimit }),\n ...(requireWritableProject === undefined ? {} : { requireWritableProject }),\n });\n}\n/** GitHub owns branch linkage; hosts own worktree preparation. */\nexport async function startTrackedIssue(\n context: Awaited<ReturnType<typeof loadDeliveryContext>>,\n input: Record<string, unknown>,\n) {\n let number = input.issueNumber === undefined ? undefined : requiredNumber(input, 'issueNumber');\n let created: { number: number; title: string; url: string } | undefined;\n let createdBody: string | undefined;\n let branch: Awaited<ReturnType<typeof startIssueBranch>> | undefined;\n let branchAttempted = false;\n let phase = 'branch-or-journal';\n const registration = (phase: string, error: unknown) => ({\n status: 'created-not-started' as const,\n repository: context.config.repository,\n createdIssue: created,\n failure: { phase, message: error instanceof Error ? error.message : String(error) },\n safeResume: {\n tool: 'issue_start',\n arguments: {\n // Replay tracking only when that phase is incomplete; later recovery preserves native edits/parking.\n ...(phase === 'tracking'\n ? { ...input, ...(createdBody === undefined ? {} : { body: createdBody }), resumeCreated: true }\n : {}),\n repo: context.config.repository,\n issueNumber: number,\n ...(input.overrideReason === undefined ? {} : { overrideReason: input.overrideReason }),\n ...((branch?.branch ?? optionalString(input, 'branch')) === undefined\n ? {}\n : { branch: branch?.branch ?? optionalString(input, 'branch') }),\n },\n },\n });\n if (number === undefined) {\n const title = optionalString(input, 'title') ?? requireString(input, 'request');\n const tracking = {\n ...input,\n title,\n body: optionalString(input, 'body') ?? optionalString(input, 'request') ?? title,\n } as unknown as CreateIssueInput;\n tracking.body = canonicalIssueBody(tracking);\n const intent = digestValue(\n Object.fromEntries(\n Object.entries({\n title,\n body: tracking.body,\n issueType: tracking.issueType,\n points: tracking.points,\n priority: tracking.priority,\n labels: tracking.labels,\n blockedBy: tracking.blockedBy,\n blocks: tracking.blocks,\n overrideReason: tracking.overrideReason,\n parentIssueNumber: tracking.parentIssueNumber,\n milestone: tracking.milestone,\n branch: input.branch,\n }).filter(([, value]) => value !== undefined),\n ),\n );\n const requestKey = optionalString(input, 'requestId') ?? intent;\n const marker = `<!-- ai-delivery-start: ${digestValue({ repository: context.config.repository.toLowerCase(), requestKey })} -->`;\n tracking.body = `${tracking.body}\\n\\n<!-- ai-delivery-start-intent: ${intent} -->\\n${marker}`;\n createdBody = tracking.body;\n let completed = false;\n const matches: Awaited<ReturnType<typeof context.clients.rest.issues.listForRepo>>['data'] = [];\n for (let page = 1; page <= 20; page++) {\n const batch = (\n await context.clients.rest.issues.listForRepo({ ...context.repo, state: 'all', page, per_page: 100 })\n ).data;\n matches.push(...batch.filter((value) => !('pull_request' in value) && value.body?.includes(marker)));\n if (batch.length < 100) {\n completed = true;\n break;\n }\n }\n if (!completed)\n throw new DeliveryError(\n 'Issue-start retry search exceeds the bounded readback window; select a known issue number.',\n );\n if (matches.length > 1) throw new DeliveryError('Conflicting issues claim the same start request.');\n const prior = matches[0];\n if (\n prior &&\n (prior.title !== title ||\n canonicalIssueBody({ title: prior.title, body: prior.body ?? '' }) !== tracking.body ||\n prior.state !== 'open')\n )\n throw new DeliveryError('Prior issue-start request conflicts with the requested intent or state.');\n try {\n if (prior) {\n createdBody = prior.body ?? '';\n created = { number: prior.number, title: prior.title, url: prior.html_url };\n number = prior.number;\n await resumeCreatedIssue(context, { ...tracking, issueNumber: number });\n } else {\n const result = await createIssue(context, tracking);\n created = result.created;\n createdBody = result.body;\n number = created.number;\n }\n } catch (error) {\n if (error instanceof CreatedTrackingIssueError) {\n created = error.created;\n number = created.number;\n } else if (!created) throw error;\n return registration('tracking', error);\n }\n } else if (input.resumeCreated === true) {\n const issue = (await context.clients.rest.issues.get({ ...context.repo, issue_number: number })).data;\n if (issue.number !== number || 'pull_request' in issue)\n throw new DeliveryError('Known-created issue readback disagrees.');\n created = { number, title: issue.title, url: issue.html_url };\n try {\n await resumeCreatedIssue(context, resumedIssueUpdate(input));\n } catch (error) {\n return registration('tracking', error);\n }\n }\n try {\n const readiness = await readyCheck(context, number);\n if (!readiness.ready) throw new IssueValidationError(readiness.failures);\n await assertIssueStartCapacity(context, number, optionalString(input, 'overrideReason'));\n branchAttempted = true;\n branch = await startIssueBranch(context, number, optionalString(input, 'branch'));\n phase = 'project-status';\n await startIssueProject(context, number, optionalString(input, 'overrideReason'));\n phase = 'journal';\n await journalIssueStart(context, number);\n return {\n issueNumber: number,\n repository: context.config.repository,\n branch: branch.branch,\n headSha: branch.headSha,\n reused: branch.reused,\n };\n } catch (error) {\n if (created) return registration(phase, error);\n if (!branchAttempted) throw error;\n return {\n status: 'start-incomplete' as const,\n issueNumber: number,\n repository: context.config.repository,\n failure: { phase, message: error instanceof Error ? error.message : String(error) },\n safeResume: {\n tool: 'issue_start',\n arguments: {\n repo: context.config.repository,\n issueNumber: number,\n ...(input.overrideReason === undefined ? {} : { overrideReason: input.overrideReason }),\n ...((branch?.branch ?? optionalString(input, 'branch')) === undefined\n ? {}\n : { branch: branch?.branch ?? optionalString(input, 'branch') }),\n },\n },\n };\n }\n}\n\nexport async function executeTool(\n name: AiDeliveryMcpToolName,\n raw: unknown,\n execution: ExecutionContext,\n): Promise<unknown> {\n const definition = getAiDeliveryMcpTool(name);\n if (!definition) throw new DeliveryError(`Unknown ai-delivery tool ${name}.`);\n const { repo: selected, verbose: _verbose, ...input } = definition.inputSchema.parse(raw) as Record<string, unknown>;\n if (selected !== undefined && execution.repo !== undefined && selected !== execution.repo)\n throw new DeliveryError('Tool and execution repository selectors disagree.');\n // Ready diagnostics need no repository checkout, configuration or credential lookup.\n if (name === 'issue_create') canonicalIssueBody(input as unknown as CreateIssueInput);\n const repo = typeof selected === 'string' ? selected : execution.repo;\n const selectedExecution = { ...execution, ...(repo === undefined ? {} : { repo }) };\n const requestedIdentity = name === 'issue_pr_review' ? optionalString(input, 'identity') : undefined;\n const context = await contextFor(\n { ...selectedExecution, ...(requestedIdentity === undefined ? {} : { identity: requestedIdentity }) },\n definition.commandName,\n name === 'issue_pr_review' ? 'reviewer' : 'author',\n );\n switch (name) {\n case 'issue_comment':\n return commentIssue(context, input as IssueCommentInput);\n case 'issue_create':\n return createIssue(context, input as unknown as CreateIssueInput);\n case 'issue_start':\n return startTrackedIssue(context, input);\n case 'issue_batch_update':\n return batchUpdateIssues(context, input as unknown as BatchUpdateIssueInput, selectedExecution.signal);\n case 'issue_update':\n return updateIssue(context, input as unknown as UpdateIssueInput);\n case 'issue_list':\n case 'issue_search':\n return listIssues(context, input as ListIssuesInput);\n case 'issue_info':\n return issueView(context, requiredNumber(input, 'issueNumber'), { verbose: execution.verbose === true });\n case 'issue_ready_check':\n return readyCheck(context, requiredNumber(input, 'issueNumber'));\n case 'issue_pr_create':\n return publishPr(context, {\n ...(input.prNumber === undefined ? {} : { prNumber: requiredNumber(input, 'prNumber') }),\n issueNumber: requiredNumber(input, 'issueNumber'),\n ...(input.nonClosing === undefined ? {} : { nonClosing: input.nonClosing === true }),\n ...(input.expectedHeadSha === undefined ? {} : { expectedHeadSha: requireString(input, 'expectedHeadSha') }),\n ...(input.body === undefined ? {} : { body: requireString(input, 'body') }),\n ...(input.title === undefined ? {} : { title: requireString(input, 'title') }),\n ...(input.head === undefined && input.headBranch === undefined\n ? {}\n : { headBranch: requireString(input, input.head === undefined ? 'headBranch' : 'head') }),\n ...(input.base === undefined ? {} : { baseBranch: requireString(input, 'base') }),\n draft: input.draft !== false,\n dryRun: input.dryRun === true,\n });\n case 'milestone_create':\n return createMilestone(context, {\n title: requireString(input, 'title'),\n ...(input.description === undefined ? {} : { description: requireString(input, 'description') }),\n ...(input.dueOn === undefined ? {} : { dueOn: requireString(input, 'dueOn') }),\n });\n case 'issue_pr_info':\n return prView(context, input as { issueNumber?: number; prNumber?: number; nonClosing?: boolean });\n case 'issue_pr_review':\n return submitFormalReview(context, {\n artifact: requireString(input, 'artifact'),\n issueNumber: requiredNumber(input, 'issueNumber'),\n ...(input.nonClosing === undefined ? {} : { nonClosing: input.nonClosing === true }),\n prNumber: requiredNumber(input, 'prNumber'),\n dryRun: input.dryRun === true,\n });\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,WAAW,cAAc;AAClC,SAAS,4BAAyD;AAClE,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,qCAAqC;AAC9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,WAAW,0BAA0B;AAC9C,SAAS,4BAAwD;AACjE,SAAS,4BAA4B;
|
|
4
|
+
"sourcesContent": ["import { issueView, prView } from './readView.js';\nimport { loadDeliverySettings, type LoadedDeliverySettings } from './config/deliveryConfig.js';\nimport { DeliveryError } from './errors.js';\nimport { digestValue } from './delivery/common.js';\nimport { createMilestone } from './milestone.js';\nimport { evaluateCommandIdentityPolicy } from './github/commandIdentityPolicy.js';\nimport {\n CreatedTrackingIssueError,\n createIssue,\n canonicalIssueBody,\n commentIssue,\n listIssues,\n journalIssueStart,\n loadDeliveryContext,\n readyCheck,\n resumeCreatedIssue,\n startIssueBranch,\n startIssueProject,\n assertIssueStartCapacity,\n updateIssue,\n batchUpdateIssues,\n type BatchUpdateIssueInput,\n type CreateIssueInput,\n type IssueCommentInput,\n type ListIssuesInput,\n type UpdateIssueInput,\n} from './issue.js';\nimport { publishPr, submitFormalReview } from './pr.js';\nimport { getAiDeliveryMcpTool, type AiDeliveryMcpToolName } from './mcp/tools.js';\nimport { IssueValidationError } from './issueContract.js';\nimport { staleServerNotice } from './version.js';\n\nexport interface ExecutionContext {\n settings?: LoadedDeliverySettings;\n reviewSubmission?: boolean;\n identity?: string;\n personalAuth?: boolean;\n repo?: string;\n repoRoot: string;\n runtimeEntryPath?: string;\n signal?: AbortSignal;\n /** Presentation only: lets issue_info skip the per-child rollup unless the caller asked for the full readback. */\n verbose?: boolean;\n}\nfunction requiredNumber(input: Record<string, unknown>, key: string): number {\n const value = input[key];\n if (typeof value !== 'number' || !Number.isSafeInteger(value) || value <= 0)\n throw new DeliveryError(`${key} must be positive.`);\n return value;\n}\nfunction optionalString(input: Record<string, unknown>, key: string): string | undefined {\n return typeof input[key] === 'string' ? input[key] : undefined;\n}\nfunction requireString(input: Record<string, unknown>, key: string): string {\n const value = optionalString(input, key);\n if (!value?.trim()) throw new DeliveryError(`${key} is required.`);\n return value;\n}\n/** Preserve every accepted tracking field when completing a partially created issue. */\nexport function resumedIssueUpdate(input: Record<string, unknown>): UpdateIssueInput {\n const {\n issueNumber,\n request: _request,\n requestId: _requestId,\n repo: _repo,\n resumeCreated: _resume,\n branch: _branch,\n ...fields\n } = input;\n return { ...fields, issueNumber: requiredNumber({ issueNumber }, 'issueNumber') } as UpdateIssueInput;\n}\nexport async function contextFor(\n input: ExecutionContext,\n commandName: string,\n role: 'author' | 'reviewer' = 'author',\n readPageLimit?: number,\n requireWritableProject?: boolean,\n) {\n const settings =\n input.settings ??\n (await loadDeliverySettings(\n undefined,\n input.reviewSubmission === true\n ? { reviewerIdentity: input.identity ?? '', prepareEnvironment: true }\n : undefined,\n ));\n if (input.reviewSubmission === true && role === 'author' && settings.roles.author.authSource !== 'personal')\n throw new DeliveryError(\n 'review submit requires the configured personal author for pre-key reads; another App key will not be loaded.',\n );\n const identity =\n input.reviewSubmission === true && role === 'author'\n ? settings.roles.author.identity\n : (input.identity ?? settings.roles[role].identity);\n const policy = evaluateCommandIdentityPolicy({\n commandName,\n deliveryConfig: settings,\n identity,\n ...(input.personalAuth === undefined ? {} : { personalAuth: input.personalAuth }),\n });\n if (policy.error) throw new DeliveryError(policy.error);\n return loadDeliveryContext({\n settings,\n ...(settings.environment === undefined ? {} : { env: settings.environment }),\n identity,\n repoRoot: input.repoRoot,\n role,\n ...(input.repo === undefined ? {} : { repository: input.repo }),\n ...(input.personalAuth === undefined ? {} : { personalAuth: input.personalAuth }),\n ...(input.signal === undefined ? {} : { signal: input.signal }),\n ...(readPageLimit === undefined ? {} : { readPageLimit }),\n ...(requireWritableProject === undefined ? {} : { requireWritableProject }),\n });\n}\n/** GitHub owns branch linkage; hosts own worktree preparation. */\nexport async function startTrackedIssue(\n context: Awaited<ReturnType<typeof loadDeliveryContext>>,\n input: Record<string, unknown>,\n) {\n let number = input.issueNumber === undefined ? undefined : requiredNumber(input, 'issueNumber');\n let created: { number: number; title: string; url: string } | undefined;\n let createdBody: string | undefined;\n let branch: Awaited<ReturnType<typeof startIssueBranch>> | undefined;\n let branchAttempted = false;\n let phase = 'branch-or-journal';\n const registration = (phase: string, error: unknown) => ({\n status: 'created-not-started' as const,\n repository: context.config.repository,\n createdIssue: created,\n failure: { phase, message: error instanceof Error ? error.message : String(error) },\n safeResume: {\n tool: 'issue_start',\n arguments: {\n // Replay tracking only when that phase is incomplete; later recovery preserves native edits/parking.\n ...(phase === 'tracking'\n ? { ...input, ...(createdBody === undefined ? {} : { body: createdBody }), resumeCreated: true }\n : {}),\n repo: context.config.repository,\n issueNumber: number,\n ...(input.overrideReason === undefined ? {} : { overrideReason: input.overrideReason }),\n ...((branch?.branch ?? optionalString(input, 'branch')) === undefined\n ? {}\n : { branch: branch?.branch ?? optionalString(input, 'branch') }),\n },\n },\n });\n if (number === undefined) {\n const title = optionalString(input, 'title') ?? requireString(input, 'request');\n const tracking = {\n ...input,\n title,\n body: optionalString(input, 'body') ?? optionalString(input, 'request') ?? title,\n } as unknown as CreateIssueInput;\n tracking.body = canonicalIssueBody(tracking);\n const intent = digestValue(\n Object.fromEntries(\n Object.entries({\n title,\n body: tracking.body,\n issueType: tracking.issueType,\n points: tracking.points,\n priority: tracking.priority,\n labels: tracking.labels,\n blockedBy: tracking.blockedBy,\n blocks: tracking.blocks,\n overrideReason: tracking.overrideReason,\n parentIssueNumber: tracking.parentIssueNumber,\n milestone: tracking.milestone,\n branch: input.branch,\n }).filter(([, value]) => value !== undefined),\n ),\n );\n const requestKey = optionalString(input, 'requestId') ?? intent;\n const marker = `<!-- ai-delivery-start: ${digestValue({ repository: context.config.repository.toLowerCase(), requestKey })} -->`;\n tracking.body = `${tracking.body}\\n\\n<!-- ai-delivery-start-intent: ${intent} -->\\n${marker}`;\n createdBody = tracking.body;\n let completed = false;\n const matches: Awaited<ReturnType<typeof context.clients.rest.issues.listForRepo>>['data'] = [];\n for (let page = 1; page <= 20; page++) {\n const batch = (\n await context.clients.rest.issues.listForRepo({ ...context.repo, state: 'all', page, per_page: 100 })\n ).data;\n matches.push(...batch.filter((value) => !('pull_request' in value) && value.body?.includes(marker)));\n if (batch.length < 100) {\n completed = true;\n break;\n }\n }\n if (!completed)\n throw new DeliveryError(\n 'Issue-start retry search exceeds the bounded readback window; select a known issue number.',\n );\n if (matches.length > 1) throw new DeliveryError('Conflicting issues claim the same start request.');\n const prior = matches[0];\n if (\n prior &&\n (prior.title !== title ||\n canonicalIssueBody({ title: prior.title, body: prior.body ?? '' }) !== tracking.body ||\n prior.state !== 'open')\n )\n throw new DeliveryError('Prior issue-start request conflicts with the requested intent or state.');\n try {\n if (prior) {\n createdBody = prior.body ?? '';\n created = { number: prior.number, title: prior.title, url: prior.html_url };\n number = prior.number;\n await resumeCreatedIssue(context, { ...tracking, issueNumber: number });\n } else {\n const result = await createIssue(context, tracking);\n created = result.created;\n createdBody = result.body;\n number = created.number;\n }\n } catch (error) {\n if (error instanceof CreatedTrackingIssueError) {\n created = error.created;\n number = created.number;\n } else if (!created) throw error;\n return registration('tracking', error);\n }\n } else if (input.resumeCreated === true) {\n const issue = (await context.clients.rest.issues.get({ ...context.repo, issue_number: number })).data;\n if (issue.number !== number || 'pull_request' in issue)\n throw new DeliveryError('Known-created issue readback disagrees.');\n created = { number, title: issue.title, url: issue.html_url };\n try {\n await resumeCreatedIssue(context, resumedIssueUpdate(input));\n } catch (error) {\n return registration('tracking', error);\n }\n }\n try {\n const readiness = await readyCheck(context, number);\n if (!readiness.ready) throw new IssueValidationError(readiness.failures);\n await assertIssueStartCapacity(context, number, optionalString(input, 'overrideReason'));\n branchAttempted = true;\n branch = await startIssueBranch(context, number, optionalString(input, 'branch'));\n phase = 'project-status';\n await startIssueProject(context, number, optionalString(input, 'overrideReason'));\n phase = 'journal';\n await journalIssueStart(context, number);\n return {\n issueNumber: number,\n repository: context.config.repository,\n branch: branch.branch,\n headSha: branch.headSha,\n reused: branch.reused,\n };\n } catch (error) {\n if (created) return registration(phase, error);\n if (!branchAttempted) throw error;\n return {\n status: 'start-incomplete' as const,\n issueNumber: number,\n repository: context.config.repository,\n failure: { phase, message: error instanceof Error ? error.message : String(error) },\n safeResume: {\n tool: 'issue_start',\n arguments: {\n repo: context.config.repository,\n issueNumber: number,\n ...(input.overrideReason === undefined ? {} : { overrideReason: input.overrideReason }),\n ...((branch?.branch ?? optionalString(input, 'branch')) === undefined\n ? {}\n : { branch: branch?.branch ?? optionalString(input, 'branch') }),\n },\n },\n };\n }\n}\n\nexport async function executeTool(\n name: AiDeliveryMcpToolName,\n raw: unknown,\n execution: ExecutionContext,\n): Promise<unknown> {\n const definition = getAiDeliveryMcpTool(name);\n if (!definition) throw new DeliveryError(`Unknown ai-delivery tool ${name}.`);\n const { repo: selected, verbose: _verbose, ...input } = definition.inputSchema.parse(raw) as Record<string, unknown>;\n if (selected !== undefined && execution.repo !== undefined && selected !== execution.repo)\n throw new DeliveryError('Tool and execution repository selectors disagree.');\n // Ready diagnostics need no repository checkout, configuration or credential lookup.\n if (name === 'issue_create') canonicalIssueBody(input as unknown as CreateIssueInput);\n const repo = typeof selected === 'string' ? selected : execution.repo;\n const selectedExecution = { ...execution, ...(repo === undefined ? {} : { repo }) };\n const requestedIdentity = name === 'issue_pr_review' ? optionalString(input, 'identity') : undefined;\n const context = await contextFor(\n { ...selectedExecution, ...(requestedIdentity === undefined ? {} : { identity: requestedIdentity }) },\n definition.commandName,\n name === 'issue_pr_review' ? 'reviewer' : 'author',\n );\n switch (name) {\n case 'issue_comment':\n return commentIssue(context, input as IssueCommentInput);\n case 'issue_create':\n return createIssue(context, input as unknown as CreateIssueInput);\n case 'issue_start':\n return startTrackedIssue(context, input);\n case 'issue_batch_update':\n return batchUpdateIssues(context, input as unknown as BatchUpdateIssueInput, selectedExecution.signal);\n case 'issue_update':\n return updateIssue(context, input as unknown as UpdateIssueInput);\n case 'issue_list':\n case 'issue_search':\n return listIssues(context, input as ListIssuesInput);\n case 'issue_info':\n return issueView(context, requiredNumber(input, 'issueNumber'), { verbose: execution.verbose === true });\n case 'issue_ready_check':\n return readyCheck(context, requiredNumber(input, 'issueNumber'));\n case 'issue_pr_create': {\n const staleNotice = staleServerNotice(execution.runtimeEntryPath);\n return publishPr(context, {\n ...(input.prNumber === undefined ? {} : { prNumber: requiredNumber(input, 'prNumber') }),\n issueNumber: requiredNumber(input, 'issueNumber'),\n ...(input.nonClosing === undefined ? {} : { nonClosing: input.nonClosing === true }),\n ...(input.expectedHeadSha === undefined ? {} : { expectedHeadSha: requireString(input, 'expectedHeadSha') }),\n ...(input.body === undefined ? {} : { body: requireString(input, 'body') }),\n ...(input.title === undefined ? {} : { title: requireString(input, 'title') }),\n ...(input.head === undefined && input.headBranch === undefined\n ? {}\n : { headBranch: requireString(input, input.head === undefined ? 'headBranch' : 'head') }),\n ...(input.base === undefined ? {} : { baseBranch: requireString(input, 'base') }),\n draft: input.draft !== false,\n dryRun: input.dryRun === true,\n ...(staleNotice === undefined ? {} : { staleNotice }),\n });\n }\n case 'milestone_create':\n return createMilestone(context, {\n title: requireString(input, 'title'),\n ...(input.description === undefined ? {} : { description: requireString(input, 'description') }),\n ...(input.dueOn === undefined ? {} : { dueOn: requireString(input, 'dueOn') }),\n });\n case 'issue_pr_info':\n return prView(context, input as { issueNumber?: number; prNumber?: number; nonClosing?: boolean });\n case 'issue_pr_review':\n return submitFormalReview(context, {\n artifact: requireString(input, 'artifact'),\n issueNumber: requiredNumber(input, 'issueNumber'),\n ...(input.nonClosing === undefined ? {} : { nonClosing: input.nonClosing === true }),\n prNumber: requiredNumber(input, 'prNumber'),\n dryRun: input.dryRun === true,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,WAAW,cAAc;AAClC,SAAS,4BAAyD;AAClE,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,qCAAqC;AAC9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,WAAW,0BAA0B;AAC9C,SAAS,4BAAwD;AACjE,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAclC,SAAS,eAAe,OAAgC,KAAqB;AAC3E,QAAM,QAAQ,MAAM,GAAG;AACvB,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,cAAc,KAAK,KAAK,SAAS;AACxE,UAAM,IAAI,cAAc,GAAG,GAAG,oBAAoB;AACpD,SAAO;AACT;AACA,SAAS,eAAe,O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S;AAAA,QACjC,UAAU,cAAc,OAAO,UAAU;AAAA,QACzC,aAAa,eAAe,OAAO,aAAa;AAAA,QAChD,GAAI,MAAM,eAAe,SAAY,CAAC,IAAI,EAAE,YAAY,MAAM,eAAe,KAAK;AAAA,QAClF,UAAU,eAAe,OAAO,UAAU;AAAA,QAC1C,QAAQ,MAAM,WAAW;AAAA,MAC3B,CAAC;AAAA,EACL;AACF;",
|
|
6
6
|
"names": ["phase"]
|
|
7
7
|
}
|
package/dist/issue.js
CHANGED
|
@@ -1051,10 +1051,7 @@ async function prepareIssueUpdate(context, input) {
|
|
|
1051
1051
|
input = {
|
|
1052
1052
|
...input,
|
|
1053
1053
|
...projectOnly || bodyFree ? {} : { body: prepared.body },
|
|
1054
|
-
...prepared.statusOnly ? {} : {
|
|
1055
|
-
title: prepared.issue.title,
|
|
1056
|
-
...prepared.issue.draft ? { park: true } : {}
|
|
1057
|
-
},
|
|
1054
|
+
...prepared.statusOnly ? {} : { title: prepared.issue.title },
|
|
1058
1055
|
preserveHistory: prepared.preserveHistory
|
|
1059
1056
|
};
|
|
1060
1057
|
const acceptedLabels = input.labels === void 0 ? void 0 : await labels(context, input.labels);
|