ushman-ledger 0.3.0 → 1.1.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +4 -14
  2. package/README.md +8 -56
  3. package/dist/archive-journal.d.ts +29 -18
  4. package/dist/archive-journal.d.ts.map +1 -1
  5. package/dist/archive-journal.js +17 -17
  6. package/dist/builders.d.ts +52 -374
  7. package/dist/builders.d.ts.map +1 -1
  8. package/dist/builders.js +10 -60
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +8 -14
  11. package/dist/handle.d.ts +2 -2
  12. package/dist/handle.d.ts.map +1 -1
  13. package/dist/handle.js +1 -14
  14. package/dist/index.d.ts +3 -5
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -4
  17. package/dist/lab-min.d.ts +7 -7
  18. package/dist/lab-min.d.ts.map +1 -1
  19. package/dist/lab-min.js +7 -9
  20. package/dist/list.d.ts +84 -325
  21. package/dist/list.d.ts.map +1 -1
  22. package/dist/read-index.d.ts +45 -57
  23. package/dist/read-index.d.ts.map +1 -1
  24. package/dist/read-index.js +16 -34
  25. package/dist/record.d.ts.map +1 -1
  26. package/dist/record.js +27 -114
  27. package/dist/recovery.d.ts +19 -8
  28. package/dist/recovery.d.ts.map +1 -1
  29. package/dist/recovery.js +13 -13
  30. package/dist/render/retro.d.ts.map +1 -1
  31. package/dist/render/retro.js +1 -4
  32. package/dist/schema/entry.d.ts +1365 -3291
  33. package/dist/schema/entry.d.ts.map +1 -1
  34. package/dist/schema/entry.js +184 -516
  35. package/dist/schema/manifest.d.ts +28 -41
  36. package/dist/schema/manifest.d.ts.map +1 -1
  37. package/dist/schema/manifest.js +20 -24
  38. package/dist/schema/note.d.ts +3 -9
  39. package/dist/schema/note.d.ts.map +1 -1
  40. package/dist/schema/note.js +2 -2
  41. package/dist/storage/filesystem.d.ts +0 -1
  42. package/dist/storage/filesystem.d.ts.map +1 -1
  43. package/dist/storage/filesystem.js +4 -4
  44. package/package.json +3 -4
@@ -1,42 +1,29 @@
1
- import { z } from 'zod';
2
- export declare const LedgerArchiveMetadataSchema: z.ZodObject<{
3
- createdAt: z.ZodString;
4
- integrityHash: z.ZodString;
5
- outPath: z.ZodString;
6
- }, z.core.$strip>;
7
- export declare const LedgerManifestSchema: z.ZodObject<{
8
- archives: z.ZodDefault<z.ZodArray<z.ZodObject<{
9
- createdAt: z.ZodString;
10
- integrityHash: z.ZodString;
11
- outPath: z.ZodString;
12
- }, z.core.$strip>>>;
13
- createdAt: z.ZodString;
14
- entryCount: z.ZodDefault<z.ZodNumber>;
15
- entryLocations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
16
- phase: z.ZodEnum<{
17
- seed: "seed";
18
- capture: "capture";
19
- intake: "intake";
20
- "vendor-extract": "vendor-extract";
21
- cleanup: "cleanup";
22
- parity: "parity";
23
- characterize: "characterize";
24
- equiv: "equiv";
25
- analyze: "analyze";
26
- recover: "recover";
27
- ship: "ship";
28
- migration: "migration";
29
- }>;
30
- sequence: z.ZodNumber;
31
- }, z.core.$strip>>>;
32
- idempotencyIndex: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
33
- lastSequence: z.ZodDefault<z.ZodNumber>;
34
- perPhaseCounts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
35
- perPhaseLatest: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
36
- schemaVersion: z.ZodLiteral<"ushman-ledger-manifest/v1">;
37
- updatedAt: z.ZodString;
38
- workspaceId: z.ZodString;
39
- }, z.core.$loose>;
40
- export type LedgerArchiveMetadata = z.infer<typeof LedgerArchiveMetadataSchema>;
41
- export type LedgerManifest = z.infer<typeof LedgerManifestSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const LedgerArchiveMetadataSchema: v.ObjectSchema<{
3
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4
+ readonly integrityHash: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.LengthAction<string, 64, undefined>]>;
5
+ readonly outPath: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
6
+ }, undefined>;
7
+ export declare const LedgerManifestSchema: v.LooseObjectSchema<{
8
+ readonly archives: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
9
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
10
+ readonly integrityHash: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.LengthAction<string, 64, undefined>]>;
11
+ readonly outPath: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
12
+ }, undefined>, undefined>, readonly []>;
13
+ readonly createdAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
14
+ readonly entryCount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, 0>;
15
+ readonly entryLocations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
16
+ readonly phase: v.PicklistSchema<readonly ["capture", "intake", "seed", "vendor-extract", "cleanup", "parity", "characterize", "equiv", "analyze", "recover", "ship", "migration"], undefined>;
17
+ readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
18
+ }, undefined>, undefined>, {}>;
19
+ readonly idempotencyIndex: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>, {}>;
20
+ readonly lastSequence: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, 0>;
21
+ readonly perPhaseCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, {}>;
22
+ readonly perPhaseLatest: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, {}>;
23
+ readonly schemaVersion: v.LiteralSchema<"ushman-ledger-manifest/v1", undefined>;
24
+ readonly updatedAt: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
25
+ readonly workspaceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
26
+ }, undefined>;
27
+ export type LedgerArchiveMetadata = v.InferOutput<typeof LedgerArchiveMetadataSchema>;
28
+ export type LedgerManifest = v.InferOutput<typeof LedgerManifestSchema>;
42
29
  //# sourceMappingURL=manifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/schema/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,2BAA2B;;;;iBAItC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBf,CAAC;AAEnB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/schema/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,eAAO,MAAM,2BAA2B;;;;aAItC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;aAqB/B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAC;AACtF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,27 +1,23 @@
1
- import { z } from 'zod';
1
+ import * as v from 'valibot';
2
2
  import { LedgerPhaseSchema } from "./entry.js";
3
- export const LedgerArchiveMetadataSchema = z.object({
4
- createdAt: z.string().datetime({ offset: true }),
5
- integrityHash: z.string().length(64),
6
- outPath: z.string().min(1),
3
+ export const LedgerArchiveMetadataSchema = v.object({
4
+ createdAt: v.pipe(v.string(), v.isoTimestamp()),
5
+ integrityHash: v.pipe(v.string(), v.length(64)),
6
+ outPath: v.pipe(v.string(), v.minLength(1)),
7
7
  });
8
- export const LedgerManifestSchema = z
9
- .object({
10
- archives: z.array(LedgerArchiveMetadataSchema).default([]),
11
- createdAt: z.string().datetime({ offset: true }),
12
- entryCount: z.number().int().nonnegative().default(0),
13
- entryLocations: z
14
- .record(z.string(), z.object({
8
+ export const LedgerManifestSchema = v.looseObject({
9
+ archives: v.optional(v.array(LedgerArchiveMetadataSchema), []),
10
+ createdAt: v.pipe(v.string(), v.isoTimestamp()),
11
+ entryCount: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),
12
+ entryLocations: v.optional(v.record(v.string(), v.object({
15
13
  phase: LedgerPhaseSchema,
16
- sequence: z.number().int().positive(),
17
- }))
18
- .default({}),
19
- idempotencyIndex: z.record(z.string(), z.record(z.string(), z.string())).default({}),
20
- lastSequence: z.number().int().nonnegative().default(0),
21
- perPhaseCounts: z.record(z.string(), z.number().int().nonnegative()).default({}),
22
- perPhaseLatest: z.record(z.string(), z.string()).default({}),
23
- schemaVersion: z.literal('ushman-ledger-manifest/v1'),
24
- updatedAt: z.string().datetime({ offset: true }),
25
- workspaceId: z.string().uuid(),
26
- })
27
- .passthrough();
14
+ sequence: v.pipe(v.number(), v.integer(), v.minValue(1)),
15
+ })), {}),
16
+ idempotencyIndex: v.optional(v.record(v.string(), v.record(v.string(), v.string())), {}),
17
+ lastSequence: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),
18
+ perPhaseCounts: v.optional(v.record(v.string(), v.pipe(v.number(), v.integer(), v.minValue(0))), {}),
19
+ perPhaseLatest: v.optional(v.record(v.string(), v.string()), {}),
20
+ schemaVersion: v.literal('ushman-ledger-manifest/v1'),
21
+ updatedAt: v.pipe(v.string(), v.isoTimestamp()),
22
+ workspaceId: v.pipe(v.string(), v.uuid()),
23
+ });
@@ -1,10 +1,4 @@
1
- import { z } from 'zod';
2
- export declare const NoteSubkindSchema: z.ZodEnum<{
3
- regression: "regression";
4
- automation: "automation";
5
- retro: "retro";
6
- operator: "operator";
7
- "tooling-gap": "tooling-gap";
8
- }>;
9
- export type NoteSubkind = z.infer<typeof NoteSubkindSchema>;
1
+ import * as v from 'valibot';
2
+ export declare const NoteSubkindSchema: v.PicklistSchema<["regression", "automation", "retro", "operator", "tooling-gap"], undefined>;
3
+ export type NoteSubkind = v.InferOutput<typeof NoteSubkindSchema>;
10
4
  //# sourceMappingURL=note.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../src/schema/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB;;;;;;EAA2E,CAAC;AAE1G,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../src/schema/note.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,iBAAiB,+FAA+E,CAAC;AAE9G,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { z } from 'zod';
2
- export const NoteSubkindSchema = z.enum(['regression', 'automation', 'retro', 'operator', 'tooling-gap']);
1
+ import * as v from 'valibot';
2
+ export const NoteSubkindSchema = v.picklist(['regression', 'automation', 'retro', 'operator', 'tooling-gap']);
@@ -7,7 +7,6 @@ type AtomicWriteTestHook = {
7
7
  readonly beforeRename?: () => Promise<void>;
8
8
  };
9
9
  export type LedgerPaths = {
10
- readonly analyticsSummaryFile: string;
11
10
  readonly blobsDir: string;
12
11
  readonly lockFile: (phase: LedgerPhase) => string;
13
12
  readonly manifestLockFile: string;
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../src/storage/filesystem.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,eAAO,MAAM,oBAAoB,6BAA8B,CAAC;AAChE,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C,CAAC;AAaF,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,CAAC;IAClD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,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AAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,EAAE,MAAM,mBAAmB,GAAG,IAAI,SAOxF,CAAC;AAoBF,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,EAAE,MAAM,MAAM,kBAiBvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,EAAE,OAAO,OAAO,kBAEzE,CAAC;AAoCF,eAAO,MAAM,YAAY,GAAU,eAAe,MAAM,KAAG,OAAO,CAAC,cAAc,CAmBhF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,eAAe,MAAM,EAAE,UAAU,cAAc,kBASjF,CAAC;AAoFF,eAAO,MAAM,qBAAqB,GAAU,eAAe,MAAM,kBAIhE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAU,eAAe,MAAM,EAAE,OAAO,WAAW,KAAG,OAAO,CAAC,MAAM,EAAE,CAOzG,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,eAAe,MAAM,EAAE,OAAO,WAAW,EAAE,UAAU,MAAM,oBAGnG,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,eAAe,MAAM,EAAE,OAAO,WAAW,EAAE,UAAU,MAAM,EAAE,OAAO,OAAO,oBAK/G,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
  import { mkdir, open, readdir, readFile, rename, rm, stat } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
+ import * as v from 'valibot';
4
5
  import { stableStringify } from "../json.js";
5
6
  import { readLabManifestMin } from "../lab-min.js";
6
7
  import { LEDGER_PHASES } from "../schema/entry.js";
@@ -19,7 +20,6 @@ const consumeAtomicWriteTestHook = (filePath) => {
19
20
  export const resolveLedgerPaths = (workspaceRoot) => {
20
21
  const root = path.join(workspaceRoot, ...LEDGER_ROOT_SEGMENTS);
21
22
  return {
22
- analyticsSummaryFile: path.join(root, 'analytics-summary.json'),
23
23
  blobsDir: path.join(root, 'blobs'),
24
24
  lockFile: (phase) => path.join(root, phase, '.lock'),
25
25
  manifestFile: path.join(root, 'manifest.json'),
@@ -56,7 +56,7 @@ export const setAtomicWriteTestHook = (filePath, hook) => {
56
56
  const createManifest = async (workspaceRoot) => {
57
57
  const labManifest = await readLabManifestMin(workspaceRoot);
58
58
  const now = new Date().toISOString();
59
- return LedgerManifestSchema.parse({
59
+ return v.parse(LedgerManifestSchema, {
60
60
  archives: [],
61
61
  createdAt: now,
62
62
  entryCount: 0,
@@ -95,7 +95,7 @@ export const writeAtomicJsonFile = async (filePath, value) => {
95
95
  };
96
96
  const parseManifestText = (filePath, text) => {
97
97
  try {
98
- return LedgerManifestSchema.parse(JSON.parse(text));
98
+ return v.parse(LedgerManifestSchema, JSON.parse(text));
99
99
  }
100
100
  catch (error) {
101
101
  throw new Error(`Invalid ledger manifest at ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
@@ -148,7 +148,7 @@ export const readManifest = async (workspaceRoot) => {
148
148
  };
149
149
  export const saveManifest = async (workspaceRoot, manifest) => {
150
150
  const paths = await ensureLedgerDirectories(workspaceRoot);
151
- await writeAtomicJsonFile(paths.manifestFile, LedgerManifestSchema.parse({
151
+ await writeAtomicJsonFile(paths.manifestFile, v.parse(LedgerManifestSchema, {
152
152
  ...manifest,
153
153
  updatedAt: new Date().toISOString(),
154
154
  }));
package/package.json CHANGED
@@ -12,14 +12,13 @@
12
12
  "dependencies": {
13
13
  "safe-stable-stringify": "^2.5.0",
14
14
  "tar": "^7.5.15",
15
- "uuidv7": "1.2.1",
16
- "zod": "^4.4.3"
15
+ "valibot": "^1.4.0"
17
16
  },
18
17
  "description": "Append-only workspace ledger library and CLI for Ushman v4.",
19
18
  "devDependencies": {
20
19
  "@biomejs/biome": "^2.4.15",
21
20
  "@types/bun": "^1.3.14",
22
- "@types/node": "^25.7.0",
21
+ "@types/node": "^25.8.0",
23
22
  "typescript": "^6.0.3"
24
23
  },
25
24
  "engines": {
@@ -69,5 +68,5 @@
69
68
  },
70
69
  "type": "module",
71
70
  "types": "dist/index.d.ts",
72
- "version": "0.3.0"
71
+ "version": "1.1.0"
73
72
  }