flavor-code 1.4.3-beta.2 → 1.4.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/README.md +25 -0
- package/README.zh-CN.md +25 -0
- package/dist/agent/loop.d.ts +1 -0
- package/dist/{app-G35YBHPR.js → app-TVY2HM5L.js} +342 -112
- package/dist/{chunk-FAJ6YDZK.js → chunk-36IDJRLQ.js} +1 -1
- package/dist/{chunk-HGTCIHWA.js → chunk-5BDKRA6U.js} +30 -1
- package/dist/{chunk-T6RE76D2.js → chunk-IKGT4MDT.js} +35 -23
- package/dist/{chunk-K7UGGWJV.js → chunk-JQM2L2YM.js} +1 -1
- package/dist/{chunk-6X62CGMA.js → chunk-ONRY3C2L.js} +3 -0
- package/dist/{chunk-IDJAHEG6.js → chunk-QACFKPZP.js} +391 -188
- package/dist/{chunk-SJUIIHIA.js → chunk-X6U6BO5D.js} +1 -1
- package/dist/{claude-ink-BE56DB6N.js → claude-ink-F554I3GJ.js} +1 -1
- package/dist/{cli-3MF6EL2H.js → cli-MAWCV2YR.js} +7 -7
- package/dist/cli-main.js +16 -16
- package/dist/config/protected-file.d.ts +2 -0
- package/dist/config/schema.d.ts +3 -0
- package/dist/context/global-instructions.d.ts +12 -0
- package/dist/context/manager.d.ts +2 -0
- package/dist/desktop/main.js +651 -419
- package/dist/desktop-renderer/assets/{index-DCqIrF1S.js → index-CjC0Ibiq.js} +2 -2
- package/dist/desktop-renderer/assets/{interactive-terminal-B6GbpzIn.js → interactive-terminal-IjIT3Xoa.js} +1 -1
- package/dist/desktop-renderer/index.html +1 -1
- package/dist/{doctor-OHCGK52S.js → doctor-SEL32R7M.js} +3 -3
- package/dist/harness/local.d.ts +1 -0
- package/dist/{load-QK6CMLDF.js → load-RHWXNUCS.js} +2 -2
- package/dist/{manager-5SI4MPES.js → manager-IYBNNKUP.js} +2 -2
- package/dist/{production-6DIZ6YLQ.js → production-TQROFEPV.js} +6 -6
- package/dist/sdk/index.js +6 -6
- package/dist/{store-ZIHN6363.js → store-MZZERW7K.js} +2 -2
- package/dist/ui/commands.d.ts +11 -3
- package/dist/ui/session.d.ts +2 -1
- 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 +649 -1
|
@@ -3,13 +3,13 @@ import { createRequire as createFlavorRequire } from "node:module"; const requir
|
|
|
3
3
|
import {
|
|
4
4
|
createExecutionEnvironment,
|
|
5
5
|
createProductionRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QACFKPZP.js";
|
|
7
7
|
import "./chunk-TIEOVQW6.js";
|
|
8
8
|
import "./chunk-OKHV7CTB.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_MAX_OUTPUT_BYTES,
|
|
11
11
|
executeShell
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JQM2L2YM.js";
|
|
13
13
|
import "./chunk-IU3UBETC.js";
|
|
14
14
|
import "./chunk-PZ5NKRVA.js";
|
|
15
15
|
import "./chunk-6F66UXBI.js";
|
|
@@ -18,15 +18,15 @@ import "./chunk-7Y64WNBB.js";
|
|
|
18
18
|
import "./chunk-CVP5OUHD.js";
|
|
19
19
|
import "./chunk-3563SW4X.js";
|
|
20
20
|
import "./chunk-RBAZLFKB.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-36IDJRLQ.js";
|
|
22
22
|
import "./chunk-WLZUAVVU.js";
|
|
23
23
|
import "./chunk-RV3EXUXM.js";
|
|
24
24
|
import "./chunk-IQEEFDEE.js";
|
|
25
25
|
import "./chunk-GTFP2R5I.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-5BDKRA6U.js";
|
|
27
|
+
import "./chunk-X6U6BO5D.js";
|
|
28
28
|
import "./chunk-BDX777JR.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-ONRY3C2L.js";
|
|
30
30
|
import {
|
|
31
31
|
external_exports
|
|
32
32
|
} from "./chunk-EWD7FWTH.js";
|
|
@@ -137,7 +137,7 @@ async function runEvaluationFile(path, outputPath) {
|
|
|
137
137
|
})),
|
|
138
138
|
...parsed.maxTokens === void 0 ? {} : { maxTokens: parsed.maxTokens }
|
|
139
139
|
};
|
|
140
|
-
const configured = await import("./load-
|
|
140
|
+
const configured = await import("./load-RHWXNUCS.js").then(({ loadConfig }) => loadConfig({ cwd: workspace, home: process.env.USERPROFILE ?? process.env.HOME ?? workspace }));
|
|
141
141
|
const environment = createExecutionEnvironment(workspace, configured.config.execution) ?? new LocalExecutionEnvironment();
|
|
142
142
|
let report;
|
|
143
143
|
try {
|
package/dist/cli-main.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MemoryStore,
|
|
12
12
|
classifyMemoryHeat,
|
|
13
13
|
installCrashGuard
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-36IDJRLQ.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-5BDKRA6U.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-ONRY3C2L.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-MZZERW7K.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-RHWXNUCS.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-RHWXNUCS.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-RHWXNUCS.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-RHWXNUCS.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-SEL32R7M.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-IYBNNKUP.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-IYBNNKUP.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
|
`);
|
|
@@ -4081,7 +4081,7 @@ function createProgram(dependencies = {}) {
|
|
|
4081
4081
|
registerConfigCommands(program2);
|
|
4082
4082
|
registerUsageCommands(program2);
|
|
4083
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-
|
|
4084
|
+
const { runEvaluationFile } = await import("./cli-MAWCV2YR.js");
|
|
4085
4085
|
process.exitCode = await runEvaluationFile(spec, command.output);
|
|
4086
4086
|
});
|
|
4087
4087
|
program2.action(async (options) => {
|
|
@@ -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-F554I3GJ.js"),
|
|
4175
4175
|
import("./react-M6JGXSJZ.js"),
|
|
4176
|
-
import("./app-
|
|
4176
|
+
import("./app-TVY2HM5L.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-TQROFEPV.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-TQROFEPV.js")).createProductionRuntime;
|
|
4350
4350
|
runtime = await createRuntime({
|
|
4351
4351
|
workspace: process.cwd(),
|
|
4352
4352
|
home: homedir3(),
|
|
@@ -19,3 +19,5 @@ export interface ProtectedFileOperations {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function readRecoverableFile<T>(path: string, decode: (raw: string) => T | Promise<T>): Promise<RecoverableFile<T> | undefined>;
|
|
21
21
|
export declare function updateProtectedFile<T>(options: ProtectedFileUpdate<T>): Promise<T>;
|
|
22
|
+
/** Lock and atomically update user-authored text without backup recovery or rewriting unchanged content. */
|
|
23
|
+
export declare function updatePlainTextFile(path: string, update: (current: string | undefined) => string | undefined | Promise<string | undefined>, maxBytes?: number): Promise<string | undefined>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -120,6 +120,9 @@ export declare const FlavorConfigSchema: z.ZodObject<{
|
|
|
120
120
|
skills: z.ZodPrefault<z.ZodObject<{
|
|
121
121
|
disabled: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
122
122
|
}, z.core.$strip>>;
|
|
123
|
+
globalInstructions: z.ZodPrefault<z.ZodObject<{
|
|
124
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
123
126
|
agents: z.ZodOptional<z.ZodObject<{
|
|
124
127
|
main: z.ZodOptional<z.ZodObject<{
|
|
125
128
|
model: z.ZodString;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** User-maintained rules; only explicit /global commands write this file. */
|
|
2
|
+
export declare class GlobalInstructions {
|
|
3
|
+
#private;
|
|
4
|
+
static readonly MAX_BYTES: number;
|
|
5
|
+
static readonly MAX_RULE_BYTES: number;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
constructor(home: string);
|
|
8
|
+
get content(): string | undefined;
|
|
9
|
+
refresh(): Promise<void>;
|
|
10
|
+
remember(input: string): Promise<"added" | "already-present">;
|
|
11
|
+
forget(input: string): Promise<"removed" | "not-found" | "ambiguous">;
|
|
12
|
+
}
|
|
@@ -12,6 +12,8 @@ export interface ContextManagerOptions {
|
|
|
12
12
|
taskState?: string;
|
|
13
13
|
/** Stable user preferences, emitted as the final system section for prompt caching. */
|
|
14
14
|
userMemory?: SystemPromptSource;
|
|
15
|
+
/** User-authored global rules, placed after the stable cache breakpoint. */
|
|
16
|
+
globalInstructions?: SystemPromptSource;
|
|
15
17
|
/** @deprecated Prefer token-based compaction policy. */
|
|
16
18
|
compactAtChars?: number;
|
|
17
19
|
toolOutputChars: number;
|