@aviaratech/ai-delivery 0.3.43 → 0.3.44
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/directoryIndependent.test.js +22 -3
- package/dist/directoryIndependent.test.js.map +3 -3
- package/dist/dispatch.js.map +2 -2
- package/dist/fixtures/builderReady.d.ts +2 -0
- package/dist/fixtures/builderReady.js +2 -0
- package/dist/fixtures/builderReady.js.map +2 -2
- package/dist/fixtures/inertTarget.d.ts +7 -0
- package/dist/fixtures/inertTarget.js +5 -0
- package/dist/fixtures/inertTarget.js.map +2 -2
- package/dist/fixtures/issue63.d.ts +3 -0
- package/dist/issue.d.ts +21 -1
- package/dist/issue.js +100 -12
- package/dist/issue.js.map +2 -2
- package/dist/issueBlockerGuard.test.js +11 -0
- package/dist/issueBlockerGuard.test.js.map +2 -2
- package/dist/issueContract.d.ts +7 -0
- package/dist/issueContract.js +56 -9
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.d.ts +1 -0
- package/dist/issueContract.test.js +66 -4
- package/dist/issueContract.test.js.map +2 -2
- package/dist/issueIntake.test.js +17 -0
- package/dist/issueIntake.test.js.map +2 -2
- package/dist/issueJournal.d.ts +13 -9
- package/dist/issueJournal.js +14 -10
- package/dist/issueJournal.js.map +2 -2
- package/dist/issueJournal.test.js +11 -8
- package/dist/issueJournal.test.js.map +2 -2
- package/dist/issueTracking.test.js +135 -2
- package/dist/issueTracking.test.js.map +3 -3
- package/dist/mcp/index.js +10 -3
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools.d.ts +39 -25
- package/dist/mcp/tools.js +23 -5
- package/dist/mcp/tools.js.map +2 -2
- package/dist/readView.d.ts +2 -0
- package/dist/readView.js +1 -1
- package/dist/readView.js.map +2 -2
- package/dist/releaseReconciliation.test.js +20 -6
- package/dist/releaseReconciliation.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +138 -112
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/ticket-design/SKILL.md +11 -10
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -3,38 +3,39 @@ export declare const AI_DELIVERY_MCP_CONTRACT_VERSION: 'ai-delivery.mcp@2';
|
|
|
3
3
|
export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
4
4
|
readonly name: 'issue_comment';
|
|
5
5
|
readonly commandName: 'comment';
|
|
6
|
-
readonly description: 'Post a typed issue journal with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.';
|
|
6
|
+
readonly description: 'Post a plain comment with body alone, or a typed issue journal with kind and its fields, with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.';
|
|
7
7
|
readonly inputSchema: z.ZodObject<{
|
|
8
|
-
issueNumber: z.ZodNumber
|
|
9
|
-
summary: z.ZodString
|
|
10
|
-
status: z.ZodString
|
|
11
|
-
nextStep: z.ZodString
|
|
12
|
-
nextDate: z.
|
|
13
|
-
keyNumbers: z.ZodArray<z.ZodString
|
|
14
|
-
evidence: z.ZodArray<z.ZodURL
|
|
15
|
-
details: z.ZodOptional<z.ZodString
|
|
16
|
-
lengthCap: z.ZodOptional<z.ZodNumber
|
|
17
|
-
kind: z.ZodEnum<{
|
|
8
|
+
issueNumber: z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
10
|
+
status: z.ZodOptional<z.ZodString>;
|
|
11
|
+
nextStep: z.ZodOptional<z.ZodString>;
|
|
12
|
+
nextDate: z.ZodOptional<z.ZodUnion<readonly [z.ZodISODate, z.ZodNull, z.ZodPipe<z.ZodLiteral<"null">, z.ZodTransform<null, "null">>]>>;
|
|
13
|
+
keyNumbers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
15
|
+
details: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
lengthCap: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
17
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
18
18
|
blocker: "blocker";
|
|
19
19
|
closeout: "closeout";
|
|
20
20
|
decision: "decision";
|
|
21
21
|
progress: "progress";
|
|
22
22
|
start: "start";
|
|
23
|
-
}
|
|
24
|
-
outcome: z.ZodOptional<z.ZodString
|
|
25
|
-
done: z.ZodOptional<z.ZodArray<z.ZodString
|
|
26
|
-
decisionNeeded: z.ZodOptional<z.ZodString
|
|
27
|
-
decision: z.ZodOptional<z.ZodString
|
|
28
|
-
rationale: z.ZodOptional<z.ZodString
|
|
29
|
-
blocker: z.ZodOptional<z.ZodString
|
|
30
|
-
resolution: z.ZodOptional<z.ZodString
|
|
31
|
-
acceptance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
}>>;
|
|
24
|
+
outcome: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
done: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
26
|
+
decisionNeeded: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
27
|
+
decision: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
28
|
+
rationale: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
blocker: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
30
|
+
resolution: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
31
|
+
acceptance: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
32
|
criterion: z.ZodString;
|
|
33
33
|
evidence: z.ZodURL;
|
|
34
|
-
}, z.core.$strict
|
|
35
|
-
followUps: z.ZodOptional<z.ZodArray<z.ZodString
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
}, z.core.$strict>>>>;
|
|
35
|
+
followUps: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
36
|
+
body: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
repo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
38
|
+
verbose: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
38
39
|
}, z.core.$strict>;
|
|
39
40
|
}, {
|
|
40
41
|
readonly name: 'issue_create';
|
|
@@ -89,6 +90,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
89
90
|
}>;
|
|
90
91
|
}, z.core.$strict>], "tier">>;
|
|
91
92
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
94
|
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
95
|
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
94
96
|
path: z.ZodString;
|
|
@@ -135,6 +137,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
135
137
|
}>;
|
|
136
138
|
}, z.core.$strict>], "tier">>;
|
|
137
139
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
141
|
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
142
|
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
143
|
path: z.ZodString;
|
|
@@ -210,6 +213,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
210
213
|
}>;
|
|
211
214
|
}, z.core.$strict>], "tier">>;
|
|
212
215
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
217
|
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
218
|
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
215
219
|
path: z.ZodString;
|
|
@@ -370,6 +374,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
370
374
|
}>;
|
|
371
375
|
}, z.core.$strict>], "tier">>;
|
|
372
376
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
377
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
373
378
|
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
374
379
|
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
375
380
|
path: z.ZodString;
|
|
@@ -421,6 +426,10 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
421
426
|
duplicate: "duplicate";
|
|
422
427
|
not_planned: "not_planned";
|
|
423
428
|
}>>;
|
|
429
|
+
closeout: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
verdict: z.ZodString;
|
|
431
|
+
result: z.ZodString;
|
|
432
|
+
}, z.core.$strict>>;
|
|
424
433
|
supersededBy: z.ZodOptional<z.ZodNumber>;
|
|
425
434
|
title: z.ZodOptional<z.ZodString>;
|
|
426
435
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -478,6 +487,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
478
487
|
}>;
|
|
479
488
|
}, z.core.$strict>], "tier">>;
|
|
480
489
|
extends: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
490
|
+
priorWork: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
481
491
|
decisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
492
|
surface: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
483
493
|
path: z.ZodString;
|
|
@@ -529,6 +539,10 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
529
539
|
duplicate: "duplicate";
|
|
530
540
|
not_planned: "not_planned";
|
|
531
541
|
}>>;
|
|
542
|
+
closeout: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
verdict: z.ZodString;
|
|
544
|
+
result: z.ZodString;
|
|
545
|
+
}, z.core.$strict>>;
|
|
532
546
|
supersededBy: z.ZodOptional<z.ZodNumber>;
|
|
533
547
|
title: z.ZodOptional<z.ZodString>;
|
|
534
548
|
}, z.core.$strict>>;
|
|
@@ -538,7 +552,7 @@ export declare const AI_DELIVERY_MCP_TOOLS: readonly [{
|
|
|
538
552
|
readonly name: 'issue_info';
|
|
539
553
|
readonly readOnly: true;
|
|
540
554
|
readonly commandName: 'info';
|
|
541
|
-
readonly description: 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.';
|
|
555
|
+
readonly description: 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews), artifacts and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.';
|
|
542
556
|
readonly inputSchema: z.ZodObject<{
|
|
543
557
|
issueNumber: z.ZodNumber;
|
|
544
558
|
repo: z.ZodOptional<z.ZodString>;
|
package/dist/mcp/tools.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { NativeIssueDateFields } from "../github/nativeIssueMetadata.js";
|
|
3
3
|
import { ProjectTradeFields } from "../github/projectNumbers.js";
|
|
4
4
|
import { OverrideReason } from "../services/blockerGuardService.js";
|
|
5
|
-
import { JournalInputSchema, JOURNAL_SCHEMA_METADATA } from "../issueJournal.js";
|
|
5
|
+
import { JournalInputSchema, JOURNAL_SCHEMA_METADATA, PLAIN_COMMENT_REFUSAL } from "../issueJournal.js";
|
|
6
6
|
import {
|
|
7
7
|
IssueFields,
|
|
8
8
|
IssueWriteFields,
|
|
@@ -44,6 +44,10 @@ const IssueUpdateInput = issueInputSchema(
|
|
|
44
44
|
state: z.enum(["open", "closed"]).optional(),
|
|
45
45
|
preserveHistory: z.boolean().optional(),
|
|
46
46
|
closeReason: z.enum(["completed", "not_planned", "duplicate"]).optional(),
|
|
47
|
+
closeout: z.strictObject({
|
|
48
|
+
verdict: z.string().min(1).max(600).describe("The study verdict, 1\u20133 lines."),
|
|
49
|
+
result: z.string().min(1).max(4e3).describe("The READOUT's Result section, verbatim.")
|
|
50
|
+
}).optional().describe('Required to close a study (title starts with "Study") as completed; needs a READOUT artifact.'),
|
|
47
51
|
supersededBy: Positive.optional(),
|
|
48
52
|
title: IssueWriteFields.title
|
|
49
53
|
},
|
|
@@ -51,7 +55,7 @@ const IssueUpdateInput = issueInputSchema(
|
|
|
51
55
|
).superRefine((input, ctx) => {
|
|
52
56
|
if (input.defer !== void 0 && input.undefer !== void 0)
|
|
53
57
|
ctx.addIssue({ code: "custom", message: "Choose defer or undefer, never both.", path: ["defer"] });
|
|
54
|
-
if ((input.closeReason !== void 0 || input.supersededBy !== void 0) && input.state !== "closed")
|
|
58
|
+
if ((input.closeReason !== void 0 || input.closeout !== void 0 || input.supersededBy !== void 0) && input.state !== "closed")
|
|
55
59
|
ctx.addIssue({
|
|
56
60
|
code: "custom",
|
|
57
61
|
path: ["state"],
|
|
@@ -106,8 +110,22 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
106
110
|
{
|
|
107
111
|
name: "issue_comment",
|
|
108
112
|
commandName: "comment",
|
|
109
|
-
description: "Post a typed issue journal with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.",
|
|
110
|
-
inputSchema: z.strictObject(
|
|
113
|
+
description: "Post a plain comment with body alone, or a typed issue journal with kind and its fields, with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.",
|
|
114
|
+
inputSchema: z.strictObject(
|
|
115
|
+
{
|
|
116
|
+
...JournalInputSchema.shape,
|
|
117
|
+
body: z.string().optional().describe("A plain comment posted exactly as written; send it without any journal field."),
|
|
118
|
+
repo: Repo,
|
|
119
|
+
verbose: Verbose
|
|
120
|
+
},
|
|
121
|
+
{ error: acceptedKeysError }
|
|
122
|
+
).partial().required({ issueNumber: true }).superRefine(({ repo: _repo, verbose: _verbose, body, ...journal }, ctx) => {
|
|
123
|
+
if (body !== void 0) {
|
|
124
|
+
const { issueNumber: _issueNumber, ...keys } = journal;
|
|
125
|
+
if (Object.values(keys).some((value) => value !== void 0))
|
|
126
|
+
ctx.addIssue({ code: "custom", message: PLAIN_COMMENT_REFUSAL });
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
111
129
|
const parsed = JournalInputSchema.safeParse(journal);
|
|
112
130
|
if (!parsed.success)
|
|
113
131
|
for (const issue of parsed.error.issues)
|
|
@@ -181,7 +199,7 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
181
199
|
name: "issue_info",
|
|
182
200
|
readOnly: true,
|
|
183
201
|
commandName: "info",
|
|
184
|
-
description: "Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.",
|
|
202
|
+
description: "Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews), artifacts and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.",
|
|
185
203
|
inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError })
|
|
186
204
|
},
|
|
187
205
|
{
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/mcp/tools.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\nimport { NativeIssueDateFields } from '../github/nativeIssueMetadata.js';\nimport { ProjectTradeFields } from '../github/projectNumbers.js';\nimport { OverrideReason } from '../services/blockerGuardService.js';\nimport { JournalInputSchema, JOURNAL_SCHEMA_METADATA } from '../issueJournal.js';\nimport {\n IssueFields,\n IssueWriteFields,\n ISSUE_JSON_SCHEMAS,\n issueInputSchema,\n CreateIssueStatus,\n IssueStatusPatch,\n ProjectStatusPatch,\n IssueDeferralPatch,\n acceptedKeysError,\n} from '../issueContract.js';\n\nconst Verbose = z.boolean().optional().describe('Return the full payload, including bodies, diffs and routing.');\nconst Positive = z.number().int().positive();\nconst Labels = z.array(z.string().trim().min(1));\nconst REPO_HELP =\n 'GitHub owner/name. Pass the repository named by the user. An explicit repo avoids launch-directory Git for ordinary remote issue/PR work; retained local modes keep their own checkout requirements.';\nconst Repo = z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP);\nexport const AI_DELIVERY_MCP_CONTRACT_VERSION = 'ai-delivery.mcp@2' as const;\nconst IssueUpdateInput = issueInputSchema(\n z\n .strictObject(\n {\n ...IssueWriteFields,\n ...NativeIssueDateFields,\n status: IssueStatusPatch.optional(),\n projectStatus: ProjectStatusPatch.optional(),\n repo: Repo,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueNumber: Positive,\n issueType: IssueWriteFields.issueType,\n labels: Labels.optional(),\n milestone: Positive.nullable().optional(),\n parentIssueNumber: Positive.nullable().optional(),\n park: z.literal(true).optional(),\n ...IssueDeferralPatch,\n points: IssueWriteFields.points,\n priority: z.string().min(1).optional(),\n state: z.enum(['open', 'closed']).optional(),\n preserveHistory: z.boolean().optional(),\n closeReason: z.enum(['completed', 'not_planned', 'duplicate']).optional(),\n supersededBy: Positive.optional(),\n title: IssueWriteFields.title,\n },\n { error: acceptedKeysError },\n )\n .superRefine((input, ctx) => {\n if (input.defer !== undefined && input.undefer !== undefined)\n ctx.addIssue({ code: 'custom', message: 'Choose defer or undefer, never both.', path: ['defer'] });\n if ((input.closeReason !== undefined || input.supersededBy !== undefined) && input.state !== 'closed')\n ctx.addIssue({\n code: 'custom',\n path: ['state'],\n message: 'Closure details require a closed issue; set state to closed.',\n params: { issueCode: 'closure.state' },\n });\n }),\n);\n\nconst Tracking = {\n verbose: Verbose,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueType: z.string().min(1).optional(),\n labels: Labels.optional(),\n milestone: Positive.optional(),\n parentIssueNumber: Positive.optional(),\n points: Positive.optional().describe(IssueFields.shape.points.description ?? ''),\n priority: z.string().min(1).optional(),\n repo: z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP),\n title: z\n .string()\n .trim()\n .min(1, 'Issue title is empty; enter a title.')\n .max(256, 'Issue title exceeds 256 characters; shorten the title.')\n .describe(IssueFields.shape.title.description ?? ''),\n};\nconst NormalStart = z.strictObject(\n {\n ...Tracking,\n title: Tracking.title.optional(),\n issueNumber: Positive.optional(),\n request: z.string().min(1).optional(),\n requestId: z.string().trim().min(1).max(256).optional(),\n resumeCreated: z.boolean().optional(),\n branch: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n);\nconst IssueListing = {\n repo: Repo,\n verbose: Verbose,\n state: z.enum(['open', 'closed', 'all']).optional(),\n labels: z\n .array(\n z\n .string()\n .min(1)\n .regex(/^[^\"\\\\\\r\\n]+$/u),\n )\n .optional(),\n parentIssueNumber: Positive.nullable().optional(),\n issueType: z.string().min(1).optional(),\n projectStatus: z.enum(['Todo', 'In Progress', 'Blocked', 'Done']).nullable().optional(),\n updatedSince: z.iso.datetime({ offset: true }).optional(),\n page: Positive.optional(),\n perPage: Positive.max(100).optional(),\n};\nconst SearchText = z\n .string()\n .trim()\n .min(1)\n .max(256)\n .regex(/^[^\"\\\\\\r\\n]+$/u);\n\nexport const AI_DELIVERY_MCP_TOOLS = [\n {\n name: 'issue_comment',\n commandName: 'comment',\n description:\n 'Post a typed issue journal with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.',\n inputSchema: z\n .strictObject({ ...JournalInputSchema.shape, repo: Repo, verbose: Verbose }, { error: acceptedKeysError })\n .superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {\n // Repository routing belongs to the MCP envelope, not the strict journal variants.\n const parsed = JournalInputSchema.safeParse(journal);\n if (!parsed.success)\n for (const issue of parsed.error.issues)\n ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });\n })\n .meta(JOURNAL_SCHEMA_METADATA),\n },\n {\n name: 'issue_create',\n commandName: 'create',\n description:\n 'Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.',\n issueContract: ISSUE_JSON_SCHEMAS,\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n ...Tracking,\n ...NativeIssueDateFields,\n ...IssueWriteFields,\n title: IssueFields.shape.title,\n opId: z\n .string()\n .trim()\n .min(1)\n .max(256)\n .optional()\n .describe(\n 'Stable retry identity: repeat the same original arguments to complete a partial create without another issue.',\n ),\n status: CreateIssueStatus.optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_start',\n commandName: 'start',\n description:\n 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.',\n inputSchema: NormalStart,\n },\n {\n name: 'issue_list',\n readOnly: true,\n commandName: 'list',\n description: 'List repository issues with native filters, named organization fields and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_search',\n readOnly: true,\n commandName: 'search',\n description: 'Search literal issue text in the selected repository with native filters and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_update',\n commandName: 'update',\n description: 'Update native issue fields and exact relationship sets with readback',\n inputSchema: IssueUpdateInput.safeExtend({ ...ProjectTradeFields, verbose: Verbose }),\n },\n {\n name: 'issue_batch_update',\n commandName: 'batch:update',\n description: 'Plan or apply 1\u201350 issue updates in one repository, with ordered partial results and readback',\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n items: z.array(IssueUpdateInput).min(1).max(50),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_info',\n readOnly: true,\n commandName: 'info',\n description:\n 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.',\n inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_ready_check',\n readOnly: true,\n commandName: 'ready:check',\n description: 'Evaluate deterministic readiness from live native issue state',\n inputSchema: z.strictObject(\n { issueNumber: Positive, repo: Tracking.repo, verbose: Verbose },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_create',\n commandName: 'pr:create',\n description:\n 'Create or reuse a PR from any directory using repo, issueNumber and a pushed head. By default it closes the issue and restores a missing closing link on reuse. On an existing closing PR, a new title or body edits it and draft: false marks it ready. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.',\n inputSchema: z\n .strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n expectedHeadSha: z\n .string()\n .regex(\n /^[a-f0-9]{40}$/u,\n 'expectedHeadSha must be a full 40-character commit SHA; pass the pushed head or omit it.',\n )\n .optional(),\n body: z.string().min(1, 'PR body is empty; enter a body or omit it to use the default body.').optional(),\n draft: z.boolean().optional(),\n dryRun: z.boolean().optional(),\n title: z.string().min(1, 'PR title is empty; enter a title or omit it to use the issue title.').optional(),\n headBranch: z.string().min(1).optional(),\n head: z.string().min(1).optional(),\n base: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n )\n .refine(\n (input) => input.head === undefined || input.headBranch === undefined || input.head === input.headBranch,\n 'PR head selectors disagree; use the same branch for head and headBranch.',\n ),\n },\n {\n name: 'issue_pr_info',\n readOnly: true,\n commandName: 'pr:info',\n description:\n \"Inspect a PR by number or its GitHub-linked issue branch: state, merge state, merge commit, checks, reviews and each linked issue's state, Project status and latest journal, in one call\",\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive.optional(),\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'milestone_create',\n commandName: 'milestone:create',\n description:\n 'Create a repository milestone (title, optional ISO due date and description) with readback. Repeating the same call returns the milestone it made; a same-titled milestone with different details is refused.',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n title: z.string().trim().min(1).max(256),\n dueOn: z.iso.date().optional(),\n description: z.string().max(10000).optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_review',\n commandName: 'pr:review',\n description: 'Submit one existing exact-head independent review with the reviewer App role',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive,\n nonClosing: z.boolean().optional(),\n artifact: z.string().min(1, 'Review artifact is empty; provide the independent review artifact JSON.'),\n identity: z.string().min(1).optional(),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n] as const;\n\nexport type AiDeliveryMcpToolName = (typeof AI_DELIVERY_MCP_TOOLS)[number]['name'];\n\nexport function getAiDeliveryMcpTool(name: string): (typeof AI_DELIVERY_MCP_TOOLS)[number] | null {\n return AI_DELIVERY_MCP_TOOLS.find((tool) => tool.name === name) ?? null;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\nimport { NativeIssueDateFields } from '../github/nativeIssueMetadata.js';\nimport { ProjectTradeFields } from '../github/projectNumbers.js';\nimport { OverrideReason } from '../services/blockerGuardService.js';\nimport { JournalInputSchema, JOURNAL_SCHEMA_METADATA, PLAIN_COMMENT_REFUSAL } from '../issueJournal.js';\nimport {\n IssueFields,\n IssueWriteFields,\n ISSUE_JSON_SCHEMAS,\n issueInputSchema,\n CreateIssueStatus,\n IssueStatusPatch,\n ProjectStatusPatch,\n IssueDeferralPatch,\n acceptedKeysError,\n} from '../issueContract.js';\n\nconst Verbose = z.boolean().optional().describe('Return the full payload, including bodies, diffs and routing.');\nconst Positive = z.number().int().positive();\nconst Labels = z.array(z.string().trim().min(1));\nconst REPO_HELP =\n 'GitHub owner/name. Pass the repository named by the user. An explicit repo avoids launch-directory Git for ordinary remote issue/PR work; retained local modes keep their own checkout requirements.';\nconst Repo = z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP);\nexport const AI_DELIVERY_MCP_CONTRACT_VERSION = 'ai-delivery.mcp@2' as const;\nconst IssueUpdateInput = issueInputSchema(\n z\n .strictObject(\n {\n ...IssueWriteFields,\n ...NativeIssueDateFields,\n status: IssueStatusPatch.optional(),\n projectStatus: ProjectStatusPatch.optional(),\n repo: Repo,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueNumber: Positive,\n issueType: IssueWriteFields.issueType,\n labels: Labels.optional(),\n milestone: Positive.nullable().optional(),\n parentIssueNumber: Positive.nullable().optional(),\n park: z.literal(true).optional(),\n ...IssueDeferralPatch,\n points: IssueWriteFields.points,\n priority: z.string().min(1).optional(),\n state: z.enum(['open', 'closed']).optional(),\n preserveHistory: z.boolean().optional(),\n closeReason: z.enum(['completed', 'not_planned', 'duplicate']).optional(),\n closeout: z\n .strictObject({\n verdict: z.string().min(1).max(600).describe('The study verdict, 1\u20133 lines.'),\n result: z.string().min(1).max(4000).describe(\"The READOUT's Result section, verbatim.\"),\n })\n .optional()\n .describe('Required to close a study (title starts with \"Study\") as completed; needs a READOUT artifact.'),\n supersededBy: Positive.optional(),\n title: IssueWriteFields.title,\n },\n { error: acceptedKeysError },\n )\n .superRefine((input, ctx) => {\n if (input.defer !== undefined && input.undefer !== undefined)\n ctx.addIssue({ code: 'custom', message: 'Choose defer or undefer, never both.', path: ['defer'] });\n if (\n (input.closeReason !== undefined || input.closeout !== undefined || input.supersededBy !== undefined) &&\n input.state !== 'closed'\n )\n ctx.addIssue({\n code: 'custom',\n path: ['state'],\n message: 'Closure details require a closed issue; set state to closed.',\n params: { issueCode: 'closure.state' },\n });\n }),\n);\n\nconst Tracking = {\n verbose: Verbose,\n blockedBy: z.array(Positive).optional(),\n blocks: z.array(Positive).optional(),\n overrideReason: OverrideReason.optional(),\n body: z.string().optional(),\n issueType: z.string().min(1).optional(),\n labels: Labels.optional(),\n milestone: Positive.optional(),\n parentIssueNumber: Positive.optional(),\n points: Positive.optional().describe(IssueFields.shape.points.description ?? ''),\n priority: z.string().min(1).optional(),\n repo: z\n .string()\n .regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u)\n .optional()\n .describe(REPO_HELP),\n title: z\n .string()\n .trim()\n .min(1, 'Issue title is empty; enter a title.')\n .max(256, 'Issue title exceeds 256 characters; shorten the title.')\n .describe(IssueFields.shape.title.description ?? ''),\n};\nconst NormalStart = z.strictObject(\n {\n ...Tracking,\n title: Tracking.title.optional(),\n issueNumber: Positive.optional(),\n request: z.string().min(1).optional(),\n requestId: z.string().trim().min(1).max(256).optional(),\n resumeCreated: z.boolean().optional(),\n branch: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n);\nconst IssueListing = {\n repo: Repo,\n verbose: Verbose,\n state: z.enum(['open', 'closed', 'all']).optional(),\n labels: z\n .array(\n z\n .string()\n .min(1)\n .regex(/^[^\"\\\\\\r\\n]+$/u),\n )\n .optional(),\n parentIssueNumber: Positive.nullable().optional(),\n issueType: z.string().min(1).optional(),\n projectStatus: z.enum(['Todo', 'In Progress', 'Blocked', 'Done']).nullable().optional(),\n updatedSince: z.iso.datetime({ offset: true }).optional(),\n page: Positive.optional(),\n perPage: Positive.max(100).optional(),\n};\nconst SearchText = z\n .string()\n .trim()\n .min(1)\n .max(256)\n .regex(/^[^\"\\\\\\r\\n]+$/u);\n\nexport const AI_DELIVERY_MCP_TOOLS = [\n {\n name: 'issue_comment',\n commandName: 'comment',\n description:\n 'Post a plain comment with body alone, or a typed issue journal with kind and its fields, with authoritative comment readback. Provide the fields required by kind: start: outcome; progress: done, decisionNeeded and non-empty evidence; decision: non-empty decision and rationale; blocker: blocker and resolution; closeout: acceptance and followUps. Omit fields belonging to other kinds.',\n inputSchema: z\n .strictObject(\n {\n ...JournalInputSchema.shape,\n body: z\n .string()\n .optional()\n .describe('A plain comment posted exactly as written; send it without any journal field.'),\n repo: Repo,\n verbose: Verbose,\n },\n { error: acceptedKeysError },\n )\n // A plain body needs only issueNumber; the superRefine below enforces the journal fields without it.\n .partial()\n .required({ issueNumber: true })\n .superRefine(({ repo: _repo, verbose: _verbose, body, ...journal }, ctx) => {\n if (body !== undefined) {\n const { issueNumber: _issueNumber, ...keys } = journal;\n if (Object.values(keys).some((value) => value !== undefined))\n ctx.addIssue({ code: 'custom', message: PLAIN_COMMENT_REFUSAL });\n return;\n }\n // Repository routing belongs to the MCP envelope, not the strict journal variants.\n const parsed = JournalInputSchema.safeParse(journal);\n if (!parsed.success)\n for (const issue of parsed.error.issues)\n ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });\n })\n .meta(JOURNAL_SCHEMA_METADATA),\n },\n {\n name: 'issue_create',\n commandName: 'create',\n description:\n 'Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.',\n issueContract: ISSUE_JSON_SCHEMAS,\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n ...Tracking,\n ...NativeIssueDateFields,\n ...IssueWriteFields,\n title: IssueFields.shape.title,\n opId: z\n .string()\n .trim()\n .min(1)\n .max(256)\n .optional()\n .describe(\n 'Stable retry identity: repeat the same original arguments to complete a partial create without another issue.',\n ),\n status: CreateIssueStatus.optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_start',\n commandName: 'start',\n description:\n 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.',\n inputSchema: NormalStart,\n },\n {\n name: 'issue_list',\n readOnly: true,\n commandName: 'list',\n description: 'List repository issues with native filters, named organization fields and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_search',\n readOnly: true,\n commandName: 'search',\n description: 'Search literal issue text in the selected repository with native filters and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_update',\n commandName: 'update',\n description: 'Update native issue fields and exact relationship sets with readback',\n inputSchema: IssueUpdateInput.safeExtend({ ...ProjectTradeFields, verbose: Verbose }),\n },\n {\n name: 'issue_batch_update',\n commandName: 'batch:update',\n description: 'Plan or apply 1\u201350 issue updates in one repository, with ordered partial results and readback',\n inputSchema: issueInputSchema(\n z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n items: z.array(IssueUpdateInput).min(1).max(50),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n ),\n },\n {\n name: 'issue_info',\n readOnly: true,\n commandName: 'info',\n description:\n 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, merge commit, checks, reviews), artifacts and the latest journal in one call. Child counts by default; verbose adds the body, every journal in full, routing and full child progress. Pass the requested owner/name as repo; an explicit repo works outside Git without a checkout. This read does not start or update the issue.',\n inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError }),\n },\n {\n name: 'issue_ready_check',\n readOnly: true,\n commandName: 'ready:check',\n description: 'Evaluate deterministic readiness from live native issue state',\n inputSchema: z.strictObject(\n { issueNumber: Positive, repo: Tracking.repo, verbose: Verbose },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_create',\n commandName: 'pr:create',\n description:\n 'Create or reuse a PR from any directory using repo, issueNumber and a pushed head. By default it closes the issue and restores a missing closing link on reuse. On an existing closing PR, a new title or body edits it and draft: false marks it ready. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.',\n inputSchema: z\n .strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n expectedHeadSha: z\n .string()\n .regex(\n /^[a-f0-9]{40}$/u,\n 'expectedHeadSha must be a full 40-character commit SHA; pass the pushed head or omit it.',\n )\n .optional(),\n body: z.string().min(1, 'PR body is empty; enter a body or omit it to use the default body.').optional(),\n draft: z.boolean().optional(),\n dryRun: z.boolean().optional(),\n title: z.string().min(1, 'PR title is empty; enter a title or omit it to use the issue title.').optional(),\n headBranch: z.string().min(1).optional(),\n head: z.string().min(1).optional(),\n base: z.string().min(1).optional(),\n },\n { error: acceptedKeysError },\n )\n .refine(\n (input) => input.head === undefined || input.headBranch === undefined || input.head === input.headBranch,\n 'PR head selectors disagree; use the same branch for head and headBranch.',\n ),\n },\n {\n name: 'issue_pr_info',\n readOnly: true,\n commandName: 'pr:info',\n description:\n \"Inspect a PR by number or its GitHub-linked issue branch: state, merge state, merge commit, checks, reviews and each linked issue's state, Project status and latest journal, in one call\",\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive.optional(),\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'milestone_create',\n commandName: 'milestone:create',\n description:\n 'Create a repository milestone (title, optional ISO due date and description) with readback. Repeating the same call returns the milestone it made; a same-titled milestone with different details is refused.',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n title: z.string().trim().min(1).max(256),\n dueOn: z.iso.date().optional(),\n description: z.string().max(10000).optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n {\n name: 'issue_pr_review',\n commandName: 'pr:review',\n description: 'Submit one existing exact-head independent review with the reviewer App role',\n inputSchema: z.strictObject(\n {\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive,\n prNumber: Positive,\n nonClosing: z.boolean().optional(),\n artifact: z.string().min(1, 'Review artifact is empty; provide the independent review artifact JSON.'),\n identity: z.string().min(1).optional(),\n dryRun: z.boolean().optional(),\n },\n { error: acceptedKeysError },\n ),\n },\n] as const;\n\nexport type AiDeliveryMcpToolName = (typeof AI_DELIVERY_MCP_TOOLS)[number]['name'];\n\nexport function getAiDeliveryMcpTool(name: string): (typeof AI_DELIVERY_MCP_TOOLS)[number] | null {\n return AI_DELIVERY_MCP_TOOLS.find((tool) => tool.name === name) ?? null;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,yBAAyB,6BAA6B;AACnF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,+DAA+D;AAC/G,MAAM,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAC3C,MAAM,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/C,MAAM,YACJ;AACF,MAAM,OAAO,EACV,OAAO,EACP,MAAM,qCAAqC,EAC3C,SAAS,EACT,SAAS,SAAS;AACd,MAAM,mCAAmC;AAChD,MAAM,mBAAmB;AAAA,EACvB,EACG;AAAA,IACC;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,QAAQ,iBAAiB,SAAS;AAAA,MAClC,eAAe,mBAAmB,SAAS;AAAA,MAC3C,MAAM;AAAA,MACN,WAAW,EAAE,MAAM,QAAQ,EAAE,SAAS;AAAA,MACtC,QAAQ,EAAE,MAAM,QAAQ,EAAE,SAAS;AAAA,MACnC,gBAAgB,eAAe,SAAS;AAAA,MACxC,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,MAC1B,aAAa;AAAA,MACb,WAAW,iBAAiB;AAAA,MAC5B,QAAQ,OAAO,SAAS;AAAA,MACxB,WAAW,SAAS,SAAS,EAAE,SAAS;AAAA,MACxC,mBAAmB,SAAS,SAAS,EAAE,SAAS;AAAA,MAChD,MAAM,EAAE,QAAQ,IAAI,EA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AAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,QACrC,QAAQ,EAAE,QAAQ,EAAE,SAAS;AAAA,MAC/B;AAAA,MACA,EAAE,OAAO,kBAAkB;AAAA,IAC7B;AAAA,EACF;AACF;AAIO,SAAS,qBAAqB,MAA6D;AAChG,SAAO,sBAAsB,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK;AACrE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/readView.d.ts
CHANGED
|
@@ -108,6 +108,8 @@ export declare function issueView(context: DeliveryContext, issueNumber: number,
|
|
|
108
108
|
state: string;
|
|
109
109
|
title: string;
|
|
110
110
|
url: string;
|
|
111
|
+
artifacts?: import("./issue.js").IssueArtifact[];
|
|
112
|
+
warnings?: import("./issueContract.js").IssueDiagnostic[];
|
|
111
113
|
pullRequests: {
|
|
112
114
|
number: number;
|
|
113
115
|
url: string;
|
package/dist/readView.js
CHANGED
|
@@ -149,7 +149,7 @@ async function inOrder(reads) {
|
|
|
149
149
|
}
|
|
150
150
|
async function issueView(context, issueNumber, options) {
|
|
151
151
|
const [info, links] = await inOrder([
|
|
152
|
-
issueInfo(context, issueNumber, { childDetail: options.verbose }),
|
|
152
|
+
issueInfo(context, issueNumber, { childDetail: options.verbose, artifacts: true }),
|
|
153
153
|
readIssueLinks(context, issueNumber)
|
|
154
154
|
]);
|
|
155
155
|
return {
|
package/dist/readView.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/readView.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\n\nimport { DeliveryError } from './errors.js';\nimport { getIssueProjectStatus, projectSettingsFromDeliveryConfig } from './github/projectDelivery.js';\nimport { issueInfo, type DeliveryContext } from './issue.js';\nimport { prInfo } from './pr.js';\n\n/** One-call reads: the existing readers plus the PR, check, review and journal facts agents otherwise fetch with gh. */\n\nconst Context = z.union([\n z.object({\n __typename: z.literal('CheckRun'),\n name: z.string(),\n status: z.string(),\n conclusion: z.string().nullable(),\n }),\n z.object({ __typename: z.literal('StatusContext'), context: z.string(), state: z.string() }),\n]);\nconst PrNode = z.object({\n number: z.number().int().positive(),\n url: z.string(),\n state: z.enum(['OPEN', 'CLOSED', 'MERGED']),\n isDraft: z.boolean(),\n mergeStateStatus: z.string(),\n mergeCommit: z.object({ oid: z.string() }).nullable(),\n mergedAt: z.string().nullable(),\n reviewDecision: z.string().nullable(),\n headRefOid: z.string(),\n latestReviews: z.object({\n nodes: z.array(\n z.object({\n author: z.object({ login: z.string() }).nullable(),\n state: z.string(),\n commit: z.object({ oid: z.string() }).nullable(),\n }),\n ),\n }),\n commits: z.object({\n nodes: z.array(\n z.object({\n commit: z.object({\n statusCheckRollup: z\n .object({ state: z.string(), contexts: z.object({ nodes: z.array(Context) }) })\n .nullable(),\n }),\n }),\n ),\n }),\n});\nconst PR_FIELDS = `number url state isDraft mergeStateStatus mergeCommit { oid } mergedAt reviewDecision headRefOid\n latestReviews(first: 10) { nodes { author { login } state commit { oid } } }\n commits(last: 1) { nodes { commit { statusCheckRollup { state contexts(first: 50) { nodes {\n __typename ... on CheckRun { name status conclusion } ... on StatusContext { context state }\n } } } } } }`;\n\nexport function summarizePr(raw: unknown) {\n const pr = PrNode.parse(raw);\n const contexts = pr.commits.nodes[0]?.commit.statusCheckRollup?.contexts.nodes ?? [];\n const named = contexts.map((c) =>\n c.__typename === 'CheckRun'\n ? {\n name: c.name,\n done: c.status === 'COMPLETED',\n ok: c.conclusion === 'SUCCESS' || c.conclusion === 'NEUTRAL' || c.conclusion === 'SKIPPED',\n }\n : { name: c.context, done: c.state !== 'PENDING' && c.state !== 'EXPECTED', ok: c.state === 'SUCCESS' },\n );\n return {\n number: pr.number,\n url: pr.url,\n state: pr.state.toLowerCase(),\n draft: pr.isDraft,\n mergeState: pr.mergeStateStatus.toLowerCase(),\n mergeCommit: pr.mergeCommit?.oid ?? null,\n mergedAt: pr.mergedAt,\n checks: {\n state: pr.commits.nodes[0]?.commit.statusCheckRollup?.state.toLowerCase() ?? 'none',\n failing: named.filter((c) => c.done && !c.ok).map((c) => c.name),\n pending: named.filter((c) => !c.done).map((c) => c.name),\n },\n reviews: {\n decision: pr.reviewDecision?.toLowerCase() ?? 'none',\n latest: pr.latestReviews.nodes.map((review) => ({\n by: review.author?.login ?? 'unknown',\n state: review.state.toLowerCase(),\n current: review.commit?.oid === pr.headRefOid,\n })),\n },\n };\n}\n\nconst Comment = z.object({\n author: z.object({ login: z.string() }).nullable(),\n body: z.string(),\n createdAt: z.string(),\n url: z.string(),\n});\nconst JOURNAL_MARKER = /<!--\\s*ai-delivery:journal@1:sha256:[a-f0-9]{64}\\s*-->\\s*$/u;\n\n/** Every typed journal comment, oldest first, with its full body. */\nexport function journals(comments: readonly z.infer<typeof Comment>[]) {\n return comments\n .filter((comment) => JOURNAL_MARKER.test(comment.body))\n .map(({ author, url, createdAt, body }) => ({ by: author?.login ?? 'unknown', url, createdAt, body }));\n}\n\n/** The newest typed journal comment, reduced to its own `Status: \u2026 Next: \u2026` preview line. */\nexport function latestJournal(comments: readonly z.infer<typeof Comment>[]) {\n const journal = journals(comments).at(-1);\n return journal\n ? { by: journal.by, url: journal.url, createdAt: journal.createdAt, preview: journal.body.split('\\n')[0]! }\n : null;\n}\n\nfunction sameRepository(source: unknown, repository: string): boolean {\n const { repository: found } = z.object({ repository: z.object({ nameWithOwner: z.string() }) }).parse(source);\n return found.nameWithOwner.toLowerCase() === repository;\n}\n\nconst IssueLinks = z.object({\n repository: z.object({\n issue: z\n .object({\n id: z.string(),\n state: z.enum(['OPEN', 'CLOSED']),\n comments: z.object({ nodes: z.array(Comment) }),\n timelineItems: z.object({\n nodes: z.array(\n z.object({\n source: z.looseObject({ __typename: z.string() }),\n }),\n ),\n }),\n })\n .nullable(),\n }),\n});\n\nexport const ISSUE_LINKS_QUERY = `query ReadIssueLinks($owner: String!, $repo: String!, $number: Int!) {\n repository(owner: $owner, name: $repo) {\n issue(number: $number) {\n id state\n comments(last: 30) { nodes { author { login } body createdAt url } }\n timelineItems(itemTypes: [CROSS_REFERENCED_EVENT], last: 5) { nodes { ... on CrossReferencedEvent {\n source { __typename ... on PullRequest { repository { nameWithOwner } ${PR_FIELDS} } }\n } } }\n }\n }\n }`;\n\nexport async function readIssueLinks(context: DeliveryContext, issueNumber: number) {\n const data = IssueLinks.parse(\n await context.clients.graphql(ISSUE_LINKS_QUERY, { ...context.repo, number: issueNumber }),\n ).repository.issue;\n if (data === null) throw new DeliveryError(`Issue #${String(issueNumber)} was not found.`);\n const repository = `${context.repo.owner}/${context.repo.repo}`.toLowerCase();\n const seen = new Set<number>();\n const pullRequests = data.timelineItems.nodes\n .toReversed()\n .flatMap(({ source }) =>\n source.__typename === 'PullRequest' && sameRepository(source, repository) ? [summarizePr(source)] : [],\n )\n .filter((pr) => !seen.has(pr.number) && seen.add(pr.number));\n return {\n id: data.id,\n state: data.state.toLowerCase(),\n pullRequests,\n latestJournal: latestJournal(data.comments.nodes),\n journals: journals(data.comments.nodes),\n };\n}\n\n/** Runs reads together, then reports the first listed rejection, so an existing reader's refusal wins over a new read's error. */\nasync function inOrder<T extends unknown[]>(reads: { [K in keyof T]: Promise<T[K]> }): Promise<T> {\n const settled = await Promise.allSettled(reads);\n for (const result of settled) if (result.status === 'rejected') throw result.reason;\n return settled.map((result) => (result as PromiseFulfilledResult<unknown>).value) as T;\n}\n\n/** issue_info plus the linked PRs (state, checks, reviews) and the latest journal, in one call. */\nexport async function issueView(context: DeliveryContext, issueNumber: number, options: { verbose: boolean }) {\n const [info, links] = await inOrder([\n issueInfo(context, issueNumber, { childDetail: options.verbose }),\n readIssueLinks(context, issueNumber),\n ]);\n return {\n ...info,\n pullRequests: links.pullRequests,\n latestJournal: links.latestJournal,\n ...(options.verbose ? { journals: links.journals } : {}),\n };\n}\n\nasync function readIssueBrief(context: DeliveryContext, issueNumber: number) {\n const links = await readIssueLinks(context, issueNumber);\n const status = await getIssueProjectStatus({\n graphql: context.clients.graphql,\n issueNodeId: links.id,\n org: context.config.native.organization,\n ...(context.projectConfiguration ? { configuration: context.projectConfiguration } : {}),\n settings: projectSettingsFromDeliveryConfig(context.config),\n });\n return {\n number: issueNumber,\n state: links.state,\n projectStatus: status?.status ?? null,\n ...(status?.review ? { inReview: true as const } : {}),\n latestJournal: links.latestJournal,\n };\n}\n\n/** issue_pr_info plus checks, reviews and the linked issues' state, board Status and latest journal. */\nexport async function prView(\n context: DeliveryContext,\n input: { issueNumber?: number; prNumber?: number; nonClosing?: boolean },\n) {\n const [info, early, given] = await inOrder([\n prInfo(context, input),\n input.prNumber === undefined ? Promise.resolve(undefined) : readPrSummary(context, input.prNumber),\n input.issueNumber === undefined ? Promise.resolve(undefined) : readIssueBrief(context, input.issueNumber),\n ]);\n const summary = early ?? (await readPrSummary(context, info.prNumber));\n const others = await Promise.all(\n summary.closes.filter((number) => number !== input.issueNumber).map((number) => readIssueBrief(context, number)),\n );\n const { checks, reviews, mergeState, mergeCommit, mergedAt } = summary;\n return {\n ...info,\n mergeState,\n mergeCommit,\n mergedAt,\n checks,\n reviews,\n issues: [...(given ? [given] : []), ...others],\n };\n}\n\nexport const PR_SUMMARY_QUERY = `query ReadPrSummary($owner: String!, $repo: String!, $number: Int!) {\n repository(owner: $owner, name: $repo) {\n pullRequest(number: $number) { ${PR_FIELDS} closingIssuesReferences(first: 5) { nodes { number repository { nameWithOwner } } } }\n }\n }`;\n\nexport async function readPrSummary(context: DeliveryContext, prNumber: number) {\n const data = z\n .object({\n repository: z.object({\n pullRequest: PrNode.extend({\n closingIssuesReferences: z.object({\n nodes: z.array(\n z.object({\n number: z.number().int().positive(),\n repository: z.object({ nameWithOwner: z.string() }),\n }),\n ),\n }),\n }),\n }),\n })\n .parse(await context.clients.graphql(PR_SUMMARY_QUERY, { ...context.repo, number: prNumber }))\n .repository.pullRequest;\n const repository = `${context.repo.owner}/${context.repo.repo}`.toLowerCase();\n const closes = data.closingIssuesReferences.nodes\n .filter((issue) => issue.repository.nameWithOwner.toLowerCase() === repository)\n .map((issue) => issue.number);\n return { ...summarizePr(data), closes };\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB,yCAAyC;AACzE,SAAS,iBAAuC;AAChD,SAAS,cAAc;AAIvB,MAAM,UAAU,EAAE,MAAM;AAAA,EACtB,EAAE,OAAO;AAAA,IACP,YAAY,EAAE,QAAQ,UAAU;AAAA,IAChC,MAAM,EAAE,OAAO;AAAA,IACf,QAAQ,EAAE,OAAO;AAAA,IACjB,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,CAAC;AAAA,EACD,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,eAAe,GAAG,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC;AAC7F,CAAC;AACD,MAAM,SAAS,EAAE,OAAO;AAAA,EACtB,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EAClC,KAAK,EAAE,OAAO;AAAA,EACd,OAAO,EAAE,KAAK,CAAC,QAAQ,UAAU,QAAQ,CAAC;AAAA,EAC1C,SAAS,EAAE,QAAQ;AAAA,EACnB,kBAAkB,EAAE,OAAO;AAAA,EAC3B,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS;AAAA,EACpD,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,gBAAgB,EAAE,OAAO,EAAE,SAAS;AAAA,EACpC,YAAY,EAAE,OAAO;AAAA,EACrB,eAAe,EAAE,OAAO;AAAA,IACtB,OAAO,EAAE;AAAA,MACP,EAAE,OAAO;AAAA,QACP,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS;AAAA,QACjD,OAAO,EAAE,OAAO;AAAA,QAChB,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,O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C;AAAA,EACvG,EACC,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC;AAC7D,SAAO;AAAA,IACL,IAAI,KAAK;AAAA,IACT,OAAO,KAAK,MAAM,YAAY;AAAA,IAC9B;AAAA,IACA,eAAe,cAAc,KAAK,SAAS,KAAK;AAAA,IAChD,UAAU,SAAS,KAAK,SAAS,KAAK;AAAA,EACxC;AACF;AAGA,eAAe,QAA6B,OAAsD;AAChG,QAAM,UAAU,MAAM,QAAQ,WAAW,KAAK;AAC9C,aAAW,UAAU,QAAS,KAAI,OAAO,WAAW,WAAY,OAAM,OAAO;AAC7E,SAAO,QAAQ,IAAI,CAAC,WAAY,OAA2C,KAAK;AAClF;AAGA,eAAsB,UAAU,SAA0B,aAAqB,SAA+B;AAC5G,QAAM,CAAC,MAAM,KAAK,IAAI,MAAM,QAAQ;AAAA,IAClC,UAAU,SAAS,aAAa,EAAE,aAAa,QAAQ,
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\n\nimport { DeliveryError } from './errors.js';\nimport { getIssueProjectStatus, projectSettingsFromDeliveryConfig } from './github/projectDelivery.js';\nimport { issueInfo, type DeliveryContext } from './issue.js';\nimport { prInfo } from './pr.js';\n\n/** One-call reads: the existing readers plus the PR, check, review and journal facts agents otherwise fetch with gh. */\n\nconst Context = z.union([\n z.object({\n __typename: z.literal('CheckRun'),\n name: z.string(),\n status: z.string(),\n conclusion: z.string().nullable(),\n }),\n z.object({ __typename: z.literal('StatusContext'), context: z.string(), state: z.string() }),\n]);\nconst PrNode = z.object({\n number: z.number().int().positive(),\n url: z.string(),\n state: z.enum(['OPEN', 'CLOSED', 'MERGED']),\n isDraft: z.boolean(),\n mergeStateStatus: z.string(),\n mergeCommit: z.object({ oid: z.string() }).nullable(),\n mergedAt: z.string().nullable(),\n reviewDecision: z.string().nullable(),\n headRefOid: z.string(),\n latestReviews: z.object({\n nodes: z.array(\n z.object({\n author: z.object({ login: z.string() }).nullable(),\n state: z.string(),\n commit: z.object({ oid: z.string() }).nullable(),\n }),\n ),\n }),\n commits: z.object({\n nodes: z.array(\n z.object({\n commit: z.object({\n statusCheckRollup: z\n .object({ state: z.string(), contexts: z.object({ nodes: z.array(Context) }) })\n .nullable(),\n }),\n }),\n ),\n }),\n});\nconst PR_FIELDS = `number url state isDraft mergeStateStatus mergeCommit { oid } mergedAt reviewDecision headRefOid\n latestReviews(first: 10) { nodes { author { login } state commit { oid } } }\n commits(last: 1) { nodes { commit { statusCheckRollup { state contexts(first: 50) { nodes {\n __typename ... on CheckRun { name status conclusion } ... on StatusContext { context state }\n } } } } } }`;\n\nexport function summarizePr(raw: unknown) {\n const pr = PrNode.parse(raw);\n const contexts = pr.commits.nodes[0]?.commit.statusCheckRollup?.contexts.nodes ?? [];\n const named = contexts.map((c) =>\n c.__typename === 'CheckRun'\n ? {\n name: c.name,\n done: c.status === 'COMPLETED',\n ok: c.conclusion === 'SUCCESS' || c.conclusion === 'NEUTRAL' || c.conclusion === 'SKIPPED',\n }\n : { name: c.context, done: c.state !== 'PENDING' && c.state !== 'EXPECTED', ok: c.state === 'SUCCESS' },\n );\n return {\n number: pr.number,\n url: pr.url,\n state: pr.state.toLowerCase(),\n draft: pr.isDraft,\n mergeState: pr.mergeStateStatus.toLowerCase(),\n mergeCommit: pr.mergeCommit?.oid ?? null,\n mergedAt: pr.mergedAt,\n checks: {\n state: pr.commits.nodes[0]?.commit.statusCheckRollup?.state.toLowerCase() ?? 'none',\n failing: named.filter((c) => c.done && !c.ok).map((c) => c.name),\n pending: named.filter((c) => !c.done).map((c) => c.name),\n },\n reviews: {\n decision: pr.reviewDecision?.toLowerCase() ?? 'none',\n latest: pr.latestReviews.nodes.map((review) => ({\n by: review.author?.login ?? 'unknown',\n state: review.state.toLowerCase(),\n current: review.commit?.oid === pr.headRefOid,\n })),\n },\n };\n}\n\nconst Comment = z.object({\n author: z.object({ login: z.string() }).nullable(),\n body: z.string(),\n createdAt: z.string(),\n url: z.string(),\n});\nconst JOURNAL_MARKER = /<!--\\s*ai-delivery:journal@1:sha256:[a-f0-9]{64}\\s*-->\\s*$/u;\n\n/** Every typed journal comment, oldest first, with its full body. */\nexport function journals(comments: readonly z.infer<typeof Comment>[]) {\n return comments\n .filter((comment) => JOURNAL_MARKER.test(comment.body))\n .map(({ author, url, createdAt, body }) => ({ by: author?.login ?? 'unknown', url, createdAt, body }));\n}\n\n/** The newest typed journal comment, reduced to its own `Status: \u2026 Next: \u2026` preview line. */\nexport function latestJournal(comments: readonly z.infer<typeof Comment>[]) {\n const journal = journals(comments).at(-1);\n return journal\n ? { by: journal.by, url: journal.url, createdAt: journal.createdAt, preview: journal.body.split('\\n')[0]! }\n : null;\n}\n\nfunction sameRepository(source: unknown, repository: string): boolean {\n const { repository: found } = z.object({ repository: z.object({ nameWithOwner: z.string() }) }).parse(source);\n return found.nameWithOwner.toLowerCase() === repository;\n}\n\nconst IssueLinks = z.object({\n repository: z.object({\n issue: z\n .object({\n id: z.string(),\n state: z.enum(['OPEN', 'CLOSED']),\n comments: z.object({ nodes: z.array(Comment) }),\n timelineItems: z.object({\n nodes: z.array(\n z.object({\n source: z.looseObject({ __typename: z.string() }),\n }),\n ),\n }),\n })\n .nullable(),\n }),\n});\n\nexport const ISSUE_LINKS_QUERY = `query ReadIssueLinks($owner: String!, $repo: String!, $number: Int!) {\n repository(owner: $owner, name: $repo) {\n issue(number: $number) {\n id state\n comments(last: 30) { nodes { author { login } body createdAt url } }\n timelineItems(itemTypes: [CROSS_REFERENCED_EVENT], last: 5) { nodes { ... on CrossReferencedEvent {\n source { __typename ... on PullRequest { repository { nameWithOwner } ${PR_FIELDS} } }\n } } }\n }\n }\n }`;\n\nexport async function readIssueLinks(context: DeliveryContext, issueNumber: number) {\n const data = IssueLinks.parse(\n await context.clients.graphql(ISSUE_LINKS_QUERY, { ...context.repo, number: issueNumber }),\n ).repository.issue;\n if (data === null) throw new DeliveryError(`Issue #${String(issueNumber)} was not found.`);\n const repository = `${context.repo.owner}/${context.repo.repo}`.toLowerCase();\n const seen = new Set<number>();\n const pullRequests = data.timelineItems.nodes\n .toReversed()\n .flatMap(({ source }) =>\n source.__typename === 'PullRequest' && sameRepository(source, repository) ? [summarizePr(source)] : [],\n )\n .filter((pr) => !seen.has(pr.number) && seen.add(pr.number));\n return {\n id: data.id,\n state: data.state.toLowerCase(),\n pullRequests,\n latestJournal: latestJournal(data.comments.nodes),\n journals: journals(data.comments.nodes),\n };\n}\n\n/** Runs reads together, then reports the first listed rejection, so an existing reader's refusal wins over a new read's error. */\nasync function inOrder<T extends unknown[]>(reads: { [K in keyof T]: Promise<T[K]> }): Promise<T> {\n const settled = await Promise.allSettled(reads);\n for (const result of settled) if (result.status === 'rejected') throw result.reason;\n return settled.map((result) => (result as PromiseFulfilledResult<unknown>).value) as T;\n}\n\n/** issue_info plus the linked PRs (state, checks, reviews) and the latest journal, in one call. */\nexport async function issueView(context: DeliveryContext, issueNumber: number, options: { verbose: boolean }) {\n const [info, links] = await inOrder([\n issueInfo(context, issueNumber, { childDetail: options.verbose, artifacts: true }),\n readIssueLinks(context, issueNumber),\n ]);\n return {\n ...info,\n pullRequests: links.pullRequests,\n latestJournal: links.latestJournal,\n ...(options.verbose ? { journals: links.journals } : {}),\n };\n}\n\nasync function readIssueBrief(context: DeliveryContext, issueNumber: number) {\n const links = await readIssueLinks(context, issueNumber);\n const status = await getIssueProjectStatus({\n graphql: context.clients.graphql,\n issueNodeId: links.id,\n org: context.config.native.organization,\n ...(context.projectConfiguration ? { configuration: context.projectConfiguration } : {}),\n settings: projectSettingsFromDeliveryConfig(context.config),\n });\n return {\n number: issueNumber,\n state: links.state,\n projectStatus: status?.status ?? null,\n ...(status?.review ? { inReview: true as const } : {}),\n latestJournal: links.latestJournal,\n };\n}\n\n/** issue_pr_info plus checks, reviews and the linked issues' state, board Status and latest journal. */\nexport async function prView(\n context: DeliveryContext,\n input: { issueNumber?: number; prNumber?: number; nonClosing?: boolean },\n) {\n const [info, early, given] = await inOrder([\n prInfo(context, input),\n input.prNumber === undefined ? Promise.resolve(undefined) : readPrSummary(context, input.prNumber),\n input.issueNumber === undefined ? Promise.resolve(undefined) : readIssueBrief(context, input.issueNumber),\n ]);\n const summary = early ?? (await readPrSummary(context, info.prNumber));\n const others = await Promise.all(\n summary.closes.filter((number) => number !== input.issueNumber).map((number) => readIssueBrief(context, number)),\n );\n const { checks, reviews, mergeState, mergeCommit, mergedAt } = summary;\n return {\n ...info,\n mergeState,\n mergeCommit,\n mergedAt,\n checks,\n reviews,\n issues: [...(given ? [given] : []), ...others],\n };\n}\n\nexport const PR_SUMMARY_QUERY = `query ReadPrSummary($owner: String!, $repo: String!, $number: Int!) {\n repository(owner: $owner, name: $repo) {\n pullRequest(number: $number) { ${PR_FIELDS} closingIssuesReferences(first: 5) { nodes { number repository { nameWithOwner } } } }\n }\n }`;\n\nexport async function readPrSummary(context: DeliveryContext, prNumber: number) {\n const data = z\n .object({\n repository: z.object({\n pullRequest: PrNode.extend({\n closingIssuesReferences: z.object({\n nodes: z.array(\n z.object({\n number: z.number().int().positive(),\n repository: z.object({ nameWithOwner: z.string() }),\n }),\n ),\n }),\n }),\n }),\n })\n .parse(await context.clients.graphql(PR_SUMMARY_QUERY, { ...context.repo, number: prNumber }))\n .repository.pullRequest;\n const repository = `${context.repo.owner}/${context.repo.repo}`.toLowerCase();\n const closes = data.closingIssuesReferences.nodes\n .filter((issue) => issue.repository.nameWithOwner.toLowerCase() === repository)\n .map((issue) => issue.number);\n return { ...summarizePr(data), closes };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB,yCAAyC;AACzE,SAAS,iBAAuC;AAChD,SAAS,cAAc;AAIvB,MAAM,UAAU,EAAE,MAAM;AAAA,EACtB,EAAE,OAAO;AAAA,IACP,YAAY,EAAE,QAAQ,UAAU;AAAA,IAChC,MAAM,EAAE,OAAO;AAAA,IACf,Q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OAAO,CAAC,UAAU,MAAM,WAAW,cAAc,YAAY,MAAM,UAAU,EAC7E,IAAI,CAAC,UAAU,MAAM,MAAM;AAC9B,SAAO,EAAE,GAAG,YAAY,IAAI,GAAG,OAAO;AACxC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -89,7 +89,7 @@ async function runRelease(fixture = {}) {
|
|
|
89
89
|
return new Response(
|
|
90
90
|
new ReadableStream({
|
|
91
91
|
start: (controller) => {
|
|
92
|
-
elapsed +=
|
|
92
|
+
elapsed += 20 * 6e4;
|
|
93
93
|
controller.error(new DOMException("Readback body timed out", "TimeoutError"));
|
|
94
94
|
}
|
|
95
95
|
})
|
|
@@ -206,12 +206,20 @@ test("conflicting archive bytes fail immediately after one publication", async (
|
|
|
206
206
|
assert.equal(result.publications, 1);
|
|
207
207
|
assert.deepEqual(result.waits, []);
|
|
208
208
|
});
|
|
209
|
-
test("
|
|
209
|
+
test("a version npm indexes after seven minutes still ends green", async () => {
|
|
210
|
+
const result = await runRelease({ versionReadyAt: 8 });
|
|
211
|
+
assert.equal(result.error, null);
|
|
212
|
+
assert.equal(result.publications, 1);
|
|
213
|
+
assert.ok(result.elapsed > 7 * 6e4);
|
|
214
|
+
assert.deepEqual(result.waits, [15e3, 3e4, 6e4, 12e4, 12e4, 12e4, 12e4]);
|
|
215
|
+
});
|
|
216
|
+
test("a version that never appears fails with how to check by hand, without republishing", async () => {
|
|
210
217
|
const result = await runRelease({ versionReadyAt: Infinity });
|
|
211
|
-
assert.match(result.error ?? "", /
|
|
218
|
+
assert.match(result.error ?? "", /accepted the publish but .* not fully visible.*npm view/iu);
|
|
212
219
|
assert.equal(result.publications, 1);
|
|
213
220
|
assert.ok(result.waits.length > 0);
|
|
214
|
-
assert.ok(result.elapsed
|
|
221
|
+
assert.ok(result.elapsed >= 15 * 6e4, "Reconciliation must wait at least 15 minutes.");
|
|
222
|
+
assert.ok(result.elapsed < 30 * 6e4, "Reconciliation must fit the 30-minute publish job.");
|
|
215
223
|
assert.ok(
|
|
216
224
|
result.timeouts.some((ms) => ms < 3e4),
|
|
217
225
|
"Requests must respect the remaining reconciliation allowance."
|
|
@@ -284,13 +292,19 @@ test("oversized registry metadata fails within the readback output bound", async
|
|
|
284
292
|
});
|
|
285
293
|
test("a body timeout at the reconciliation bound retains an explicit unresolved result", async () => {
|
|
286
294
|
const result = await runRelease({ bodyDeadlineExceeded: true });
|
|
287
|
-
assert.match(result.error ?? "", /
|
|
295
|
+
assert.match(result.error ?? "", /accepted the publish but .* not fully visible/iu);
|
|
296
|
+
assert.equal(result.publications, 1);
|
|
297
|
+
});
|
|
298
|
+
test("a rejected publish that never appears does not claim npm accepted it", async () => {
|
|
299
|
+
const result = await runRelease({ publishStatus: 1, versionReadyAt: Infinity });
|
|
300
|
+
assert.match(result.error ?? "", /did not exit cleanly.*not fully visible.*npm view/iu);
|
|
301
|
+
assert.doesNotMatch(result.error ?? "", /accepted the publish/iu);
|
|
288
302
|
assert.equal(result.publications, 1);
|
|
289
303
|
});
|
|
290
304
|
for (const phase of ["archiveReadyAt", "provenanceReadyAt", "indexReadyAt", "latestReadyAt"]) {
|
|
291
305
|
test(`unresolved ${phase} cannot be accepted as a completed release`, async () => {
|
|
292
306
|
const result = await runRelease({ [phase]: Infinity });
|
|
293
|
-
assert.match(result.error ?? "", /
|
|
307
|
+
assert.match(result.error ?? "", /accepted the publish but .* not fully visible/iu);
|
|
294
308
|
assert.equal(result.publications, 1);
|
|
295
309
|
});
|
|
296
310
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/releaseReconciliation.test.ts"],
|
|
4
|
-
"sourcesContent": ["import assert from 'node:assert/strict';\nimport { createHash } from 'node:crypto';\nimport { readFileSync } from 'node:fs';\nimport { posix } from 'node:path';\nimport { Script } from 'node:vm';\nimport { test } from 'vitest';\n\nconst workflow = readFileSync(new URL('../.github/workflows/release.yml', import.meta.url), 'utf8');\nconst scripts = [...workflow.matchAll(/node --input-type=module <<'JS'\\n([\\s\\S]*?)\\n\\s+JS/gu)];\nconst publishedScript = scripts.at(-1)?.[1];\nassert.ok(publishedScript, 'The actual release workflow must contain its publication script.');\n// Substitute only external imports; all publication decisions and guards execute unchanged.\nconst program = publishedScript.replace(/^\\s*import .+;\\n/gmu, '');\nconst archive = Buffer.from('independently reviewed synthetic archive');\nconst digest = createHash('sha256').update(archive).digest('hex');\nconst integrity = `sha512-${createHash('sha512').update(archive).digest('base64')}`;\nconst source = 'a'.repeat(40);\nconst registry = 'https://registry.npmjs.org';\nconst packageUrl = `${registry}/@aviaratech%2fai-delivery`;\nconst version = '0.8.1';\nconst archivePath = posix.resolve('/synthetic/package-artifact', `aviaratech-ai-delivery-${version}.tgz`);\nconst pkg = {\n name: '@aviaratech/ai-delivery',\n version,\n private: false,\n license: 'MIT',\n repository: { url: 'git+https://github.com/aviaratech/ai-delivery.git' },\n};\nconst manifest = {\n name: pkg.name,\n version,\n dist: {\n integrity,\n tarball: `${registry}/@aviaratech/ai-delivery/-/ai-delivery-${version}.tgz`,\n attestations: { provenance: { predicateType: 'https://slsa.dev/provenance/v1' } },\n },\n};\n\ntype Fixture = {\n occupied?: boolean;\n versionReadyAt?: number;\n archiveReadyAt?: number;\n provenanceReadyAt?: number;\n indexReadyAt?: number;\n latestReadyAt?: number;\n corruptArchive?: boolean;\n publishStatus?: number | null;\n conflict?: 'name' | 'version' | 'integrity' | 'provenance' | 'origin' | 'credentials' | 'index' | 'latest' | 'main';\n errorPhase?: 'main' | 'version' | 'index' | 'archive';\n errorStatus?: number;\n networkFailure?: boolean;\n oversizedManifest?: boolean;\n fetchDurationMs?: number;\n bodyDeadlineExceeded?: boolean;\n};\n\nasync function runRelease(fixture: Fixture = {}) {\n let publications = 0;\n let reads = 0;\n let elapsed = 0;\n const requests: { url: string; method: string; at: number }[] = [];\n const commands: { command: string; args: string[] }[] = [];\n const waits: number[] = [];\n const timeouts: number[] = [];\n const messages: string[] = [];\n const ready = (at = 1) => reads >= at;\n const published = () => fixture.occupied || publications > 0;\n const visibleManifest = (indexed = false) => {\n const value = structuredClone(manifest);\n if (!ready(fixture.provenanceReadyAt)) Reflect.deleteProperty(value.dist, 'attestations');\n if (fixture.conflict === 'name') value.name = '@someone/else';\n if (fixture.conflict === 'version') value.version = '0.8.0';\n if (fixture.conflict === 'integrity' || (indexed && fixture.conflict === 'index'))\n value.dist.integrity = 'sha512-conflicting';\n if (fixture.conflict === 'provenance')\n value.dist.attestations = { provenance: { predicateType: 'https://unexpected.example/predicate' } };\n if (fixture.conflict === 'origin') value.dist.tarball = 'https://unexpected.example/archive.tgz';\n if (fixture.conflict === 'credentials') {\n const tarball = new URL('/archive.tgz', registry);\n tarball.username = 'user';\n tarball.password = 'password';\n value.dist.tarball = tarball.href;\n }\n return value;\n };\n const fetch = async (input: string | URL, options: RequestInit = {}) => {\n const url = String(input);\n requests.push({ url, method: options.method ?? 'GET', at: elapsed });\n assert.equal(options.redirect, 'error');\n elapsed += fixture.fetchDurationMs ?? 100;\n const phase = url.includes('api.github.com')\n ? 'main'\n : url === packageUrl\n ? 'index'\n : url === `${packageUrl}/${version}`\n ? 'version'\n : 'archive';\n if (phase === fixture.errorPhase && (published() || phase === 'main')) {\n if (fixture.networkFailure) throw new Error('synthetic network failure');\n return new Response(null, { status: fixture.errorStatus ?? 503 });\n }\n if (url === 'https://api.github.com/repos/aviaratech/ai-delivery/branches/main') {\n return Response.json({\n name: 'main',\n protected: true,\n commit: { sha: fixture.conflict === 'main' ? 'b'.repeat(40) : source },\n protection: { required_status_checks: { enforcement_level: 'everyone', contexts: ['checks', 'secrets'] } },\n });\n }\n if (url === `${packageUrl}/${version}`) {\n if (published()) reads++;\n return published() && ready(fixture.versionReadyAt)\n ? fixture.oversizedManifest\n ? new Response('x'.repeat(4 * 1024 * 1024 + 1))\n : Response.json(visibleManifest())\n : new Response(null, { status: 404 });\n }\n if (url === manifest.dist.tarball) {\n if (fixture.bodyDeadlineExceeded) {\n return new Response(\n new ReadableStream({\n start: (controller) => {\n elapsed += 5 * 60_000;\n controller.error(new DOMException('Readback body timed out', 'TimeoutError'));\n },\n }),\n );\n }\n return ready(fixture.archiveReadyAt)\n ? new Response(fixture.corruptArchive ? Buffer.from('conflicting registry bytes') : archive)\n : new Response(null, { status: 404 });\n }\n if (url === packageUrl) {\n return Response.json({\n name: pkg.name,\n 'dist-tags': {\n latest:\n published() && fixture.conflict === 'latest'\n ? '0.8.2'\n : published() && ready(fixture.latestReadyAt)\n ? version\n : '0.8.0',\n },\n versions: published() && ready(fixture.indexReadyAt) ? { [version]: visibleManifest(true) } : {},\n });\n }\n throw new Error(`Unexpected external request: ${url}`);\n };\n const context = {\n createHash,\n resolve: (path: string) => posix.resolve('/synthetic/package-artifact/unpacked/package', path),\n readFileSync: (path: string) => {\n assert.equal(path, archivePath);\n return archive;\n },\n spawnSync: (command: string, args: string[]) => {\n commands.push({ command, args: [...args] });\n assert.equal(command, 'npm');\n assert.equal(args[0], 'publish');\n assert.equal(args[1], archivePath);\n publications++;\n return { status: fixture.publishStatus === undefined ? 0 : fixture.publishStatus };\n },\n pkg,\n process: {\n env: {\n GITHUB_SHA: source,\n REVIEWED_SOURCE_SHA: source,\n RELEASE_VERSION: version,\n REVIEWED_ARCHIVE_SHA256: digest,\n GH_TOKEN: 'synthetic',\n },\n },\n fetch,\n AbortSignal: {\n timeout: (ms: number) => {\n timeouts.push(ms);\n return new AbortController().signal;\n },\n },\n URL,\n Buffer,\n performance: { now: () => elapsed },\n console: {\n log: (message: unknown) => {\n messages.push(String(message));\n },\n },\n setTimeout: (callback: () => void, ms: number) => {\n waits.push(ms);\n elapsed += ms;\n queueMicrotask(callback);\n return 0;\n },\n };\n let error: string | null = null;\n try {\n await (new Script(`(async () => {${program}\\n})()`).runInNewContext(context) as Promise<void>);\n } catch (failure) {\n error = String(failure);\n }\n return { error, publications, requests, commands, waits, timeouts, messages, elapsed, reads };\n}\n\ntest('successful publication reconciles staggered registry visibility without another npm invocation', async () => {\n const result = await runRelease({\n versionReadyAt: 2,\n archiveReadyAt: 3,\n provenanceReadyAt: 4,\n indexReadyAt: 5,\n latestReadyAt: 6,\n });\n assert.equal(result.error, null);\n assert.equal(result.publications, 1);\n assert.equal(result.commands.length, 1);\n assert.deepEqual(result.commands[0]?.args, [\n 'publish',\n archivePath,\n '--ignore-scripts',\n '--access',\n 'public',\n '--tag',\n 'latest',\n '--registry',\n registry,\n '--provenance',\n ]);\n assert.ok(result.waits.length > 0, 'Stale reads must be paced.');\n assert.ok(result.waits.every((ms) => ms > 0));\n assert.ok(result.requests.every((request) => request.method === 'GET'));\n assert.ok(result.timeouts.every((ms) => ms > 0 && ms <= 30_000));\n assert.ok(result.messages.some((message) => /exact reviewed registry/iu.test(message)));\n});\n\ntest('matching occupied release reconciles latest without publication or retag', async () => {\n const result = await runRelease({ occupied: true, latestReadyAt: 3 });\n assert.equal(result.error, null);\n assert.equal(result.publications, 0);\n assert.deepEqual(result.commands, []);\n assert.ok(result.messages.some((message) => /no publication repeated/iu.test(message)));\n});\n\ntest('conflicting archive bytes fail immediately after one publication', async () => {\n const result = await runRelease({ corruptArchive: true });\n assert.match(result.error ?? '', /archive differs/iu);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\ntest('unresolved visibility reports the external reconciliation bound without republishing', async () => {\n const result = await runRelease({ versionReadyAt: Infinity });\n assert.match(result.error ?? '', /reconciliation unresolved/iu);\n assert.equal(result.publications, 1);\n assert.ok(result.waits.length > 0);\n assert.ok(result.elapsed < 10 * 60_000, 'Reconciliation must fit the existing external publish job.');\n assert.ok(\n result.timeouts.some((ms) => ms < 30_000),\n 'Requests must respect the remaining reconciliation allowance.',\n );\n});\n\ntest('an occupied version visible only in the index never enters publication', async () => {\n const result = await runRelease({ occupied: true, versionReadyAt: 3, latestReadyAt: 4 });\n assert.equal(result.error, null);\n assert.deepEqual(result.commands, []);\n assert.ok(result.waits.length > 0);\n});\n\nfor (const conflict of [\n 'name',\n 'version',\n 'integrity',\n 'provenance',\n 'origin',\n 'credentials',\n 'index',\n 'latest',\n] as const) {\n test(`present ${conflict} conflict is refused without another publication`, async () => {\n const result = await runRelease({ conflict });\n assert.match(result.error ?? '', /differs|unexpected|advanced/iu);\n assert.equal(result.publications, 1);\n // The package index is initially absent; its conflict is observed on the second read.\n if (conflict !== 'index') assert.deepEqual(result.waits, []);\n else assert.equal(result.waits.length, 1);\n });\n}\n\nfor (const errorPhase of ['version', 'index', 'archive'] as const) {\n for (const errorStatus of [401, 403, 429, 503]) {\n test(`${errorPhase} HTTP ${errorStatus} remains a permanent failure`, async () => {\n const result = await runRelease({ errorPhase, errorStatus });\n assert.match(result.error ?? '', new RegExp(`readback failed: ${errorStatus}`, 'u'));\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n });\n }\n}\n\ntest('network failure is not retried as propagation', async () => {\n const result = await runRelease({ errorPhase: 'version', networkFailure: true });\n assert.match(result.error ?? '', /synthetic network failure/u);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\nfor (const publishStatus of [1, null]) {\n test(`publish status ${publishStatus} remains ambiguous after matching readback`, async () => {\n const result = await runRelease({ publishStatus, versionReadyAt: 3 });\n assert.match(result.error ?? '', /failed or was ambiguous/iu);\n assert.equal(result.publications, 1);\n assert.ok(result.messages.some((message) => message.includes(`\"status\":${publishStatus}`)));\n assert.ok(result.messages.some((message) => /exact reviewed registry/iu.test(message)));\n });\n}\n\ntest('an occupied conflicting release is never republished', async () => {\n const result = await runRelease({ occupied: true, conflict: 'integrity' });\n assert.match(result.error ?? '', /integrity differs/iu);\n assert.deepEqual(result.commands, []);\n});\n\ntest('protected source drift refuses publication', async () => {\n const result = await runRelease({ conflict: 'main' });\n assert.match(result.error ?? '', /protected main.*drifted/iu);\n assert.deepEqual(result.commands, []);\n});\n\ntest('oversized registry metadata fails within the readback output bound', async () => {\n const result = await runRelease({ oversizedManifest: true });\n assert.match(result.error ?? '', /readback bound/iu);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\ntest('a body timeout at the reconciliation bound retains an explicit unresolved result', async () => {\n const result = await runRelease({ bodyDeadlineExceeded: true });\n assert.match(result.error ?? '', /reconciliation unresolved/iu);\n assert.equal(result.publications, 1);\n});\n\nfor (const phase of ['archiveReadyAt', 'provenanceReadyAt', 'indexReadyAt', 'latestReadyAt'] as const) {\n test(`unresolved ${phase} cannot be accepted as a completed release`, async () => {\n const result = await runRelease({ [phase]: Infinity });\n assert.match(result.error ?? '', /reconciliation unresolved/iu);\n assert.equal(result.publications, 1);\n });\n}\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,WAAW,aAAa,IAAI,IAAI,oCAAoC,YAAY,GAAG,GAAG,MAAM;AAClG,MAAM,UAAU,CAAC,GAAG,SAAS,SAAS,sDAAsD,CAAC;AAC7F,MAAM,kBAAkB,QAAQ,GAAG,EAAE,IAAI,CAAC;AAC1C,OAAO,GAAG,iBAAiB,kEAAkE;AAE7F,MAAM,UAAU,gBAAgB,QAAQ,uBAAuB,EAAE;AACjE,MAAM,UAAU,OAAO,KAAK,0CAA0C;AACtE,MAAM,SAAS,WAAW,QAAQ,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK;AAChE,MAAM,YAAY,UAAU,WAAW,QAAQ,EAAE,OAAO,OAAO,EAAE,OAAO,QAAQ,CAAC;AACjF,MAAM,SAAS,IAAI,OAAO,EAAE;AAC5B,MAAM,WAAW;AACjB,MAAM,aAAa,GAAG,QAAQ;AAC9B,MAAM,UAAU;AAChB,MAAM,cAAc,MAAM,QAAQ,+BAA+B,0BAA0B,OAAO,MAAM;AACxG,MAAM,MAAM;AAAA,EACV,MAAM;AAAA,EACN;AAAA,EACA,SAAS;AAAA,EACT,SAAS;AAAA,EACT,Y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} from 'node:crypto';\nimport { readFileSync } from 'node:fs';\nimport { posix } from 'node:path';\nimport { Script } from 'node:vm';\nimport { test } from 'vitest';\n\nconst workflow = readFileSync(new URL('../.github/workflows/release.yml', import.meta.url), 'utf8');\nconst scripts = [...workflow.matchAll(/node --input-type=module <<'JS'\\n([\\s\\S]*?)\\n\\s+JS/gu)];\nconst publishedScript = scripts.at(-1)?.[1];\nassert.ok(publishedScript, 'The actual release workflow must contain its publication script.');\n// Substitute only external imports; all publication decisions and guards execute unchanged.\nconst program = publishedScript.replace(/^\\s*import .+;\\n/gmu, '');\nconst archive = Buffer.from('independently reviewed synthetic archive');\nconst digest = createHash('sha256').update(archive).digest('hex');\nconst integrity = `sha512-${createHash('sha512').update(archive).digest('base64')}`;\nconst source = 'a'.repeat(40);\nconst registry = 'https://registry.npmjs.org';\nconst packageUrl = `${registry}/@aviaratech%2fai-delivery`;\nconst version = '0.8.1';\nconst archivePath = posix.resolve('/synthetic/package-artifact', `aviaratech-ai-delivery-${version}.tgz`);\nconst pkg = {\n name: '@aviaratech/ai-delivery',\n version,\n private: false,\n license: 'MIT',\n repository: { url: 'git+https://github.com/aviaratech/ai-delivery.git' },\n};\nconst manifest = {\n name: pkg.name,\n version,\n dist: {\n integrity,\n tarball: `${registry}/@aviaratech/ai-delivery/-/ai-delivery-${version}.tgz`,\n attestations: { provenance: { predicateType: 'https://slsa.dev/provenance/v1' } },\n },\n};\n\ntype Fixture = {\n occupied?: boolean;\n versionReadyAt?: number;\n archiveReadyAt?: number;\n provenanceReadyAt?: number;\n indexReadyAt?: number;\n latestReadyAt?: number;\n corruptArchive?: boolean;\n publishStatus?: number | null;\n conflict?: 'name' | 'version' | 'integrity' | 'provenance' | 'origin' | 'credentials' | 'index' | 'latest' | 'main';\n errorPhase?: 'main' | 'version' | 'index' | 'archive';\n errorStatus?: number;\n networkFailure?: boolean;\n oversizedManifest?: boolean;\n fetchDurationMs?: number;\n bodyDeadlineExceeded?: boolean;\n};\n\nasync function runRelease(fixture: Fixture = {}) {\n let publications = 0;\n let reads = 0;\n let elapsed = 0;\n const requests: { url: string; method: string; at: number }[] = [];\n const commands: { command: string; args: string[] }[] = [];\n const waits: number[] = [];\n const timeouts: number[] = [];\n const messages: string[] = [];\n const ready = (at = 1) => reads >= at;\n const published = () => fixture.occupied || publications > 0;\n const visibleManifest = (indexed = false) => {\n const value = structuredClone(manifest);\n if (!ready(fixture.provenanceReadyAt)) Reflect.deleteProperty(value.dist, 'attestations');\n if (fixture.conflict === 'name') value.name = '@someone/else';\n if (fixture.conflict === 'version') value.version = '0.8.0';\n if (fixture.conflict === 'integrity' || (indexed && fixture.conflict === 'index'))\n value.dist.integrity = 'sha512-conflicting';\n if (fixture.conflict === 'provenance')\n value.dist.attestations = { provenance: { predicateType: 'https://unexpected.example/predicate' } };\n if (fixture.conflict === 'origin') value.dist.tarball = 'https://unexpected.example/archive.tgz';\n if (fixture.conflict === 'credentials') {\n const tarball = new URL('/archive.tgz', registry);\n tarball.username = 'user';\n tarball.password = 'password';\n value.dist.tarball = tarball.href;\n }\n return value;\n };\n const fetch = async (input: string | URL, options: RequestInit = {}) => {\n const url = String(input);\n requests.push({ url, method: options.method ?? 'GET', at: elapsed });\n assert.equal(options.redirect, 'error');\n elapsed += fixture.fetchDurationMs ?? 100;\n const phase = url.includes('api.github.com')\n ? 'main'\n : url === packageUrl\n ? 'index'\n : url === `${packageUrl}/${version}`\n ? 'version'\n : 'archive';\n if (phase === fixture.errorPhase && (published() || phase === 'main')) {\n if (fixture.networkFailure) throw new Error('synthetic network failure');\n return new Response(null, { status: fixture.errorStatus ?? 503 });\n }\n if (url === 'https://api.github.com/repos/aviaratech/ai-delivery/branches/main') {\n return Response.json({\n name: 'main',\n protected: true,\n commit: { sha: fixture.conflict === 'main' ? 'b'.repeat(40) : source },\n protection: { required_status_checks: { enforcement_level: 'everyone', contexts: ['checks', 'secrets'] } },\n });\n }\n if (url === `${packageUrl}/${version}`) {\n if (published()) reads++;\n return published() && ready(fixture.versionReadyAt)\n ? fixture.oversizedManifest\n ? new Response('x'.repeat(4 * 1024 * 1024 + 1))\n : Response.json(visibleManifest())\n : new Response(null, { status: 404 });\n }\n if (url === manifest.dist.tarball) {\n if (fixture.bodyDeadlineExceeded) {\n return new Response(\n new ReadableStream({\n start: (controller) => {\n elapsed += 20 * 60_000;\n controller.error(new DOMException('Readback body timed out', 'TimeoutError'));\n },\n }),\n );\n }\n return ready(fixture.archiveReadyAt)\n ? new Response(fixture.corruptArchive ? Buffer.from('conflicting registry bytes') : archive)\n : new Response(null, { status: 404 });\n }\n if (url === packageUrl) {\n return Response.json({\n name: pkg.name,\n 'dist-tags': {\n latest:\n published() && fixture.conflict === 'latest'\n ? '0.8.2'\n : published() && ready(fixture.latestReadyAt)\n ? version\n : '0.8.0',\n },\n versions: published() && ready(fixture.indexReadyAt) ? { [version]: visibleManifest(true) } : {},\n });\n }\n throw new Error(`Unexpected external request: ${url}`);\n };\n const context = {\n createHash,\n resolve: (path: string) => posix.resolve('/synthetic/package-artifact/unpacked/package', path),\n readFileSync: (path: string) => {\n assert.equal(path, archivePath);\n return archive;\n },\n spawnSync: (command: string, args: string[]) => {\n commands.push({ command, args: [...args] });\n assert.equal(command, 'npm');\n assert.equal(args[0], 'publish');\n assert.equal(args[1], archivePath);\n publications++;\n return { status: fixture.publishStatus === undefined ? 0 : fixture.publishStatus };\n },\n pkg,\n process: {\n env: {\n GITHUB_SHA: source,\n REVIEWED_SOURCE_SHA: source,\n RELEASE_VERSION: version,\n REVIEWED_ARCHIVE_SHA256: digest,\n GH_TOKEN: 'synthetic',\n },\n },\n fetch,\n AbortSignal: {\n timeout: (ms: number) => {\n timeouts.push(ms);\n return new AbortController().signal;\n },\n },\n URL,\n Buffer,\n performance: { now: () => elapsed },\n console: {\n log: (message: unknown) => {\n messages.push(String(message));\n },\n },\n setTimeout: (callback: () => void, ms: number) => {\n waits.push(ms);\n elapsed += ms;\n queueMicrotask(callback);\n return 0;\n },\n };\n let error: string | null = null;\n try {\n await (new Script(`(async () => {${program}\\n})()`).runInNewContext(context) as Promise<void>);\n } catch (failure) {\n error = String(failure);\n }\n return { error, publications, requests, commands, waits, timeouts, messages, elapsed, reads };\n}\n\ntest('successful publication reconciles staggered registry visibility without another npm invocation', async () => {\n const result = await runRelease({\n versionReadyAt: 2,\n archiveReadyAt: 3,\n provenanceReadyAt: 4,\n indexReadyAt: 5,\n latestReadyAt: 6,\n });\n assert.equal(result.error, null);\n assert.equal(result.publications, 1);\n assert.equal(result.commands.length, 1);\n assert.deepEqual(result.commands[0]?.args, [\n 'publish',\n archivePath,\n '--ignore-scripts',\n '--access',\n 'public',\n '--tag',\n 'latest',\n '--registry',\n registry,\n '--provenance',\n ]);\n assert.ok(result.waits.length > 0, 'Stale reads must be paced.');\n assert.ok(result.waits.every((ms) => ms > 0));\n assert.ok(result.requests.every((request) => request.method === 'GET'));\n assert.ok(result.timeouts.every((ms) => ms > 0 && ms <= 30_000));\n assert.ok(result.messages.some((message) => /exact reviewed registry/iu.test(message)));\n});\n\ntest('matching occupied release reconciles latest without publication or retag', async () => {\n const result = await runRelease({ occupied: true, latestReadyAt: 3 });\n assert.equal(result.error, null);\n assert.equal(result.publications, 0);\n assert.deepEqual(result.commands, []);\n assert.ok(result.messages.some((message) => /no publication repeated/iu.test(message)));\n});\n\ntest('conflicting archive bytes fail immediately after one publication', async () => {\n const result = await runRelease({ corruptArchive: true });\n assert.match(result.error ?? '', /archive differs/iu);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\ntest('a version npm indexes after seven minutes still ends green', async () => {\n const result = await runRelease({ versionReadyAt: 8 });\n assert.equal(result.error, null);\n assert.equal(result.publications, 1);\n assert.ok(result.elapsed > 7 * 60_000);\n assert.deepEqual(result.waits, [15_000, 30_000, 60_000, 120_000, 120_000, 120_000, 120_000]);\n});\n\ntest('a version that never appears fails with how to check by hand, without republishing', async () => {\n const result = await runRelease({ versionReadyAt: Infinity });\n assert.match(result.error ?? '', /accepted the publish but .* not fully visible.*npm view/iu);\n assert.equal(result.publications, 1);\n assert.ok(result.waits.length > 0);\n assert.ok(result.elapsed >= 15 * 60_000, 'Reconciliation must wait at least 15 minutes.');\n assert.ok(result.elapsed < 30 * 60_000, 'Reconciliation must fit the 30-minute publish job.');\n assert.ok(\n result.timeouts.some((ms) => ms < 30_000),\n 'Requests must respect the remaining reconciliation allowance.',\n );\n});\n\ntest('an occupied version visible only in the index never enters publication', async () => {\n const result = await runRelease({ occupied: true, versionReadyAt: 3, latestReadyAt: 4 });\n assert.equal(result.error, null);\n assert.deepEqual(result.commands, []);\n assert.ok(result.waits.length > 0);\n});\n\nfor (const conflict of [\n 'name',\n 'version',\n 'integrity',\n 'provenance',\n 'origin',\n 'credentials',\n 'index',\n 'latest',\n] as const) {\n test(`present ${conflict} conflict is refused without another publication`, async () => {\n const result = await runRelease({ conflict });\n assert.match(result.error ?? '', /differs|unexpected|advanced/iu);\n assert.equal(result.publications, 1);\n // The package index is initially absent; its conflict is observed on the second read.\n if (conflict !== 'index') assert.deepEqual(result.waits, []);\n else assert.equal(result.waits.length, 1);\n });\n}\n\nfor (const errorPhase of ['version', 'index', 'archive'] as const) {\n for (const errorStatus of [401, 403, 429, 503]) {\n test(`${errorPhase} HTTP ${errorStatus} remains a permanent failure`, async () => {\n const result = await runRelease({ errorPhase, errorStatus });\n assert.match(result.error ?? '', new RegExp(`readback failed: ${errorStatus}`, 'u'));\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n });\n }\n}\n\ntest('network failure is not retried as propagation', async () => {\n const result = await runRelease({ errorPhase: 'version', networkFailure: true });\n assert.match(result.error ?? '', /synthetic network failure/u);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\nfor (const publishStatus of [1, null]) {\n test(`publish status ${publishStatus} remains ambiguous after matching readback`, async () => {\n const result = await runRelease({ publishStatus, versionReadyAt: 3 });\n assert.match(result.error ?? '', /failed or was ambiguous/iu);\n assert.equal(result.publications, 1);\n assert.ok(result.messages.some((message) => message.includes(`\"status\":${publishStatus}`)));\n assert.ok(result.messages.some((message) => /exact reviewed registry/iu.test(message)));\n });\n}\n\ntest('an occupied conflicting release is never republished', async () => {\n const result = await runRelease({ occupied: true, conflict: 'integrity' });\n assert.match(result.error ?? '', /integrity differs/iu);\n assert.deepEqual(result.commands, []);\n});\n\ntest('protected source drift refuses publication', async () => {\n const result = await runRelease({ conflict: 'main' });\n assert.match(result.error ?? '', /protected main.*drifted/iu);\n assert.deepEqual(result.commands, []);\n});\n\ntest('oversized registry metadata fails within the readback output bound', async () => {\n const result = await runRelease({ oversizedManifest: true });\n assert.match(result.error ?? '', /readback bound/iu);\n assert.equal(result.publications, 1);\n assert.deepEqual(result.waits, []);\n});\n\ntest('a body timeout at the reconciliation bound retains an explicit unresolved result', async () => {\n const result = await runRelease({ bodyDeadlineExceeded: true });\n assert.match(result.error ?? '', /accepted the publish but .* not fully visible/iu);\n assert.equal(result.publications, 1);\n});\n\ntest('a rejected publish that never appears does not claim npm accepted it', async () => {\n const result = await runRelease({ publishStatus: 1, versionReadyAt: Infinity });\n assert.match(result.error ?? '', /did not exit cleanly.*not fully visible.*npm view/iu);\n assert.doesNotMatch(result.error ?? '', /accepted the publish/iu);\n assert.equal(result.publications, 1);\n});\n\nfor (const phase of ['archiveReadyAt', 'provenanceReadyAt', 'indexReadyAt', 'latestReadyAt'] as const) {\n test(`unresolved ${phase} cannot be accepted as a completed release`, async () => {\n const result = await runRelease({ [phase]: Infinity });\n assert.match(result.error ?? '', /accepted the publish but .* not fully visible/iu);\n assert.equal(result.publications, 1);\n });\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,YAAY;AACnB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,WAAW,aAAa,IAAI,IAAI,oCAAoC,YAAY,GAAG,GAAG,MAAM;AAClG,MAAM,UAAU,CAAC,GAAG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