@mossbear/protocol 0.1.0-alpha.29 → 0.1.0-alpha.30
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/contextKinds.d.ts +138 -0
- package/dist/contextKinds.d.ts.map +1 -0
- package/dist/contextKinds.js +121 -0
- package/dist/contextKinds.js.map +1 -0
- package/dist/contextKinds.test.d.ts +2 -0
- package/dist/contextKinds.test.d.ts.map +1 -0
- package/dist/contextKinds.test.js +154 -0
- package/dist/contextKinds.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +777 -28
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +457 -10
- package/dist/schemas.js.map +1 -1
- package/dist/schemas.test.js +189 -1
- package/dist/schemas.test.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +5 -6
package/dist/schemas.d.ts.map
CHANGED
|
@@ -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,CAA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;;;;;;;;;;;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
|
-
|
|
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
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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
|
-
|
|
552
|
-
|
|
553
|
-
|
|
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`));
|
|
@@ -1231,6 +1238,94 @@ export const RuleFileManifestSchema = v.object({
|
|
|
1231
1238
|
*/
|
|
1232
1239
|
truncated: v.optional(v.boolean()),
|
|
1233
1240
|
});
|
|
1241
|
+
/**
|
|
1242
|
+
* Where the checkout stood when a run closed — the git head the `SessionEnd`
|
|
1243
|
+
* hook observed, and the branch it was on.
|
|
1244
|
+
*
|
|
1245
|
+
* The join the ledger has never had. Every existing query walks run → what
|
|
1246
|
+
* happened; nothing walks commit → which run, because until this field no
|
|
1247
|
+
* commit, branch or PR identifier existed anywhere in the pipeline
|
|
1248
|
+
* (docs/plans/run-commit-anchor-plan.md). An anchor also cannot be backfilled:
|
|
1249
|
+
* a run that closes without one is unanchorable forever, which is why it is
|
|
1250
|
+
* captured before its first reader exists.
|
|
1251
|
+
*
|
|
1252
|
+
* Absence is an ordinary answer rather than a failure to report. A session runs
|
|
1253
|
+
* outside a git repo; git is missing, or slow enough that the capture's own
|
|
1254
|
+
* timeout fires — the field is then simply not sent, and the run's columns stay
|
|
1255
|
+
* null. A checkout on a detached head sends an anchor with a null `branch`.
|
|
1256
|
+
* None of it says anything to the user: a run that produced no identifiable
|
|
1257
|
+
* commit is a normal run, and the CLI has nothing to offer them about it.
|
|
1258
|
+
*
|
|
1259
|
+
* There is deliberately no `prNumber` here. It is the one part of the anchor
|
|
1260
|
+
* that is not free: no environment variable in a real cloud agent session names
|
|
1261
|
+
* a PR (checked 2026-08-22 — see the spec's Open questions), so a wire field
|
|
1262
|
+
* for it would be protocol surface no producer ever fills. `runs.pr_number`
|
|
1263
|
+
* exists as a reserved column; the wire waits for a mechanism.
|
|
1264
|
+
*
|
|
1265
|
+
* Not a per-action field and not a per-session map: it describes the machine
|
|
1266
|
+
* and the checkout at one instant, the way `RuleFileManifestSchema` does, and
|
|
1267
|
+
* applies to whichever runs the request closes.
|
|
1268
|
+
*/
|
|
1269
|
+
export const CommitAnchorSchema = v.object({
|
|
1270
|
+
/**
|
|
1271
|
+
* `git rev-parse HEAD`. Full 40-hex only — an abbreviated sha is ambiguous
|
|
1272
|
+
* across repos and would make the reverse index it feeds silently lossy.
|
|
1273
|
+
*
|
|
1274
|
+
* Required *within* the object, while the object itself is optional. The two
|
|
1275
|
+
* together say the one thing worth saying: an anchor exists exactly when a
|
|
1276
|
+
* head was observed. A nullable `headSha` would add a third state — "an
|
|
1277
|
+
* anchor, but of nothing" — that no caller can produce (the only checkout
|
|
1278
|
+
* with a branch and no head is one with no commits, where both probes fail)
|
|
1279
|
+
* and every reader would still have to handle.
|
|
1280
|
+
*/
|
|
1281
|
+
headSha: v.pipe(v.string(), v.regex(/^[0-9a-f]{40}$/)),
|
|
1282
|
+
/**
|
|
1283
|
+
* The branch name, or null on a detached head — which is a real state a
|
|
1284
|
+
* bisect or a CI checkout sits in, not an error. Capped so a pathological
|
|
1285
|
+
* ref name cannot widen the payload.
|
|
1286
|
+
*/
|
|
1287
|
+
branch: v.nullable(v.pipe(v.string(), v.minLength(1), v.maxLength(255))),
|
|
1288
|
+
});
|
|
1289
|
+
/**
|
|
1290
|
+
* The agent's closing account of the run — the prose of the session's final
|
|
1291
|
+
* assistant message (docs/plans/claim-vs-actual-discrepancy-plan.md, slice 1).
|
|
1292
|
+
*
|
|
1293
|
+
* **The same content class as narration, so it is literally the same schema**
|
|
1294
|
+
* rather than a twin of it: produced by the same client-side pipeline (text
|
|
1295
|
+
* blocks only → strip code structurally → redact prose → bound), carrying the
|
|
1296
|
+
* same guarantees, capped at the same `MAX_ACTION_NARRATION_CHARS`, and
|
|
1297
|
+
* rejected on the same line-initial fence. A separate declaration with the same
|
|
1298
|
+
* body would be two homes for one rule and would drift the first time either
|
|
1299
|
+
* moved. What differs is *which* prose and how much of it — the client's
|
|
1300
|
+
* concern, decided in `extractRunSelfReport`, not the wire's.
|
|
1301
|
+
*
|
|
1302
|
+
* `minLength(1)` because absence has exactly one representation here: a run
|
|
1303
|
+
* with nothing to report omits the field. An empty string would be a second
|
|
1304
|
+
* spelling of null that every reader would then have to handle.
|
|
1305
|
+
*
|
|
1306
|
+
* **It names its session, and that is not decoration.** This is where the
|
|
1307
|
+
* report parts company with `CommitAnchorSchema`, which carries no session id
|
|
1308
|
+
* and is right not to: an anchor describes the *checkout*, so it applies to
|
|
1309
|
+
* whichever runs a request closes. A self-report describes the work of exactly
|
|
1310
|
+
* one session. A request can close more than one — `buildSyncBatches` marks
|
|
1311
|
+
* every session in the upload's actions completed when `sessionComplete` is set
|
|
1312
|
+
* (`packages/cli/src/sync-batches.ts:118-126`), which a `SessionEnd` sync hits
|
|
1313
|
+
* whenever an earlier session's `Stop` sync failed and left a backlog. Without
|
|
1314
|
+
* the id the server would write one session's closing summary onto the other
|
|
1315
|
+
* session's run, and slice 2 would then grade a run's actions against a report
|
|
1316
|
+
* of different work: a confidently wrong finding, which this pipeline ranks
|
|
1317
|
+
* below having none at all (`packages/cli/src/transcript/narration.ts:1-20`).
|
|
1318
|
+
*
|
|
1319
|
+
* The id makes the server the enforcement point rather than the client. A CLI
|
|
1320
|
+
* that attaches the report to the wrong batch cannot misattribute it, because
|
|
1321
|
+
* the writer matches on this field instead of trusting placement.
|
|
1322
|
+
*/
|
|
1323
|
+
export const RunSelfReportSchema = v.object({
|
|
1324
|
+
/** The session whose closing message this is. Must be one the request closes. */
|
|
1325
|
+
sessionId: NonEmptyStringSchema,
|
|
1326
|
+
/** The report itself — same content class and cap as narration. */
|
|
1327
|
+
text: v.pipe(NarrationTextSchema, v.minLength(1)),
|
|
1328
|
+
});
|
|
1234
1329
|
export const DashboardSyncRequestSchema = v.object({
|
|
1235
1330
|
actions: v.optional(v.pipe(v.array(DashboardSyncActionSchema), v.maxLength(MAX_SYNC_ACTIONS_BATCH))),
|
|
1236
1331
|
guideSuggestions: v.optional(v.pipe(v.array(DashboardGuideSuggestionSchema), v.maxLength(MAX_SYNC_AUX_BATCH))),
|
|
@@ -1282,6 +1377,38 @@ export const DashboardSyncRequestSchema = v.object({
|
|
|
1282
1377
|
* absence as "delivery unobserved", never as "nothing was delivered".
|
|
1283
1378
|
*/
|
|
1284
1379
|
ruleManifest: v.optional(RuleFileManifestSchema),
|
|
1380
|
+
/**
|
|
1381
|
+
* Where the checkout stood when this request's `completedSessionIds` closed —
|
|
1382
|
+
* see {@link CommitAnchorSchema}.
|
|
1383
|
+
*
|
|
1384
|
+
* Rides only the batches that name a completed session, which is the opposite
|
|
1385
|
+
* of `ruleManifest`'s placement rule and deliberately so. The ordinary
|
|
1386
|
+
* `SessionEnd` request carries **no actions at all** — the preceding `Stop`
|
|
1387
|
+
* hook synced and advanced the run-log cursor — so a field attached to
|
|
1388
|
+
* action-carrying batches would be absent from exactly the request that
|
|
1389
|
+
* exists to report the close.
|
|
1390
|
+
*
|
|
1391
|
+
* Optional, and an absent anchor is never an error: a CLI predating this
|
|
1392
|
+
* sends none, and the server must read its absence as "no head observed"
|
|
1393
|
+
* rather than refusing the close.
|
|
1394
|
+
*/
|
|
1395
|
+
commitAnchor: v.optional(CommitAnchorSchema),
|
|
1396
|
+
/**
|
|
1397
|
+
* What the agent said it did, as its own closing message — see
|
|
1398
|
+
* {@link RunSelfReportSchema}.
|
|
1399
|
+
*
|
|
1400
|
+
* Rides the same batches as `commitAnchor` and for the same reason: it
|
|
1401
|
+
* describes the *session that just ended*, and the ordinary `SessionEnd`
|
|
1402
|
+
* request carries no actions to attach it to. The server writes it onto the
|
|
1403
|
+
* runs this request closes.
|
|
1404
|
+
*
|
|
1405
|
+
* Optional, and its absence is never an error or a finding. A CLI predating
|
|
1406
|
+
* this sends none; so does a session with no transcript, one whose repo has
|
|
1407
|
+
* narration switched off, and one that ended without the agent speaking. All
|
|
1408
|
+
* of them are ordinary runs, and nothing downstream distinguishes them —
|
|
1409
|
+
* "could not compare" is not a verdict and renders nothing.
|
|
1410
|
+
*/
|
|
1411
|
+
selfReport: v.optional(RunSelfReportSchema),
|
|
1285
1412
|
});
|
|
1286
1413
|
export const ExtractedGuideSuggestionSchema = v.object({
|
|
1287
1414
|
id: v.string(),
|
|
@@ -1424,6 +1551,320 @@ export function isKnownActionType(value) {
|
|
|
1424
1551
|
// `apps/dashboard/src/lib/eval/runGradeSchema.ts` — one shape of that fact, not
|
|
1425
1552
|
// two packages holding copies that a comment has to keep in step.
|
|
1426
1553
|
// ---------------------------------------------------------------------------
|
|
1554
|
+
// Guide verdict history (guide-history-for-agents)
|
|
1555
|
+
// ---------------------------------------------------------------------------
|
|
1556
|
+
/**
|
|
1557
|
+
* The read an agent makes of a guide's own grading record, so the improvement
|
|
1558
|
+
* loop the user already runs in-conversation ("what could be improved in this
|
|
1559
|
+
* skill?") has the evidence Mossbear holds and the agent does not.
|
|
1560
|
+
*
|
|
1561
|
+
* **Evidence out, never instructions out.** Nothing in this contract carries a
|
|
1562
|
+
* directive to change anything, and nothing on the server writes as a result of
|
|
1563
|
+
* it. It is a read, and the decision stays in the user's conversation
|
|
1564
|
+
* (`docs/plans/guide-history-for-agents-plan.md` → Boundaries).
|
|
1565
|
+
*/
|
|
1566
|
+
/**
|
|
1567
|
+
* How the agent names the guide.
|
|
1568
|
+
*
|
|
1569
|
+
* Either a repo-relative path exactly as the guide file declares it
|
|
1570
|
+
* (`.claude/skills/reviewer/SKILL.md`, `AGENTS.md`), or the bare name of a
|
|
1571
|
+
* skill (`reviewer`), which the server expands to the skill layouts it knows.
|
|
1572
|
+
* Both resolve through the `(root, path)` identity import already reconciles
|
|
1573
|
+
* on, rather than a second one invented here.
|
|
1574
|
+
*
|
|
1575
|
+
* Bounded and shape-checked at the boundary rather than at the query string: it
|
|
1576
|
+
* reaches a SQL predicate, and an identifier is not free text.
|
|
1577
|
+
*/
|
|
1578
|
+
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'));
|
|
1579
|
+
/**
|
|
1580
|
+
* The request an agent sends.
|
|
1581
|
+
*
|
|
1582
|
+
* `root` is optional and is the disambiguator, not decoration: `.claude/skills`
|
|
1583
|
+
* is scanned under **both** discovery roots
|
|
1584
|
+
* (`packages/cli/src/rules/discover.ts:101,105`), so a project skill and its
|
|
1585
|
+
* `~/.claude/skills` twin declare the same path string. When the identifier
|
|
1586
|
+
* reaches guides under more than one root and no root was given, the server
|
|
1587
|
+
* refuses and names both rather than picking one — answering a question about
|
|
1588
|
+
* the wrong file's history is worse than not answering it.
|
|
1589
|
+
*/
|
|
1590
|
+
export const GuideHistoryRequestSchema = v.object({
|
|
1591
|
+
guide: GuideHistoryIdentifierSchema,
|
|
1592
|
+
root: v.optional(GuideDiscoveryRootSchema),
|
|
1593
|
+
/**
|
|
1594
|
+
* Which repo's copy — **the axis import itself reconciles on**, and the one
|
|
1595
|
+
* that actually resolves the common collision.
|
|
1596
|
+
*
|
|
1597
|
+
* `root` alone does not, and assuming it did was the first version's defect:
|
|
1598
|
+
* import's resolution key is `(userId, repoId, root, path)` and two files at
|
|
1599
|
+
* one path under different repos deliberately stay two rows
|
|
1600
|
+
* (`apps/dashboard/app/api/rules/import+api.ts:170-171`, Decision 6). So any
|
|
1601
|
+
* user with two repos has two guides at `(project, AGENTS.md)`, and a refusal
|
|
1602
|
+
* telling them to pass `root` names the one field that cannot separate those.
|
|
1603
|
+
*
|
|
1604
|
+
* `projectId` is the portable identity a repo commits and every clone agrees
|
|
1605
|
+
* on; `repoId` is the machine-local digest. Both are optional and both are
|
|
1606
|
+
* what the caller already sends at import time, so an agent running inside a
|
|
1607
|
+
* repo supplies them without being asked.
|
|
1608
|
+
*/
|
|
1609
|
+
projectId: v.optional(NonEmptyStringSchema),
|
|
1610
|
+
repoId: v.optional(NonEmptyStringSchema),
|
|
1611
|
+
/**
|
|
1612
|
+
* The exact guide, when the caller has already been shown the candidates.
|
|
1613
|
+
*
|
|
1614
|
+
* The escape hatch that makes the refusal always satisfiable: two repos can
|
|
1615
|
+
* be indistinguishable to a caller that knows neither id (a guide imported
|
|
1616
|
+
* before repo identity was recorded carries neither), and an error whose
|
|
1617
|
+
* remedy cannot be carried out is worse than no remedy at all. The 409 names
|
|
1618
|
+
* this id for every candidate.
|
|
1619
|
+
*/
|
|
1620
|
+
guideId: v.optional(NonEmptyStringSchema),
|
|
1621
|
+
});
|
|
1622
|
+
/**
|
|
1623
|
+
* One revision of a guide's wording: the body file and the version it stood at.
|
|
1624
|
+
*
|
|
1625
|
+
* The pair, never a bare version number — `guide_files.version` restarts at 1
|
|
1626
|
+
* per row, so a number alone compares equal across two different files
|
|
1627
|
+
* (`apps/dashboard/src/lib/guides/guideRevision.ts`).
|
|
1628
|
+
*/
|
|
1629
|
+
export const GuideHistoryRevisionSchema = v.object({
|
|
1630
|
+
bodyItemId: NonEmptyStringSchema,
|
|
1631
|
+
version: v.pipe(v.number(), v.integer()),
|
|
1632
|
+
});
|
|
1633
|
+
/**
|
|
1634
|
+
* Which of three states the guide's record is in — a required field rather than
|
|
1635
|
+
* something a reader infers from empty arrays.
|
|
1636
|
+
*
|
|
1637
|
+
* The distinction is the whole point of returning it: `unevaluated` means no
|
|
1638
|
+
* graded run has ever produced a verdict, while `awaiting_current_revision`
|
|
1639
|
+
* means the guide has a real record that is entirely about wording the user has
|
|
1640
|
+
* since rewritten. Collapsing those two onto "no data" is exactly the claim the
|
|
1641
|
+
* dashboard stopped making (`guidePerformance.ts` → `isAwaitingCurrentRevision`),
|
|
1642
|
+
* and an agent reading an absence as a verdict is the same error one screen
|
|
1643
|
+
* further out.
|
|
1644
|
+
*/
|
|
1645
|
+
export const GuideHistoryStateSchema = v.picklist([
|
|
1646
|
+
'evaluated',
|
|
1647
|
+
'awaiting_current_revision',
|
|
1648
|
+
'unevaluated',
|
|
1649
|
+
]);
|
|
1650
|
+
/**
|
|
1651
|
+
* The verdict window, scoped to the revision named beside it.
|
|
1652
|
+
*
|
|
1653
|
+
* Both denominators travel: `applicable` is the rate's own denominator
|
|
1654
|
+
* (`aligned + misaligned`), `total` is the window's row count including the runs
|
|
1655
|
+
* that never engaged the guide. Rendering one as the other is the defect
|
|
1656
|
+
* `alignment-rate-sample-disclosure` was filed for, and a payload carrying only
|
|
1657
|
+
* one of them would hand an agent the same mistake.
|
|
1658
|
+
*/
|
|
1659
|
+
export const GuideHistoryWindowSchema = v.object({
|
|
1660
|
+
/** Rows summarized, after the revision narrow. */
|
|
1661
|
+
total: v.pipe(v.number(), v.integer()),
|
|
1662
|
+
aligned: v.pipe(v.number(), v.integer()),
|
|
1663
|
+
misaligned: v.pipe(v.number(), v.integer()),
|
|
1664
|
+
/** In context, never engaged. Neither a pass nor a failure. */
|
|
1665
|
+
notApplicable: v.pipe(v.number(), v.integer()),
|
|
1666
|
+
/** `aligned + misaligned` — the rate's own denominator. */
|
|
1667
|
+
applicable: v.pipe(v.number(), v.integer()),
|
|
1668
|
+
/** `aligned / applicable`, or **null when no run engaged the guide**. */
|
|
1669
|
+
alignmentRate: v.nullable(v.number()),
|
|
1670
|
+
/** The rows hit the per-guide cap: a bounded window, never a lifetime total. */
|
|
1671
|
+
isWindowed: v.boolean(),
|
|
1672
|
+
/** The cap the rows were fetched under, so a reader can say what "windowed" means. */
|
|
1673
|
+
windowSize: v.pipe(v.number(), v.integer()),
|
|
1674
|
+
/**
|
|
1675
|
+
* Verdicts fetched and then dropped by the revision narrow — about wording
|
|
1676
|
+
* that is no longer current, or citing no revision at all. A **floor** rather
|
|
1677
|
+
* than a total whenever `isWindowed`, because rows past the cap were never
|
|
1678
|
+
* fetched.
|
|
1679
|
+
*/
|
|
1680
|
+
olderRevisionRows: v.pipe(v.number(), v.integer()),
|
|
1681
|
+
/**
|
|
1682
|
+
* `applicable` is too small for the percentage to mean anything — threshold
|
|
1683
|
+
* `applicable < 3` (founder, 2026-08-22,
|
|
1684
|
+
* `docs/plans/alignment-rate-sample-disclosure-plan.md` → Resolved). Read the
|
|
1685
|
+
* counts, not the rate.
|
|
1686
|
+
*/
|
|
1687
|
+
isLowConfidence: v.boolean(),
|
|
1688
|
+
});
|
|
1689
|
+
/**
|
|
1690
|
+
* One side of a guide edit's before/after pair — the wording, and what the runs
|
|
1691
|
+
* that engaged it did.
|
|
1692
|
+
*
|
|
1693
|
+
* Structurally a window like `GuideHistoryWindow` and deliberately not that
|
|
1694
|
+
* schema: these two sides are bounded **per revision** by a different query
|
|
1695
|
+
* (`apps/dashboard/src/server/guides/revisionWindows.ts`), so `isSaturated` is
|
|
1696
|
+
* the server's own measurement of its partition rather than the client-side
|
|
1697
|
+
* `isWindowed` inference, and the span each side covers is part of what makes
|
|
1698
|
+
* the pair readable.
|
|
1699
|
+
*
|
|
1700
|
+
* Both denominators travel here for the same reason they travel on the window:
|
|
1701
|
+
* a delta between two undisclosed denominators is worse than no number at all.
|
|
1702
|
+
*/
|
|
1703
|
+
export const GuideHistoryChangeSideSchema = v.object({
|
|
1704
|
+
/** The wording this side judges. */
|
|
1705
|
+
revision: GuideHistoryRevisionSchema,
|
|
1706
|
+
/** Rows in this side's window, including the runs that never engaged it. */
|
|
1707
|
+
total: v.pipe(v.number(), v.integer()),
|
|
1708
|
+
aligned: v.pipe(v.number(), v.integer()),
|
|
1709
|
+
misaligned: v.pipe(v.number(), v.integer()),
|
|
1710
|
+
notApplicable: v.pipe(v.number(), v.integer()),
|
|
1711
|
+
/** `aligned + misaligned` — this side's own denominator. */
|
|
1712
|
+
applicable: v.pipe(v.number(), v.integer()),
|
|
1713
|
+
/** `aligned / applicable`, or null when no run engaged this wording. */
|
|
1714
|
+
alignmentRate: v.nullable(v.number()),
|
|
1715
|
+
/** This side is below the sample floor, so read its counts and not its rate. */
|
|
1716
|
+
isLowConfidence: v.boolean(),
|
|
1717
|
+
/**
|
|
1718
|
+
* This side is a bounded sample of its revision rather than the whole record.
|
|
1719
|
+
* A saturated side beside an unsaturated one is two different kinds of
|
|
1720
|
+
* number, and comparing them without saying so is the defect the flag exists
|
|
1721
|
+
* to stop.
|
|
1722
|
+
*/
|
|
1723
|
+
isSaturated: v.boolean(),
|
|
1724
|
+
/** The span this side covers, ISO. Both null on a side with no rows. */
|
|
1725
|
+
newestAt: v.nullable(v.string()),
|
|
1726
|
+
oldestAt: v.nullable(v.string()),
|
|
1727
|
+
});
|
|
1728
|
+
/**
|
|
1729
|
+
* Which side is too thin for a delta to mean anything.
|
|
1730
|
+
*
|
|
1731
|
+
* Named rather than a boolean because the two take different sentences: too few
|
|
1732
|
+
* runs *since* the change is the ordinary state right after an edit, while too
|
|
1733
|
+
* few *before* it means there was never a baseline to compare against.
|
|
1734
|
+
*/
|
|
1735
|
+
export const GuideHistoryChangeSuppressionSchema = v.picklist(['since', 'before', 'both']);
|
|
1736
|
+
/**
|
|
1737
|
+
* Which way the pair points, or null while the delta is withheld.
|
|
1738
|
+
*
|
|
1739
|
+
* A reading of a *set* of runs, never a verdict on one — the vocabulary
|
|
1740
|
+
* `aligned | misaligned | not_applicable` is untouched, and nothing derived
|
|
1741
|
+
* here is written back to a row.
|
|
1742
|
+
*/
|
|
1743
|
+
export const GuideHistoryChangeDirectionSchema = v.picklist([
|
|
1744
|
+
'improved',
|
|
1745
|
+
'regressed',
|
|
1746
|
+
'unchanged',
|
|
1747
|
+
]);
|
|
1748
|
+
/**
|
|
1749
|
+
* The guide's last edit, read as two windows
|
|
1750
|
+
* (`insight-to-proven-change` §A, surfaced by `guide-history-for-agents`
|
|
1751
|
+
* deliverable 3).
|
|
1752
|
+
*
|
|
1753
|
+
* > Changed 12 Aug. Before: misaligned in 6 of 8 runs that engaged it.
|
|
1754
|
+
* > Since: 0 of 11.
|
|
1755
|
+
*
|
|
1756
|
+
* **Null on the response is a state, not a missing field.** It means this guide
|
|
1757
|
+
* has no earlier wording that produced evidence — a guide on its first
|
|
1758
|
+
* revision, which is the normal state and not an error.
|
|
1759
|
+
*
|
|
1760
|
+
* **Paired, never merged**, and **never causal**: this states two windows and
|
|
1761
|
+
* their denominators and stops. The model changed, the task mix changed and the
|
|
1762
|
+
* codebase changed too, so "since" is the strongest word the evidence supports.
|
|
1763
|
+
*/
|
|
1764
|
+
export const GuideHistoryChangeSchema = v.object({
|
|
1765
|
+
/** The revision that preceded the change. */
|
|
1766
|
+
before: GuideHistoryChangeSideSchema,
|
|
1767
|
+
/** The wording the guide stands at now. */
|
|
1768
|
+
since: GuideHistoryChangeSideSchema,
|
|
1769
|
+
/**
|
|
1770
|
+
* `since` minus `before`, in `[-1, 1]`, or **null whenever the pair is
|
|
1771
|
+
* suppressed** or either side never engaged the guide. Null is not zero: one
|
|
1772
|
+
* says the evidence does not support a number, the other would be a claim.
|
|
1773
|
+
*/
|
|
1774
|
+
alignmentRateDelta: v.nullable(v.number()),
|
|
1775
|
+
/**
|
|
1776
|
+
* Which side is below the sample floor, or null when neither is and the delta
|
|
1777
|
+
* stands. `'since'` is the ordinary post-edit state — *not enough runs since
|
|
1778
|
+
* this change* — and is reported rather than omitted.
|
|
1779
|
+
*/
|
|
1780
|
+
suppressedBy: v.nullable(GuideHistoryChangeSuppressionSchema),
|
|
1781
|
+
/** The delta's sign, or null while it is withheld. `unchanged` is exactly zero. */
|
|
1782
|
+
direction: v.nullable(GuideHistoryChangeDirectionSchema),
|
|
1783
|
+
/** Either side is a bounded sample, so neither is a lifetime total. */
|
|
1784
|
+
isWindowed: v.boolean(),
|
|
1785
|
+
/** The per-revision cap each side was bounded by, so "sample" has a size. */
|
|
1786
|
+
windowSize: v.pipe(v.number(), v.integer()),
|
|
1787
|
+
/**
|
|
1788
|
+
* When the current wording was recorded, ISO — the boundary between the two
|
|
1789
|
+
* windows, and null when no version row carries it.
|
|
1790
|
+
*
|
|
1791
|
+
* A date, never an attribution: it says when the window opened, not that the
|
|
1792
|
+
* edit caused what happened inside it.
|
|
1793
|
+
*/
|
|
1794
|
+
changedAt: v.nullable(v.string()),
|
|
1795
|
+
});
|
|
1796
|
+
/** Findings returned per response, and the character bound on each reasoning. */
|
|
1797
|
+
export const MAX_GUIDE_HISTORY_FINDINGS = 5;
|
|
1798
|
+
export const MAX_GUIDE_HISTORY_REASONING_CHARS = 1200;
|
|
1799
|
+
/**
|
|
1800
|
+
* One recorded finding: a run that judged this guide misaligned, and why.
|
|
1801
|
+
*
|
|
1802
|
+
* `reasoning` arrives **already wrapped in the response's untrusted markers**
|
|
1803
|
+
* rather than raw. It is model-authored text derived from a transcript, so the
|
|
1804
|
+
* discipline `runGradePrompt` applies to such text on the way in applies on the
|
|
1805
|
+
* way out (`apps/dashboard/src/lib/eval/promptSafety.ts` →
|
|
1806
|
+
* `deriveDelimiterToken`); wrapping it at the source is what makes the boundary
|
|
1807
|
+
* unforgeable, since a consumer handed raw text plus separate markers can
|
|
1808
|
+
* simply not use them.
|
|
1809
|
+
*
|
|
1810
|
+
* `isCurrentRevision` is not optional detail. A payload that scopes its *rate*
|
|
1811
|
+
* to the current wording and then hands over reasoning about deleted sentences,
|
|
1812
|
+
* unlabelled, reproduces inside one response the conflation
|
|
1813
|
+
* `pattern-evidence-guide-revision` removed from the dashboard.
|
|
1814
|
+
*/
|
|
1815
|
+
export const GuideHistoryFindingSchema = v.object({
|
|
1816
|
+
runId: NonEmptyStringSchema,
|
|
1817
|
+
occurredAt: v.string(),
|
|
1818
|
+
revision: v.nullable(GuideHistoryRevisionSchema),
|
|
1819
|
+
isCurrentRevision: v.boolean(),
|
|
1820
|
+
reasoning: v.string(),
|
|
1821
|
+
});
|
|
1822
|
+
/** The guide the identifier resolved to, echoed so the agent can check itself. */
|
|
1823
|
+
export const GuideHistoryGuideSchema = v.object({
|
|
1824
|
+
id: NonEmptyStringSchema,
|
|
1825
|
+
title: v.string(),
|
|
1826
|
+
path: v.nullable(SafeRelativePosixPathSchema),
|
|
1827
|
+
root: v.nullable(GuideDiscoveryRootSchema),
|
|
1828
|
+
});
|
|
1829
|
+
/**
|
|
1830
|
+
* The markers every `reasoning` block in this response is wrapped in, plus a
|
|
1831
|
+
* statement of what they mean.
|
|
1832
|
+
*
|
|
1833
|
+
* Generated per response from the content itself, so no marker-like text inside
|
|
1834
|
+
* a block can end it early — a property `deriveDelimiterToken` checks rather
|
|
1835
|
+
* than assumes.
|
|
1836
|
+
*/
|
|
1837
|
+
export const GuideHistoryUntrustedSchema = v.object({
|
|
1838
|
+
token: NonEmptyStringSchema,
|
|
1839
|
+
startMarker: NonEmptyStringSchema,
|
|
1840
|
+
endMarker: NonEmptyStringSchema,
|
|
1841
|
+
note: v.string(),
|
|
1842
|
+
});
|
|
1843
|
+
export const GuideHistoryResponseSchema = v.object({
|
|
1844
|
+
guide: GuideHistoryGuideSchema,
|
|
1845
|
+
/** The wording the window is about, or null when the guide has no revision identity. */
|
|
1846
|
+
currentRevision: v.nullable(GuideHistoryRevisionSchema),
|
|
1847
|
+
state: GuideHistoryStateSchema,
|
|
1848
|
+
window: GuideHistoryWindowSchema,
|
|
1849
|
+
/**
|
|
1850
|
+
* The last edit's two windows, or **null when there is no earlier wording to
|
|
1851
|
+
* compare against**.
|
|
1852
|
+
*
|
|
1853
|
+
* Present-and-null rather than omitted: a guide on its first revision has no
|
|
1854
|
+
* delta, and that is an answer. An absent key would leave a reader unable to
|
|
1855
|
+
* tell "no edit to measure" from "this server does not report deltas".
|
|
1856
|
+
*/
|
|
1857
|
+
change: v.nullable(GuideHistoryChangeSchema),
|
|
1858
|
+
findings: v.array(GuideHistoryFindingSchema),
|
|
1859
|
+
/**
|
|
1860
|
+
* Misaligned rows in the window beyond the `MAX_GUIDE_HISTORY_FINDINGS`
|
|
1861
|
+
* returned. Reported rather than silently truncated: a caller reading five
|
|
1862
|
+
* findings has no other way to know it is reading five of forty.
|
|
1863
|
+
*/
|
|
1864
|
+
findingsOmitted: v.pipe(v.number(), v.integer()),
|
|
1865
|
+
untrusted: GuideHistoryUntrustedSchema,
|
|
1866
|
+
});
|
|
1867
|
+
// ---------------------------------------------------------------------------
|
|
1427
1868
|
// Parse wrappers (throw ValiError on invalid input)
|
|
1428
1869
|
// ---------------------------------------------------------------------------
|
|
1429
1870
|
export function parseAgentConfig(data) {
|
|
@@ -1552,4 +1993,10 @@ export function parseExtractedFeedbackBatch(data) {
|
|
|
1552
1993
|
export function parseActionEntry(data) {
|
|
1553
1994
|
return v.parse(ActionEntrySchema, data);
|
|
1554
1995
|
}
|
|
1996
|
+
export function parseGuideHistoryRequest(data) {
|
|
1997
|
+
return v.parse(GuideHistoryRequestSchema, data);
|
|
1998
|
+
}
|
|
1999
|
+
export function parseGuideHistoryResponse(data) {
|
|
2000
|
+
return v.parse(GuideHistoryResponseSchema, data);
|
|
2001
|
+
}
|
|
1555
2002
|
//# sourceMappingURL=schemas.js.map
|