@basou/core 0.42.1 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/schemas/approval.schema.json +12 -24
- package/schemas/event.schema.json +53 -89
- package/schemas/manifest.schema.json +2 -2
- package/schemas/session-import.schema.json +60 -100
- package/schemas/session.schema.json +7 -11
- package/schemas/status.schema.json +1 -1
- package/schemas/task-index.schema.json +2 -2
- package/schemas/task.schema.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -5803,8 +5803,20 @@ declare const SchemaVersionSchema: z.ZodString;
|
|
|
5803
5803
|
/**
|
|
5804
5804
|
* ISO 8601 timestamp with explicit timezone offset (e.g. `+09:00`).
|
|
5805
5805
|
*
|
|
5806
|
-
*
|
|
5807
|
-
*
|
|
5806
|
+
* Parsing goes through `.refine`, which is opaque to JSON Schema generation,
|
|
5807
|
+
* so the `.meta` mirrors the same expression as a representable `pattern` —
|
|
5808
|
+
* the way the prefixed-ID schemas below do. Both are built from the single
|
|
5809
|
+
* {@link ISO_TIMESTAMP_PATTERN} constant, so the artifact cannot drift from
|
|
5810
|
+
* what the runtime actually accepts.
|
|
5811
|
+
*
|
|
5812
|
+
* It deliberately does NOT declare `format: "date-time"`. That format names
|
|
5813
|
+
* RFC 3339, and the two sets cross rather than nest: basou takes a timestamp
|
|
5814
|
+
* without seconds, which RFC 3339 does not, and refuses the lowercase
|
|
5815
|
+
* designators and the leap second that RFC 3339 allows. Declaring the format
|
|
5816
|
+
* made one artifact answer two ways from the same bytes — a validator
|
|
5817
|
+
* asserting it rejected `2026-09-16T01:23Z`, one treating it as an annotation
|
|
5818
|
+
* (the JSON Schema 2020-12 default) accepted it. The `pattern` is the
|
|
5819
|
+
* contract, and `description` says so, because no format name states this set.
|
|
5808
5820
|
*/
|
|
5809
5821
|
declare const IsoTimestampSchema: z.ZodString;
|
|
5810
5822
|
/** Workspace ID schema: validates `ws_<26-char ULID>`. */
|
package/dist/index.js
CHANGED
|
@@ -363,7 +363,14 @@ var SchemaVersionSchema = z.string().regex(/^0\.\d+\.\d+$/, {
|
|
|
363
363
|
message: "unsupported .basou format version: this basou reads format major 0 (0.x.y). If this workspace was written by a newer basou, upgrade basou to open it."
|
|
364
364
|
});
|
|
365
365
|
var CacheVersionSchema = z.literal("0.1.0");
|
|
366
|
-
var
|
|
366
|
+
var ISO_TIMESTAMP_PATTERN = "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$";
|
|
367
|
+
var isoTimestampRegex = new RegExp(ISO_TIMESTAMP_PATTERN);
|
|
368
|
+
var IsoTimestampSchema = z.string().refine((value) => isoTimestampRegex.test(value), {
|
|
369
|
+
message: "Expected an ISO 8601 timestamp with a timezone offset"
|
|
370
|
+
}).meta({
|
|
371
|
+
description: "Timestamp with an offset or Z. The pattern is normative: RFC 3339 date-time with uppercase designators, no leap second, and optional seconds.",
|
|
372
|
+
pattern: ISO_TIMESTAMP_PATTERN
|
|
373
|
+
});
|
|
367
374
|
var createPrefixedIdSchema = (prefix) => {
|
|
368
375
|
const refiner = (value) => isValidPrefixedId(value) && value.startsWith(`${prefix}_`);
|
|
369
376
|
return z.string().refine(refiner, { message: `Expected ${prefix}_<ULID>` }).meta({
|
|
@@ -5628,7 +5635,7 @@ function formatHandoffBody(args) {
|
|
|
5628
5635
|
lines.push("(no decisions recorded yet)");
|
|
5629
5636
|
} else {
|
|
5630
5637
|
const last = args.latestDecision;
|
|
5631
|
-
lines.push(`- ${last.title} [${
|
|
5638
|
+
lines.push(`- ${last.title} [${last.decisionId}]`);
|
|
5632
5639
|
if (args.latestActivityAt !== null && isTrailingStale(args.latestActivityAt, last.occurredAt)) {
|
|
5633
5640
|
lines.push(` - ${t.handoff.decisionStaleNote}`);
|
|
5634
5641
|
}
|
|
@@ -5646,7 +5653,7 @@ function formatHandoffBody(args) {
|
|
|
5646
5653
|
lines.push(t.handoff.headingOpenTracks);
|
|
5647
5654
|
lines.push("");
|
|
5648
5655
|
for (const track of shown) {
|
|
5649
|
-
lines.push(`- ${track.title} [${
|
|
5656
|
+
lines.push(`- ${track.title} [${track.decisionId}]`);
|
|
5650
5657
|
if (track.rationale !== null && track.rationale.trim() !== "") {
|
|
5651
5658
|
lines.push(` - ${t.common.trackWhyLabel}: ${handoffRationale(track.rationale)}`);
|
|
5652
5659
|
}
|
|
@@ -6246,7 +6253,7 @@ function formatOrientationBody(summary, opts) {
|
|
|
6246
6253
|
const dec = summary.latestDecision;
|
|
6247
6254
|
const decAge = t.relativeAge(dec.occurredAt, now);
|
|
6248
6255
|
lines.push(
|
|
6249
|
-
`- ${t.common.latestDecisionLabel}: ${dec.title} [${
|
|
6256
|
+
`- ${t.common.latestDecisionLabel}: ${dec.title} [${dec.decisionId}] (${decAge})${hostSuffix(dec.host)}`
|
|
6250
6257
|
);
|
|
6251
6258
|
const activityAt = summary.freshness.latestActivityAt;
|
|
6252
6259
|
if (activityAt !== null && isTrailingStale(activityAt, dec.occurredAt)) {
|
|
@@ -6353,9 +6360,7 @@ function formatOrientationBody(summary, opts) {
|
|
|
6353
6360
|
lines.push(t.orientation.openTracksHeading(summary.openTracks.length));
|
|
6354
6361
|
for (const track of shownTracks) {
|
|
6355
6362
|
const trackAge = t.relativeAge(track.occurredAt, now);
|
|
6356
|
-
lines.push(
|
|
6357
|
-
`- ${track.title} [${shortId(track.decisionId)}] (${trackAge})${hostSuffix(track.host)}`
|
|
6358
|
-
);
|
|
6363
|
+
lines.push(`- ${track.title} [${track.decisionId}] (${trackAge})${hostSuffix(track.host)}`);
|
|
6359
6364
|
if (track.rationale !== null && track.rationale.trim() !== "") {
|
|
6360
6365
|
lines.push(` - ${t.common.trackWhyLabel}: ${trackRationale(track.rationale)}`);
|
|
6361
6366
|
}
|