@basou/core 0.42.2 → 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 +8 -1
- 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({
|