@aviaratech/ai-delivery 0.3.41 → 0.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/agentReadiness.test.js +15 -0
- package/dist/agentReadiness.test.js.map +2 -2
- package/dist/callerErrors.test.js +11 -1
- package/dist/callerErrors.test.js.map +2 -2
- package/dist/contributorChecks.test.js +4 -1
- package/dist/contributorChecks.test.js.map +2 -2
- package/dist/currentConsumer.test.js +3 -2
- package/dist/currentConsumer.test.js.map +2 -2
- package/dist/currentTrackingScenario.test.js +3 -2
- package/dist/currentTrackingScenario.test.js.map +2 -2
- package/dist/fixtures/builderReady.d.ts +82 -0
- package/dist/fixtures/builderReady.js +56 -0
- package/dist/fixtures/builderReady.js.map +7 -0
- package/dist/fixtures/inertTarget.d.ts +75 -0
- package/dist/fixtures/inertTarget.js +20 -15
- package/dist/fixtures/inertTarget.js.map +2 -2
- package/dist/fixtures/issue63.d.ts +96 -0
- package/dist/fixtures/issue63.js +21 -2
- package/dist/fixtures/issue63.js.map +2 -2
- package/dist/fixtures/readView.d.ts +9 -1
- package/dist/fixtures/readView.js +4 -0
- package/dist/fixtures/readView.js.map +2 -2
- package/dist/issue.d.ts +2 -2
- package/dist/issue.js +96 -27
- package/dist/issue.js.map +2 -2
- package/dist/issue63Routes.test.js +3 -3
- package/dist/issue63Routes.test.js.map +2 -2
- package/dist/issueBlockerGuard.test.js +5 -5
- package/dist/issueBlockerGuard.test.js.map +2 -2
- package/dist/issueContract.d.ts +242 -2
- package/dist/issueContract.js +147 -28
- package/dist/issueContract.js.map +2 -2
- package/dist/issueContract.test.d.ts +20 -0
- package/dist/issueContract.test.js +210 -13
- package/dist/issueContract.test.js.map +2 -2
- package/dist/issueDates.test.js +5 -6
- package/dist/issueDates.test.js.map +2 -2
- package/dist/issueInfoReadback.test.js +144 -7
- package/dist/issueInfoReadback.test.js.map +2 -2
- package/dist/issueIntake.test.js +201 -33
- package/dist/issueIntake.test.js.map +2 -2
- package/dist/issueJournal.js +4 -2
- package/dist/issueJournal.js.map +2 -2
- package/dist/issueJournal.test.js +22 -0
- package/dist/issueJournal.test.js.map +2 -2
- package/dist/issueTracking.test.js +4 -1
- package/dist/issueTracking.test.js.map +2 -2
- package/dist/issueWriteRecovery.test.js +12 -12
- package/dist/issueWriteRecovery.test.js.map +2 -2
- package/dist/mcp/index.js +3 -3
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools.d.ts +155 -5
- package/dist/mcp/tools.js +136 -103
- package/dist/mcp/tools.js.map +2 -2
- package/dist/pluginPackaging.test.js +6 -3
- package/dist/pluginPackaging.test.js.map +2 -2
- package/dist/pr.d.ts +2 -0
- package/dist/pr.js +28 -3
- package/dist/pr.js.map +2 -2
- package/dist/pr.test.js +0 -7
- package/dist/pr.test.js.map +2 -2
- package/dist/prAssociation.test.js +82 -9
- package/dist/prAssociation.test.js.map +2 -2
- package/dist/projectNumbers.test.js +1 -1
- package/dist/projectNumbers.test.js.map +1 -1
- package/dist/readView.d.ts +32 -3
- package/dist/readView.js +29 -12
- package/dist/readView.js.map +2 -2
- package/dist/readView.test.js +63 -1
- package/dist/readView.test.js.map +2 -2
- package/dist/releaseWorkflow.test.js +2 -2
- package/dist/releaseWorkflow.test.js.map +2 -2
- package/dist/review.d.ts +8 -0
- package/dist/review.js +30 -2
- package/dist/review.js.map +2 -2
- package/dist/review.test.js +64 -1
- package/dist/review.test.js.map +2 -2
- package/dist/services/agentReadinessService.d.ts +2 -1
- package/dist/services/agentReadinessService.js +6 -0
- package/dist/services/agentReadinessService.js.map +2 -2
- package/dist/stdoutRegression.test.js +27 -15
- package/dist/stdoutRegression.test.js.map +2 -2
- package/dist/targetPolicyEntrypoints.test.js +1 -1
- package/dist/targetPolicyEntrypoints.test.js.map +2 -2
- package/dist/targetPolicyRoutes.test.js +1 -1
- package/dist/targetPolicyRoutes.test.js.map +2 -2
- package/dist/targetRepositoryExecution.test.js +11 -3
- package/dist/targetRepositoryExecution.test.js.map +2 -2
- package/dist/toolOutput.test.js +14 -0
- package/dist/toolOutput.test.js.map +2 -2
- package/package.json +1 -1
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/cli.js +130 -124
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +1 -11
- package/plugins/ai-delivery/skills/ticket-design/SKILL.md +29 -0
package/dist/mcp/tools.js
CHANGED
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
CreateIssueStatus,
|
|
12
12
|
IssueStatusPatch,
|
|
13
13
|
ProjectStatusPatch,
|
|
14
|
-
IssueDeferralPatch
|
|
14
|
+
IssueDeferralPatch,
|
|
15
|
+
acceptedKeysError
|
|
15
16
|
} from "../issueContract.js";
|
|
16
17
|
const Verbose = z.boolean().optional().describe("Return the full payload, including bodies, diffs and routing.");
|
|
17
18
|
const Positive = z.number().int().positive();
|
|
@@ -20,31 +21,34 @@ const REPO_HELP = "GitHub owner/name. Pass the repository named by the user. An
|
|
|
20
21
|
const Repo = z.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u).optional().describe(REPO_HELP);
|
|
21
22
|
const AI_DELIVERY_MCP_CONTRACT_VERSION = "ai-delivery.mcp@2";
|
|
22
23
|
const IssueUpdateInput = issueInputSchema(
|
|
23
|
-
z.strictObject(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
z.strictObject(
|
|
25
|
+
{
|
|
26
|
+
...IssueWriteFields,
|
|
27
|
+
...NativeIssueDateFields,
|
|
28
|
+
status: IssueStatusPatch.optional(),
|
|
29
|
+
projectStatus: ProjectStatusPatch.optional(),
|
|
30
|
+
repo: Repo,
|
|
31
|
+
blockedBy: z.array(Positive).optional(),
|
|
32
|
+
blocks: z.array(Positive).optional(),
|
|
33
|
+
overrideReason: OverrideReason.optional(),
|
|
34
|
+
body: z.string().optional(),
|
|
35
|
+
issueNumber: Positive,
|
|
36
|
+
issueType: IssueWriteFields.issueType,
|
|
37
|
+
labels: Labels.optional(),
|
|
38
|
+
milestone: Positive.nullable().optional(),
|
|
39
|
+
parentIssueNumber: Positive.nullable().optional(),
|
|
40
|
+
park: z.literal(true).optional(),
|
|
41
|
+
...IssueDeferralPatch,
|
|
42
|
+
points: IssueWriteFields.points,
|
|
43
|
+
priority: z.string().min(1).optional(),
|
|
44
|
+
state: z.enum(["open", "closed"]).optional(),
|
|
45
|
+
preserveHistory: z.boolean().optional(),
|
|
46
|
+
closeReason: z.enum(["completed", "not_planned", "duplicate"]).optional(),
|
|
47
|
+
supersededBy: Positive.optional(),
|
|
48
|
+
title: IssueWriteFields.title
|
|
49
|
+
},
|
|
50
|
+
{ error: acceptedKeysError }
|
|
51
|
+
).superRefine((input, ctx) => {
|
|
48
52
|
if (input.defer !== void 0 && input.undefer !== void 0)
|
|
49
53
|
ctx.addIssue({ code: "custom", message: "Choose defer or undefer, never both.", path: ["defer"] });
|
|
50
54
|
if ((input.closeReason !== void 0 || input.supersededBy !== void 0) && input.state !== "closed")
|
|
@@ -71,15 +75,18 @@ const Tracking = {
|
|
|
71
75
|
repo: z.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u).optional().describe(REPO_HELP),
|
|
72
76
|
title: z.string().trim().min(1, "Issue title is empty; enter a title.").max(256, "Issue title exceeds 256 characters; shorten the title.").describe(IssueFields.shape.title.description ?? "")
|
|
73
77
|
};
|
|
74
|
-
const NormalStart = z.strictObject(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
const NormalStart = z.strictObject(
|
|
79
|
+
{
|
|
80
|
+
...Tracking,
|
|
81
|
+
title: Tracking.title.optional(),
|
|
82
|
+
issueNumber: Positive.optional(),
|
|
83
|
+
request: z.string().min(1).optional(),
|
|
84
|
+
requestId: z.string().trim().min(1).max(256).optional(),
|
|
85
|
+
resumeCreated: z.boolean().optional(),
|
|
86
|
+
branch: z.string().min(1).optional()
|
|
87
|
+
},
|
|
88
|
+
{ error: acceptedKeysError }
|
|
89
|
+
);
|
|
83
90
|
const IssueListing = {
|
|
84
91
|
repo: Repo,
|
|
85
92
|
verbose: Verbose,
|
|
@@ -100,7 +107,7 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
100
107
|
name: "issue_comment",
|
|
101
108
|
commandName: "comment",
|
|
102
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.",
|
|
103
|
-
inputSchema: z.strictObject({ ...JournalInputSchema.shape, repo: Repo, verbose: Verbose }).superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {
|
|
110
|
+
inputSchema: z.strictObject({ ...JournalInputSchema.shape, repo: Repo, verbose: Verbose }, { error: acceptedKeysError }).superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {
|
|
104
111
|
const parsed = JournalInputSchema.safeParse(journal);
|
|
105
112
|
if (!parsed.success)
|
|
106
113
|
for (const issue of parsed.error.issues)
|
|
@@ -110,38 +117,43 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
110
117
|
{
|
|
111
118
|
name: "issue_create",
|
|
112
119
|
commandName: "create",
|
|
113
|
-
description: "Create a native GitHub tracking issue with configured metadata and relationships",
|
|
120
|
+
description: "Create a native GitHub tracking issue with configured metadata and relationships. A non-draft issue needs issueType, and a non-epic also needs priority.",
|
|
114
121
|
issueContract: ISSUE_JSON_SCHEMAS,
|
|
115
122
|
inputSchema: issueInputSchema(
|
|
116
|
-
z.strictObject(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
z.strictObject(
|
|
124
|
+
{
|
|
125
|
+
...Tracking,
|
|
126
|
+
...NativeIssueDateFields,
|
|
127
|
+
...IssueWriteFields,
|
|
128
|
+
title: IssueFields.shape.title,
|
|
129
|
+
opId: z.string().trim().min(1).max(256).optional().describe(
|
|
130
|
+
"Stable retry identity: repeat the same original arguments to complete a partial create without another issue."
|
|
131
|
+
),
|
|
132
|
+
status: CreateIssueStatus.optional()
|
|
133
|
+
},
|
|
134
|
+
{ error: acceptedKeysError }
|
|
135
|
+
)
|
|
126
136
|
)
|
|
127
137
|
},
|
|
128
138
|
{
|
|
129
139
|
name: "issue_start",
|
|
130
140
|
commandName: "start",
|
|
131
|
-
description: "Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.",
|
|
141
|
+
description: "Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Issue Type, Priority (not for epics), Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.",
|
|
132
142
|
inputSchema: NormalStart
|
|
133
143
|
},
|
|
134
144
|
{
|
|
135
145
|
name: "issue_list",
|
|
146
|
+
readOnly: true,
|
|
136
147
|
commandName: "list",
|
|
137
148
|
description: "List repository issues with native filters, named organization fields and pagination",
|
|
138
|
-
inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() })
|
|
149
|
+
inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }, { error: acceptedKeysError })
|
|
139
150
|
},
|
|
140
151
|
{
|
|
141
152
|
name: "issue_search",
|
|
153
|
+
readOnly: true,
|
|
142
154
|
commandName: "search",
|
|
143
155
|
description: "Search literal issue text in the selected repository with native filters and pagination",
|
|
144
|
-
inputSchema: z.strictObject({ ...IssueListing, query: SearchText })
|
|
156
|
+
inputSchema: z.strictObject({ ...IssueListing, query: SearchText }, { error: acceptedKeysError })
|
|
145
157
|
},
|
|
146
158
|
{
|
|
147
159
|
name: "issue_update",
|
|
@@ -154,90 +166,111 @@ const AI_DELIVERY_MCP_TOOLS = [
|
|
|
154
166
|
commandName: "batch:update",
|
|
155
167
|
description: "Plan or apply 1\u201350 issue updates in one repository, with ordered partial results and readback",
|
|
156
168
|
inputSchema: issueInputSchema(
|
|
157
|
-
z.strictObject(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
169
|
+
z.strictObject(
|
|
170
|
+
{
|
|
171
|
+
repo: Repo,
|
|
172
|
+
verbose: Verbose,
|
|
173
|
+
items: z.array(IssueUpdateInput).min(1).max(50),
|
|
174
|
+
dryRun: z.boolean().optional()
|
|
175
|
+
},
|
|
176
|
+
{ error: acceptedKeysError }
|
|
177
|
+
)
|
|
163
178
|
)
|
|
164
179
|
},
|
|
165
180
|
{
|
|
166
181
|
name: "issue_info",
|
|
182
|
+
readOnly: true,
|
|
167
183
|
commandName: "info",
|
|
168
|
-
description: "Read live GitHub issue metadata, relationships, Project status, linked PRs (state, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, 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.",
|
|
169
|
-
inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose })
|
|
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.",
|
|
185
|
+
inputSchema: z.strictObject({ issueNumber: Positive, repo: Repo, verbose: Verbose }, { error: acceptedKeysError })
|
|
170
186
|
},
|
|
171
187
|
{
|
|
172
188
|
name: "issue_ready_check",
|
|
189
|
+
readOnly: true,
|
|
173
190
|
commandName: "ready:check",
|
|
174
191
|
description: "Evaluate deterministic readiness from live native issue state",
|
|
175
|
-
inputSchema: z.strictObject(
|
|
192
|
+
inputSchema: z.strictObject(
|
|
193
|
+
{ issueNumber: Positive, repo: Tracking.repo, verbose: Verbose },
|
|
194
|
+
{ error: acceptedKeysError }
|
|
195
|
+
)
|
|
176
196
|
},
|
|
177
197
|
{
|
|
178
198
|
name: "issue_pr_create",
|
|
179
199
|
commandName: "pr:create",
|
|
180
|
-
description: "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. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.",
|
|
181
|
-
inputSchema: z.strictObject(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
description: "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.",
|
|
201
|
+
inputSchema: z.strictObject(
|
|
202
|
+
{
|
|
203
|
+
repo: Repo,
|
|
204
|
+
verbose: Verbose,
|
|
205
|
+
issueNumber: Positive,
|
|
206
|
+
prNumber: Positive.optional(),
|
|
207
|
+
nonClosing: z.boolean().optional(),
|
|
208
|
+
expectedHeadSha: z.string().regex(
|
|
209
|
+
/^[a-f0-9]{40}$/u,
|
|
210
|
+
"expectedHeadSha must be a full 40-character commit SHA; pass the pushed head or omit it."
|
|
211
|
+
).optional(),
|
|
212
|
+
body: z.string().min(1, "PR body is empty; enter a body or omit it to use the default body.").optional(),
|
|
213
|
+
draft: z.boolean().optional(),
|
|
214
|
+
dryRun: z.boolean().optional(),
|
|
215
|
+
title: z.string().min(1, "PR title is empty; enter a title or omit it to use the issue title.").optional(),
|
|
216
|
+
headBranch: z.string().min(1).optional(),
|
|
217
|
+
head: z.string().min(1).optional(),
|
|
218
|
+
base: z.string().min(1).optional()
|
|
219
|
+
},
|
|
220
|
+
{ error: acceptedKeysError }
|
|
221
|
+
).refine(
|
|
199
222
|
(input) => input.head === void 0 || input.headBranch === void 0 || input.head === input.headBranch,
|
|
200
223
|
"PR head selectors disagree; use the same branch for head and headBranch."
|
|
201
224
|
)
|
|
202
225
|
},
|
|
203
226
|
{
|
|
204
227
|
name: "issue_pr_info",
|
|
228
|
+
readOnly: true,
|
|
205
229
|
commandName: "pr:info",
|
|
206
|
-
description: "Inspect a PR by number or its GitHub-linked issue branch: state, merge state, checks, reviews and each linked issue's state, Project status and latest journal, in one call",
|
|
207
|
-
inputSchema: z.strictObject(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
230
|
+
description: "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",
|
|
231
|
+
inputSchema: z.strictObject(
|
|
232
|
+
{
|
|
233
|
+
repo: Repo,
|
|
234
|
+
verbose: Verbose,
|
|
235
|
+
issueNumber: Positive.optional(),
|
|
236
|
+
prNumber: Positive.optional(),
|
|
237
|
+
nonClosing: z.boolean().optional()
|
|
238
|
+
},
|
|
239
|
+
{ error: acceptedKeysError }
|
|
240
|
+
)
|
|
214
241
|
},
|
|
215
242
|
{
|
|
216
243
|
name: "milestone_create",
|
|
217
244
|
commandName: "milestone:create",
|
|
218
245
|
description: "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.",
|
|
219
|
-
inputSchema: z.strictObject(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
246
|
+
inputSchema: z.strictObject(
|
|
247
|
+
{
|
|
248
|
+
repo: Repo,
|
|
249
|
+
verbose: Verbose,
|
|
250
|
+
title: z.string().trim().min(1).max(256),
|
|
251
|
+
dueOn: z.iso.date().optional(),
|
|
252
|
+
description: z.string().max(1e4).optional()
|
|
253
|
+
},
|
|
254
|
+
{ error: acceptedKeysError }
|
|
255
|
+
)
|
|
226
256
|
},
|
|
227
257
|
{
|
|
228
258
|
name: "issue_pr_review",
|
|
229
259
|
commandName: "pr:review",
|
|
230
260
|
description: "Submit one existing exact-head independent review with the reviewer App role",
|
|
231
|
-
inputSchema: z.strictObject(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
261
|
+
inputSchema: z.strictObject(
|
|
262
|
+
{
|
|
263
|
+
repo: Repo,
|
|
264
|
+
verbose: Verbose,
|
|
265
|
+
issueNumber: Positive,
|
|
266
|
+
prNumber: Positive,
|
|
267
|
+
nonClosing: z.boolean().optional(),
|
|
268
|
+
artifact: z.string().min(1, "Review artifact is empty; provide the independent review artifact JSON."),
|
|
269
|
+
identity: z.string().min(1).optional(),
|
|
270
|
+
dryRun: z.boolean().optional()
|
|
271
|
+
},
|
|
272
|
+
{ error: acceptedKeysError }
|
|
273
|
+
)
|
|
241
274
|
}
|
|
242
275
|
];
|
|
243
276
|
function getAiDeliveryMcpTool(name) {
|
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} 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 ...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 .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 ...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});\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 })\n .superRefine(({ repo: _repo, verbose: _verbose, ...journal }, ctx) => {\n // Repository routing belongs to the MCP envelope, not the strict journal variants.\n const parsed = JournalInputSchema.safeParse(journal);\n if (!parsed.success)\n for (const issue of parsed.error.issues)\n ctx.addIssue({ code: 'custom', path: issue.path, message: issue.message });\n })\n .meta(JOURNAL_SCHEMA_METADATA),\n },\n {\n name: 'issue_create',\n commandName: 'create',\n description: 'Create a native GitHub tracking issue with configured metadata and relationships',\n issueContract: ISSUE_JSON_SCHEMAS,\n inputSchema: issueInputSchema(\n z.strictObject({\n ...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 ),\n },\n {\n name: 'issue_start',\n commandName: 'start',\n description:\n 'Start a linked issue. Prefer issueNumber of an open issue that already meets the ready contract: title, Points and, for Bug issues, the bug fields (see issue_create). A new issue from title or request cannot carry bug fields.',\n inputSchema: NormalStart,\n },\n {\n name: 'issue_list',\n commandName: 'list',\n description: 'List repository issues with native filters, named organization fields and pagination',\n inputSchema: z.strictObject({ ...IssueListing, query: SearchText.optional() }),\n },\n {\n name: 'issue_search',\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 }),\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 repo: Repo,\n verbose: Verbose,\n items: z.array(IssueUpdateInput).min(1).max(50),\n dryRun: z.boolean().optional(),\n }),\n ),\n },\n {\n name: 'issue_info',\n commandName: 'info',\n description:\n 'Read live GitHub issue metadata, relationships, Project status, linked PRs (state, checks, reviews) and the latest journal in one call. Child counts by default; verbose adds the body, 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 }),\n },\n {\n name: 'issue_ready_check',\n commandName: 'ready:check',\n description: 'Evaluate deterministic readiness from live native issue state',\n inputSchema: z.strictObject({ issueNumber: Positive, repo: Tracking.repo, verbose: Verbose }),\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. nonClosing opens a draft that references the issue and leaves it open. expectedHeadSha refuses a different pushed head.',\n inputSchema: z\n .strictObject({\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 .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 commandName: 'pr:info',\n description:\n \"Inspect a PR by number or its GitHub-linked issue branch: state, merge state, checks, reviews and each linked issue's state, Project status and latest journal, in one call\",\n inputSchema: z.strictObject({\n repo: Repo,\n verbose: Verbose,\n issueNumber: Positive.optional(),\n prNumber: Positive.optional(),\n nonClosing: z.boolean().optional(),\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 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 },\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 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 },\n] as const;\n\nexport type AiDeliveryMcpToolName = (typeof AI_DELIVERY_MCP_TOOLS)[number]['name'];\n\nexport function getAiDeliveryMcpTool(name: string): (typeof AI_DELIVERY_MCP_TOOLS)[number] | null {\n return AI_DELIVERY_MCP_TOOLS.find((tool) => tool.name === name) ?? null;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,+BAA+B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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,
|
|
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,+BAA+B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,+DAA+D;AAC/G,MAAM,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAC3C,MAAM,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/C,MAAM,YACJ;AACF,MAAM,OAAO,EACV,OAAO,EACP,MAAM,qCAAqC,EAC3C,SAAS,EACT,SAAS,SAAS;AACd,MAAM,mCAAmC;AAChD,MAAM,mBAAmB;AAAA,EACvB,EACG;AAAA,IACC;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,QAAQ,iBAAiB,SAAS;AAAA,MAClC,eAAe,mBAAmB,SAAS;AAAA,MAC3C,MAAM;AAAA,MACN,WAAW,EAAE,MAAM,QAA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-10,6 +10,7 @@ import { test } from "vitest";
|
|
|
10
10
|
import pkg from "../package.json" with { type: "json" };
|
|
11
11
|
import { AI_DELIVERY_MCP_TOOLS } from "./mcp/tools.js";
|
|
12
12
|
import { syntheticDiscoveryConfig } from "./fixtures/discovery.js";
|
|
13
|
+
import { withBuilder } from "./fixtures/builderReady.js";
|
|
13
14
|
const packageRoot = fileURLToPath(new URL("../", import.meta.url));
|
|
14
15
|
const pluginRoot = join(packageRoot, "plugins", "ai-delivery");
|
|
15
16
|
const qualificationOwner = await import(new URL("../scripts/current-qualification.mjs", import.meta.url).href);
|
|
@@ -169,7 +170,7 @@ globalThis.fetch=async(url,init)=>{
|
|
|
169
170
|
if(method==='POST')fieldValues=json.issue_field_values.map(entry=>({issue_field_id:entry.field_id,issue_field_name:fields.find(field=>field.id===entry.field_id).name,data_type:'single_select',value:entry.value}));
|
|
170
171
|
data=fieldValues;
|
|
171
172
|
}
|
|
172
|
-
else if(path.endsWith('/issues')&&method==='POST'){issue={...issue,...json};data=issue;}
|
|
173
|
+
else if(path.endsWith('/issues')&&method==='POST'){issue={...issue,...json,...(json.type?{type:{name:json.type}}:{})};data=issue;}
|
|
173
174
|
else if(path.endsWith('/issues')&&method==='GET')data=[issue];
|
|
174
175
|
else if(path.endsWith('/sub_issues'))data=[];
|
|
175
176
|
else if(path.endsWith('/issues/17')){if(method==='PATCH')issue={...issue,...json};data=issue;}
|
|
@@ -195,10 +196,12 @@ globalThis.fetch=async(url,init)=>{
|
|
|
195
196
|
const client = new Client({ name: "actual-launch-routing", version: "1" });
|
|
196
197
|
try {
|
|
197
198
|
await client.connect(transport, { timeout: 3e4 });
|
|
198
|
-
const readyInput = {
|
|
199
|
+
const readyInput = withBuilder({
|
|
199
200
|
repo: "example/b",
|
|
200
201
|
title: "Validate widget launch routing across repositories",
|
|
202
|
+
issueType: "Task",
|
|
201
203
|
points: 2,
|
|
204
|
+
priority: "High",
|
|
202
205
|
problem: "A launcher can bind a widget issue to the checkout repository instead of the explicit caller.",
|
|
203
206
|
outcome: "Create and update the issue only in explicitly selected repository B.",
|
|
204
207
|
acceptanceCriteria: [
|
|
@@ -208,7 +211,7 @@ globalThis.fetch=async(url,init)=>{
|
|
|
208
211
|
}
|
|
209
212
|
],
|
|
210
213
|
outOfScope: ["Live authentication and host configuration."]
|
|
211
|
-
};
|
|
214
|
+
});
|
|
212
215
|
const created = await client.callTool({
|
|
213
216
|
name: "issue_create",
|
|
214
217
|
arguments: { ...readyInput, labels: ["enhancement"] }
|