flavor-code 1.4.0-beta.5 → 1.4.0-beta.6
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/{app-SXNJDSI2.js → app-6JRSYZYV.js} +2 -2
- package/dist/{chunk-JZVC4477.js → chunk-6MXAOTIZ.js} +1 -1
- package/dist/{chunk-J7TLT6LR.js → chunk-NLYZ7DMC.js} +7 -0
- package/dist/{chunk-IQAZ42TM.js → chunk-XMRKRPNC.js} +178 -14252
- package/dist/{claude-ink-ECZ6QF3P.js → claude-ink-6EZHF64C.js} +1 -1
- package/dist/cli-main.js +37 -13
- package/dist/cli.js +4 -1
- package/dist/desktop/main.js +7 -0
- package/dist/sdk/index.js +2 -2
- package/package.json +5 -4
- package/dist/devtools-4QTPKBKK.js +0 -2
package/dist/cli-main.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module"; const require = createRequire(impor
|
|
|
3
3
|
import {
|
|
4
4
|
FlavorRpcServer,
|
|
5
5
|
TraceRecorder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6MXAOTIZ.js";
|
|
7
7
|
import {
|
|
8
8
|
staticTaskLines
|
|
9
9
|
} from "./chunk-2BF7CVWZ.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
redactErrorText,
|
|
30
30
|
runDoctor,
|
|
31
31
|
runPalBroker
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NLYZ7DMC.js";
|
|
33
33
|
import {
|
|
34
34
|
MEMORY_RESTART_EXIT_CODE
|
|
35
35
|
} from "./chunk-N5MXHJKD.js";
|
|
@@ -85,6 +85,25 @@ async function runUpdate(options = {}) {
|
|
|
85
85
|
return exitCode === 0 ? { status: "updated", current, latest } : { status: "install-failed", current, latest, exitCode };
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
// src/ui/user-timing.ts
|
|
89
|
+
import { performance } from "perf_hooks";
|
|
90
|
+
function clearUiUserTimingEntries() {
|
|
91
|
+
performance.clearMarks();
|
|
92
|
+
performance.clearMeasures();
|
|
93
|
+
}
|
|
94
|
+
function installUiUserTimingSweeper(intervalMs = 250) {
|
|
95
|
+
if (!Number.isSafeInteger(intervalMs) || intervalMs <= 0) {
|
|
96
|
+
throw new Error("User Timing sweep interval must be a positive integer");
|
|
97
|
+
}
|
|
98
|
+
clearUiUserTimingEntries();
|
|
99
|
+
const timer = setInterval(clearUiUserTimingEntries, intervalMs);
|
|
100
|
+
timer.unref();
|
|
101
|
+
return () => {
|
|
102
|
+
clearInterval(timer);
|
|
103
|
+
clearUiUserTimingEntries();
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
88
107
|
// src/skills/manager.ts
|
|
89
108
|
import { lstat, mkdir, readFile, readdir, realpath, rm, writeFile } from "fs/promises";
|
|
90
109
|
import { homedir } from "os";
|
|
@@ -897,17 +916,22 @@ function createProgram(dependencies = {}) {
|
|
|
897
916
|
return program;
|
|
898
917
|
}
|
|
899
918
|
async function runInteractiveCli(props) {
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
919
|
+
const disposeUserTimingSweeper = installUiUserTimingSweeper();
|
|
920
|
+
try {
|
|
921
|
+
const [{ render, AlternateScreen }, { createElement }, { App }] = await Promise.all([
|
|
922
|
+
import("./claude-ink-6EZHF64C.js"),
|
|
923
|
+
import("react"),
|
|
924
|
+
import("./app-6JRSYZYV.js")
|
|
925
|
+
]);
|
|
926
|
+
const instance = await render(createElement(
|
|
927
|
+
AlternateScreen,
|
|
928
|
+
{ mouseTracking: true },
|
|
929
|
+
createElement(App, props)
|
|
930
|
+
), { exitOnCtrlC: false });
|
|
931
|
+
await instance.waitUntilExit();
|
|
932
|
+
} finally {
|
|
933
|
+
disposeUserTimingSweeper();
|
|
934
|
+
}
|
|
911
935
|
}
|
|
912
936
|
function parsePalAlias(value) {
|
|
913
937
|
const alias = value.trim();
|
package/dist/cli.js
CHANGED
|
@@ -109,7 +109,10 @@ async function launchCli() {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
async function spawnAndWait(mainPath, argv, heapProfile) {
|
|
112
|
-
const child = spawn(process.execPath, cliMainArguments(mainPath, argv, heapProfile), {
|
|
112
|
+
const child = spawn(process.execPath, cliMainArguments(mainPath, argv, heapProfile), {
|
|
113
|
+
stdio: "inherit",
|
|
114
|
+
env: { ...process.env, NODE_ENV: "production" }
|
|
115
|
+
});
|
|
113
116
|
const ignoreSignal = () => {
|
|
114
117
|
};
|
|
115
118
|
process.on("SIGINT", ignoreSignal);
|
package/dist/desktop/main.js
CHANGED
|
@@ -4234,6 +4234,7 @@ import { mkdirSync as mkdirSync4, readFileSync as readFileSync3, renameSync as r
|
|
|
4234
4234
|
import { createHash as createHash21, randomUUID as randomUUID25 } from "crypto";
|
|
4235
4235
|
import { homedir as homedir3, release as osRelease, tmpdir as tmpdir4, version as osVersion } from "os";
|
|
4236
4236
|
import { basename as basename9, dirname as dirname22, join as join38, relative as relative25, resolve as resolve36, sep as sep25 } from "path";
|
|
4237
|
+
import { performance } from "perf_hooks";
|
|
4237
4238
|
|
|
4238
4239
|
// src/agent/subagents.ts
|
|
4239
4240
|
import { z as z10 } from "zod";
|
|
@@ -27876,6 +27877,12 @@ async function createProductionRuntime(options) {
|
|
|
27876
27877
|
holders.transcriptTurns = { entries: transcript.turns };
|
|
27877
27878
|
} catch {
|
|
27878
27879
|
}
|
|
27880
|
+
try {
|
|
27881
|
+
holders.userTiming = {
|
|
27882
|
+
entries: performance.getEntriesByType("measure").length + performance.getEntriesByType("mark").length
|
|
27883
|
+
};
|
|
27884
|
+
} catch {
|
|
27885
|
+
}
|
|
27879
27886
|
return holders;
|
|
27880
27887
|
};
|
|
27881
27888
|
const rotateForHeap = (continuation, reading) => {
|
package/dist/sdk/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
FlavorRpcServer,
|
|
5
5
|
TraceRecordSchema,
|
|
6
6
|
TraceRecorder
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6MXAOTIZ.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentMessageQueue,
|
|
10
10
|
DockerExecutionEnvironment,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
WorkspaceCheckpointStore,
|
|
14
14
|
buildDockerInvocation,
|
|
15
15
|
createProductionRuntime
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-NLYZ7DMC.js";
|
|
17
17
|
import "../chunk-N5MXHJKD.js";
|
|
18
18
|
import "../chunk-KQMKY7C5.js";
|
|
19
19
|
import "../chunk-ZJCAQXA7.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flavor-code",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.6",
|
|
4
4
|
"author": "YachuanWzh",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "npm run build:icons && npm run build:cli && npm run build:desktop",
|
|
33
33
|
"build:icons": "node scripts/build-icons.mjs",
|
|
34
|
-
"build:cli": "tsup && tsc -p tsconfig.sdk.json",
|
|
34
|
+
"build:cli": "tsup && tsc -p tsconfig.sdk.json && node scripts/assert-production-cli.mjs",
|
|
35
35
|
"build:desktop": "npm run build:desktop:main && npm run build:desktop:renderer",
|
|
36
36
|
"build:desktop:main": "tsup --config tsup.desktop.config.ts",
|
|
37
37
|
"build:desktop:renderer": "vite build --config vite.desktop.config.ts",
|
|
@@ -51,8 +51,9 @@
|
|
|
51
51
|
"typecheck": "tsc --noEmit",
|
|
52
52
|
"smoke:install": "node scripts/smoke-install.mjs",
|
|
53
53
|
"smoke:d2c-worker": "npm run build:desktop:main && node scripts/smoke-d2c-worker.mjs",
|
|
54
|
-
"stress:context": "vitest run scripts/stress-context-memory.test.ts --reporter=verbose",
|
|
55
|
-
"stress:
|
|
54
|
+
"stress:context": "vitest run scripts/stress-context-memory.test.ts --reporter=verbose",
|
|
55
|
+
"stress:tui-memory": "npm run build:cli && node scripts/run-tui-memory-stress.mjs",
|
|
56
|
+
"stress:production-memory": "npm run build:cli && node scripts/stress-production-memory.mjs",
|
|
56
57
|
"evidence:crash-fix": "vitest run scripts/evidence-crash-replay.test.ts --reporter=verbose",
|
|
57
58
|
"prepack": "npm run build"
|
|
58
59
|
},
|