@mossbear/protocol 0.1.0-alpha.29 → 0.1.0-alpha.31

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/dist/schemas.d.ts CHANGED
@@ -423,10 +423,10 @@ export declare const CreateBundleResponseSchema: v.ObjectSchema<{
423
423
  readonly createdAt: v.StringSchema<undefined>;
424
424
  }, undefined>;
425
425
  }, undefined>;
426
- export declare const BundleMemberTypeSchema: v.PicklistSchema<["guide_file", "guide"], undefined>;
426
+ export declare const BundleMemberTypeSchema: v.PicklistSchema<readonly ["guide_file", "guide"], undefined>;
427
427
  export declare const AttachBundleMemberRequestSchema: v.ObjectSchema<{
428
428
  readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
429
- readonly itemType: v.OptionalSchema<v.PicklistSchema<["guide_file", "guide"], undefined>, undefined>;
429
+ readonly itemType: v.OptionalSchema<v.PicklistSchema<readonly ["guide_file", "guide"], undefined>, undefined>;
430
430
  }, undefined>;
431
431
  export declare const AttachBundleMemberResponseSchema: v.ObjectSchema<{
432
432
  readonly attached: v.BooleanSchema<undefined>;
@@ -448,14 +448,14 @@ export declare const RenameBundleResponseSchema: v.ObjectSchema<{
448
448
  export declare const DeleteBundleResponseSchema: v.ObjectSchema<{
449
449
  readonly deleted: v.BooleanSchema<undefined>;
450
450
  }, undefined>;
451
- export declare const ContextItemTypeSchema: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
452
- export declare const PushContentTypeSchema: v.PicklistSchema<["document", "reference", "asset"], undefined>;
453
- export declare const InboxContentTypeSchema: v.PicklistSchema<["document", "asset"], undefined>;
451
+ export declare const ContextItemTypeSchema: v.PicklistSchema<string[], undefined>;
452
+ export declare const PushContentTypeSchema: v.PicklistSchema<("document" | "reference" | "asset")[], undefined>;
453
+ export declare const InboxContentTypeSchema: v.PicklistSchema<("document" | "reference" | "asset")[], undefined>;
454
454
  /** Max serialized size (UTF-8 bytes) of a pushed or captured item's content. */
455
455
  export declare const MAX_CONTEXT_CONTENT_BYTES: number;
456
456
  export declare const ContextItemSchema: v.ObjectSchema<{
457
457
  readonly id: v.StringSchema<undefined>;
458
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
458
+ readonly type: v.PicklistSchema<string[], undefined>;
459
459
  readonly name: v.StringSchema<undefined>;
460
460
  readonly contentType: v.StringSchema<undefined>;
461
461
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -468,7 +468,7 @@ export declare const ContextItemSchema: v.ObjectSchema<{
468
468
  export declare const ContextItemsResponseSchema: v.ObjectSchema<{
469
469
  readonly items: v.ArraySchema<v.ObjectSchema<{
470
470
  readonly id: v.StringSchema<undefined>;
471
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
471
+ readonly type: v.PicklistSchema<string[], undefined>;
472
472
  readonly name: v.StringSchema<undefined>;
473
473
  readonly contentType: v.StringSchema<undefined>;
474
474
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -491,7 +491,7 @@ export declare const SourceItemIdsSchema: v.SchemaWithPipe<readonly [v.ArraySche
491
491
  export declare const UpdatableSourceItemIdsSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>;
492
492
  export declare const PushContextRequestSchema: v.ObjectSchema<{
493
493
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
494
- readonly contentType: v.PicklistSchema<["document", "reference", "asset"], undefined>;
494
+ readonly contentType: v.PicklistSchema<("document" | "reference" | "asset")[], undefined>;
495
495
  readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "content must be at most 262144 bytes">]>;
496
496
  readonly itemId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
497
497
  readonly origin: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
@@ -501,7 +501,7 @@ export declare const PushContextRequestSchema: v.ObjectSchema<{
501
501
  export declare const PushContextResponseSchema: v.ObjectSchema<{
502
502
  readonly item: v.ObjectSchema<{
503
503
  readonly id: v.StringSchema<undefined>;
504
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
504
+ readonly type: v.PicklistSchema<string[], undefined>;
505
505
  readonly name: v.StringSchema<undefined>;
506
506
  readonly contentType: v.StringSchema<undefined>;
507
507
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -523,7 +523,7 @@ export declare const UpdateContextItemRequestSchema: v.ObjectSchema<{
523
523
  export declare const UpdateContextItemResponseSchema: v.ObjectSchema<{
524
524
  readonly item: v.ObjectSchema<{
525
525
  readonly id: v.StringSchema<undefined>;
526
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
526
+ readonly type: v.PicklistSchema<string[], undefined>;
527
527
  readonly name: v.StringSchema<undefined>;
528
528
  readonly contentType: v.StringSchema<undefined>;
529
529
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -541,7 +541,7 @@ export declare const UpdateContextItemBodySchema: Omit<v.ObjectSchema<{
541
541
  readonly content: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "content must be at most 524288 bytes">]>, undefined>;
542
542
  readonly expectedVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
543
543
  readonly sourceItemIds: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.MaxLengthAction<string[], 100, undefined>]>, undefined>;
544
- }, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
544
+ }, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
545
545
  readonly entries: Omit<{
546
546
  readonly itemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
547
547
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -586,7 +586,7 @@ export declare const UpdateContextItemBodySchema: Omit<v.ObjectSchema<{
586
586
  export declare const ContextItemResponseSchema: v.ObjectSchema<{
587
587
  readonly item: v.ObjectSchema<{
588
588
  readonly id: v.StringSchema<undefined>;
589
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
589
+ readonly type: v.PicklistSchema<string[], undefined>;
590
590
  readonly name: v.StringSchema<undefined>;
591
591
  readonly contentType: v.StringSchema<undefined>;
592
592
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -601,7 +601,7 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
601
601
  readonly archived: v.BooleanSchema<undefined>;
602
602
  readonly item: v.ObjectSchema<{
603
603
  readonly id: v.StringSchema<undefined>;
604
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
604
+ readonly type: v.PicklistSchema<string[], undefined>;
605
605
  readonly name: v.StringSchema<undefined>;
606
606
  readonly contentType: v.StringSchema<undefined>;
607
607
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -613,14 +613,14 @@ export declare const ArchiveContextItemResponseSchema: v.ObjectSchema<{
613
613
  }, undefined>;
614
614
  }, undefined>;
615
615
  export declare const InboxCaptureRequestSchema: v.ObjectSchema<{
616
- readonly contentType: v.PicklistSchema<["document", "asset"], undefined>;
616
+ readonly contentType: v.PicklistSchema<("document" | "reference" | "asset")[], undefined>;
617
617
  readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "content must be at most 262144 bytes">]>;
618
618
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
619
619
  readonly source: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
620
620
  }, undefined>;
621
621
  export declare const InboxItemSchema: v.ObjectSchema<{
622
622
  readonly id: v.StringSchema<undefined>;
623
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
623
+ readonly type: v.PicklistSchema<string[], undefined>;
624
624
  readonly name: v.StringSchema<undefined>;
625
625
  readonly contentType: v.StringSchema<undefined>;
626
626
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -632,7 +632,7 @@ export declare const InboxItemSchema: v.ObjectSchema<{
632
632
  export declare const InboxCaptureResponseSchema: v.ObjectSchema<{
633
633
  readonly item: v.ObjectSchema<{
634
634
  readonly id: v.StringSchema<undefined>;
635
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
635
+ readonly type: v.PicklistSchema<string[], undefined>;
636
636
  readonly name: v.StringSchema<undefined>;
637
637
  readonly contentType: v.StringSchema<undefined>;
638
638
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -645,7 +645,7 @@ export declare const InboxCaptureResponseSchema: v.ObjectSchema<{
645
645
  export declare const InboxListResponseSchema: v.ObjectSchema<{
646
646
  readonly items: v.ArraySchema<v.ObjectSchema<{
647
647
  readonly id: v.StringSchema<undefined>;
648
- readonly type: v.PicklistSchema<["guide", "document", "reference", "asset"], undefined>;
648
+ readonly type: v.PicklistSchema<string[], undefined>;
649
649
  readonly name: v.StringSchema<undefined>;
650
650
  readonly contentType: v.StringSchema<undefined>;
651
651
  readonly content: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -947,22 +947,6 @@ export declare const DashboardSyncActionSchema: v.ObjectSchema<{
947
947
  */
948
948
  readonly assistantText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, undefined>;
949
949
  }, undefined>, undefined>;
950
- /**
951
- * Version of the CLI that *produced* this action's verdict.
952
- *
953
- * **No shipped CLI sends this any more.** Its only writer was `mossbear verdict
954
- * record`, whose queue files could outlive an upgrade, which is why the
955
- * per-action version was distinguished from the request-level one at all.
956
- * That command is gone (docs/plans/cli-local-grading-removal-plan.md) and no
957
- * client-side verdict exists to attribute.
958
- *
959
- * Kept on the wire for one release so an un-upgraded CLI's queued verdicts
960
- * are not rejected mid-migration; the field and the `actions.cli_version`
961
- * column it feeds are dropped together (`action-cli-version-column-drop`).
962
- * For the CLI making the request — which is live, and what
963
- * `enforceCliVersionFloor` reads — see `DashboardSyncRequestSchema`.
964
- */
965
- readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
966
950
  }, undefined>;
967
951
  export declare const DashboardGuideSuggestionSchema: v.ObjectSchema<{
968
952
  readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1048,6 +1032,95 @@ export declare const RuleFileManifestSchema: v.ObjectSchema<{
1048
1032
  */
1049
1033
  readonly truncated: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1050
1034
  }, undefined>;
1035
+ /**
1036
+ * Where the checkout stood when a run closed — the git head the `SessionEnd`
1037
+ * hook observed, and the branch it was on.
1038
+ *
1039
+ * The join the ledger has never had. Every existing query walks run → what
1040
+ * happened; nothing walks commit → which run, because until this field no
1041
+ * commit, branch or PR identifier existed anywhere in the pipeline
1042
+ * (docs/plans/run-commit-anchor-plan.md). An anchor also cannot be backfilled:
1043
+ * a run that closes without one is unanchorable forever, which is why it is
1044
+ * captured before its first reader exists.
1045
+ *
1046
+ * Absence is an ordinary answer rather than a failure to report. A session runs
1047
+ * outside a git repo; git is missing, or slow enough that the capture's own
1048
+ * timeout fires — the field is then simply not sent, and the run's columns stay
1049
+ * null. A checkout on a detached head sends an anchor with a null `branch`.
1050
+ * None of it says anything to the user: a run that produced no identifiable
1051
+ * commit is a normal run, and the CLI has nothing to offer them about it.
1052
+ *
1053
+ * There is deliberately no `prNumber` here. It is the one part of the anchor
1054
+ * that is not free: no environment variable in a real cloud agent session names
1055
+ * a PR (checked 2026-08-22 — see the spec's Open questions), so a wire field
1056
+ * for it would be protocol surface no producer ever fills. `runs.pr_number`
1057
+ * exists as a reserved column; the wire waits for a mechanism.
1058
+ *
1059
+ * Not a per-action field and not a per-session map: it describes the machine
1060
+ * and the checkout at one instant, the way `RuleFileManifestSchema` does, and
1061
+ * applies to whichever runs the request closes.
1062
+ */
1063
+ export declare const CommitAnchorSchema: v.ObjectSchema<{
1064
+ /**
1065
+ * `git rev-parse HEAD`. Full 40-hex only — an abbreviated sha is ambiguous
1066
+ * across repos and would make the reverse index it feeds silently lossy.
1067
+ *
1068
+ * Required *within* the object, while the object itself is optional. The two
1069
+ * together say the one thing worth saying: an anchor exists exactly when a
1070
+ * head was observed. A nullable `headSha` would add a third state — "an
1071
+ * anchor, but of nothing" — that no caller can produce (the only checkout
1072
+ * with a branch and no head is one with no commits, where both probes fail)
1073
+ * and every reader would still have to handle.
1074
+ */
1075
+ readonly headSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1076
+ /**
1077
+ * The branch name, or null on a detached head — which is a real state a
1078
+ * bisect or a CI checkout sits in, not an error. Capped so a pathological
1079
+ * ref name cannot widen the payload.
1080
+ */
1081
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1082
+ }, undefined>;
1083
+ /**
1084
+ * The agent's closing account of the run — the prose of the session's final
1085
+ * assistant message (docs/plans/claim-vs-actual-discrepancy-plan.md, slice 1).
1086
+ *
1087
+ * **The same content class as narration, so it is literally the same schema**
1088
+ * rather than a twin of it: produced by the same client-side pipeline (text
1089
+ * blocks only → strip code structurally → redact prose → bound), carrying the
1090
+ * same guarantees, capped at the same `MAX_ACTION_NARRATION_CHARS`, and
1091
+ * rejected on the same line-initial fence. A separate declaration with the same
1092
+ * body would be two homes for one rule and would drift the first time either
1093
+ * moved. What differs is *which* prose and how much of it — the client's
1094
+ * concern, decided in `extractRunSelfReport`, not the wire's.
1095
+ *
1096
+ * `minLength(1)` because absence has exactly one representation here: a run
1097
+ * with nothing to report omits the field. An empty string would be a second
1098
+ * spelling of null that every reader would then have to handle.
1099
+ *
1100
+ * **It names its session, and that is not decoration.** This is where the
1101
+ * report parts company with `CommitAnchorSchema`, which carries no session id
1102
+ * and is right not to: an anchor describes the *checkout*, so it applies to
1103
+ * whichever runs a request closes. A self-report describes the work of exactly
1104
+ * one session. A request can close more than one — `buildSyncBatches` marks
1105
+ * every session in the upload's actions completed when `sessionComplete` is set
1106
+ * (`packages/cli/src/sync-batches.ts:118-126`), which a `SessionEnd` sync hits
1107
+ * whenever an earlier session's `Stop` sync failed and left a backlog. Without
1108
+ * the id the server would write one session's closing summary onto the other
1109
+ * session's run, and slice 2 would then grade a run's actions against a report
1110
+ * of different work: a confidently wrong finding, which this pipeline ranks
1111
+ * below having none at all (`packages/cli/src/transcript/narration.ts:1-20`).
1112
+ *
1113
+ * The id makes the server the enforcement point rather than the client. A CLI
1114
+ * that attaches the report to the wrong batch cannot misattribute it, because
1115
+ * the writer matches on this field instead of trusting placement.
1116
+ */
1117
+ export declare const RunSelfReportSchema: v.ObjectSchema<{
1118
+ /** The session whose closing message this is. Must be one the request closes. */
1119
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1120
+ /** The report itself — same content class and cap as narration. */
1121
+ readonly text: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, v.MinLengthAction<string, 1, undefined>]>;
1122
+ }, undefined>;
1123
+ export type RunSelfReport = v.InferOutput<typeof RunSelfReportSchema>;
1051
1124
  export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1052
1125
  readonly actions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1053
1126
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, "id must not contain whitespace or control characters">]>, undefined>;
@@ -1115,22 +1188,6 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1115
1188
  */
1116
1189
  readonly assistantText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, undefined>;
1117
1190
  }, undefined>, undefined>;
1118
- /**
1119
- * Version of the CLI that *produced* this action's verdict.
1120
- *
1121
- * **No shipped CLI sends this any more.** Its only writer was `mossbear verdict
1122
- * record`, whose queue files could outlive an upgrade, which is why the
1123
- * per-action version was distinguished from the request-level one at all.
1124
- * That command is gone (docs/plans/cli-local-grading-removal-plan.md) and no
1125
- * client-side verdict exists to attribute.
1126
- *
1127
- * Kept on the wire for one release so an un-upgraded CLI's queued verdicts
1128
- * are not rejected mid-migration; the field and the `actions.cli_version`
1129
- * column it feeds are dropped together (`action-cli-version-column-drop`).
1130
- * For the CLI making the request — which is live, and what
1131
- * `enforceCliVersionFloor` reads — see `DashboardSyncRequestSchema`.
1132
- */
1133
- readonly cliVersion: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>;
1134
1191
  }, undefined>, undefined>, v.MaxLengthAction<{
1135
1192
  id?: string | undefined;
1136
1193
  adapterId?: string | undefined;
@@ -1151,7 +1208,6 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1151
1208
  userText?: string | undefined;
1152
1209
  assistantText?: string | undefined;
1153
1210
  } | undefined;
1154
- cliVersion?: string | undefined;
1155
1211
  }[], 500, undefined>]>, undefined>;
1156
1212
  readonly guideSuggestions: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
1157
1213
  readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -1234,10 +1290,11 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1234
1290
  }[];
1235
1291
  }[], 100, undefined>]>, undefined>;
1236
1292
  /**
1237
- * Version of the CLI making *this request* — the live one, and the only
1238
- * `cliVersion` a shipped CLI still sends (the per-action field is a
1239
- * migration leftover; see `DashboardSyncActionSchema`). It sits on the
1240
- * envelope because the server reads it before touching any row, to
1293
+ * Version of the CLI making *this request* — the only `cliVersion` on the
1294
+ * wire. (A per-action one existed until `action-cli-version-column-drop`; it
1295
+ * attributed a verdict to the CLI that produced it, which no CLI does any
1296
+ * more.) It sits on the envelope because the server reads it before touching
1297
+ * any row, to
1241
1298
  * compare against its version floor and reject an incompatible client with
1242
1299
  * 426 rather than half-ingesting the batch. Optional: clients predating this
1243
1300
  * field send none, and are never blocked for it.
@@ -1296,6 +1353,62 @@ export declare const DashboardSyncRequestSchema: v.ObjectSchema<{
1296
1353
  */
1297
1354
  readonly truncated: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
1298
1355
  }, undefined>, undefined>;
1356
+ /**
1357
+ * Where the checkout stood when this request's `completedSessionIds` closed —
1358
+ * see {@link CommitAnchorSchema}.
1359
+ *
1360
+ * Rides only the batches that name a completed session, which is the opposite
1361
+ * of `ruleManifest`'s placement rule and deliberately so. The ordinary
1362
+ * `SessionEnd` request carries **no actions at all** — the preceding `Stop`
1363
+ * hook synced and advanced the run-log cursor — so a field attached to
1364
+ * action-carrying batches would be absent from exactly the request that
1365
+ * exists to report the close.
1366
+ *
1367
+ * Optional, and an absent anchor is never an error: a CLI predating this
1368
+ * sends none, and the server must read its absence as "no head observed"
1369
+ * rather than refusing the close.
1370
+ */
1371
+ readonly commitAnchor: v.OptionalSchema<v.ObjectSchema<{
1372
+ /**
1373
+ * `git rev-parse HEAD`. Full 40-hex only — an abbreviated sha is ambiguous
1374
+ * across repos and would make the reverse index it feeds silently lossy.
1375
+ *
1376
+ * Required *within* the object, while the object itself is optional. The two
1377
+ * together say the one thing worth saying: an anchor exists exactly when a
1378
+ * head was observed. A nullable `headSha` would add a third state — "an
1379
+ * anchor, but of nothing" — that no caller can produce (the only checkout
1380
+ * with a branch and no head is one with no commits, where both probes fail)
1381
+ * and every reader would still have to handle.
1382
+ */
1383
+ readonly headSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1384
+ /**
1385
+ * The branch name, or null on a detached head — which is a real state a
1386
+ * bisect or a CI checkout sits in, not an error. Capped so a pathological
1387
+ * ref name cannot widen the payload.
1388
+ */
1389
+ readonly branch: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
1390
+ }, undefined>, undefined>;
1391
+ /**
1392
+ * What the agent said it did, as its own closing message — see
1393
+ * {@link RunSelfReportSchema}.
1394
+ *
1395
+ * Rides the same batches as `commitAnchor` and for the same reason: it
1396
+ * describes the *session that just ended*, and the ordinary `SessionEnd`
1397
+ * request carries no actions to attach it to. The server writes it onto the
1398
+ * runs this request closes.
1399
+ *
1400
+ * Optional, and its absence is never an error or a finding. A CLI predating
1401
+ * this sends none; so does a session with no transcript, one whose repo has
1402
+ * narration switched off, and one that ended without the agent speaking. All
1403
+ * of them are ordinary runs, and nothing downstream distinguishes them —
1404
+ * "could not compare" is not a verdict and renders nothing.
1405
+ */
1406
+ readonly selfReport: v.OptionalSchema<v.ObjectSchema<{
1407
+ /** The session whose closing message this is. Must be one the request closes. */
1408
+ readonly sessionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1409
+ /** The report itself — same content class and cap as narration. */
1410
+ readonly text: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>, v.CheckAction<string, "narration must not contain a code block — code is stripped structurally on the client before upload">]>, v.MinLengthAction<string, 1, undefined>]>;
1411
+ }, undefined>, undefined>;
1299
1412
  }, undefined>;
1300
1413
  export declare const ExtractedGuideSuggestionSchema: v.ObjectSchema<{
1301
1414
  readonly id: v.StringSchema<undefined>;
@@ -1459,6 +1572,513 @@ declare const KNOWN_ACTION_TYPES: readonly ["file_edit", "file_read", "shell_com
1459
1572
  export type KnownActionType = (typeof KNOWN_ACTION_TYPES)[number];
1460
1573
  /** True when `value` is one of the action types the CLI produces on purpose. */
1461
1574
  export declare function isKnownActionType(value: string): value is KnownActionType;
1575
+ /**
1576
+ * The read an agent makes of a guide's own grading record, so the improvement
1577
+ * loop the user already runs in-conversation ("what could be improved in this
1578
+ * skill?") has the evidence Mossbear holds and the agent does not.
1579
+ *
1580
+ * **Evidence out, never instructions out.** Nothing in this contract carries a
1581
+ * directive to change anything, and nothing on the server writes as a result of
1582
+ * it. It is a read, and the decision stays in the user's conversation
1583
+ * (`docs/plans/guide-history-for-agents-plan.md` → Boundaries).
1584
+ */
1585
+ /**
1586
+ * How the agent names the guide.
1587
+ *
1588
+ * Either a repo-relative path exactly as the guide file declares it
1589
+ * (`.claude/skills/reviewer/SKILL.md`, `AGENTS.md`), or the bare name of a
1590
+ * skill (`reviewer`), which the server expands to the skill layouts it knows.
1591
+ * Both resolve through the `(root, path)` identity import already reconciles
1592
+ * on, rather than a second one invented here.
1593
+ *
1594
+ * Bounded and shape-checked at the boundary rather than at the query string: it
1595
+ * reaches a SQL predicate, and an identifier is not free text.
1596
+ */
1597
+ export declare const GuideHistoryIdentifierSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "guide must not contain control characters">]>;
1598
+ /**
1599
+ * The request an agent sends.
1600
+ *
1601
+ * `root` is optional and is the disambiguator, not decoration: `.claude/skills`
1602
+ * is scanned under **both** discovery roots
1603
+ * (`packages/cli/src/rules/discover.ts:101,105`), so a project skill and its
1604
+ * `~/.claude/skills` twin declare the same path string. When the identifier
1605
+ * reaches guides under more than one root and no root was given, the server
1606
+ * refuses and names both rather than picking one — answering a question about
1607
+ * the wrong file's history is worse than not answering it.
1608
+ */
1609
+ export declare const GuideHistoryRequestSchema: v.ObjectSchema<{
1610
+ readonly guide: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "guide must not contain control characters">]>;
1611
+ readonly root: v.OptionalSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>;
1612
+ /**
1613
+ * Which repo's copy — **the axis import itself reconciles on**, and the one
1614
+ * that actually resolves the common collision.
1615
+ *
1616
+ * `root` alone does not, and assuming it did was the first version's defect:
1617
+ * import's resolution key is `(userId, repoId, root, path)` and two files at
1618
+ * one path under different repos deliberately stay two rows
1619
+ * (`apps/dashboard/app/api/rules/import+api.ts:170-171`, Decision 6). So any
1620
+ * user with two repos has two guides at `(project, AGENTS.md)`, and a refusal
1621
+ * telling them to pass `root` names the one field that cannot separate those.
1622
+ *
1623
+ * `projectId` is the portable identity a repo commits and every clone agrees
1624
+ * on; `repoId` is the machine-local digest. Both are optional and both are
1625
+ * what the caller already sends at import time, so an agent running inside a
1626
+ * repo supplies them without being asked.
1627
+ */
1628
+ readonly projectId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
1629
+ readonly repoId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
1630
+ /**
1631
+ * The exact guide, when the caller has already been shown the candidates.
1632
+ *
1633
+ * The escape hatch that makes the refusal always satisfiable: two repos can
1634
+ * be indistinguishable to a caller that knows neither id (a guide imported
1635
+ * before repo identity was recorded carries neither), and an error whose
1636
+ * remedy cannot be carried out is worse than no remedy at all. The 409 names
1637
+ * this id for every candidate.
1638
+ */
1639
+ readonly guideId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
1640
+ }, undefined>;
1641
+ export type GuideHistoryRequest = v.InferOutput<typeof GuideHistoryRequestSchema>;
1642
+ /**
1643
+ * One revision of a guide's wording: the body file and the version it stood at.
1644
+ *
1645
+ * The pair, never a bare version number — `guide_files.version` restarts at 1
1646
+ * per row, so a number alone compares equal across two different files
1647
+ * (`apps/dashboard/src/lib/guides/guideRevision.ts`).
1648
+ */
1649
+ export declare const GuideHistoryRevisionSchema: v.ObjectSchema<{
1650
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1651
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1652
+ }, undefined>;
1653
+ export type GuideHistoryRevision = v.InferOutput<typeof GuideHistoryRevisionSchema>;
1654
+ /**
1655
+ * Which of three states the guide's record is in — a required field rather than
1656
+ * something a reader infers from empty arrays.
1657
+ *
1658
+ * The distinction is the whole point of returning it: `unevaluated` means no
1659
+ * graded run has ever produced a verdict, while `awaiting_current_revision`
1660
+ * means the guide has a real record that is entirely about wording the user has
1661
+ * since rewritten. Collapsing those two onto "no data" is exactly the claim the
1662
+ * dashboard stopped making (`guidePerformance.ts` → `isAwaitingCurrentRevision`),
1663
+ * and an agent reading an absence as a verdict is the same error one screen
1664
+ * further out.
1665
+ */
1666
+ export declare const GuideHistoryStateSchema: v.PicklistSchema<["evaluated", "awaiting_current_revision", "unevaluated"], undefined>;
1667
+ export type GuideHistoryState = v.InferOutput<typeof GuideHistoryStateSchema>;
1668
+ /**
1669
+ * The verdict window, scoped to the revision named beside it.
1670
+ *
1671
+ * Both denominators travel: `applicable` is the rate's own denominator
1672
+ * (`aligned + misaligned`), `total` is the window's row count including the runs
1673
+ * that never engaged the guide. Rendering one as the other is the defect
1674
+ * `alignment-rate-sample-disclosure` was filed for, and a payload carrying only
1675
+ * one of them would hand an agent the same mistake.
1676
+ */
1677
+ export declare const GuideHistoryWindowSchema: v.ObjectSchema<{
1678
+ /** Rows summarized, after the revision narrow. */
1679
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1680
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1681
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1682
+ /** In context, never engaged. Neither a pass nor a failure. */
1683
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1684
+ /** `aligned + misaligned` — the rate's own denominator. */
1685
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1686
+ /** `aligned / applicable`, or **null when no run engaged the guide**. */
1687
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1688
+ /** The rows hit the per-guide cap: a bounded window, never a lifetime total. */
1689
+ readonly isWindowed: v.BooleanSchema<undefined>;
1690
+ /** The cap the rows were fetched under, so a reader can say what "windowed" means. */
1691
+ readonly windowSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1692
+ /**
1693
+ * Verdicts fetched and then dropped by the revision narrow — about wording
1694
+ * that is no longer current, or citing no revision at all. A **floor** rather
1695
+ * than a total whenever `isWindowed`, because rows past the cap were never
1696
+ * fetched.
1697
+ */
1698
+ readonly olderRevisionRows: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1699
+ /**
1700
+ * `applicable` is too small for the percentage to mean anything — threshold
1701
+ * `applicable < 3` (founder, 2026-08-22,
1702
+ * `docs/plans/alignment-rate-sample-disclosure-plan.md` → Resolved). Read the
1703
+ * counts, not the rate.
1704
+ */
1705
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1706
+ }, undefined>;
1707
+ export type GuideHistoryWindow = v.InferOutput<typeof GuideHistoryWindowSchema>;
1708
+ /**
1709
+ * One side of a guide edit's before/after pair — the wording, and what the runs
1710
+ * that engaged it did.
1711
+ *
1712
+ * Structurally a window like `GuideHistoryWindow` and deliberately not that
1713
+ * schema: these two sides are bounded **per revision** by a different query
1714
+ * (`apps/dashboard/src/server/guides/revisionWindows.ts`), so `isSaturated` is
1715
+ * the server's own measurement of its partition rather than the client-side
1716
+ * `isWindowed` inference, and the span each side covers is part of what makes
1717
+ * the pair readable.
1718
+ *
1719
+ * Both denominators travel here for the same reason they travel on the window:
1720
+ * a delta between two undisclosed denominators is worse than no number at all.
1721
+ */
1722
+ export declare const GuideHistoryChangeSideSchema: v.ObjectSchema<{
1723
+ /** The wording this side judges. */
1724
+ readonly revision: v.ObjectSchema<{
1725
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1726
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1727
+ }, undefined>;
1728
+ /** Rows in this side's window, including the runs that never engaged it. */
1729
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1730
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1731
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1732
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1733
+ /** `aligned + misaligned` — this side's own denominator. */
1734
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1735
+ /** `aligned / applicable`, or null when no run engaged this wording. */
1736
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1737
+ /** This side is below the sample floor, so read its counts and not its rate. */
1738
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1739
+ /**
1740
+ * This side is a bounded sample of its revision rather than the whole record.
1741
+ * A saturated side beside an unsaturated one is two different kinds of
1742
+ * number, and comparing them without saying so is the defect the flag exists
1743
+ * to stop.
1744
+ */
1745
+ readonly isSaturated: v.BooleanSchema<undefined>;
1746
+ /** The span this side covers, ISO. Both null on a side with no rows. */
1747
+ readonly newestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1748
+ readonly oldestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1749
+ }, undefined>;
1750
+ export type GuideHistoryChangeSide = v.InferOutput<typeof GuideHistoryChangeSideSchema>;
1751
+ /**
1752
+ * Which side is too thin for a delta to mean anything.
1753
+ *
1754
+ * Named rather than a boolean because the two take different sentences: too few
1755
+ * runs *since* the change is the ordinary state right after an edit, while too
1756
+ * few *before* it means there was never a baseline to compare against.
1757
+ */
1758
+ export declare const GuideHistoryChangeSuppressionSchema: v.PicklistSchema<["since", "before", "both"], undefined>;
1759
+ /**
1760
+ * Which way the pair points, or null while the delta is withheld.
1761
+ *
1762
+ * A reading of a *set* of runs, never a verdict on one — the vocabulary
1763
+ * `aligned | misaligned | not_applicable` is untouched, and nothing derived
1764
+ * here is written back to a row.
1765
+ */
1766
+ export declare const GuideHistoryChangeDirectionSchema: v.PicklistSchema<["improved", "regressed", "unchanged"], undefined>;
1767
+ /**
1768
+ * The guide's last edit, read as two windows
1769
+ * (`insight-to-proven-change` §A, surfaced by `guide-history-for-agents`
1770
+ * deliverable 3).
1771
+ *
1772
+ * > Changed 12 Aug. Before: misaligned in 6 of 8 runs that engaged it.
1773
+ * > Since: 0 of 11.
1774
+ *
1775
+ * **Null on the response is a state, not a missing field.** It means this guide
1776
+ * has no earlier wording that produced evidence — a guide on its first
1777
+ * revision, which is the normal state and not an error.
1778
+ *
1779
+ * **Paired, never merged**, and **never causal**: this states two windows and
1780
+ * their denominators and stops. The model changed, the task mix changed and the
1781
+ * codebase changed too, so "since" is the strongest word the evidence supports.
1782
+ */
1783
+ export declare const GuideHistoryChangeSchema: v.ObjectSchema<{
1784
+ /** The revision that preceded the change. */
1785
+ readonly before: v.ObjectSchema<{
1786
+ /** The wording this side judges. */
1787
+ readonly revision: v.ObjectSchema<{
1788
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1789
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1790
+ }, undefined>;
1791
+ /** Rows in this side's window, including the runs that never engaged it. */
1792
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1793
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1794
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1795
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1796
+ /** `aligned + misaligned` — this side's own denominator. */
1797
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1798
+ /** `aligned / applicable`, or null when no run engaged this wording. */
1799
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1800
+ /** This side is below the sample floor, so read its counts and not its rate. */
1801
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1802
+ /**
1803
+ * This side is a bounded sample of its revision rather than the whole record.
1804
+ * A saturated side beside an unsaturated one is two different kinds of
1805
+ * number, and comparing them without saying so is the defect the flag exists
1806
+ * to stop.
1807
+ */
1808
+ readonly isSaturated: v.BooleanSchema<undefined>;
1809
+ /** The span this side covers, ISO. Both null on a side with no rows. */
1810
+ readonly newestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1811
+ readonly oldestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1812
+ }, undefined>;
1813
+ /** The wording the guide stands at now. */
1814
+ readonly since: v.ObjectSchema<{
1815
+ /** The wording this side judges. */
1816
+ readonly revision: v.ObjectSchema<{
1817
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1818
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1819
+ }, undefined>;
1820
+ /** Rows in this side's window, including the runs that never engaged it. */
1821
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1822
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1823
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1824
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1825
+ /** `aligned + misaligned` — this side's own denominator. */
1826
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1827
+ /** `aligned / applicable`, or null when no run engaged this wording. */
1828
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1829
+ /** This side is below the sample floor, so read its counts and not its rate. */
1830
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1831
+ /**
1832
+ * This side is a bounded sample of its revision rather than the whole record.
1833
+ * A saturated side beside an unsaturated one is two different kinds of
1834
+ * number, and comparing them without saying so is the defect the flag exists
1835
+ * to stop.
1836
+ */
1837
+ readonly isSaturated: v.BooleanSchema<undefined>;
1838
+ /** The span this side covers, ISO. Both null on a side with no rows. */
1839
+ readonly newestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1840
+ readonly oldestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1841
+ }, undefined>;
1842
+ /**
1843
+ * `since` minus `before`, in `[-1, 1]`, or **null whenever the pair is
1844
+ * suppressed** or either side never engaged the guide. Null is not zero: one
1845
+ * says the evidence does not support a number, the other would be a claim.
1846
+ */
1847
+ readonly alignmentRateDelta: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1848
+ /**
1849
+ * Which side is below the sample floor, or null when neither is and the delta
1850
+ * stands. `'since'` is the ordinary post-edit state — *not enough runs since
1851
+ * this change* — and is reported rather than omitted.
1852
+ */
1853
+ readonly suppressedBy: v.NullableSchema<v.PicklistSchema<["since", "before", "both"], undefined>, undefined>;
1854
+ /** The delta's sign, or null while it is withheld. `unchanged` is exactly zero. */
1855
+ readonly direction: v.NullableSchema<v.PicklistSchema<["improved", "regressed", "unchanged"], undefined>, undefined>;
1856
+ /** Either side is a bounded sample, so neither is a lifetime total. */
1857
+ readonly isWindowed: v.BooleanSchema<undefined>;
1858
+ /** The per-revision cap each side was bounded by, so "sample" has a size. */
1859
+ readonly windowSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1860
+ /**
1861
+ * When the current wording was recorded, ISO — the boundary between the two
1862
+ * windows, and null when no version row carries it.
1863
+ *
1864
+ * A date, never an attribution: it says when the window opened, not that the
1865
+ * edit caused what happened inside it.
1866
+ */
1867
+ readonly changedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1868
+ }, undefined>;
1869
+ export type GuideHistoryChange = v.InferOutput<typeof GuideHistoryChangeSchema>;
1870
+ /** Findings returned per response, and the character bound on each reasoning. */
1871
+ export declare const MAX_GUIDE_HISTORY_FINDINGS = 5;
1872
+ export declare const MAX_GUIDE_HISTORY_REASONING_CHARS = 1200;
1873
+ /**
1874
+ * One recorded finding: a run that judged this guide misaligned, and why.
1875
+ *
1876
+ * `reasoning` arrives **already wrapped in the response's untrusted markers**
1877
+ * rather than raw. It is model-authored text derived from a transcript, so the
1878
+ * discipline `runGradePrompt` applies to such text on the way in applies on the
1879
+ * way out (`apps/dashboard/src/lib/eval/promptSafety.ts` →
1880
+ * `deriveDelimiterToken`); wrapping it at the source is what makes the boundary
1881
+ * unforgeable, since a consumer handed raw text plus separate markers can
1882
+ * simply not use them.
1883
+ *
1884
+ * `isCurrentRevision` is not optional detail. A payload that scopes its *rate*
1885
+ * to the current wording and then hands over reasoning about deleted sentences,
1886
+ * unlabelled, reproduces inside one response the conflation
1887
+ * `pattern-evidence-guide-revision` removed from the dashboard.
1888
+ */
1889
+ export declare const GuideHistoryFindingSchema: v.ObjectSchema<{
1890
+ readonly runId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1891
+ readonly occurredAt: v.StringSchema<undefined>;
1892
+ readonly revision: v.NullableSchema<v.ObjectSchema<{
1893
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1894
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1895
+ }, undefined>, undefined>;
1896
+ readonly isCurrentRevision: v.BooleanSchema<undefined>;
1897
+ readonly reasoning: v.StringSchema<undefined>;
1898
+ }, undefined>;
1899
+ export type GuideHistoryFinding = v.InferOutput<typeof GuideHistoryFindingSchema>;
1900
+ /** The guide the identifier resolved to, echoed so the agent can check itself. */
1901
+ export declare const GuideHistoryGuideSchema: v.ObjectSchema<{
1902
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1903
+ readonly title: v.StringSchema<undefined>;
1904
+ readonly path: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>;
1905
+ readonly root: v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>;
1906
+ }, undefined>;
1907
+ /**
1908
+ * The markers every `reasoning` block in this response is wrapped in, plus a
1909
+ * statement of what they mean.
1910
+ *
1911
+ * Generated per response from the content itself, so no marker-like text inside
1912
+ * a block can end it early — a property `deriveDelimiterToken` checks rather
1913
+ * than assumes.
1914
+ */
1915
+ export declare const GuideHistoryUntrustedSchema: v.ObjectSchema<{
1916
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1917
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1918
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1919
+ readonly note: v.StringSchema<undefined>;
1920
+ }, undefined>;
1921
+ export declare const GuideHistoryResponseSchema: v.ObjectSchema<{
1922
+ readonly guide: v.ObjectSchema<{
1923
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1924
+ readonly title: v.StringSchema<undefined>;
1925
+ readonly path: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 512, undefined>, v.CheckAction<string, "path must use forward slashes">, v.CheckAction<string, "path must be relative">, v.CheckAction<string, "path must not contain control characters">, v.CheckAction<string, "path must not contain empty, \".\" or \"..\" segments">]>, undefined>;
1926
+ readonly root: v.NullableSchema<v.PicklistSchema<["project", "global"], undefined>, undefined>;
1927
+ }, undefined>;
1928
+ /** The wording the window is about, or null when the guide has no revision identity. */
1929
+ readonly currentRevision: v.NullableSchema<v.ObjectSchema<{
1930
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1931
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1932
+ }, undefined>, undefined>;
1933
+ readonly state: v.PicklistSchema<["evaluated", "awaiting_current_revision", "unevaluated"], undefined>;
1934
+ readonly window: v.ObjectSchema<{
1935
+ /** Rows summarized, after the revision narrow. */
1936
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1937
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1938
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1939
+ /** In context, never engaged. Neither a pass nor a failure. */
1940
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1941
+ /** `aligned + misaligned` — the rate's own denominator. */
1942
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1943
+ /** `aligned / applicable`, or **null when no run engaged the guide**. */
1944
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1945
+ /** The rows hit the per-guide cap: a bounded window, never a lifetime total. */
1946
+ readonly isWindowed: v.BooleanSchema<undefined>;
1947
+ /** The cap the rows were fetched under, so a reader can say what "windowed" means. */
1948
+ readonly windowSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1949
+ /**
1950
+ * Verdicts fetched and then dropped by the revision narrow — about wording
1951
+ * that is no longer current, or citing no revision at all. A **floor** rather
1952
+ * than a total whenever `isWindowed`, because rows past the cap were never
1953
+ * fetched.
1954
+ */
1955
+ readonly olderRevisionRows: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1956
+ /**
1957
+ * `applicable` is too small for the percentage to mean anything — threshold
1958
+ * `applicable < 3` (founder, 2026-08-22,
1959
+ * `docs/plans/alignment-rate-sample-disclosure-plan.md` → Resolved). Read the
1960
+ * counts, not the rate.
1961
+ */
1962
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1963
+ }, undefined>;
1964
+ /**
1965
+ * The last edit's two windows, or **null when there is no earlier wording to
1966
+ * compare against**.
1967
+ *
1968
+ * Present-and-null rather than omitted: a guide on its first revision has no
1969
+ * delta, and that is an answer. An absent key would leave a reader unable to
1970
+ * tell "no edit to measure" from "this server does not report deltas".
1971
+ */
1972
+ readonly change: v.NullableSchema<v.ObjectSchema<{
1973
+ /** The revision that preceded the change. */
1974
+ readonly before: v.ObjectSchema<{
1975
+ /** The wording this side judges. */
1976
+ readonly revision: v.ObjectSchema<{
1977
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
1978
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1979
+ }, undefined>;
1980
+ /** Rows in this side's window, including the runs that never engaged it. */
1981
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1982
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1983
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1984
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1985
+ /** `aligned + misaligned` — this side's own denominator. */
1986
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1987
+ /** `aligned / applicable`, or null when no run engaged this wording. */
1988
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1989
+ /** This side is below the sample floor, so read its counts and not its rate. */
1990
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
1991
+ /**
1992
+ * This side is a bounded sample of its revision rather than the whole record.
1993
+ * A saturated side beside an unsaturated one is two different kinds of
1994
+ * number, and comparing them without saying so is the defect the flag exists
1995
+ * to stop.
1996
+ */
1997
+ readonly isSaturated: v.BooleanSchema<undefined>;
1998
+ /** The span this side covers, ISO. Both null on a side with no rows. */
1999
+ readonly newestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2000
+ readonly oldestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2001
+ }, undefined>;
2002
+ /** The wording the guide stands at now. */
2003
+ readonly since: v.ObjectSchema<{
2004
+ /** The wording this side judges. */
2005
+ readonly revision: v.ObjectSchema<{
2006
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2007
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2008
+ }, undefined>;
2009
+ /** Rows in this side's window, including the runs that never engaged it. */
2010
+ readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2011
+ readonly aligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2012
+ readonly misaligned: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2013
+ readonly notApplicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2014
+ /** `aligned + misaligned` — this side's own denominator. */
2015
+ readonly applicable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2016
+ /** `aligned / applicable`, or null when no run engaged this wording. */
2017
+ readonly alignmentRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2018
+ /** This side is below the sample floor, so read its counts and not its rate. */
2019
+ readonly isLowConfidence: v.BooleanSchema<undefined>;
2020
+ /**
2021
+ * This side is a bounded sample of its revision rather than the whole record.
2022
+ * A saturated side beside an unsaturated one is two different kinds of
2023
+ * number, and comparing them without saying so is the defect the flag exists
2024
+ * to stop.
2025
+ */
2026
+ readonly isSaturated: v.BooleanSchema<undefined>;
2027
+ /** The span this side covers, ISO. Both null on a side with no rows. */
2028
+ readonly newestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2029
+ readonly oldestAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2030
+ }, undefined>;
2031
+ /**
2032
+ * `since` minus `before`, in `[-1, 1]`, or **null whenever the pair is
2033
+ * suppressed** or either side never engaged the guide. Null is not zero: one
2034
+ * says the evidence does not support a number, the other would be a claim.
2035
+ */
2036
+ readonly alignmentRateDelta: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2037
+ /**
2038
+ * Which side is below the sample floor, or null when neither is and the delta
2039
+ * stands. `'since'` is the ordinary post-edit state — *not enough runs since
2040
+ * this change* — and is reported rather than omitted.
2041
+ */
2042
+ readonly suppressedBy: v.NullableSchema<v.PicklistSchema<["since", "before", "both"], undefined>, undefined>;
2043
+ /** The delta's sign, or null while it is withheld. `unchanged` is exactly zero. */
2044
+ readonly direction: v.NullableSchema<v.PicklistSchema<["improved", "regressed", "unchanged"], undefined>, undefined>;
2045
+ /** Either side is a bounded sample, so neither is a lifetime total. */
2046
+ readonly isWindowed: v.BooleanSchema<undefined>;
2047
+ /** The per-revision cap each side was bounded by, so "sample" has a size. */
2048
+ readonly windowSize: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2049
+ /**
2050
+ * When the current wording was recorded, ISO — the boundary between the two
2051
+ * windows, and null when no version row carries it.
2052
+ *
2053
+ * A date, never an attribution: it says when the window opened, not that the
2054
+ * edit caused what happened inside it.
2055
+ */
2056
+ readonly changedAt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2057
+ }, undefined>, undefined>;
2058
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
2059
+ readonly runId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2060
+ readonly occurredAt: v.StringSchema<undefined>;
2061
+ readonly revision: v.NullableSchema<v.ObjectSchema<{
2062
+ readonly bodyItemId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2063
+ readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2064
+ }, undefined>, undefined>;
2065
+ readonly isCurrentRevision: v.BooleanSchema<undefined>;
2066
+ readonly reasoning: v.StringSchema<undefined>;
2067
+ }, undefined>, undefined>;
2068
+ /**
2069
+ * Misaligned rows in the window beyond the `MAX_GUIDE_HISTORY_FINDINGS`
2070
+ * returned. Reported rather than silently truncated: a caller reading five
2071
+ * findings has no other way to know it is reading five of forty.
2072
+ */
2073
+ readonly findingsOmitted: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2074
+ readonly untrusted: v.ObjectSchema<{
2075
+ readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2076
+ readonly startMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2077
+ readonly endMarker: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
2078
+ readonly note: v.StringSchema<undefined>;
2079
+ }, undefined>;
2080
+ }, undefined>;
2081
+ export type GuideHistoryResponse = v.InferOutput<typeof GuideHistoryResponseSchema>;
1462
2082
  export declare function parseAgentConfig(data: unknown): {
1463
2083
  id: string;
1464
2084
  name: string;
@@ -1556,7 +2176,7 @@ export declare function parseCreateBundleResponse(data: unknown): {
1556
2176
  };
1557
2177
  export declare function parseAttachBundleMemberRequest(data: unknown): {
1558
2178
  itemId: string;
1559
- itemType?: "guide_file" | "guide" | undefined;
2179
+ itemType?: "guide" | "guide_file" | undefined;
1560
2180
  };
1561
2181
  export declare function parseAttachBundleMemberResponse(data: unknown): {
1562
2182
  attached: boolean;
@@ -1594,7 +2214,7 @@ export declare function parseDeleteBundleResponse(data: unknown): {
1594
2214
  };
1595
2215
  export declare function parseContextItem(data: unknown): {
1596
2216
  id: string;
1597
- type: "reference" | "guide" | "document" | "asset";
2217
+ type: string;
1598
2218
  name: string;
1599
2219
  contentType: string;
1600
2220
  content: string | null;
@@ -1607,7 +2227,7 @@ export declare function parseContextItem(data: unknown): {
1607
2227
  export declare function parseContextItemsResponse(data: unknown): {
1608
2228
  items: {
1609
2229
  id: string;
1610
- type: "reference" | "guide" | "document" | "asset";
2230
+ type: string;
1611
2231
  name: string;
1612
2232
  contentType: string;
1613
2233
  content: string | null;
@@ -1620,7 +2240,7 @@ export declare function parseContextItemsResponse(data: unknown): {
1620
2240
  };
1621
2241
  export declare function parsePushContextRequest(data: unknown): {
1622
2242
  name: string;
1623
- contentType: "reference" | "document" | "asset";
2243
+ contentType: "document" | "reference" | "asset";
1624
2244
  content: string;
1625
2245
  itemId?: string | undefined;
1626
2246
  origin?: string | null | undefined;
@@ -1630,7 +2250,7 @@ export declare function parsePushContextRequest(data: unknown): {
1630
2250
  export declare function parsePushContextResponse(data: unknown): {
1631
2251
  item: {
1632
2252
  id: string;
1633
- type: "reference" | "guide" | "document" | "asset";
2253
+ type: string;
1634
2254
  name: string;
1635
2255
  contentType: string;
1636
2256
  content: string | null;
@@ -1652,7 +2272,7 @@ export declare function parseUpdateContextItemRequest(data: unknown): {
1652
2272
  export declare function parseUpdateContextItemResponse(data: unknown): {
1653
2273
  item: {
1654
2274
  id: string;
1655
- type: "reference" | "guide" | "document" | "asset";
2275
+ type: string;
1656
2276
  name: string;
1657
2277
  contentType: string;
1658
2278
  content: string | null;
@@ -1673,7 +2293,7 @@ export declare function parseUpdateContextItemBody(data: unknown): {
1673
2293
  export declare function parseContextItemResponse(data: unknown): {
1674
2294
  item: {
1675
2295
  id: string;
1676
- type: "reference" | "guide" | "document" | "asset";
2296
+ type: string;
1677
2297
  name: string;
1678
2298
  contentType: string;
1679
2299
  content: string | null;
@@ -1688,7 +2308,7 @@ export declare function parseArchiveContextItemResponse(data: unknown): {
1688
2308
  archived: boolean;
1689
2309
  item: {
1690
2310
  id: string;
1691
- type: "reference" | "guide" | "document" | "asset";
2311
+ type: string;
1692
2312
  name: string;
1693
2313
  contentType: string;
1694
2314
  content: string | null;
@@ -1700,7 +2320,7 @@ export declare function parseArchiveContextItemResponse(data: unknown): {
1700
2320
  };
1701
2321
  };
1702
2322
  export declare function parseInboxCaptureRequest(data: unknown): {
1703
- contentType: "document" | "asset";
2323
+ contentType: "document" | "reference" | "asset";
1704
2324
  content: string;
1705
2325
  name?: string | undefined;
1706
2326
  source?: string | undefined;
@@ -1708,7 +2328,7 @@ export declare function parseInboxCaptureRequest(data: unknown): {
1708
2328
  export declare function parseInboxCaptureResponse(data: unknown): {
1709
2329
  item: {
1710
2330
  id: string;
1711
- type: "reference" | "guide" | "document" | "asset";
2331
+ type: string;
1712
2332
  name: string;
1713
2333
  contentType: string;
1714
2334
  content: string | null;
@@ -1721,7 +2341,7 @@ export declare function parseInboxCaptureResponse(data: unknown): {
1721
2341
  export declare function parseInboxListResponse(data: unknown): {
1722
2342
  items: {
1723
2343
  id: string;
1724
- type: "reference" | "guide" | "document" | "asset";
2344
+ type: string;
1725
2345
  name: string;
1726
2346
  contentType: string;
1727
2347
  content: string | null;
@@ -1784,7 +2404,6 @@ export declare function parseDashboardSyncRequest(data: unknown): {
1784
2404
  userText?: string | undefined;
1785
2405
  assistantText?: string | undefined;
1786
2406
  } | undefined;
1787
- cliVersion?: string | undefined;
1788
2407
  }[] | undefined;
1789
2408
  guideSuggestions?: {
1790
2409
  id?: string | undefined;
@@ -1839,6 +2458,14 @@ export declare function parseDashboardSyncRequest(data: unknown): {
1839
2458
  }[];
1840
2459
  truncated?: boolean | undefined;
1841
2460
  } | undefined;
2461
+ commitAnchor?: {
2462
+ headSha: string;
2463
+ branch: string | null;
2464
+ } | undefined;
2465
+ selfReport?: {
2466
+ sessionId: string;
2467
+ text: string;
2468
+ } | undefined;
1842
2469
  };
1843
2470
  export declare function parseProposalCitation(data: unknown): {
1844
2471
  sessionId: string;
@@ -1918,5 +2545,94 @@ export declare function parseActionEntry(data: unknown): {
1918
2545
  exitCode?: number | undefined;
1919
2546
  } | undefined;
1920
2547
  };
2548
+ export declare function parseGuideHistoryRequest(data: unknown): {
2549
+ guide: string;
2550
+ root?: "project" | "global" | undefined;
2551
+ projectId?: string | undefined;
2552
+ repoId?: string | undefined;
2553
+ guideId?: string | undefined;
2554
+ };
2555
+ export declare function parseGuideHistoryResponse(data: unknown): {
2556
+ guide: {
2557
+ id: string;
2558
+ title: string;
2559
+ path: string | null;
2560
+ root: "project" | "global" | null;
2561
+ };
2562
+ currentRevision: {
2563
+ bodyItemId: string;
2564
+ version: number;
2565
+ } | null;
2566
+ state: "evaluated" | "awaiting_current_revision" | "unevaluated";
2567
+ window: {
2568
+ total: number;
2569
+ aligned: number;
2570
+ misaligned: number;
2571
+ notApplicable: number;
2572
+ applicable: number;
2573
+ alignmentRate: number | null;
2574
+ isWindowed: boolean;
2575
+ windowSize: number;
2576
+ olderRevisionRows: number;
2577
+ isLowConfidence: boolean;
2578
+ };
2579
+ change: {
2580
+ before: {
2581
+ revision: {
2582
+ bodyItemId: string;
2583
+ version: number;
2584
+ };
2585
+ total: number;
2586
+ aligned: number;
2587
+ misaligned: number;
2588
+ notApplicable: number;
2589
+ applicable: number;
2590
+ alignmentRate: number | null;
2591
+ isLowConfidence: boolean;
2592
+ isSaturated: boolean;
2593
+ newestAt: string | null;
2594
+ oldestAt: string | null;
2595
+ };
2596
+ since: {
2597
+ revision: {
2598
+ bodyItemId: string;
2599
+ version: number;
2600
+ };
2601
+ total: number;
2602
+ aligned: number;
2603
+ misaligned: number;
2604
+ notApplicable: number;
2605
+ applicable: number;
2606
+ alignmentRate: number | null;
2607
+ isLowConfidence: boolean;
2608
+ isSaturated: boolean;
2609
+ newestAt: string | null;
2610
+ oldestAt: string | null;
2611
+ };
2612
+ alignmentRateDelta: number | null;
2613
+ suppressedBy: "since" | "before" | "both" | null;
2614
+ direction: "improved" | "regressed" | "unchanged" | null;
2615
+ isWindowed: boolean;
2616
+ windowSize: number;
2617
+ changedAt: string | null;
2618
+ } | null;
2619
+ findings: {
2620
+ runId: string;
2621
+ occurredAt: string;
2622
+ revision: {
2623
+ bodyItemId: string;
2624
+ version: number;
2625
+ } | null;
2626
+ isCurrentRevision: boolean;
2627
+ reasoning: string;
2628
+ }[];
2629
+ findingsOmitted: number;
2630
+ untrusted: {
2631
+ token: string;
2632
+ startMarker: string;
2633
+ endMarker: string;
2634
+ note: string;
2635
+ };
2636
+ };
1921
2637
  export {};
1922
2638
  //# sourceMappingURL=schemas.d.ts.map