@claudexor/config 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 joi-lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @claudexor/config
2
+
3
+ Internal package of [Claudexor](https://github.com/razzant/claudexor) — Layered config loader (precedence + trust). Sensitive settings never from versioned repo config.
4
+
5
+ Published as part of the Claudexor toolchain; it follows the monorepo's
6
+ lockstep version and has no separate semver contract. Use the `claudexor`
7
+ CLI (or `@claudexor/cli`) as the supported entry point.
@@ -0,0 +1,47 @@
1
+ import type { ResolvedConfig } from "@claudexor/schema";
2
+ import { GlobalConfig, TrustConfig } from "@claudexor/schema";
3
+ export declare function globalConfigDir(): string;
4
+ export declare class ConfigParseError extends Error {
5
+ readonly path: string;
6
+ constructor(path: string, cause: unknown);
7
+ }
8
+ /** Short stable hash of a repo root path, used to key user-local trust files. */
9
+ export declare function repoHash(repoRoot: string): string;
10
+ export declare function loadConfig(repoRoot: string): ResolvedConfig;
11
+ export declare function globalConfigPath(): string;
12
+ /** Resolved user-local trust file path for one repo (keyed by repo-root hash). */
13
+ export declare function trustConfigPath(repoRoot: string): string;
14
+ /**
15
+ * Write the user-local trust file for a repo (used by `claudexor trust`).
16
+ * Values are validated against the STRICT TrustConfig schema; the write is
17
+ * atomic (tmp+rename) like updateGlobalConfig.
18
+ */
19
+ export declare function updateTrustConfig(repoRoot: string, mutator: (config: TrustConfig) => TrustConfig): {
20
+ path: string;
21
+ config: TrustConfig;
22
+ };
23
+ /**
24
+ * Enumerate every user-local trust file (Settings trust list). Unreadable or
25
+ * schema-invalid entries are skipped: listing is a projection, and one stale
26
+ * hand-edited file must not take down the whole settings surface — the strict
27
+ * parse still fails loudly on the load path that actually GATES access.
28
+ */
29
+ export declare function listTrustConfigs(): Array<{
30
+ path: string;
31
+ config: TrustConfig;
32
+ }>;
33
+ /**
34
+ * Update ~/.claudexor/config.yaml with validated global settings. Sensitive
35
+ * values are not accepted here. Locked + atomic (see withConfigLock).
36
+ */
37
+ export declare function updateGlobalConfig(mutator: (config: GlobalConfig) => GlobalConfig): {
38
+ path: string;
39
+ config: GlobalConfig;
40
+ };
41
+ export interface InitResult {
42
+ configPath: string;
43
+ created: boolean;
44
+ }
45
+ /** Scaffold a default versioned project config (used by `claudexor init`). */
46
+ export declare function initProjectConfig(repoRoot: string): InitResult;
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,YAAY,EAGZ,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,qBAAa,gBAAiB,SAAQ,KAAK;aAEvB,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EAC5B,KAAK,EAAE,OAAO;CAKjB;AAED,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjD;AA4GD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAmB3D;AAoDD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAC5C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,CAsBvC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC,CAsB/E;AAqDD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,CAe1H;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAoB9D"}
package/dist/index.js ADDED
@@ -0,0 +1,350 @@
1
+ import { readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
2
+ import { isAbsolute, join } from "node:path";
3
+ import { z } from "zod";
4
+ import { parse as yamlParse, stringify as yamlStringify } from "yaml";
5
+ import { GlobalConfig, ProjectConfig, ResolvedConfig as ResolvedConfigSchema, TrustConfig, } from "@claudexor/schema";
6
+ import { ensureDir, pathExists, readTextSafe, sha256, userConfigDir, writeText } from "@claudexor/util";
7
+ export function globalConfigDir() {
8
+ return userConfigDir();
9
+ }
10
+ export class ConfigParseError extends Error {
11
+ path;
12
+ constructor(path, cause) {
13
+ super(`invalid Claudexor YAML config at ${path}: ${cause instanceof Error ? cause.message : String(cause)}`);
14
+ this.path = path;
15
+ this.name = "ConfigParseError";
16
+ }
17
+ }
18
+ /** Short stable hash of a repo root path, used to key user-local trust files. */
19
+ export function repoHash(repoRoot) {
20
+ return sha256(repoRoot).replace(/^sha256:/, "").slice(0, 16);
21
+ }
22
+ function readYaml(path) {
23
+ const text = readTextSafe(path);
24
+ if (text === null)
25
+ return null;
26
+ try {
27
+ return yamlParse(text);
28
+ }
29
+ catch (err) {
30
+ throw new ConfigParseError(path, err);
31
+ }
32
+ }
33
+ /**
34
+ * Resolve effective config by precedence. Sensitive settings live ONLY in the
35
+ * global config and the user-local trust file — never in versioned repo config
36
+ * (the ProjectConfig schema structurally excludes them).
37
+ */
38
+ /**
39
+ * Keys that OLDER Claudexor versions legitimately wrote and current schemas
40
+ * retired. These are migration debt, not typos: they are stripped before the
41
+ * strict parse (and disappear from the file on the next config write), while
42
+ * any key NOT in this registry still fails loudly. Each entry is a path
43
+ * matcher over segments ("*" matches one segment).
44
+ */
45
+ const RETIRED_CONFIG_KEYS = [
46
+ { path: ["secrets"], retired: "secret refs moved to the SecretStore (Keychain / 0600 store)" },
47
+ { path: ["budget", "max_usd_per_day"], retired: "per-day caps were removed; quota respect + per-run caps remain" },
48
+ { path: ["routing", "default_model"], retired: "model choice is harness-scoped (INV-103); use harnesses.<id>.default_model" },
49
+ { path: ["harnesses", "*", "auth_ref"], retired: "auth routes come from doctor + auth_preference; refs live in the SecretStore" },
50
+ { path: ["harnesses", "*", "native_options"], retired: "never consumed by any adapter (v0.15 triage); per-harness knobs are typed fields" },
51
+ ];
52
+ /** Keys older `claudexor init` scaffolds wrote into PROJECT config and current
53
+ * schemas retired. Same migration-debt registry semantics as the global list. */
54
+ const RETIRED_PROJECT_CONFIG_KEYS = [
55
+ { path: ["project"], retired: "language_stack was never consumed" },
56
+ { path: ["delivery"], retired: "delivery knobs were never consumed from project config" },
57
+ { path: ["review"], retired: "review attempts/strictness moved to engine policy" },
58
+ { path: ["context", "agents_md_first"], retired: "context assembly always reads agent docs first" },
59
+ { path: ["context", "never_silent_truncate"], retired: "no-silent-truncation is a Bible invariant, not a knob" },
60
+ ];
61
+ /**
62
+ * Retired VALUES (not keys) older configs may pin. Same migration-debt
63
+ * discipline as RETIRED_CONFIG_KEYS: rewritten before the strict parse, gone
64
+ * from the file on the next config write. `routing.default_policy: portfolio`
65
+ * was deleted as a fake knob (it behaved identically to `auto`).
66
+ */
67
+ function migrateRetiredValues(raw) {
68
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw))
69
+ return raw;
70
+ const routing = raw["routing"];
71
+ if (routing && typeof routing === "object" && !Array.isArray(routing)) {
72
+ const r = routing;
73
+ if (r["default_policy"] === "portfolio") {
74
+ r["default_policy"] = "auto";
75
+ // Disclose the rewrite: a user who pinned the retired value must not
76
+ // find their setting silently changed.
77
+ process.stderr.write("claudexor: routing.default_policy 'portfolio' was retired (it behaved identically to 'auto'); using 'auto'\n");
78
+ }
79
+ }
80
+ return raw;
81
+ }
82
+ function stripRetiredKeys(raw, matchers) {
83
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw))
84
+ return raw;
85
+ const strip = (node, segs) => {
86
+ for (const [key, value] of Object.entries(node)) {
87
+ const here = segs.filter((s) => s[0] === key || s[0] === "*");
88
+ if (here.some((s) => s.length === 1)) {
89
+ delete node[key];
90
+ continue;
91
+ }
92
+ const deeper = here.filter((s) => s.length > 1).map((s) => s.slice(1));
93
+ if (deeper.length > 0 && typeof value === "object" && value !== null && !Array.isArray(value)) {
94
+ strip(value, deeper);
95
+ }
96
+ }
97
+ };
98
+ const clone = structuredClone(raw);
99
+ strip(clone, matchers.map((m) => m.path));
100
+ return clone;
101
+ }
102
+ /**
103
+ * Parse a raw config document against its STRICT schema. Unknown keys are a
104
+ * ConfigParseError NAMING the keys (a typo'd knob must fail loudly, never be
105
+ * silently stripped into a no-op — the same bug class as staged fields).
106
+ */
107
+ function parseStrict(schema, raw, path) {
108
+ try {
109
+ return schema.parse(raw);
110
+ }
111
+ catch (err) {
112
+ if (err instanceof z.ZodError) {
113
+ const details = err.issues
114
+ .map((issue) => {
115
+ const at = issue.path.length > 0 ? ` at ${issue.path.join(".")}` : "";
116
+ if (issue.code === "unrecognized_keys") {
117
+ return `unknown key(s)${at}: ${issue.keys.join(", ")}`;
118
+ }
119
+ return `${issue.message}${at}`;
120
+ })
121
+ .join("; ");
122
+ throw new ConfigParseError(path, details);
123
+ }
124
+ throw new ConfigParseError(path, err);
125
+ }
126
+ }
127
+ export function loadConfig(repoRoot) {
128
+ const sources = [];
129
+ const globalPath = join(globalConfigDir(), "config.yaml");
130
+ const globalRaw = migrateRetiredValues(stripRetiredKeys(readYaml(globalPath), RETIRED_CONFIG_KEYS));
131
+ if (globalRaw !== null)
132
+ sources.push(globalPath);
133
+ const global = applyEnvOverrides(parseStrict(GlobalConfig, globalRaw ?? {}, globalPath));
134
+ const projectPath = join(repoRoot, ".claudexor", "config.yaml");
135
+ const projectRaw = stripRetiredKeys(readYaml(projectPath), RETIRED_PROJECT_CONFIG_KEYS);
136
+ if (projectRaw !== null)
137
+ sources.push(projectPath);
138
+ const project = parseStrict(ProjectConfig, projectRaw ?? {}, projectPath);
139
+ const trustPath = join(globalConfigDir(), "trust", `${repoHash(repoRoot)}.yaml`);
140
+ const trustRaw = readYaml(trustPath);
141
+ if (trustRaw !== null)
142
+ sources.push(trustPath);
143
+ const trust = parseStrict(TrustConfig, trustRaw ?? {}, trustPath);
144
+ return ResolvedConfigSchema.parse({ project, trust, global, sources });
145
+ }
146
+ function positiveIntEnv(name) {
147
+ const raw = process.env[name];
148
+ if (!raw)
149
+ return null;
150
+ const parsed = Number(raw);
151
+ if (!Number.isInteger(parsed) || parsed <= 0) {
152
+ throw new ConfigParseError(`env:${name}`, `expected a positive integer, got ${raw}`);
153
+ }
154
+ return parsed;
155
+ }
156
+ function nonnegativeIntEnv(name) {
157
+ const raw = process.env[name];
158
+ if (!raw)
159
+ return null;
160
+ const parsed = Number(raw);
161
+ if (!Number.isInteger(parsed) || parsed < 0) {
162
+ throw new ConfigParseError(`env:${name}`, `expected a nonnegative integer, got ${raw}`);
163
+ }
164
+ return parsed;
165
+ }
166
+ function applyEnvOverrides(global) {
167
+ const reviewerTimeout = positiveIntEnv("CLAUDEXOR_REVIEWER_TIMEOUT_MS");
168
+ const inactivityTimeout = positiveIntEnv("CLAUDEXOR_HARNESS_INACTIVITY_TIMEOUT_MS");
169
+ const maxRetries = nonnegativeIntEnv("CLAUDEXOR_TRANSIENT_RETRY_MAX");
170
+ const initialDelay = nonnegativeIntEnv("CLAUDEXOR_TRANSIENT_RETRY_INITIAL_DELAY_MS");
171
+ const maxDelay = nonnegativeIntEnv("CLAUDEXOR_TRANSIENT_RETRY_MAX_DELAY_MS");
172
+ if (reviewerTimeout === null &&
173
+ inactivityTimeout === null &&
174
+ maxRetries === null &&
175
+ initialDelay === null &&
176
+ maxDelay === null)
177
+ return global;
178
+ return GlobalConfig.parse({
179
+ ...global,
180
+ runtime: {
181
+ ...global.runtime,
182
+ ...(reviewerTimeout !== null ? { reviewer_timeout_ms: reviewerTimeout } : {}),
183
+ ...(inactivityTimeout !== null ? { harness_inactivity_timeout_ms: inactivityTimeout } : {}),
184
+ transient_retry: {
185
+ ...global.runtime.transient_retry,
186
+ ...(maxRetries !== null ? { max_retries: maxRetries } : {}),
187
+ ...(initialDelay !== null ? { initial_delay_ms: initialDelay } : {}),
188
+ ...(maxDelay !== null ? { max_delay_ms: maxDelay } : {}),
189
+ },
190
+ },
191
+ });
192
+ }
193
+ export function globalConfigPath() {
194
+ return join(globalConfigDir(), "config.yaml");
195
+ }
196
+ /** Resolved user-local trust file path for one repo (keyed by repo-root hash). */
197
+ export function trustConfigPath(repoRoot) {
198
+ return join(globalConfigDir(), "trust", `${repoHash(repoRoot)}.yaml`);
199
+ }
200
+ /**
201
+ * Write the user-local trust file for a repo (used by `claudexor trust`).
202
+ * Values are validated against the STRICT TrustConfig schema; the write is
203
+ * atomic (tmp+rename) like updateGlobalConfig.
204
+ */
205
+ export function updateTrustConfig(repoRoot, mutator) {
206
+ // Guard at the HASH site: a relative root would silently key a different
207
+ // file per cwd (and stamp wrong provenance). Callers surface their own
208
+ // status codes; this is the single-owner backstop.
209
+ if (!isAbsolute(repoRoot)) {
210
+ throw new Error(`trust config requires an absolute repo root (got ${repoRoot})`);
211
+ }
212
+ const path = trustConfigPath(repoRoot);
213
+ ensureDir(join(globalConfigDir(), "trust"));
214
+ // Locked read-mutate-write: the app's POST /trust and CLI `claudexor trust`
215
+ // are two live writers of the same file — same discipline as global config.
216
+ return withConfigLock(path, () => {
217
+ const current = parseStrict(TrustConfig, readYaml(path) ?? {}, path);
218
+ // Stamp provenance on every write: the filename is a one-way hash, so the
219
+ // repo root recorded INSIDE the file is what makes trust state enumerable
220
+ // (Settings trust list). Never trusted for gating — loadConfig keys by hash.
221
+ const next = TrustConfig.parse({ ...mutator(current), repo_root: repoRoot });
222
+ const tmp = `${path}.tmp-${process.pid}-${Date.now()}`;
223
+ writeText(tmp, yamlStringify(next));
224
+ renameSync(tmp, path);
225
+ return { path, config: next };
226
+ });
227
+ }
228
+ /**
229
+ * Enumerate every user-local trust file (Settings trust list). Unreadable or
230
+ * schema-invalid entries are skipped: listing is a projection, and one stale
231
+ * hand-edited file must not take down the whole settings surface — the strict
232
+ * parse still fails loudly on the load path that actually GATES access.
233
+ */
234
+ export function listTrustConfigs() {
235
+ const dir = join(globalConfigDir(), "trust");
236
+ let names = [];
237
+ try {
238
+ names = readdirSync(dir).filter((n) => n.endsWith(".yaml"));
239
+ }
240
+ catch {
241
+ return [];
242
+ }
243
+ const out = [];
244
+ for (const name of names.sort()) {
245
+ const path = join(dir, name);
246
+ try {
247
+ out.push({ path, config: parseStrict(TrustConfig, readYaml(path) ?? {}, path) });
248
+ }
249
+ catch (err) {
250
+ // Skip-but-disclose: the projection must survive one stale file, but an
251
+ // operator debugging "why is my grant not listed" needs the breadcrumb.
252
+ process.stderr.write(`claudexor: skipping unparseable trust file ${path}: ${err instanceof Error ? err.message : String(err)}\n`);
253
+ }
254
+ }
255
+ return out;
256
+ }
257
+ /**
258
+ * Two-writer safety: run `fn` while holding an advisory lock file
259
+ * (O_EXCL create; stale after 10s). ONE owner of the locking discipline —
260
+ * every read-mutate-write config cycle (global config, per-repo trust files)
261
+ * must go through here so concurrent daemon and CLI writers can never
262
+ * interleave into torn YAML or lose one writer's fields.
263
+ */
264
+ function withConfigLock(path, fn) {
265
+ const lockPath = `${path}.lock`;
266
+ const LOCK_STALE_MS = 10_000;
267
+ const deadline = Date.now() + LOCK_STALE_MS;
268
+ for (;;) {
269
+ try {
270
+ writeFileSync(lockPath, String(process.pid), { flag: "wx", mode: 0o600 });
271
+ break;
272
+ }
273
+ catch (err) {
274
+ if (err.code !== "EEXIST")
275
+ throw err;
276
+ let heldSince = 0;
277
+ try {
278
+ heldSince = statSync(lockPath).mtimeMs;
279
+ }
280
+ catch {
281
+ continue; // holder just released; retry immediately
282
+ }
283
+ if (Date.now() - heldSince > LOCK_STALE_MS) {
284
+ // Stale lock from a crashed writer: break it loudly-in-band.
285
+ try {
286
+ unlinkSync(lockPath);
287
+ }
288
+ catch {
289
+ /* raced with another breaker */
290
+ }
291
+ continue;
292
+ }
293
+ if (Date.now() > deadline) {
294
+ throw new Error(`config lock at ${lockPath} is held by another writer; retry in a moment`);
295
+ }
296
+ // Sleep 25ms without spinning the event loop (Atomics.wait is the
297
+ // standard synchronous sleep; config writes are rare and brief).
298
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 25);
299
+ }
300
+ }
301
+ try {
302
+ return fn();
303
+ }
304
+ finally {
305
+ try {
306
+ unlinkSync(lockPath);
307
+ }
308
+ catch {
309
+ /* already broken as stale */
310
+ }
311
+ }
312
+ }
313
+ /**
314
+ * Update ~/.claudexor/config.yaml with validated global settings. Sensitive
315
+ * values are not accepted here. Locked + atomic (see withConfigLock).
316
+ */
317
+ export function updateGlobalConfig(mutator) {
318
+ const path = globalConfigPath();
319
+ ensureDir(globalConfigDir());
320
+ return withConfigLock(path, () => {
321
+ const current = parseStrict(GlobalConfig, migrateRetiredValues(stripRetiredKeys(readYaml(path), RETIRED_CONFIG_KEYS)) ?? {}, path);
322
+ const next = GlobalConfig.parse(mutator(current));
323
+ const tmp = `${path}.tmp-${process.pid}-${Date.now()}`;
324
+ writeText(tmp, yamlStringify(next));
325
+ renameSync(tmp, path);
326
+ return { path, config: next };
327
+ });
328
+ }
329
+ /** Scaffold a default versioned project config (used by `claudexor init`). */
330
+ export function initProjectConfig(repoRoot) {
331
+ const configPath = join(repoRoot, ".claudexor", "config.yaml");
332
+ if (pathExists(configPath)) {
333
+ return { configPath, created: false };
334
+ }
335
+ // Seed an EMPTY mandatory_files set: a fresh repo must never have `init` break
336
+ // its own read-only modes (plan/audit/explore fail-close on missing mandatory
337
+ // context). mandatory_files is opt-in via the commented example below.
338
+ const config = ProjectConfig.parse({});
339
+ const header = "# Claudexor project config (versioned). Safe settings only.\n" +
340
+ "# Sensitive settings (full access, secrets, budget-above-cap, plugin install,\n" +
341
+ "# MCP trust) live in ~/.claudexor/config.yaml or ~/.claudexor/trust/<hash>.yaml.\n" +
342
+ "#\n" +
343
+ "# Optional: require files as mandatory run context (fail-closed if missing,\n" +
344
+ "# enforced uniformly across every mode). Empty by default; uncomment to opt in:\n" +
345
+ '# context:\n' +
346
+ '# mandatory_files: ["README.md", "docs/ARCHITECTURE.md"]\n';
347
+ writeText(configPath, header + yamlStringify(config));
348
+ return { configPath, created: true };
349
+ }
350
+ //# s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EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,+EAA+E;IAC/E,8EAA8E;IAC9E,uEAAuE;IACvE,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,MAAM,GACV,+DAA+D;QAC/D,iFAAiF;QACjF,oFAAoF;QACpF,KAAK;QACL,+EAA+E;QAC/E,mFAAmF;QACnF,gBAAgB;QAChB,gEAAgE,CAAC;IACnE,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACvC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@claudexor/config",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "description": "Layered config loader (precedence + trust). Sensitive settings never from versioned repo config.",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "yaml": "^2.6.1",
20
+ "zod": "^3.24.1",
21
+ "@claudexor/schema": "1.0.0",
22
+ "@claudexor/util": "1.0.0"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/razzant/claudexor.git",
27
+ "directory": "packages/config"
28
+ },
29
+ "homepage": "https://github.com/razzant/claudexor#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/razzant/claudexor/issues"
32
+ },
33
+ "engines": {
34
+ "node": ">=20.19"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "typecheck": "tsc --noEmit"
42
+ }
43
+ }