@diego-vp20/ezc-config 0.1.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.
@@ -0,0 +1,4 @@
1
+ export * from './schema.js';
2
+ export * from './load.js';
3
+ export * from './json-schema.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './schema.js';
2
+ export * from './load.js';
3
+ export * from './json-schema.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Generate the JSON Schema for `ezc.json` (used for editor autocomplete and `ezc config schema`). */
2
+ export declare function configJsonSchema(): Record<string, unknown>;
3
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAGA,sGAAsG;AACtG,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK1D"}
@@ -0,0 +1,10 @@
1
+ import { zodToJsonSchema } from 'zod-to-json-schema';
2
+ import { ezcConfigSchema } from './schema.js';
3
+ /** Generate the JSON Schema for `ezc.json` (used for editor autocomplete and `ezc config schema`). */
4
+ export function configJsonSchema() {
5
+ return zodToJsonSchema(ezcConfigSchema, {
6
+ name: 'EzcConfig',
7
+ $refStrategy: 'none',
8
+ });
9
+ }
10
+ //# sourceMappingURL=json-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,sGAAsG;AACtG,MAAM,UAAU,gBAAgB;IAC9B,OAAO,eAAe,CAAC,eAAe,EAAE;QACtC,IAAI,EAAE,WAAW;QACjB,YAAY,EAAE,MAAM;KACrB,CAA4B,CAAC;AAChC,CAAC"}
package/dist/load.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { type EzcConfig } from './schema.js';
2
+ export interface LoadConfigOptions {
3
+ /** Directory to search upward from for a project `ezc.json`. Defaults to `process.cwd()`. */
4
+ cwd?: string;
5
+ /** Environment used for `EZC_*` overrides. Defaults to `process.env`. */
6
+ env?: NodeJS.ProcessEnv;
7
+ /** Override the user config path (mainly for tests). Defaults to `~/.ezc/config.json`. */
8
+ userConfigPath?: string;
9
+ }
10
+ export interface ConfigSources {
11
+ user?: string;
12
+ project?: string;
13
+ env: boolean;
14
+ }
15
+ export interface LoadedConfig {
16
+ config: EzcConfig;
17
+ sources: ConfigSources;
18
+ }
19
+ /** The fully-defaulted config (empty input run through the schema). */
20
+ export declare function defaultConfig(): EzcConfig;
21
+ /** Default user-level config path. */
22
+ export declare function defaultUserConfigPath(): string;
23
+ /** Walk up from `startDir` to find the nearest `ezc.json`, stopping at the repo root or fs root. */
24
+ export declare function findProjectConfig(startDir: string): string | undefined;
25
+ /**
26
+ * Load config by layering: user (`~/.ezc/config.json`) → project (`ezc.json`) → `EZC_*` env.
27
+ * Later layers win. Defaults come from the schema. Throws {@link ConfigError} on invalid input.
28
+ */
29
+ export declare function loadConfig(options?: LoadConfigOptions): LoadedConfig;
30
+ /** Return a copy of the config with secrets masked, safe for logging/printing. */
31
+ export declare function redactConfig(config: EzcConfig): EzcConfig;
32
+ //# sourceMappingURL=load.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvF,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,uEAAuE;AACvE,wBAAgB,aAAa,IAAI,SAAS,CAEzC;AAED,sCAAsC;AACtC,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUtE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,YAAY,CA4CxE;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAGzD"}
package/dist/load.js ADDED
@@ -0,0 +1,154 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { dirname, join, resolve } from 'node:path';
4
+ import { z } from 'zod';
5
+ import { ConfigError } from '@diego-vp20/ezc-shared';
6
+ import { DEFAULT_PROTECTED_PATHS, ezcConfigSchema } from './schema.js';
7
+ /** The fully-defaulted config (empty input run through the schema). */
8
+ export function defaultConfig() {
9
+ return ezcConfigSchema.parse({});
10
+ }
11
+ /** Default user-level config path. */
12
+ export function defaultUserConfigPath() {
13
+ return join(homedir(), '.ezc', 'config.json');
14
+ }
15
+ /** Walk up from `startDir` to find the nearest `ezc.json`, stopping at the repo root or fs root. */
16
+ export function findProjectConfig(startDir) {
17
+ let dir = resolve(startDir);
18
+ for (;;) {
19
+ const candidate = join(dir, 'ezc.json');
20
+ if (existsSync(candidate))
21
+ return candidate;
22
+ if (existsSync(join(dir, '.git')))
23
+ return undefined; // reached repo root without a config
24
+ const parent = dirname(dir);
25
+ if (parent === dir)
26
+ return undefined; // filesystem root
27
+ dir = parent;
28
+ }
29
+ }
30
+ /**
31
+ * Load config by layering: user (`~/.ezc/config.json`) → project (`ezc.json`) → `EZC_*` env.
32
+ * Later layers win. Defaults come from the schema. Throws {@link ConfigError} on invalid input.
33
+ */
34
+ export function loadConfig(options = {}) {
35
+ const cwd = options.cwd ?? process.cwd();
36
+ const env = options.env ?? process.env;
37
+ const userPath = options.userConfigPath ?? defaultUserConfigPath();
38
+ const projectPath = findProjectConfig(cwd);
39
+ const userRaw = readJsonObjectIfExists(userPath);
40
+ const projectRaw = projectPath ? readJsonObjectIfExists(projectPath) : undefined;
41
+ const envRaw = envOverrides(env);
42
+ let merged = {};
43
+ if (userRaw)
44
+ merged = deepMerge(merged, userRaw);
45
+ if (projectRaw)
46
+ merged = deepMerge(merged, projectRaw);
47
+ if (Object.keys(envRaw).length > 0)
48
+ merged = deepMerge(merged, envRaw);
49
+ let config;
50
+ try {
51
+ config = ezcConfigSchema.parse(merged);
52
+ }
53
+ catch (err) {
54
+ if (err instanceof z.ZodError) {
55
+ throw new ConfigError(formatZodError(err, projectPath ?? userPath), { cause: err });
56
+ }
57
+ throw err;
58
+ }
59
+ // Defaults are always protected; user entries extend them. Expand a leading `~`.
60
+ const protectedPaths = dedupe([...DEFAULT_PROTECTED_PATHS, ...config.protectedPaths]).map(expandHome);
61
+ // External directories (out-of-root grants) are also home-expanded for the sandbox and tools.
62
+ const externalDirectories = config.permission.externalDirectories.map(expandHome);
63
+ return {
64
+ config: {
65
+ ...config,
66
+ protectedPaths,
67
+ permission: { ...config.permission, externalDirectories },
68
+ },
69
+ sources: {
70
+ user: userRaw ? userPath : undefined,
71
+ project: projectRaw ? projectPath : undefined,
72
+ env: Object.keys(envRaw).length > 0,
73
+ },
74
+ };
75
+ }
76
+ /** Return a copy of the config with secrets masked, safe for logging/printing. */
77
+ export function redactConfig(config) {
78
+ if (config.model.apiKey === undefined)
79
+ return config;
80
+ return { ...config, model: { ...config.model, apiKey: '***redacted***' } };
81
+ }
82
+ // --- internals -------------------------------------------------------------
83
+ function isPlainObject(value) {
84
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
85
+ }
86
+ function deepMerge(base, override) {
87
+ const out = { ...base };
88
+ for (const [key, value] of Object.entries(override)) {
89
+ const existing = out[key];
90
+ out[key] = isPlainObject(existing) && isPlainObject(value) ? deepMerge(existing, value) : value;
91
+ }
92
+ return out;
93
+ }
94
+ function readJsonObjectIfExists(file) {
95
+ if (!existsSync(file))
96
+ return undefined;
97
+ let text;
98
+ try {
99
+ text = readFileSync(file, 'utf8');
100
+ }
101
+ catch (err) {
102
+ throw new ConfigError(`Could not read config file: ${file}`, { cause: err });
103
+ }
104
+ let parsed;
105
+ try {
106
+ parsed = JSON.parse(text);
107
+ }
108
+ catch (err) {
109
+ throw new ConfigError(`Invalid JSON in ${file}: ${err.message}`, { cause: err });
110
+ }
111
+ if (!isPlainObject(parsed)) {
112
+ throw new ConfigError(`Config file must contain a JSON object: ${file}`);
113
+ }
114
+ return parsed;
115
+ }
116
+ function envOverrides(env) {
117
+ const overrides = {};
118
+ const model = {};
119
+ if (env.EZC_MODEL_BASE_URL)
120
+ model.baseUrl = env.EZC_MODEL_BASE_URL;
121
+ if (env.EZC_MODEL)
122
+ model.model = env.EZC_MODEL;
123
+ if (env.EZC_MODEL_API_KEY)
124
+ model.apiKey = env.EZC_MODEL_API_KEY;
125
+ if (Object.keys(model).length > 0)
126
+ overrides.model = model;
127
+ const logging = {};
128
+ if (env.EZC_LOG_LEVEL)
129
+ logging.level = env.EZC_LOG_LEVEL;
130
+ if (env.EZC_LOG_FORMAT)
131
+ logging.format = env.EZC_LOG_FORMAT;
132
+ if (Object.keys(logging).length > 0)
133
+ overrides.logging = logging;
134
+ if (env.EZC_PERMISSION_MODE)
135
+ overrides.permission = { defaultMode: env.EZC_PERMISSION_MODE };
136
+ return overrides;
137
+ }
138
+ function formatZodError(err, file) {
139
+ const issues = err.issues
140
+ .map((issue) => ` - ${issue.path.join('.') || '(root)'}: ${issue.message}`)
141
+ .join('\n');
142
+ return `Invalid ezc configuration in ${file}:\n${issues}`;
143
+ }
144
+ function expandHome(p) {
145
+ if (p === '~')
146
+ return homedir();
147
+ if (p.startsWith('~/'))
148
+ return join(homedir(), p.slice(2));
149
+ return p;
150
+ }
151
+ function dedupe(values) {
152
+ return [...new Set(values)];
153
+ }
154
+ //# sourceMappingURL=load.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAkB,MAAM,aAAa,CAAC;AAsBvF,uEAAuE;AACvE,MAAM,UAAU,aAAa;IAC3B,OAAO,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;AAChD,CAAC;AAED,o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E,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAEjE,IAAI,GAAG,CAAC,mBAAmB;QAAE,SAAS,CAAC,UAAU,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,mBAAmB,EAAE,CAAC;IAE7F,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CAAC,GAAe,EAAE,IAAY;IACnD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM;SACtB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;SAC3E,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,gCAAgC,IAAI,MAAM,MAAM,EAAE,CAAC;AAC5D,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,OAAO,EAAE,CAAC;IAChC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC9B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,763 @@
1
+ import { z } from 'zod';
2
+ export declare const permissionDecisionSchema: z.ZodEnum<["allow", "ask", "deny"]>;
3
+ export type PermissionDecision = z.infer<typeof permissionDecisionSchema>;
4
+ export declare const permissionModeSchema: z.ZodEnum<["default", "acceptEdits", "plan", "auto", "dontAsk", "bypass"]>;
5
+ export type PermissionMode = z.infer<typeof permissionModeSchema>;
6
+ /** A per-tool rule: either a blanket decision, or a map of command/path pattern -> decision. */
7
+ export declare const toolRuleSchema: z.ZodUnion<[z.ZodEnum<["allow", "ask", "deny"]>, z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "ask", "deny"]>>]>;
8
+ export type ToolRule = z.infer<typeof toolRuleSchema>;
9
+ export declare const modelConfigSchema: z.ZodObject<{
10
+ baseUrl: z.ZodDefault<z.ZodString>;
11
+ model: z.ZodDefault<z.ZodString>;
12
+ apiKey: z.ZodOptional<z.ZodString>;
13
+ tokenizer: z.ZodOptional<z.ZodString>;
14
+ contextWindow: z.ZodOptional<z.ZodNumber>;
15
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
16
+ temperature: z.ZodDefault<z.ZodNumber>;
17
+ requestTimeoutMs: z.ZodDefault<z.ZodNumber>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ baseUrl: string;
20
+ model: string;
21
+ temperature: number;
22
+ requestTimeoutMs: number;
23
+ apiKey?: string | undefined;
24
+ tokenizer?: string | undefined;
25
+ contextWindow?: number | undefined;
26
+ maxOutputTokens?: number | undefined;
27
+ }, {
28
+ baseUrl?: string | undefined;
29
+ model?: string | undefined;
30
+ apiKey?: string | undefined;
31
+ tokenizer?: string | undefined;
32
+ contextWindow?: number | undefined;
33
+ maxOutputTokens?: number | undefined;
34
+ temperature?: number | undefined;
35
+ requestTimeoutMs?: number | undefined;
36
+ }>;
37
+ export type ModelConfig = z.infer<typeof modelConfigSchema>;
38
+ export declare const permissionConfigSchema: z.ZodObject<{
39
+ defaultMode: z.ZodDefault<z.ZodEnum<["default", "acceptEdits", "plan", "auto", "dontAsk", "bypass"]>>;
40
+ rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["allow", "ask", "deny"]>, z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "ask", "deny"]>>]>>>;
41
+ /** Tools removed from the model's view entirely (pre-filter; docs §4.1). */
42
+ disabledTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
43
+ /** Run the heuristic safety classifier in `auto` mode (docs §4.4). User-disable in trusted envs. */
44
+ classifier: z.ZodDefault<z.ZodBoolean>;
45
+ /** Directories outside the project root the agent may access (`external_directory`; docs §3). */
46
+ externalDirectories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
47
+ }, "strict", z.ZodTypeAny, {
48
+ defaultMode: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass";
49
+ rules: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>;
50
+ disabledTools: string[];
51
+ classifier: boolean;
52
+ externalDirectories: string[];
53
+ }, {
54
+ defaultMode?: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass" | undefined;
55
+ rules?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
56
+ disabledTools?: string[] | undefined;
57
+ classifier?: boolean | undefined;
58
+ externalDirectories?: string[] | undefined;
59
+ }>;
60
+ export type PermissionConfig = z.infer<typeof permissionConfigSchema>;
61
+ export declare const commandsConfigSchema: z.ZodObject<{
62
+ test: z.ZodOptional<z.ZodString>;
63
+ build: z.ZodOptional<z.ZodString>;
64
+ lint: z.ZodOptional<z.ZodString>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ test?: string | undefined;
67
+ build?: string | undefined;
68
+ lint?: string | undefined;
69
+ }, {
70
+ test?: string | undefined;
71
+ build?: string | undefined;
72
+ lint?: string | undefined;
73
+ }>;
74
+ export declare const webConfigSchema: z.ZodObject<{
75
+ searxngUrl: z.ZodOptional<z.ZodString>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ searxngUrl?: string | undefined;
78
+ }, {
79
+ searxngUrl?: string | undefined;
80
+ }>;
81
+ export declare const compactionConfigSchema: z.ZodEffects<z.ZodObject<{
82
+ enabled: z.ZodDefault<z.ZodBoolean>;
83
+ /** Fraction of budget at which the status bar warns (TASK-14 `pressure`). */
84
+ warnThreshold: z.ZodDefault<z.ZodNumber>;
85
+ /** Fraction of budget that triggers the compaction pipeline before overflow (TASK-15). */
86
+ criticalThreshold: z.ZodDefault<z.ZodNumber>;
87
+ }, "strict", z.ZodTypeAny, {
88
+ enabled: boolean;
89
+ warnThreshold: number;
90
+ criticalThreshold: number;
91
+ }, {
92
+ enabled?: boolean | undefined;
93
+ warnThreshold?: number | undefined;
94
+ criticalThreshold?: number | undefined;
95
+ }>, {
96
+ enabled: boolean;
97
+ warnThreshold: number;
98
+ criticalThreshold: number;
99
+ }, {
100
+ enabled?: boolean | undefined;
101
+ warnThreshold?: number | undefined;
102
+ criticalThreshold?: number | undefined;
103
+ }>;
104
+ export type CompactionConfig = z.infer<typeof compactionConfigSchema>;
105
+ /** Persistent memory: project `EZC.md` (curated) + append-only auto-memory (learned hints). */
106
+ export declare const memoryConfigSchema: z.ZodObject<{
107
+ enabled: z.ZodDefault<z.ZodBoolean>;
108
+ /** Token cap on auto-memory loaded into context each session (docs §5: first N lines). */
109
+ maxTokens: z.ZodDefault<z.ZodNumber>;
110
+ /** Warn when `EZC.md` exceeds this many tokens — every line costs tokens every turn (docs §6). */
111
+ ezcMdWarnTokens: z.ZodDefault<z.ZodNumber>;
112
+ }, "strict", z.ZodTypeAny, {
113
+ enabled: boolean;
114
+ maxTokens: number;
115
+ ezcMdWarnTokens: number;
116
+ }, {
117
+ enabled?: boolean | undefined;
118
+ maxTokens?: number | undefined;
119
+ ezcMdWarnTokens?: number | undefined;
120
+ }>;
121
+ export type MemoryConfig = z.infer<typeof memoryConfigSchema>;
122
+ export declare const contextConfigSchema: z.ZodObject<{
123
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
124
+ /** Tokens held back from the budget for the model's reply when sizing the prompt (TASK-14). */
125
+ reserveOutputTokens: z.ZodDefault<z.ZodNumber>;
126
+ compaction: z.ZodDefault<z.ZodEffects<z.ZodObject<{
127
+ enabled: z.ZodDefault<z.ZodBoolean>;
128
+ /** Fraction of budget at which the status bar warns (TASK-14 `pressure`). */
129
+ warnThreshold: z.ZodDefault<z.ZodNumber>;
130
+ /** Fraction of budget that triggers the compaction pipeline before overflow (TASK-15). */
131
+ criticalThreshold: z.ZodDefault<z.ZodNumber>;
132
+ }, "strict", z.ZodTypeAny, {
133
+ enabled: boolean;
134
+ warnThreshold: number;
135
+ criticalThreshold: number;
136
+ }, {
137
+ enabled?: boolean | undefined;
138
+ warnThreshold?: number | undefined;
139
+ criticalThreshold?: number | undefined;
140
+ }>, {
141
+ enabled: boolean;
142
+ warnThreshold: number;
143
+ criticalThreshold: number;
144
+ }, {
145
+ enabled?: boolean | undefined;
146
+ warnThreshold?: number | undefined;
147
+ criticalThreshold?: number | undefined;
148
+ }>>;
149
+ memory: z.ZodDefault<z.ZodObject<{
150
+ enabled: z.ZodDefault<z.ZodBoolean>;
151
+ /** Token cap on auto-memory loaded into context each session (docs §5: first N lines). */
152
+ maxTokens: z.ZodDefault<z.ZodNumber>;
153
+ /** Warn when `EZC.md` exceeds this many tokens — every line costs tokens every turn (docs §6). */
154
+ ezcMdWarnTokens: z.ZodDefault<z.ZodNumber>;
155
+ }, "strict", z.ZodTypeAny, {
156
+ enabled: boolean;
157
+ maxTokens: number;
158
+ ezcMdWarnTokens: number;
159
+ }, {
160
+ enabled?: boolean | undefined;
161
+ maxTokens?: number | undefined;
162
+ ezcMdWarnTokens?: number | undefined;
163
+ }>>;
164
+ }, "strict", z.ZodTypeAny, {
165
+ reserveOutputTokens: number;
166
+ compaction: {
167
+ enabled: boolean;
168
+ warnThreshold: number;
169
+ criticalThreshold: number;
170
+ };
171
+ memory: {
172
+ enabled: boolean;
173
+ maxTokens: number;
174
+ ezcMdWarnTokens: number;
175
+ };
176
+ budgetTokens?: number | undefined;
177
+ }, {
178
+ budgetTokens?: number | undefined;
179
+ reserveOutputTokens?: number | undefined;
180
+ compaction?: {
181
+ enabled?: boolean | undefined;
182
+ warnThreshold?: number | undefined;
183
+ criticalThreshold?: number | undefined;
184
+ } | undefined;
185
+ memory?: {
186
+ enabled?: boolean | undefined;
187
+ maxTokens?: number | undefined;
188
+ ezcMdWarnTokens?: number | undefined;
189
+ } | undefined;
190
+ }>;
191
+ export declare const sandboxConfigSchema: z.ZodObject<{
192
+ enabled: z.ZodDefault<z.ZodBoolean>;
193
+ mode: z.ZodDefault<z.ZodEnum<["auto", "off"]>>;
194
+ /** Allow outbound network for sandboxed shells. Off by default (docs §4.5). */
195
+ network: z.ZodDefault<z.ZodBoolean>;
196
+ /** What to do when no sandbox backend is available (D-10): warn and run, or refuse. */
197
+ fallback: z.ZodDefault<z.ZodEnum<["warn", "refuse"]>>;
198
+ }, "strict", z.ZodTypeAny, {
199
+ enabled: boolean;
200
+ mode: "auto" | "off";
201
+ network: boolean;
202
+ fallback: "warn" | "refuse";
203
+ }, {
204
+ enabled?: boolean | undefined;
205
+ mode?: "auto" | "off" | undefined;
206
+ network?: boolean | undefined;
207
+ fallback?: "warn" | "refuse" | undefined;
208
+ }>;
209
+ export type SandboxConfig = z.infer<typeof sandboxConfigSchema>;
210
+ /** Lifecycle events a hook can subscribe to (TASK-13). */
211
+ export declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "UserPromptSubmit", "SessionStart", "SessionEnd", "Resume", "Stop", "Commit", "Compaction"];
212
+ export declare const hookEventSchema: z.ZodEnum<["PreToolUse", "PostToolUse", "UserPromptSubmit", "SessionStart", "SessionEnd", "Resume", "Stop", "Commit", "Compaction"]>;
213
+ export type HookEvent = z.infer<typeof hookEventSchema>;
214
+ /** A single command hook: a script run with the event payload on stdin (docs §2.3). */
215
+ export declare const hookCommandSchema: z.ZodObject<{
216
+ type: z.ZodDefault<z.ZodLiteral<"command">>;
217
+ command: z.ZodString;
218
+ /** Kill the hook after this many seconds. Default 60. */
219
+ timeout: z.ZodOptional<z.ZodNumber>;
220
+ }, "strict", z.ZodTypeAny, {
221
+ type: "command";
222
+ command: string;
223
+ timeout?: number | undefined;
224
+ }, {
225
+ command: string;
226
+ type?: "command" | undefined;
227
+ timeout?: number | undefined;
228
+ }>;
229
+ export type HookCommand = z.infer<typeof hookCommandSchema>;
230
+ /** A matcher group: hooks that fire when `matcher` matches the tool (e.g. `"Write|Edit"`). */
231
+ export declare const hookMatcherSchema: z.ZodObject<{
232
+ matcher: z.ZodOptional<z.ZodString>;
233
+ hooks: z.ZodArray<z.ZodObject<{
234
+ type: z.ZodDefault<z.ZodLiteral<"command">>;
235
+ command: z.ZodString;
236
+ /** Kill the hook after this many seconds. Default 60. */
237
+ timeout: z.ZodOptional<z.ZodNumber>;
238
+ }, "strict", z.ZodTypeAny, {
239
+ type: "command";
240
+ command: string;
241
+ timeout?: number | undefined;
242
+ }, {
243
+ command: string;
244
+ type?: "command" | undefined;
245
+ timeout?: number | undefined;
246
+ }>, "many">;
247
+ }, "strict", z.ZodTypeAny, {
248
+ hooks: {
249
+ type: "command";
250
+ command: string;
251
+ timeout?: number | undefined;
252
+ }[];
253
+ matcher?: string | undefined;
254
+ }, {
255
+ hooks: {
256
+ command: string;
257
+ type?: "command" | undefined;
258
+ timeout?: number | undefined;
259
+ }[];
260
+ matcher?: string | undefined;
261
+ }>;
262
+ export type HookMatcher = z.infer<typeof hookMatcherSchema>;
263
+ /** `event → [matcher groups]`. Keyed by event name; unknown events are ignored by the loader. */
264
+ export declare const hooksConfigSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
265
+ matcher: z.ZodOptional<z.ZodString>;
266
+ hooks: z.ZodArray<z.ZodObject<{
267
+ type: z.ZodDefault<z.ZodLiteral<"command">>;
268
+ command: z.ZodString;
269
+ /** Kill the hook after this many seconds. Default 60. */
270
+ timeout: z.ZodOptional<z.ZodNumber>;
271
+ }, "strict", z.ZodTypeAny, {
272
+ type: "command";
273
+ command: string;
274
+ timeout?: number | undefined;
275
+ }, {
276
+ command: string;
277
+ type?: "command" | undefined;
278
+ timeout?: number | undefined;
279
+ }>, "many">;
280
+ }, "strict", z.ZodTypeAny, {
281
+ hooks: {
282
+ type: "command";
283
+ command: string;
284
+ timeout?: number | undefined;
285
+ }[];
286
+ matcher?: string | undefined;
287
+ }, {
288
+ hooks: {
289
+ command: string;
290
+ type?: "command" | undefined;
291
+ timeout?: number | undefined;
292
+ }[];
293
+ matcher?: string | undefined;
294
+ }>, "many">>>;
295
+ export type HooksConfig = z.infer<typeof hooksConfigSchema>;
296
+ /** Session transcript persistence (TASK-17): append-only JSONL under `~/.ezc/projects/`. */
297
+ export declare const sessionsConfigSchema: z.ZodObject<{
298
+ enabled: z.ZodDefault<z.ZodBoolean>;
299
+ /** Override the storage root. Defaults to `~/.ezc/projects`. */
300
+ dir: z.ZodOptional<z.ZodString>;
301
+ }, "strict", z.ZodTypeAny, {
302
+ enabled: boolean;
303
+ dir?: string | undefined;
304
+ }, {
305
+ enabled?: boolean | undefined;
306
+ dir?: string | undefined;
307
+ }>;
308
+ export type SessionsConfig = z.infer<typeof sessionsConfigSchema>;
309
+ /** Subagents / sidechains (TASK-18): delegated work in its own context window. */
310
+ export declare const subagentsConfigSchema: z.ZodObject<{
311
+ /** Max nesting depth; the Agent tool is withheld at the cap so recursion is bounded. */
312
+ maxDepth: z.ZodDefault<z.ZodNumber>;
313
+ /** Default model↔tool iteration cap for a subagent turn. */
314
+ maxIterations: z.ZodDefault<z.ZodNumber>;
315
+ /** Default token budget for a subagent's own context window (its firewall). */
316
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
317
+ }, "strict", z.ZodTypeAny, {
318
+ maxDepth: number;
319
+ maxIterations: number;
320
+ budgetTokens?: number | undefined;
321
+ }, {
322
+ budgetTokens?: number | undefined;
323
+ maxDepth?: number | undefined;
324
+ maxIterations?: number | undefined;
325
+ }>;
326
+ export type SubagentsConfig = z.infer<typeof subagentsConfigSchema>;
327
+ export declare const loggingConfigSchema: z.ZodObject<{
328
+ level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
329
+ format: z.ZodDefault<z.ZodEnum<["pretty", "json"]>>;
330
+ }, "strict", z.ZodTypeAny, {
331
+ level: "warn" | "debug" | "info" | "error";
332
+ format: "pretty" | "json";
333
+ }, {
334
+ level?: "warn" | "debug" | "info" | "error" | undefined;
335
+ format?: "pretty" | "json" | undefined;
336
+ }>;
337
+ /** TUI appearance, keybindings and accessibility (TASK-21). */
338
+ export declare const uiConfigSchema: z.ZodObject<{
339
+ /** Colour theme. `high-contrast` maximises legibility; pairs colour with icons either way. */
340
+ theme: z.ZodDefault<z.ZodEnum<["dark", "light", "high-contrast"]>>;
341
+ /**
342
+ * Force screen-reader mode (linearised output, no spinners). When unset, Ink auto-detects via
343
+ * the `INK_SCREEN_READER` environment variable (D-03).
344
+ */
345
+ screenReader: z.ZodOptional<z.ZodBoolean>;
346
+ /**
347
+ * Keybinding overrides: `action -> key`, merged over the defaults (docs §5). Keys are written
348
+ * like `ctrl+r`, `shift+tab`, `escape`. Unknown actions are ignored by the loader.
349
+ */
350
+ keybindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
351
+ }, "strict", z.ZodTypeAny, {
352
+ theme: "dark" | "light" | "high-contrast";
353
+ keybindings: Record<string, string>;
354
+ screenReader?: boolean | undefined;
355
+ }, {
356
+ theme?: "dark" | "light" | "high-contrast" | undefined;
357
+ screenReader?: boolean | undefined;
358
+ keybindings?: Record<string, string> | undefined;
359
+ }>;
360
+ export type UiConfig = z.infer<typeof uiConfigSchema>;
361
+ /** Always-protected paths. User `protectedPaths` are unioned with these; defaults are never dropped. */
362
+ export declare const DEFAULT_PROTECTED_PATHS: readonly string[];
363
+ export declare const ezcConfigSchema: z.ZodObject<{
364
+ $schema: z.ZodOptional<z.ZodString>;
365
+ model: z.ZodDefault<z.ZodObject<{
366
+ baseUrl: z.ZodDefault<z.ZodString>;
367
+ model: z.ZodDefault<z.ZodString>;
368
+ apiKey: z.ZodOptional<z.ZodString>;
369
+ tokenizer: z.ZodOptional<z.ZodString>;
370
+ contextWindow: z.ZodOptional<z.ZodNumber>;
371
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
372
+ temperature: z.ZodDefault<z.ZodNumber>;
373
+ requestTimeoutMs: z.ZodDefault<z.ZodNumber>;
374
+ }, "strict", z.ZodTypeAny, {
375
+ baseUrl: string;
376
+ model: string;
377
+ temperature: number;
378
+ requestTimeoutMs: number;
379
+ apiKey?: string | undefined;
380
+ tokenizer?: string | undefined;
381
+ contextWindow?: number | undefined;
382
+ maxOutputTokens?: number | undefined;
383
+ }, {
384
+ baseUrl?: string | undefined;
385
+ model?: string | undefined;
386
+ apiKey?: string | undefined;
387
+ tokenizer?: string | undefined;
388
+ contextWindow?: number | undefined;
389
+ maxOutputTokens?: number | undefined;
390
+ temperature?: number | undefined;
391
+ requestTimeoutMs?: number | undefined;
392
+ }>>;
393
+ permission: z.ZodDefault<z.ZodObject<{
394
+ defaultMode: z.ZodDefault<z.ZodEnum<["default", "acceptEdits", "plan", "auto", "dontAsk", "bypass"]>>;
395
+ rules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["allow", "ask", "deny"]>, z.ZodRecord<z.ZodString, z.ZodEnum<["allow", "ask", "deny"]>>]>>>;
396
+ /** Tools removed from the model's view entirely (pre-filter; docs §4.1). */
397
+ disabledTools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
398
+ /** Run the heuristic safety classifier in `auto` mode (docs §4.4). User-disable in trusted envs. */
399
+ classifier: z.ZodDefault<z.ZodBoolean>;
400
+ /** Directories outside the project root the agent may access (`external_directory`; docs §3). */
401
+ externalDirectories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
402
+ }, "strict", z.ZodTypeAny, {
403
+ defaultMode: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass";
404
+ rules: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>;
405
+ disabledTools: string[];
406
+ classifier: boolean;
407
+ externalDirectories: string[];
408
+ }, {
409
+ defaultMode?: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass" | undefined;
410
+ rules?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
411
+ disabledTools?: string[] | undefined;
412
+ classifier?: boolean | undefined;
413
+ externalDirectories?: string[] | undefined;
414
+ }>>;
415
+ protectedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
416
+ commands: z.ZodDefault<z.ZodObject<{
417
+ test: z.ZodOptional<z.ZodString>;
418
+ build: z.ZodOptional<z.ZodString>;
419
+ lint: z.ZodOptional<z.ZodString>;
420
+ }, "strict", z.ZodTypeAny, {
421
+ test?: string | undefined;
422
+ build?: string | undefined;
423
+ lint?: string | undefined;
424
+ }, {
425
+ test?: string | undefined;
426
+ build?: string | undefined;
427
+ lint?: string | undefined;
428
+ }>>;
429
+ web: z.ZodDefault<z.ZodObject<{
430
+ searxngUrl: z.ZodOptional<z.ZodString>;
431
+ }, "strict", z.ZodTypeAny, {
432
+ searxngUrl?: string | undefined;
433
+ }, {
434
+ searxngUrl?: string | undefined;
435
+ }>>;
436
+ context: z.ZodDefault<z.ZodObject<{
437
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
438
+ /** Tokens held back from the budget for the model's reply when sizing the prompt (TASK-14). */
439
+ reserveOutputTokens: z.ZodDefault<z.ZodNumber>;
440
+ compaction: z.ZodDefault<z.ZodEffects<z.ZodObject<{
441
+ enabled: z.ZodDefault<z.ZodBoolean>;
442
+ /** Fraction of budget at which the status bar warns (TASK-14 `pressure`). */
443
+ warnThreshold: z.ZodDefault<z.ZodNumber>;
444
+ /** Fraction of budget that triggers the compaction pipeline before overflow (TASK-15). */
445
+ criticalThreshold: z.ZodDefault<z.ZodNumber>;
446
+ }, "strict", z.ZodTypeAny, {
447
+ enabled: boolean;
448
+ warnThreshold: number;
449
+ criticalThreshold: number;
450
+ }, {
451
+ enabled?: boolean | undefined;
452
+ warnThreshold?: number | undefined;
453
+ criticalThreshold?: number | undefined;
454
+ }>, {
455
+ enabled: boolean;
456
+ warnThreshold: number;
457
+ criticalThreshold: number;
458
+ }, {
459
+ enabled?: boolean | undefined;
460
+ warnThreshold?: number | undefined;
461
+ criticalThreshold?: number | undefined;
462
+ }>>;
463
+ memory: z.ZodDefault<z.ZodObject<{
464
+ enabled: z.ZodDefault<z.ZodBoolean>;
465
+ /** Token cap on auto-memory loaded into context each session (docs §5: first N lines). */
466
+ maxTokens: z.ZodDefault<z.ZodNumber>;
467
+ /** Warn when `EZC.md` exceeds this many tokens — every line costs tokens every turn (docs §6). */
468
+ ezcMdWarnTokens: z.ZodDefault<z.ZodNumber>;
469
+ }, "strict", z.ZodTypeAny, {
470
+ enabled: boolean;
471
+ maxTokens: number;
472
+ ezcMdWarnTokens: number;
473
+ }, {
474
+ enabled?: boolean | undefined;
475
+ maxTokens?: number | undefined;
476
+ ezcMdWarnTokens?: number | undefined;
477
+ }>>;
478
+ }, "strict", z.ZodTypeAny, {
479
+ reserveOutputTokens: number;
480
+ compaction: {
481
+ enabled: boolean;
482
+ warnThreshold: number;
483
+ criticalThreshold: number;
484
+ };
485
+ memory: {
486
+ enabled: boolean;
487
+ maxTokens: number;
488
+ ezcMdWarnTokens: number;
489
+ };
490
+ budgetTokens?: number | undefined;
491
+ }, {
492
+ budgetTokens?: number | undefined;
493
+ reserveOutputTokens?: number | undefined;
494
+ compaction?: {
495
+ enabled?: boolean | undefined;
496
+ warnThreshold?: number | undefined;
497
+ criticalThreshold?: number | undefined;
498
+ } | undefined;
499
+ memory?: {
500
+ enabled?: boolean | undefined;
501
+ maxTokens?: number | undefined;
502
+ ezcMdWarnTokens?: number | undefined;
503
+ } | undefined;
504
+ }>>;
505
+ sandbox: z.ZodDefault<z.ZodObject<{
506
+ enabled: z.ZodDefault<z.ZodBoolean>;
507
+ mode: z.ZodDefault<z.ZodEnum<["auto", "off"]>>;
508
+ /** Allow outbound network for sandboxed shells. Off by default (docs §4.5). */
509
+ network: z.ZodDefault<z.ZodBoolean>;
510
+ /** What to do when no sandbox backend is available (D-10): warn and run, or refuse. */
511
+ fallback: z.ZodDefault<z.ZodEnum<["warn", "refuse"]>>;
512
+ }, "strict", z.ZodTypeAny, {
513
+ enabled: boolean;
514
+ mode: "auto" | "off";
515
+ network: boolean;
516
+ fallback: "warn" | "refuse";
517
+ }, {
518
+ enabled?: boolean | undefined;
519
+ mode?: "auto" | "off" | undefined;
520
+ network?: boolean | undefined;
521
+ fallback?: "warn" | "refuse" | undefined;
522
+ }>>;
523
+ sessions: z.ZodDefault<z.ZodObject<{
524
+ enabled: z.ZodDefault<z.ZodBoolean>;
525
+ /** Override the storage root. Defaults to `~/.ezc/projects`. */
526
+ dir: z.ZodOptional<z.ZodString>;
527
+ }, "strict", z.ZodTypeAny, {
528
+ enabled: boolean;
529
+ dir?: string | undefined;
530
+ }, {
531
+ enabled?: boolean | undefined;
532
+ dir?: string | undefined;
533
+ }>>;
534
+ subagents: z.ZodDefault<z.ZodObject<{
535
+ /** Max nesting depth; the Agent tool is withheld at the cap so recursion is bounded. */
536
+ maxDepth: z.ZodDefault<z.ZodNumber>;
537
+ /** Default model↔tool iteration cap for a subagent turn. */
538
+ maxIterations: z.ZodDefault<z.ZodNumber>;
539
+ /** Default token budget for a subagent's own context window (its firewall). */
540
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
541
+ }, "strict", z.ZodTypeAny, {
542
+ maxDepth: number;
543
+ maxIterations: number;
544
+ budgetTokens?: number | undefined;
545
+ }, {
546
+ budgetTokens?: number | undefined;
547
+ maxDepth?: number | undefined;
548
+ maxIterations?: number | undefined;
549
+ }>>;
550
+ hooks: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
551
+ matcher: z.ZodOptional<z.ZodString>;
552
+ hooks: z.ZodArray<z.ZodObject<{
553
+ type: z.ZodDefault<z.ZodLiteral<"command">>;
554
+ command: z.ZodString;
555
+ /** Kill the hook after this many seconds. Default 60. */
556
+ timeout: z.ZodOptional<z.ZodNumber>;
557
+ }, "strict", z.ZodTypeAny, {
558
+ type: "command";
559
+ command: string;
560
+ timeout?: number | undefined;
561
+ }, {
562
+ command: string;
563
+ type?: "command" | undefined;
564
+ timeout?: number | undefined;
565
+ }>, "many">;
566
+ }, "strict", z.ZodTypeAny, {
567
+ hooks: {
568
+ type: "command";
569
+ command: string;
570
+ timeout?: number | undefined;
571
+ }[];
572
+ matcher?: string | undefined;
573
+ }, {
574
+ hooks: {
575
+ command: string;
576
+ type?: "command" | undefined;
577
+ timeout?: number | undefined;
578
+ }[];
579
+ matcher?: string | undefined;
580
+ }>, "many">>>;
581
+ logging: z.ZodDefault<z.ZodObject<{
582
+ level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error"]>>;
583
+ format: z.ZodDefault<z.ZodEnum<["pretty", "json"]>>;
584
+ }, "strict", z.ZodTypeAny, {
585
+ level: "warn" | "debug" | "info" | "error";
586
+ format: "pretty" | "json";
587
+ }, {
588
+ level?: "warn" | "debug" | "info" | "error" | undefined;
589
+ format?: "pretty" | "json" | undefined;
590
+ }>>;
591
+ ui: z.ZodDefault<z.ZodObject<{
592
+ /** Colour theme. `high-contrast` maximises legibility; pairs colour with icons either way. */
593
+ theme: z.ZodDefault<z.ZodEnum<["dark", "light", "high-contrast"]>>;
594
+ /**
595
+ * Force screen-reader mode (linearised output, no spinners). When unset, Ink auto-detects via
596
+ * the `INK_SCREEN_READER` environment variable (D-03).
597
+ */
598
+ screenReader: z.ZodOptional<z.ZodBoolean>;
599
+ /**
600
+ * Keybinding overrides: `action -> key`, merged over the defaults (docs §5). Keys are written
601
+ * like `ctrl+r`, `shift+tab`, `escape`. Unknown actions are ignored by the loader.
602
+ */
603
+ keybindings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
604
+ }, "strict", z.ZodTypeAny, {
605
+ theme: "dark" | "light" | "high-contrast";
606
+ keybindings: Record<string, string>;
607
+ screenReader?: boolean | undefined;
608
+ }, {
609
+ theme?: "dark" | "light" | "high-contrast" | undefined;
610
+ screenReader?: boolean | undefined;
611
+ keybindings?: Record<string, string> | undefined;
612
+ }>>;
613
+ }, "strict", z.ZodTypeAny, {
614
+ model: {
615
+ baseUrl: string;
616
+ model: string;
617
+ temperature: number;
618
+ requestTimeoutMs: number;
619
+ apiKey?: string | undefined;
620
+ tokenizer?: string | undefined;
621
+ contextWindow?: number | undefined;
622
+ maxOutputTokens?: number | undefined;
623
+ };
624
+ hooks: Record<string, {
625
+ hooks: {
626
+ type: "command";
627
+ command: string;
628
+ timeout?: number | undefined;
629
+ }[];
630
+ matcher?: string | undefined;
631
+ }[]>;
632
+ permission: {
633
+ defaultMode: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass";
634
+ rules: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>;
635
+ disabledTools: string[];
636
+ classifier: boolean;
637
+ externalDirectories: string[];
638
+ };
639
+ protectedPaths: string[];
640
+ commands: {
641
+ test?: string | undefined;
642
+ build?: string | undefined;
643
+ lint?: string | undefined;
644
+ };
645
+ web: {
646
+ searxngUrl?: string | undefined;
647
+ };
648
+ context: {
649
+ reserveOutputTokens: number;
650
+ compaction: {
651
+ enabled: boolean;
652
+ warnThreshold: number;
653
+ criticalThreshold: number;
654
+ };
655
+ memory: {
656
+ enabled: boolean;
657
+ maxTokens: number;
658
+ ezcMdWarnTokens: number;
659
+ };
660
+ budgetTokens?: number | undefined;
661
+ };
662
+ sandbox: {
663
+ enabled: boolean;
664
+ mode: "auto" | "off";
665
+ network: boolean;
666
+ fallback: "warn" | "refuse";
667
+ };
668
+ sessions: {
669
+ enabled: boolean;
670
+ dir?: string | undefined;
671
+ };
672
+ subagents: {
673
+ maxDepth: number;
674
+ maxIterations: number;
675
+ budgetTokens?: number | undefined;
676
+ };
677
+ logging: {
678
+ level: "warn" | "debug" | "info" | "error";
679
+ format: "pretty" | "json";
680
+ };
681
+ ui: {
682
+ theme: "dark" | "light" | "high-contrast";
683
+ keybindings: Record<string, string>;
684
+ screenReader?: boolean | undefined;
685
+ };
686
+ $schema?: string | undefined;
687
+ }, {
688
+ model?: {
689
+ baseUrl?: string | undefined;
690
+ model?: string | undefined;
691
+ apiKey?: string | undefined;
692
+ tokenizer?: string | undefined;
693
+ contextWindow?: number | undefined;
694
+ maxOutputTokens?: number | undefined;
695
+ temperature?: number | undefined;
696
+ requestTimeoutMs?: number | undefined;
697
+ } | undefined;
698
+ hooks?: Record<string, {
699
+ hooks: {
700
+ command: string;
701
+ type?: "command" | undefined;
702
+ timeout?: number | undefined;
703
+ }[];
704
+ matcher?: string | undefined;
705
+ }[]> | undefined;
706
+ $schema?: string | undefined;
707
+ permission?: {
708
+ defaultMode?: "default" | "acceptEdits" | "plan" | "auto" | "dontAsk" | "bypass" | undefined;
709
+ rules?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
710
+ disabledTools?: string[] | undefined;
711
+ classifier?: boolean | undefined;
712
+ externalDirectories?: string[] | undefined;
713
+ } | undefined;
714
+ protectedPaths?: string[] | undefined;
715
+ commands?: {
716
+ test?: string | undefined;
717
+ build?: string | undefined;
718
+ lint?: string | undefined;
719
+ } | undefined;
720
+ web?: {
721
+ searxngUrl?: string | undefined;
722
+ } | undefined;
723
+ context?: {
724
+ budgetTokens?: number | undefined;
725
+ reserveOutputTokens?: number | undefined;
726
+ compaction?: {
727
+ enabled?: boolean | undefined;
728
+ warnThreshold?: number | undefined;
729
+ criticalThreshold?: number | undefined;
730
+ } | undefined;
731
+ memory?: {
732
+ enabled?: boolean | undefined;
733
+ maxTokens?: number | undefined;
734
+ ezcMdWarnTokens?: number | undefined;
735
+ } | undefined;
736
+ } | undefined;
737
+ sandbox?: {
738
+ enabled?: boolean | undefined;
739
+ mode?: "auto" | "off" | undefined;
740
+ network?: boolean | undefined;
741
+ fallback?: "warn" | "refuse" | undefined;
742
+ } | undefined;
743
+ sessions?: {
744
+ enabled?: boolean | undefined;
745
+ dir?: string | undefined;
746
+ } | undefined;
747
+ subagents?: {
748
+ budgetTokens?: number | undefined;
749
+ maxDepth?: number | undefined;
750
+ maxIterations?: number | undefined;
751
+ } | undefined;
752
+ logging?: {
753
+ level?: "warn" | "debug" | "info" | "error" | undefined;
754
+ format?: "pretty" | "json" | undefined;
755
+ } | undefined;
756
+ ui?: {
757
+ theme?: "dark" | "light" | "high-contrast" | undefined;
758
+ screenReader?: boolean | undefined;
759
+ keybindings?: Record<string, string> | undefined;
760
+ } | undefined;
761
+ }>;
762
+ export type EzcConfig = z.infer<typeof ezcConfigSchema>;
763
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB,qCAAmC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,oBAAoB,4EAO/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,gGAAgG;AAChG,eAAO,MAAM,cAAc,kHAGzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sBAAsB;;;IAI/B,4EAA4E;;IAE5E,oGAAoG;;IAEpG,iGAAiG;;;;;;;;;;;;;;EAG1F,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAMtB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;EAIjB,CAAC;AAEZ,eAAO,MAAM,sBAAsB;;IAG/B,6EAA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FAAwF;;QAExF,4DAA4D;;QAE5D,+EAA+E;;;;;;;;;;;;;;;;YApC/E,yDAAyD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAoDzD,8FAA8F;;QAE9F;;;WAGG;;QAEH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BI,CAAC;AAEZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
package/dist/schema.js ADDED
@@ -0,0 +1,191 @@
1
+ import { z } from 'zod';
2
+ export const permissionDecisionSchema = z.enum(['allow', 'ask', 'deny']);
3
+ export const permissionModeSchema = z.enum([
4
+ 'default',
5
+ 'acceptEdits',
6
+ 'plan',
7
+ 'auto',
8
+ 'dontAsk',
9
+ 'bypass',
10
+ ]);
11
+ /** A per-tool rule: either a blanket decision, or a map of command/path pattern -> decision. */
12
+ export const toolRuleSchema = z.union([
13
+ permissionDecisionSchema,
14
+ z.record(z.string(), permissionDecisionSchema),
15
+ ]);
16
+ export const modelConfigSchema = z
17
+ .object({
18
+ baseUrl: z.string().url().default('http://localhost:11434/v1'),
19
+ model: z.string().min(1).default('qwen2.5-coder:7b'),
20
+ apiKey: z.string().optional(),
21
+ tokenizer: z.string().optional(),
22
+ contextWindow: z.number().int().positive().optional(),
23
+ maxOutputTokens: z.number().int().positive().optional(),
24
+ temperature: z.number().min(0).max(2).default(0),
25
+ requestTimeoutMs: z.number().int().positive().default(120_000),
26
+ })
27
+ .strict();
28
+ export const permissionConfigSchema = z
29
+ .object({
30
+ defaultMode: permissionModeSchema.default('default'),
31
+ rules: z.record(z.string(), toolRuleSchema).default({}),
32
+ /** Tools removed from the model's view entirely (pre-filter; docs §4.1). */
33
+ disabledTools: z.array(z.string()).default([]),
34
+ /** Run the heuristic safety classifier in `auto` mode (docs §4.4). User-disable in trusted envs. */
35
+ classifier: z.boolean().default(true),
36
+ /** Directories outside the project root the agent may access (`external_directory`; docs §3). */
37
+ externalDirectories: z.array(z.string()).default([]),
38
+ })
39
+ .strict();
40
+ export const commandsConfigSchema = z
41
+ .object({
42
+ test: z.string().optional(),
43
+ build: z.string().optional(),
44
+ lint: z.string().optional(),
45
+ })
46
+ .strict();
47
+ export const webConfigSchema = z
48
+ .object({
49
+ searxngUrl: z.string().url().optional(),
50
+ })
51
+ .strict();
52
+ export const compactionConfigSchema = z
53
+ .object({
54
+ enabled: z.boolean().default(true),
55
+ /** Fraction of budget at which the status bar warns (TASK-14 `pressure`). */
56
+ warnThreshold: z.number().min(0).max(1).default(0.8),
57
+ /** Fraction of budget that triggers the compaction pipeline before overflow (TASK-15). */
58
+ criticalThreshold: z.number().min(0).max(1).default(0.92),
59
+ })
60
+ .strict()
61
+ .refine((c) => c.warnThreshold <= c.criticalThreshold, {
62
+ message: 'warnThreshold must be ≤ criticalThreshold',
63
+ });
64
+ /** Persistent memory: project `EZC.md` (curated) + append-only auto-memory (learned hints). */
65
+ export const memoryConfigSchema = z
66
+ .object({
67
+ enabled: z.boolean().default(true),
68
+ /** Token cap on auto-memory loaded into context each session (docs §5: first N lines). */
69
+ maxTokens: z.number().int().positive().default(2000),
70
+ /** Warn when `EZC.md` exceeds this many tokens — every line costs tokens every turn (docs §6). */
71
+ ezcMdWarnTokens: z.number().int().positive().default(4000),
72
+ })
73
+ .strict();
74
+ export const contextConfigSchema = z
75
+ .object({
76
+ budgetTokens: z.number().int().positive().optional(),
77
+ /** Tokens held back from the budget for the model's reply when sizing the prompt (TASK-14). */
78
+ reserveOutputTokens: z.number().int().nonnegative().default(1024),
79
+ compaction: compactionConfigSchema.default({}),
80
+ memory: memoryConfigSchema.default({}),
81
+ })
82
+ .strict();
83
+ export const sandboxConfigSchema = z
84
+ .object({
85
+ enabled: z.boolean().default(true),
86
+ mode: z.enum(['auto', 'off']).default('auto'),
87
+ /** Allow outbound network for sandboxed shells. Off by default (docs §4.5). */
88
+ network: z.boolean().default(false),
89
+ /** What to do when no sandbox backend is available (D-10): warn and run, or refuse. */
90
+ fallback: z.enum(['warn', 'refuse']).default('warn'),
91
+ })
92
+ .strict();
93
+ /** Lifecycle events a hook can subscribe to (TASK-13). */
94
+ export const HOOK_EVENTS = [
95
+ 'PreToolUse',
96
+ 'PostToolUse',
97
+ 'UserPromptSubmit',
98
+ 'SessionStart',
99
+ 'SessionEnd',
100
+ 'Resume',
101
+ 'Stop',
102
+ 'Commit',
103
+ 'Compaction',
104
+ ];
105
+ export const hookEventSchema = z.enum(HOOK_EVENTS);
106
+ /** A single command hook: a script run with the event payload on stdin (docs §2.3). */
107
+ export const hookCommandSchema = z
108
+ .object({
109
+ type: z.literal('command').default('command'),
110
+ command: z.string().min(1),
111
+ /** Kill the hook after this many seconds. Default 60. */
112
+ timeout: z.number().int().positive().max(600).optional(),
113
+ })
114
+ .strict();
115
+ /** A matcher group: hooks that fire when `matcher` matches the tool (e.g. `"Write|Edit"`). */
116
+ export const hookMatcherSchema = z
117
+ .object({
118
+ matcher: z.string().optional(),
119
+ hooks: z.array(hookCommandSchema).min(1),
120
+ })
121
+ .strict();
122
+ /** `event → [matcher groups]`. Keyed by event name; unknown events are ignored by the loader. */
123
+ export const hooksConfigSchema = z.record(z.string(), z.array(hookMatcherSchema)).default({});
124
+ /** Session transcript persistence (TASK-17): append-only JSONL under `~/.ezc/projects/`. */
125
+ export const sessionsConfigSchema = z
126
+ .object({
127
+ enabled: z.boolean().default(true),
128
+ /** Override the storage root. Defaults to `~/.ezc/projects`. */
129
+ dir: z.string().optional(),
130
+ })
131
+ .strict();
132
+ /** Subagents / sidechains (TASK-18): delegated work in its own context window. */
133
+ export const subagentsConfigSchema = z
134
+ .object({
135
+ /** Max nesting depth; the Agent tool is withheld at the cap so recursion is bounded. */
136
+ maxDepth: z.number().int().nonnegative().default(2),
137
+ /** Default model↔tool iteration cap for a subagent turn. */
138
+ maxIterations: z.number().int().positive().default(12),
139
+ /** Default token budget for a subagent's own context window (its firewall). */
140
+ budgetTokens: z.number().int().positive().optional(),
141
+ })
142
+ .strict();
143
+ export const loggingConfigSchema = z
144
+ .object({
145
+ level: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
146
+ format: z.enum(['pretty', 'json']).default('pretty'),
147
+ })
148
+ .strict();
149
+ /** TUI appearance, keybindings and accessibility (TASK-21). */
150
+ export const uiConfigSchema = z
151
+ .object({
152
+ /** Colour theme. `high-contrast` maximises legibility; pairs colour with icons either way. */
153
+ theme: z.enum(['dark', 'light', 'high-contrast']).default('dark'),
154
+ /**
155
+ * Force screen-reader mode (linearised output, no spinners). When unset, Ink auto-detects via
156
+ * the `INK_SCREEN_READER` environment variable (D-03).
157
+ */
158
+ screenReader: z.boolean().optional(),
159
+ /**
160
+ * Keybinding overrides: `action -> key`, merged over the defaults (docs §5). Keys are written
161
+ * like `ctrl+r`, `shift+tab`, `escape`. Unknown actions are ignored by the loader.
162
+ */
163
+ keybindings: z.record(z.string(), z.string()).default({}),
164
+ })
165
+ .strict();
166
+ /** Always-protected paths. User `protectedPaths` are unioned with these; defaults are never dropped. */
167
+ export const DEFAULT_PROTECTED_PATHS = [
168
+ '.git/',
169
+ '.ezc/',
170
+ '.env',
171
+ '~/.ssh/',
172
+ '~/.aws/',
173
+ ];
174
+ export const ezcConfigSchema = z
175
+ .object({
176
+ $schema: z.string().optional(),
177
+ model: modelConfigSchema.default({}),
178
+ permission: permissionConfigSchema.default({}),
179
+ protectedPaths: z.array(z.string()).default([...DEFAULT_PROTECTED_PATHS]),
180
+ commands: commandsConfigSchema.default({}),
181
+ web: webConfigSchema.default({}),
182
+ context: contextConfigSchema.default({}),
183
+ sandbox: sandboxConfigSchema.default({}),
184
+ sessions: sessionsConfigSchema.default({}),
185
+ subagents: subagentsConfigSchema.default({}),
186
+ hooks: hooksConfigSchema,
187
+ logging: loggingConfigSchema.default({}),
188
+ ui: uiConfigSchema.default({}),
189
+ })
190
+ .strict();
191
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAGzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,SAAS;IACT,aAAa;IACb,MAAM;IACN,MAAM;IACN,SAAS;IACT,QAAQ;CACT,CAAC,CAAC;AAGH,gGAAgG;AAChG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC;IACpC,wBAAwB;IACxB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,wBAAwB,CAAC;CAC/C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAC9D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ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C7B,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;IACpC,UAAU,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC;IACzE,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1C,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5C,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/B,CAAC;KACD,MAAM,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@diego-vp20/ezc-config",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
13
+ "dependencies": {
14
+ "zod": "^3.25.76",
15
+ "zod-to-json-schema": "^3.24.5",
16
+ "@diego-vp20/ezc-shared": "0.1.0"
17
+ },
18
+ "description": "Configuration schema and layered config loader for ezc.",
19
+ "license": "UNLICENSED",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/Diego-VP20/ezc.git"
23
+ },
24
+ "homepage": "https://github.com/Diego-VP20/ezc#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/Diego-VP20/ezc/issues"
27
+ },
28
+ "engines": {
29
+ "node": ">=22"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ]
38
+ }