@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.
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,aAAa,oEAAoD,CAAA;AAE9E,eAAO,MAAM,iBAAiB,0EAA0D,CAAA;AAExF,eAAO,MAAM,kBAAkB,wFAM7B,CAAA;AAEF,eAAO,MAAM,qBAAqB,kIAQhC,CAAA;AAuBF,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,QAAa,CAAA;AAErD,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAmBxC,eAAO,MAAM,2BAA2B,uYAoBvC,CAAA;AAID,eAAO,MAAM,qBAAqB,4eAMjC,CAAA;AAID,eAAO,MAAM,wBAAwB;;;;;aAKnC,CAAA;AAEF,kFAAkF;AAClF,eAAO,MAAM,8BAA8B,MAAM,CAAA;AAUjD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,oDAAoC,CAAA;AAMzE,eAAO,MAAM,mBAAmB;;;;;;;;;;aAmC9B,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;aAGpC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;IA6ClC;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAgCN,CAAA;AAMD,eAAO,MAAM,qBAAqB;;;;aAIhC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;2DAiB1C,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,MAAM,CAAA;AAEzC,gFAAgF;AAChF,eAAO,MAAM,Y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AAC,IAAI,EAAE,OAAO;;;;;;;;;;;;EAEnD;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;EAE7D;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;EAE5D;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO;;EAErD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO;;EAEtD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO;;;;EAElD;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;EAE1D;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;EAE1D;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;EAE7C;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO;;;;;;EAErD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtD"}
package/dist/schemas.js CHANGED
@@ -8,6 +8,7 @@
8
8
  * input) or call `v.safeParse(Schema, data)` directly for non-throwing checks.
9
9
  */
10
10
  import * as v from 'valibot';
11
+ import { BUNDLE_MEMBER_TYPES, CONTEXT_ITEM_TYPES, INBOX_CONTENT_TYPES, PUSH_CONTENT_TYPES, } from './contextKinds.js';
11
12
  // ---------------------------------------------------------------------------
12
13
  // Core enum schemas
13
14
  // ---------------------------------------------------------------------------
@@ -491,7 +492,12 @@ export const CreateBundleResponseSchema = v.object({
491
492
  // Membership addressing matches the bundle_items composite key: itemType is
492
493
  // part of identity, so detach must carry it too — an itemId alone cannot
493
494
  // address a `guide` membership.
494
- export const BundleMemberTypeSchema = v.picklist(['guide_file', 'guide']);
495
+ //
496
+ // A membership kind is not a `content_type` narrowing — it says which table
497
+ // `item_id` points at — so it derives from `BUNDLE_MEMBER_TYPES` rather than
498
+ // from the content-kind table beside it. See that constant for why the two axes
499
+ // stay named apart.
500
+ export const BundleMemberTypeSchema = v.picklist(BUNDLE_MEMBER_TYPES);
495
501
  export const AttachBundleMemberRequestSchema = v.object({
496
502
  itemId: v.pipe(v.string(), v.minLength(1)),
497
503
  // Defaults to 'guide_file' server-side.
@@ -530,12 +536,11 @@ export const DeleteBundleResponseSchema = v.object({
530
536
  // ---------------------------------------------------------------------------
531
537
  // The `type` of an item returned to an agent. A `guide` is a canonical guide
532
538
  // row; the rest are guide_files rows (documents, references, assets).
533
- export const ContextItemTypeSchema = v.picklist([
534
- 'guide',
535
- 'document',
536
- 'reference',
537
- 'asset',
538
- ]);
539
+ //
540
+ // Derived, like the two narrowings below, from `contextKinds.ts` — the one
541
+ // table that says which kinds exist and what each may do. The values and their
542
+ // order are unchanged; `contextKinds.test.ts` pins that.
543
+ export const ContextItemTypeSchema = v.picklist(CONTEXT_ITEM_TYPES);
539
544
  // The contentType a caller may *create* through the context layer. `guide` is
540
545
  // deliberately absent, and stays absent after slice 2b-B made guides pushable:
541
546
  // this schema is reached only by POST (create) and the MCP `push_context`
@@ -548,9 +553,11 @@ export const ContextItemTypeSchema = v.picklist([
548
553
  // existing guide needs nothing from this picklist — it is addressed by
549
554
  // `itemId` alone (`guide-versioned-identity-plan.md` → Slice 2b-B, the third
550
555
  // Codex constraint, resolved as "restrict to itemId-bearing updates").
551
- export const PushContentTypeSchema = v.picklist(['document', 'reference', 'asset']);
552
- // Inbox capture is text or an image today (image upload lands in Phase 2b).
553
- export const InboxContentTypeSchema = v.picklist(['document', 'asset']);
556
+ // (the `pushable` column of `CONTEXT_CONTENT_KINDS`).
557
+ export const PushContentTypeSchema = v.picklist(PUSH_CONTENT_TYPES);
558
+ // Inbox capture is text or an image today (image upload lands in Phase 2b) —
559
+ // the `capturable` column of `CONTEXT_CONTENT_KINDS`.
560
+ export const InboxContentTypeSchema = v.picklist(INBOX_CONTENT_TYPES);
554
561
  /** Max serialized size (UTF-8 bytes) of a pushed or captured item's content. */
555
562
  export const MAX_CONTEXT_CONTENT_BYTES = 256 * 1024;
556
563
  const ContextContentSchema = v.pipe(v.string(), v.check((value) => new TextEncoder().encode(value).length <= MAX_CONTEXT_CONTENT_BYTES, `content must be at most ${MAX_CONTEXT_CONTENT_BYTES} bytes`));
@@ -1137,22 +1144,6 @@ export const DashboardSyncActionSchema = v.object({
1137
1144
  * a release before the panel describing it.
1138
1145
  */
1139
1146
  narration: v.optional(ActionNarrationSchema),
1140
- /**
1141
- * Version of the CLI that *produced* this action's verdict.
1142
- *
1143
- * **No shipped CLI sends this any more.** Its only writer was `mossbear verdict
1144
- * record`, whose queue files could outlive an upgrade, which is why the
1145
- * per-action version was distinguished from the request-level one at all.
1146
- * That command is gone (docs/plans/cli-local-grading-removal-plan.md) and no
1147
- * client-side verdict exists to attribute.
1148
- *
1149
- * Kept on the wire for one release so an un-upgraded CLI's queued verdicts
1150
- * are not rejected mid-migration; the field and the `actions.cli_version`
1151
- * column it feeds are dropped together (`action-cli-version-column-drop`).
1152
- * For the CLI making the request — which is live, and what
1153
- * `enforceCliVersionFloor` reads — see `DashboardSyncRequestSchema`.
1154
- */
1155
- cliVersion: v.optional(CliVersionSchema),
1156
1147
  });
1157
1148
  export const DashboardGuideSuggestionSchema = v.object({
1158
1149
  id: v.optional(v.string()),
@@ -1231,6 +1222,94 @@ export const RuleFileManifestSchema = v.object({
1231
1222
  */
1232
1223
  truncated: v.optional(v.boolean()),
1233
1224
  });
1225
+ /**
1226
+ * Where the checkout stood when a run closed — the git head the `SessionEnd`
1227
+ * hook observed, and the branch it was on.
1228
+ *
1229
+ * The join the ledger has never had. Every existing query walks run → what
1230
+ * happened; nothing walks commit → which run, because until this field no
1231
+ * commit, branch or PR identifier existed anywhere in the pipeline
1232
+ * (docs/plans/run-commit-anchor-plan.md). An anchor also cannot be backfilled:
1233
+ * a run that closes without one is unanchorable forever, which is why it is
1234
+ * captured before its first reader exists.
1235
+ *
1236
+ * Absence is an ordinary answer rather than a failure to report. A session runs
1237
+ * outside a git repo; git is missing, or slow enough that the capture's own
1238
+ * timeout fires — the field is then simply not sent, and the run's columns stay
1239
+ * null. A checkout on a detached head sends an anchor with a null `branch`.
1240
+ * None of it says anything to the user: a run that produced no identifiable
1241
+ * commit is a normal run, and the CLI has nothing to offer them about it.
1242
+ *
1243
+ * There is deliberately no `prNumber` here. It is the one part of the anchor
1244
+ * that is not free: no environment variable in a real cloud agent session names
1245
+ * a PR (checked 2026-08-22 — see the spec's Open questions), so a wire field
1246
+ * for it would be protocol surface no producer ever fills. `runs.pr_number`
1247
+ * exists as a reserved column; the wire waits for a mechanism.
1248
+ *
1249
+ * Not a per-action field and not a per-session map: it describes the machine
1250
+ * and the checkout at one instant, the way `RuleFileManifestSchema` does, and
1251
+ * applies to whichever runs the request closes.
1252
+ */
1253
+ export const CommitAnchorSchema = v.object({
1254
+ /**
1255
+ * `git rev-parse HEAD`. Full 40-hex only — an abbreviated sha is ambiguous
1256
+ * across repos and would make the reverse index it feeds silently lossy.
1257
+ *
1258
+ * Required *within* the object, while the object itself is optional. The two
1259
+ * together say the one thing worth saying: an anchor exists exactly when a
1260
+ * head was observed. A nullable `headSha` would add a third state — "an
1261
+ * anchor, but of nothing" — that no caller can produce (the only checkout
1262
+ * with a branch and no head is one with no commits, where both probes fail)
1263
+ * and every reader would still have to handle.
1264
+ */
1265
+ headSha: v.pipe(v.string(), v.regex(/^[0-9a-f]{40}$/)),
1266
+ /**
1267
+ * The branch name, or null on a detached head — which is a real state a
1268
+ * bisect or a CI checkout sits in, not an error. Capped so a pathological
1269
+ * ref name cannot widen the payload.
1270
+ */
1271
+ branch: v.nullable(v.pipe(v.string(), v.minLength(1), v.maxLength(255))),
1272
+ });
1273
+ /**
1274
+ * The agent's closing account of the run — the prose of the session's final
1275
+ * assistant message (docs/plans/claim-vs-actual-discrepancy-plan.md, slice 1).
1276
+ *
1277
+ * **The same content class as narration, so it is literally the same schema**
1278
+ * rather than a twin of it: produced by the same client-side pipeline (text
1279
+ * blocks only → strip code structurally → redact prose → bound), carrying the
1280
+ * same guarantees, capped at the same `MAX_ACTION_NARRATION_CHARS`, and
1281
+ * rejected on the same line-initial fence. A separate declaration with the same
1282
+ * body would be two homes for one rule and would drift the first time either
1283
+ * moved. What differs is *which* prose and how much of it — the client's
1284
+ * concern, decided in `extractRunSelfReport`, not the wire's.
1285
+ *
1286
+ * `minLength(1)` because absence has exactly one representation here: a run
1287
+ * with nothing to report omits the field. An empty string would be a second
1288
+ * spelling of null that every reader would then have to handle.
1289
+ *
1290
+ * **It names its session, and that is not decoration.** This is where the
1291
+ * report parts company with `CommitAnchorSchema`, which carries no session id
1292
+ * and is right not to: an anchor describes the *checkout*, so it applies to
1293
+ * whichever runs a request closes. A self-report describes the work of exactly
1294
+ * one session. A request can close more than one — `buildSyncBatches` marks
1295
+ * every session in the upload's actions completed when `sessionComplete` is set
1296
+ * (`packages/cli/src/sync-batches.ts:118-126`), which a `SessionEnd` sync hits
1297
+ * whenever an earlier session's `Stop` sync failed and left a backlog. Without
1298
+ * the id the server would write one session's closing summary onto the other
1299
+ * session's run, and slice 2 would then grade a run's actions against a report
1300
+ * of different work: a confidently wrong finding, which this pipeline ranks
1301
+ * below having none at all (`packages/cli/src/transcript/narration.ts:1-20`).
1302
+ *
1303
+ * The id makes the server the enforcement point rather than the client. A CLI
1304
+ * that attaches the report to the wrong batch cannot misattribute it, because
1305
+ * the writer matches on this field instead of trusting placement.
1306
+ */
1307
+ export const RunSelfReportSchema = v.object({
1308
+ /** The session whose closing message this is. Must be one the request closes. */
1309
+ sessionId: NonEmptyStringSchema,
1310
+ /** The report itself — same content class and cap as narration. */
1311
+ text: v.pipe(NarrationTextSchema, v.minLength(1)),
1312
+ });
1234
1313
  export const DashboardSyncRequestSchema = v.object({
1235
1314
  actions: v.optional(v.pipe(v.array(DashboardSyncActionSchema), v.maxLength(MAX_SYNC_ACTIONS_BATCH))),
1236
1315
  guideSuggestions: v.optional(v.pipe(v.array(DashboardGuideSuggestionSchema), v.maxLength(MAX_SYNC_AUX_BATCH))),
@@ -1238,10 +1317,11 @@ export const DashboardSyncRequestSchema = v.object({
1238
1317
  runUsage: v.optional(v.pipe(v.array(DashboardRunUsageSchema), v.maxLength(MAX_SYNC_AUX_BATCH))),
1239
1318
  skillUsage: v.optional(v.pipe(v.array(DashboardSkillUsageSchema), v.maxLength(MAX_SYNC_AUX_BATCH))),
1240
1319
  /**
1241
- * Version of the CLI making *this request* — the live one, and the only
1242
- * `cliVersion` a shipped CLI still sends (the per-action field is a
1243
- * migration leftover; see `DashboardSyncActionSchema`). It sits on the
1244
- * envelope because the server reads it before touching any row, to
1320
+ * Version of the CLI making *this request* — the only `cliVersion` on the
1321
+ * wire. (A per-action one existed until `action-cli-version-column-drop`; it
1322
+ * attributed a verdict to the CLI that produced it, which no CLI does any
1323
+ * more.) It sits on the envelope because the server reads it before touching
1324
+ * any row, to
1245
1325
  * compare against its version floor and reject an incompatible client with
1246
1326
  * 426 rather than half-ingesting the batch. Optional: clients predating this
1247
1327
  * field send none, and are never blocked for it.
@@ -1282,6 +1362,38 @@ export const DashboardSyncRequestSchema = v.object({
1282
1362
  * absence as "delivery unobserved", never as "nothing was delivered".
1283
1363
  */
1284
1364
  ruleManifest: v.optional(RuleFileManifestSchema),
1365
+ /**
1366
+ * Where the checkout stood when this request's `completedSessionIds` closed —
1367
+ * see {@link CommitAnchorSchema}.
1368
+ *
1369
+ * Rides only the batches that name a completed session, which is the opposite
1370
+ * of `ruleManifest`'s placement rule and deliberately so. The ordinary
1371
+ * `SessionEnd` request carries **no actions at all** — the preceding `Stop`
1372
+ * hook synced and advanced the run-log cursor — so a field attached to
1373
+ * action-carrying batches would be absent from exactly the request that
1374
+ * exists to report the close.
1375
+ *
1376
+ * Optional, and an absent anchor is never an error: a CLI predating this
1377
+ * sends none, and the server must read its absence as "no head observed"
1378
+ * rather than refusing the close.
1379
+ */
1380
+ commitAnchor: v.optional(CommitAnchorSchema),
1381
+ /**
1382
+ * What the agent said it did, as its own closing message — see
1383
+ * {@link RunSelfReportSchema}.
1384
+ *
1385
+ * Rides the same batches as `commitAnchor` and for the same reason: it
1386
+ * describes the *session that just ended*, and the ordinary `SessionEnd`
1387
+ * request carries no actions to attach it to. The server writes it onto the
1388
+ * runs this request closes.
1389
+ *
1390
+ * Optional, and its absence is never an error or a finding. A CLI predating
1391
+ * this sends none; so does a session with no transcript, one whose repo has
1392
+ * narration switched off, and one that ended without the agent speaking. All
1393
+ * of them are ordinary runs, and nothing downstream distinguishes them —
1394
+ * "could not compare" is not a verdict and renders nothing.
1395
+ */
1396
+ selfReport: v.optional(RunSelfReportSchema),
1285
1397
  });
1286
1398
  export const ExtractedGuideSuggestionSchema = v.object({
1287
1399
  id: v.string(),
@@ -1424,6 +1536,320 @@ export function isKnownActionType(value) {
1424
1536
  // `apps/dashboard/src/lib/eval/runGradeSchema.ts` — one shape of that fact, not
1425
1537
  // two packages holding copies that a comment has to keep in step.
1426
1538
  // ---------------------------------------------------------------------------
1539
+ // Guide verdict history (guide-history-for-agents)
1540
+ // ---------------------------------------------------------------------------
1541
+ /**
1542
+ * The read an agent makes of a guide's own grading record, so the improvement
1543
+ * loop the user already runs in-conversation ("what could be improved in this
1544
+ * skill?") has the evidence Mossbear holds and the agent does not.
1545
+ *
1546
+ * **Evidence out, never instructions out.** Nothing in this contract carries a
1547
+ * directive to change anything, and nothing on the server writes as a result of
1548
+ * it. It is a read, and the decision stays in the user's conversation
1549
+ * (`docs/plans/guide-history-for-agents-plan.md` → Boundaries).
1550
+ */
1551
+ /**
1552
+ * How the agent names the guide.
1553
+ *
1554
+ * Either a repo-relative path exactly as the guide file declares it
1555
+ * (`.claude/skills/reviewer/SKILL.md`, `AGENTS.md`), or the bare name of a
1556
+ * skill (`reviewer`), which the server expands to the skill layouts it knows.
1557
+ * Both resolve through the `(root, path)` identity import already reconciles
1558
+ * on, rather than a second one invented here.
1559
+ *
1560
+ * Bounded and shape-checked at the boundary rather than at the query string: it
1561
+ * reaches a SQL predicate, and an identifier is not free text.
1562
+ */
1563
+ export const GuideHistoryIdentifierSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(512), v.check((value) => !/[\u0000-\u001f\u007f]/.test(value), 'guide must not contain control characters'));
1564
+ /**
1565
+ * The request an agent sends.
1566
+ *
1567
+ * `root` is optional and is the disambiguator, not decoration: `.claude/skills`
1568
+ * is scanned under **both** discovery roots
1569
+ * (`packages/cli/src/rules/discover.ts:101,105`), so a project skill and its
1570
+ * `~/.claude/skills` twin declare the same path string. When the identifier
1571
+ * reaches guides under more than one root and no root was given, the server
1572
+ * refuses and names both rather than picking one — answering a question about
1573
+ * the wrong file's history is worse than not answering it.
1574
+ */
1575
+ export const GuideHistoryRequestSchema = v.object({
1576
+ guide: GuideHistoryIdentifierSchema,
1577
+ root: v.optional(GuideDiscoveryRootSchema),
1578
+ /**
1579
+ * Which repo's copy — **the axis import itself reconciles on**, and the one
1580
+ * that actually resolves the common collision.
1581
+ *
1582
+ * `root` alone does not, and assuming it did was the first version's defect:
1583
+ * import's resolution key is `(userId, repoId, root, path)` and two files at
1584
+ * one path under different repos deliberately stay two rows
1585
+ * (`apps/dashboard/app/api/rules/import+api.ts:170-171`, Decision 6). So any
1586
+ * user with two repos has two guides at `(project, AGENTS.md)`, and a refusal
1587
+ * telling them to pass `root` names the one field that cannot separate those.
1588
+ *
1589
+ * `projectId` is the portable identity a repo commits and every clone agrees
1590
+ * on; `repoId` is the machine-local digest. Both are optional and both are
1591
+ * what the caller already sends at import time, so an agent running inside a
1592
+ * repo supplies them without being asked.
1593
+ */
1594
+ projectId: v.optional(NonEmptyStringSchema),
1595
+ repoId: v.optional(NonEmptyStringSchema),
1596
+ /**
1597
+ * The exact guide, when the caller has already been shown the candidates.
1598
+ *
1599
+ * The escape hatch that makes the refusal always satisfiable: two repos can
1600
+ * be indistinguishable to a caller that knows neither id (a guide imported
1601
+ * before repo identity was recorded carries neither), and an error whose
1602
+ * remedy cannot be carried out is worse than no remedy at all. The 409 names
1603
+ * this id for every candidate.
1604
+ */
1605
+ guideId: v.optional(NonEmptyStringSchema),
1606
+ });
1607
+ /**
1608
+ * One revision of a guide's wording: the body file and the version it stood at.
1609
+ *
1610
+ * The pair, never a bare version number — `guide_files.version` restarts at 1
1611
+ * per row, so a number alone compares equal across two different files
1612
+ * (`apps/dashboard/src/lib/guides/guideRevision.ts`).
1613
+ */
1614
+ export const GuideHistoryRevisionSchema = v.object({
1615
+ bodyItemId: NonEmptyStringSchema,
1616
+ version: v.pipe(v.number(), v.integer()),
1617
+ });
1618
+ /**
1619
+ * Which of three states the guide's record is in — a required field rather than
1620
+ * something a reader infers from empty arrays.
1621
+ *
1622
+ * The distinction is the whole point of returning it: `unevaluated` means no
1623
+ * graded run has ever produced a verdict, while `awaiting_current_revision`
1624
+ * means the guide has a real record that is entirely about wording the user has
1625
+ * since rewritten. Collapsing those two onto "no data" is exactly the claim the
1626
+ * dashboard stopped making (`guidePerformance.ts` → `isAwaitingCurrentRevision`),
1627
+ * and an agent reading an absence as a verdict is the same error one screen
1628
+ * further out.
1629
+ */
1630
+ export const GuideHistoryStateSchema = v.picklist([
1631
+ 'evaluated',
1632
+ 'awaiting_current_revision',
1633
+ 'unevaluated',
1634
+ ]);
1635
+ /**
1636
+ * The verdict window, scoped to the revision named beside it.
1637
+ *
1638
+ * Both denominators travel: `applicable` is the rate's own denominator
1639
+ * (`aligned + misaligned`), `total` is the window's row count including the runs
1640
+ * that never engaged the guide. Rendering one as the other is the defect
1641
+ * `alignment-rate-sample-disclosure` was filed for, and a payload carrying only
1642
+ * one of them would hand an agent the same mistake.
1643
+ */
1644
+ export const GuideHistoryWindowSchema = v.object({
1645
+ /** Rows summarized, after the revision narrow. */
1646
+ total: v.pipe(v.number(), v.integer()),
1647
+ aligned: v.pipe(v.number(), v.integer()),
1648
+ misaligned: v.pipe(v.number(), v.integer()),
1649
+ /** In context, never engaged. Neither a pass nor a failure. */
1650
+ notApplicable: v.pipe(v.number(), v.integer()),
1651
+ /** `aligned + misaligned` — the rate's own denominator. */
1652
+ applicable: v.pipe(v.number(), v.integer()),
1653
+ /** `aligned / applicable`, or **null when no run engaged the guide**. */
1654
+ alignmentRate: v.nullable(v.number()),
1655
+ /** The rows hit the per-guide cap: a bounded window, never a lifetime total. */
1656
+ isWindowed: v.boolean(),
1657
+ /** The cap the rows were fetched under, so a reader can say what "windowed" means. */
1658
+ windowSize: v.pipe(v.number(), v.integer()),
1659
+ /**
1660
+ * Verdicts fetched and then dropped by the revision narrow — about wording
1661
+ * that is no longer current, or citing no revision at all. A **floor** rather
1662
+ * than a total whenever `isWindowed`, because rows past the cap were never
1663
+ * fetched.
1664
+ */
1665
+ olderRevisionRows: v.pipe(v.number(), v.integer()),
1666
+ /**
1667
+ * `applicable` is too small for the percentage to mean anything — threshold
1668
+ * `applicable < 3` (founder, 2026-08-22,
1669
+ * `docs/plans/alignment-rate-sample-disclosure-plan.md` → Resolved). Read the
1670
+ * counts, not the rate.
1671
+ */
1672
+ isLowConfidence: v.boolean(),
1673
+ });
1674
+ /**
1675
+ * One side of a guide edit's before/after pair — the wording, and what the runs
1676
+ * that engaged it did.
1677
+ *
1678
+ * Structurally a window like `GuideHistoryWindow` and deliberately not that
1679
+ * schema: these two sides are bounded **per revision** by a different query
1680
+ * (`apps/dashboard/src/server/guides/revisionWindows.ts`), so `isSaturated` is
1681
+ * the server's own measurement of its partition rather than the client-side
1682
+ * `isWindowed` inference, and the span each side covers is part of what makes
1683
+ * the pair readable.
1684
+ *
1685
+ * Both denominators travel here for the same reason they travel on the window:
1686
+ * a delta between two undisclosed denominators is worse than no number at all.
1687
+ */
1688
+ export const GuideHistoryChangeSideSchema = v.object({
1689
+ /** The wording this side judges. */
1690
+ revision: GuideHistoryRevisionSchema,
1691
+ /** Rows in this side's window, including the runs that never engaged it. */
1692
+ total: v.pipe(v.number(), v.integer()),
1693
+ aligned: v.pipe(v.number(), v.integer()),
1694
+ misaligned: v.pipe(v.number(), v.integer()),
1695
+ notApplicable: v.pipe(v.number(), v.integer()),
1696
+ /** `aligned + misaligned` — this side's own denominator. */
1697
+ applicable: v.pipe(v.number(), v.integer()),
1698
+ /** `aligned / applicable`, or null when no run engaged this wording. */
1699
+ alignmentRate: v.nullable(v.number()),
1700
+ /** This side is below the sample floor, so read its counts and not its rate. */
1701
+ isLowConfidence: v.boolean(),
1702
+ /**
1703
+ * This side is a bounded sample of its revision rather than the whole record.
1704
+ * A saturated side beside an unsaturated one is two different kinds of
1705
+ * number, and comparing them without saying so is the defect the flag exists
1706
+ * to stop.
1707
+ */
1708
+ isSaturated: v.boolean(),
1709
+ /** The span this side covers, ISO. Both null on a side with no rows. */
1710
+ newestAt: v.nullable(v.string()),
1711
+ oldestAt: v.nullable(v.string()),
1712
+ });
1713
+ /**
1714
+ * Which side is too thin for a delta to mean anything.
1715
+ *
1716
+ * Named rather than a boolean because the two take different sentences: too few
1717
+ * runs *since* the change is the ordinary state right after an edit, while too
1718
+ * few *before* it means there was never a baseline to compare against.
1719
+ */
1720
+ export const GuideHistoryChangeSuppressionSchema = v.picklist(['since', 'before', 'both']);
1721
+ /**
1722
+ * Which way the pair points, or null while the delta is withheld.
1723
+ *
1724
+ * A reading of a *set* of runs, never a verdict on one — the vocabulary
1725
+ * `aligned | misaligned | not_applicable` is untouched, and nothing derived
1726
+ * here is written back to a row.
1727
+ */
1728
+ export const GuideHistoryChangeDirectionSchema = v.picklist([
1729
+ 'improved',
1730
+ 'regressed',
1731
+ 'unchanged',
1732
+ ]);
1733
+ /**
1734
+ * The guide's last edit, read as two windows
1735
+ * (`insight-to-proven-change` §A, surfaced by `guide-history-for-agents`
1736
+ * deliverable 3).
1737
+ *
1738
+ * > Changed 12 Aug. Before: misaligned in 6 of 8 runs that engaged it.
1739
+ * > Since: 0 of 11.
1740
+ *
1741
+ * **Null on the response is a state, not a missing field.** It means this guide
1742
+ * has no earlier wording that produced evidence — a guide on its first
1743
+ * revision, which is the normal state and not an error.
1744
+ *
1745
+ * **Paired, never merged**, and **never causal**: this states two windows and
1746
+ * their denominators and stops. The model changed, the task mix changed and the
1747
+ * codebase changed too, so "since" is the strongest word the evidence supports.
1748
+ */
1749
+ export const GuideHistoryChangeSchema = v.object({
1750
+ /** The revision that preceded the change. */
1751
+ before: GuideHistoryChangeSideSchema,
1752
+ /** The wording the guide stands at now. */
1753
+ since: GuideHistoryChangeSideSchema,
1754
+ /**
1755
+ * `since` minus `before`, in `[-1, 1]`, or **null whenever the pair is
1756
+ * suppressed** or either side never engaged the guide. Null is not zero: one
1757
+ * says the evidence does not support a number, the other would be a claim.
1758
+ */
1759
+ alignmentRateDelta: v.nullable(v.number()),
1760
+ /**
1761
+ * Which side is below the sample floor, or null when neither is and the delta
1762
+ * stands. `'since'` is the ordinary post-edit state — *not enough runs since
1763
+ * this change* — and is reported rather than omitted.
1764
+ */
1765
+ suppressedBy: v.nullable(GuideHistoryChangeSuppressionSchema),
1766
+ /** The delta's sign, or null while it is withheld. `unchanged` is exactly zero. */
1767
+ direction: v.nullable(GuideHistoryChangeDirectionSchema),
1768
+ /** Either side is a bounded sample, so neither is a lifetime total. */
1769
+ isWindowed: v.boolean(),
1770
+ /** The per-revision cap each side was bounded by, so "sample" has a size. */
1771
+ windowSize: v.pipe(v.number(), v.integer()),
1772
+ /**
1773
+ * When the current wording was recorded, ISO — the boundary between the two
1774
+ * windows, and null when no version row carries it.
1775
+ *
1776
+ * A date, never an attribution: it says when the window opened, not that the
1777
+ * edit caused what happened inside it.
1778
+ */
1779
+ changedAt: v.nullable(v.string()),
1780
+ });
1781
+ /** Findings returned per response, and the character bound on each reasoning. */
1782
+ export const MAX_GUIDE_HISTORY_FINDINGS = 5;
1783
+ export const MAX_GUIDE_HISTORY_REASONING_CHARS = 1200;
1784
+ /**
1785
+ * One recorded finding: a run that judged this guide misaligned, and why.
1786
+ *
1787
+ * `reasoning` arrives **already wrapped in the response's untrusted markers**
1788
+ * rather than raw. It is model-authored text derived from a transcript, so the
1789
+ * discipline `runGradePrompt` applies to such text on the way in applies on the
1790
+ * way out (`apps/dashboard/src/lib/eval/promptSafety.ts` →
1791
+ * `deriveDelimiterToken`); wrapping it at the source is what makes the boundary
1792
+ * unforgeable, since a consumer handed raw text plus separate markers can
1793
+ * simply not use them.
1794
+ *
1795
+ * `isCurrentRevision` is not optional detail. A payload that scopes its *rate*
1796
+ * to the current wording and then hands over reasoning about deleted sentences,
1797
+ * unlabelled, reproduces inside one response the conflation
1798
+ * `pattern-evidence-guide-revision` removed from the dashboard.
1799
+ */
1800
+ export const GuideHistoryFindingSchema = v.object({
1801
+ runId: NonEmptyStringSchema,
1802
+ occurredAt: v.string(),
1803
+ revision: v.nullable(GuideHistoryRevisionSchema),
1804
+ isCurrentRevision: v.boolean(),
1805
+ reasoning: v.string(),
1806
+ });
1807
+ /** The guide the identifier resolved to, echoed so the agent can check itself. */
1808
+ export const GuideHistoryGuideSchema = v.object({
1809
+ id: NonEmptyStringSchema,
1810
+ title: v.string(),
1811
+ path: v.nullable(SafeRelativePosixPathSchema),
1812
+ root: v.nullable(GuideDiscoveryRootSchema),
1813
+ });
1814
+ /**
1815
+ * The markers every `reasoning` block in this response is wrapped in, plus a
1816
+ * statement of what they mean.
1817
+ *
1818
+ * Generated per response from the content itself, so no marker-like text inside
1819
+ * a block can end it early — a property `deriveDelimiterToken` checks rather
1820
+ * than assumes.
1821
+ */
1822
+ export const GuideHistoryUntrustedSchema = v.object({
1823
+ token: NonEmptyStringSchema,
1824
+ startMarker: NonEmptyStringSchema,
1825
+ endMarker: NonEmptyStringSchema,
1826
+ note: v.string(),
1827
+ });
1828
+ export const GuideHistoryResponseSchema = v.object({
1829
+ guide: GuideHistoryGuideSchema,
1830
+ /** The wording the window is about, or null when the guide has no revision identity. */
1831
+ currentRevision: v.nullable(GuideHistoryRevisionSchema),
1832
+ state: GuideHistoryStateSchema,
1833
+ window: GuideHistoryWindowSchema,
1834
+ /**
1835
+ * The last edit's two windows, or **null when there is no earlier wording to
1836
+ * compare against**.
1837
+ *
1838
+ * Present-and-null rather than omitted: a guide on its first revision has no
1839
+ * delta, and that is an answer. An absent key would leave a reader unable to
1840
+ * tell "no edit to measure" from "this server does not report deltas".
1841
+ */
1842
+ change: v.nullable(GuideHistoryChangeSchema),
1843
+ findings: v.array(GuideHistoryFindingSchema),
1844
+ /**
1845
+ * Misaligned rows in the window beyond the `MAX_GUIDE_HISTORY_FINDINGS`
1846
+ * returned. Reported rather than silently truncated: a caller reading five
1847
+ * findings has no other way to know it is reading five of forty.
1848
+ */
1849
+ findingsOmitted: v.pipe(v.number(), v.integer()),
1850
+ untrusted: GuideHistoryUntrustedSchema,
1851
+ });
1852
+ // ---------------------------------------------------------------------------
1427
1853
  // Parse wrappers (throw ValiError on invalid input)
1428
1854
  // ---------------------------------------------------------------------------
1429
1855
  export function parseAgentConfig(data) {
@@ -1552,4 +1978,10 @@ export function parseExtractedFeedbackBatch(data) {
1552
1978
  export function parseActionEntry(data) {
1553
1979
  return v.parse(ActionEntrySchema, data);
1554
1980
  }
1981
+ export function parseGuideHistoryRequest(data) {
1982
+ return v.parse(GuideHistoryRequestSchema, data);
1983
+ }
1984
+ export function parseGuideHistoryResponse(data) {
1985
+ return v.parse(GuideHistoryResponseSchema, data);
1986
+ }
1555
1987
  //# sourceMappingURL=schemas.js.map