ushman-ledger 1.1.0 → 1.2.1
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/AGENTS.md +11 -7
- package/CHANGELOG.md +6 -0
- package/README.md +79 -8
- package/dist/blobs.js +3 -3
- package/dist/builders.d.ts +44 -2
- package/dist/builders.d.ts.map +1 -1
- package/dist/builders.js +7 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +346 -62
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +104 -4
- package/dist/handle.d.ts +28 -6
- package/dist/handle.d.ts.map +1 -1
- package/dist/handle.js +105 -11
- package/dist/helpers.d.ts +7 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +38 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/list.d.ts +44 -2
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +7 -5
- package/dist/note.d.ts +27 -0
- package/dist/note.d.ts.map +1 -1
- package/dist/note.js +11 -0
- package/dist/patch-resolver.d.ts +39 -0
- package/dist/patch-resolver.d.ts.map +1 -0
- package/dist/patch-resolver.js +196 -0
- package/dist/read-index.d.ts +7 -7
- package/dist/read-index.d.ts.map +1 -1
- package/dist/record.d.ts.map +1 -1
- package/dist/record.js +15 -40
- package/dist/render/migration-log.d.ts +10 -0
- package/dist/render/migration-log.d.ts.map +1 -0
- package/dist/render/migration-log.js +79 -0
- package/dist/render/retro.d.ts.map +1 -1
- package/dist/render/retro.js +34 -21
- package/dist/render/workspace-narrative.d.ts +12 -0
- package/dist/render/workspace-narrative.d.ts.map +1 -0
- package/dist/render/workspace-narrative.js +137 -0
- package/dist/schema/entry-core.d.ts +110 -0
- package/dist/schema/entry-core.d.ts.map +1 -0
- package/dist/schema/entry-core.js +143 -0
- package/dist/schema/entry-migrations.d.ts +3 -0
- package/dist/schema/entry-migrations.d.ts.map +1 -0
- package/dist/schema/entry-migrations.js +48 -0
- package/dist/schema/entry-read.d.ts +694 -0
- package/dist/schema/entry-read.d.ts.map +1 -0
- package/dist/schema/entry-read.js +92 -0
- package/dist/schema/entry-write.d.ts +865 -0
- package/dist/schema/entry-write.d.ts.map +1 -0
- package/dist/schema/entry-write.js +105 -0
- package/dist/schema/entry.d.ts +6 -1369
- package/dist/schema/entry.d.ts.map +1 -1
- package/dist/schema/entry.js +9 -286
- package/dist/schema/note.d.ts +1 -1
- package/dist/schema/note.d.ts.map +1 -1
- package/dist/schema/note.js +12 -1
- package/dist/storage/filesystem.d.ts +9 -0
- package/dist/storage/filesystem.d.ts.map +1 -1
- package/dist/storage/filesystem.js +82 -5
- package/dist/storage/lock-reclaimer.d.ts +2 -0
- package/dist/storage/lock-reclaimer.d.ts.map +1 -0
- package/dist/storage/lock-reclaimer.js +45 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -23,13 +23,17 @@ An append-only ledger library and CLI for ushman v4 workspaces. It owns ledger s
|
|
|
23
23
|
## Read order
|
|
24
24
|
|
|
25
25
|
1. `README.md`
|
|
26
|
-
2. `src/schema/entry.ts`
|
|
27
|
-
3. `src/
|
|
28
|
-
4. `src/
|
|
29
|
-
5. `src/
|
|
30
|
-
6. `src/
|
|
31
|
-
7. `src/
|
|
32
|
-
8. `src/
|
|
26
|
+
2. `src/schema/entry-core.ts`
|
|
27
|
+
3. `src/schema/entry-read.ts`
|
|
28
|
+
4. `src/schema/entry-write.ts`
|
|
29
|
+
5. `src/schema/entry-migrations.ts`
|
|
30
|
+
6. `src/schema/entry.ts`
|
|
31
|
+
7. `src/storage/filesystem.ts`
|
|
32
|
+
8. `src/record.ts`
|
|
33
|
+
9. `src/handle.ts`
|
|
34
|
+
10. `src/coverage.ts`
|
|
35
|
+
11. `src/doctor.ts`
|
|
36
|
+
12. `src/cli.ts`
|
|
33
37
|
|
|
34
38
|
## Commands
|
|
35
39
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0] - 2026-05-23
|
|
4
|
+
|
|
5
|
+
- Added `change-log` records, narrative note subkinds, and `migration-log-md` / `workspace-narrative-md` render targets.
|
|
6
|
+
- Split entry schema parsing into focused read/write/core modules and moved compatibility coercions behind dedicated parse migrations.
|
|
7
|
+
- Extracted patch-source resolution behind a dedicated resolver with focused tests and more actionable hash mismatch failures.
|
|
8
|
+
|
|
3
9
|
## [1.0.1] - 2026-05-16
|
|
4
10
|
|
|
5
11
|
- Tightened the schema surface to the ledger primitives the v4 orchestrator actively uses.
|
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ Append-only workspace ledger library and CLI for ushman v4 workspaces.
|
|
|
9
9
|
- Content-hash idempotency
|
|
10
10
|
- Patch blob storage
|
|
11
11
|
- Retro / JSONL / timeline / dependency-graph rendering
|
|
12
|
+
- Change-log / workspace narrative markdown rendering
|
|
12
13
|
- Archive integrity output
|
|
13
14
|
- Doctor and coverage helpers
|
|
14
15
|
|
|
@@ -26,9 +27,20 @@ bun link ushman-ledger
|
|
|
26
27
|
## Library API
|
|
27
28
|
|
|
28
29
|
```ts
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
import { readFile } from 'node:fs/promises';
|
|
31
|
+
import {
|
|
32
|
+
appendCleanupWaveNote,
|
|
33
|
+
appendSemanticCleanupSummaryNote,
|
|
34
|
+
type BuildRecordInput,
|
|
35
|
+
buildChangeLogRecord,
|
|
36
|
+
buildValidatorResultRecord,
|
|
37
|
+
deriveFilesChangedFromPatch,
|
|
38
|
+
openLedger,
|
|
39
|
+
} from 'ushman-ledger';
|
|
40
|
+
|
|
41
|
+
const workspaceRoot = '/path/to/workspace';
|
|
42
|
+
const ledger = await openLedger(workspaceRoot);
|
|
43
|
+
const patchText = await readFile('/tmp/change.patch', 'utf8');
|
|
32
44
|
|
|
33
45
|
await ledger.record({
|
|
34
46
|
emitter: { tool: 'ushman-cli', version: '1.0.0' },
|
|
@@ -47,6 +59,21 @@ await ledger.record({
|
|
|
47
59
|
summary: 'Apply websocket shim',
|
|
48
60
|
});
|
|
49
61
|
|
|
62
|
+
await ledger.record(
|
|
63
|
+
buildChangeLogRecord({
|
|
64
|
+
emitter: { tool: 'ushman-cli', version: '1.0.0' },
|
|
65
|
+
filesChanged: deriveFilesChangedFromPatch(patchText),
|
|
66
|
+
hypothesis: 'Smaller schema modules keep the public API stable.',
|
|
67
|
+
kind: 'change-log',
|
|
68
|
+
parityStatus: 'green',
|
|
69
|
+
phase: 'cleanup',
|
|
70
|
+
rollbackPlan: 'Revert the schema split.',
|
|
71
|
+
smokeResult: 'pass',
|
|
72
|
+
subkind: 'semantic-cleanup',
|
|
73
|
+
summary: 'Split schema modules',
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
|
|
50
77
|
await ledger.record(
|
|
51
78
|
buildValidatorResultRecord({
|
|
52
79
|
emitter: { tool: 'ushman-doctor', version: '1.0.0' },
|
|
@@ -57,32 +84,72 @@ await ledger.record(
|
|
|
57
84
|
}),
|
|
58
85
|
);
|
|
59
86
|
|
|
87
|
+
await appendCleanupWaveNote(workspaceRoot, {
|
|
88
|
+
body: 'Split schema definitions out of the monolithic entry module.',
|
|
89
|
+
phase: 'cleanup',
|
|
90
|
+
summary: 'Wave 1',
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
await appendSemanticCleanupSummaryNote(workspaceRoot, {
|
|
94
|
+
body: 'The latest semantic cleanup summary shown in workspace-narrative-md.',
|
|
95
|
+
phase: 'migration',
|
|
96
|
+
summary: 'Latest summary',
|
|
97
|
+
});
|
|
98
|
+
|
|
60
99
|
await ledger.render({ to: 'retro' });
|
|
100
|
+
await ledger.render({ to: 'migration-log-md' });
|
|
101
|
+
await ledger.renderTo({ to: 'migration-log-md', out: '/tmp/migration-log.md' });
|
|
61
102
|
await ledger.archive('/tmp/ledger.tgz');
|
|
62
103
|
```
|
|
63
104
|
|
|
105
|
+
Advanced builder wrappers can reuse the exported `BuildRecordInput<T>` helper type when they want the same input contract the built-in builders accept.
|
|
106
|
+
|
|
64
107
|
## CLI
|
|
65
108
|
|
|
66
109
|
```bash
|
|
67
110
|
ushman-ledger record --workspace=<ws> --kind=tool-invocation --phase=capture --summary="capture started"
|
|
68
111
|
ushman-ledger record --workspace=<ws> --kind=agent-patch --phase=cleanup --summary="capture git diff" --rationale="track working tree change" --diff-from-git=HEAD
|
|
112
|
+
ushman-ledger record --workspace=<ws> --kind=change-log --subkind=smoke --phase=cleanup --summary="scope git diff" --diff-from-git=HEAD --git-paths=src/main.ts,src/cli.ts --git-diff-timeout-ms=10000 --git-diff-max-buffer-bytes=20971520
|
|
69
113
|
ushman-ledger record --workspace=<ws> --kind=operator-decision --phase=cleanup --summary="manual override" --action=ledger-hand-edit --check-id=manual-review --rationale="operator edited the ledger after audit"
|
|
114
|
+
ushman-ledger record --workspace=<ws> --kind=change-log --subkind=semantic-cleanup --phase=cleanup --summary="split schema modules" --diff=/tmp/change.patch --hypothesis="smaller schema modules keep the public API stable" --commands=$'bun test\nbun run typecheck' --smoke-result=pass --parity-status=green --rollback-plan="revert the schema split"
|
|
70
115
|
ushman-ledger note regression --workspace=<ws> --phase=cleanup --summary="runtime drift" --body=/tmp/note.md
|
|
116
|
+
ushman-ledger note cleanup-wave --workspace=<ws> --phase=cleanup --summary="wave 1" --body=/tmp/narrative.md
|
|
71
117
|
ushman-ledger list --workspace=<ws> --json
|
|
72
118
|
ushman-ledger render --workspace=<ws> --to=retro
|
|
119
|
+
ushman-ledger render --workspace=<ws> --to=migration-log-md
|
|
120
|
+
ushman-ledger render --workspace=<ws> --to=workspace-narrative-md
|
|
73
121
|
ushman-ledger render --workspace=<ws> --to=jsonl --out=/tmp/ledger.jsonl
|
|
74
122
|
ushman-ledger render --workspace=<ws> --to=dependency-graph --out=/tmp/ledger.mmd
|
|
75
123
|
ushman-ledger archive --workspace=<ws> --out=/tmp/ledger.tgz
|
|
76
124
|
ushman-ledger doctor --workspace=<ws>
|
|
77
125
|
```
|
|
78
126
|
|
|
79
|
-
Valid record kinds: `tool-invocation`, `agent-patch`, `operator-patch`, `operator-decision`, `validator-result`, `runtime-event`, `note`, `correction`, `strip-decision-reverted`
|
|
127
|
+
Valid record kinds: `tool-invocation`, `agent-patch`, `operator-patch`, `operator-decision`, `validator-result`, `runtime-event`, `note`, `correction`, `strip-decision-reverted`, `change-log`
|
|
80
128
|
|
|
81
129
|
Valid phases: `capture`, `intake`, `seed`, `vendor-extract`, `cleanup`, `parity`, `characterize`, `equiv`, `analyze`, `recover`, `ship`, `migration`
|
|
82
130
|
|
|
83
|
-
Valid note subkinds: `regression`, `automation`, `retro`, `operator`, `tooling-gap`
|
|
131
|
+
Valid note subkinds: `regression`, `automation`, `retro`, `operator`, `tooling-gap`, `cleanup-wave`, `verified-flow`, `open-issue`, `decomposition-wave`, `semantic-cleanup-summary`
|
|
132
|
+
|
|
133
|
+
Valid render targets: `retro`, `jsonl`, `timeline-html`, `dependency-graph`, `migration-log-md`, `workspace-narrative-md`
|
|
134
|
+
|
|
135
|
+
## Change-log records
|
|
136
|
+
|
|
137
|
+
`change-log` entries are append-only structured narrative records for migration and cleanup work. They accept:
|
|
138
|
+
|
|
139
|
+
- `subkind`: `pre-change-checkpoint`, `semantic-cleanup`, `vendor-extract`, `decomposition`, `rollback`, `hotfix`, `smoke`
|
|
140
|
+
- `filesChanged`: explicit CSV paths via `--files-changed`, or automatic diffstat-style derivation from `--diff` / `--diff-from-git`
|
|
141
|
+
- optional narrative fields: `hypothesis`, `commandsRun`, `smokeResult`, `smokeNotes`, `parityStatus`, `rollbackPlan`
|
|
142
|
+
- `rollsBack`: required when `subkind=rollback`
|
|
143
|
+
|
|
144
|
+
`deriveFilesChangedFromPatch()` is exported for library callers that want the same diff-to-file summary behavior as the CLI. Known limits:
|
|
145
|
+
|
|
146
|
+
- It expects `diff --git` headers to delimit files.
|
|
147
|
+
- It counts only textual hunk `+`/`-` lines, so binary or mode-only diffs can report zero line counts.
|
|
148
|
+
- It keeps the post-image path when available and rejects diff blocks that cannot be mapped to normalized workspace-relative paths.
|
|
84
149
|
|
|
85
|
-
|
|
150
|
+
`migration-log-md` renders only `change-log` entries. `workspace-narrative-md` renders only the dedicated narrative note subkinds.
|
|
151
|
+
`render()` still returns a string for in-memory callers. `renderTo()` is the bounded-output alternative for large ledgers and can write to a callback or the canonical render file on disk.
|
|
152
|
+
`renderTo()` writers receive sequential chunks, can return synchronously or asynchronously, and should throw only when the render should abort.
|
|
86
153
|
|
|
87
154
|
## Workspace prerequisite
|
|
88
155
|
|
|
@@ -150,7 +217,9 @@ Valid render targets: `retro`, `jsonl`, `timeline-html`, `dependency-graph`
|
|
|
150
217
|
## Git diff capture
|
|
151
218
|
|
|
152
219
|
- `--diff-from-git=<ref>` runs `git diff <ref>` against the workspace working tree.
|
|
153
|
-
-
|
|
220
|
+
- `--git-paths=<csv>` safely scopes `git diff` to literal normalized workspace-relative paths. The CLI passes them after `--`, so pathspec magic and shell token splitting are intentionally not supported here.
|
|
221
|
+
- `--git-diff-timeout-ms=<ms>` and `--git-diff-max-buffer-bytes=<bytes>` override the default 30 second timeout and 10 MiB stdout buffer for the git diff helper.
|
|
222
|
+
- The CLI reports usage errors for missing `git`, timed out git diffs, invalid scoped paths, and buffer overflows instead of surfacing raw child-process failures.
|
|
154
223
|
- This is the only CLI feature that depends on an external binary. `git` must be available in `PATH`.
|
|
155
224
|
|
|
156
225
|
## Storage shape
|
|
@@ -164,7 +233,9 @@ Valid render targets: `retro`, `jsonl`, `timeline-html`, `dependency-graph`
|
|
|
164
233
|
pending-archives/
|
|
165
234
|
blobs/
|
|
166
235
|
render.md
|
|
236
|
+
render.migration-log.md
|
|
167
237
|
render.timeline.html
|
|
238
|
+
render.workspace-narrative.md
|
|
168
239
|
<phase>/
|
|
169
240
|
<timestamp>-<sequence>-<hash>.json
|
|
170
241
|
```
|
|
@@ -181,5 +252,5 @@ bun run bench:scale
|
|
|
181
252
|
|
|
182
253
|
## Scale benchmark
|
|
183
254
|
|
|
184
|
-
- `bun run bench:scale` creates a temporary workspace and benchmarks large-ledger paths for population, limited reads, repeated coverage,
|
|
255
|
+
- `bun run bench:scale` creates a temporary workspace and benchmarks large-ledger paths for population, limited reads, repeated coverage, repeated doctor runs, and markdown render paths.
|
|
185
256
|
- Override the defaults with environment variables such as `LEDGER_BENCH_ENTRY_COUNT=100000` and `LEDGER_BENCH_CANDIDATE_FILE_COUNT=10000`.
|
package/dist/blobs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, readFile
|
|
1
|
+
import { mkdir, readFile } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { sha256File, sha256Hex } from "./json.js";
|
|
4
4
|
import { resolveLedgerPaths, writeAtomicTextFile } from "./storage/filesystem.js";
|
|
@@ -34,11 +34,11 @@ export const storePatchBlob = async (workspaceRoot, patchText) => {
|
|
|
34
34
|
const blobPath = buildBlobPath(workspaceRoot, blobSha256);
|
|
35
35
|
let shouldWrite = true;
|
|
36
36
|
try {
|
|
37
|
-
await stat(blobPath);
|
|
38
37
|
shouldWrite = (await sha256File(blobPath)) !== blobSha256;
|
|
39
38
|
}
|
|
40
39
|
catch (error) {
|
|
41
|
-
|
|
40
|
+
const code = error.code;
|
|
41
|
+
if (code !== 'ENOENT') {
|
|
42
42
|
throw error;
|
|
43
43
|
}
|
|
44
44
|
}
|
package/dist/builders.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LedgerRecord } from './schema/entry.ts';
|
|
2
|
-
type BuildRecordInput<TRecord extends LedgerRecord> = Omit<TRecord, 'kind'> & {
|
|
2
|
+
export type BuildRecordInput<TRecord extends LedgerRecord> = Omit<TRecord, 'kind'> & {
|
|
3
3
|
readonly kind?: TRecord['kind'];
|
|
4
4
|
};
|
|
5
5
|
/** Build an `operator-decision` record with a validated structured payload. */
|
|
@@ -104,6 +104,49 @@ export declare const buildCorrectionRecord: (input: BuildRecordInput<Extract<Led
|
|
|
104
104
|
phase: "capture" | "intake" | "seed" | "vendor-extract" | "cleanup" | "parity" | "characterize" | "equiv" | "analyze" | "recover" | "ship" | "migration";
|
|
105
105
|
summary: string;
|
|
106
106
|
};
|
|
107
|
+
/** Build a `change-log` record. */
|
|
108
|
+
export declare const buildChangeLogRecord: (input: BuildRecordInput<Extract<LedgerRecord, {
|
|
109
|
+
kind: "change-log";
|
|
110
|
+
}>>) => {
|
|
111
|
+
commandsRun?: string[] | undefined;
|
|
112
|
+
filesChanged: {
|
|
113
|
+
added?: number | undefined;
|
|
114
|
+
path: string;
|
|
115
|
+
removed?: number | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
hypothesis?: string | undefined;
|
|
118
|
+
kind: "change-log";
|
|
119
|
+
parityStatus?: "not-run" | "green" | "yellow" | "red" | undefined;
|
|
120
|
+
rollbackPlan?: string | undefined;
|
|
121
|
+
rollsBack?: string | undefined;
|
|
122
|
+
smokeNotes?: string | undefined;
|
|
123
|
+
smokeResult?: "pass" | "fail" | "partial" | "not-run" | undefined;
|
|
124
|
+
subkind: "vendor-extract" | "pre-change-checkpoint" | "semantic-cleanup" | "decomposition" | "rollback" | "hotfix" | "smoke";
|
|
125
|
+
details?: {
|
|
126
|
+
[x: string]: unknown;
|
|
127
|
+
} | undefined;
|
|
128
|
+
emitter: {
|
|
129
|
+
tool: string;
|
|
130
|
+
user?: string | undefined;
|
|
131
|
+
version: string;
|
|
132
|
+
};
|
|
133
|
+
idempotencyKey?: string | undefined;
|
|
134
|
+
links?: ({
|
|
135
|
+
affectedFiles?: string[] | undefined;
|
|
136
|
+
blobs?: string[] | undefined;
|
|
137
|
+
briefId?: string | undefined;
|
|
138
|
+
correctsLedgerId?: string | undefined;
|
|
139
|
+
gitRef?: string | undefined;
|
|
140
|
+
idempotencyKey?: string | undefined;
|
|
141
|
+
stripDecisionId?: string | undefined;
|
|
142
|
+
supersedesLedgerId?: string | undefined;
|
|
143
|
+
validatorVerdictId?: string | undefined;
|
|
144
|
+
} & {
|
|
145
|
+
[key: string]: unknown;
|
|
146
|
+
}) | undefined;
|
|
147
|
+
phase: "capture" | "intake" | "seed" | "vendor-extract" | "cleanup" | "parity" | "characterize" | "equiv" | "analyze" | "recover" | "ship" | "migration";
|
|
148
|
+
summary: string;
|
|
149
|
+
};
|
|
107
150
|
/** Build a `strip-decision-reverted` record. */
|
|
108
151
|
export declare const buildStripDecisionRevertedRecord: (input: BuildRecordInput<Extract<LedgerRecord, {
|
|
109
152
|
kind: "strip-decision-reverted";
|
|
@@ -139,5 +182,4 @@ export declare const buildStripDecisionRevertedRecord: (input: BuildRecordInput<
|
|
|
139
182
|
phase: "capture" | "intake" | "seed" | "vendor-extract" | "cleanup" | "parity" | "characterize" | "equiv" | "analyze" | "recover" | "ship" | "migration";
|
|
140
183
|
summary: string;
|
|
141
184
|
};
|
|
142
|
-
export {};
|
|
143
185
|
//# sourceMappingURL=builders.d.ts.map
|
package/dist/builders.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,YAAY,EAIpB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,YAAY,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IACjF,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,2BAA2B,GACpC,OAAO,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3E,CAAC;AAEP,yCAAyC;AACzC,eAAO,MAAM,0BAA0B,GACnC,OAAO,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK1E,CAAC;AAEP,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,GAAI,OAAO,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;CAItG,CAAC;AAEP,mCAAmC;AACnC,eAAO,MAAM,oBAAoB,GAAI,OAAO,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrG,CAAC;AAEP,gDAAgD;AAChD,eAAO,MAAM,gCAAgC,GACzC,OAAO,gBAAgB,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,yBAAyB,CAAA;CAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjF,CAAC"}
|
package/dist/builders.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeLogRecordSchema, CorrectionRecordSchema, OperatorDecisionRecordSchema, StripDecisionRevertedRecordSchema, ValidatorResultRecordSchema, } from "./schema/entry.js";
|
|
3
3
|
/** Build an `operator-decision` record with a validated structured payload. */
|
|
4
4
|
export const buildOperatorDecisionRecord = (input) => v.parse(OperatorDecisionRecordSchema, {
|
|
5
5
|
...input,
|
|
6
6
|
kind: 'operator-decision',
|
|
7
|
-
payload:
|
|
7
|
+
payload: input.payload,
|
|
8
8
|
});
|
|
9
9
|
/** Build a `validator-result` record. */
|
|
10
10
|
export const buildValidatorResultRecord = (input) => v.parse(ValidatorResultRecordSchema, {
|
|
@@ -16,6 +16,11 @@ export const buildCorrectionRecord = (input) => v.parse(CorrectionRecordSchema,
|
|
|
16
16
|
...input,
|
|
17
17
|
kind: 'correction',
|
|
18
18
|
});
|
|
19
|
+
/** Build a `change-log` record. */
|
|
20
|
+
export const buildChangeLogRecord = (input) => v.parse(ChangeLogRecordSchema, {
|
|
21
|
+
...input,
|
|
22
|
+
kind: 'change-log',
|
|
23
|
+
});
|
|
19
24
|
/** Build a `strip-decision-reverted` record. */
|
|
20
25
|
export const buildStripDecisionRevertedRecord = (input) => v.parse(StripDecisionRevertedRecordSchema, {
|
|
21
26
|
...input,
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAuDA,KAAK,UAAU,GAAG;IACd,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,cAAc,GAAG,aAAa,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;CAC1C,CAAC;AAi5BF,eAAO,MAAM,YAAY,GAAU,MAAM,SAAS,MAAM,EAAE,EAAE,UAAS,OAAO,CAAC,UAAU,CAAM,KAAG,OAAO,CAAC,MAAM,CAqC7G,CAAC;AAEF,eAAO,MAAM,IAAI,GAAU,OAAM,SAAS,MAAM,EAA0B,KAAG,OAAO,CAAC,MAAM,CAE1F,CAAC"}
|