ctxr-cli 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +313 -22
  2. package/dist/adapters/types.d.ts +0 -5
  3. package/dist/adapters/types.d.ts.map +1 -1
  4. package/dist/commands/adapters-generate.d.ts.map +1 -1
  5. package/dist/commands/adapters-generate.js +2 -3
  6. package/dist/commands/adapters-generate.js.map +1 -1
  7. package/dist/commands/context-gather.d.ts +22 -0
  8. package/dist/commands/context-gather.d.ts.map +1 -0
  9. package/dist/commands/context-gather.js +36 -0
  10. package/dist/commands/context-gather.js.map +1 -0
  11. package/dist/commands/graph-query.d.ts.map +1 -1
  12. package/dist/commands/graph-query.js +6 -8
  13. package/dist/commands/graph-query.js.map +1 -1
  14. package/dist/commands/ingest.d.ts +22 -9
  15. package/dist/commands/ingest.d.ts.map +1 -1
  16. package/dist/commands/ingest.js +86 -24
  17. package/dist/commands/ingest.js.map +1 -1
  18. package/dist/commands/init.d.ts.map +1 -1
  19. package/dist/commands/init.js +22 -5
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/commands/publish-check.d.ts.map +1 -1
  22. package/dist/commands/publish-check.js +8 -0
  23. package/dist/commands/publish-check.js.map +1 -1
  24. package/dist/commands/publish-new.d.ts.map +1 -1
  25. package/dist/commands/publish-new.js +15 -0
  26. package/dist/commands/publish-new.js.map +1 -1
  27. package/dist/commands/serve.d.ts.map +1 -1
  28. package/dist/commands/serve.js +33 -11
  29. package/dist/commands/serve.js.map +1 -1
  30. package/dist/commands/session-start.d.ts.map +1 -1
  31. package/dist/commands/session-start.js +9 -1
  32. package/dist/commands/session-start.js.map +1 -1
  33. package/dist/commands/source-check.d.ts.map +1 -1
  34. package/dist/commands/source-check.js +52 -9
  35. package/dist/commands/source-check.js.map +1 -1
  36. package/dist/commands/source-stamp.d.ts +6 -5
  37. package/dist/commands/source-stamp.d.ts.map +1 -1
  38. package/dist/commands/source-stamp.js +8 -7
  39. package/dist/commands/source-stamp.js.map +1 -1
  40. package/dist/commands/update.d.ts.map +1 -1
  41. package/dist/commands/update.js +7 -1
  42. package/dist/commands/update.js.map +1 -1
  43. package/dist/commands/verify.d.ts +11 -2
  44. package/dist/commands/verify.d.ts.map +1 -1
  45. package/dist/commands/verify.js +86 -5
  46. package/dist/commands/verify.js.map +1 -1
  47. package/dist/commands/version.d.ts +31 -0
  48. package/dist/commands/version.d.ts.map +1 -0
  49. package/dist/commands/version.js +87 -0
  50. package/dist/commands/version.js.map +1 -0
  51. package/dist/config/defaults.d.ts +113 -4
  52. package/dist/config/defaults.d.ts.map +1 -1
  53. package/dist/config/defaults.js +83 -4
  54. package/dist/config/defaults.js.map +1 -1
  55. package/dist/config/load.d.ts +2 -2
  56. package/dist/config/load.d.ts.map +1 -1
  57. package/dist/config/load.js +13 -3
  58. package/dist/config/load.js.map +1 -1
  59. package/dist/config/render.d.ts +5 -0
  60. package/dist/config/render.d.ts.map +1 -1
  61. package/dist/config/render.js +62 -3
  62. package/dist/config/render.js.map +1 -1
  63. package/dist/config/schema.d.ts +47 -76
  64. package/dist/config/schema.d.ts.map +1 -1
  65. package/dist/config/schema.js +171 -134
  66. package/dist/config/schema.js.map +1 -1
  67. package/dist/core/agents-doc.d.ts.map +1 -1
  68. package/dist/core/agents-doc.js +4 -1
  69. package/dist/core/agents-doc.js.map +1 -1
  70. package/dist/core/browse/nav.d.ts.map +1 -1
  71. package/dist/core/browse/nav.js +4 -1
  72. package/dist/core/browse/nav.js.map +1 -1
  73. package/dist/core/browse/preferences.d.ts +26 -0
  74. package/dist/core/browse/preferences.d.ts.map +1 -0
  75. package/dist/core/browse/preferences.js +74 -0
  76. package/dist/core/browse/preferences.js.map +1 -0
  77. package/dist/core/browse/routes.d.ts +10 -8
  78. package/dist/core/browse/routes.d.ts.map +1 -1
  79. package/dist/core/browse/routes.js +113 -24
  80. package/dist/core/browse/routes.js.map +1 -1
  81. package/dist/core/browse/templates.d.ts +14 -4
  82. package/dist/core/browse/templates.d.ts.map +1 -1
  83. package/dist/core/browse/templates.js +22 -4
  84. package/dist/core/browse/templates.js.map +1 -1
  85. package/dist/core/checks/harness-portability-checks.d.ts +22 -1
  86. package/dist/core/checks/harness-portability-checks.d.ts.map +1 -1
  87. package/dist/core/checks/harness-portability-checks.js +48 -4
  88. package/dist/core/checks/harness-portability-checks.js.map +1 -1
  89. package/dist/core/checks/integrity-checks.d.ts +0 -2
  90. package/dist/core/checks/integrity-checks.d.ts.map +1 -1
  91. package/dist/core/checks/integrity-checks.js +2 -27
  92. package/dist/core/checks/integrity-checks.js.map +1 -1
  93. package/dist/core/checks/manifest.d.ts.map +1 -1
  94. package/dist/core/checks/manifest.js +2 -0
  95. package/dist/core/checks/manifest.js.map +1 -1
  96. package/dist/core/checks/organize-checks.d.ts +11 -1
  97. package/dist/core/checks/organize-checks.d.ts.map +1 -1
  98. package/dist/core/checks/organize-checks.js +42 -12
  99. package/dist/core/checks/organize-checks.js.map +1 -1
  100. package/dist/core/checks/retrieval-checks.d.ts +9 -0
  101. package/dist/core/checks/retrieval-checks.d.ts.map +1 -0
  102. package/dist/core/checks/retrieval-checks.js +30 -0
  103. package/dist/core/checks/retrieval-checks.js.map +1 -0
  104. package/dist/core/command.d.ts +6 -0
  105. package/dist/core/command.d.ts.map +1 -1
  106. package/dist/core/content/canonicalize.d.ts +10 -0
  107. package/dist/core/content/canonicalize.d.ts.map +1 -1
  108. package/dist/core/content/canonicalize.js +12 -0
  109. package/dist/core/content/canonicalize.js.map +1 -1
  110. package/dist/core/env.d.ts +5 -0
  111. package/dist/core/env.d.ts.map +1 -1
  112. package/dist/core/env.js +3 -0
  113. package/dist/core/env.js.map +1 -1
  114. package/dist/core/environment/probe.d.ts +12 -0
  115. package/dist/core/environment/probe.d.ts.map +1 -0
  116. package/dist/core/environment/probe.js +36 -0
  117. package/dist/core/environment/probe.js.map +1 -0
  118. package/dist/core/errors.d.ts +32 -0
  119. package/dist/core/errors.d.ts.map +1 -1
  120. package/dist/core/errors.js +81 -3
  121. package/dist/core/errors.js.map +1 -1
  122. package/dist/core/fs/prefix.d.ts +13 -0
  123. package/dist/core/fs/prefix.d.ts.map +1 -0
  124. package/dist/core/fs/prefix.js +22 -0
  125. package/dist/core/fs/prefix.js.map +1 -0
  126. package/dist/core/git/worktree.d.ts +22 -0
  127. package/dist/core/git/worktree.d.ts.map +1 -1
  128. package/dist/core/git/worktree.js +34 -0
  129. package/dist/core/git/worktree.js.map +1 -1
  130. package/dist/core/graph/persist.d.ts +13 -0
  131. package/dist/core/graph/persist.d.ts.map +1 -1
  132. package/dist/core/graph/persist.js +24 -0
  133. package/dist/core/graph/persist.js.map +1 -1
  134. package/dist/core/harness/isolated-run.d.ts +52 -0
  135. package/dist/core/harness/isolated-run.d.ts.map +1 -0
  136. package/dist/core/harness/isolated-run.js +100 -0
  137. package/dist/core/harness/isolated-run.js.map +1 -0
  138. package/dist/core/hooks.d.ts +3 -12
  139. package/dist/core/hooks.d.ts.map +1 -1
  140. package/dist/core/hooks.js +24 -20
  141. package/dist/core/hooks.js.map +1 -1
  142. package/dist/core/ingest/capture-hash.d.ts +16 -0
  143. package/dist/core/ingest/capture-hash.d.ts.map +1 -0
  144. package/dist/core/ingest/capture-hash.js +34 -0
  145. package/dist/core/ingest/capture-hash.js.map +1 -0
  146. package/dist/core/ingest/identity.d.ts +7 -1
  147. package/dist/core/ingest/identity.d.ts.map +1 -1
  148. package/dist/core/ingest/identity.js +16 -1
  149. package/dist/core/ingest/identity.js.map +1 -1
  150. package/dist/core/ingest/model.d.ts +17 -2
  151. package/dist/core/ingest/model.d.ts.map +1 -1
  152. package/dist/core/ingest/model.js +5 -0
  153. package/dist/core/ingest/model.js.map +1 -1
  154. package/dist/core/install-kind.d.ts +25 -0
  155. package/dist/core/install-kind.d.ts.map +1 -0
  156. package/dist/core/install-kind.js +56 -0
  157. package/dist/core/install-kind.js.map +1 -0
  158. package/dist/core/notes/list.d.ts +20 -0
  159. package/dist/core/notes/list.d.ts.map +1 -1
  160. package/dist/core/notes/list.js +27 -6
  161. package/dist/core/notes/list.js.map +1 -1
  162. package/dist/core/publish/script-check.d.ts +5 -2
  163. package/dist/core/publish/script-check.d.ts.map +1 -1
  164. package/dist/core/publish/script-check.js +5 -2
  165. package/dist/core/publish/script-check.js.map +1 -1
  166. package/dist/core/records.d.ts +7 -0
  167. package/dist/core/records.d.ts.map +1 -1
  168. package/dist/core/records.js +12 -2
  169. package/dist/core/records.js.map +1 -1
  170. package/dist/core/registry.d.ts +40 -0
  171. package/dist/core/registry.d.ts.map +1 -0
  172. package/dist/core/registry.js +55 -0
  173. package/dist/core/registry.js.map +1 -0
  174. package/dist/core/retrieval/pass.d.ts +66 -0
  175. package/dist/core/retrieval/pass.d.ts.map +1 -0
  176. package/dist/core/retrieval/pass.js +171 -0
  177. package/dist/core/retrieval/pass.js.map +1 -0
  178. package/dist/core/root.d.ts +11 -5
  179. package/dist/core/root.d.ts.map +1 -1
  180. package/dist/core/root.js +20 -8
  181. package/dist/core/root.js.map +1 -1
  182. package/dist/core/skills.d.ts.map +1 -1
  183. package/dist/core/skills.js +7 -0
  184. package/dist/core/skills.js.map +1 -1
  185. package/dist/core/version-check.d.ts +63 -0
  186. package/dist/core/version-check.d.ts.map +1 -0
  187. package/dist/core/version-check.js +181 -0
  188. package/dist/core/version-check.js.map +1 -0
  189. package/dist/core/write-lifecycle/path-gate.d.ts +2 -2
  190. package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
  191. package/dist/core/write-lifecycle/path-gate.js +9 -10
  192. package/dist/core/write-lifecycle/path-gate.js.map +1 -1
  193. package/dist/run.d.ts +1 -6
  194. package/dist/run.d.ts.map +1 -1
  195. package/dist/run.js +76 -19
  196. package/dist/run.js.map +1 -1
  197. package/dist/version.d.ts +8 -1
  198. package/dist/version.d.ts.map +1 -1
  199. package/dist/version.js +8 -1
  200. package/dist/version.js.map +1 -1
  201. package/package.json +12 -4
  202. package/templates/agents/canonical.md +1 -1
  203. package/templates/agents/capture-and-ingest.md +27 -8
  204. package/templates/agents/retrieval-leg-routing.md +34 -8
  205. package/templates/hooks/_resolve-ctxr.sh +37 -0
  206. package/templates/hooks/claude-code-write-gate.sh +34 -6
  207. package/templates/hooks/pre-commit.sh +15 -8
  208. package/templates/serve/shell.html +16 -2
  209. package/templates/serve/style.css +145 -3
  210. package/templates/skills/ctxr-connection-finding.md +7 -5
  211. package/templates/skills/ctxr-ingest-orchestration.md +15 -9
  212. package/templates/skills/ctxr-publish.md +7 -8
  213. package/templates/skills/ctxr-session-lifecycle.md +20 -0
  214. package/templates/skills/ctxr-upgrade.md +44 -0
  215. package/dist/commands/migrate.d.ts +0 -30
  216. package/dist/commands/migrate.d.ts.map +0 -1
  217. package/dist/commands/migrate.js +0 -56
  218. package/dist/commands/migrate.js.map +0 -1
  219. package/dist/core/migrations/add-explanation-craft-skill.d.ts +0 -26
  220. package/dist/core/migrations/add-explanation-craft-skill.d.ts.map +0 -1
  221. package/dist/core/migrations/add-explanation-craft-skill.js +0 -94
  222. package/dist/core/migrations/add-explanation-craft-skill.js.map +0 -1
  223. package/dist/core/migrations/archive-destination-from-taxonomy.d.ts +0 -35
  224. package/dist/core/migrations/archive-destination-from-taxonomy.d.ts.map +0 -1
  225. package/dist/core/migrations/archive-destination-from-taxonomy.js +0 -109
  226. package/dist/core/migrations/archive-destination-from-taxonomy.js.map +0 -1
  227. package/dist/core/migrations/drop-access-axes.d.ts +0 -24
  228. package/dist/core/migrations/drop-access-axes.d.ts.map +0 -1
  229. package/dist/core/migrations/drop-access-axes.js +0 -54
  230. package/dist/core/migrations/drop-access-axes.js.map +0 -1
  231. package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts +0 -19
  232. package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts.map +0 -1
  233. package/dist/core/migrations/drop-forge-and-workspaces-external.js +0 -49
  234. package/dist/core/migrations/drop-forge-and-workspaces-external.js.map +0 -1
  235. package/dist/core/migrations/registry.d.ts +0 -16
  236. package/dist/core/migrations/registry.d.ts.map +0 -1
  237. package/dist/core/migrations/registry.js +0 -30
  238. package/dist/core/migrations/registry.js.map +0 -1
  239. package/dist/core/migrations/rename-conventions-path.d.ts +0 -26
  240. package/dist/core/migrations/rename-conventions-path.d.ts.map +0 -1
  241. package/dist/core/migrations/rename-conventions-path.js +0 -86
  242. package/dist/core/migrations/rename-conventions-path.js.map +0 -1
  243. package/dist/core/migrations/rename-procedures-path.d.ts +0 -17
  244. package/dist/core/migrations/rename-procedures-path.d.ts.map +0 -1
  245. package/dist/core/migrations/rename-procedures-path.js +0 -45
  246. package/dist/core/migrations/rename-procedures-path.js.map +0 -1
  247. package/dist/core/migrations/types.d.ts +0 -27
  248. package/dist/core/migrations/types.d.ts.map +0 -1
  249. package/dist/core/migrations/types.js +0 -2
  250. package/dist/core/migrations/types.js.map +0 -1
@@ -1,54 +0,0 @@
1
- import path from 'node:path';
2
- import { readConfig } from '../../config/load.js';
3
- import { renderStoreConfig } from '../../config/render.js';
4
- import { writeFileAtomic } from '../fs/atomic.js';
5
- const CONFIG_DELTA = {
6
- path: 'contexture.yaml',
7
- description: 'remove the visibility:, disclosure:, and fields: blocks, and set schema_version to 8',
8
- };
9
- /** The retired top-level keys, named here as fixed historical literals — no constant for them survives. */
10
- const RETIRED_KEYS = ['visibility', 'disclosure', 'fields'];
11
- /**
12
- * retire-the-access-axes: the visibility and disclosure axes are removed, and
13
- * with them `fields.visibility` (the configurable name of the visibility
14
- * frontmatter key).
15
- *
16
- * Unlike 0005, this migration cannot lean on `readConfig` having already
17
- * stripped the legacy shape: all three keys are TOP-LEVEL, and
18
- * `StoreConfigSchema` is `.passthrough()`, so they survive parsing intact.
19
- * Deleting them explicitly is the whole job.
20
- *
21
- * No note is rewritten (design.md D3). A note's retired visibility-field key
22
- * stays in its frontmatter, unread — `parseNote` reads frontmatter into a
23
- * `Record<string, unknown>` and nothing consumes that key any more, so it
24
- * costs nothing at runtime and keeps the removal cheap to reverse. Stripping
25
- * it would make re-entry a hand re-labelling pass over every note.
26
- *
27
- * Pending-ness is `schema_version < 8`, not key presence — the rule every
28
- * migration from 0002 onward established. A store could have had its config
29
- * hand-edited to drop the keys while still sitting at an older version, and
30
- * it still needs the version bump.
31
- */
32
- export const dropAccessAxesMigration = {
33
- id: '0008-drop-access-axes',
34
- fromVersion: 7,
35
- toVersion: 8,
36
- description: 'Remove the visibility:, disclosure:, and fields: blocks from contexture.yaml, and bump schema_version to 8. No note is modified.',
37
- async plan(store) {
38
- if (store.config.schema_version >= 8)
39
- return [];
40
- return [CONFIG_DELTA];
41
- },
42
- async apply(store) {
43
- if (store.config.schema_version >= 8)
44
- return [];
45
- const configPath = path.join(store.root, 'contexture.yaml');
46
- const currentConfig = await readConfig(store.root);
47
- const nextConfig = { ...currentConfig, schema_version: 8 };
48
- for (const key of RETIRED_KEYS)
49
- delete nextConfig[key];
50
- await writeFileAtomic(configPath, renderStoreConfig(nextConfig));
51
- return [CONFIG_DELTA];
52
- },
53
- };
54
- //# sourceMappingURL=drop-access-axes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drop-access-axes.js","sourceRoot":"","sources":["../../../src/core/migrations/drop-access-axes.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,YAAY,GAAmB;IACnC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,sFAAsF;CACpG,CAAC;AAEF,2GAA2G;AAC3G,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAc;IAChD,EAAE,EAAE,uBAAuB;IAC3B,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EACT,kIAAkI;IAEpI,KAAK,CAAC,IAAI,CAAC,KAAK;QACd,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAChD,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK;QACf,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC5D,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,UAAU,GAA4B,EAAE,GAAG,aAAa,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QACpF,KAAK,MAAM,GAAG,IAAI,YAAY;YAAE,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;QACvD,MAAM,eAAe,CAAC,UAAU,EAAE,iBAAiB,CAAC,UAAqD,CAAC,CAAC,CAAC;QAE5G,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { Migration } from './types.js';
2
- /**
3
- * session-keeps-only-what-git-cannot-do (design D2): `ctxr session
4
- * submit`/`land`/`abandon`/`reap` and the `forge` adapter kind are removed;
5
- * `session.workspaces_external` goes with them, its skill-rendering half
6
- * never having worked as shipped. Both legacy shapes are ALREADY stripped
7
- * by the time `readConfig` returns — the adapters field's lenient schema
8
- * transform drops a `kind: forge` entry (session-keeps-only-what-git-cannot-do
9
- * D2), and `SessionSchema`'s default strip-unknown-keys behavior drops
10
- * `workspaces_external` — so this migration's only real work is bumping
11
- * `schema_version` and writing the already-clean config back to disk.
12
- *
13
- * Pending-ness is `schema_version < 5`, not key presence — the same rule
14
- * 0002 and 0004 established, for the same reason: an unmigrated store
15
- * already parses as though the legacy shape were gone, so its presence in
16
- * the parsed config can't distinguish migrated from not.
17
- */
18
- export declare const dropForgeAndWorkspacesExternalMigration: Migration;
19
- //# sourceMappingURL=drop-forge-and-workspaces-external.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drop-forge-and-workspaces-external.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/drop-forge-and-workspaces-external.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,YAAY,CAAC;AAO5D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uCAAuC,EAAE,SA0BrD,CAAC"}
@@ -1,49 +0,0 @@
1
- import path from 'node:path';
2
- import { readConfig } from '../../config/load.js';
3
- import { renderStoreConfig } from '../../config/render.js';
4
- import { writeFileAtomic } from '../fs/atomic.js';
5
- const CONFIG_DELTA = {
6
- path: 'contexture.yaml',
7
- description: 'strip any legacy kind: forge adapter declarations and the session.workspaces_external key, and set schema_version to 5',
8
- };
9
- /**
10
- * session-keeps-only-what-git-cannot-do (design D2): `ctxr session
11
- * submit`/`land`/`abandon`/`reap` and the `forge` adapter kind are removed;
12
- * `session.workspaces_external` goes with them, its skill-rendering half
13
- * never having worked as shipped. Both legacy shapes are ALREADY stripped
14
- * by the time `readConfig` returns — the adapters field's lenient schema
15
- * transform drops a `kind: forge` entry (session-keeps-only-what-git-cannot-do
16
- * D2), and `SessionSchema`'s default strip-unknown-keys behavior drops
17
- * `workspaces_external` — so this migration's only real work is bumping
18
- * `schema_version` and writing the already-clean config back to disk.
19
- *
20
- * Pending-ness is `schema_version < 5`, not key presence — the same rule
21
- * 0002 and 0004 established, for the same reason: an unmigrated store
22
- * already parses as though the legacy shape were gone, so its presence in
23
- * the parsed config can't distinguish migrated from not.
24
- */
25
- export const dropForgeAndWorkspacesExternalMigration = {
26
- id: '0005-drop-forge-and-workspaces-external',
27
- fromVersion: 4,
28
- toVersion: 5,
29
- description: 'Strip any legacy kind: forge adapter declarations and the session.workspaces_external key from contexture.yaml, and bump schema_version to 5.',
30
- async plan(store) {
31
- if (store.config.schema_version >= 5)
32
- return [];
33
- return [CONFIG_DELTA];
34
- },
35
- async apply(store) {
36
- if (store.config.schema_version >= 5)
37
- return [];
38
- const configPath = path.join(store.root, 'contexture.yaml');
39
- // readConfig() already applies the lenient schema — a raw `kind: forge`
40
- // entry and a raw `session.workspaces_external` key are both gone from
41
- // this object before this line runs; writing it back is what removes
42
- // them from disk.
43
- const currentConfig = await readConfig(store.root);
44
- const nextConfig = { ...currentConfig, schema_version: 5 };
45
- await writeFileAtomic(configPath, renderStoreConfig(nextConfig));
46
- return [CONFIG_DELTA];
47
- },
48
- };
49
- //# sourceMappingURL=drop-forge-and-workspaces-external.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drop-forge-and-workspaces-external.js","sourceRoot":"","sources":["../../../src/core/migrations/drop-forge-and-workspaces-external.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,YAAY,GAAmB;IACnC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,wHAAwH;CACtI,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAc;IAChE,EAAE,EAAE,yCAAyC;IAC7C,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EACT,+IAA+I;IAEjJ,KAAK,CAAC,IAAI,CAAC,KAAK;QACd,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAChD,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK;QACf,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC5D,wEAAwE;QACxE,uEAAuE;QACvE,qEAAqE;QACrE,kBAAkB;QAClB,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,UAAU,GAAG,EAAE,GAAG,aAAa,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC3D,MAAM,eAAe,CAAC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;QAEjE,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { Migration } from './types.js';
2
- /**
3
- * Every migration contexture ships, in ascending fromVersion order. Later
4
- * phases append here, nothing else.
5
- *
6
- * The chain is deliberately NOT contiguous: the 1 -> 2 visibility-field
7
- * rename was retired with the field itself (retire-the-access-axes D7), so a
8
- * schema-1 store's first pending migration is the 2 -> 3 one, which guards on
9
- * `schema_version < 3` and carries it straight there. `pendingMigrations`
10
- * selects on `fromVersion >= current`, never on adjacency, so a gap costs
11
- * nothing.
12
- */
13
- export declare const MIGRATIONS: readonly Migration[];
14
- /** Every migration a store currently at `fromVersion` still needs to reach the CLI's supported version, in order. */
15
- export declare function pendingMigrations(fromVersion: number): Migration[];
16
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/registry.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAO1C,CAAC;AAEF,qHAAqH;AACrH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,CAElE"}
@@ -1,30 +0,0 @@
1
- import { addExplanationCraftSkillMigration } from './add-explanation-craft-skill.js';
2
- import { archiveDestinationFromTaxonomyMigration } from './archive-destination-from-taxonomy.js';
3
- import { dropAccessAxesMigration } from './drop-access-axes.js';
4
- import { dropForgeAndWorkspacesExternalMigration } from './drop-forge-and-workspaces-external.js';
5
- import { renameConventionsPathMigration } from './rename-conventions-path.js';
6
- import { renameProceduresPathMigration } from './rename-procedures-path.js';
7
- /**
8
- * Every migration contexture ships, in ascending fromVersion order. Later
9
- * phases append here, nothing else.
10
- *
11
- * The chain is deliberately NOT contiguous: the 1 -> 2 visibility-field
12
- * rename was retired with the field itself (retire-the-access-axes D7), so a
13
- * schema-1 store's first pending migration is the 2 -> 3 one, which guards on
14
- * `schema_version < 3` and carries it straight there. `pendingMigrations`
15
- * selects on `fromVersion >= current`, never on adjacency, so a gap costs
16
- * nothing.
17
- */
18
- export const MIGRATIONS = [
19
- renameProceduresPathMigration,
20
- renameConventionsPathMigration,
21
- dropForgeAndWorkspacesExternalMigration,
22
- archiveDestinationFromTaxonomyMigration,
23
- addExplanationCraftSkillMigration,
24
- dropAccessAxesMigration,
25
- ];
26
- /** Every migration a store currently at `fromVersion` still needs to reach the CLI's supported version, in order. */
27
- export function pendingMigrations(fromVersion) {
28
- return MIGRATIONS.filter((m) => m.fromVersion >= fromVersion).slice().sort((a, b) => a.fromVersion - b.fromVersion);
29
- }
30
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/migrations/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,uCAAuC,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAG5E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyB;IAC9C,6BAA6B;IAC7B,8BAA8B;IAC9B,uCAAuC;IACvC,uCAAuC;IACvC,iCAAiC;IACjC,uBAAuB;CACxB,CAAC;AAEF,qHAAqH;AACrH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;AACtH,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { Migration } from './types.js';
2
- /**
3
- * rename-conventions-path-to-guidance-path (compose-store-guidance-documents
4
- * design.md D1/D7): unlike 0003's pure key rename, the key's *default value*
5
- * also changes (`.contexture/conventions/` -> `.contexture/guidance/`), so a
6
- * store that never customized the path needs its directory moved on disk,
7
- * not merely its config key renamed. An operator-customized path is left
8
- * exactly where it is — only the key spelling changes for them.
9
- *
10
- * Migrations only see `Store` (`root` + `config`, no `GitRunner` — see
11
- * core/store.ts), so the directory move is a plain filesystem rename, not
12
- * `git mv`. History is still preserved: whatever commits this migration's
13
- * output (the normal session-submit flow) stages a coherent delete-old,
14
- * add-new diff, which `git log --follow`'s content-similarity rename
15
- * detection recognizes identically to an explicit `git mv` — git never
16
- * records "this was a rename" as a distinct fact in its object model
17
- * either way.
18
- *
19
- * Pending-ness is `store.config.schema_version < 4`, the same
20
- * schema-version-not-key-presence rule 0003 established, for the same
21
- * reason: `HarnessSchema`'s fallback transform already populates
22
- * `guidance_path` on an unmigrated store, so its presence can't distinguish
23
- * migrated from not.
24
- */
25
- export declare const renameConventionsPathMigration: Migration;
26
- //# sourceMappingURL=rename-conventions-path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename-conventions-path.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/rename-conventions-path.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,YAAY,CAAC;AAiB5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,8BAA8B,EAAE,SA+C5C,CAAC"}
@@ -1,86 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { rename } from 'node:fs/promises';
3
- import path from 'node:path';
4
- import { readConfig } from '../../config/load.js';
5
- import { renderStoreConfig } from '../../config/render.js';
6
- import { writeFileAtomic } from '../fs/atomic.js';
7
- const OLD_DEFAULT_GUIDANCE_PATH = '.contexture/conventions/';
8
- const NEW_DEFAULT_GUIDANCE_PATH = '.contexture/guidance/';
9
- const CONFIG_DELTA = {
10
- path: 'contexture.yaml',
11
- description: 'rename harness.conventions_path to harness.guidance_path and set schema_version to 4',
12
- };
13
- function directoryDelta() {
14
- return {
15
- path: NEW_DEFAULT_GUIDANCE_PATH,
16
- description: `move the default-valued guidance directory from ${OLD_DEFAULT_GUIDANCE_PATH} to ${NEW_DEFAULT_GUIDANCE_PATH}`,
17
- };
18
- }
19
- /**
20
- * rename-conventions-path-to-guidance-path (compose-store-guidance-documents
21
- * design.md D1/D7): unlike 0003's pure key rename, the key's *default value*
22
- * also changes (`.contexture/conventions/` -> `.contexture/guidance/`), so a
23
- * store that never customized the path needs its directory moved on disk,
24
- * not merely its config key renamed. An operator-customized path is left
25
- * exactly where it is — only the key spelling changes for them.
26
- *
27
- * Migrations only see `Store` (`root` + `config`, no `GitRunner` — see
28
- * core/store.ts), so the directory move is a plain filesystem rename, not
29
- * `git mv`. History is still preserved: whatever commits this migration's
30
- * output (the normal session-submit flow) stages a coherent delete-old,
31
- * add-new diff, which `git log --follow`'s content-similarity rename
32
- * detection recognizes identically to an explicit `git mv` — git never
33
- * records "this was a rename" as a distinct fact in its object model
34
- * either way.
35
- *
36
- * Pending-ness is `store.config.schema_version < 4`, the same
37
- * schema-version-not-key-presence rule 0003 established, for the same
38
- * reason: `HarnessSchema`'s fallback transform already populates
39
- * `guidance_path` on an unmigrated store, so its presence can't distinguish
40
- * migrated from not.
41
- */
42
- export const renameConventionsPathMigration = {
43
- id: '0004-rename-conventions-path-to-guidance-path',
44
- fromVersion: 3,
45
- toVersion: 4,
46
- description: 'Rename the harness.conventions_path config key to harness.guidance_path, move the guidance directory when it sat at the old default, and bump schema_version to 4.',
47
- async plan(store) {
48
- if (store.config.schema_version >= 4)
49
- return [];
50
- const deltas = [CONFIG_DELTA];
51
- if (store.config.harness.guidance_path === OLD_DEFAULT_GUIDANCE_PATH)
52
- deltas.push(directoryDelta());
53
- return deltas;
54
- },
55
- async apply(store) {
56
- if (store.config.schema_version >= 4)
57
- return [];
58
- const configPath = path.join(store.root, 'contexture.yaml');
59
- // readConfig() already resolves harness.guidance_path via HarnessSchema's
60
- // fallback (from conventions_path if that's all the file has), so
61
- // currentConfig.harness carries no conventions_path key at all —
62
- // rendering it below writes only guidance_path to disk.
63
- const currentConfig = await readConfig(store.root);
64
- const appliedDeltas = [CONFIG_DELTA];
65
- let guidancePath = currentConfig.harness.guidance_path;
66
- if (guidancePath === OLD_DEFAULT_GUIDANCE_PATH) {
67
- const oldDir = path.join(store.root, OLD_DEFAULT_GUIDANCE_PATH);
68
- const newDir = path.join(store.root, NEW_DEFAULT_GUIDANCE_PATH);
69
- // Absent when the store never carried any convention files — nothing
70
- // to move on disk, only the config value changes.
71
- if (existsSync(oldDir)) {
72
- await rename(oldDir, newDir);
73
- }
74
- guidancePath = NEW_DEFAULT_GUIDANCE_PATH;
75
- appliedDeltas.push(directoryDelta());
76
- }
77
- const nextConfig = {
78
- ...currentConfig,
79
- schema_version: 4,
80
- harness: { ...currentConfig.harness, guidance_path: guidancePath },
81
- };
82
- await writeFileAtomic(configPath, renderStoreConfig(nextConfig));
83
- return appliedDeltas;
84
- },
85
- };
86
- //# sourceMappingURL=rename-conventions-path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename-conventions-path.js","sourceRoot":"","sources":["../../../src/core/migrations/rename-conventions-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,yBAAyB,GAAG,0BAA0B,CAAC;AAC7D,MAAM,yBAAyB,GAAG,uBAAuB,CAAC;AAE1D,MAAM,YAAY,GAAmB;IACnC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,sFAAsF;CACpG,CAAC;AAEF,SAAS,cAAc;IACrB,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,mDAAmD,yBAAyB,OAAO,yBAAyB,EAAE;KAC5H,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAc;IACvD,EAAE,EAAE,+CAA+C;IACnD,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EACT,oKAAoK;IAEtK,KAAK,CAAC,IAAI,CAAC,KAAK;QACd,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAChD,MAAM,MAAM,GAAqB,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,KAAK,yBAAyB;YAAE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACpG,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK;QACf,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC5D,0EAA0E;QAC1E,kEAAkE;QAClE,iEAAiE;QACjE,wDAAwD;QACxD,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,aAAa,GAAqB,CAAC,YAAY,CAAC,CAAC;QAEvD,IAAI,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC;QACvD,IAAI,YAAY,KAAK,yBAAyB,EAAE,CAAC;YAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAChE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAChE,qEAAqE;YACrE,kDAAkD;YAClD,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/B,CAAC;YACD,YAAY,GAAG,yBAAyB,CAAC;YACzC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACvC,CAAC;QAED,MAAM,UAAU,GAAG;YACjB,GAAG,aAAa;YAChB,cAAc,EAAE,CAAC;YACjB,OAAO,EAAE,EAAE,GAAG,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE;SACnE,CAAC;QACF,MAAM,eAAe,CAAC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;QAEjE,OAAO,aAAa,CAAC;IACvB,CAAC;CACF,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { Migration } from './types.js';
2
- /**
3
- * rename-procedures-to-skills (design.md D2): a single-delta migration —
4
- * unlike the visibility-field rename, no note frontmatter is touched, since
5
- * only the config key's spelling changes, never any store file's location
6
- * (DEFAULT_SKILLS_PATH is already DEFAULT_PROCEDURES_PATH's old value).
7
- *
8
- * Pending-ness is `store.config.schema_version < 3`, NOT the presence or
9
- * absence of `store.config.harness.skills_path` — that field is populated
10
- * by HarnessSchema's fallback transform even on an unmigrated v2 store (so
11
- * every command keeps working before `ctxr migrate` runs), which means its
12
- * presence can never distinguish "already migrated" from "not yet
13
- * migrated." `schema_version` is the one signal the fallback doesn't mask,
14
- * and this migration is the only thing that ever sets it to 3.
15
- */
16
- export declare const renameProceduresPathMigration: Migration;
17
- //# sourceMappingURL=rename-procedures-path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename-procedures-path.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/rename-procedures-path.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,YAAY,CAAC;AAO5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAwB3C,CAAC"}
@@ -1,45 +0,0 @@
1
- import path from 'node:path';
2
- import { readConfig } from '../../config/load.js';
3
- import { renderStoreConfig } from '../../config/render.js';
4
- import { writeFileAtomic } from '../fs/atomic.js';
5
- const CONFIG_DELTA = {
6
- path: 'contexture.yaml',
7
- description: 'rename harness.procedures_path to harness.skills_path and set schema_version to 3',
8
- };
9
- /**
10
- * rename-procedures-to-skills (design.md D2): a single-delta migration —
11
- * unlike the visibility-field rename, no note frontmatter is touched, since
12
- * only the config key's spelling changes, never any store file's location
13
- * (DEFAULT_SKILLS_PATH is already DEFAULT_PROCEDURES_PATH's old value).
14
- *
15
- * Pending-ness is `store.config.schema_version < 3`, NOT the presence or
16
- * absence of `store.config.harness.skills_path` — that field is populated
17
- * by HarnessSchema's fallback transform even on an unmigrated v2 store (so
18
- * every command keeps working before `ctxr migrate` runs), which means its
19
- * presence can never distinguish "already migrated" from "not yet
20
- * migrated." `schema_version` is the one signal the fallback doesn't mask,
21
- * and this migration is the only thing that ever sets it to 3.
22
- */
23
- export const renameProceduresPathMigration = {
24
- id: '0003-rename-procedures-path-to-skills-path',
25
- fromVersion: 2,
26
- toVersion: 3,
27
- description: 'Rename the harness.procedures_path config key to harness.skills_path, and bump schema_version to 3.',
28
- async plan(store) {
29
- return store.config.schema_version < 3 ? [CONFIG_DELTA] : [];
30
- },
31
- async apply(store) {
32
- if (store.config.schema_version >= 3)
33
- return [];
34
- const configPath = path.join(store.root, 'contexture.yaml');
35
- // readConfig() already resolves harness.skills_path via HarnessSchema's
36
- // fallback (from procedures_path if that's all the file has), so
37
- // currentConfig.harness carries no procedures_path key at all —
38
- // rendering it below writes only skills_path to disk.
39
- const currentConfig = await readConfig(store.root);
40
- const nextConfig = { ...currentConfig, schema_version: 3 };
41
- await writeFileAtomic(configPath, renderStoreConfig(nextConfig));
42
- return [CONFIG_DELTA];
43
- },
44
- };
45
- //# sourceMappingURL=rename-procedures-path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename-procedures-path.js","sourceRoot":"","sources":["../../../src/core/migrations/rename-procedures-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,YAAY,GAAmB;IACnC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mFAAmF;CACjG,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAc;IACtD,EAAE,EAAE,4CAA4C;IAChD,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,qGAAqG;IAElH,KAAK,CAAC,IAAI,CAAC,KAAK;QACd,OAAO,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK;QACf,IAAI,KAAK,CAAC,MAAM,CAAC,cAAc,IAAI,CAAC;YAAE,OAAO,EAAE,CAAC;QAEhD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAC5D,wEAAwE;QACxE,iEAAiE;QACjE,gEAAgE;QAChE,sDAAsD;QACtD,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,UAAU,GAAG,EAAE,GAAG,aAAa,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;QAC3D,MAAM,eAAe,CAAC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;QAEjE,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { Store } from '../store.js';
2
- /** One concrete, reportable change a migration made (or would make). */
3
- export interface MigrationDelta {
4
- /** The file touched, relative to the store root — 'contexture.yaml' for the config itself. */
5
- path: string;
6
- description: string;
7
- }
8
- /**
9
- * store-lifecycle spec: "named, dry-runnable, resumable." A migration's
10
- * `plan()` and `apply()` both re-derive what still needs doing from the
11
- * store's CURRENT on-disk state, never from separately-tracked progress —
12
- * so re-running `apply()` after an interruption naturally skips whatever
13
- * was already done (it no longer matches the "needs migrating" condition)
14
- * and finishes the rest, with no separate progress file to go stale or
15
- * corrupt.
16
- */
17
- export interface Migration {
18
- id: string;
19
- fromVersion: number;
20
- toVersion: number;
21
- description: string;
22
- /** Computes exactly what apply() would change, without writing anything. */
23
- plan(store: Store): Promise<MigrationDelta[]>;
24
- /** Applies only what plan() would still report as pending; returns what it actually changed. */
25
- apply(store: Store): Promise<MigrationDelta[]>;
26
- }
27
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/migrations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,8FAA8F;IAC9F,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC9C,gGAAgG;IAChG,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;CAChD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/migrations/types.ts"],"names":[],"mappings":""}