@cat-factory/contracts 0.266.0 → 0.268.0

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 (47) hide show
  1. package/dist/documents.d.ts +45 -0
  2. package/dist/documents.d.ts.map +1 -1
  3. package/dist/documents.js +35 -0
  4. package/dist/documents.js.map +1 -1
  5. package/dist/errors.d.ts +1 -1
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +6 -0
  8. package/dist/errors.js.map +1 -1
  9. package/dist/execution.d.ts +66 -0
  10. package/dist/execution.d.ts.map +1 -1
  11. package/dist/execution.js +19 -0
  12. package/dist/execution.js.map +1 -1
  13. package/dist/notification-webhooks.d.ts +92 -2
  14. package/dist/notification-webhooks.d.ts.map +1 -1
  15. package/dist/notification-webhooks.js +63 -4
  16. package/dist/notification-webhooks.js.map +1 -1
  17. package/dist/pr-report.d.ts +132 -1
  18. package/dist/pr-report.d.ts.map +1 -1
  19. package/dist/pr-report.js +53 -1
  20. package/dist/pr-report.js.map +1 -1
  21. package/dist/routes/agent-runs.d.ts +32 -0
  22. package/dist/routes/agent-runs.d.ts.map +1 -1
  23. package/dist/routes/bug-hunt.d.ts +32 -0
  24. package/dist/routes/bug-hunt.d.ts.map +1 -1
  25. package/dist/routes/execution.d.ts +128 -0
  26. package/dist/routes/execution.d.ts.map +1 -1
  27. package/dist/routes/human-review.d.ts +16 -0
  28. package/dist/routes/human-review.d.ts.map +1 -1
  29. package/dist/routes/human-test.d.ts +80 -0
  30. package/dist/routes/human-test.d.ts.map +1 -1
  31. package/dist/routes/notification-webhooks.d.ts +390 -1
  32. package/dist/routes/notification-webhooks.d.ts.map +1 -1
  33. package/dist/routes/notification-webhooks.js +97 -8
  34. package/dist/routes/notification-webhooks.js.map +1 -1
  35. package/dist/routes/public-evidence.d.ts +42 -0
  36. package/dist/routes/public-evidence.d.ts.map +1 -1
  37. package/dist/routes/visual-confirm.d.ts +48 -0
  38. package/dist/routes/visual-confirm.d.ts.map +1 -1
  39. package/dist/routes/workspaces.d.ts +32 -0
  40. package/dist/routes/workspaces.d.ts.map +1 -1
  41. package/dist/run-outcome.d.ts +98 -1
  42. package/dist/run-outcome.d.ts.map +1 -1
  43. package/dist/run-outcome.js +73 -1
  44. package/dist/run-outcome.js.map +1 -1
  45. package/dist/snapshot.d.ts +16 -0
  46. package/dist/snapshot.d.ts.map +1 -1
  47. package/package.json +1 -1
@@ -1,4 +1,27 @@
1
1
  import * as v from 'valibot';
2
+ /**
3
+ * The id of the endpoint the SINGULAR routes address. Registering through
4
+ * `PUT /api/v1/notification-webhook` writes this id, and it appears in the collection like any
5
+ * other entry, so the two surfaces describe one store rather than two.
6
+ */
7
+ export declare const DEFAULT_NOTIFICATION_WEBHOOK_ID = "default";
8
+ /**
9
+ * How many endpoints one workspace may register. Every delivery fans out to every subscribed
10
+ * endpoint on a run's terminal path, so the set has to be bounded by something other than an
11
+ * operator's patience; ten is well above the "one receiver per integration" the collection exists
12
+ * to serve. Exceeding it is a 409 with `reason: 'webhook_limit_reached'`.
13
+ */
14
+ export declare const MAX_NOTIFICATION_WEBHOOKS_PER_WORKSPACE = 10;
15
+ /**
16
+ * A webhook's id: CALLER-CHOSEN, not server-minted, which is what makes enrolment idempotent for
17
+ * the consumer that needs it most. A gatekeeper Worker booting cold can `PUT` its own well-known
18
+ * id and be enrolled whether or not it has ever run before, with no id table of its own and no
19
+ * create-or-discover dance against a surface it may be racing another instance on.
20
+ *
21
+ * Constrained to a lowercase slug because it is a path segment on both management surfaces and an
22
+ * operator reads it in a log line beside the endpoint's URL.
23
+ */
24
+ export declare const notificationWebhookIdSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "A webhook id must be 1-63 characters of lowercase letters, digits, `-` or `_`, starting with a letter or digit">]>;
2
25
  /**
3
26
  * The RUN-LIFECYCLE events the same endpoint can subscribe to: the ordinary lifecycle of work an
4
27
  * integration queued, none of which raises a notification. A task whose pipeline carries a
@@ -28,6 +51,13 @@ export declare const platformAlertEventSchema: v.PicklistSchema<["platform_healt
28
51
  export type PlatformAlertEventName = v.InferOutput<typeof platformAlertEventSchema>;
29
52
  /** A workspace's registered notification webhook, as exposed to clients (never the secret). */
30
53
  export declare const notificationWebhookSchema: v.ObjectSchema<{
54
+ /**
55
+ * Which endpoint this is, within the workspace. `default` is the one the singular
56
+ * `/api/v1/notification-webhook` routes address.
57
+ */
58
+ readonly id: v.StringSchema<undefined>;
59
+ /** An operator-facing label. Defaults to the id when a registration supplies none. */
60
+ readonly name: v.StringSchema<undefined>;
31
61
  /** The HTTPS endpoint deliveries are POSTed to. */
32
62
  readonly url: v.StringSchema<undefined>;
33
63
  /**
@@ -74,6 +104,8 @@ export type NotificationWebhook = v.InferOutput<typeof notificationWebhookSchema
74
104
  export declare const putNotificationWebhookSchema: v.ObjectSchema<{
75
105
  /** Omit ⇒ keep the registered endpoint (required only when registering the first one). */
76
106
  readonly url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, undefined>, v.StartsWithAction<string, "https://", "The webhook endpoint must be an https:// URL">, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
107
+ /** Omit ⇒ keep the stored label (the endpoint's id, for a registration that named none). */
108
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>;
77
109
  /** Omit ⇒ deliver the default parking types. */
78
110
  readonly types: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["merge_review", "pipeline_complete", "ci_failed", "test_failed", "requirement_review", "clarity_review", "release_regression", "decision_required", "human_test_ready", "visual_confirmation_ready", "human_review", "followup_pending", "fork_decision_pending", "judge_review", "pr_review_ready", "initiative", "platform_health", "infra_unreachable", "budget_paused", "budget_threshold", "key_drift", "merge_tag_request"], undefined>, undefined>, undefined>;
79
111
  /** Omit ⇒ keep the current run-event subscription (none, for an endpoint that never set one). */
@@ -86,8 +118,13 @@ export declare const putNotificationWebhookSchema: v.ObjectSchema<{
86
118
  }, undefined>;
87
119
  export type PutNotificationWebhookInput = v.InferOutput<typeof putNotificationWebhookSchema>;
88
120
  /**
89
- * What `GET /api/v1/notification-webhook` answers: the registered endpoint, or `null` when the
90
- * workspace has none. Both the session surface and the public one project the SAME
121
+ * What `GET /api/v1/notification-webhook` and `GET /api/v1/notification-webhooks/:webhookId`
122
+ * answer: the addressed endpoint, or `null` when none is registered under that id. A 404 would be
123
+ * the conventional answer for the second one and is deliberately not used: "am I already wired
124
+ * up?" is the call an integration makes at startup, and it should read one response shape rather
125
+ * than branch on a status this surface also uses for a mistyped path.
126
+ *
127
+ * Both the session surface and the public one project the SAME
91
128
  * {@link notificationWebhookSchema}, because the projection is already the client-facing shape
92
129
  * with the secret reduced to a boolean, and a second near-identical DTO would be one more thing
93
130
  * to keep in step for no caller-visible gain.
@@ -102,6 +139,13 @@ export type PutNotificationWebhookInput = v.InferOutput<typeof putNotificationWe
102
139
  export declare const publicNotificationWebhookSchema: v.ObjectSchema<{
103
140
  /** The registered endpoint, or `null` when the workspace has none. */
104
141
  readonly webhook: v.NullableSchema<v.ObjectSchema<{
142
+ /**
143
+ * Which endpoint this is, within the workspace. `default` is the one the singular
144
+ * `/api/v1/notification-webhook` routes address.
145
+ */
146
+ readonly id: v.StringSchema<undefined>;
147
+ /** An operator-facing label. Defaults to the id when a registration supplies none. */
148
+ readonly name: v.StringSchema<undefined>;
105
149
  /** The HTTPS endpoint deliveries are POSTed to. */
106
150
  readonly url: v.StringSchema<undefined>;
107
151
  /**
@@ -129,6 +173,52 @@ export declare const publicNotificationWebhookSchema: v.ObjectSchema<{
129
173
  }, undefined>, undefined>;
130
174
  }, undefined>;
131
175
  export type PublicNotificationWebhook = v.InferOutput<typeof publicNotificationWebhookSchema>;
176
+ /**
177
+ * What `GET /api/v1/notification-webhooks` answers: every endpoint the workspace has registered,
178
+ * ordered by id so two reads of an unchanged workspace agree.
179
+ *
180
+ * Deliberately NOT paginated, unlike every other public list. Paging exists to bound a set the
181
+ * platform cannot bound itself, and this one is bounded at
182
+ * {@link MAX_NOTIFICATION_WEBHOOKS_PER_WORKSPACE} by the write path: a cursor here would hand
183
+ * every client a loop to write for a set that fits in one response by construction, and would
184
+ * quietly become the reason nobody noticed the cap had been raised.
185
+ */
186
+ export declare const publicNotificationWebhookListSchema: v.ObjectSchema<{
187
+ readonly webhooks: v.ArraySchema<v.ObjectSchema<{
188
+ /**
189
+ * Which endpoint this is, within the workspace. `default` is the one the singular
190
+ * `/api/v1/notification-webhook` routes address.
191
+ */
192
+ readonly id: v.StringSchema<undefined>;
193
+ /** An operator-facing label. Defaults to the id when a registration supplies none. */
194
+ readonly name: v.StringSchema<undefined>;
195
+ /** The HTTPS endpoint deliveries are POSTed to. */
196
+ readonly url: v.StringSchema<undefined>;
197
+ /**
198
+ * Which notification types are delivered. EMPTY means "the parking types" — the defaults a
199
+ * headless overseer cares about — rather than "everything", so registering an endpoint can't
200
+ * accidentally fire-hose every card at an integration that only wanted to hear about parks.
201
+ */
202
+ readonly types: v.ArraySchema<v.PicklistSchema<["merge_review", "pipeline_complete", "ci_failed", "test_failed", "requirement_review", "clarity_review", "release_regression", "decision_required", "human_test_ready", "visual_confirmation_ready", "human_review", "followup_pending", "fork_decision_pending", "judge_review", "pr_review_ready", "initiative", "platform_health", "infra_unreachable", "budget_paused", "budget_threshold", "key_drift", "merge_tag_request"], undefined>, undefined>;
203
+ /**
204
+ * Which run-lifecycle events are delivered. EMPTY means NONE — the opposite of `types` above,
205
+ * deliberately: an endpoint registered before this existed must not start receiving a new event
206
+ * family it never asked for, so subscribing is explicit.
207
+ */
208
+ readonly runEvents: v.ArraySchema<v.PicklistSchema<["run.started", "run.completed", "run.failed"], undefined>, undefined>;
209
+ /**
210
+ * Which platform-health transitions are delivered. EMPTY means NONE, like {@link runEvents}:
211
+ * subscribing a receiver to alerts about the deployment itself is always an explicit choice.
212
+ */
213
+ readonly alertEvents: v.ArraySchema<v.PicklistSchema<["platform_health.firing", "platform_health.resolved"], undefined>, undefined>;
214
+ /** Whether deliveries are currently attempted. Registering an endpoint enables it. */
215
+ readonly enabled: v.BooleanSchema<undefined>;
216
+ /** Whether a signing secret is set (the secret itself is never returned). */
217
+ readonly hasSecret: v.BooleanSchema<undefined>;
218
+ readonly updatedAt: v.NumberSchema<undefined>;
219
+ }, undefined>, undefined>;
220
+ }, undefined>;
221
+ export type PublicNotificationWebhookList = v.InferOutput<typeof publicNotificationWebhookListSchema>;
132
222
  /**
133
223
  * The JSON body of one webhook delivery. Deliberately a thin envelope over the SAME
134
224
  * `notificationSchema` the in-app inbox and the public `GET /api/v1/notifications` already expose
@@ -1 +1 @@
1
- {"version":3,"file":"notification-webhooks.d.ts","sourceRoot":"","sources":["../src/notification-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAoB5B;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,6EAA6D,CAAA;AACjG,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEjF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,qFAGnC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEnF,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB;IACpC,mDAAmD;;IAEnD;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH,sFAAsF;;IAEtF,6EAA6E;;;aAG7E,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B;IACvC,0FAA0F;;IAU1F,gDAAgD;;IAEhD,iGAAiG;;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,oCAAoC;;;;;;;aAStC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC;IAC9C,oEAAoE;;IAEpE,6FAA6F;;IAE7F,8EAA8E;;IAE9E;;;;;OAKG;;aAEH,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,kCAAkC;;IAE7C,kGAAkG;;;;;QAKhG;;;WAGG;;QAEH;;;;WAIG;;QAEH;;;WAGG;;YArEL,oEAAoE;;YAEpE,6FAA6F;;YAE7F,8EAA8E;;YAE9E;;;;;eAKG;;;QA4DD;;;;WAIG;;QAEH;;;;;WAKG;;;;;;;QAEH;;;;WAIG;;;aAGL,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,kKAS6B,CAAA"}
@@ -2,8 +2,8 @@ import * as v from 'valibot';
2
2
  import { notificationSchema, notificationTypeSchema } from './notifications.js';
3
3
  import { platformFailingRunSchema } from './observability.js';
4
4
  // ---------------------------------------------------------------------------
5
- // Notification-webhook wire contracts. A workspace can register ONE outbound HTTPS endpoint that
6
- // receives its notifications as they are raised — the delivery channel a HEADLESS integration
5
+ // Notification-webhook wire contracts. A workspace registers outbound HTTPS endpoints that
6
+ // receive its notifications as they are raised — the delivery channel a HEADLESS integration
7
7
  // needs, since it has no in-app inbox to watch and no browser to hold a WebSocket open.
8
8
  //
9
9
  // This is a `NotificationChannel` like the in-app and Slack channels, composed into the same
@@ -15,7 +15,39 @@ import { platformFailingRunSchema } from './observability.js';
15
15
  // The endpoint's `secret` is write-only on the wire: it is stored encrypted and never read back,
16
16
  // exactly like the other outbound credentials. Deliveries are signed with it so a receiver can
17
17
  // verify the payload really came from this deployment.
18
+ //
19
+ // A workspace may register SEVERAL named endpoints, each with its own secret and its own filters,
20
+ // addressed by a caller-chosen {@link notificationWebhookIdSchema}. The original singular routes
21
+ // (`/api/v1/notification-webhook`) are a projection onto the one id
22
+ // {@link DEFAULT_NOTIFICATION_WEBHOOK_ID}, so a consumer written before the collection existed
23
+ // keeps addressing exactly the endpoint it always did.
18
24
  // ---------------------------------------------------------------------------
25
+ /**
26
+ * The id of the endpoint the SINGULAR routes address. Registering through
27
+ * `PUT /api/v1/notification-webhook` writes this id, and it appears in the collection like any
28
+ * other entry, so the two surfaces describe one store rather than two.
29
+ */
30
+ export const DEFAULT_NOTIFICATION_WEBHOOK_ID = 'default';
31
+ /**
32
+ * How many endpoints one workspace may register. Every delivery fans out to every subscribed
33
+ * endpoint on a run's terminal path, so the set has to be bounded by something other than an
34
+ * operator's patience; ten is well above the "one receiver per integration" the collection exists
35
+ * to serve. Exceeding it is a 409 with `reason: 'webhook_limit_reached'`.
36
+ */
37
+ export const MAX_NOTIFICATION_WEBHOOKS_PER_WORKSPACE = 10;
38
+ /**
39
+ * A webhook's id: CALLER-CHOSEN, not server-minted, which is what makes enrolment idempotent for
40
+ * the consumer that needs it most. A gatekeeper Worker booting cold can `PUT` its own well-known
41
+ * id and be enrolled whether or not it has ever run before, with no id table of its own and no
42
+ * create-or-discover dance against a surface it may be racing another instance on.
43
+ *
44
+ * Constrained to a lowercase slug because it is a path segment on both management surfaces and an
45
+ * operator reads it in a log line beside the endpoint's URL.
46
+ */
47
+ export const notificationWebhookIdSchema = v.pipe(v.string(),
48
+ // Deliberately NOT trimmed, unlike the body strings beside it. Trimming would admit `" ci "` and
49
+ // then store `ci`, so the id a caller PUT and the id it must address afterwards would differ.
50
+ v.regex(/^[a-z0-9][a-z0-9_-]{0,62}$/u, 'A webhook id must be 1-63 characters of lowercase letters, digits, `-` or `_`, starting with a letter or digit'));
19
51
  /**
20
52
  * The RUN-LIFECYCLE events the same endpoint can subscribe to: the ordinary lifecycle of work an
21
53
  * integration queued, none of which raises a notification. A task whose pipeline carries a
@@ -46,6 +78,13 @@ export const platformAlertEventSchema = v.picklist([
46
78
  ]);
47
79
  /** A workspace's registered notification webhook, as exposed to clients (never the secret). */
48
80
  export const notificationWebhookSchema = v.object({
81
+ /**
82
+ * Which endpoint this is, within the workspace. `default` is the one the singular
83
+ * `/api/v1/notification-webhook` routes address.
84
+ */
85
+ id: v.string(),
86
+ /** An operator-facing label. Defaults to the id when a registration supplies none. */
87
+ name: v.string(),
49
88
  /** The HTTPS endpoint deliveries are POSTed to. */
50
89
  url: v.string(),
51
90
  /**
@@ -91,6 +130,8 @@ export const notificationWebhookSchema = v.object({
91
130
  export const putNotificationWebhookSchema = v.object({
92
131
  /** Omit ⇒ keep the registered endpoint (required only when registering the first one). */
93
132
  url: v.optional(v.pipe(v.string(), v.trim(), v.url(), v.startsWith('https://', 'The webhook endpoint must be an https:// URL'), v.maxLength(2000))),
133
+ /** Omit ⇒ keep the stored label (the endpoint's id, for a registration that named none). */
134
+ name: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(100))),
94
135
  /** Omit ⇒ deliver the default parking types. */
95
136
  types: v.optional(v.array(notificationTypeSchema)),
96
137
  /** Omit ⇒ keep the current run-event subscription (none, for an endpoint that never set one). */
@@ -102,8 +143,13 @@ export const putNotificationWebhookSchema = v.object({
102
143
  secret: v.optional(v.pipe(v.string(), v.trim(), v.minLength(16), v.maxLength(200))),
103
144
  });
104
145
  /**
105
- * What `GET /api/v1/notification-webhook` answers: the registered endpoint, or `null` when the
106
- * workspace has none. Both the session surface and the public one project the SAME
146
+ * What `GET /api/v1/notification-webhook` and `GET /api/v1/notification-webhooks/:webhookId`
147
+ * answer: the addressed endpoint, or `null` when none is registered under that id. A 404 would be
148
+ * the conventional answer for the second one and is deliberately not used: "am I already wired
149
+ * up?" is the call an integration makes at startup, and it should read one response shape rather
150
+ * than branch on a status this surface also uses for a mistyped path.
151
+ *
152
+ * Both the session surface and the public one project the SAME
107
153
  * {@link notificationWebhookSchema}, because the projection is already the client-facing shape
108
154
  * with the secret reduced to a boolean, and a second near-identical DTO would be one more thing
109
155
  * to keep in step for no caller-visible gain.
@@ -119,6 +165,19 @@ export const publicNotificationWebhookSchema = v.object({
119
165
  /** The registered endpoint, or `null` when the workspace has none. */
120
166
  webhook: v.nullable(notificationWebhookSchema),
121
167
  });
168
+ /**
169
+ * What `GET /api/v1/notification-webhooks` answers: every endpoint the workspace has registered,
170
+ * ordered by id so two reads of an unchanged workspace agree.
171
+ *
172
+ * Deliberately NOT paginated, unlike every other public list. Paging exists to bound a set the
173
+ * platform cannot bound itself, and this one is bounded at
174
+ * {@link MAX_NOTIFICATION_WEBHOOKS_PER_WORKSPACE} by the write path: a cursor here would hand
175
+ * every client a loop to write for a set that fits in one response by construction, and would
176
+ * quietly become the reason nobody noticed the cap had been raised.
177
+ */
178
+ export const publicNotificationWebhookListSchema = v.object({
179
+ webhooks: v.array(notificationWebhookSchema),
180
+ });
122
181
  /**
123
182
  * The JSON body of one webhook delivery. Deliberately a thin envelope over the SAME
124
183
  * `notificationSchema` the in-app inbox and the public `GET /api/v1/notifications` already expose
@@ -1 +1 @@
1
- {"version":3,"file":"notification-webhooks.js","sourceRoot":"","sources":["../src/notification-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAE7D,8EAA8E;AAC9E,iGAAiG;AACjG,8FAA8F;AAC9F,wFAAwF;AACxF,EAAE;AACF,6FAA6F;AAC7F,6FAA6F;AAC7F,6FAA6F;AAC7F,qEAAqE;AACrE,0DAA0D;AAC1D,EAAE;AACF,iGAAiG;AACjG,+FAA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EAAE,CAAC,CAAC,MAAM,EAAE;IACrB;;;;;OAKG;IACH,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAA;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,kGAAkG;IAClG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd;;;WAGG;QACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB;;;;WAIG;QACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB;;;WAGG;QACH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,mCAAmC,CAAC;QACxD;;;;WAIG;QACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB;;;;;WAKG;QACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC9C;;;;WAIG;QACH,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KACpC,CAAC;CACH,CAAC,CAAA;AAGF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,cAAc;IACd,mBAAmB;IACnB,WAAW;IACX,aAAa;CAC6D,CAAA"}
@@ -7,7 +7,7 @@ import * as v from 'valibot';
7
7
  * (see the header), so a bump means "there is more here than there was", and a consumer written
8
8
  * against an older number keeps reading the fields it knows.
9
9
  */
10
- export declare const PR_VERIFICATION_REPORT_VERSION = 8;
10
+ export declare const PR_VERIFICATION_REPORT_VERSION = 9;
11
11
  /**
12
12
  * How much of one captured command log the report carries, per command.
13
13
  *
@@ -812,6 +812,98 @@ export declare const prReportJudgesSchema: v.ObjectSchema<{
812
812
  }, undefined>, undefined>;
813
813
  }, undefined>;
814
814
  export type PrReportJudges = v.InferOutput<typeof prReportJudgesSchema>;
815
+ /**
816
+ * One linked document the run's agents built from, and what the platform could prove about how
817
+ * CURRENT the copy they read was.
818
+ *
819
+ * Every other section of this report answers "what did the run produce, and what checked it".
820
+ * This one answers the question underneath all of them: what was the run working FROM. A design
821
+ * under active iteration is where it bites, because a reviewer looking at a frontend PR has no
822
+ * way to tell an implementation that misreads the design from one that faithfully implements a
823
+ * revision the designer has since moved past. Those need opposite reactions and, without this,
824
+ * arrive looking identical.
825
+ *
826
+ * Composed from what each dispatch RECORDED (`step.contextDocuments`), never from a fresh probe:
827
+ * the source has moved on by compose time, so a re-probe would answer about a revision no agent
828
+ * on this run ever read, and the report would disagree with the run it describes.
829
+ */
830
+ export declare const prReportContextDocumentSchema: v.ObjectSchema<{
831
+ readonly title: v.StringSchema<undefined>;
832
+ /** The document's canonical URL, so a reviewer can open the revision themselves. */
833
+ readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
834
+ /** Which source it came from (`figma`, `notion`, an `upload`, …). */
835
+ readonly origin: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
836
+ /**
837
+ * The verdict recorded by the LAST dispatch that read this document, which is the state the
838
+ * run ended on. Absent means the deployment ran no freshness check at all, which is NOT the
839
+ * same as an `unconfirmed` verdict: nobody asked, versus asked and could not tell.
840
+ */
841
+ readonly freshness: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
842
+ readonly status: v.LiteralSchema<"confirmed", undefined>;
843
+ readonly version: v.StringSchema<undefined>;
844
+ readonly change: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
845
+ }, undefined>, v.ObjectSchema<{
846
+ readonly status: v.LiteralSchema<"not-applicable", undefined>;
847
+ }, undefined>, v.ObjectSchema<{
848
+ readonly status: v.LiteralSchema<"unconfirmed", undefined>;
849
+ readonly reason: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
850
+ }, undefined>], undefined>, undefined>;
851
+ /**
852
+ * True when the run's own steps recorded more than one distinct revision of this document:
853
+ * the source moved WHILE the run was in flight, so its earlier steps built against something
854
+ * its later ones did not.
855
+ *
856
+ * Computed in code from the recorded verdicts, never asserted by a model, and reported
857
+ * separately from the final revision because the two carry opposite reassurance: the last
858
+ * revision alone says the run ended current, and says nothing about the coder step that
859
+ * finished before the design changed under it.
860
+ */
861
+ readonly movedDuringRun: v.BooleanSchema<undefined>;
862
+ }, undefined>;
863
+ export type PrReportContextDocument = v.InferOutput<typeof prReportContextDocumentSchema>;
864
+ /**
865
+ * The documents the run built from. `absent` when no step recorded one, which covers the
866
+ * ordinary task carrying no attachment and no document link in its description.
867
+ */
868
+ export declare const prReportContextSchema: v.ObjectSchema<{
869
+ readonly status: v.PicklistSchema<["reported", "absent"], undefined>;
870
+ /** Says why the section is empty when `status` is `absent`. */
871
+ readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
872
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
873
+ readonly title: v.StringSchema<undefined>;
874
+ /** The document's canonical URL, so a reviewer can open the revision themselves. */
875
+ readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
876
+ /** Which source it came from (`figma`, `notion`, an `upload`, …). */
877
+ readonly origin: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
878
+ /**
879
+ * The verdict recorded by the LAST dispatch that read this document, which is the state the
880
+ * run ended on. Absent means the deployment ran no freshness check at all, which is NOT the
881
+ * same as an `unconfirmed` verdict: nobody asked, versus asked and could not tell.
882
+ */
883
+ readonly freshness: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
884
+ readonly status: v.LiteralSchema<"confirmed", undefined>;
885
+ readonly version: v.StringSchema<undefined>;
886
+ readonly change: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
887
+ }, undefined>, v.ObjectSchema<{
888
+ readonly status: v.LiteralSchema<"not-applicable", undefined>;
889
+ }, undefined>, v.ObjectSchema<{
890
+ readonly status: v.LiteralSchema<"unconfirmed", undefined>;
891
+ readonly reason: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
892
+ }, undefined>], undefined>, undefined>;
893
+ /**
894
+ * True when the run's own steps recorded more than one distinct revision of this document:
895
+ * the source moved WHILE the run was in flight, so its earlier steps built against something
896
+ * its later ones did not.
897
+ *
898
+ * Computed in code from the recorded verdicts, never asserted by a model, and reported
899
+ * separately from the final revision because the two carry opposite reassurance: the last
900
+ * revision alone says the run ended current, and says nothing about the coder step that
901
+ * finished before the design changed under it.
902
+ */
903
+ readonly movedDuringRun: v.BooleanSchema<undefined>;
904
+ }, undefined>, undefined>;
905
+ }, undefined>;
906
+ export type PrReportContext = v.InferOutput<typeof prReportContextSchema>;
815
907
  /**
816
908
  * One spec requirement joined to what the Tester observed about it — the report's
817
909
  * REQUIREMENT → EVIDENCE row.
@@ -1058,6 +1150,45 @@ export declare const prVerificationReportSchema: v.ObjectSchema<{
1058
1150
  readonly url: v.StringSchema<undefined>;
1059
1151
  }, undefined>, undefined>;
1060
1152
  }, undefined>;
1153
+ /** What the run built FROM: the linked documents its agents read, at which revision. */
1154
+ readonly context: v.ObjectSchema<{
1155
+ readonly status: v.PicklistSchema<["reported", "absent"], undefined>;
1156
+ /** Says why the section is empty when `status` is `absent`. */
1157
+ readonly note: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
1158
+ readonly documents: v.ArraySchema<v.ObjectSchema<{
1159
+ readonly title: v.StringSchema<undefined>;
1160
+ /** The document's canonical URL, so a reviewer can open the revision themselves. */
1161
+ readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1162
+ /** Which source it came from (`figma`, `notion`, an `upload`, …). */
1163
+ readonly origin: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
1164
+ /**
1165
+ * The verdict recorded by the LAST dispatch that read this document, which is the state the
1166
+ * run ended on. Absent means the deployment ran no freshness check at all, which is NOT the
1167
+ * same as an `unconfirmed` verdict: nobody asked, versus asked and could not tell.
1168
+ */
1169
+ readonly freshness: v.OptionalSchema<v.VariantSchema<"status", [v.ObjectSchema<{
1170
+ readonly status: v.LiteralSchema<"confirmed", undefined>;
1171
+ readonly version: v.StringSchema<undefined>;
1172
+ readonly change: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
1173
+ }, undefined>, v.ObjectSchema<{
1174
+ readonly status: v.LiteralSchema<"not-applicable", undefined>;
1175
+ }, undefined>, v.ObjectSchema<{
1176
+ readonly status: v.LiteralSchema<"unconfirmed", undefined>;
1177
+ readonly reason: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
1178
+ }, undefined>], undefined>, undefined>;
1179
+ /**
1180
+ * True when the run's own steps recorded more than one distinct revision of this document:
1181
+ * the source moved WHILE the run was in flight, so its earlier steps built against something
1182
+ * its later ones did not.
1183
+ *
1184
+ * Computed in code from the recorded verdicts, never asserted by a model, and reported
1185
+ * separately from the final revision because the two carry opposite reassurance: the last
1186
+ * revision alone says the run ended current, and says nothing about the coder step that
1187
+ * finished before the design changed under it.
1188
+ */
1189
+ readonly movedDuringRun: v.BooleanSchema<undefined>;
1190
+ }, undefined>, undefined>;
1191
+ }, undefined>;
1061
1192
  readonly ci: v.ObjectSchema<{
1062
1193
  readonly status: v.PicklistSchema<["reported", "absent"], undefined>;
1063
1194
  /** Says why the section is empty when `status` is `absent`. */
@@ -1 +1 @@
1
- {"version":3,"file":"pr-report.d.ts","sourceRoot":"","sources":["../src/pr-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SA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G;;YAEH;;;;;;;eAOG;;;;;YAoDH,+EAA+E;;YAE/E,2EAA2E;;YAE3E,uFAAuF;;YAEvF,yDAAyD;;YAEzD,2DAA2D;;YAE3D,qFAAqF;;gBAvDrF,oDAAoD;;gBAEpD,yEAAyE;;gBAEzE,mFAAmF;;gBAEnF;;;;;;;;;;;;mBAYG;;;YAuCH;;;;eAIG;;;QAmCH;;;;;;;;;WASG;;QAEH;;;;WAIG;;;;;;;;;;;;;;;;;;QA8FH,+DAA+D;;;YA/B/D,6EAA6E;;;YAG7E,8FAA8F;;YAE9F,+EAA+E;;;YAG/E,uFAAuF;;YAEvF,uCAAuC;;YAEvC,iFAAiF;;;;;;;YAEjF,yEAAyE;;;YAGzE,2CAA2C;;YAE3C;;;;eAIG;;;;;;;;;QArDH;;;;;;;;WAQG;;QAEH;;;;WAIG;;;IAgSH;;;;;;;;;OASG;;aAEH,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAE9E"}
package/dist/pr-report.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as v from 'valibot';
2
2
  import { mergeAssessmentSchema } from './merge.js';
3
3
  import { judgeDispositionSchema, judgeFindingSchema, judgeModelPinSchema } from './judge.js';
4
+ import { documentFreshnessSchema, documentOriginSchema } from './documents.js';
4
5
  import { requirementPrioritySchema, requirementStateSchema } from './spec.js';
5
6
  import { reproductionStatusSchema } from './reproduction.js';
6
7
  import { requirementVerdictStatusSchema, testEnvironmentSchema } from './testing.js';
@@ -37,7 +38,7 @@ import { vcsProviderSchema } from './routes/auth.js';
37
38
  * (see the header), so a bump means "there is more here than there was", and a consumer written
38
39
  * against an older number keeps reading the fields it knows.
39
40
  */
40
- export const PR_VERIFICATION_REPORT_VERSION = 8;
41
+ export const PR_VERIFICATION_REPORT_VERSION = 9;
41
42
  /**
42
43
  * How much of one captured command log the report carries, per command.
43
44
  *
@@ -592,6 +593,55 @@ export const prReportJudgesSchema = v.object({
592
593
  note: v.optional(v.nullable(v.string())),
593
594
  verdicts: v.array(prReportJudgeSchema),
594
595
  });
596
+ /**
597
+ * One linked document the run's agents built from, and what the platform could prove about how
598
+ * CURRENT the copy they read was.
599
+ *
600
+ * Every other section of this report answers "what did the run produce, and what checked it".
601
+ * This one answers the question underneath all of them: what was the run working FROM. A design
602
+ * under active iteration is where it bites, because a reviewer looking at a frontend PR has no
603
+ * way to tell an implementation that misreads the design from one that faithfully implements a
604
+ * revision the designer has since moved past. Those need opposite reactions and, without this,
605
+ * arrive looking identical.
606
+ *
607
+ * Composed from what each dispatch RECORDED (`step.contextDocuments`), never from a fresh probe:
608
+ * the source has moved on by compose time, so a re-probe would answer about a revision no agent
609
+ * on this run ever read, and the report would disagree with the run it describes.
610
+ */
611
+ export const prReportContextDocumentSchema = v.object({
612
+ title: v.string(),
613
+ /** The document's canonical URL, so a reviewer can open the revision themselves. */
614
+ url: v.nullable(v.string()),
615
+ /** Which source it came from (`figma`, `notion`, an `upload`, …). */
616
+ origin: documentOriginSchema,
617
+ /**
618
+ * The verdict recorded by the LAST dispatch that read this document, which is the state the
619
+ * run ended on. Absent means the deployment ran no freshness check at all, which is NOT the
620
+ * same as an `unconfirmed` verdict: nobody asked, versus asked and could not tell.
621
+ */
622
+ freshness: v.optional(documentFreshnessSchema),
623
+ /**
624
+ * True when the run's own steps recorded more than one distinct revision of this document:
625
+ * the source moved WHILE the run was in flight, so its earlier steps built against something
626
+ * its later ones did not.
627
+ *
628
+ * Computed in code from the recorded verdicts, never asserted by a model, and reported
629
+ * separately from the final revision because the two carry opposite reassurance: the last
630
+ * revision alone says the run ended current, and says nothing about the coder step that
631
+ * finished before the design changed under it.
632
+ */
633
+ movedDuringRun: v.boolean(),
634
+ });
635
+ /**
636
+ * The documents the run built from. `absent` when no step recorded one, which covers the
637
+ * ordinary task carrying no attachment and no document link in its description.
638
+ */
639
+ export const prReportContextSchema = v.object({
640
+ status: prReportSectionStatusSchema,
641
+ /** Says why the section is empty when `status` is `absent`. */
642
+ note: v.optional(v.nullable(v.string())),
643
+ documents: v.array(prReportContextDocumentSchema),
644
+ });
595
645
  /**
596
646
  * One spec requirement joined to what the Tester observed about it — the report's
597
647
  * REQUIREMENT → EVIDENCE row.
@@ -753,6 +803,8 @@ export const prVerificationReportSchema = v.object({
753
803
  */
754
804
  scope: v.optional(prReportScopeSchema),
755
805
  run: prReportRunSchema,
806
+ /** What the run built FROM: the linked documents its agents read, at which revision. */
807
+ context: prReportContextSchema,
756
808
  ci: prReportCiSchema,
757
809
  /** The platform's OWN run of the service's check commands against the pushed tree. */
758
810
  validation: prReportValidationSchema,