opencarly 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/manifest.d.ts +6 -5
- package/dist/config/manifest.d.ts.map +1 -1
- package/dist/config/manifest.js +73 -22
- package/dist/config/manifest.js.map +1 -1
- package/dist/config/schema.d.ts +73 -93
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +23 -14
- package/dist/config/schema.js.map +1 -1
- package/dist/engine/loader.d.ts +2 -2
- package/dist/engine/loader.d.ts.map +1 -1
- package/dist/engine/loader.js +36 -20
- package/dist/engine/loader.js.map +1 -1
- package/dist/engine/matcher.d.ts +0 -3
- package/dist/engine/matcher.d.ts.map +1 -1
- package/dist/engine/matcher.js +45 -40
- package/dist/engine/matcher.js.map +1 -1
- package/dist/engine/trimmer.d.ts +4 -1
- package/dist/engine/trimmer.d.ts.map +1 -1
- package/dist/engine/trimmer.js +110 -30
- package/dist/engine/trimmer.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -66
- package/dist/index.js.map +1 -1
- package/dist/session/session.d.ts +16 -10
- package/dist/session/session.d.ts.map +1 -1
- package/dist/session/session.js +267 -96
- package/dist/session/session.js.map +1 -1
- package/package.json +3 -1
|
@@ -23,17 +23,18 @@ export interface CarlyConfig {
|
|
|
23
23
|
* Validates against Zod schemas. Collects warnings for non-fatal issues.
|
|
24
24
|
* Throws only when manifest.json is missing entirely.
|
|
25
25
|
*/
|
|
26
|
-
export declare function loadConfig(configPath: string): CarlyConfig
|
|
26
|
+
export declare function loadConfig(configPath: string): Promise<CarlyConfig>;
|
|
27
27
|
/**
|
|
28
28
|
* Parse a domain rule file (.md).
|
|
29
29
|
*
|
|
30
|
-
* Extracts rules from bullet points (lines starting with "- ").
|
|
31
|
-
* Ignores headings (#)
|
|
30
|
+
* Extracts rules from bullet points (lines starting with "- ") and free text.
|
|
31
|
+
* Ignores headings (#) and empty lines.
|
|
32
|
+
* Uses a memory cache based on file modification time.
|
|
32
33
|
*/
|
|
33
|
-
export declare function parseDomainFile(filePath: string): string[]
|
|
34
|
+
export declare function parseDomainFile(filePath: string): Promise<string[]>;
|
|
34
35
|
/**
|
|
35
36
|
* Reload config from disk. Used when config might have changed
|
|
36
37
|
* (e.g., user edited manifest.json via /carly command).
|
|
37
38
|
*/
|
|
38
|
-
export declare function reloadConfig(configPath: string): CarlyConfig
|
|
39
|
+
export declare function reloadConfig(configPath: string): Promise<CarlyConfig>;
|
|
39
40
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/config/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,QAAQ,CAAC;IAEnB,iFAAiF;IACjF,QAAQ,EAAE,YAAY,CAAC;IAEvB,+EAA+E;IAC/E,OAAO,EAAE,WAAW,CAAC;IAErB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IAEnB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/config/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,QAAQ,CAAC;IAEnB,iFAAiF;IACjF,QAAQ,EAAE,YAAY,CAAC;IAEvB,+EAA+E;IAC/E,OAAO,EAAE,WAAW,CAAC;IAErB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IAEnB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AA4BD;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAqFzE;AAID;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBzE;AAmDD;;;GAGG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAE3E"}
|
package/dist/config/manifest.js
CHANGED
|
@@ -13,12 +13,16 @@ import { ManifestSchema, CommandsFileSchema, ContextFileSchema, } from "./schema
|
|
|
13
13
|
* Read and parse a JSON file. Returns null if file doesn't exist.
|
|
14
14
|
* Throws on invalid JSON.
|
|
15
15
|
*/
|
|
16
|
-
function readJsonFile(filePath) {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
async function readJsonFile(filePath) {
|
|
17
|
+
try {
|
|
18
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
19
|
+
return JSON.parse(raw);
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
if (err.code === 'ENOENT')
|
|
23
|
+
return null;
|
|
24
|
+
throw err;
|
|
19
25
|
}
|
|
20
|
-
const raw = fs.readFileSync(filePath, "utf-8");
|
|
21
|
-
return JSON.parse(raw);
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Format Zod errors into human-readable messages.
|
|
@@ -36,11 +40,11 @@ function formatZodErrors(error) {
|
|
|
36
40
|
* Validates against Zod schemas. Collects warnings for non-fatal issues.
|
|
37
41
|
* Throws only when manifest.json is missing entirely.
|
|
38
42
|
*/
|
|
39
|
-
export function loadConfig(configPath) {
|
|
43
|
+
export async function loadConfig(configPath) {
|
|
40
44
|
const warnings = [];
|
|
41
45
|
// manifest.json (required)
|
|
42
46
|
const manifestPath = path.join(configPath, "manifest.json");
|
|
43
|
-
const manifestRaw = readJsonFile(manifestPath);
|
|
47
|
+
const manifestRaw = await readJsonFile(manifestPath);
|
|
44
48
|
if (manifestRaw === null) {
|
|
45
49
|
throw new Error(`OpenCarly: manifest.json not found at ${manifestPath}`);
|
|
46
50
|
}
|
|
@@ -57,14 +61,17 @@ export function loadConfig(configPath) {
|
|
|
57
61
|
// Validate domain file references exist
|
|
58
62
|
for (const [name, domain] of Object.entries(manifest.domains)) {
|
|
59
63
|
const domainFilePath = path.join(configPath, domain.file);
|
|
60
|
-
|
|
64
|
+
try {
|
|
65
|
+
await fs.promises.access(domainFilePath);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
61
68
|
warnings.push(`Domain "${name}" references file "${domain.file}" which does not exist`);
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
// commands.json (optional - defaults to empty)
|
|
65
72
|
const commandsPath = path.join(configPath, "commands.json");
|
|
66
73
|
let commands = {};
|
|
67
|
-
const commandsRaw = readJsonFile(commandsPath);
|
|
74
|
+
const commandsRaw = await readJsonFile(commandsPath);
|
|
68
75
|
if (commandsRaw !== null) {
|
|
69
76
|
try {
|
|
70
77
|
commands = CommandsFileSchema.parse(commandsRaw);
|
|
@@ -81,7 +88,7 @@ export function loadConfig(configPath) {
|
|
|
81
88
|
// context.json (optional - defaults to empty with default thresholds)
|
|
82
89
|
const contextPath = path.join(configPath, "context.json");
|
|
83
90
|
let context = ContextFileSchema.parse({});
|
|
84
|
-
const contextRaw = readJsonFile(contextPath);
|
|
91
|
+
const contextRaw = await readJsonFile(contextPath);
|
|
85
92
|
if (contextRaw !== null) {
|
|
86
93
|
try {
|
|
87
94
|
context = ContextFileSchema.parse(contextRaw);
|
|
@@ -104,28 +111,72 @@ export function loadConfig(configPath) {
|
|
|
104
111
|
}
|
|
105
112
|
return { manifest, commands, context, configPath, warnings };
|
|
106
113
|
}
|
|
114
|
+
const domainFileCache = new Map();
|
|
107
115
|
/**
|
|
108
116
|
* Parse a domain rule file (.md).
|
|
109
117
|
*
|
|
110
|
-
* Extracts rules from bullet points (lines starting with "- ").
|
|
111
|
-
* Ignores headings (#)
|
|
118
|
+
* Extracts rules from bullet points (lines starting with "- ") and free text.
|
|
119
|
+
* Ignores headings (#) and empty lines.
|
|
120
|
+
* Uses a memory cache based on file modification time.
|
|
112
121
|
*/
|
|
113
|
-
export function parseDomainFile(filePath) {
|
|
114
|
-
|
|
122
|
+
export async function parseDomainFile(filePath) {
|
|
123
|
+
let content;
|
|
124
|
+
try {
|
|
125
|
+
const stats = await fs.promises.stat(filePath);
|
|
126
|
+
const cached = domainFileCache.get(filePath);
|
|
127
|
+
if (cached && cached.mtimeMs === stats.mtimeMs) {
|
|
128
|
+
return cached.rules;
|
|
129
|
+
}
|
|
130
|
+
content = await fs.promises.readFile(filePath, "utf-8");
|
|
131
|
+
content = content.replace(/\r\n/g, "\n");
|
|
132
|
+
const rules = parseDomainFileContent(content);
|
|
133
|
+
domainFileCache.set(filePath, { mtimeMs: stats.mtimeMs, rules });
|
|
134
|
+
return rules;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
115
137
|
return [];
|
|
116
138
|
}
|
|
117
|
-
|
|
139
|
+
}
|
|
140
|
+
function parseDomainFileContent(content) {
|
|
118
141
|
const lines = content.split("\n");
|
|
119
142
|
const rules = [];
|
|
143
|
+
let currentRule = "";
|
|
144
|
+
let inCodeBlock = false;
|
|
120
145
|
for (const line of lines) {
|
|
121
146
|
const trimmed = line.trim();
|
|
122
|
-
if (trimmed
|
|
123
|
-
|
|
124
|
-
|
|
147
|
+
if (trimmed.startsWith("```")) {
|
|
148
|
+
inCodeBlock = !inCodeBlock;
|
|
149
|
+
}
|
|
150
|
+
// Ignore headings but break the current rule
|
|
151
|
+
// Only match headings (starts with # followed by space, or ##+) to avoid breaking on `#comment` inside rules
|
|
152
|
+
if (!inCodeBlock && /^#+(\s|$)/.test(trimmed)) {
|
|
153
|
+
if (currentRule) {
|
|
154
|
+
rules.push(currentRule.trim());
|
|
155
|
+
currentRule = "";
|
|
156
|
+
}
|
|
125
157
|
continue;
|
|
126
|
-
if (trimmed.startsWith("- ")) {
|
|
127
|
-
rules.push(trimmed.slice(2).trim());
|
|
128
158
|
}
|
|
159
|
+
// A list marker starts a new rule ONLY if it's not indented (starts at beginning of line)
|
|
160
|
+
const match = line.match(/^([-*+]|\d+\.)\s+(.*)/);
|
|
161
|
+
if (!inCodeBlock && match) {
|
|
162
|
+
if (currentRule) {
|
|
163
|
+
rules.push(currentRule.trim());
|
|
164
|
+
}
|
|
165
|
+
currentRule = match[2]; // Start new rule without the list marker
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
// If we're inside a rule, append the line (preserve leading spaces for code blocks and nested lists)
|
|
169
|
+
if (currentRule) {
|
|
170
|
+
currentRule += "\n" + line;
|
|
171
|
+
}
|
|
172
|
+
else if (trimmed !== "") {
|
|
173
|
+
// Fix: If we aren't in a rule yet but encounter text, start a new rule
|
|
174
|
+
currentRule = line;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (currentRule) {
|
|
179
|
+
rules.push(currentRule.trim());
|
|
129
180
|
}
|
|
130
181
|
return rules;
|
|
131
182
|
}
|
|
@@ -133,7 +184,7 @@ export function parseDomainFile(filePath) {
|
|
|
133
184
|
* Reload config from disk. Used when config might have changed
|
|
134
185
|
* (e.g., user edited manifest.json via /carly command).
|
|
135
186
|
*/
|
|
136
|
-
export function reloadConfig(configPath) {
|
|
137
|
-
return loadConfig(configPath);
|
|
187
|
+
export async function reloadConfig(configPath) {
|
|
188
|
+
return await loadConfig(configPath);
|
|
138
189
|
}
|
|
139
190
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/config/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB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AM,CAAC;YACN,qGAAqG;YACrG,IAAI,WAAW,EAAE,CAAC;gBAChB,WAAW,IAAI,IAAI,GAAG,IAAI,CAAC;YAC7B,CAAC;iBAAM,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;gBAC1B,uEAAuE;gBACvE,WAAW,GAAG,IAAI,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,UAAkB;IACnD,OAAO,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -155,37 +155,37 @@ export declare const CommandsFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
155
155
|
export type CommandsFile = z.infer<typeof CommandsFileSchema>;
|
|
156
156
|
export declare const ContextBracketSchema: z.ZodObject<{
|
|
157
157
|
/** Whether this bracket is enabled */
|
|
158
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
158
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
159
159
|
/** Rules injected when this bracket is active */
|
|
160
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodString, "many"
|
|
160
|
+
rules: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
|
|
161
161
|
}, "strip", z.ZodTypeAny, {
|
|
162
162
|
rules: string[];
|
|
163
163
|
enabled: boolean;
|
|
164
164
|
}, {
|
|
165
|
-
rules?:
|
|
166
|
-
enabled?:
|
|
165
|
+
rules?: unknown;
|
|
166
|
+
enabled?: unknown;
|
|
167
167
|
}>;
|
|
168
168
|
export type ContextBracket = z.infer<typeof ContextBracketSchema>;
|
|
169
169
|
export declare const TrimmingConfigSchema: z.ZodObject<{
|
|
170
170
|
/** Whether tool output trimming is enabled */
|
|
171
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
171
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
172
172
|
/**
|
|
173
173
|
* Trimming aggressiveness mode:
|
|
174
174
|
* - conservative: only trims very stale/superseded outputs (threshold=20)
|
|
175
175
|
* - moderate: good balance of savings vs safety (threshold=40)
|
|
176
176
|
* - aggressive: trims most things beyond preserveLastN (threshold=60)
|
|
177
177
|
*/
|
|
178
|
-
mode: z.ZodDefault<z.ZodEnum<["conservative", "moderate", "aggressive"]
|
|
178
|
+
mode: z.ZodDefault<z.ZodCatch<z.ZodEnum<["conservative", "moderate", "aggressive"]>>>;
|
|
179
179
|
/** Hard floor: never trim tool outputs in the last N messages */
|
|
180
|
-
preserveLastN: z.ZodDefault<z.ZodNumber
|
|
180
|
+
preserveLastN: z.ZodDefault<z.ZodCatch<z.ZodNumber>>;
|
|
181
181
|
}, "strip", z.ZodTypeAny, {
|
|
182
182
|
enabled: boolean;
|
|
183
183
|
mode: "conservative" | "moderate" | "aggressive";
|
|
184
184
|
preserveLastN: number;
|
|
185
185
|
}, {
|
|
186
|
-
enabled?:
|
|
187
|
-
mode?:
|
|
188
|
-
preserveLastN?:
|
|
186
|
+
enabled?: unknown;
|
|
187
|
+
mode?: unknown;
|
|
188
|
+
preserveLastN?: unknown;
|
|
189
189
|
}>;
|
|
190
190
|
export type TrimmingConfig = z.infer<typeof TrimmingConfigSchema>;
|
|
191
191
|
export declare const StatsConfigSchema: z.ZodObject<{
|
|
@@ -195,68 +195,68 @@ export declare const StatsConfigSchema: z.ZodObject<{
|
|
|
195
195
|
* - "month": Only sessions from last 30 days
|
|
196
196
|
* - "week": Only sessions from last 7 days
|
|
197
197
|
*/
|
|
198
|
-
trackDuration: z.ZodDefault<z.ZodEnum<["all", "month", "week"]
|
|
198
|
+
trackDuration: z.ZodDefault<z.ZodCatch<z.ZodEnum<["all", "month", "week"]>>>;
|
|
199
199
|
}, "strip", z.ZodTypeAny, {
|
|
200
200
|
trackDuration: "all" | "month" | "week";
|
|
201
201
|
}, {
|
|
202
|
-
trackDuration?:
|
|
202
|
+
trackDuration?: unknown;
|
|
203
203
|
}>;
|
|
204
204
|
export type StatsConfig = z.infer<typeof StatsConfigSchema>;
|
|
205
205
|
/** Map trimming mode to score threshold */
|
|
206
206
|
export declare const TRIM_THRESHOLDS: Record<string, number>;
|
|
207
207
|
export declare const ContextFileSchema: z.ZodObject<{
|
|
208
208
|
/** Prompt count thresholds for bracket transitions */
|
|
209
|
-
thresholds: z.ZodDefault<z.ZodObject<{
|
|
210
|
-
moderate: z.ZodDefault<z.ZodNumber
|
|
211
|
-
depleted: z.ZodDefault<z.ZodNumber
|
|
212
|
-
critical: z.ZodDefault<z.ZodNumber
|
|
209
|
+
thresholds: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
210
|
+
moderate: z.ZodDefault<z.ZodCatch<z.ZodNumber>>;
|
|
211
|
+
depleted: z.ZodDefault<z.ZodCatch<z.ZodNumber>>;
|
|
212
|
+
critical: z.ZodDefault<z.ZodCatch<z.ZodNumber>>;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
214
|
moderate: number;
|
|
215
215
|
depleted: number;
|
|
216
216
|
critical: number;
|
|
217
217
|
}, {
|
|
218
|
-
moderate?:
|
|
219
|
-
depleted?:
|
|
220
|
-
critical?:
|
|
221
|
-
}
|
|
218
|
+
moderate?: unknown;
|
|
219
|
+
depleted?: unknown;
|
|
220
|
+
critical?: unknown;
|
|
221
|
+
}>>>;
|
|
222
222
|
/** Bracket definitions */
|
|
223
|
-
brackets: z.ZodDefault<z.ZodObject<{
|
|
224
|
-
fresh: z.ZodDefault<z.ZodObject<{
|
|
223
|
+
brackets: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
224
|
+
fresh: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
225
225
|
/** Whether this bracket is enabled */
|
|
226
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
226
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
227
227
|
/** Rules injected when this bracket is active */
|
|
228
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodString, "many"
|
|
228
|
+
rules: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
|
|
229
229
|
}, "strip", z.ZodTypeAny, {
|
|
230
230
|
rules: string[];
|
|
231
231
|
enabled: boolean;
|
|
232
232
|
}, {
|
|
233
|
-
rules?:
|
|
234
|
-
enabled?:
|
|
235
|
-
}
|
|
236
|
-
moderate: z.ZodDefault<z.ZodObject<{
|
|
233
|
+
rules?: unknown;
|
|
234
|
+
enabled?: unknown;
|
|
235
|
+
}>>>;
|
|
236
|
+
moderate: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
237
237
|
/** Whether this bracket is enabled */
|
|
238
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
238
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
239
239
|
/** Rules injected when this bracket is active */
|
|
240
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodString, "many"
|
|
240
|
+
rules: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
|
|
241
241
|
}, "strip", z.ZodTypeAny, {
|
|
242
242
|
rules: string[];
|
|
243
243
|
enabled: boolean;
|
|
244
244
|
}, {
|
|
245
|
-
rules?:
|
|
246
|
-
enabled?:
|
|
247
|
-
}
|
|
248
|
-
depleted: z.ZodDefault<z.ZodObject<{
|
|
245
|
+
rules?: unknown;
|
|
246
|
+
enabled?: unknown;
|
|
247
|
+
}>>>;
|
|
248
|
+
depleted: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
249
249
|
/** Whether this bracket is enabled */
|
|
250
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
250
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
251
251
|
/** Rules injected when this bracket is active */
|
|
252
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodString, "many"
|
|
252
|
+
rules: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
|
|
253
253
|
}, "strip", z.ZodTypeAny, {
|
|
254
254
|
rules: string[];
|
|
255
255
|
enabled: boolean;
|
|
256
256
|
}, {
|
|
257
|
-
rules?:
|
|
258
|
-
enabled?:
|
|
259
|
-
}
|
|
257
|
+
rules?: unknown;
|
|
258
|
+
enabled?: unknown;
|
|
259
|
+
}>>>;
|
|
260
260
|
}, "strip", z.ZodTypeAny, {
|
|
261
261
|
moderate: {
|
|
262
262
|
rules: string[];
|
|
@@ -271,55 +271,46 @@ export declare const ContextFileSchema: z.ZodObject<{
|
|
|
271
271
|
enabled: boolean;
|
|
272
272
|
};
|
|
273
273
|
}, {
|
|
274
|
-
moderate?:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
depleted?: {
|
|
279
|
-
rules?: string[] | undefined;
|
|
280
|
-
enabled?: boolean | undefined;
|
|
281
|
-
} | undefined;
|
|
282
|
-
fresh?: {
|
|
283
|
-
rules?: string[] | undefined;
|
|
284
|
-
enabled?: boolean | undefined;
|
|
285
|
-
} | undefined;
|
|
286
|
-
}>>;
|
|
274
|
+
moderate?: unknown;
|
|
275
|
+
depleted?: unknown;
|
|
276
|
+
fresh?: unknown;
|
|
277
|
+
}>>>;
|
|
287
278
|
/** Smart tool output trimming configuration */
|
|
288
|
-
trimming: z.ZodDefault<z.ZodObject<{
|
|
279
|
+
trimming: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
289
280
|
/** Whether tool output trimming is enabled */
|
|
290
|
-
enabled: z.ZodDefault<z.ZodBoolean
|
|
281
|
+
enabled: z.ZodDefault<z.ZodCatch<z.ZodBoolean>>;
|
|
291
282
|
/**
|
|
292
283
|
* Trimming aggressiveness mode:
|
|
293
284
|
* - conservative: only trims very stale/superseded outputs (threshold=20)
|
|
294
285
|
* - moderate: good balance of savings vs safety (threshold=40)
|
|
295
286
|
* - aggressive: trims most things beyond preserveLastN (threshold=60)
|
|
296
287
|
*/
|
|
297
|
-
mode: z.ZodDefault<z.ZodEnum<["conservative", "moderate", "aggressive"]
|
|
288
|
+
mode: z.ZodDefault<z.ZodCatch<z.ZodEnum<["conservative", "moderate", "aggressive"]>>>;
|
|
298
289
|
/** Hard floor: never trim tool outputs in the last N messages */
|
|
299
|
-
preserveLastN: z.ZodDefault<z.ZodNumber
|
|
290
|
+
preserveLastN: z.ZodDefault<z.ZodCatch<z.ZodNumber>>;
|
|
300
291
|
}, "strip", z.ZodTypeAny, {
|
|
301
292
|
enabled: boolean;
|
|
302
293
|
mode: "conservative" | "moderate" | "aggressive";
|
|
303
294
|
preserveLastN: number;
|
|
304
295
|
}, {
|
|
305
|
-
enabled?:
|
|
306
|
-
mode?:
|
|
307
|
-
preserveLastN?:
|
|
308
|
-
}
|
|
296
|
+
enabled?: unknown;
|
|
297
|
+
mode?: unknown;
|
|
298
|
+
preserveLastN?: unknown;
|
|
299
|
+
}>>>;
|
|
309
300
|
/** Token stats tracking configuration */
|
|
310
|
-
stats: z.ZodDefault<z.ZodObject<{
|
|
301
|
+
stats: z.ZodDefault<z.ZodCatch<z.ZodObject<{
|
|
311
302
|
/**
|
|
312
303
|
* Duration to track stats:
|
|
313
304
|
* - "all": All sessions (default)
|
|
314
305
|
* - "month": Only sessions from last 30 days
|
|
315
306
|
* - "week": Only sessions from last 7 days
|
|
316
307
|
*/
|
|
317
|
-
trackDuration: z.ZodDefault<z.ZodEnum<["all", "month", "week"]
|
|
308
|
+
trackDuration: z.ZodDefault<z.ZodCatch<z.ZodEnum<["all", "month", "week"]>>>;
|
|
318
309
|
}, "strip", z.ZodTypeAny, {
|
|
319
310
|
trackDuration: "all" | "month" | "week";
|
|
320
311
|
}, {
|
|
321
|
-
trackDuration?:
|
|
322
|
-
}
|
|
312
|
+
trackDuration?: unknown;
|
|
313
|
+
}>>>;
|
|
323
314
|
}, "strip", z.ZodTypeAny, {
|
|
324
315
|
thresholds: {
|
|
325
316
|
moderate: number;
|
|
@@ -349,33 +340,10 @@ export declare const ContextFileSchema: z.ZodObject<{
|
|
|
349
340
|
trackDuration: "all" | "month" | "week";
|
|
350
341
|
};
|
|
351
342
|
}, {
|
|
352
|
-
thresholds?:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
} | undefined;
|
|
357
|
-
brackets?: {
|
|
358
|
-
moderate?: {
|
|
359
|
-
rules?: string[] | undefined;
|
|
360
|
-
enabled?: boolean | undefined;
|
|
361
|
-
} | undefined;
|
|
362
|
-
depleted?: {
|
|
363
|
-
rules?: string[] | undefined;
|
|
364
|
-
enabled?: boolean | undefined;
|
|
365
|
-
} | undefined;
|
|
366
|
-
fresh?: {
|
|
367
|
-
rules?: string[] | undefined;
|
|
368
|
-
enabled?: boolean | undefined;
|
|
369
|
-
} | undefined;
|
|
370
|
-
} | undefined;
|
|
371
|
-
trimming?: {
|
|
372
|
-
enabled?: boolean | undefined;
|
|
373
|
-
mode?: "conservative" | "moderate" | "aggressive" | undefined;
|
|
374
|
-
preserveLastN?: number | undefined;
|
|
375
|
-
} | undefined;
|
|
376
|
-
stats?: {
|
|
377
|
-
trackDuration?: "all" | "month" | "week" | undefined;
|
|
378
|
-
} | undefined;
|
|
343
|
+
thresholds?: unknown;
|
|
344
|
+
brackets?: unknown;
|
|
345
|
+
trimming?: unknown;
|
|
346
|
+
stats?: unknown;
|
|
379
347
|
}>;
|
|
380
348
|
export type ContextFile = z.infer<typeof ContextFileSchema>;
|
|
381
349
|
export declare const TokenStatsSchema: z.ZodObject<{
|
|
@@ -414,6 +382,7 @@ export type TokenStats = z.infer<typeof TokenStatsSchema>;
|
|
|
414
382
|
export declare const CumulativeSessionSummarySchema: z.ZodObject<{
|
|
415
383
|
sessionId: z.ZodString;
|
|
416
384
|
date: z.ZodString;
|
|
385
|
+
lastActivity: z.ZodOptional<z.ZodString>;
|
|
417
386
|
tokensSaved: z.ZodNumber;
|
|
418
387
|
promptsProcessed: z.ZodNumber;
|
|
419
388
|
tokensSkippedBySelection: z.ZodDefault<z.ZodNumber>;
|
|
@@ -431,6 +400,7 @@ export declare const CumulativeSessionSummarySchema: z.ZodObject<{
|
|
|
431
400
|
rulesInjected: number;
|
|
432
401
|
sessionId: string;
|
|
433
402
|
tokensSaved: number;
|
|
403
|
+
lastActivity?: string | undefined;
|
|
434
404
|
}, {
|
|
435
405
|
date: string;
|
|
436
406
|
promptsProcessed: number;
|
|
@@ -441,6 +411,7 @@ export declare const CumulativeSessionSummarySchema: z.ZodObject<{
|
|
|
441
411
|
tokensTrimmedFromHistory?: number | undefined;
|
|
442
412
|
tokensTrimmedCarlyBlocks?: number | undefined;
|
|
443
413
|
rulesInjected?: number | undefined;
|
|
414
|
+
lastActivity?: string | undefined;
|
|
444
415
|
}>;
|
|
445
416
|
export type CumulativeSessionSummary = z.infer<typeof CumulativeSessionSummarySchema>;
|
|
446
417
|
export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
@@ -467,6 +438,7 @@ export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
|
467
438
|
sessions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
468
439
|
sessionId: z.ZodString;
|
|
469
440
|
date: z.ZodString;
|
|
441
|
+
lastActivity: z.ZodOptional<z.ZodString>;
|
|
470
442
|
tokensSaved: z.ZodNumber;
|
|
471
443
|
promptsProcessed: z.ZodNumber;
|
|
472
444
|
tokensSkippedBySelection: z.ZodDefault<z.ZodNumber>;
|
|
@@ -484,6 +456,7 @@ export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
|
484
456
|
rulesInjected: number;
|
|
485
457
|
sessionId: string;
|
|
486
458
|
tokensSaved: number;
|
|
459
|
+
lastActivity?: string | undefined;
|
|
487
460
|
}, {
|
|
488
461
|
date: string;
|
|
489
462
|
promptsProcessed: number;
|
|
@@ -494,6 +467,7 @@ export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
|
494
467
|
tokensTrimmedFromHistory?: number | undefined;
|
|
495
468
|
tokensTrimmedCarlyBlocks?: number | undefined;
|
|
496
469
|
rulesInjected?: number | undefined;
|
|
470
|
+
lastActivity?: string | undefined;
|
|
497
471
|
}>, "many">>;
|
|
498
472
|
}, "strip", z.ZodTypeAny, {
|
|
499
473
|
version: number;
|
|
@@ -514,6 +488,7 @@ export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
|
514
488
|
rulesInjected: number;
|
|
515
489
|
sessionId: string;
|
|
516
490
|
tokensSaved: number;
|
|
491
|
+
lastActivity?: string | undefined;
|
|
517
492
|
}[];
|
|
518
493
|
}, {
|
|
519
494
|
version?: number | undefined;
|
|
@@ -534,6 +509,7 @@ export declare const CumulativeStatsSchema: z.ZodObject<{
|
|
|
534
509
|
tokensTrimmedFromHistory?: number | undefined;
|
|
535
510
|
tokensTrimmedCarlyBlocks?: number | undefined;
|
|
536
511
|
rulesInjected?: number | undefined;
|
|
512
|
+
lastActivity?: string | undefined;
|
|
537
513
|
}[] | undefined;
|
|
538
514
|
}>;
|
|
539
515
|
export type CumulativeStats = z.infer<typeof CumulativeStatsSchema>;
|
|
@@ -565,6 +541,8 @@ export declare const SessionConfigSchema: z.ZodObject<{
|
|
|
565
541
|
promptCount: z.ZodDefault<z.ZodNumber>;
|
|
566
542
|
/** ISO timestamp of last activity */
|
|
567
543
|
lastActivity: z.ZodString;
|
|
544
|
+
/** The currently active model ID for this session */
|
|
545
|
+
activeModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
568
546
|
/** Files recently read or edited by tools in this session */
|
|
569
547
|
activeFiles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
570
548
|
/** Session-specific overrides */
|
|
@@ -614,13 +592,14 @@ export declare const SessionConfigSchema: z.ZodObject<{
|
|
|
614
592
|
baselineTokensPerPrompt?: number | undefined;
|
|
615
593
|
}>>;
|
|
616
594
|
}, "strip", z.ZodTypeAny, {
|
|
595
|
+
lastActivity: string;
|
|
617
596
|
id: string;
|
|
618
597
|
started: string;
|
|
619
598
|
cwd: string;
|
|
620
599
|
label: string;
|
|
621
600
|
title: string | null;
|
|
622
601
|
promptCount: number;
|
|
623
|
-
|
|
602
|
+
activeModel: string | null;
|
|
624
603
|
activeFiles: string[];
|
|
625
604
|
overrides: {
|
|
626
605
|
devmode: boolean | null;
|
|
@@ -636,13 +615,14 @@ export declare const SessionConfigSchema: z.ZodObject<{
|
|
|
636
615
|
baselineTokensPerPrompt: number;
|
|
637
616
|
};
|
|
638
617
|
}, {
|
|
618
|
+
lastActivity: string;
|
|
639
619
|
id: string;
|
|
640
620
|
started: string;
|
|
641
621
|
cwd: string;
|
|
642
622
|
label: string;
|
|
643
|
-
lastActivity: string;
|
|
644
623
|
title?: string | null | undefined;
|
|
645
624
|
promptCount?: number | undefined;
|
|
625
|
+
activeModel?: string | null | undefined;
|
|
646
626
|
activeFiles?: string[] | undefined;
|
|
647
627
|
overrides?: {
|
|
648
628
|
devmode?: boolean | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;IAC7B,oCAAoC;;IAGpC,uEAAuE;;IAGvE,4EAA4E;;IAG5E,qDAAqD;;IAGrD,sFAAsF;;IAGtF,4DAA4D;;;;;;;;;;;;;;;;EAE5D,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,cAAc;IACzB,+CAA+C;;IAG/C,kCAAkC;;IAGlC,yEAAyE;;IAGzE,yBAAyB;;QAnCzB,oCAAoC;;QAGpC,uEAAuE;;QAGvE,4EAA4E;;QAG5E,qDAAqD;;Q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