@cleocode/contracts 2026.10.27 → 2026.11.1-canary.11
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/README.md +2 -1
- package/dist/.source-stamp.json +4 -0
- package/dist/__tests__/acceptance-gate.test.js +15 -3
- package/dist/__tests__/acceptance-gate.test.js.map +1 -1
- package/dist/__tests__/completion-operation-contracts.test.js +1 -1
- package/dist/__tests__/completion-operation-contracts.test.js.map +1 -1
- package/dist/__tests__/evidence-atom-schema.test.js +3 -1
- package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
- package/dist/__tests__/gateway-contract.test.js +1 -1
- package/dist/__tests__/gateway-contract.test.js.map +1 -1
- package/dist/__tests__/memory-wire-shapes.test.js.map +1 -1
- package/dist/__tests__/operation-def.test.js +4 -3
- package/dist/__tests__/operation-def.test.js.map +1 -1
- package/dist/acceptance-gate-schema.d.ts +25 -0
- package/dist/acceptance-gate-schema.d.ts.map +1 -1
- package/dist/acceptance-gate-schema.js +5 -0
- package/dist/acceptance-gate-schema.js.map +1 -1
- package/dist/acceptance-gate.d.ts +8 -0
- package/dist/acceptance-gate.d.ts.map +1 -1
- package/dist/brain-graph.d.ts +1 -1
- package/dist/brain-graph.js +1 -1
- package/dist/caamp-markers.d.ts +11 -0
- package/dist/caamp-markers.d.ts.map +1 -1
- package/dist/config/manifest.d.ts.map +1 -1
- package/dist/config/manifest.js +13 -0
- package/dist/config/manifest.js.map +1 -1
- package/dist/{config.d.ts → config/types.d.ts} +130 -6
- package/dist/config/types.d.ts.map +1 -0
- package/dist/{config.js → config/types.js} +1 -1
- package/dist/config/types.js.map +1 -0
- package/dist/config/worker-policy.d.ts +42 -0
- package/dist/config/worker-policy.d.ts.map +1 -0
- package/dist/config/worker-policy.js +35 -0
- package/dist/config/worker-policy.js.map +1 -0
- package/dist/data-accessor.d.ts +15 -0
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/dependency.d.ts +2 -0
- package/dist/dependency.d.ts.map +1 -1
- package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js +0 -6
- package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js.map +1 -1
- package/dist/dispatch/identity.d.ts +3 -8
- package/dist/dispatch/identity.d.ts.map +1 -1
- package/dist/dispatch/identity.js +2 -8
- package/dist/dispatch/identity.js.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +360 -513
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/docs/modernize.d.ts +468 -0
- package/dist/docs/modernize.d.ts.map +1 -0
- package/dist/docs/modernize.js +145 -0
- package/dist/docs/modernize.js.map +1 -0
- package/dist/docs/provenance.d.ts +6 -6
- package/dist/docs-taxonomy.d.ts +6 -0
- package/dist/docs-taxonomy.d.ts.map +1 -1
- package/dist/docs-taxonomy.js +38 -1
- package/dist/docs-taxonomy.js.map +1 -1
- package/dist/done-plan.d.ts +34 -3
- package/dist/done-plan.d.ts.map +1 -1
- package/dist/evidence-atom-schema.d.ts +78 -4
- package/dist/evidence-atom-schema.d.ts.map +1 -1
- package/dist/evidence-atom-schema.js +136 -11
- package/dist/evidence-atom-schema.js.map +1 -1
- package/dist/evidence-record-schema.d.ts +2 -2
- package/dist/exit-codes.d.ts +93 -0
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +93 -0
- package/dist/exit-codes.js.map +1 -1
- package/dist/{gateway.d.ts → gateway/index.d.ts} +4 -4
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/{gateway.js → gateway/index.js} +2 -2
- package/dist/gateway/index.js.map +1 -0
- package/dist/gateway/rpc/messages.d.ts +4 -4
- package/dist/gateway/rpc/messages.js +1 -1
- package/dist/gateway/rpc/messages.js.map +1 -1
- package/dist/git-hooks.d.ts +29 -3
- package/dist/git-hooks.d.ts.map +1 -1
- package/dist/git-hooks.js +34 -3
- package/dist/git-hooks.js.map +1 -1
- package/dist/heavy-command-hook.d.ts +5 -0
- package/dist/heavy-command-hook.d.ts.map +1 -1
- package/dist/index.d.ts +23 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/invariants/sync-write-invariants.d.ts.map +1 -1
- package/dist/invariants/sync-write-invariants.js +29 -1
- package/dist/invariants/sync-write-invariants.js.map +1 -1
- package/dist/jobs.d.ts +5 -0
- package/dist/jobs.d.ts.map +1 -1
- package/dist/lease-ipc/messages.d.ts +5 -5
- package/dist/llm/onboarding.d.ts +1 -1
- package/dist/llm/system-of-use.d.ts +1 -1
- package/dist/llm/system-of-use.d.ts.map +1 -1
- package/dist/llm/system-resolver.d.ts +1 -1
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/{memory.d.ts → memory/index.d.ts} +1 -1
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/{memory.js → memory/index.js} +1 -1
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/search.d.ts +20 -2
- package/dist/memory/search.d.ts.map +1 -1
- package/dist/merge-close.d.ts +277 -0
- package/dist/merge-close.d.ts.map +1 -0
- package/dist/merge-close.js +16 -0
- package/dist/merge-close.js.map +1 -0
- package/dist/nexus-cloud.d.ts +1 -1
- package/dist/operations/admin.d.ts +6 -0
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/docs.d.ts +233 -9
- package/dist/operations/docs.d.ts.map +1 -1
- package/dist/operations/docs.js.map +1 -1
- package/dist/operations/index.d.ts +0 -1
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +0 -1
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/memory.d.ts +7 -4
- package/dist/operations/memory.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.d.ts +0 -8
- package/dist/operations/nexus-scope-map.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.js +0 -8
- package/dist/operations/nexus-scope-map.js.map +1 -1
- package/dist/operations/nexus.d.ts +2 -10
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/nexus.js.map +1 -1
- package/dist/operations/orchestrate.d.ts +219 -6
- package/dist/operations/orchestrate.d.ts.map +1 -1
- package/dist/operations/orchestrate.js +329 -1
- package/dist/operations/orchestrate.js.map +1 -1
- package/dist/operations/output-contracts-data.js +1 -1
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/release.d.ts +0 -79
- package/dist/operations/release.d.ts.map +1 -1
- package/dist/operations/session.d.ts +1 -1
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +18 -6
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js.map +1 -1
- package/dist/operations/validate.d.ts +6 -0
- package/dist/operations/validate.d.ts.map +1 -1
- package/dist/operations/worktree.d.ts +209 -19
- package/dist/operations/worktree.d.ts.map +1 -1
- package/dist/orca-execution.d.ts +533 -0
- package/dist/orca-execution.d.ts.map +1 -0
- package/dist/orca-execution.js +385 -0
- package/dist/orca-execution.js.map +1 -0
- package/dist/project-context.d.ts +31 -0
- package/dist/project-context.d.ts.map +1 -1
- package/dist/project-hooks.d.ts +8 -8
- package/dist/release/authorization.d.ts +46 -0
- package/dist/release/authorization.d.ts.map +1 -0
- package/dist/release/authorization.js +10 -0
- package/dist/release/authorization.js.map +1 -0
- package/dist/release/hook-pilot.d.ts +1 -1
- package/dist/resource-governor.d.ts +44 -0
- package/dist/resource-governor.d.ts.map +1 -1
- package/dist/resource-governor.js +10 -0
- package/dist/resource-governor.js.map +1 -1
- package/dist/review-verdict.d.ts +253 -0
- package/dist/review-verdict.d.ts.map +1 -0
- package/dist/review-verdict.js +20 -0
- package/dist/review-verdict.js.map +1 -0
- package/dist/row-identity.d.ts +11 -0
- package/dist/row-identity.d.ts.map +1 -1
- package/dist/session-journal.d.ts.map +1 -1
- package/dist/session-journal.js +7 -1
- package/dist/session-journal.js.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/skills/migrate.d.ts +1 -1
- package/dist/skills/migrate.js +1 -1
- package/dist/skills/stats.d.ts +1 -1
- package/dist/skills/stats.js +1 -1
- package/dist/spawn-types.d.ts +57 -0
- package/dist/spawn-types.d.ts.map +1 -1
- package/dist/spawn.d.ts +43 -0
- package/dist/spawn.d.ts.map +1 -1
- package/dist/spawn.js +1 -0
- package/dist/spawn.js.map +1 -1
- package/dist/status-registry.d.ts +27 -0
- package/dist/status-registry.d.ts.map +1 -1
- package/dist/status-registry.js +28 -0
- package/dist/status-registry.js.map +1 -1
- package/dist/table-classification.d.ts +22 -0
- package/dist/table-classification.d.ts.map +1 -1
- package/dist/task-id.d.ts +8 -10
- package/dist/task-id.d.ts.map +1 -1
- package/dist/task-id.js +9 -48
- package/dist/task-id.js.map +1 -1
- package/dist/task-record.d.ts +10 -1
- package/dist/task-record.d.ts.map +1 -1
- package/dist/task.d.ts +177 -4
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js.map +1 -1
- package/dist/{tasks.d.ts → tasks/index.d.ts} +3 -3
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/{tasks.js → tasks/index.js} +2 -2
- package/dist/tasks/index.js.map +1 -0
- package/dist/templates/manifest.d.ts +1 -1
- package/dist/tools/build-task-tree.d.ts +1 -1
- package/dist/tools/build-task-tree.d.ts.map +1 -1
- package/dist/workgraph.d.ts +56 -56
- package/package.json +22 -6
- package/schemas/acceptance-gate.schema.json +24 -0
- package/schemas/task.schema.json +24 -0
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/acceptance-gate.test.ts +16 -3
- package/src/__tests__/completion-operation-contracts.test.ts +1 -1
- package/src/__tests__/evidence-atom-schema.test.ts +3 -1
- package/src/__tests__/gateway-contract.test.ts +1 -1
- package/src/__tests__/llm-config-schema.test.ts +1 -1
- package/src/__tests__/memory-wire-shapes.test.ts +4 -1
- package/src/__tests__/operation-def.test.ts +4 -3
- package/src/acceptance-gate-schema.ts +5 -0
- package/src/acceptance-gate.ts +9 -0
- package/src/brain-graph.ts +1 -1
- package/src/caamp-markers.ts +11 -0
- package/src/config/manifest.ts +13 -0
- package/src/{config.ts → config/types.ts} +134 -5
- package/src/config/worker-policy.ts +55 -0
- package/src/data-accessor.ts +16 -0
- package/src/dependency.ts +2 -0
- package/src/dispatch/__tests__/operation-envelope-snapshots.test.ts +0 -6
- package/src/dispatch/identity.ts +2 -8
- package/src/dispatch/operations-registry.ts +377 -525
- package/src/docs/modernize.ts +442 -0
- package/src/docs-taxonomy.ts +44 -1
- package/src/done-plan.ts +33 -2
- package/src/evidence-atom-schema.ts +167 -14
- package/src/exit-codes.ts +95 -0
- package/src/{gateway.ts → gateway/index.ts} +3 -3
- package/src/gateway/rpc/messages.ts +1 -1
- package/src/git-hooks.ts +43 -3
- package/src/heavy-command-hook.ts +5 -0
- package/src/index.ts +132 -48
- package/src/invariants/sync-write-invariants.ts +30 -0
- package/src/jobs.ts +5 -0
- package/src/llm/onboarding.ts +1 -1
- package/src/llm/system-of-use.ts +1 -1
- package/src/llm/system-resolver.ts +1 -1
- package/src/memory/search.ts +17 -2
- package/src/merge-close.ts +291 -0
- package/src/operations/admin.ts +6 -0
- package/src/operations/docs.ts +242 -10
- package/src/operations/index.ts +0 -1
- package/src/operations/memory.ts +7 -4
- package/src/operations/nexus-scope-map.ts +0 -8
- package/src/operations/nexus.ts +2 -11
- package/src/operations/orchestrate.ts +490 -6
- package/src/operations/output-contracts-data.ts +1 -1
- package/src/operations/release.ts +0 -87
- package/src/operations/session.ts +1 -1
- package/src/operations/tasks.ts +20 -7
- package/src/operations/validate.ts +6 -0
- package/src/operations/worktree.ts +216 -19
- package/src/orca-execution.ts +528 -0
- package/src/project-context.ts +33 -0
- package/src/release/authorization.ts +48 -0
- package/src/resource-governor.ts +47 -0
- package/src/review-verdict.ts +265 -0
- package/src/row-identity.ts +11 -0
- package/src/session-journal.ts +7 -1
- package/src/session.ts +11 -0
- package/src/skills/migrate.ts +1 -1
- package/src/skills/stats.ts +1 -1
- package/src/spawn-types.ts +75 -0
- package/src/spawn.ts +48 -0
- package/src/status-registry.ts +37 -0
- package/src/table-classification.ts +23 -0
- package/src/task-id.ts +9 -47
- package/src/task-record.ts +10 -1
- package/src/task.ts +171 -4
- package/src/{tasks.ts → tasks/index.ts} +3 -3
- package/src/tools/build-task-tree.ts +1 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/gateway.d.ts.map +0 -1
- package/dist/gateway.js.map +0 -1
- package/dist/memory.d.ts.map +0 -1
- package/dist/memory.js.map +0 -1
- package/dist/operations/conduit.d.ts +0 -285
- package/dist/operations/conduit.d.ts.map +0 -1
- package/dist/operations/conduit.js +0 -39
- package/dist/operations/conduit.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/src/operations/conduit.ts +0 -348
- /package/src/{memory.ts → memory/index.ts} +0 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docs modernize contract — the plan and receipt of `cleo docs modernize`.
|
|
3
|
+
*
|
|
4
|
+
* `cleo docs modernize <path>` turns a messy docs folder into clean, linked
|
|
5
|
+
* CleoDocs. A dry run produces a {@link DocsModernizePlan}: one
|
|
6
|
+
* {@link DocsModernizePlanRow} per markdown or text file, carrying the kind,
|
|
7
|
+
* the stable slug, the disposition and the reasons (including every System
|
|
8
|
+
* One judgment that was asked). `--apply` executes a plan and writes a
|
|
9
|
+
* {@link DocsModernizeReceipt}; every receipt op records the state it
|
|
10
|
+
* replaced, so `--rollback <runId>` can reverse the run.
|
|
11
|
+
*
|
|
12
|
+
* Types only — the planner and applier live in
|
|
13
|
+
* `packages/core/src/docs/modernize/`.
|
|
14
|
+
*
|
|
15
|
+
* @task T14113
|
|
16
|
+
* @epic T14106
|
|
17
|
+
*/
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
/** What modernize does with one file. */
|
|
20
|
+
export declare const DOCS_MODERNIZE_DISPOSITIONS: readonly ["keep", "rename", "merge-into", "delete"];
|
|
21
|
+
/**
|
|
22
|
+
* One of {@link DOCS_MODERNIZE_DISPOSITIONS}.
|
|
23
|
+
*
|
|
24
|
+
* - `keep` — the file already sits at its canonical path; it is ingested as is.
|
|
25
|
+
* - `rename` — the file moves to `<kind folder>/<slug>.md` and is ingested there.
|
|
26
|
+
* - `merge-into` — the file duplicates another; its content folds into the
|
|
27
|
+
* survivor named by `target`, and the file is superseded and removed.
|
|
28
|
+
* - `delete` — the file carries nothing worth keeping (empty, or byte-identical
|
|
29
|
+
* to the survivor); it is superseded by `target` when one exists and removed.
|
|
30
|
+
*/
|
|
31
|
+
export type DocsModernizeDisposition = (typeof DOCS_MODERNIZE_DISPOSITIONS)[number];
|
|
32
|
+
/** Where an acted-on answer came from. */
|
|
33
|
+
export type DocsModernizeJudgmentSource = 'provider' | 'cache' | 'fallback';
|
|
34
|
+
/** The two System One questions modernize asks. */
|
|
35
|
+
export type DocsModernizeJudgmentQuestion = 'classify' | 'merge';
|
|
36
|
+
/**
|
|
37
|
+
* One judgment taken for a plan row: the rule answer, the System One answer
|
|
38
|
+
* when one was asked, and which of the two acted.
|
|
39
|
+
*/
|
|
40
|
+
export interface DocsModernizeJudgment {
|
|
41
|
+
/** Which question was judged. */
|
|
42
|
+
readonly question: DocsModernizeJudgmentQuestion;
|
|
43
|
+
/** Decision-site id the question was asked through (`docs.modernize.*`). */
|
|
44
|
+
readonly site: string;
|
|
45
|
+
/** Effective site mode (`off`, `shadow` or `on`). */
|
|
46
|
+
readonly mode: 'off' | 'shadow' | 'on';
|
|
47
|
+
/** The rule fallback's answer. */
|
|
48
|
+
readonly ruleAnswer: string;
|
|
49
|
+
/** The System One answer, or null when none came back (off, unreachable, invalid). */
|
|
50
|
+
readonly decidedAnswer: string | null;
|
|
51
|
+
/** Confidence of the System One answer, or null when none came back. */
|
|
52
|
+
readonly decidedConfidence: number | null;
|
|
53
|
+
/** Where the decided answer came from; `fallback` when the rule answered. */
|
|
54
|
+
readonly source: DocsModernizeJudgmentSource;
|
|
55
|
+
/** The answer the plan acts on. */
|
|
56
|
+
readonly acted: string;
|
|
57
|
+
}
|
|
58
|
+
/** One file's proposal. */
|
|
59
|
+
export interface DocsModernizePlanRow {
|
|
60
|
+
/** Path relative to the modernize root, POSIX separators. */
|
|
61
|
+
readonly path: string;
|
|
62
|
+
/** SHA-256 of the file bytes, hex. */
|
|
63
|
+
readonly sha256: string;
|
|
64
|
+
/** Taxonomy kind (a `DocKindRegistry` kind). */
|
|
65
|
+
readonly kind: string;
|
|
66
|
+
/** Stable slug: no task, session or date tokens. */
|
|
67
|
+
readonly slug: string;
|
|
68
|
+
/** Human title (first H1, else derived from the slug). */
|
|
69
|
+
readonly title: string;
|
|
70
|
+
/** What happens to the file. */
|
|
71
|
+
readonly disposition: DocsModernizeDisposition;
|
|
72
|
+
/**
|
|
73
|
+
* For `keep` / `rename`: the canonical path relative to the root.
|
|
74
|
+
* For `merge-into` / `delete`: the survivor's slug, or null when there is none.
|
|
75
|
+
*/
|
|
76
|
+
readonly target: string | null;
|
|
77
|
+
/** Why, one line each. */
|
|
78
|
+
readonly reasons: readonly string[];
|
|
79
|
+
/** Every System One question asked for this row. */
|
|
80
|
+
readonly judgments: readonly DocsModernizeJudgment[];
|
|
81
|
+
/** Task (`T####`) and decision (`D####`) ids the old path named; kept as links, not in the slug. */
|
|
82
|
+
readonly ownerTasks: readonly string[];
|
|
83
|
+
/** The kind's folder the file belongs in (`''` for the root). */
|
|
84
|
+
readonly category: string;
|
|
85
|
+
/** Tracked files outside the root that cite the old path (listed, never rewritten). */
|
|
86
|
+
readonly refs: readonly string[];
|
|
87
|
+
/** True when the row came from an override file rather than the rules. */
|
|
88
|
+
readonly overridden: boolean;
|
|
89
|
+
/** Code paths this doc documents (from the override; written to front matter by the caller). */
|
|
90
|
+
readonly covers: readonly string[];
|
|
91
|
+
/** True when the old name broke the slug rule (task, session or date tokens) and the new one does not. */
|
|
92
|
+
readonly baselineRemove: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** One reviewer decision for a path; it wins over the rules and System One. */
|
|
95
|
+
export interface DocsModernizeOverride {
|
|
96
|
+
/** What happens to the file. */
|
|
97
|
+
readonly disposition: DocsModernizeDisposition;
|
|
98
|
+
/**
|
|
99
|
+
* Canonical path (`keep`/`rename`) or survivor slug (`merge-into`/`delete`).
|
|
100
|
+
* A `delete` may omit it or set it to null: the doc is stored under its own
|
|
101
|
+
* slug and removed, with no supersede edge (T14212).
|
|
102
|
+
*/
|
|
103
|
+
readonly target?: string | null;
|
|
104
|
+
/** Why; recorded on the plan row. */
|
|
105
|
+
readonly reason: string;
|
|
106
|
+
/** Kind to use instead of the classified one. */
|
|
107
|
+
readonly kind?: string;
|
|
108
|
+
/** Slug to use instead of the derived one. */
|
|
109
|
+
readonly slug?: string;
|
|
110
|
+
/** Code paths this doc documents, copied onto the plan row. */
|
|
111
|
+
readonly covers?: readonly string[];
|
|
112
|
+
}
|
|
113
|
+
/** `--overrides <file>`: decisions keyed by path relative to the modernize root. */
|
|
114
|
+
export type DocsModernizeOverrides = Readonly<Record<string, DocsModernizeOverride>>;
|
|
115
|
+
/** A dry-run proposal for a whole tree. */
|
|
116
|
+
export interface DocsModernizePlan {
|
|
117
|
+
/** Absolute modernize root. */
|
|
118
|
+
readonly root: string;
|
|
119
|
+
/** ISO 8601 time the plan was made. */
|
|
120
|
+
readonly generatedAt: string;
|
|
121
|
+
/** One row per scanned file, sorted by path. */
|
|
122
|
+
readonly rows: readonly DocsModernizePlanRow[];
|
|
123
|
+
/** Files counted per disposition. */
|
|
124
|
+
readonly counts: Readonly<Record<DocsModernizeDisposition, number>>;
|
|
125
|
+
/**
|
|
126
|
+
* `tree` reorganises the folder; `store-only` ingests every file into the
|
|
127
|
+
* store (task-owned, slugless) and leaves the folder untouched; `store`
|
|
128
|
+
* re-kinds and re-slugs the rows already in the store (`storeRows`, T14118).
|
|
129
|
+
*/
|
|
130
|
+
readonly mode: 'tree' | 'store-only' | 'store';
|
|
131
|
+
/** Store-mode rows (`mode: 'store'`); absent or empty otherwise. */
|
|
132
|
+
readonly storeRows?: readonly DocsModernizeStoreRow[];
|
|
133
|
+
/**
|
|
134
|
+
* The only edits `--apply` makes to files it does not move (`tree` mode):
|
|
135
|
+
* one row per relative link whose target moves, in a `keep` file (T14185)
|
|
136
|
+
* or in a markdown file under the root that the plan does not scan, such as
|
|
137
|
+
* an `--exclude`d folder (T14194). Absent or empty means those files are not
|
|
138
|
+
* touched.
|
|
139
|
+
*/
|
|
140
|
+
readonly linkFixes?: readonly DocsModernizeLinkFix[];
|
|
141
|
+
/**
|
|
142
|
+
* Absolute root of the repository checkout that `base: 'repo'` link fixes
|
|
143
|
+
* are relative to (T14196); absent when the plan has none.
|
|
144
|
+
*/
|
|
145
|
+
readonly repoRoot?: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* One href re-pointed because its target moves (T14185, T14194). Only the
|
|
149
|
+
* href changes; the rest of the file stays byte-identical, and a file outside
|
|
150
|
+
* the plan's rows is never written to the store.
|
|
151
|
+
*/
|
|
152
|
+
export interface DocsModernizeLinkFix {
|
|
153
|
+
/** Always `link-fix`. */
|
|
154
|
+
readonly kind: 'link-fix';
|
|
155
|
+
/**
|
|
156
|
+
* `repo` for a markdown file outside the modernize root, whose `path` is
|
|
157
|
+
* then relative to the plan's `repoRoot` (T14196); absent for the root.
|
|
158
|
+
*/
|
|
159
|
+
readonly base?: 'repo';
|
|
160
|
+
/** The file, relative to the root (or `repoRoot` for `base: 'repo'`): a kept row, or a file the plan does not scan. */
|
|
161
|
+
readonly path: string;
|
|
162
|
+
/** The href as written now. */
|
|
163
|
+
readonly href: string;
|
|
164
|
+
/** The href after the move. */
|
|
165
|
+
readonly newHref: string;
|
|
166
|
+
/**
|
|
167
|
+
* For a file the plan does not scan: SHA-256 of its bytes at plan time, so
|
|
168
|
+
* apply refuses a file that changed since (a kept row carries its own).
|
|
169
|
+
*/
|
|
170
|
+
readonly sha256?: string;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* One existing store doc in a `--store` plan (T14118): its kind and slug now,
|
|
174
|
+
* and what modernize proposes. An unchanged field repeats the current value.
|
|
175
|
+
*/
|
|
176
|
+
export interface DocsModernizeStoreRow {
|
|
177
|
+
/** Attachment row id. */
|
|
178
|
+
readonly attachmentId: string;
|
|
179
|
+
/** Content hash. */
|
|
180
|
+
readonly sha256: string;
|
|
181
|
+
/** Current slug (null for a slugless row). */
|
|
182
|
+
readonly slug: string | null;
|
|
183
|
+
/** Proposed slug; the current one stays resolvable as an alias. */
|
|
184
|
+
readonly newSlug: string | null;
|
|
185
|
+
/** Current kind (null when untyped). */
|
|
186
|
+
readonly kind: string | null;
|
|
187
|
+
/** Proposed kind. */
|
|
188
|
+
readonly newKind: string;
|
|
189
|
+
/** Task ids the old slug named; linked to the doc as task refs. */
|
|
190
|
+
readonly ownerTasks: readonly string[];
|
|
191
|
+
/** Why, one line each. */
|
|
192
|
+
readonly reasons: readonly string[];
|
|
193
|
+
/** Every System One question asked for this row. */
|
|
194
|
+
readonly judgments: readonly DocsModernizeJudgment[];
|
|
195
|
+
}
|
|
196
|
+
/** The reversible steps an apply run takes. */
|
|
197
|
+
export declare const DOCS_MODERNIZE_OPS: readonly ["ingest", "merge", "fold", "supersede", "write-file", "remove-file", "link", "rekind", "reslug", "link-task"];
|
|
198
|
+
/** One of {@link DOCS_MODERNIZE_OPS}. */
|
|
199
|
+
export type DocsModernizeOpKind = (typeof DOCS_MODERNIZE_OPS)[number];
|
|
200
|
+
/**
|
|
201
|
+
* Write-ahead state of a receipt op: written `pending` before the step acts,
|
|
202
|
+
* `done` after it, `reversed` once a rollback has undone it.
|
|
203
|
+
*/
|
|
204
|
+
export type DocsModernizeOpState = 'pending' | 'done' | 'reversed';
|
|
205
|
+
/** Store values a step replaced, so a rollback restores them exactly. */
|
|
206
|
+
export interface DocsModernizeOpPrior {
|
|
207
|
+
/** `supersede`: the older row's lifecycle status before the step. */
|
|
208
|
+
readonly lifecycleStatus?: string | null;
|
|
209
|
+
/** `supersede`: the older row's `superseded_by` before the step. */
|
|
210
|
+
readonly supersededBy?: string | null;
|
|
211
|
+
/** `supersede`: the newer row's `supersedes` before the step. */
|
|
212
|
+
readonly supersedes?: string | null;
|
|
213
|
+
/** `merge`: the row that held the slug before the update. */
|
|
214
|
+
readonly previousAttachmentId?: string | null;
|
|
215
|
+
/** `merge`: the row the update moved the slug to. */
|
|
216
|
+
readonly newAttachmentId?: string | null;
|
|
217
|
+
/** `link`: the slug's `links-to` targets before the step. */
|
|
218
|
+
readonly linkTargets?: readonly string[];
|
|
219
|
+
/** `rekind`: the row's kind before the step. */
|
|
220
|
+
readonly kind?: string | null;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* One step with the state it replaced.
|
|
224
|
+
*
|
|
225
|
+
* - `ingest` — a doc stored under `slug` (or slugless) for `ownerId`; `attachmentId` is the row.
|
|
226
|
+
* - `merge` — the stored doc `slug` was updated with merged content; `prior` names both rows.
|
|
227
|
+
* - `fold` — the file `path` was folded into the survivor `target` (content went there).
|
|
228
|
+
* - `supersede` — `slug` was superseded by `target`; `prior` holds the replaced pointers.
|
|
229
|
+
* - `write-file` — `path` was written; `beforeSha256` is the old bytes, or null when it was new
|
|
230
|
+
* (`base: 'repo'`: `path` is relative to the receipt's `repoRoot`, T14196).
|
|
231
|
+
* - `remove-file` — `path` was removed; `beforeSha256` names the bytes kept for rollback.
|
|
232
|
+
* - `link` — the `links-to` edges leaving `slug` were set; `prior.linkTargets` holds the old set.
|
|
233
|
+
* - `rekind` — the row `attachmentId` changed kind; `prior.kind` holds the old one (T14118).
|
|
234
|
+
* - `reslug` — `slug` was renamed to `target`; `slug` stays an alias (T14118).
|
|
235
|
+
* - `link-task` — the row `attachmentId` gained a ref to task `ownerId` (T14118).
|
|
236
|
+
*/
|
|
237
|
+
export interface DocsModernizeReceiptOp {
|
|
238
|
+
/** Step kind. */
|
|
239
|
+
readonly op: DocsModernizeOpKind;
|
|
240
|
+
/** Write-ahead state. */
|
|
241
|
+
readonly state: DocsModernizeOpState;
|
|
242
|
+
/** Doc slug the step touched, when any. */
|
|
243
|
+
readonly slug: string | null;
|
|
244
|
+
/** File path relative to the root, when any. */
|
|
245
|
+
readonly path: string | null;
|
|
246
|
+
/** The other end: survivor slug for `supersede` and `fold`. */
|
|
247
|
+
readonly target: string | null;
|
|
248
|
+
/** Attachment row created or touched by the step, when any. */
|
|
249
|
+
readonly attachmentId: string | null;
|
|
250
|
+
/** Owner the `ingest` ref was made for (`T####` or the project sentinel); rollback drops that ref. */
|
|
251
|
+
readonly ownerId: string | null;
|
|
252
|
+
/** Content the step replaced or removed, when any. */
|
|
253
|
+
readonly beforeSha256: string | null;
|
|
254
|
+
/** Content the step wrote, when any. */
|
|
255
|
+
readonly afterSha256: string | null;
|
|
256
|
+
/** Store values the step replaced. */
|
|
257
|
+
readonly prior?: DocsModernizeOpPrior;
|
|
258
|
+
/** `repo` when `path` is relative to the receipt's `repoRoot`, not its root (T14196). */
|
|
259
|
+
readonly base?: 'repo';
|
|
260
|
+
}
|
|
261
|
+
/** The record of one apply run; the input to rollback. */
|
|
262
|
+
export interface DocsModernizeReceipt {
|
|
263
|
+
/** Run id (`dm-<timestamp>`); names the receipt file. */
|
|
264
|
+
readonly runId: string;
|
|
265
|
+
/** Absolute modernize root. */
|
|
266
|
+
readonly root: string;
|
|
267
|
+
/** ISO 8601 time the run started. */
|
|
268
|
+
readonly appliedAt: string;
|
|
269
|
+
/** SHA-256 of the canonical JSON of the plan that was applied. */
|
|
270
|
+
readonly planSha256: string;
|
|
271
|
+
/** Steps in the order they ran. */
|
|
272
|
+
readonly ops: readonly DocsModernizeReceiptOp[];
|
|
273
|
+
/** Wikilink edges in the graph after the run. */
|
|
274
|
+
readonly edgeCount: number;
|
|
275
|
+
/** Every scanned file whose bytes were hash-verified in the blob store, before any removal. */
|
|
276
|
+
readonly blobs: readonly {
|
|
277
|
+
readonly path: string;
|
|
278
|
+
readonly sha256: string;
|
|
279
|
+
}[];
|
|
280
|
+
/** Files moved, relative to the root (stage exactly these). */
|
|
281
|
+
readonly moves: readonly {
|
|
282
|
+
readonly from: string;
|
|
283
|
+
readonly to: string;
|
|
284
|
+
}[];
|
|
285
|
+
/** Files removed, relative to the root. */
|
|
286
|
+
readonly deleted: readonly string[];
|
|
287
|
+
/** ISO 8601 time the run was rolled back, or null. */
|
|
288
|
+
readonly rolledBackAt: string | null;
|
|
289
|
+
/** Wall time of the apply, in ms (store mode). */
|
|
290
|
+
readonly durationMs?: number;
|
|
291
|
+
/** Repository root that `base: 'repo'` ops are relative to (T14196). */
|
|
292
|
+
readonly repoRoot?: string;
|
|
293
|
+
}
|
|
294
|
+
/** Shape check for a {@link DocsModernizePlan} read from a `--plan` file. */
|
|
295
|
+
export declare const docsModernizePlanSchema: z.ZodObject<{
|
|
296
|
+
root: z.ZodString;
|
|
297
|
+
generatedAt: z.ZodString;
|
|
298
|
+
mode: z.ZodEnum<{
|
|
299
|
+
tree: "tree";
|
|
300
|
+
"store-only": "store-only";
|
|
301
|
+
}>;
|
|
302
|
+
counts: z.ZodRecord<z.ZodEnum<{
|
|
303
|
+
keep: "keep";
|
|
304
|
+
delete: "delete";
|
|
305
|
+
rename: "rename";
|
|
306
|
+
"merge-into": "merge-into";
|
|
307
|
+
}>, z.ZodNumber>;
|
|
308
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
309
|
+
path: z.ZodString;
|
|
310
|
+
sha256: z.ZodString;
|
|
311
|
+
kind: z.ZodString;
|
|
312
|
+
slug: z.ZodString;
|
|
313
|
+
title: z.ZodString;
|
|
314
|
+
disposition: z.ZodEnum<{
|
|
315
|
+
keep: "keep";
|
|
316
|
+
delete: "delete";
|
|
317
|
+
rename: "rename";
|
|
318
|
+
"merge-into": "merge-into";
|
|
319
|
+
}>;
|
|
320
|
+
target: z.ZodNullable<z.ZodString>;
|
|
321
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
322
|
+
judgments: z.ZodArray<z.ZodObject<{
|
|
323
|
+
question: z.ZodEnum<{
|
|
324
|
+
classify: "classify";
|
|
325
|
+
merge: "merge";
|
|
326
|
+
}>;
|
|
327
|
+
site: z.ZodString;
|
|
328
|
+
mode: z.ZodEnum<{
|
|
329
|
+
off: "off";
|
|
330
|
+
shadow: "shadow";
|
|
331
|
+
on: "on";
|
|
332
|
+
}>;
|
|
333
|
+
ruleAnswer: z.ZodString;
|
|
334
|
+
decidedAnswer: z.ZodNullable<z.ZodString>;
|
|
335
|
+
decidedConfidence: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
source: z.ZodEnum<{
|
|
337
|
+
cache: "cache";
|
|
338
|
+
fallback: "fallback";
|
|
339
|
+
provider: "provider";
|
|
340
|
+
}>;
|
|
341
|
+
acted: z.ZodString;
|
|
342
|
+
}, z.core.$strip>>;
|
|
343
|
+
ownerTasks: z.ZodArray<z.ZodString>;
|
|
344
|
+
category: z.ZodString;
|
|
345
|
+
refs: z.ZodArray<z.ZodString>;
|
|
346
|
+
overridden: z.ZodBoolean;
|
|
347
|
+
covers: z.ZodArray<z.ZodString>;
|
|
348
|
+
baselineRemove: z.ZodBoolean;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
linkFixes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
351
|
+
kind: z.ZodLiteral<"link-fix">;
|
|
352
|
+
path: z.ZodString;
|
|
353
|
+
href: z.ZodString;
|
|
354
|
+
newHref: z.ZodString;
|
|
355
|
+
base: z.ZodOptional<z.ZodLiteral<"repo">>;
|
|
356
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
357
|
+
}, z.core.$strip>>>;
|
|
358
|
+
repoRoot: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
/** Shape check for an `--overrides` file ({@link DocsModernizeOverrides}). */
|
|
361
|
+
export declare const docsModernizeOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
362
|
+
disposition: z.ZodEnum<{
|
|
363
|
+
keep: "keep";
|
|
364
|
+
delete: "delete";
|
|
365
|
+
rename: "rename";
|
|
366
|
+
"merge-into": "merge-into";
|
|
367
|
+
}>;
|
|
368
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
369
|
+
reason: z.ZodString;
|
|
370
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
371
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
372
|
+
covers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
373
|
+
}, z.core.$strip>>;
|
|
374
|
+
/** Shape check for one line of a run's write-ahead journal (`<runId>.ops.jsonl`). */
|
|
375
|
+
export declare const docsModernizeJournalLineSchema: z.ZodObject<{
|
|
376
|
+
op: z.ZodEnum<{
|
|
377
|
+
link: "link";
|
|
378
|
+
merge: "merge";
|
|
379
|
+
ingest: "ingest";
|
|
380
|
+
fold: "fold";
|
|
381
|
+
supersede: "supersede";
|
|
382
|
+
"write-file": "write-file";
|
|
383
|
+
"remove-file": "remove-file";
|
|
384
|
+
rekind: "rekind";
|
|
385
|
+
reslug: "reslug";
|
|
386
|
+
"link-task": "link-task";
|
|
387
|
+
}>;
|
|
388
|
+
state: z.ZodEnum<{
|
|
389
|
+
pending: "pending";
|
|
390
|
+
done: "done";
|
|
391
|
+
reversed: "reversed";
|
|
392
|
+
}>;
|
|
393
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
394
|
+
path: z.ZodNullable<z.ZodString>;
|
|
395
|
+
target: z.ZodNullable<z.ZodString>;
|
|
396
|
+
attachmentId: z.ZodNullable<z.ZodString>;
|
|
397
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
398
|
+
beforeSha256: z.ZodNullable<z.ZodString>;
|
|
399
|
+
afterSha256: z.ZodNullable<z.ZodString>;
|
|
400
|
+
prior: z.ZodOptional<z.ZodObject<{
|
|
401
|
+
lifecycleStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
402
|
+
supersededBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
403
|
+
supersedes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
404
|
+
previousAttachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
405
|
+
newAttachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
406
|
+
linkTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
407
|
+
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
408
|
+
}, z.core.$strip>>;
|
|
409
|
+
base: z.ZodOptional<z.ZodLiteral<"repo">>;
|
|
410
|
+
i: z.ZodNumber;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
/** Shape check for a {@link DocsModernizeReceipt} read back for rollback. */
|
|
413
|
+
export declare const docsModernizeReceiptSchema: z.ZodObject<{
|
|
414
|
+
runId: z.ZodString;
|
|
415
|
+
root: z.ZodString;
|
|
416
|
+
appliedAt: z.ZodString;
|
|
417
|
+
planSha256: z.ZodString;
|
|
418
|
+
edgeCount: z.ZodNumber;
|
|
419
|
+
rolledBackAt: z.ZodNullable<z.ZodString>;
|
|
420
|
+
blobs: z.ZodArray<z.ZodObject<{
|
|
421
|
+
path: z.ZodString;
|
|
422
|
+
sha256: z.ZodString;
|
|
423
|
+
}, z.core.$strip>>;
|
|
424
|
+
moves: z.ZodArray<z.ZodObject<{
|
|
425
|
+
from: z.ZodString;
|
|
426
|
+
to: z.ZodString;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
deleted: z.ZodArray<z.ZodString>;
|
|
429
|
+
ops: z.ZodArray<z.ZodObject<{
|
|
430
|
+
op: z.ZodEnum<{
|
|
431
|
+
link: "link";
|
|
432
|
+
merge: "merge";
|
|
433
|
+
ingest: "ingest";
|
|
434
|
+
fold: "fold";
|
|
435
|
+
supersede: "supersede";
|
|
436
|
+
"write-file": "write-file";
|
|
437
|
+
"remove-file": "remove-file";
|
|
438
|
+
rekind: "rekind";
|
|
439
|
+
reslug: "reslug";
|
|
440
|
+
"link-task": "link-task";
|
|
441
|
+
}>;
|
|
442
|
+
state: z.ZodEnum<{
|
|
443
|
+
pending: "pending";
|
|
444
|
+
done: "done";
|
|
445
|
+
reversed: "reversed";
|
|
446
|
+
}>;
|
|
447
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
448
|
+
path: z.ZodNullable<z.ZodString>;
|
|
449
|
+
target: z.ZodNullable<z.ZodString>;
|
|
450
|
+
attachmentId: z.ZodNullable<z.ZodString>;
|
|
451
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
452
|
+
beforeSha256: z.ZodNullable<z.ZodString>;
|
|
453
|
+
afterSha256: z.ZodNullable<z.ZodString>;
|
|
454
|
+
prior: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
lifecycleStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
456
|
+
supersededBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
457
|
+
supersedes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
previousAttachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
newAttachmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
linkTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
461
|
+
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
462
|
+
}, z.core.$strip>>;
|
|
463
|
+
base: z.ZodOptional<z.ZodLiteral<"repo">>;
|
|
464
|
+
}, z.core.$strip>>;
|
|
465
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
repoRoot: z.ZodOptional<z.ZodString>;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
//# sourceMappingURL=modernize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modernize.d.ts","sourceRoot":"","sources":["../../src/docs/modernize.ts"],"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3
|
+
*
|
|
4
|
+
* `cleo docs modernize <path>` turns a messy docs folder into clean, linked
|
|
5
|
+
* CleoDocs. A dry run produces a {@link DocsModernizePlan}: one
|
|
6
|
+
* {@link DocsModernizePlanRow} per markdown or text file, carrying the kind,
|
|
7
|
+
* the stable slug, the disposition and the reasons (including every System
|
|
8
|
+
* One judgment that was asked). `--apply` executes a plan and writes a
|
|
9
|
+
* {@link DocsModernizeReceipt}; every receipt op records the state it
|
|
10
|
+
* replaced, so `--rollback <runId>` can reverse the run.
|
|
11
|
+
*
|
|
12
|
+
* Types only — the planner and applier live in
|
|
13
|
+
* `packages/core/src/docs/modernize/`.
|
|
14
|
+
*
|
|
15
|
+
* @task T14113
|
|
16
|
+
* @epic T14106
|
|
17
|
+
*/
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
/** What modernize does with one file. */
|
|
20
|
+
export const DOCS_MODERNIZE_DISPOSITIONS = ['keep', 'rename', 'merge-into', 'delete'];
|
|
21
|
+
/** The reversible steps an apply run takes. */
|
|
22
|
+
export const DOCS_MODERNIZE_OPS = [
|
|
23
|
+
'ingest',
|
|
24
|
+
'merge',
|
|
25
|
+
'fold',
|
|
26
|
+
'supersede',
|
|
27
|
+
'write-file',
|
|
28
|
+
'remove-file',
|
|
29
|
+
'link',
|
|
30
|
+
'rekind',
|
|
31
|
+
'reslug',
|
|
32
|
+
'link-task',
|
|
33
|
+
];
|
|
34
|
+
// ─── Schemas (a plan or receipt read from disk is untrusted input) ───────────
|
|
35
|
+
const judgmentSchema = z.object({
|
|
36
|
+
question: z.enum(['classify', 'merge']),
|
|
37
|
+
site: z.string(),
|
|
38
|
+
mode: z.enum(['off', 'shadow', 'on']),
|
|
39
|
+
ruleAnswer: z.string(),
|
|
40
|
+
decidedAnswer: z.string().nullable(),
|
|
41
|
+
decidedConfidence: z.number().nullable(),
|
|
42
|
+
source: z.enum(['provider', 'cache', 'fallback']),
|
|
43
|
+
acted: z.string(),
|
|
44
|
+
});
|
|
45
|
+
const relPath = z.string().min(1).max(1024);
|
|
46
|
+
/** Shape check for a {@link DocsModernizePlan} read from a `--plan` file. */
|
|
47
|
+
export const docsModernizePlanSchema = z.object({
|
|
48
|
+
root: z.string().min(1),
|
|
49
|
+
generatedAt: z.string(),
|
|
50
|
+
mode: z.enum(['tree', 'store-only']),
|
|
51
|
+
counts: z.record(z.enum(DOCS_MODERNIZE_DISPOSITIONS), z.number()),
|
|
52
|
+
rows: z.array(z.object({
|
|
53
|
+
path: relPath,
|
|
54
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/),
|
|
55
|
+
kind: z.string().min(1),
|
|
56
|
+
slug: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
57
|
+
title: z.string(),
|
|
58
|
+
disposition: z.enum(DOCS_MODERNIZE_DISPOSITIONS),
|
|
59
|
+
target: z.string().min(1).max(1024).nullable(),
|
|
60
|
+
reasons: z.array(z.string()),
|
|
61
|
+
judgments: z.array(judgmentSchema),
|
|
62
|
+
ownerTasks: z.array(z.string().regex(/^[TD]\d+$/)),
|
|
63
|
+
category: z.string(),
|
|
64
|
+
refs: z.array(z.string()),
|
|
65
|
+
overridden: z.boolean(),
|
|
66
|
+
covers: z.array(z.string()),
|
|
67
|
+
baselineRemove: z.boolean(),
|
|
68
|
+
})),
|
|
69
|
+
linkFixes: z
|
|
70
|
+
.array(z.object({
|
|
71
|
+
kind: z.literal('link-fix'),
|
|
72
|
+
path: relPath,
|
|
73
|
+
href: z.string().min(1).max(2048),
|
|
74
|
+
newHref: z.string().min(1).max(2048),
|
|
75
|
+
base: z.literal('repo').optional(),
|
|
76
|
+
sha256: z
|
|
77
|
+
.string()
|
|
78
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
79
|
+
.optional(),
|
|
80
|
+
}))
|
|
81
|
+
.optional(),
|
|
82
|
+
repoRoot: z.string().min(1).optional(),
|
|
83
|
+
});
|
|
84
|
+
/** Shape check for an `--overrides` file ({@link DocsModernizeOverrides}). */
|
|
85
|
+
export const docsModernizeOverridesSchema = z.record(relPath, z.object({
|
|
86
|
+
disposition: z.enum(DOCS_MODERNIZE_DISPOSITIONS),
|
|
87
|
+
target: z.string().min(1).max(1024).nullable().optional(),
|
|
88
|
+
reason: z.string().min(1),
|
|
89
|
+
kind: z.string().min(1).optional(),
|
|
90
|
+
slug: z
|
|
91
|
+
.string()
|
|
92
|
+
.regex(/^[a-z0-9][a-z0-9-]*$/)
|
|
93
|
+
.optional(),
|
|
94
|
+
covers: z.array(z.string()).optional(),
|
|
95
|
+
}));
|
|
96
|
+
/** Shape check for one receipt op. */
|
|
97
|
+
const receiptOpSchema = z.object({
|
|
98
|
+
op: z.enum(DOCS_MODERNIZE_OPS),
|
|
99
|
+
state: z.enum(['pending', 'done', 'reversed']),
|
|
100
|
+
slug: z.string().nullable(),
|
|
101
|
+
path: relPath.nullable(),
|
|
102
|
+
target: z.string().nullable(),
|
|
103
|
+
attachmentId: z.string().nullable(),
|
|
104
|
+
ownerId: z.string().nullable(),
|
|
105
|
+
beforeSha256: z
|
|
106
|
+
.string()
|
|
107
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
108
|
+
.nullable(),
|
|
109
|
+
afterSha256: z
|
|
110
|
+
.string()
|
|
111
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
112
|
+
.nullable(),
|
|
113
|
+
prior: z
|
|
114
|
+
.object({
|
|
115
|
+
lifecycleStatus: z.string().nullable().optional(),
|
|
116
|
+
supersededBy: z.string().nullable().optional(),
|
|
117
|
+
supersedes: z.string().nullable().optional(),
|
|
118
|
+
previousAttachmentId: z.string().nullable().optional(),
|
|
119
|
+
newAttachmentId: z.string().nullable().optional(),
|
|
120
|
+
linkTargets: z.array(z.string()).optional(),
|
|
121
|
+
kind: z.string().nullable().optional(),
|
|
122
|
+
})
|
|
123
|
+
.optional(),
|
|
124
|
+
base: z.literal('repo').optional(),
|
|
125
|
+
});
|
|
126
|
+
/** Shape check for one line of a run's write-ahead journal (`<runId>.ops.jsonl`). */
|
|
127
|
+
export const docsModernizeJournalLineSchema = receiptOpSchema.extend({
|
|
128
|
+
i: z.number().int().min(0),
|
|
129
|
+
});
|
|
130
|
+
/** Shape check for a {@link DocsModernizeReceipt} read back for rollback. */
|
|
131
|
+
export const docsModernizeReceiptSchema = z.object({
|
|
132
|
+
runId: z.string().regex(/^dm-[\w-]+$/),
|
|
133
|
+
root: z.string().min(1),
|
|
134
|
+
appliedAt: z.string(),
|
|
135
|
+
planSha256: z.string(),
|
|
136
|
+
edgeCount: z.number(),
|
|
137
|
+
rolledBackAt: z.string().nullable(),
|
|
138
|
+
blobs: z.array(z.object({ path: relPath, sha256: z.string() })),
|
|
139
|
+
moves: z.array(z.object({ from: relPath, to: relPath })),
|
|
140
|
+
deleted: z.array(relPath),
|
|
141
|
+
ops: z.array(receiptOpSchema),
|
|
142
|
+
durationMs: z.number().optional(),
|
|
143
|
+
repoRoot: z.string().min(1).optional(),
|
|
144
|
+
});
|
|
145
|
+
//# sourceMappingURL=modernize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modernize.js","sourceRoot":"","sources":["../../src/docs/modernize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yCAAyC;AACzC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AA2L/F,+CAA+C;AAC/C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ;IACR,OAAO;IACP,MAAM;IACN,WAAW;IACX,YAAY;IACZ,aAAa;IACb,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;CACH,CAAC;AAiGX,gFAAgF;AAEhF,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,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G,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;IACzB,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC"}
|
|
@@ -454,10 +454,10 @@ export declare const provenanceDocNodeSchema: z.ZodObject<{
|
|
|
454
454
|
export declare const provenanceTaskNodeSchema: z.ZodObject<{
|
|
455
455
|
kind: z.ZodLiteral<"task">;
|
|
456
456
|
taskType: z.ZodEnum<{
|
|
457
|
-
epic: "epic";
|
|
458
457
|
task: "task";
|
|
459
|
-
subtask: "subtask";
|
|
460
458
|
saga: "saga";
|
|
459
|
+
epic: "epic";
|
|
460
|
+
subtask: "subtask";
|
|
461
461
|
}>;
|
|
462
462
|
status: z.ZodEnum<{
|
|
463
463
|
pending: "pending";
|
|
@@ -544,10 +544,10 @@ export declare const provenanceNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
544
544
|
}, z.core.$strip>, z.ZodObject<{
|
|
545
545
|
kind: z.ZodLiteral<"task">;
|
|
546
546
|
taskType: z.ZodEnum<{
|
|
547
|
-
epic: "epic";
|
|
548
547
|
task: "task";
|
|
549
|
-
subtask: "subtask";
|
|
550
548
|
saga: "saga";
|
|
549
|
+
epic: "epic";
|
|
550
|
+
subtask: "subtask";
|
|
551
551
|
}>;
|
|
552
552
|
status: z.ZodEnum<{
|
|
553
553
|
pending: "pending";
|
|
@@ -651,10 +651,10 @@ export declare const docProvenanceResponseSchema: z.ZodObject<{
|
|
|
651
651
|
}, z.core.$strip>, z.ZodObject<{
|
|
652
652
|
kind: z.ZodLiteral<"task">;
|
|
653
653
|
taskType: z.ZodEnum<{
|
|
654
|
-
epic: "epic";
|
|
655
654
|
task: "task";
|
|
656
|
-
subtask: "subtask";
|
|
657
655
|
saga: "saga";
|
|
656
|
+
epic: "epic";
|
|
657
|
+
subtask: "subtask";
|
|
658
658
|
}>;
|
|
659
659
|
status: z.ZodEnum<{
|
|
660
660
|
pending: "pending";
|