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.
- package/README.md +313 -22
- package/dist/adapters/types.d.ts +0 -5
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/commands/adapters-generate.d.ts.map +1 -1
- package/dist/commands/adapters-generate.js +2 -3
- package/dist/commands/adapters-generate.js.map +1 -1
- package/dist/commands/context-gather.d.ts +22 -0
- package/dist/commands/context-gather.d.ts.map +1 -0
- package/dist/commands/context-gather.js +36 -0
- package/dist/commands/context-gather.js.map +1 -0
- package/dist/commands/graph-query.d.ts.map +1 -1
- package/dist/commands/graph-query.js +6 -8
- package/dist/commands/graph-query.js.map +1 -1
- package/dist/commands/ingest.d.ts +22 -9
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +86 -24
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +22 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish-check.d.ts.map +1 -1
- package/dist/commands/publish-check.js +8 -0
- package/dist/commands/publish-check.js.map +1 -1
- package/dist/commands/publish-new.d.ts.map +1 -1
- package/dist/commands/publish-new.js +15 -0
- package/dist/commands/publish-new.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +33 -11
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +9 -1
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/source-check.d.ts.map +1 -1
- package/dist/commands/source-check.js +52 -9
- package/dist/commands/source-check.js.map +1 -1
- package/dist/commands/source-stamp.d.ts +6 -5
- package/dist/commands/source-stamp.d.ts.map +1 -1
- package/dist/commands/source-stamp.js +8 -7
- package/dist/commands/source-stamp.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/verify.d.ts +11 -2
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +86 -5
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/version.d.ts +31 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +87 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/config/defaults.d.ts +113 -4
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +83 -4
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/load.d.ts +2 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +13 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/render.d.ts +5 -0
- package/dist/config/render.d.ts.map +1 -1
- package/dist/config/render.js +62 -3
- package/dist/config/render.js.map +1 -1
- package/dist/config/schema.d.ts +47 -76
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +171 -134
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +4 -1
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/browse/nav.d.ts.map +1 -1
- package/dist/core/browse/nav.js +4 -1
- package/dist/core/browse/nav.js.map +1 -1
- package/dist/core/browse/preferences.d.ts +26 -0
- package/dist/core/browse/preferences.d.ts.map +1 -0
- package/dist/core/browse/preferences.js +74 -0
- package/dist/core/browse/preferences.js.map +1 -0
- package/dist/core/browse/routes.d.ts +10 -8
- package/dist/core/browse/routes.d.ts.map +1 -1
- package/dist/core/browse/routes.js +113 -24
- package/dist/core/browse/routes.js.map +1 -1
- package/dist/core/browse/templates.d.ts +14 -4
- package/dist/core/browse/templates.d.ts.map +1 -1
- package/dist/core/browse/templates.js +22 -4
- package/dist/core/browse/templates.js.map +1 -1
- package/dist/core/checks/harness-portability-checks.d.ts +22 -1
- package/dist/core/checks/harness-portability-checks.d.ts.map +1 -1
- package/dist/core/checks/harness-portability-checks.js +48 -4
- package/dist/core/checks/harness-portability-checks.js.map +1 -1
- package/dist/core/checks/integrity-checks.d.ts +0 -2
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +2 -27
- package/dist/core/checks/integrity-checks.js.map +1 -1
- package/dist/core/checks/manifest.d.ts.map +1 -1
- package/dist/core/checks/manifest.js +2 -0
- package/dist/core/checks/manifest.js.map +1 -1
- package/dist/core/checks/organize-checks.d.ts +11 -1
- package/dist/core/checks/organize-checks.d.ts.map +1 -1
- package/dist/core/checks/organize-checks.js +42 -12
- package/dist/core/checks/organize-checks.js.map +1 -1
- package/dist/core/checks/retrieval-checks.d.ts +9 -0
- package/dist/core/checks/retrieval-checks.d.ts.map +1 -0
- package/dist/core/checks/retrieval-checks.js +30 -0
- package/dist/core/checks/retrieval-checks.js.map +1 -0
- package/dist/core/command.d.ts +6 -0
- package/dist/core/command.d.ts.map +1 -1
- package/dist/core/content/canonicalize.d.ts +10 -0
- package/dist/core/content/canonicalize.d.ts.map +1 -1
- package/dist/core/content/canonicalize.js +12 -0
- package/dist/core/content/canonicalize.js.map +1 -1
- package/dist/core/env.d.ts +5 -0
- package/dist/core/env.d.ts.map +1 -1
- package/dist/core/env.js +3 -0
- package/dist/core/env.js.map +1 -1
- package/dist/core/environment/probe.d.ts +12 -0
- package/dist/core/environment/probe.d.ts.map +1 -0
- package/dist/core/environment/probe.js +36 -0
- package/dist/core/environment/probe.js.map +1 -0
- package/dist/core/errors.d.ts +32 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +81 -3
- package/dist/core/errors.js.map +1 -1
- package/dist/core/fs/prefix.d.ts +13 -0
- package/dist/core/fs/prefix.d.ts.map +1 -0
- package/dist/core/fs/prefix.js +22 -0
- package/dist/core/fs/prefix.js.map +1 -0
- package/dist/core/git/worktree.d.ts +22 -0
- package/dist/core/git/worktree.d.ts.map +1 -1
- package/dist/core/git/worktree.js +34 -0
- package/dist/core/git/worktree.js.map +1 -1
- package/dist/core/graph/persist.d.ts +13 -0
- package/dist/core/graph/persist.d.ts.map +1 -1
- package/dist/core/graph/persist.js +24 -0
- package/dist/core/graph/persist.js.map +1 -1
- package/dist/core/harness/isolated-run.d.ts +52 -0
- package/dist/core/harness/isolated-run.d.ts.map +1 -0
- package/dist/core/harness/isolated-run.js +100 -0
- package/dist/core/harness/isolated-run.js.map +1 -0
- package/dist/core/hooks.d.ts +3 -12
- package/dist/core/hooks.d.ts.map +1 -1
- package/dist/core/hooks.js +24 -20
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/ingest/capture-hash.d.ts +16 -0
- package/dist/core/ingest/capture-hash.d.ts.map +1 -0
- package/dist/core/ingest/capture-hash.js +34 -0
- package/dist/core/ingest/capture-hash.js.map +1 -0
- package/dist/core/ingest/identity.d.ts +7 -1
- package/dist/core/ingest/identity.d.ts.map +1 -1
- package/dist/core/ingest/identity.js +16 -1
- package/dist/core/ingest/identity.js.map +1 -1
- package/dist/core/ingest/model.d.ts +17 -2
- package/dist/core/ingest/model.d.ts.map +1 -1
- package/dist/core/ingest/model.js +5 -0
- package/dist/core/ingest/model.js.map +1 -1
- package/dist/core/install-kind.d.ts +25 -0
- package/dist/core/install-kind.d.ts.map +1 -0
- package/dist/core/install-kind.js +56 -0
- package/dist/core/install-kind.js.map +1 -0
- package/dist/core/notes/list.d.ts +20 -0
- package/dist/core/notes/list.d.ts.map +1 -1
- package/dist/core/notes/list.js +27 -6
- package/dist/core/notes/list.js.map +1 -1
- package/dist/core/publish/script-check.d.ts +5 -2
- package/dist/core/publish/script-check.d.ts.map +1 -1
- package/dist/core/publish/script-check.js +5 -2
- package/dist/core/publish/script-check.js.map +1 -1
- package/dist/core/records.d.ts +7 -0
- package/dist/core/records.d.ts.map +1 -1
- package/dist/core/records.js +12 -2
- package/dist/core/records.js.map +1 -1
- package/dist/core/registry.d.ts +40 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +55 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/retrieval/pass.d.ts +66 -0
- package/dist/core/retrieval/pass.d.ts.map +1 -0
- package/dist/core/retrieval/pass.js +171 -0
- package/dist/core/retrieval/pass.js.map +1 -0
- package/dist/core/root.d.ts +11 -5
- package/dist/core/root.d.ts.map +1 -1
- package/dist/core/root.js +20 -8
- package/dist/core/root.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +7 -0
- package/dist/core/skills.js.map +1 -1
- package/dist/core/version-check.d.ts +63 -0
- package/dist/core/version-check.d.ts.map +1 -0
- package/dist/core/version-check.js +181 -0
- package/dist/core/version-check.js.map +1 -0
- package/dist/core/write-lifecycle/path-gate.d.ts +2 -2
- package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
- package/dist/core/write-lifecycle/path-gate.js +9 -10
- package/dist/core/write-lifecycle/path-gate.js.map +1 -1
- package/dist/run.d.ts +1 -6
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +76 -19
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +8 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +8 -1
- package/dist/version.js.map +1 -1
- package/package.json +12 -4
- package/templates/agents/canonical.md +1 -1
- package/templates/agents/capture-and-ingest.md +27 -8
- package/templates/agents/retrieval-leg-routing.md +34 -8
- package/templates/hooks/_resolve-ctxr.sh +37 -0
- package/templates/hooks/claude-code-write-gate.sh +34 -6
- package/templates/hooks/pre-commit.sh +15 -8
- package/templates/serve/shell.html +16 -2
- package/templates/serve/style.css +145 -3
- package/templates/skills/ctxr-connection-finding.md +7 -5
- package/templates/skills/ctxr-ingest-orchestration.md +15 -9
- package/templates/skills/ctxr-publish.md +7 -8
- package/templates/skills/ctxr-session-lifecycle.md +20 -0
- package/templates/skills/ctxr-upgrade.md +44 -0
- package/dist/commands/migrate.d.ts +0 -30
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js +0 -56
- package/dist/commands/migrate.js.map +0 -1
- package/dist/core/migrations/add-explanation-craft-skill.d.ts +0 -26
- package/dist/core/migrations/add-explanation-craft-skill.d.ts.map +0 -1
- package/dist/core/migrations/add-explanation-craft-skill.js +0 -94
- package/dist/core/migrations/add-explanation-craft-skill.js.map +0 -1
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts +0 -35
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts.map +0 -1
- package/dist/core/migrations/archive-destination-from-taxonomy.js +0 -109
- package/dist/core/migrations/archive-destination-from-taxonomy.js.map +0 -1
- package/dist/core/migrations/drop-access-axes.d.ts +0 -24
- package/dist/core/migrations/drop-access-axes.d.ts.map +0 -1
- package/dist/core/migrations/drop-access-axes.js +0 -54
- package/dist/core/migrations/drop-access-axes.js.map +0 -1
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts +0 -19
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts.map +0 -1
- package/dist/core/migrations/drop-forge-and-workspaces-external.js +0 -49
- package/dist/core/migrations/drop-forge-and-workspaces-external.js.map +0 -1
- package/dist/core/migrations/registry.d.ts +0 -16
- package/dist/core/migrations/registry.d.ts.map +0 -1
- package/dist/core/migrations/registry.js +0 -30
- package/dist/core/migrations/registry.js.map +0 -1
- package/dist/core/migrations/rename-conventions-path.d.ts +0 -26
- package/dist/core/migrations/rename-conventions-path.d.ts.map +0 -1
- package/dist/core/migrations/rename-conventions-path.js +0 -86
- package/dist/core/migrations/rename-conventions-path.js.map +0 -1
- package/dist/core/migrations/rename-procedures-path.d.ts +0 -17
- package/dist/core/migrations/rename-procedures-path.d.ts.map +0 -1
- package/dist/core/migrations/rename-procedures-path.js +0 -45
- package/dist/core/migrations/rename-procedures-path.js.map +0 -1
- package/dist/core/migrations/types.d.ts +0 -27
- package/dist/core/migrations/types.d.ts.map +0 -1
- package/dist/core/migrations/types.js +0 -2
- package/dist/core/migrations/types.js.map +0 -1
|
@@ -56,8 +56,24 @@ export declare const DEFAULT_MISSION_FILE_NAME = "mission.md";
|
|
|
56
56
|
export declare const DEFAULT_MISSION_PATH = ".contexture/guidance/mission.md";
|
|
57
57
|
/** store-integrity spec: AGENTS.md's inlined "Store conventions" section's size ceiling when `harness.convention_max_bytes` is unset. */
|
|
58
58
|
export declare const DEFAULT_CONVENTION_MAX_BYTES: number;
|
|
59
|
-
/**
|
|
60
|
-
|
|
59
|
+
/**
|
|
60
|
+
* context-ingest spec: the capture tier's root. Everything beneath it is
|
|
61
|
+
* material that arrived rather than knowledge someone wrote, so it is
|
|
62
|
+
* excluded from retrieval and never becomes a note — but it IS tracked in
|
|
63
|
+
* git, because a retained capture is provenance, not regenerable output.
|
|
64
|
+
*/
|
|
65
|
+
export declare const DEFAULT_CAPTURE_ROOT = "raw/";
|
|
66
|
+
/** Paths excluded from every retrieval leg by default — contexture's own directory, and the capture tier. */
|
|
67
|
+
export declare const DEFAULT_EXCLUDE_PATHS: readonly ['.contexture/', "raw/"];
|
|
68
|
+
/**
|
|
69
|
+
* compose-the-retrieval-pass spec (D10/D11): path prefixes that stay fully
|
|
70
|
+
* retrievable but sort after everything else. Empty here because the shipped
|
|
71
|
+
* value is not a literal — `init` seeds it from the taxonomy's own resolved
|
|
72
|
+
* archive destination, so a custom taxonomy demotes its archive, not PARA's.
|
|
73
|
+
*/
|
|
74
|
+
export declare const DEFAULT_DEMOTE_PATHS: readonly string[];
|
|
75
|
+
/** compose-the-retrieval-pass spec: how many notes `ctxr context gather` returns before it reports truncation. */
|
|
76
|
+
export declare const DEFAULT_GATHER_MAX_NOTES = 50;
|
|
61
77
|
/** graph-context-document spec: no relation vocabulary by default — no typed edges until a store declares names. */
|
|
62
78
|
export declare const DEFAULT_RELATIONS: readonly string[];
|
|
63
79
|
/** graph-context-document spec: positional clusters two directory segments deep; document sections capped for readability. */
|
|
@@ -79,8 +95,13 @@ export declare const DEFAULT_CATALOG_PATH = ".contexture/catalog/";
|
|
|
79
95
|
export declare const DEFAULT_CATALOG_SECTION_MAX_BYTES: number;
|
|
80
96
|
/** publish spec: where published pages live — tracked, authored-but-tool-owned, excluded from retrieval like the catalog and skill pack. */
|
|
81
97
|
export declare const DEFAULT_PUBLISH_PATH = ".contexture/publish/";
|
|
82
|
-
/**
|
|
83
|
-
|
|
98
|
+
/**
|
|
99
|
+
* context-ingest spec: capture's landing zone — the not-yet-ingested state
|
|
100
|
+
* inside the capture tier. Nesting it under the capture root is what lets a
|
|
101
|
+
* single prefix serve both the retrieval exclusion and the write-path gate;
|
|
102
|
+
* the schema enforces the nesting.
|
|
103
|
+
*/
|
|
104
|
+
export declare const DEFAULT_INBOX_PATH = "raw/inbox/";
|
|
84
105
|
/** store-primitives-from-migration-audit spec (D2): the shipped tracking-parameter list source check strips before comparing URL identities. */
|
|
85
106
|
export declare const DEFAULT_TRACKING_PARAMS: string[];
|
|
86
107
|
/**
|
|
@@ -100,4 +121,92 @@ export declare const DEFAULT_ROLLUP_STALE_DAYS = 7;
|
|
|
100
121
|
* it was addable.
|
|
101
122
|
*/
|
|
102
123
|
export declare const DEFAULT_ADAPTERS: readonly AdapterDeclaration[];
|
|
124
|
+
/**
|
|
125
|
+
* Every configuration value contexture ships an opinion about, in one place,
|
|
126
|
+
* shaped like the config itself. `StoreConfigSchema` takes its `.default(...)`
|
|
127
|
+
* values from here and `renderStoreConfig` reads it to decide what a written
|
|
128
|
+
* config may omit — the two have to agree, and the only way to guarantee that
|
|
129
|
+
* is for them to read the same object.
|
|
130
|
+
*
|
|
131
|
+
* What is deliberately ABSENT from this object is as load-bearing as what is
|
|
132
|
+
* in it. A key appears here only when its correct value depends on nothing:
|
|
133
|
+
*
|
|
134
|
+
* - `schema_version`, `taxonomy` and `git.default_branch` are facts about the
|
|
135
|
+
* individual store. `git.default_branch` records whatever branch `git init`
|
|
136
|
+
* actually created and is never hardcoded (see `GitSchema`).
|
|
137
|
+
* - `organize.archive_destination` is derived: a shipped profile supplies it
|
|
138
|
+
* from the taxonomy at init, so a constant here would give every PARA store
|
|
139
|
+
* `archive/` while its own taxonomy declares `archives/` — the defect
|
|
140
|
+
* `archive-destination-from-taxonomy` was written to fix.
|
|
141
|
+
* - `organize.mission_path` is an opt-in whose absence is meaningful: call
|
|
142
|
+
* sites branch on the key's presence to decide whether the store has a
|
|
143
|
+
* mission mechanism at all. `DEFAULT_MISSION_PATH` is what `init` seeds,
|
|
144
|
+
* not what an omission resolves to.
|
|
145
|
+
*/
|
|
146
|
+
/**
|
|
147
|
+
* cli-contract (keep-the-installed-cli-current): the release advisory is on by
|
|
148
|
+
* default — an operator who never learns a newer release exists is exactly the
|
|
149
|
+
* problem it solves — and off with one key. The interval is a day because the
|
|
150
|
+
* thing being watched is a hand-cut release, not a stream of commits.
|
|
151
|
+
*/
|
|
152
|
+
export declare const DEFAULT_UPDATE_CHECK_ENABLED = true;
|
|
153
|
+
export declare const DEFAULT_UPDATE_CHECK_TTL_HOURS = 24;
|
|
154
|
+
export declare const SHIPPED_DEFAULTS: {
|
|
155
|
+
readonly derived: {
|
|
156
|
+
readonly paths: readonly [".contexture/cache/"];
|
|
157
|
+
};
|
|
158
|
+
readonly retrieval: {
|
|
159
|
+
readonly exclude_paths: readonly [".contexture/", "raw/"];
|
|
160
|
+
readonly demote_paths: readonly string[];
|
|
161
|
+
readonly gather_max_notes: 50;
|
|
162
|
+
readonly relations: readonly string[];
|
|
163
|
+
readonly graph: {
|
|
164
|
+
cluster_depth: number;
|
|
165
|
+
hub_top: number;
|
|
166
|
+
bridge_top: number;
|
|
167
|
+
orphan_exempt_clusters: string[];
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly session: {
|
|
171
|
+
readonly branch_prefix: "session/";
|
|
172
|
+
readonly worktrees_path: ".worktrees/";
|
|
173
|
+
};
|
|
174
|
+
readonly write_lifecycle: {
|
|
175
|
+
readonly diff_size_ceiling_lines: 2000;
|
|
176
|
+
readonly writable_paths: string[];
|
|
177
|
+
};
|
|
178
|
+
readonly catalog: {
|
|
179
|
+
readonly path: ".contexture/catalog/";
|
|
180
|
+
readonly section_max_bytes: number;
|
|
181
|
+
};
|
|
182
|
+
readonly publish: {
|
|
183
|
+
readonly path: ".contexture/publish/";
|
|
184
|
+
};
|
|
185
|
+
readonly skills: {
|
|
186
|
+
readonly vendored: readonly ["frontend-design", "eli5"];
|
|
187
|
+
};
|
|
188
|
+
readonly ingest: {
|
|
189
|
+
readonly inbox_path: "raw/inbox/";
|
|
190
|
+
readonly capture_root: "raw/";
|
|
191
|
+
readonly tracking_params: string[];
|
|
192
|
+
};
|
|
193
|
+
readonly organize: {
|
|
194
|
+
readonly rollup_stale_days: 7;
|
|
195
|
+
};
|
|
196
|
+
readonly harness: {
|
|
197
|
+
readonly skills_path: ".agents/skills/";
|
|
198
|
+
readonly guidance_path: ".contexture/guidance/";
|
|
199
|
+
readonly convention_max_bytes: number;
|
|
200
|
+
};
|
|
201
|
+
readonly adapters: readonly {
|
|
202
|
+
id: string;
|
|
203
|
+
kind: "harness-generation";
|
|
204
|
+
module?: string | undefined;
|
|
205
|
+
skills_dir?: string | undefined;
|
|
206
|
+
}[];
|
|
207
|
+
readonly update_check: {
|
|
208
|
+
readonly enabled: true;
|
|
209
|
+
readonly ttl_hours: 24;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
103
212
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,YAAI,oBAAoB,CAAU,CAAC;AAErE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,YAAI,iBAAiB,EAAE,MAAM,CAAU,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,4HAA4H;AAC5H,eAAO,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BAAiC,cAAc;;aACvE,eAAe;iBAAI,uBAAuB;iBAAmC,cAAc,EAAQ,MAAM,EAAE;;aAC3G,OAAO;iBAAI,IAAI;iBAAwB,iBAAiB;;aACxD,OAAO;iBAAI,IAAI;;aACf,MAAM;iBAAI,QAAQ;;aAClB,MAAM;iBACJ,UAAU;iBACV,YAAY;iBACZ,eAAe;;aAEjB,QAAQ;iBAAI,iBAAiB;;aAC7B,OAAO;iBACL,WAAW;iBACX,aAAa;iBACb,oBAAoB;;aAEtB,QAAQ;;;;;;aACR,YAAY;iBAAI,OAAO;iBAAgC,SAAS;;CACxD,CAAC"}
|
package/dist/config/defaults.js
CHANGED
|
@@ -55,8 +55,24 @@ export const DEFAULT_MISSION_FILE_NAME = 'mission.md';
|
|
|
55
55
|
export const DEFAULT_MISSION_PATH = `${DEFAULT_GUIDANCE_PATH}${DEFAULT_MISSION_FILE_NAME}`;
|
|
56
56
|
/** store-integrity spec: AGENTS.md's inlined "Store conventions" section's size ceiling when `harness.convention_max_bytes` is unset. */
|
|
57
57
|
export const DEFAULT_CONVENTION_MAX_BYTES = 32 * 1024;
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* context-ingest spec: the capture tier's root. Everything beneath it is
|
|
60
|
+
* material that arrived rather than knowledge someone wrote, so it is
|
|
61
|
+
* excluded from retrieval and never becomes a note — but it IS tracked in
|
|
62
|
+
* git, because a retained capture is provenance, not regenerable output.
|
|
63
|
+
*/
|
|
64
|
+
export const DEFAULT_CAPTURE_ROOT = 'raw/';
|
|
65
|
+
/** Paths excluded from every retrieval leg by default — contexture's own directory, and the capture tier. */
|
|
66
|
+
export const DEFAULT_EXCLUDE_PATHS = ['.contexture/', DEFAULT_CAPTURE_ROOT];
|
|
67
|
+
/**
|
|
68
|
+
* compose-the-retrieval-pass spec (D10/D11): path prefixes that stay fully
|
|
69
|
+
* retrievable but sort after everything else. Empty here because the shipped
|
|
70
|
+
* value is not a literal — `init` seeds it from the taxonomy's own resolved
|
|
71
|
+
* archive destination, so a custom taxonomy demotes its archive, not PARA's.
|
|
72
|
+
*/
|
|
73
|
+
export const DEFAULT_DEMOTE_PATHS = [];
|
|
74
|
+
/** compose-the-retrieval-pass spec: how many notes `ctxr context gather` returns before it reports truncation. */
|
|
75
|
+
export const DEFAULT_GATHER_MAX_NOTES = 50;
|
|
60
76
|
/** graph-context-document spec: no relation vocabulary by default — no typed edges until a store declares names. */
|
|
61
77
|
export const DEFAULT_RELATIONS = [];
|
|
62
78
|
/** graph-context-document spec: positional clusters two directory segments deep; document sections capped for readability. */
|
|
@@ -78,8 +94,13 @@ export const DEFAULT_CATALOG_PATH = '.contexture/catalog/';
|
|
|
78
94
|
export const DEFAULT_CATALOG_SECTION_MAX_BYTES = 32 * 1024;
|
|
79
95
|
/** publish spec: where published pages live — tracked, authored-but-tool-owned, excluded from retrieval like the catalog and skill pack. */
|
|
80
96
|
export const DEFAULT_PUBLISH_PATH = '.contexture/publish/';
|
|
81
|
-
/**
|
|
82
|
-
|
|
97
|
+
/**
|
|
98
|
+
* context-ingest spec: capture's landing zone — the not-yet-ingested state
|
|
99
|
+
* inside the capture tier. Nesting it under the capture root is what lets a
|
|
100
|
+
* single prefix serve both the retrieval exclusion and the write-path gate;
|
|
101
|
+
* the schema enforces the nesting.
|
|
102
|
+
*/
|
|
103
|
+
export const DEFAULT_INBOX_PATH = 'raw/inbox/';
|
|
83
104
|
/** store-primitives-from-migration-audit spec (D2): the shipped tracking-parameter list source check strips before comparing URL identities. */
|
|
84
105
|
export const DEFAULT_TRACKING_PARAMS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid'];
|
|
85
106
|
/**
|
|
@@ -99,4 +120,62 @@ export const DEFAULT_ROLLUP_STALE_DAYS = 7;
|
|
|
99
120
|
* it was addable.
|
|
100
121
|
*/
|
|
101
122
|
export const DEFAULT_ADAPTERS = [{ id: 'claude-code', kind: 'harness-generation' }];
|
|
123
|
+
/**
|
|
124
|
+
* Every configuration value contexture ships an opinion about, in one place,
|
|
125
|
+
* shaped like the config itself. `StoreConfigSchema` takes its `.default(...)`
|
|
126
|
+
* values from here and `renderStoreConfig` reads it to decide what a written
|
|
127
|
+
* config may omit — the two have to agree, and the only way to guarantee that
|
|
128
|
+
* is for them to read the same object.
|
|
129
|
+
*
|
|
130
|
+
* What is deliberately ABSENT from this object is as load-bearing as what is
|
|
131
|
+
* in it. A key appears here only when its correct value depends on nothing:
|
|
132
|
+
*
|
|
133
|
+
* - `schema_version`, `taxonomy` and `git.default_branch` are facts about the
|
|
134
|
+
* individual store. `git.default_branch` records whatever branch `git init`
|
|
135
|
+
* actually created and is never hardcoded (see `GitSchema`).
|
|
136
|
+
* - `organize.archive_destination` is derived: a shipped profile supplies it
|
|
137
|
+
* from the taxonomy at init, so a constant here would give every PARA store
|
|
138
|
+
* `archive/` while its own taxonomy declares `archives/` — the defect
|
|
139
|
+
* `archive-destination-from-taxonomy` was written to fix.
|
|
140
|
+
* - `organize.mission_path` is an opt-in whose absence is meaningful: call
|
|
141
|
+
* sites branch on the key's presence to decide whether the store has a
|
|
142
|
+
* mission mechanism at all. `DEFAULT_MISSION_PATH` is what `init` seeds,
|
|
143
|
+
* not what an omission resolves to.
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* cli-contract (keep-the-installed-cli-current): the release advisory is on by
|
|
147
|
+
* default — an operator who never learns a newer release exists is exactly the
|
|
148
|
+
* problem it solves — and off with one key. The interval is a day because the
|
|
149
|
+
* thing being watched is a hand-cut release, not a stream of commits.
|
|
150
|
+
*/
|
|
151
|
+
export const DEFAULT_UPDATE_CHECK_ENABLED = true;
|
|
152
|
+
export const DEFAULT_UPDATE_CHECK_TTL_HOURS = 24;
|
|
153
|
+
export const SHIPPED_DEFAULTS = {
|
|
154
|
+
derived: { paths: DEFAULT_DERIVED_PATHS },
|
|
155
|
+
retrieval: {
|
|
156
|
+
exclude_paths: DEFAULT_EXCLUDE_PATHS,
|
|
157
|
+
demote_paths: DEFAULT_DEMOTE_PATHS,
|
|
158
|
+
gather_max_notes: DEFAULT_GATHER_MAX_NOTES,
|
|
159
|
+
relations: DEFAULT_RELATIONS,
|
|
160
|
+
graph: DEFAULT_GRAPH_SETTINGS,
|
|
161
|
+
},
|
|
162
|
+
session: { branch_prefix: DEFAULT_SESSION_BRANCH_PREFIX, worktrees_path: DEFAULT_WORKTREES_PATH },
|
|
163
|
+
write_lifecycle: { diff_size_ceiling_lines: DEFAULT_DIFF_SIZE_CEILING_LINES, writable_paths: [] },
|
|
164
|
+
catalog: { path: DEFAULT_CATALOG_PATH, section_max_bytes: DEFAULT_CATALOG_SECTION_MAX_BYTES },
|
|
165
|
+
publish: { path: DEFAULT_PUBLISH_PATH },
|
|
166
|
+
skills: { vendored: DEFAULT_VENDORED_SKILLS },
|
|
167
|
+
ingest: {
|
|
168
|
+
inbox_path: DEFAULT_INBOX_PATH,
|
|
169
|
+
capture_root: DEFAULT_CAPTURE_ROOT,
|
|
170
|
+
tracking_params: DEFAULT_TRACKING_PARAMS,
|
|
171
|
+
},
|
|
172
|
+
organize: { rollup_stale_days: DEFAULT_ROLLUP_STALE_DAYS },
|
|
173
|
+
harness: {
|
|
174
|
+
skills_path: DEFAULT_SKILLS_PATH,
|
|
175
|
+
guidance_path: DEFAULT_GUIDANCE_PATH,
|
|
176
|
+
convention_max_bytes: DEFAULT_CONVENTION_MAX_BYTES,
|
|
177
|
+
},
|
|
178
|
+
adapters: DEFAULT_ADAPTERS,
|
|
179
|
+
update_check: { enabled: DEFAULT_UPDATE_CHECK_ENABLED, ttl_hours: DEFAULT_UPDATE_CHECK_TTL_HOURS },
|
|
180
|
+
};
|
|
102
181
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,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MAAM,EAAE,EAAE,QAAQ,EAAE,uBAAuB,EAAE;IAC7C,MAAM,EAAE;QACN,UAAU,EAAE,kBAAkB;QAC9B,YAAY,EAAE,oBAAoB;QAClC,eAAe,EAAE,uBAAuB;KACzC;IACD,QAAQ,EAAE,EAAE,iBAAiB,EAAE,yBAAyB,EAAE;IAC1D,OAAO,EAAE;QACP,WAAW,EAAE,mBAAmB;QAChC,aAAa,EAAE,qBAAqB;QACpC,oBAAoB,EAAE,4BAA4B;KACnD;IACD,QAAQ,EAAE,gBAAgB;IAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,4BAA4B,EAAE,SAAS,EAAE,8BAA8B,EAAE;CAC1F,CAAC"}
|
package/dist/config/load.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export declare function configPathFor(root: string): string;
|
|
|
3
3
|
/**
|
|
4
4
|
* store-lifecycle spec: "Schema version is recorded and gated" — every
|
|
5
5
|
* command reads schema_version before operating. This peeks at it loosely,
|
|
6
|
-
* BEFORE full validation, so a store
|
|
7
|
-
*
|
|
6
|
+
* BEFORE full validation, so a store whose recorded version differs in either
|
|
7
|
+
* direction reports the version rather than the confusing generic
|
|
8
8
|
* shape-validation error the full schema would otherwise produce.
|
|
9
9
|
*/
|
|
10
10
|
export declare function readConfig(root: string): Promise<StoreConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAUA,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE5F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA2CnE"}
|
package/dist/config/load.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
4
|
import { CONFIG_FILE_NAME } from '../core/root.js';
|
|
5
|
-
import { InvalidConfigError, SchemaVersionMissingError, SchemaVersionNewerError, } from '../core/errors.js';
|
|
5
|
+
import { InvalidConfigError, SchemaVersionBehindError, SchemaVersionMissingError, SchemaVersionNewerError, } from '../core/errors.js';
|
|
6
6
|
import { StoreConfigSchema, SUPPORTED_SCHEMA_VERSION } from './schema.js';
|
|
7
7
|
export function configPathFor(root) {
|
|
8
8
|
return path.join(root, CONFIG_FILE_NAME);
|
|
@@ -10,8 +10,8 @@ export function configPathFor(root) {
|
|
|
10
10
|
/**
|
|
11
11
|
* store-lifecycle spec: "Schema version is recorded and gated" — every
|
|
12
12
|
* command reads schema_version before operating. This peeks at it loosely,
|
|
13
|
-
* BEFORE full validation, so a store
|
|
14
|
-
*
|
|
13
|
+
* BEFORE full validation, so a store whose recorded version differs in either
|
|
14
|
+
* direction reports the version rather than the confusing generic
|
|
15
15
|
* shape-validation error the full schema would otherwise produce.
|
|
16
16
|
*/
|
|
17
17
|
export async function readConfig(root) {
|
|
@@ -36,6 +36,16 @@ export async function readConfig(root) {
|
|
|
36
36
|
if (rawVersion > SUPPORTED_SCHEMA_VERSION) {
|
|
37
37
|
throw new SchemaVersionNewerError(rawVersion, SUPPORTED_SCHEMA_VERSION);
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* retire-store-migrations: the older direction is refused here too, and for
|
|
41
|
+
* the same reason the newer one is — this release cannot read that shape.
|
|
42
|
+
* It has to happen before `safeParse`, or an older config fails on the keys
|
|
43
|
+
* whose superseded spellings the schema no longer accepts, reporting a shape
|
|
44
|
+
* error against keys the operator never wrote instead of the version.
|
|
45
|
+
*/
|
|
46
|
+
if (rawVersion < SUPPORTED_SCHEMA_VERSION) {
|
|
47
|
+
throw new SchemaVersionBehindError(rawVersion, SUPPORTED_SCHEMA_VERSION);
|
|
48
|
+
}
|
|
39
49
|
const result = StoreConfigSchema.safeParse(raw);
|
|
40
50
|
if (!result.success) {
|
|
41
51
|
const issues = result.error.issues.map((issue) => ({
|
package/dist/config/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAoB,MAAM,aAAa,CAAC;AAE5F,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAEhD,IAAI,GAAY,CAAC;IACjB,IAAI,CAAC;QACH,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,kBAAkB,CAAC,UAAU,EAAE;YACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAA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M,IAAI,kBAAkB,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;IACxG,CAAC;IACD,IAAI,UAAU,GAAG,wBAAwB,EAAE,CAAC;QAC1C,MAAM,IAAI,uBAAuB,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;IAC1E,CAAC;IACD;;;;;;OAMG;IACH,IAAI,UAAU,GAAG,wBAAwB,EAAE,CAAC;QAC1C,MAAM,IAAI,wBAAwB,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACjD,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ;YACtC,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CAAC,CAAC;QACJ,MAAM,IAAI,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/dist/config/render.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ import { type StoreConfig } from './schema.js';
|
|
|
4
4
|
* schema before returning — a render that doesn't round-trip is a bug caught
|
|
5
5
|
* here, before any byte reaches disk, rather than discovered later as a
|
|
6
6
|
* corrupted store.
|
|
7
|
+
*
|
|
8
|
+
* The round-trip also proves the omission was lossless: what the pruned text
|
|
9
|
+
* parses back to must equal what was passed in, so a default that drifted out
|
|
10
|
+
* of step with the schema fails here rather than silently changing a store's
|
|
11
|
+
* behavior.
|
|
7
12
|
*/
|
|
8
13
|
export declare function renderStoreConfig(config: StoreConfig): string;
|
|
9
14
|
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/config/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/config/render.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAmDlE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAW7D"}
|
package/dist/config/render.js
CHANGED
|
@@ -1,15 +1,74 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
1
2
|
import { parse as parseYaml, stringify as stringifyYaml } from 'yaml';
|
|
3
|
+
import { SHIPPED_DEFAULTS } from './defaults.js';
|
|
2
4
|
import { StoreConfigSchema } from './schema.js';
|
|
3
|
-
const HEADER =
|
|
5
|
+
const HEADER = [
|
|
6
|
+
'# contexture store configuration',
|
|
7
|
+
'#',
|
|
8
|
+
'# Only what this store chose. Any key not here takes contexture\'s shipped',
|
|
9
|
+
'# default, and follows it when a later release improves it.',
|
|
10
|
+
'',
|
|
11
|
+
'',
|
|
12
|
+
].join('\n');
|
|
13
|
+
function isPlainObject(value) {
|
|
14
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* config-defaults-as-the-convention (D3, D4): drops every value equal to its
|
|
18
|
+
* shipped default, so what reaches disk is the set of decisions the store has
|
|
19
|
+
* made. Applied here rather than at `init` so the pruning belongs to the act
|
|
20
|
+
* of writing rather than to one caller — `init` is the only writer since
|
|
21
|
+
* retire-store-migrations, and a second one that skipped this would
|
|
22
|
+
* re-materialize the full resolved shape and undo the omission.
|
|
23
|
+
*
|
|
24
|
+
* Equality is deep and order-sensitive: a list holding the same entries in a
|
|
25
|
+
* different order is written as the store wrote it. Treating that as equal
|
|
26
|
+
* would silently reorder an operator's file to save one line.
|
|
27
|
+
*
|
|
28
|
+
* A key absent from `SHIPPED_DEFAULTS` is always kept — contexture has no
|
|
29
|
+
* opinion about it, or (as with `organize.mission_path`) its absence is
|
|
30
|
+
* itself the meaningful state.
|
|
31
|
+
*/
|
|
32
|
+
function withoutShippedDefaults(value, defaults) {
|
|
33
|
+
const kept = {};
|
|
34
|
+
for (const [key, declared] of Object.entries(value)) {
|
|
35
|
+
const shipped = defaults[key];
|
|
36
|
+
if (shipped === undefined) {
|
|
37
|
+
kept[key] = declared;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (isPlainObject(declared) && isPlainObject(shipped)) {
|
|
41
|
+
const nested = withoutShippedDefaults(declared, shipped);
|
|
42
|
+
// A block whose every key matched is dropped whole, not left as `{}`.
|
|
43
|
+
if (Object.keys(nested).length > 0)
|
|
44
|
+
kept[key] = nested;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (isDeepStrictEqual(declared, shipped))
|
|
48
|
+
continue;
|
|
49
|
+
kept[key] = declared;
|
|
50
|
+
}
|
|
51
|
+
return kept;
|
|
52
|
+
}
|
|
4
53
|
/**
|
|
5
54
|
* Renders a StoreConfig to YAML text and round-trips it back through the
|
|
6
55
|
* schema before returning — a render that doesn't round-trip is a bug caught
|
|
7
56
|
* here, before any byte reaches disk, rather than discovered later as a
|
|
8
57
|
* corrupted store.
|
|
58
|
+
*
|
|
59
|
+
* The round-trip also proves the omission was lossless: what the pruned text
|
|
60
|
+
* parses back to must equal what was passed in, so a default that drifted out
|
|
61
|
+
* of step with the schema fails here rather than silently changing a store's
|
|
62
|
+
* behavior.
|
|
9
63
|
*/
|
|
10
64
|
export function renderStoreConfig(config) {
|
|
11
|
-
const
|
|
12
|
-
|
|
65
|
+
const declared = withoutShippedDefaults(config, SHIPPED_DEFAULTS);
|
|
66
|
+
const text = HEADER + stringifyYaml(declared, { indent: 2 });
|
|
67
|
+
const reparsed = StoreConfigSchema.parse(parseYaml(text)); // throws on mismatch; that IS the check
|
|
68
|
+
if (!isDeepStrictEqual(reparsed, config)) {
|
|
69
|
+
throw new Error('contexture.yaml render dropped a key whose shipped default does not match what the schema resolves. ' +
|
|
70
|
+
'SHIPPED_DEFAULTS and StoreConfigSchema disagree.');
|
|
71
|
+
}
|
|
13
72
|
return text;
|
|
14
73
|
}
|
|
15
74
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/config/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/config/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAoB,MAAM,aAAa,CAAC;AAElE,MAAM,MAAM,GAAG;IACb,kCAAkC;IAClC,GAAG;IACH,4EAA4E;IAC5E,6DAA6D;IAC7D,EAAE;IACF,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,sBAAsB,CAAC,KAA8B,EAAE,Q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;YACpG,kDAAkD,CACrD,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -3,39 +3,21 @@ import { z } from 'zod';
|
|
|
3
3
|
* store-lifecycle spec: schema_version versions STORE STATE (config shape +
|
|
4
4
|
* note frontmatter conventions) — a monotonic integer independent of the npm
|
|
5
5
|
* package version — not "what this CLI release happens to be."
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Bumped to 2 by the visibility-field key rename migration (store-lifecycle
|
|
9
|
-
* spec task 9.2). Both that field and the config key naming it were removed
|
|
10
|
-
* at schema 7 (see below); the migration survives only to keep the 1 -> 2
|
|
11
|
-
* step in the chain intact.
|
|
12
|
-
*
|
|
13
|
-
* Bumped to 3 by the procedures-to-skills key rename migration
|
|
14
|
-
* (rename-procedures-to-skills, 0003-rename-procedures-path-to-skills):
|
|
15
|
-
* `harness.procedures_path` -> `harness.skills_path`. HarnessSchema's
|
|
16
|
-
* transform accepts the old key through this version so an unmigrated
|
|
17
|
-
* store still loads (see schema.ts's HarnessSchema comment).
|
|
18
6
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* (vendor-explanation-craft-skill, 0007-add-explanation-craft-skill), which
|
|
27
|
-
* pins its own local SCHEMA_VERSION and is unaffected by later bumps here.
|
|
7
|
+
* retire-store-migrations: contexture ships no migration mechanism, so this
|
|
8
|
+
* number is a gate rather than a starting point. `readConfig` refuses any
|
|
9
|
+
* store whose recorded version is not exactly this one, in either direction:
|
|
10
|
+
* a newer store because this release cannot know its shape, an older one
|
|
11
|
+
* because this release no longer reads that shape and offers nothing that
|
|
12
|
+
* would bring it forward. A release that changes the store's shape bumps this
|
|
13
|
+
* and documents the one-time fixup in its release notes.
|
|
28
14
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* an older store — `noUnrecognizedConfigKeysCheck` derives from this
|
|
34
|
-
* schema's shape, so an unmigrated store fails `doctor` on the three stale
|
|
35
|
-
* keys until `ctxr migrate` drops them, exactly as `identity` did when
|
|
36
|
-
* remove-agent-identity retired it.
|
|
15
|
+
* It stayed at 10 through that retirement on purpose: nothing about a
|
|
16
|
+
* conforming store's shape changed. What was dropped were superseded INPUT
|
|
17
|
+
* spellings that no store at 10 has ever written, since `renderStoreConfig`
|
|
18
|
+
* only ever emitted the current names.
|
|
37
19
|
*/
|
|
38
|
-
export declare const SUPPORTED_SCHEMA_VERSION =
|
|
20
|
+
export declare const SUPPORTED_SCHEMA_VERSION = 10;
|
|
39
21
|
export declare const TaxonomyLayerSchema: z.ZodObject<{
|
|
40
22
|
name: z.ZodString;
|
|
41
23
|
path: z.ZodString;
|
|
@@ -72,11 +54,13 @@ export declare const StoreConfigSchema: z.ZodObject<{
|
|
|
72
54
|
description: z.ZodString;
|
|
73
55
|
}, z.core.$strip>>;
|
|
74
56
|
}, z.core.$strip>;
|
|
75
|
-
derived: z.ZodObject<{
|
|
76
|
-
paths: z.ZodArray<z.ZodString
|
|
77
|
-
}, z.core.$strip
|
|
78
|
-
retrieval: z.ZodObject<{
|
|
79
|
-
exclude_paths: z.ZodArray<z.ZodString
|
|
57
|
+
derived: z.ZodPrefault<z.ZodObject<{
|
|
58
|
+
paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
retrieval: z.ZodPrefault<z.ZodObject<{
|
|
61
|
+
exclude_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
|
+
demote_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
63
|
+
gather_max_notes: z.ZodDefault<z.ZodNumber>;
|
|
80
64
|
relations: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
81
65
|
graph: z.ZodDefault<z.ZodObject<{
|
|
82
66
|
cluster_depth: z.ZodDefault<z.ZodNumber>;
|
|
@@ -84,35 +68,39 @@ export declare const StoreConfigSchema: z.ZodObject<{
|
|
|
84
68
|
bridge_top: z.ZodDefault<z.ZodNumber>;
|
|
85
69
|
orphan_exempt_clusters: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
86
70
|
}, z.core.$strip>>;
|
|
87
|
-
}, z.core.$strip
|
|
71
|
+
}, z.core.$strip>>;
|
|
88
72
|
git: z.ZodObject<{
|
|
89
73
|
default_branch: z.ZodString;
|
|
90
74
|
}, z.core.$strip>;
|
|
91
|
-
session: z.ZodObject<{
|
|
92
|
-
branch_prefix: z.ZodString
|
|
93
|
-
worktrees_path: z.ZodString
|
|
94
|
-
}, z.core.$strip
|
|
95
|
-
write_lifecycle: z.ZodObject<{
|
|
96
|
-
diff_size_ceiling_lines: z.ZodNumber
|
|
75
|
+
session: z.ZodPrefault<z.ZodObject<{
|
|
76
|
+
branch_prefix: z.ZodDefault<z.ZodString>;
|
|
77
|
+
worktrees_path: z.ZodDefault<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
write_lifecycle: z.ZodPrefault<z.ZodObject<{
|
|
80
|
+
diff_size_ceiling_lines: z.ZodDefault<z.ZodNumber>;
|
|
97
81
|
writable_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
98
|
-
}, z.core.$strip
|
|
99
|
-
catalog: z.ZodObject<{
|
|
100
|
-
path: z.ZodString;
|
|
101
|
-
section_max_bytes: z.ZodNumber;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
|
-
publish: z.ZodDefault<z.ZodObject<{
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
catalog: z.ZodPrefault<z.ZodObject<{
|
|
104
84
|
path: z.ZodDefault<z.ZodString>;
|
|
85
|
+
section_max_bytes: z.ZodDefault<z.ZodNumber>;
|
|
105
86
|
}, z.core.$strip>>;
|
|
106
|
-
|
|
87
|
+
publish: z.ZodPrefault<z.ZodObject<{
|
|
88
|
+
path: z.ZodDefault<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
skills: z.ZodPrefault<z.ZodObject<{
|
|
107
91
|
vendored: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
108
92
|
}, z.core.$strip>>;
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
update_check: z.ZodPrefault<z.ZodObject<{
|
|
94
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
ttl_hours: z.ZodDefault<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
ingest: z.ZodPrefault<z.ZodObject<{
|
|
98
|
+
inbox_path: z.ZodDefault<z.ZodString>;
|
|
99
|
+
capture_root: z.ZodDefault<z.ZodString>;
|
|
111
100
|
tracking_params: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
112
|
-
}, z.core.$strip
|
|
101
|
+
}, z.core.$strip>>;
|
|
113
102
|
organize: z.ZodPipe<z.ZodObject<{
|
|
114
103
|
archive_destination: z.ZodOptional<z.ZodString>;
|
|
115
|
-
archive_path: z.ZodOptional<z.ZodString>;
|
|
116
104
|
rollup_stale_days: z.ZodDefault<z.ZodNumber>;
|
|
117
105
|
mission_path: z.ZodOptional<z.ZodString>;
|
|
118
106
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -121,40 +109,23 @@ export declare const StoreConfigSchema: z.ZodObject<{
|
|
|
121
109
|
mission_path?: string | undefined;
|
|
122
110
|
}, {
|
|
123
111
|
archive_destination?: string | undefined;
|
|
124
|
-
archive_path?: string | undefined;
|
|
125
112
|
rollup_stale_days: number;
|
|
126
113
|
mission_path?: string | undefined;
|
|
127
114
|
}>>;
|
|
128
|
-
harness: z.ZodPipe<z.ZodObject<{
|
|
115
|
+
harness: z.ZodPrefault<z.ZodPipe<z.ZodObject<{
|
|
129
116
|
skills_path: z.ZodOptional<z.ZodString>;
|
|
130
|
-
procedures_path: z.ZodOptional<z.ZodString>;
|
|
131
117
|
guidance_path: z.ZodOptional<z.ZodString>;
|
|
132
|
-
|
|
133
|
-
convention_max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
convention_max_bytes: z.ZodDefault<z.ZodNumber>;
|
|
134
119
|
}, z.core.$strip>, z.ZodTransform<{
|
|
135
120
|
skills_path: string;
|
|
136
121
|
guidance_path: string;
|
|
137
|
-
convention_max_bytes
|
|
122
|
+
convention_max_bytes: number;
|
|
138
123
|
}, {
|
|
139
124
|
skills_path?: string | undefined;
|
|
140
|
-
procedures_path?: string | undefined;
|
|
141
125
|
guidance_path?: string | undefined;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
adapters: z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodObject<{
|
|
146
|
-
id: z.ZodString;
|
|
147
|
-
kind: z.ZodString;
|
|
148
|
-
module: z.ZodOptional<z.ZodString>;
|
|
149
|
-
}, z.core.$strip>>, z.ZodTransform<{
|
|
150
|
-
id: string;
|
|
151
|
-
kind: string;
|
|
152
|
-
module?: string | undefined;
|
|
153
|
-
}[], {
|
|
154
|
-
id: string;
|
|
155
|
-
kind: string;
|
|
156
|
-
module?: string | undefined;
|
|
157
|
-
}[]>>, z.ZodArray<z.ZodObject<{
|
|
126
|
+
convention_max_bytes: number;
|
|
127
|
+
}>>>;
|
|
128
|
+
adapters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
158
129
|
id: z.ZodString;
|
|
159
130
|
kind: z.ZodEnum<{
|
|
160
131
|
"harness-generation": "harness-generation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAYH;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB;;;;;iBAKvB,CAAC;AAoNH,QAAA,MAAM,wBAAwB;;;;;;;iBAM5B,CAAC;AAiBH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC1B,CAAC;AAEL,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|