@amistio/cli 0.1.45 → 0.1.46

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -63,6 +63,14 @@ var documentTypeSchema = z.enum([
63
63
  ]);
64
64
  var documentContentFormatSchema = z.enum(["markdown", "html"]);
65
65
  var artifactFormatPreferenceSchema = z.enum(["markdown", "html", "both", "auto"]);
66
+ var githubPullRequestUrlSchema = z.string().trim().url().max(500).refine((value) => {
67
+ try {
68
+ const url = new URL(value);
69
+ return url.protocol === "https:" && url.hostname === "github.com" && /^\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9]\d*\/?$/.test(url.pathname);
70
+ } catch {
71
+ return false;
72
+ }
73
+ }, "Pull request URL must be an HTTPS github.com pull request URL.");
66
74
  var syncStateSchema = z.enum([
67
75
  "draft",
68
76
  "approved",
@@ -223,7 +231,7 @@ var implementationHandoffSchema = z.object({
223
231
  remoteName: z.string().trim().min(1).max(80).optional(),
224
232
  commitSha: z.string().trim().min(7).max(64).optional(),
225
233
  prNumber: z.number().int().positive().optional(),
226
- prUrl: z.string().trim().url().max(500).optional(),
234
+ prUrl: githubPullRequestUrlSchema.optional(),
227
235
  cleanupStatus: implementationHandoffCleanupStatusSchema.optional(),
228
236
  cleanupMessage: z.string().trim().min(1).max(600).optional(),
229
237
  artifacts: implementationHandoffArtifactsSchema.optional(),
@@ -282,7 +290,7 @@ var autopilotCandidateLinksSchema = z.object({
282
290
  runnerId: z.string().min(1).optional(),
283
291
  branchName: z.string().trim().min(1).max(200).optional(),
284
292
  worktreeKey: z.string().trim().min(1).max(300).optional(),
285
- pullRequestUrl: z.string().trim().url().max(500).optional()
293
+ pullRequestUrl: githubPullRequestUrlSchema.optional()
286
294
  }).strict();
287
295
  var autopilotCandidateActionSchema = z.object({
288
296
  candidateId: z.string().trim().min(1).max(160),
@@ -1470,7 +1478,7 @@ var implementationVerificationResultSchema = z.object({
1470
1478
  checks: z.array(implementationVerificationCheckSchema).default([]),
1471
1479
  gaps: z.array(z.string().trim().min(1).max(600)).default([]),
1472
1480
  branch: z.string().trim().min(1).max(200).optional(),
1473
- pullRequestUrl: z.string().trim().url().max(500).optional(),
1481
+ pullRequestUrl: githubPullRequestUrlSchema.optional(),
1474
1482
  worktreeKey: z.string().trim().min(1).max(300).optional(),
1475
1483
  recommendation: implementationVerificationRecommendationSchema.default("none"),
1476
1484
  verificationPlan: z.array(z.string().trim().min(1).max(300)).default([]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amistio/cli",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",