@jun133/kitty 0.0.12 → 0.0.13
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/{chunk-TISOA5U6.mjs → chunk-6WGSABUQ.mjs} +23 -7
- package/dist/{chunk-TOBF3KV3.mjs → chunk-DWGFLIQA.mjs} +1 -1
- package/dist/{chunk-MV5BYUNW.mjs → chunk-MMIH75OY.mjs} +1 -0
- package/dist/cli.js +24 -7
- package/dist/cli.js.map +1 -1
- package/dist/{interactive-WYSTB4UQ.mjs → interactive-RSJ35TB5.mjs} +3 -3
- package/dist/{oneShot-INJ27LNB.mjs → oneShot-7P5FDWFX.mjs} +2 -2
- package/dist/tui.mjs +2 -2
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
terminatePid,
|
|
24
24
|
writeStderrLine,
|
|
25
25
|
writeStdoutLine
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MMIH75OY.mjs";
|
|
27
27
|
import {
|
|
28
28
|
PRESERVED_PROJECT_STATE_ENTRY_NAMES,
|
|
29
29
|
PROJECT_STATE_DIR_NAME,
|
|
@@ -315,7 +315,7 @@ async function terminateProcesses(processes, cwd) {
|
|
|
315
315
|
|
|
316
316
|
// src/runtime/scene.ts
|
|
317
317
|
function buildRuntimeScene(status) {
|
|
318
|
-
const executions = status
|
|
318
|
+
const executions = readSceneExecutions(status);
|
|
319
319
|
const blockedExecutions = executions.filter((execution) => execution.risk === "blocked");
|
|
320
320
|
const watchExecutions = executions.filter((execution) => execution.risk === "watch");
|
|
321
321
|
const activeBackground = executions.filter((execution) => execution.kind === "background");
|
|
@@ -346,6 +346,19 @@ function buildRuntimeScene(status) {
|
|
|
346
346
|
executions
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
+
function readSceneExecutions(status) {
|
|
350
|
+
const byId = /* @__PURE__ */ new Map();
|
|
351
|
+
for (const execution of status.executions.active) {
|
|
352
|
+
byId.set(execution.id, buildExecutionScene(execution));
|
|
353
|
+
}
|
|
354
|
+
for (const execution of status.executions.recent) {
|
|
355
|
+
const scene = buildExecutionScene(execution);
|
|
356
|
+
if (scene.risk !== "none" && !byId.has(scene.id)) {
|
|
357
|
+
byId.set(scene.id, scene);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return [...byId.values()];
|
|
361
|
+
}
|
|
349
362
|
function buildExecutionScene(execution) {
|
|
350
363
|
const risk = readExecutionRisk(execution);
|
|
351
364
|
return {
|
|
@@ -360,9 +373,6 @@ function buildExecutionScene(execution) {
|
|
|
360
373
|
};
|
|
361
374
|
}
|
|
362
375
|
function buildHeadline(status, blockedExecutions, watchExecutions) {
|
|
363
|
-
if (!status.sessions.latest) {
|
|
364
|
-
return "No active session yet.";
|
|
365
|
-
}
|
|
366
376
|
if (blockedExecutions.length > 0) {
|
|
367
377
|
return `${blockedExecutions.length} execution(s) need attention.`;
|
|
368
378
|
}
|
|
@@ -372,6 +382,9 @@ function buildHeadline(status, blockedExecutions, watchExecutions) {
|
|
|
372
382
|
if (status.executions.active.length > 0) {
|
|
373
383
|
return `${status.executions.active.length} execution(s) are running.`;
|
|
374
384
|
}
|
|
385
|
+
if (!status.sessions.latest) {
|
|
386
|
+
return "No active session yet.";
|
|
387
|
+
}
|
|
375
388
|
return "Ready to continue the latest session.";
|
|
376
389
|
}
|
|
377
390
|
function readFocus(status) {
|
|
@@ -1131,6 +1144,9 @@ function formatRuntimeStatusText(status) {
|
|
|
1131
1144
|
lines.push("Current workspace:");
|
|
1132
1145
|
lines.push(`- Focus: ${status.scene.focus}`);
|
|
1133
1146
|
lines.push(`- Session: ${readSessionLine(status)}`);
|
|
1147
|
+
if (status.sessions.skipped > 0) {
|
|
1148
|
+
lines.push(`- Sessions: ${status.sessions.total} total, ${status.sessions.skipped} skipped`);
|
|
1149
|
+
}
|
|
1134
1150
|
lines.push(`- Next: ${status.scene.nextAction}`);
|
|
1135
1151
|
lines.push(`- Blocked: ${status.scene.blocked}`);
|
|
1136
1152
|
lines.push(`- Context budget: ${readContextBudgetLine(status)}`);
|
|
@@ -1255,9 +1271,9 @@ function formatRuntimeStatusText(status) {
|
|
|
1255
1271
|
].filter(Boolean).join(" "));
|
|
1256
1272
|
}
|
|
1257
1273
|
}
|
|
1258
|
-
if (status.executions.
|
|
1274
|
+
if (status.scene.executions.length > 0) {
|
|
1259
1275
|
lines.push("");
|
|
1260
|
-
lines.push("
|
|
1276
|
+
lines.push("Scene executions:");
|
|
1261
1277
|
for (const execution of status.scene.executions) {
|
|
1262
1278
|
lines.push([
|
|
1263
1279
|
execution.id,
|
|
@@ -1034,6 +1034,7 @@ function buildToolBlock() {
|
|
|
1034
1034
|
function buildCommunicationBlock() {
|
|
1035
1035
|
return [
|
|
1036
1036
|
"Always reply in Simplified Chinese.",
|
|
1037
|
+
"No Markdown in user-facing conversational replies; prefer plain text whenever possible.",
|
|
1037
1038
|
"Provide concise progress updates during multi-step work.",
|
|
1038
1039
|
"Make every sentence carry decision, execution, evidence, or understanding.",
|
|
1039
1040
|
"Claim changed files, passed commands, and successful tools only when tool evidence supports them.",
|
package/dist/cli.js
CHANGED
|
@@ -40,7 +40,7 @@ var init_package = __esm({
|
|
|
40
40
|
"package.json"() {
|
|
41
41
|
package_default = {
|
|
42
42
|
name: "@jun133/kitty",
|
|
43
|
-
version: "0.0.
|
|
43
|
+
version: "0.0.13",
|
|
44
44
|
description: "Agent",
|
|
45
45
|
license: "MIT",
|
|
46
46
|
keywords: [
|
|
@@ -9928,7 +9928,7 @@ var init_projectContext = __esm({
|
|
|
9928
9928
|
|
|
9929
9929
|
// src/runtime/scene.ts
|
|
9930
9930
|
function buildRuntimeScene(status) {
|
|
9931
|
-
const executions = status
|
|
9931
|
+
const executions = readSceneExecutions(status);
|
|
9932
9932
|
const blockedExecutions = executions.filter((execution) => execution.risk === "blocked");
|
|
9933
9933
|
const watchExecutions = executions.filter((execution) => execution.risk === "watch");
|
|
9934
9934
|
const activeBackground = executions.filter((execution) => execution.kind === "background");
|
|
@@ -9959,6 +9959,19 @@ function buildRuntimeScene(status) {
|
|
|
9959
9959
|
executions
|
|
9960
9960
|
};
|
|
9961
9961
|
}
|
|
9962
|
+
function readSceneExecutions(status) {
|
|
9963
|
+
const byId = /* @__PURE__ */ new Map();
|
|
9964
|
+
for (const execution of status.executions.active) {
|
|
9965
|
+
byId.set(execution.id, buildExecutionScene(execution));
|
|
9966
|
+
}
|
|
9967
|
+
for (const execution of status.executions.recent) {
|
|
9968
|
+
const scene = buildExecutionScene(execution);
|
|
9969
|
+
if (scene.risk !== "none" && !byId.has(scene.id)) {
|
|
9970
|
+
byId.set(scene.id, scene);
|
|
9971
|
+
}
|
|
9972
|
+
}
|
|
9973
|
+
return [...byId.values()];
|
|
9974
|
+
}
|
|
9962
9975
|
function buildExecutionScene(execution) {
|
|
9963
9976
|
const risk = readExecutionRisk(execution);
|
|
9964
9977
|
return {
|
|
@@ -9973,9 +9986,6 @@ function buildExecutionScene(execution) {
|
|
|
9973
9986
|
};
|
|
9974
9987
|
}
|
|
9975
9988
|
function buildHeadline(status, blockedExecutions, watchExecutions) {
|
|
9976
|
-
if (!status.sessions.latest) {
|
|
9977
|
-
return "No active session yet.";
|
|
9978
|
-
}
|
|
9979
9989
|
if (blockedExecutions.length > 0) {
|
|
9980
9990
|
return `${blockedExecutions.length} execution(s) need attention.`;
|
|
9981
9991
|
}
|
|
@@ -9985,6 +9995,9 @@ function buildHeadline(status, blockedExecutions, watchExecutions) {
|
|
|
9985
9995
|
if (status.executions.active.length > 0) {
|
|
9986
9996
|
return `${status.executions.active.length} execution(s) are running.`;
|
|
9987
9997
|
}
|
|
9998
|
+
if (!status.sessions.latest) {
|
|
9999
|
+
return "No active session yet.";
|
|
10000
|
+
}
|
|
9988
10001
|
return "Ready to continue the latest session.";
|
|
9989
10002
|
}
|
|
9990
10003
|
function readFocus(status) {
|
|
@@ -12072,6 +12085,7 @@ function buildToolBlock() {
|
|
|
12072
12085
|
function buildCommunicationBlock() {
|
|
12073
12086
|
return [
|
|
12074
12087
|
"Always reply in Simplified Chinese.",
|
|
12088
|
+
"No Markdown in user-facing conversational replies; prefer plain text whenever possible.",
|
|
12075
12089
|
"Provide concise progress updates during multi-step work.",
|
|
12076
12090
|
"Make every sentence carry decision, execution, evidence, or understanding.",
|
|
12077
12091
|
"Claim changed files, passed commands, and successful tools only when tool evidence supports them.",
|
|
@@ -12512,6 +12526,9 @@ function formatRuntimeStatusText(status) {
|
|
|
12512
12526
|
lines.push("Current workspace:");
|
|
12513
12527
|
lines.push(`- Focus: ${status.scene.focus}`);
|
|
12514
12528
|
lines.push(`- Session: ${readSessionLine(status)}`);
|
|
12529
|
+
if (status.sessions.skipped > 0) {
|
|
12530
|
+
lines.push(`- Sessions: ${status.sessions.total} total, ${status.sessions.skipped} skipped`);
|
|
12531
|
+
}
|
|
12515
12532
|
lines.push(`- Next: ${status.scene.nextAction}`);
|
|
12516
12533
|
lines.push(`- Blocked: ${status.scene.blocked}`);
|
|
12517
12534
|
lines.push(`- Context budget: ${readContextBudgetLine(status)}`);
|
|
@@ -12636,9 +12653,9 @@ function formatRuntimeStatusText(status) {
|
|
|
12636
12653
|
].filter(Boolean).join(" "));
|
|
12637
12654
|
}
|
|
12638
12655
|
}
|
|
12639
|
-
if (status.executions.
|
|
12656
|
+
if (status.scene.executions.length > 0) {
|
|
12640
12657
|
lines.push("");
|
|
12641
|
-
lines.push("
|
|
12658
|
+
lines.push("Scene executions:");
|
|
12642
12659
|
for (const execution of status.scene.executions) {
|
|
12643
12660
|
lines.push([
|
|
12644
12661
|
execution.id,
|