flavor-code 1.4.4-beta.2 → 1.4.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -3
- package/README.zh-CN.md +43 -3
- package/dist/agent/expert-agents.d.ts +35 -0
- package/dist/agent/expert-generator.d.ts +14 -0
- package/dist/agent/expert-templates.d.ts +26 -0
- package/dist/agent/planner.d.ts +2 -0
- package/dist/{app-C5I2TH7I.js → app-IUPRUKWJ.js} +785 -396
- package/dist/{chunk-IKGT4MDT.js → chunk-4GKKXT5V.js} +1 -0
- package/dist/{chunk-Y7EH4NVO.js → chunk-55YUJKT4.js} +1 -1
- package/dist/{chunk-X6U6BO5D.js → chunk-CI6IHATI.js} +7 -3
- package/dist/{chunk-U4XTQ5PU.js → chunk-G3LKW5SY.js} +4536 -3367
- package/dist/{chunk-5BDKRA6U.js → chunk-MVBRIM53.js} +1 -1
- package/dist/{chunk-36IDJRLQ.js → chunk-SAAIDKTM.js} +46 -9
- package/dist/{chunk-JQM2L2YM.js → chunk-SW7VZDFS.js} +1 -1
- package/dist/{chunk-ONRY3C2L.js → chunk-TZ7PI4NZ.js} +1 -1
- package/dist/{claude-ink-F554I3GJ.js → claude-ink-5X2DRKN6.js} +1 -1
- package/dist/{cli-V3BLZ5UW.js → cli-4NWD3ZN3.js} +66 -14
- package/dist/cli-main.js +19 -19
- package/dist/desktop/main.js +9336 -8125
- package/dist/desktop-renderer/assets/{index-CjC0Ibiq.js → index-CBjfgCRz.js} +3 -3
- package/dist/desktop-renderer/assets/{interactive-terminal-IjIT3Xoa.js → interactive-terminal-x8YYSqF6.js} +1 -1
- package/dist/desktop-renderer/index.html +1 -1
- package/dist/{doctor-SEL32R7M.js → doctor-77UMJ6TK.js} +3 -3
- package/dist/evolution/preferences.d.ts +52 -0
- package/dist/evolve/loader.d.ts +2 -0
- package/dist/evolve/service.d.ts +6 -3
- package/dist/evolve/store.d.ts +55 -2
- package/dist/evolve/verification.d.ts +30 -0
- package/dist/harness/local.d.ts +4 -2
- package/dist/{load-RHWXNUCS.js → load-JINXGR3N.js} +2 -2
- package/dist/{manager-IYBNNKUP.js → manager-UTQT466W.js} +2 -2
- package/dist/memory/coordinator.d.ts +1 -1
- package/dist/memory/review.d.ts +13 -0
- package/dist/memory/store.d.ts +1 -0
- package/dist/memory/types.d.ts +2 -0
- package/dist/{production-TD7UWWXW.js → production-J7ZWR7VL.js} +6 -6
- package/dist/sdk/index.js +6 -6
- package/dist/session/store.d.ts +1 -0
- package/dist/{store-MZZERW7K.js → store-Y4V5TLXE.js} +2 -2
- package/dist/ui/commands.d.ts +21 -2
- package/dist/ui/session.d.ts +8 -0
- package/package.json +1 -1
- package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +97 -6
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
readRecoverableFile,
|
|
8
8
|
updateProtectedFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MVBRIM53.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/crash-guard.ts
|
|
12
12
|
import { mkdirSync, writeFileSync } from "fs";
|
|
@@ -103,11 +103,6 @@ ${reason.stack ?? ""}`;
|
|
|
103
103
|
process.on("uncaughtException", (error) => crash("uncaughtException", error));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// src/memory/store.ts
|
|
107
|
-
import { createHash } from "crypto";
|
|
108
|
-
import { readFile, rm } from "fs/promises";
|
|
109
|
-
import { resolve, join as join2, relative, sep } from "path";
|
|
110
|
-
|
|
111
106
|
// src/memory/similarity.ts
|
|
112
107
|
function normalizeForSimilarity(value) {
|
|
113
108
|
return value.normalize("NFKC").toLocaleLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").replace(/\s+/g, " ").trim();
|
|
@@ -191,6 +186,11 @@ function rankMemoryReferences(references, query, options) {
|
|
|
191
186
|
return selected;
|
|
192
187
|
}
|
|
193
188
|
|
|
189
|
+
// src/memory/store.ts
|
|
190
|
+
import { createHash } from "crypto";
|
|
191
|
+
import { readFile, rm } from "fs/promises";
|
|
192
|
+
import { resolve, join as join2, relative, sep } from "path";
|
|
193
|
+
|
|
194
194
|
// src/memory/types.ts
|
|
195
195
|
var MEMORY_TYPES = ["user", "feedback", "project", "reference"];
|
|
196
196
|
|
|
@@ -238,7 +238,14 @@ var MemoryStore = class {
|
|
|
238
238
|
return (await this.references()).map((reference) => ({ id: reference.id, type: reference.type, content: reference.summary }));
|
|
239
239
|
}
|
|
240
240
|
async userContext() {
|
|
241
|
-
const
|
|
241
|
+
const seen = /* @__PURE__ */ new Set();
|
|
242
|
+
const references = (await this.references()).filter((reference) => {
|
|
243
|
+
if (reference.type !== "user") return false;
|
|
244
|
+
const key = memoryFactKey(reference.type, reference.summary);
|
|
245
|
+
if (seen.has(key)) return false;
|
|
246
|
+
seen.add(key);
|
|
247
|
+
return true;
|
|
248
|
+
});
|
|
242
249
|
if (references.length === 0) return void 0;
|
|
243
250
|
const contents = await Promise.all(references.map(async (reference) => this.#readTaskItem(reference).catch(() => reference.summary)));
|
|
244
251
|
return [
|
|
@@ -264,11 +271,16 @@ var MemoryStore = class {
|
|
|
264
271
|
const current = await this.references();
|
|
265
272
|
const duplicate = findDuplicate(current, { ...candidate, content: entry.content, summary });
|
|
266
273
|
if (duplicate !== void 0 || current.length >= this.#maxEntries) return { entry, added: false };
|
|
274
|
+
const existingConflict = findTopicConflict(current, candidate);
|
|
275
|
+
if (existingConflict !== void 0) return { entry, added: false, conflict: existingConflict };
|
|
267
276
|
const contentPath = `tasks/${taskId}.md`;
|
|
268
277
|
await this.#writeTaskItem(taskId, contentPath, { ...entry, summary });
|
|
269
278
|
let added = false;
|
|
279
|
+
let conflict;
|
|
270
280
|
await this.#updateIndex((index) => {
|
|
271
281
|
if (findDuplicate(index.references, { ...candidate, content: entry.content, summary }) !== void 0 || index.references.length >= this.#maxEntries) return index;
|
|
282
|
+
conflict = findTopicConflict(index.references, candidate);
|
|
283
|
+
if (conflict !== void 0) return index;
|
|
272
284
|
const timestamp = now.toISOString();
|
|
273
285
|
const reference = {
|
|
274
286
|
id: entry.id,
|
|
@@ -286,7 +298,7 @@ var MemoryStore = class {
|
|
|
286
298
|
added = true;
|
|
287
299
|
return { ...index, references: [...index.references, reference] };
|
|
288
300
|
});
|
|
289
|
-
return { entry, added };
|
|
301
|
+
return { entry, added, ...conflict === void 0 ? {} : { conflict } };
|
|
290
302
|
}
|
|
291
303
|
async rememberMany(candidates) {
|
|
292
304
|
let added = 0;
|
|
@@ -584,7 +596,30 @@ function validateReference(reference, maxEntryChars) {
|
|
|
584
596
|
}
|
|
585
597
|
function findDuplicate(references, candidate) {
|
|
586
598
|
const exact = normalizeForSimilarity(candidate.content);
|
|
587
|
-
|
|
599
|
+
const factKeys = /* @__PURE__ */ new Set([memoryFactKey(candidate.type, candidate.content), memoryFactKey(candidate.type, candidate.summary)]);
|
|
600
|
+
return references.find((reference) => reference.type === candidate.type && (factKeys.has(memoryFactKey(reference.type, reference.summary)) || compactForEquality(reference.summary) === compactForEquality(candidate.summary) || normalizeForSimilarity(reference.summary) === exact || normalizeForSimilarity(reference.summary) === normalizeForSimilarity(candidate.summary) || memorySimilarity(reference.summary, candidate.content) >= 0.92 || memorySimilarity(reference.summary, candidate.summary) >= 0.92));
|
|
601
|
+
}
|
|
602
|
+
function findTopicConflict(references, candidate) {
|
|
603
|
+
const address = candidate.type === "user" ? preferredAddress(candidate.content) ?? preferredAddress(candidate.summary) : void 0;
|
|
604
|
+
if (address !== void 0) {
|
|
605
|
+
const changedAddress = references.find((reference) => reference.type === "user" && preferredAddress(reference.summary) !== void 0 && preferredAddress(reference.summary) !== address);
|
|
606
|
+
if (changedAddress !== void 0) return changedAddress;
|
|
607
|
+
}
|
|
608
|
+
const topic = sanitizeTopicKey(candidate.topicKey);
|
|
609
|
+
if (!topic || topic.endsWith(".manual") || topic.endsWith(".legacy")) return void 0;
|
|
610
|
+
return references.find((reference) => reference.type === candidate.type && reference.topicKey === topic && memorySimilarity(reference.summary, candidate.summary) < 0.92);
|
|
611
|
+
}
|
|
612
|
+
function compactForEquality(value) {
|
|
613
|
+
return normalizeForSimilarity(value).replace(/\s+/gu, "");
|
|
614
|
+
}
|
|
615
|
+
function preferredAddress(value) {
|
|
616
|
+
const match = normalizeMemoryContent(value).match(/^(?:always\s+address\s+(?:the\s+)?user\s+as|(?:用户|我)(?:的)?(?:称呼|名字|姓名)(?:是|为|叫)|请(?:叫|称呼)我)\s*[「『“"']?(.+?)[」』”"']?[。.!!]?$/iu);
|
|
617
|
+
const name = match?.[1] === void 0 ? "" : compactForEquality(match[1]);
|
|
618
|
+
return name || void 0;
|
|
619
|
+
}
|
|
620
|
+
function memoryFactKey(type, value) {
|
|
621
|
+
const address = type === "user" ? preferredAddress(value) : void 0;
|
|
622
|
+
return address === void 0 ? `${type}:text:${compactForEquality(value)}` : `user:preferred-address:${address}`;
|
|
588
623
|
}
|
|
589
624
|
function sanitizeSummary(value) {
|
|
590
625
|
return normalizeMemoryContent(value).replace(/-->/g, "\u2192").slice(0, 240);
|
|
@@ -620,6 +655,8 @@ function latestRecallAt(recalls) {
|
|
|
620
655
|
export {
|
|
621
656
|
registerCrashCleanup,
|
|
622
657
|
installCrashGuard,
|
|
658
|
+
normalizeForSimilarity,
|
|
659
|
+
memorySimilarity,
|
|
623
660
|
classifyMemoryHeat,
|
|
624
661
|
MEMORY_TYPES,
|
|
625
662
|
DEFAULT_MEMORY_BEHAVIOR,
|
|
@@ -99,7 +99,7 @@ var FlavorConfigSchema = external_exports.object({
|
|
|
99
99
|
scoreThreshold: external_exports.number().int().min(0).max(12).default(9),
|
|
100
100
|
autoStoreThreshold: external_exports.number().int().min(0).max(12).default(11),
|
|
101
101
|
ignoreStreakLimit: external_exports.number().int().min(2).max(100).default(5),
|
|
102
|
-
reviewAutoDismissSeconds: external_exports.number().int().min(0).max(300).default(
|
|
102
|
+
reviewAutoDismissSeconds: external_exports.number().int().min(0).max(300).default(0),
|
|
103
103
|
// One candidate per task is a deliberate memory-quality boundary, not a tunable range.
|
|
104
104
|
maxCandidatesPerTask: external_exports.literal(1).default(1),
|
|
105
105
|
retrievalTopK: external_exports.number().int().min(1).max(20).default(5),
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as createFlavorRequire } from "node:module"; const require = createFlavorRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
+
EvolveStore,
|
|
4
5
|
createExecutionEnvironment,
|
|
5
6
|
createProductionRuntime
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G3LKW5SY.js";
|
|
7
8
|
import "./chunk-TIEOVQW6.js";
|
|
8
9
|
import "./chunk-OKHV7CTB.js";
|
|
9
10
|
import {
|
|
10
11
|
DEFAULT_MAX_OUTPUT_BYTES,
|
|
11
12
|
executeShell
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SW7VZDFS.js";
|
|
13
14
|
import "./chunk-IU3UBETC.js";
|
|
14
15
|
import "./chunk-PZ5NKRVA.js";
|
|
15
16
|
import "./chunk-6F66UXBI.js";
|
|
@@ -18,15 +19,15 @@ import "./chunk-7Y64WNBB.js";
|
|
|
18
19
|
import "./chunk-CVP5OUHD.js";
|
|
19
20
|
import "./chunk-3563SW4X.js";
|
|
20
21
|
import "./chunk-RBAZLFKB.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-SAAIDKTM.js";
|
|
22
23
|
import "./chunk-WLZUAVVU.js";
|
|
23
24
|
import "./chunk-RV3EXUXM.js";
|
|
24
25
|
import "./chunk-IQEEFDEE.js";
|
|
25
26
|
import "./chunk-GTFP2R5I.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-MVBRIM53.js";
|
|
28
|
+
import "./chunk-CI6IHATI.js";
|
|
28
29
|
import "./chunk-BDX777JR.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-TZ7PI4NZ.js";
|
|
30
31
|
import {
|
|
31
32
|
external_exports
|
|
32
33
|
} from "./chunk-EWD7FWTH.js";
|
|
@@ -35,8 +36,8 @@ import "./chunk-X442CJJH.js";
|
|
|
35
36
|
import "./chunk-ZKKVSR37.js";
|
|
36
37
|
|
|
37
38
|
// src/eval/cli.ts
|
|
38
|
-
import { readFile, writeFile } from "fs/promises";
|
|
39
|
-
import { dirname, resolve } from "path";
|
|
39
|
+
import { readFile, realpath, stat, writeFile } from "fs/promises";
|
|
40
|
+
import { dirname, isAbsolute, relative, resolve, sep } from "path";
|
|
40
41
|
|
|
41
42
|
// src/execution/local.ts
|
|
42
43
|
var LocalExecutionEnvironment = class {
|
|
@@ -69,11 +70,23 @@ var EvaluationSpecSchema = external_exports.object({
|
|
|
69
70
|
|
|
70
71
|
// src/eval/runner.ts
|
|
71
72
|
var DEFAULT_VERIFICATION_TIMEOUT_MS = 10 * 6e4;
|
|
73
|
+
async function runPairedEvaluation(spec, dependencies) {
|
|
74
|
+
const baseline = await runEvaluation({ ...spec, workspace: spec.baselineWorkspace }, {
|
|
75
|
+
...dependencies,
|
|
76
|
+
executionEnvironment: dependencies.baselineExecutionEnvironment ?? dependencies.executionEnvironment
|
|
77
|
+
});
|
|
78
|
+
const candidate = await runEvaluation({ ...spec, workspace: spec.candidateWorkspace }, dependencies);
|
|
79
|
+
const lostCheck = baseline.verification.some((check, index) => check.passed && !candidate.verification[index]?.passed);
|
|
80
|
+
const gainedCheck = candidate.verification.some((check, index) => check.passed && !baseline.verification[index]?.passed);
|
|
81
|
+
const verdict = lostCheck || baseline.tokens.withinBudget && !candidate.tokens.withinBudget || !baseline.agentError && candidate.agentError ? "regressed" : gainedCheck || !baseline.tokens.withinBudget && candidate.tokens.withinBudget || baseline.agentError && !candidate.agentError ? "improved" : "unchanged";
|
|
82
|
+
return { name: spec.name, baseline, candidate, verdict, passed: candidate.passed && verdict !== "regressed" };
|
|
83
|
+
}
|
|
72
84
|
async function runEvaluation(spec, dependencies) {
|
|
73
85
|
const now = dependencies.now ?? Date.now;
|
|
74
86
|
const started = now();
|
|
75
87
|
let input = 0;
|
|
76
88
|
let output = 0;
|
|
89
|
+
let agentError = false;
|
|
77
90
|
const runtime = await dependencies.createRuntime({
|
|
78
91
|
workspace: spec.workspace,
|
|
79
92
|
output: (event) => {
|
|
@@ -83,12 +96,16 @@ async function runEvaluation(spec, dependencies) {
|
|
|
83
96
|
} else if (event.type === "done" && input === 0 && output === 0) {
|
|
84
97
|
input = event.usage.inputTokens;
|
|
85
98
|
output = event.usage.outputTokens;
|
|
99
|
+
} else if (event.type === "error") {
|
|
100
|
+
agentError = true;
|
|
86
101
|
}
|
|
87
102
|
}
|
|
88
103
|
});
|
|
89
104
|
try {
|
|
90
105
|
await runtime.session.start();
|
|
91
106
|
await runtime.session.submit(spec.prompt);
|
|
107
|
+
} catch {
|
|
108
|
+
agentError = true;
|
|
92
109
|
} finally {
|
|
93
110
|
await runtime.session.close();
|
|
94
111
|
await runtime.dispose();
|
|
@@ -114,7 +131,8 @@ async function runEvaluation(spec, dependencies) {
|
|
|
114
131
|
return {
|
|
115
132
|
name: spec.name,
|
|
116
133
|
workspace: spec.workspace,
|
|
117
|
-
passed: withinBudget && verification.every((item) => item.passed),
|
|
134
|
+
passed: !agentError && withinBudget && verification.every((item) => item.passed),
|
|
135
|
+
agentError,
|
|
118
136
|
durationMs: Math.max(0, now() - started),
|
|
119
137
|
tokens: { input, output, total, withinBudget },
|
|
120
138
|
verification
|
|
@@ -122,7 +140,7 @@ async function runEvaluation(spec, dependencies) {
|
|
|
122
140
|
}
|
|
123
141
|
|
|
124
142
|
// src/eval/cli.ts
|
|
125
|
-
async function runEvaluationFile(path, outputPath) {
|
|
143
|
+
async function runEvaluationFile(path, outputPath, baselinePath) {
|
|
126
144
|
const specPath = resolve(path);
|
|
127
145
|
const parsed = EvaluationSpecSchema.parse(JSON.parse(await readFile(specPath, "utf8")));
|
|
128
146
|
const workspace = resolve(dirname(specPath), parsed.workspace);
|
|
@@ -137,20 +155,54 @@ async function runEvaluationFile(path, outputPath) {
|
|
|
137
155
|
})),
|
|
138
156
|
...parsed.maxTokens === void 0 ? {} : { maxTokens: parsed.maxTokens }
|
|
139
157
|
};
|
|
140
|
-
const configured = await import("./load-
|
|
158
|
+
const configured = await import("./load-JINXGR3N.js").then(({ loadConfig }) => loadConfig({ cwd: workspace, home: process.env.USERPROFILE ?? process.env.HOME ?? workspace }));
|
|
141
159
|
const environment = createExecutionEnvironment(workspace, configured.config.execution) ?? new LocalExecutionEnvironment();
|
|
160
|
+
let baselineEnvironment;
|
|
142
161
|
let report;
|
|
143
162
|
try {
|
|
144
|
-
|
|
163
|
+
const dependencies = {
|
|
145
164
|
createRuntime: (options) => createProductionRuntime({
|
|
146
165
|
...options,
|
|
147
166
|
home: process.env.USERPROFILE ?? process.env.HOME ?? workspace,
|
|
148
167
|
approvalPolicy: "deny"
|
|
149
168
|
}),
|
|
150
169
|
executionEnvironment: environment
|
|
151
|
-
}
|
|
170
|
+
};
|
|
171
|
+
if (baselinePath === void 0) report = await runEvaluation(spec, dependencies);
|
|
172
|
+
else {
|
|
173
|
+
const baselineWorkspace = resolve(baselinePath);
|
|
174
|
+
if (!(await stat(baselineWorkspace)).isDirectory()) throw new Error("Baseline workspace is not a directory");
|
|
175
|
+
const [realBaseline, realCandidate] = await Promise.all([realpath(baselineWorkspace), realpath(workspace)]);
|
|
176
|
+
const nested = (parent, child) => {
|
|
177
|
+
const path2 = relative(parent, child);
|
|
178
|
+
return path2 === "" || path2 !== ".." && !path2.startsWith(`..${sep}`) && !isAbsolute(path2);
|
|
179
|
+
};
|
|
180
|
+
if (nested(realBaseline, realCandidate) || nested(realCandidate, realBaseline)) {
|
|
181
|
+
throw new Error("Baseline and candidate workspaces must be separate, non-nested directories");
|
|
182
|
+
}
|
|
183
|
+
const baselineConfigured = await import("./load-JINXGR3N.js").then(({ loadConfig }) => loadConfig({ cwd: baselineWorkspace, home: process.env.USERPROFILE ?? process.env.HOME ?? baselineWorkspace }));
|
|
184
|
+
baselineEnvironment = createExecutionEnvironment(baselineWorkspace, baselineConfigured.config.execution) ?? new LocalExecutionEnvironment();
|
|
185
|
+
const paired = await runPairedEvaluation({ ...spec, baselineWorkspace, candidateWorkspace: workspace }, {
|
|
186
|
+
...dependencies,
|
|
187
|
+
baselineExecutionEnvironment: baselineEnvironment
|
|
188
|
+
});
|
|
189
|
+
report = paired;
|
|
190
|
+
const compact = (side) => ({
|
|
191
|
+
passed: side.passed,
|
|
192
|
+
durationMs: side.durationMs,
|
|
193
|
+
tokens: side.tokens.total,
|
|
194
|
+
checksPassed: side.verification.filter((check) => check.passed).length,
|
|
195
|
+
checksTotal: side.verification.length
|
|
196
|
+
});
|
|
197
|
+
await new EvolveStore({ workspace }).appendComparison({
|
|
198
|
+
caseName: spec.name,
|
|
199
|
+
baseline: compact(paired.baseline),
|
|
200
|
+
candidate: compact(paired.candidate),
|
|
201
|
+
verdict: paired.verdict
|
|
202
|
+
});
|
|
203
|
+
}
|
|
152
204
|
} finally {
|
|
153
|
-
await environment.dispose();
|
|
205
|
+
await Promise.all([baselineEnvironment?.dispose(), environment.dispose()]);
|
|
154
206
|
}
|
|
155
207
|
const body = `${JSON.stringify(report, null, 2)}
|
|
156
208
|
`;
|
package/dist/cli-main.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as createFlavorRequire } from "node:module"; const require = createFlavorRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
staticTaskLines
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-55YUJKT4.js";
|
|
6
6
|
import {
|
|
7
7
|
source_default
|
|
8
8
|
} from "./chunk-AA4QNKTF.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MemoryStore,
|
|
12
12
|
classifyMemoryHeat,
|
|
13
13
|
installCrashGuard
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SAAIDKTM.js";
|
|
15
15
|
import {
|
|
16
16
|
redactErrorText
|
|
17
17
|
} from "./chunk-WLZUAVVU.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
loadConfig,
|
|
29
29
|
readRecoverableFile,
|
|
30
30
|
updateProtectedFile
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MVBRIM53.js";
|
|
32
32
|
import {
|
|
33
33
|
message
|
|
34
34
|
} from "./chunk-BDX777JR.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
McpServerConfigSchema,
|
|
37
37
|
McpServerNameSchema,
|
|
38
38
|
configPathSegments
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TZ7PI4NZ.js";
|
|
40
40
|
import "./chunk-EWD7FWTH.js";
|
|
41
41
|
import "./chunk-ZKKVSR37.js";
|
|
42
42
|
|
|
@@ -3743,7 +3743,7 @@ function registerSessionCommands(program2, dependencies = {}) {
|
|
|
3743
3743
|
const cwd = dependencies.cwd ?? (() => process.cwd());
|
|
3744
3744
|
const write = dependencies.write ?? ((text) => process.stdout.write(text));
|
|
3745
3745
|
const open = dependencies.open ?? (async ({ workspace }) => {
|
|
3746
|
-
const { SessionStore } = await import("./store-
|
|
3746
|
+
const { SessionStore } = await import("./store-Y4V5TLXE.js");
|
|
3747
3747
|
return new SessionStore({ workspace });
|
|
3748
3748
|
});
|
|
3749
3749
|
const store = () => open({ workspace: cwd() });
|
|
@@ -3869,19 +3869,19 @@ function registerConfigCommands(program2, dependencies = {}) {
|
|
|
3869
3869
|
const home = dependencies.home ?? homedir2;
|
|
3870
3870
|
const write = dependencies.write ?? ((text) => process.stdout.write(text));
|
|
3871
3871
|
const load = dependencies.load ?? (async ({ cwd: dir, home: homeDir }) => {
|
|
3872
|
-
const { loadConfig: loadConfig2 } = await import("./load-
|
|
3872
|
+
const { loadConfig: loadConfig2 } = await import("./load-JINXGR3N.js");
|
|
3873
3873
|
return loadConfig2({ cwd: dir, home: homeDir });
|
|
3874
3874
|
});
|
|
3875
3875
|
const redactSecrets = dependencies.redact ?? (async (config2) => {
|
|
3876
|
-
const { redactConfig } = await import("./load-
|
|
3876
|
+
const { redactConfig } = await import("./load-JINXGR3N.js");
|
|
3877
3877
|
return redactConfig(config2);
|
|
3878
3878
|
});
|
|
3879
3879
|
const setValue = dependencies.setValue ?? (async (dir, homeDir, key, value) => {
|
|
3880
|
-
const { setProjectConfigValue } = await import("./load-
|
|
3880
|
+
const { setProjectConfigValue } = await import("./load-JINXGR3N.js");
|
|
3881
3881
|
return setProjectConfigValue(dir, homeDir, key, value);
|
|
3882
3882
|
});
|
|
3883
3883
|
const unsetValue = dependencies.unsetValue ?? (async (dir, key) => {
|
|
3884
|
-
const { unsetProjectConfigValue } = await import("./load-
|
|
3884
|
+
const { unsetProjectConfigValue } = await import("./load-JINXGR3N.js");
|
|
3885
3885
|
return unsetProjectConfigValue(dir, key);
|
|
3886
3886
|
});
|
|
3887
3887
|
const config = program2.command("config").description("Inspect and edit Flavor configuration");
|
|
@@ -4030,7 +4030,7 @@ function createProgram(dependencies = {}) {
|
|
|
4030
4030
|
});
|
|
4031
4031
|
program2.command("doctor [directory]").description("Diagnose the local Flavor runtime, configuration, tools, plugins, and npm access").option("--json", "print the report as JSON").action(async (directory, command) => {
|
|
4032
4032
|
try {
|
|
4033
|
-
const doctor = await import("./doctor-
|
|
4033
|
+
const doctor = await import("./doctor-77UMJ6TK.js");
|
|
4034
4034
|
const report = await (dependencies.runDoctor ?? doctor.runDoctor)({
|
|
4035
4035
|
workspace: resolve(directory ?? process.cwd()),
|
|
4036
4036
|
home: homedir3()
|
|
@@ -4047,7 +4047,7 @@ function createProgram(dependencies = {}) {
|
|
|
4047
4047
|
const skills = program2.command("skills").description("List and enable or disable project skills");
|
|
4048
4048
|
skills.command("list", { isDefault: true }).description("List skills visible in the current project").action(async () => {
|
|
4049
4049
|
try {
|
|
4050
|
-
const { SkillManager } = await import("./manager-
|
|
4050
|
+
const { SkillManager } = await import("./manager-UTQT466W.js");
|
|
4051
4051
|
const entries = await new SkillManager({ workspace: process.cwd(), home: homedir3() }).list();
|
|
4052
4052
|
if (entries.length === 0) process.stdout.write("No skills found.\n");
|
|
4053
4053
|
else for (const skill of entries) {
|
|
@@ -4064,7 +4064,7 @@ function createProgram(dependencies = {}) {
|
|
|
4064
4064
|
const action = enabled ? "enable" : "disable";
|
|
4065
4065
|
skills.command(`${action} <name>`).description(`${enabled ? "Enable" : "Disable"} a skill for this project`).action(async (name) => {
|
|
4066
4066
|
try {
|
|
4067
|
-
const { SkillManager } = await import("./manager-
|
|
4067
|
+
const { SkillManager } = await import("./manager-UTQT466W.js");
|
|
4068
4068
|
await new SkillManager({ workspace: process.cwd(), home: homedir3() }).setEnabled(name, enabled);
|
|
4069
4069
|
process.stdout.write(`${enabled ? "Enabled" : "Disabled"} ${name}.
|
|
4070
4070
|
`);
|
|
@@ -4080,9 +4080,9 @@ function createProgram(dependencies = {}) {
|
|
|
4080
4080
|
registerSessionCommands(program2);
|
|
4081
4081
|
registerConfigCommands(program2);
|
|
4082
4082
|
registerUsageCommands(program2);
|
|
4083
|
-
program2.command("eval <spec>").option("--output <path>", "write the JSON report to a file").description("run a repeatable coding-agent evaluation").action(async (spec, command) => {
|
|
4084
|
-
const { runEvaluationFile } = await import("./cli-
|
|
4085
|
-
process.exitCode = await runEvaluationFile(spec, command.output);
|
|
4083
|
+
program2.command("eval <spec>").option("--output <path>", "write the JSON report to a file").option("--baseline <workspace>", "compare against an isolated baseline workspace and save a compact local result").description("run a repeatable coding-agent evaluation").action(async (spec, command) => {
|
|
4084
|
+
const { runEvaluationFile } = await import("./cli-4NWD3ZN3.js");
|
|
4085
|
+
process.exitCode = await runEvaluationFile(spec, command.output, command.baseline);
|
|
4086
4086
|
});
|
|
4087
4087
|
program2.action(async (options) => {
|
|
4088
4088
|
if (options.palsBroker !== void 0) {
|
|
@@ -4171,9 +4171,9 @@ async function runInteractiveCli(props) {
|
|
|
4171
4171
|
let endedSessionId;
|
|
4172
4172
|
try {
|
|
4173
4173
|
const [{ render, AlternateScreen }, { default: React }, { App }] = await Promise.all([
|
|
4174
|
-
import("./claude-ink-
|
|
4174
|
+
import("./claude-ink-5X2DRKN6.js"),
|
|
4175
4175
|
import("./react-M6JGXSJZ.js"),
|
|
4176
|
-
import("./app-
|
|
4176
|
+
import("./app-IUPRUKWJ.js")
|
|
4177
4177
|
]);
|
|
4178
4178
|
const instance = await render(React.createElement(
|
|
4179
4179
|
AlternateScreen,
|
|
@@ -4212,7 +4212,7 @@ async function runRpcMode(options) {
|
|
|
4212
4212
|
import("./server-2KLKPHPL.js"),
|
|
4213
4213
|
import("./write-stream-CGD57URC.js"),
|
|
4214
4214
|
import("./recorder-FAGJJH3N.js"),
|
|
4215
|
-
import("./production-
|
|
4215
|
+
import("./production-J7ZWR7VL.js")
|
|
4216
4216
|
]);
|
|
4217
4217
|
let recorder;
|
|
4218
4218
|
try {
|
|
@@ -4346,7 +4346,7 @@ async function runPrint(prompt, dependencies = {}, resumeSession, memoryRestart
|
|
|
4346
4346
|
code = 1;
|
|
4347
4347
|
});
|
|
4348
4348
|
try {
|
|
4349
|
-
const createRuntime = dependencies.createRuntime ?? (await import("./production-
|
|
4349
|
+
const createRuntime = dependencies.createRuntime ?? (await import("./production-J7ZWR7VL.js")).createProductionRuntime;
|
|
4350
4350
|
runtime = await createRuntime({
|
|
4351
4351
|
workspace: process.cwd(),
|
|
4352
4352
|
home: homedir3(),
|