@cleocode/contracts 2026.5.96 → 2026.5.98
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/__tests__/enums.test.d.ts +14 -0
- package/dist/__tests__/enums.test.d.ts.map +1 -0
- package/dist/__tests__/enums.test.js +75 -0
- package/dist/__tests__/enums.test.js.map +1 -0
- package/dist/__tests__/jobs.test.d.ts +11 -0
- package/dist/__tests__/jobs.test.d.ts.map +1 -0
- package/dist/__tests__/jobs.test.js +48 -0
- package/dist/__tests__/jobs.test.js.map +1 -0
- package/dist/__tests__/memory-wire-shapes.test.d.ts +19 -0
- package/dist/__tests__/memory-wire-shapes.test.d.ts.map +1 -0
- package/dist/__tests__/memory-wire-shapes.test.js +119 -0
- package/dist/__tests__/memory-wire-shapes.test.js.map +1 -0
- package/dist/__tests__/operation-def.test.d.ts +20 -0
- package/dist/__tests__/operation-def.test.d.ts.map +1 -0
- package/dist/__tests__/operation-def.test.js +111 -0
- package/dist/__tests__/operation-def.test.js.map +1 -0
- package/dist/__tests__/provenance.test.d.ts +18 -0
- package/dist/__tests__/provenance.test.d.ts.map +1 -0
- package/dist/__tests__/provenance.test.js +142 -0
- package/dist/__tests__/provenance.test.js.map +1 -0
- package/dist/__tests__/scaffold-diagnostics.test.d.ts +19 -0
- package/dist/__tests__/scaffold-diagnostics.test.d.ts.map +1 -0
- package/dist/__tests__/scaffold-diagnostics.test.js +70 -0
- package/dist/__tests__/scaffold-diagnostics.test.js.map +1 -0
- package/dist/dispatch/identity.d.ts +72 -0
- package/dist/dispatch/identity.d.ts.map +1 -0
- package/dist/dispatch/identity.js +72 -0
- package/dist/dispatch/identity.js.map +1 -0
- package/dist/dispatch/operation-def.d.ts +92 -0
- package/dist/dispatch/operation-def.d.ts.map +1 -0
- package/dist/dispatch/operation-def.js +31 -0
- package/dist/dispatch/operation-def.js.map +1 -0
- package/dist/doctor.d.ts +43 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/enums.d.ts +123 -0
- package/dist/enums.d.ts.map +1 -0
- package/dist/enums.js +139 -0
- package/dist/enums.js.map +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/jobs.d.ts +39 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +19 -0
- package/dist/jobs.js.map +1 -0
- package/dist/memory/budgeted.d.ts +67 -0
- package/dist/memory/budgeted.d.ts.map +1 -0
- package/dist/memory/budgeted.js +17 -0
- package/dist/memory/budgeted.js.map +1 -0
- package/dist/memory/fetch.d.ts +58 -0
- package/dist/memory/fetch.d.ts.map +1 -0
- package/dist/memory/fetch.js +19 -0
- package/dist/memory/fetch.js.map +1 -0
- package/dist/memory/observe.d.ts +158 -0
- package/dist/memory/observe.d.ts.map +1 -0
- package/dist/memory/observe.js +46 -0
- package/dist/memory/observe.js.map +1 -0
- package/dist/memory/search.d.ts +137 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +22 -0
- package/dist/memory/search.js.map +1 -0
- package/dist/memory/timeline.d.ts +89 -0
- package/dist/memory/timeline.d.ts.map +1 -0
- package/dist/memory/timeline.js +22 -0
- package/dist/memory/timeline.js.map +1 -0
- package/dist/operations/focus.d.ts +199 -0
- package/dist/operations/focus.d.ts.map +1 -0
- package/dist/operations/focus.js +15 -0
- package/dist/operations/focus.js.map +1 -0
- package/dist/operations/index.d.ts +1 -0
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +1 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/session.d.ts +65 -0
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +38 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/provenance.d.ts +257 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +42 -0
- package/dist/provenance.js.map +1 -0
- package/dist/release/plan.d.ts +7 -7
- package/dist/scaffold-diagnostics.d.ts +110 -0
- package/dist/scaffold-diagnostics.d.ts.map +1 -0
- package/dist/scaffold-diagnostics.js +28 -0
- package/dist/scaffold-diagnostics.js.map +1 -0
- package/dist/session.d.ts +37 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/tasks/archive.d.ts +3 -3
- package/package.json +42 -2
- package/src/__tests__/enums.test.ts +114 -0
- package/src/__tests__/jobs.test.ts +76 -0
- package/src/__tests__/memory-wire-shapes.test.ts +371 -0
- package/src/__tests__/operation-def.test.ts +185 -0
- package/src/__tests__/provenance.test.ts +259 -0
- package/src/__tests__/scaffold-diagnostics.test.ts +137 -0
- package/src/dispatch/identity.ts +109 -0
- package/src/dispatch/operation-def.ts +102 -0
- package/src/doctor.ts +44 -0
- package/src/enums.ts +144 -0
- package/src/index.ts +79 -1
- package/src/jobs.ts +45 -0
- package/src/memory/budgeted.ts +75 -0
- package/src/memory/fetch.ts +66 -0
- package/src/memory/observe.ts +176 -0
- package/src/memory/search.ts +145 -0
- package/src/memory/timeline.ts +100 -0
- package/src/operations/focus.ts +226 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/session.ts +67 -0
- package/src/operations/tasks.ts +40 -0
- package/src/provenance.ts +335 -0
- package/src/scaffold-diagnostics.ts +119 -0
- package/src/session.ts +37 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance graph union types.
|
|
3
|
+
*
|
|
4
|
+
* Canonical home for the 16 string-literal union types that describe edges
|
|
5
|
+
* and FSM states in the CLEO provenance graph (commits, pull requests,
|
|
6
|
+
* releases, release artifacts, and BRAIN↔release links). Promoted from
|
|
7
|
+
* `packages/core/src/store/tasks-schema.ts` in Phase 0c of the
|
|
8
|
+
* SG-ARCH-SOLID Saga so that downstream packages can import these unions
|
|
9
|
+
* without pulling in the Drizzle schema runtime.
|
|
10
|
+
*
|
|
11
|
+
* The const arrays that back each union (`PR_STATES`, `COMMIT_LINK_KINDS`,
|
|
12
|
+
* `RELEASE_STATUSES`, …) remain in `tasks-schema.ts` because Drizzle's
|
|
13
|
+
* `text({ enum: ... })` column declaration narrows the runtime row type
|
|
14
|
+
* directly from those `as const` literals. `tasks-schema.ts` re-exports
|
|
15
|
+
* each union from this module to preserve the existing public surface for
|
|
16
|
+
* every `import * as schema from '../store/tasks-schema.js'` consumer.
|
|
17
|
+
*
|
|
18
|
+
* @see SPEC-T9345 §3 — provenance graph table definitions
|
|
19
|
+
* @see ADR-073 — task hierarchy charter (release provenance scope)
|
|
20
|
+
*
|
|
21
|
+
* Consolidated unions:
|
|
22
|
+
* - {@link PrState} — pull-request lifecycle state
|
|
23
|
+
* - {@link PrLinkSource} — how a PR↔task link was discovered
|
|
24
|
+
* - {@link PrLinkKind} — semantic PR↔task relationship
|
|
25
|
+
* - {@link CommitConventionalType} — Conventional Commits prefix
|
|
26
|
+
* - {@link CommitLinkKind} — semantic commit↔task relationship
|
|
27
|
+
* - {@link CommitLinkSource} — how a commit↔task link was discovered
|
|
28
|
+
* - {@link CommitFileChangeType} — git status letter (A/M/D/R/C)
|
|
29
|
+
* - {@link ReleaseScheme} — versioning scheme
|
|
30
|
+
* - {@link ReleaseChannel} — npm dist-tag channel
|
|
31
|
+
* - {@link ReleaseKind} — release packaging type
|
|
32
|
+
* - {@link ReleaseStatus} — unified release FSM state
|
|
33
|
+
* - {@link ReleaseChangeType} — 12-value change taxonomy
|
|
34
|
+
* - {@link ReleaseImpact} — semver impact level
|
|
35
|
+
* - {@link ReleaseClassifiedBy} — change-classification provenance
|
|
36
|
+
* - {@link ReleaseArtifactType} — artifact archetype
|
|
37
|
+
* - {@link BrainReleaseLinkType} — BRAIN↔release link semantics
|
|
38
|
+
*
|
|
39
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9955 (Phase 0c)
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* State of a pull request.
|
|
43
|
+
*
|
|
44
|
+
* Mirrors the GitHub PR state machine:
|
|
45
|
+
* - `open` — PR is open and not yet merged
|
|
46
|
+
* - `closed` — PR was closed without merging
|
|
47
|
+
* - `merged` — PR was merged into the target branch
|
|
48
|
+
*
|
|
49
|
+
* @task T9507
|
|
50
|
+
*/
|
|
51
|
+
export type PrState = 'open' | 'closed' | 'merged';
|
|
52
|
+
/**
|
|
53
|
+
* How a PR↔task link was discovered.
|
|
54
|
+
*
|
|
55
|
+
* - `pr-title` — task ID matched in the PR title
|
|
56
|
+
* - `pr-body` — task ID matched in the PR body markdown
|
|
57
|
+
* - `branch-name` — parsed from the branch name (e.g. `feat/T9507-...`)
|
|
58
|
+
* - `commit-trailer` — extracted from a git trailer in a PR commit
|
|
59
|
+
* - `manual` — explicitly linked via `cleo provenance link`
|
|
60
|
+
*
|
|
61
|
+
* @task T9507
|
|
62
|
+
*/
|
|
63
|
+
export type PrLinkSource = 'pr-title' | 'pr-body' | 'branch-name' | 'commit-trailer' | 'manual';
|
|
64
|
+
/**
|
|
65
|
+
* Semantic classification of a PR↔task relationship.
|
|
66
|
+
*
|
|
67
|
+
* Extends {@link CommitLinkKind} with `'tracks'` for PRs that observe a
|
|
68
|
+
* task without directly implementing, fixing, or documenting it.
|
|
69
|
+
*
|
|
70
|
+
* - `implements` — the PR directly implements the task's acceptance criteria
|
|
71
|
+
* - `fixes` — the PR fixes a bug or regression in the task's work
|
|
72
|
+
* - `refactors` — the PR restructures code introduced by the task
|
|
73
|
+
* - `tests` — the PR adds or updates tests for the task
|
|
74
|
+
* - `docs` — the PR updates documentation for the task
|
|
75
|
+
* - `reverts` — the PR reverts work introduced by the task
|
|
76
|
+
* - `tracks` — the PR is related to but does not directly implement the task
|
|
77
|
+
*
|
|
78
|
+
* @task T9507
|
|
79
|
+
*/
|
|
80
|
+
export type PrLinkKind = 'implements' | 'fixes' | 'refactors' | 'tests' | 'docs' | 'reverts' | 'tracks';
|
|
81
|
+
/**
|
|
82
|
+
* Conventional Commits prefix parsed from a commit subject.
|
|
83
|
+
*
|
|
84
|
+
* Adds `'breaking'` to the canonical CC set to flag BREAKING CHANGE
|
|
85
|
+
* footers. The DB column is nullable — a commit that does not follow
|
|
86
|
+
* Conventional Commits format stores NULL rather than one of these values.
|
|
87
|
+
*
|
|
88
|
+
* @task T9506
|
|
89
|
+
*/
|
|
90
|
+
export type CommitConventionalType = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor' | 'test' | 'build' | 'ci' | 'perf' | 'revert' | 'breaking';
|
|
91
|
+
/**
|
|
92
|
+
* Semantic classification of a commit↔task relationship.
|
|
93
|
+
*
|
|
94
|
+
* - `implements` — the commit directly implements the task's acceptance criteria
|
|
95
|
+
* - `fixes` — the commit fixes a bug or regression in the task's work
|
|
96
|
+
* - `refactors` — the commit restructures code introduced by the task
|
|
97
|
+
* - `tests` — the commit adds or updates tests for the task
|
|
98
|
+
* - `docs` — the commit updates documentation for the task
|
|
99
|
+
* - `reverts` — the commit reverts work introduced by the task
|
|
100
|
+
*
|
|
101
|
+
* @task T9506
|
|
102
|
+
*/
|
|
103
|
+
export type CommitLinkKind = 'implements' | 'fixes' | 'refactors' | 'tests' | 'docs' | 'reverts';
|
|
104
|
+
/**
|
|
105
|
+
* How a commit↔task link was discovered.
|
|
106
|
+
*
|
|
107
|
+
* - `commit-trailer` — extracted from a `T####:` or `Task-Id:` git trailer
|
|
108
|
+
* - `commit-subject` — matched `T####` regex in the commit subject line
|
|
109
|
+
* - `pr-title` — matched task ID in the PR title
|
|
110
|
+
* - `pr-body` — matched task ID in the PR body markdown
|
|
111
|
+
* - `branch-name` — parsed from the branch name (e.g., `feat/T9506-...`)
|
|
112
|
+
* - `manual` — explicitly linked via `cleo provenance link`
|
|
113
|
+
*
|
|
114
|
+
* @task T9506
|
|
115
|
+
*/
|
|
116
|
+
export type CommitLinkSource = 'commit-trailer' | 'commit-subject' | 'pr-title' | 'pr-body' | 'branch-name' | 'manual';
|
|
117
|
+
/**
|
|
118
|
+
* Per-file change type from a git diff (status letter codes).
|
|
119
|
+
*
|
|
120
|
+
* - `A` — added
|
|
121
|
+
* - `M` — modified
|
|
122
|
+
* - `D` — deleted
|
|
123
|
+
* - `R` — renamed
|
|
124
|
+
* - `C` — copied
|
|
125
|
+
*
|
|
126
|
+
* @task T9506
|
|
127
|
+
*/
|
|
128
|
+
export type CommitFileChangeType = 'A' | 'M' | 'D' | 'R' | 'C';
|
|
129
|
+
/**
|
|
130
|
+
* Versioning scheme for a release.
|
|
131
|
+
*
|
|
132
|
+
* - `calver` — YYYY.MM.patch (e.g. 2026.5.74) — CLEO default
|
|
133
|
+
* - `semver` — MAJOR.MINOR.PATCH (e.g. 1.2.3)
|
|
134
|
+
* - `calver-suffix` — YYYY.MM.patch.N suffix hotfix (e.g. 2026.5.74.2)
|
|
135
|
+
*
|
|
136
|
+
* @task T9508
|
|
137
|
+
* @remarks
|
|
138
|
+
* The values here MUST stay aligned with `RELEASE_SCHEMES` in
|
|
139
|
+
* `tasks-schema.ts`; that const array drives the Drizzle row type. A
|
|
140
|
+
* compile-time structural assertion in
|
|
141
|
+
* `packages/contracts/src/__tests__/provenance.test.ts` pins both sides.
|
|
142
|
+
*/
|
|
143
|
+
export type ReleaseScheme = 'calver' | 'semver' | 'calver-suffix';
|
|
144
|
+
/**
|
|
145
|
+
* Release channel — controls which npm dist-tag (or equivalent) the
|
|
146
|
+
* artifact is published under.
|
|
147
|
+
*
|
|
148
|
+
* - `latest` — current stable
|
|
149
|
+
* - `beta` — pre-release tested in production-adjacent environments
|
|
150
|
+
* - `dev` — internal development snapshots
|
|
151
|
+
* - `hotfix` — emergency patch outside the regular cadence
|
|
152
|
+
*
|
|
153
|
+
* @task T9508
|
|
154
|
+
* @remarks
|
|
155
|
+
* Distinct from the `ReleaseChannel` exported by
|
|
156
|
+
* `@cleocode/contracts/release/channel` (which carries the npm-level
|
|
157
|
+
* `latest|beta|alpha` set) and from the `ReleaseChannel` in
|
|
158
|
+
* `@cleocode/contracts/release/plan` (which carries the release-plan
|
|
159
|
+
* `latest|beta|alpha|rc` set). Top-level `@cleocode/contracts` re-exports
|
|
160
|
+
* this union under a disambiguating alias.
|
|
161
|
+
*/
|
|
162
|
+
export type ReleaseChannel = 'latest' | 'beta' | 'dev' | 'hotfix';
|
|
163
|
+
/**
|
|
164
|
+
* Release packaging kind, orthogonal to individual change types within
|
|
165
|
+
* the release.
|
|
166
|
+
*
|
|
167
|
+
* - `regular` — standard scheduled release
|
|
168
|
+
* - `hotfix` — emergency patch outside regular cadence
|
|
169
|
+
* - `prerelease` — alpha/beta/rc release for early adopters
|
|
170
|
+
*
|
|
171
|
+
* @task T9508
|
|
172
|
+
*/
|
|
173
|
+
export type ReleaseKind = 'regular' | 'hotfix' | 'prerelease';
|
|
174
|
+
/**
|
|
175
|
+
* Unified release FSM state (admits values from BOTH the new T9492
|
|
176
|
+
* pipeline and the legacy T5580 pipeline; the status value itself
|
|
177
|
+
* discriminates which pipeline owns the row).
|
|
178
|
+
*
|
|
179
|
+
* **New T9492 pipeline** — SPEC-T9345 §10.1 FSM:
|
|
180
|
+
* `planned → pr-opened → pr-merged → published → reconciled`
|
|
181
|
+
*
|
|
182
|
+
* **Legacy T5580 pipeline** — pre-T9492 12-step flow:
|
|
183
|
+
* `prepared → committed → tagged → pushed`
|
|
184
|
+
*
|
|
185
|
+
* **Shared terminal states**:
|
|
186
|
+
* `rolled_back | failed | cancelled`
|
|
187
|
+
*
|
|
188
|
+
* State transitions per R-302 MUST be monotonic within each lifecycle;
|
|
189
|
+
* illegal transitions return `E_INVALID_STATE` and MUST NOT mutate any row.
|
|
190
|
+
*
|
|
191
|
+
* @task T9508
|
|
192
|
+
* @task T9686 (unification — legacy + new statuses on one column)
|
|
193
|
+
* @see SPEC-T9345 §10.1
|
|
194
|
+
*/
|
|
195
|
+
export type ReleaseStatus = 'planned' | 'pr-opened' | 'pr-merged' | 'published' | 'reconciled' | 'prepared' | 'committed' | 'tagged' | 'pushed' | 'rolled_back' | 'failed' | 'cancelled';
|
|
196
|
+
/**
|
|
197
|
+
* 12-value CLEO release change taxonomy (Option B from
|
|
198
|
+
* provenance-graph-design.md §2.2).
|
|
199
|
+
*
|
|
200
|
+
* Lives at the release-changes level (not on `tasks.kind`) so that:
|
|
201
|
+
* - A single task can produce multiple change rows across releases.
|
|
202
|
+
* - Hotfix classification is a release-packaging decision, not a task property.
|
|
203
|
+
* - Auto-classification is agent-writable without touching OWNER-WRITE-ONLY fields.
|
|
204
|
+
*
|
|
205
|
+
* @task T9508
|
|
206
|
+
* @see SPEC-T9345 §2.2
|
|
207
|
+
*/
|
|
208
|
+
export type ReleaseChangeType = 'feature' | 'enhancement' | 'bug' | 'hotfix' | 'security' | 'breaking' | 'refactor' | 'docs' | 'chore' | 'revert' | 'deprecation' | 'infrastructure';
|
|
209
|
+
/**
|
|
210
|
+
* Impact level for a release change, mapped to semver bump assessment.
|
|
211
|
+
*
|
|
212
|
+
* - `major` — breaking change (MAJOR bump)
|
|
213
|
+
* - `minor` — new feature (MINOR bump)
|
|
214
|
+
* - `patch` — bug fix / chore (PATCH bump)
|
|
215
|
+
* - `none` — cosmetic / docs / trivial (no version bump warranted alone)
|
|
216
|
+
*
|
|
217
|
+
* @task T9508
|
|
218
|
+
*/
|
|
219
|
+
export type ReleaseImpact = 'major' | 'minor' | 'patch' | 'none';
|
|
220
|
+
/**
|
|
221
|
+
* Provenance of a release-change classification.
|
|
222
|
+
*
|
|
223
|
+
* - `auto` — derived by the classification engine from CC prefix + heuristics
|
|
224
|
+
* - `manual` — owner overrode the auto classification via `cleo release classify`
|
|
225
|
+
* - `approved` — owner approved an agent-proposed classification
|
|
226
|
+
*
|
|
227
|
+
* @task T9508
|
|
228
|
+
*/
|
|
229
|
+
export type ReleaseClassifiedBy = 'auto' | 'manual' | 'approved';
|
|
230
|
+
/**
|
|
231
|
+
* Release artifact archetype.
|
|
232
|
+
*
|
|
233
|
+
* - `npm` — npm package published to a registry
|
|
234
|
+
* - `cargo` — Rust crate published to crates.io
|
|
235
|
+
* - `docker` — Container image pushed to an OCI registry
|
|
236
|
+
* - `pypi` — Python package published to pypi.org
|
|
237
|
+
* - `github-release` — GitHub Releases asset attached to a git tag
|
|
238
|
+
* - `binary` — Generic compiled binary distributed via direct URL
|
|
239
|
+
* - `github-tag` — Lightweight git tag (no attached assets)
|
|
240
|
+
*
|
|
241
|
+
* @task T9509
|
|
242
|
+
* @see SPEC-T9345 §3.9
|
|
243
|
+
*/
|
|
244
|
+
export type ReleaseArtifactType = 'npm' | 'cargo' | 'docker' | 'pypi' | 'github-release' | 'binary' | 'github-tag';
|
|
245
|
+
/**
|
|
246
|
+
* Semantic relationship between a BRAIN entry and a release.
|
|
247
|
+
*
|
|
248
|
+
* - `approved-by` — A BRAIN decision approved a change that shipped in this release.
|
|
249
|
+
* - `documented-in` — This release is where the BRAIN entry was first formally documented.
|
|
250
|
+
* - `derived-from` — The release's failure or outcome produced this BRAIN learning/pattern.
|
|
251
|
+
* - `observed-in` — A BRAIN observation was made about this release (e.g. performance note).
|
|
252
|
+
*
|
|
253
|
+
* @task T9509
|
|
254
|
+
* @see SPEC-T9345 §8.1
|
|
255
|
+
*/
|
|
256
|
+
export type BrainReleaseLinkType = 'approved-by' | 'documented-in' | 'derived-from' | 'observed-in';
|
|
257
|
+
//# sourceMappingURL=provenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAIH;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAEhG;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,UAAU,GAClB,YA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AAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,aAAa,GACb,gBAAgB,CAAC;AAErB;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAIjE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,YAAY,CAAC;AAEjB;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance graph union types.
|
|
3
|
+
*
|
|
4
|
+
* Canonical home for the 16 string-literal union types that describe edges
|
|
5
|
+
* and FSM states in the CLEO provenance graph (commits, pull requests,
|
|
6
|
+
* releases, release artifacts, and BRAIN↔release links). Promoted from
|
|
7
|
+
* `packages/core/src/store/tasks-schema.ts` in Phase 0c of the
|
|
8
|
+
* SG-ARCH-SOLID Saga so that downstream packages can import these unions
|
|
9
|
+
* without pulling in the Drizzle schema runtime.
|
|
10
|
+
*
|
|
11
|
+
* The const arrays that back each union (`PR_STATES`, `COMMIT_LINK_KINDS`,
|
|
12
|
+
* `RELEASE_STATUSES`, …) remain in `tasks-schema.ts` because Drizzle's
|
|
13
|
+
* `text({ enum: ... })` column declaration narrows the runtime row type
|
|
14
|
+
* directly from those `as const` literals. `tasks-schema.ts` re-exports
|
|
15
|
+
* each union from this module to preserve the existing public surface for
|
|
16
|
+
* every `import * as schema from '../store/tasks-schema.js'` consumer.
|
|
17
|
+
*
|
|
18
|
+
* @see SPEC-T9345 §3 — provenance graph table definitions
|
|
19
|
+
* @see ADR-073 — task hierarchy charter (release provenance scope)
|
|
20
|
+
*
|
|
21
|
+
* Consolidated unions:
|
|
22
|
+
* - {@link PrState} — pull-request lifecycle state
|
|
23
|
+
* - {@link PrLinkSource} — how a PR↔task link was discovered
|
|
24
|
+
* - {@link PrLinkKind} — semantic PR↔task relationship
|
|
25
|
+
* - {@link CommitConventionalType} — Conventional Commits prefix
|
|
26
|
+
* - {@link CommitLinkKind} — semantic commit↔task relationship
|
|
27
|
+
* - {@link CommitLinkSource} — how a commit↔task link was discovered
|
|
28
|
+
* - {@link CommitFileChangeType} — git status letter (A/M/D/R/C)
|
|
29
|
+
* - {@link ReleaseScheme} — versioning scheme
|
|
30
|
+
* - {@link ReleaseChannel} — npm dist-tag channel
|
|
31
|
+
* - {@link ReleaseKind} — release packaging type
|
|
32
|
+
* - {@link ReleaseStatus} — unified release FSM state
|
|
33
|
+
* - {@link ReleaseChangeType} — 12-value change taxonomy
|
|
34
|
+
* - {@link ReleaseImpact} — semver impact level
|
|
35
|
+
* - {@link ReleaseClassifiedBy} — change-classification provenance
|
|
36
|
+
* - {@link ReleaseArtifactType} — artifact archetype
|
|
37
|
+
* - {@link BrainReleaseLinkType} — BRAIN↔release link semantics
|
|
38
|
+
*
|
|
39
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 · T9955 (Phase 0c)
|
|
40
|
+
*/
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../src/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG"}
|
package/dist/release/plan.d.ts
CHANGED
|
@@ -110,8 +110,8 @@ export declare const ReleaseSchemeSchema: z.ZodEnum<{
|
|
|
110
110
|
}>;
|
|
111
111
|
/** Zod schema for {@link RELEASE_KIND}. */
|
|
112
112
|
export declare const ReleaseKindSchema: z.ZodEnum<{
|
|
113
|
-
regular: "regular";
|
|
114
113
|
hotfix: "hotfix";
|
|
114
|
+
regular: "regular";
|
|
115
115
|
prerelease: "prerelease";
|
|
116
116
|
}>;
|
|
117
117
|
/** Zod schema for {@link RELEASE_STATUS}. */
|
|
@@ -119,10 +119,10 @@ export declare const ReleaseStatusSchema: z.ZodEnum<{
|
|
|
119
119
|
failed: "failed";
|
|
120
120
|
cancelled: "cancelled";
|
|
121
121
|
planned: "planned";
|
|
122
|
+
reconciled: "reconciled";
|
|
122
123
|
"pr-opened": "pr-opened";
|
|
123
124
|
"pr-merged": "pr-merged";
|
|
124
125
|
published: "published";
|
|
125
|
-
reconciled: "reconciled";
|
|
126
126
|
rolled_back: "rolled_back";
|
|
127
127
|
}>;
|
|
128
128
|
/** Zod schema for {@link GATE_STATUS}. */
|
|
@@ -169,8 +169,8 @@ export declare const TaskKindSchema: z.ZodEnum<{
|
|
|
169
169
|
refactor: "refactor";
|
|
170
170
|
chore: "chore";
|
|
171
171
|
breaking: "breaking";
|
|
172
|
-
hotfix: "hotfix";
|
|
173
172
|
revert: "revert";
|
|
173
|
+
hotfix: "hotfix";
|
|
174
174
|
}>;
|
|
175
175
|
/** Zod schema for {@link IMPACT}. */
|
|
176
176
|
export declare const ImpactSchema: z.ZodEnum<{
|
|
@@ -207,8 +207,8 @@ export declare const ReleasePlanTaskSchema: z.ZodObject<{
|
|
|
207
207
|
refactor: "refactor";
|
|
208
208
|
chore: "chore";
|
|
209
209
|
breaking: "breaking";
|
|
210
|
-
hotfix: "hotfix";
|
|
211
210
|
revert: "revert";
|
|
211
|
+
hotfix: "hotfix";
|
|
212
212
|
}>;
|
|
213
213
|
impact: z.ZodEnum<{
|
|
214
214
|
major: "major";
|
|
@@ -352,8 +352,8 @@ export declare const ReleasePlanSchema: z.ZodObject<{
|
|
|
352
352
|
}>;
|
|
353
353
|
epicId: z.ZodString;
|
|
354
354
|
releaseKind: z.ZodEnum<{
|
|
355
|
-
regular: "regular";
|
|
356
355
|
hotfix: "hotfix";
|
|
356
|
+
regular: "regular";
|
|
357
357
|
prerelease: "prerelease";
|
|
358
358
|
}>;
|
|
359
359
|
createdAt: z.ZodISODateTime;
|
|
@@ -372,8 +372,8 @@ export declare const ReleasePlanSchema: z.ZodObject<{
|
|
|
372
372
|
refactor: "refactor";
|
|
373
373
|
chore: "chore";
|
|
374
374
|
breaking: "breaking";
|
|
375
|
-
hotfix: "hotfix";
|
|
376
375
|
revert: "revert";
|
|
376
|
+
hotfix: "hotfix";
|
|
377
377
|
}>;
|
|
378
378
|
impact: z.ZodEnum<{
|
|
379
379
|
major: "major";
|
|
@@ -449,10 +449,10 @@ export declare const ReleasePlanSchema: z.ZodObject<{
|
|
|
449
449
|
failed: "failed";
|
|
450
450
|
cancelled: "cancelled";
|
|
451
451
|
planned: "planned";
|
|
452
|
+
reconciled: "reconciled";
|
|
452
453
|
"pr-opened": "pr-opened";
|
|
453
454
|
"pr-merged": "pr-merged";
|
|
454
455
|
published: "published";
|
|
455
|
-
reconciled: "reconciled";
|
|
456
456
|
rolled_back: "rolled_back";
|
|
457
457
|
}>;
|
|
458
458
|
meta: z.ZodOptional<z.ZodObject<{
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold + diagnostic result contracts.
|
|
3
|
+
*
|
|
4
|
+
* Canonical home for the result shapes produced by CLEO's directory/file
|
|
5
|
+
* scaffolding utilities (`ensure*`) and read-only health-check utilities
|
|
6
|
+
* (`check*`). Promoted to `@cleocode/contracts` in Phase 0a of the
|
|
7
|
+
* SG-ARCH-SOLID Saga to eliminate duplicate definitions that previously
|
|
8
|
+
* lived in `packages/core/src/scaffold.ts`, `injection.ts`, `hooks.ts`,
|
|
9
|
+
* `schema-management.ts`, and `validation/doctor/checks.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Consolidated types:
|
|
12
|
+
* - {@link ScaffoldResult} — was defined 3× in core (scaffold/injection/hooks)
|
|
13
|
+
* - {@link CheckStatus} — was defined 2× in core (scaffold/doctor checks)
|
|
14
|
+
* - {@link CheckResult} — was defined 2× in core (scaffold/doctor checks)
|
|
15
|
+
* - {@link HookCheckResult} — single canonical definition (no prior duplication;
|
|
16
|
+
* promoted here to keep all scaffold-diagnostic shapes co-located)
|
|
17
|
+
*
|
|
18
|
+
* NOT consolidated (intentional — different domain shape):
|
|
19
|
+
* - `CheckResult` in `packages/core/src/schema-management.ts` is a
|
|
20
|
+
* `{ ok, installed, bundled, missing, stale }` schema-install report,
|
|
21
|
+
* unrelated to diagnostic checks. It retains its local definition and
|
|
22
|
+
* will be renamed in a follow-up slice if/when its naming collision
|
|
23
|
+
* warrants a separate cleanup task.
|
|
24
|
+
*
|
|
25
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Result of an `ensure*` scaffolding operation.
|
|
29
|
+
*
|
|
30
|
+
* All ensure functions in `@cleocode/core` are idempotent — they may
|
|
31
|
+
* create, repair, or skip the requested resource and report which
|
|
32
|
+
* action they took.
|
|
33
|
+
*
|
|
34
|
+
* Originally defined in:
|
|
35
|
+
* - `packages/core/src/scaffold.ts`
|
|
36
|
+
* - `packages/core/src/injection.ts`
|
|
37
|
+
* - `packages/core/src/hooks.ts`
|
|
38
|
+
*
|
|
39
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
40
|
+
*/
|
|
41
|
+
export interface ScaffoldResult {
|
|
42
|
+
/** What action was taken: created, repaired, or skipped. */
|
|
43
|
+
action: 'created' | 'repaired' | 'skipped';
|
|
44
|
+
/** Filesystem path that was operated on. */
|
|
45
|
+
path: string;
|
|
46
|
+
/** Human-readable explanation of the result. */
|
|
47
|
+
details?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Status of a `check*` diagnostic.
|
|
51
|
+
*
|
|
52
|
+
* Originally defined in:
|
|
53
|
+
* - `packages/core/src/scaffold.ts`
|
|
54
|
+
* - `packages/core/src/validation/doctor/checks.ts`
|
|
55
|
+
*
|
|
56
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
57
|
+
*/
|
|
58
|
+
export type CheckStatus = 'passed' | 'failed' | 'warning' | 'info';
|
|
59
|
+
/**
|
|
60
|
+
* Result of a `check*` diagnostic (used by `cleo doctor` and scaffold
|
|
61
|
+
* health checks).
|
|
62
|
+
*
|
|
63
|
+
* Originally defined in:
|
|
64
|
+
* - `packages/core/src/scaffold.ts`
|
|
65
|
+
* - `packages/core/src/validation/doctor/checks.ts`
|
|
66
|
+
*
|
|
67
|
+
* The scaffold.ts and doctor/checks.ts definitions were structurally
|
|
68
|
+
* identical; this is the consolidated shape with TSDoc preserved.
|
|
69
|
+
*
|
|
70
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
71
|
+
*/
|
|
72
|
+
export interface CheckResult {
|
|
73
|
+
/** Unique check identifier (e.g. "cleo_structure", "sqlite_db"). */
|
|
74
|
+
id: string;
|
|
75
|
+
/** Category grouping (e.g. "scaffold", "global"). */
|
|
76
|
+
category: string;
|
|
77
|
+
/** Diagnostic outcome: passed, failed, warning, or info. */
|
|
78
|
+
status: CheckStatus;
|
|
79
|
+
/** Human-readable description of the check result. */
|
|
80
|
+
message: string;
|
|
81
|
+
/** Structured metadata about the check (paths, sizes, missing items). */
|
|
82
|
+
details: Record<string, unknown>;
|
|
83
|
+
/** Suggested CLI command to fix the issue, or null if passed. */
|
|
84
|
+
fix: string | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Result of a git-hook installation check.
|
|
88
|
+
*
|
|
89
|
+
* Reports whether a managed hook (commit-msg, pre-commit, pre-push) is
|
|
90
|
+
* installed in `.git/hooks/` and whether the installed copy matches the
|
|
91
|
+
* source template under `packages/core/templates/git-hooks/`.
|
|
92
|
+
*
|
|
93
|
+
* Originally defined in `packages/core/src/hooks.ts`. Promoted here to
|
|
94
|
+
* co-locate all scaffold-diagnostic shapes.
|
|
95
|
+
*
|
|
96
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
97
|
+
*/
|
|
98
|
+
export interface HookCheckResult {
|
|
99
|
+
/** Hook name (commit-msg, pre-commit, pre-push). */
|
|
100
|
+
hook: string;
|
|
101
|
+
/** Whether the hook is installed at `.git/hooks/<hook>`. */
|
|
102
|
+
installed: boolean;
|
|
103
|
+
/** Whether the installed hook bytes match the source template. */
|
|
104
|
+
current: boolean;
|
|
105
|
+
/** Absolute path of the source template that should be installed. */
|
|
106
|
+
sourcePath: string;
|
|
107
|
+
/** Absolute path where the hook is (or would be) installed. */
|
|
108
|
+
installedPath: string;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=scaffold-diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold-diagnostics.d.ts","sourceRoot":"","sources":["../src/scaffold-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC7B,4DAA4D;IAC5D,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,MAAM,EAAE,WAAW,CAAC;IACpB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,iEAAiE;IACjE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAID;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold + diagnostic result contracts.
|
|
3
|
+
*
|
|
4
|
+
* Canonical home for the result shapes produced by CLEO's directory/file
|
|
5
|
+
* scaffolding utilities (`ensure*`) and read-only health-check utilities
|
|
6
|
+
* (`check*`). Promoted to `@cleocode/contracts` in Phase 0a of the
|
|
7
|
+
* SG-ARCH-SOLID Saga to eliminate duplicate definitions that previously
|
|
8
|
+
* lived in `packages/core/src/scaffold.ts`, `injection.ts`, `hooks.ts`,
|
|
9
|
+
* `schema-management.ts`, and `validation/doctor/checks.ts`.
|
|
10
|
+
*
|
|
11
|
+
* Consolidated types:
|
|
12
|
+
* - {@link ScaffoldResult} — was defined 3× in core (scaffold/injection/hooks)
|
|
13
|
+
* - {@link CheckStatus} — was defined 2× in core (scaffold/doctor checks)
|
|
14
|
+
* - {@link CheckResult} — was defined 2× in core (scaffold/doctor checks)
|
|
15
|
+
* - {@link HookCheckResult} — single canonical definition (no prior duplication;
|
|
16
|
+
* promoted here to keep all scaffold-diagnostic shapes co-located)
|
|
17
|
+
*
|
|
18
|
+
* NOT consolidated (intentional — different domain shape):
|
|
19
|
+
* - `CheckResult` in `packages/core/src/schema-management.ts` is a
|
|
20
|
+
* `{ ok, installed, bundled, missing, stale }` schema-install report,
|
|
21
|
+
* unrelated to diagnostic checks. It retains its local definition and
|
|
22
|
+
* will be renamed in a follow-up slice if/when its naming collision
|
|
23
|
+
* warrants a separate cleanup task.
|
|
24
|
+
*
|
|
25
|
+
* @since SG-ARCH-SOLID Saga T9831 · E-CONTRACTS-FOUNDATION T9832 (Phase 0a)
|
|
26
|
+
*/
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=scaffold-diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold-diagnostics.js","sourceRoot":"","sources":["../src/scaffold-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
package/dist/session.d.ts
CHANGED
|
@@ -131,6 +131,43 @@ export interface Session {
|
|
|
131
131
|
gradeMode?: boolean;
|
|
132
132
|
/** ID of the provider adapter used for this session. @defaultValue undefined */
|
|
133
133
|
providerId?: string | null;
|
|
134
|
+
/**
|
|
135
|
+
* Human-readable agent handle for multi-agent isolation (T9975).
|
|
136
|
+
*
|
|
137
|
+
* Set via `cleo session start --agent <handle>`. Allows concurrent agent
|
|
138
|
+
* sessions to be distinguished in `cleo session list --all` and enables
|
|
139
|
+
* `cleo briefing` env-precedence detection when `CLEO_SESSION_ID` is set.
|
|
140
|
+
*
|
|
141
|
+
* @defaultValue undefined
|
|
142
|
+
*/
|
|
143
|
+
agentHandle?: string | null;
|
|
144
|
+
/**
|
|
145
|
+
* Denormalised scope type ("global" | "epic") for fast index queries (T9975).
|
|
146
|
+
*
|
|
147
|
+
* Derived from `scope.type` at session creation; cached in the DB column
|
|
148
|
+
* `scope_kind` to avoid JSON parsing in hot paths.
|
|
149
|
+
*
|
|
150
|
+
* @defaultValue undefined
|
|
151
|
+
*/
|
|
152
|
+
scopeKind?: string | null;
|
|
153
|
+
/**
|
|
154
|
+
* Denormalised scope target ID (e.g. "T9964") for epic sessions (T9975).
|
|
155
|
+
*
|
|
156
|
+
* Derived from `scope.epicId` / `scope.rootTaskId` at session creation.
|
|
157
|
+
* NULL for global sessions.
|
|
158
|
+
*
|
|
159
|
+
* @defaultValue undefined
|
|
160
|
+
*/
|
|
161
|
+
scopeId?: string | null;
|
|
162
|
+
/**
|
|
163
|
+
* ISO 8601 timestamp of the last mutation on this session (T9975).
|
|
164
|
+
*
|
|
165
|
+
* Updated on session start, task focus change, and task completion.
|
|
166
|
+
* Used by the idle auto-end lifecycle hook and `cleo session list --all`.
|
|
167
|
+
*
|
|
168
|
+
* @defaultValue undefined
|
|
169
|
+
*/
|
|
170
|
+
lastActivity?: string | null;
|
|
134
171
|
}
|
|
135
172
|
/**
|
|
136
173
|
* Result of a session start operation.
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAA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C;CACnB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAE1B,QAAQ,EAAE,OAAO,EAAE;IAI/B,iDAAiD;IACjD,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,WAAW;IAI7C,2CAA2C;IAC3C,IAAI,GAAG,IAAI,SAAS,OAAO,EAAE,CAE5B;IAED,0BAA0B;IAC1B,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,kDAAkD;IAClD,UAAU,IAAI,OAAO,GAAG,SAAS;IAIjC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAIzC,+CAA+C;IAC/C,cAAc,CAAC,GAAG,QAAQ,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE;IAIvD,mEAAmE;IACnE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE;IAQzD,4EAA4E;IAC5E,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,UAAU,UAAO,GAAG,OAAO,EAAE;IAQxE,6CAA6C;IAC7C,UAAU,IAAI,OAAO,GAAG,SAAS;IAKjC,4DAA4D;IAC5D,OAAO,IAAI,OAAO,EAAE;IAIpB,gCAAgC;IAChC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC;CAGvC"}
|
package/dist/session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwLH;;;;;;;;;;GAUG;AACH,MAAM,OAAO,WAAW;IACL,SAAS,CAAY;IAEtC,YAAY,QAA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,4EAA4E;IAC5E,UAAU,CAAC,KAA8B,EAAE,UAAU,GAAG,IAAI;QAC1D,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YACjD,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YACjD,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,6CAA6C;IAC7C,UAAU;QACR,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QAClD,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,4DAA4D;IAC5D,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAED,gCAAgC;IAChC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C,CAAC;CACF"}
|
package/dist/tasks/archive.d.ts
CHANGED
|
@@ -51,8 +51,8 @@ import { z } from 'zod';
|
|
|
51
51
|
export declare const ArchiveReason: z.ZodEnum<{
|
|
52
52
|
cancelled: "cancelled";
|
|
53
53
|
superseded: "superseded";
|
|
54
|
-
reconciled: "reconciled";
|
|
55
54
|
verified: "verified";
|
|
55
|
+
reconciled: "reconciled";
|
|
56
56
|
shadowed: "shadowed";
|
|
57
57
|
"completed-unverified": "completed-unverified";
|
|
58
58
|
}>;
|
|
@@ -67,8 +67,8 @@ export declare const ArchiveReason: z.ZodEnum<{
|
|
|
67
67
|
export declare const ArchiveReasonSchema: z.ZodEnum<{
|
|
68
68
|
cancelled: "cancelled";
|
|
69
69
|
superseded: "superseded";
|
|
70
|
-
reconciled: "reconciled";
|
|
71
70
|
verified: "verified";
|
|
71
|
+
reconciled: "reconciled";
|
|
72
72
|
shadowed: "shadowed";
|
|
73
73
|
"completed-unverified": "completed-unverified";
|
|
74
74
|
}>;
|
|
@@ -93,7 +93,7 @@ export type ArchiveReasonValue = z.infer<typeof ArchiveReason>;
|
|
|
93
93
|
* Useful when a Drizzle column or a discriminated union needs the raw
|
|
94
94
|
* tuple form (e.g. `text('archive_reason', { enum: ARCHIVE_REASON_VALUES })`).
|
|
95
95
|
*/
|
|
96
|
-
export declare const ARCHIVE_REASON_VALUES: ("cancelled" | "superseded" | "
|
|
96
|
+
export declare const ARCHIVE_REASON_VALUES: ("cancelled" | "superseded" | "verified" | "reconciled" | "shadowed" | "completed-unverified")[];
|
|
97
97
|
/**
|
|
98
98
|
* The single tombstone value within {@link ArchiveReason}.
|
|
99
99
|
*
|