@jun133/kitty 0.0.13 → 0.0.15
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 +19 -133
- package/dist/{App-V6SLDWQH.mjs → App-CBTIS4IK.mjs} +30 -18
- package/dist/{chunk-MMIH75OY.mjs → chunk-7FDXKNTM.mjs} +1612 -767
- package/dist/{chunk-DWGFLIQA.mjs → chunk-AQEMM5VH.mjs} +1 -1
- package/dist/{chunk-4BN45TQG.mjs → chunk-KUP5OMPB.mjs} +1 -1
- package/dist/{chunk-4HIVDFN5.mjs → chunk-NBKU7KA4.mjs} +1 -12
- package/dist/{chunk-3KMC6H5K.mjs → chunk-S4QTRPZ7.mjs} +238 -1221
- package/dist/{chunk-6WGSABUQ.mjs → chunk-WIKLME2V.mjs} +82 -14
- package/dist/cli.js +1477 -1438
- package/dist/cli.js.map +1 -1
- package/dist/{interactive-RSJ35TB5.mjs → interactive-BQMJFYHZ.mjs} +5 -5
- package/dist/{oneShot-7P5FDWFX.mjs → oneShot-4QBXBCNN.mjs} +3 -3
- package/dist/{session-XKWJHRVY.mjs → session-V7AYOK2Q.mjs} +2 -2
- package/dist/tui.mjs +106 -97
- package/package.json +1 -1
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionStore,
|
|
3
3
|
parseRuntimeMemoryAssetMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KUP5OMPB.mjs";
|
|
5
5
|
import {
|
|
6
6
|
BackgroundExecutionStore,
|
|
7
7
|
ControlPlaneLedger,
|
|
8
8
|
EXTENSION_ENV_KEYS,
|
|
9
9
|
ExecutionStore,
|
|
10
|
+
PRESERVED_PROJECT_STATE_ENTRY_NAMES,
|
|
11
|
+
PROJECT_STATE_DIR_NAME,
|
|
12
|
+
PROJECT_STATE_ENV_EXAMPLE_FILE_NAME,
|
|
13
|
+
PROJECT_STATE_ENV_FILE_NAME,
|
|
14
|
+
PROJECT_STATE_IGNORE_FILE_NAME,
|
|
10
15
|
SessionEventStore,
|
|
11
16
|
buildProjectMap,
|
|
12
17
|
createRuntimeUiEvent,
|
|
13
18
|
formatRuntimeUiEventLine,
|
|
14
19
|
getErrorMessage,
|
|
20
|
+
getProjectStatePaths,
|
|
15
21
|
isProcessAlive,
|
|
16
22
|
loadProjectContext,
|
|
17
23
|
reconcileBackgroundExecutions,
|
|
@@ -23,15 +29,10 @@ import {
|
|
|
23
29
|
terminatePid,
|
|
24
30
|
writeStderrLine,
|
|
25
31
|
writeStdoutLine
|
|
26
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7FDXKNTM.mjs";
|
|
27
33
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
PROJECT_STATE_ENV_EXAMPLE_FILE_NAME,
|
|
31
|
-
PROJECT_STATE_ENV_FILE_NAME,
|
|
32
|
-
PROJECT_STATE_IGNORE_FILE_NAME,
|
|
33
|
-
getProjectStatePaths
|
|
34
|
-
} from "./chunk-3KMC6H5K.mjs";
|
|
34
|
+
resolveModelProfile
|
|
35
|
+
} from "./chunk-S4QTRPZ7.mjs";
|
|
35
36
|
|
|
36
37
|
// src/observability/terminalLog.ts
|
|
37
38
|
import fs from "fs";
|
|
@@ -648,18 +649,27 @@ var KITTY_ENV = {
|
|
|
648
649
|
|
|
649
650
|
// src/config/providerPresets.ts
|
|
650
651
|
var PROVIDER_PRESETS = [
|
|
652
|
+
{
|
|
653
|
+
label: "YLS Codex + GPT-5.5",
|
|
654
|
+
provider: "yls",
|
|
655
|
+
baseUrl: "https://code.ylsagi.com/codex",
|
|
656
|
+
model: "gpt-5.5",
|
|
657
|
+
thinking: "enabled",
|
|
658
|
+
reasoningEffort: "high",
|
|
659
|
+
activeByDefault: false
|
|
660
|
+
},
|
|
651
661
|
{
|
|
652
662
|
label: "YLS Codex + GPT-5.4",
|
|
653
|
-
provider: "
|
|
663
|
+
provider: "yls",
|
|
654
664
|
baseUrl: "https://code.ylsagi.com/codex",
|
|
655
665
|
model: "gpt-5.4",
|
|
656
|
-
thinking: "
|
|
666
|
+
thinking: "enabled",
|
|
657
667
|
reasoningEffort: "xhigh",
|
|
658
668
|
activeByDefault: false
|
|
659
669
|
},
|
|
660
670
|
{
|
|
661
671
|
label: "TTAPI + GPT-5.4",
|
|
662
|
-
provider: "
|
|
672
|
+
provider: "ttapi",
|
|
663
673
|
baseUrl: "https://w.ciykj.cn",
|
|
664
674
|
model: "gpt-5.4",
|
|
665
675
|
thinking: "disabled",
|
|
@@ -696,7 +706,8 @@ async function inspectConfigPreflight(rootDir) {
|
|
|
696
706
|
const model = parsedEnv[KITTY_ENV.model] ?? "";
|
|
697
707
|
const baseUrl = parsedEnv[KITTY_ENV.baseUrl] ?? "";
|
|
698
708
|
const providerPreset = readProviderPresetLabel({ provider, model, baseUrl });
|
|
699
|
-
const
|
|
709
|
+
const catalog = readCatalogProfile({ provider, model });
|
|
710
|
+
const ready = files.every((file) => file.exists) && missingKeys.length === 0 && !catalog.error;
|
|
700
711
|
return {
|
|
701
712
|
rootDir: normalizedRoot,
|
|
702
713
|
kittyDir,
|
|
@@ -705,6 +716,10 @@ async function inspectConfigPreflight(rootDir) {
|
|
|
705
716
|
activeKeys,
|
|
706
717
|
missingKeys,
|
|
707
718
|
providerPreset,
|
|
719
|
+
providerProfile: catalog.providerProfile,
|
|
720
|
+
modelProfile: catalog.modelProfile,
|
|
721
|
+
wireApi: catalog.wireApi,
|
|
722
|
+
catalogError: catalog.error,
|
|
708
723
|
provider,
|
|
709
724
|
model,
|
|
710
725
|
baseUrl,
|
|
@@ -730,6 +745,10 @@ function formatConfigPreflightReport(report) {
|
|
|
730
745
|
`model: ${report.env.model || "(missing)"}`,
|
|
731
746
|
`baseUrl: ${report.env.baseUrl || "(missing)"}`,
|
|
732
747
|
`provider preset: ${formatProviderPresetFact(report)}`,
|
|
748
|
+
`provider profile: ${report.env.providerProfile ?? "(unresolved)"}`,
|
|
749
|
+
`model profile: ${report.env.modelProfile ?? "(unresolved)"}`,
|
|
750
|
+
`wire API: ${report.env.wireApi ?? "(unresolved)"}`,
|
|
751
|
+
report.env.catalogError ? `catalog: ${report.env.catalogError}` : "catalog: ok",
|
|
733
752
|
`api key: ${report.env.apiKeyPresent ? "present" : "missing"}`,
|
|
734
753
|
`preflight: ${report.ready ? "ready" : "not_ready"}`,
|
|
735
754
|
"next:",
|
|
@@ -778,6 +797,23 @@ function readProviderPresetLabel(input) {
|
|
|
778
797
|
(preset) => preset.provider === input.provider && preset.model === input.model && preset.baseUrl === input.baseUrl
|
|
779
798
|
)?.label;
|
|
780
799
|
}
|
|
800
|
+
function readCatalogProfile(input) {
|
|
801
|
+
if (!input.provider || !input.model) {
|
|
802
|
+
return {};
|
|
803
|
+
}
|
|
804
|
+
try {
|
|
805
|
+
const profile = resolveModelProfile(input);
|
|
806
|
+
return {
|
|
807
|
+
providerProfile: profile.provider.label,
|
|
808
|
+
modelProfile: profile.model.label,
|
|
809
|
+
wireApi: profile.model.wireApi
|
|
810
|
+
};
|
|
811
|
+
} catch (error) {
|
|
812
|
+
return {
|
|
813
|
+
error: error instanceof Error ? error.message : String(error)
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
}
|
|
781
817
|
function formatProviderPresetFact(report) {
|
|
782
818
|
if (report.env.providerPreset) {
|
|
783
819
|
return report.env.providerPreset;
|
|
@@ -1453,7 +1489,7 @@ function truncateDisplayTitle(title) {
|
|
|
1453
1489
|
|
|
1454
1490
|
// src/cli/commands/sessionHelpers.ts
|
|
1455
1491
|
async function createSessionStore(sessionsDir) {
|
|
1456
|
-
const { SessionStore: SessionStore2 } = await import("./session-
|
|
1492
|
+
const { SessionStore: SessionStore2 } = await import("./session-V7AYOK2Q.mjs");
|
|
1457
1493
|
return new SessionStore2(sessionsDir);
|
|
1458
1494
|
}
|
|
1459
1495
|
|
|
@@ -1482,6 +1518,9 @@ function formatSessionEventsForCli(result) {
|
|
|
1482
1518
|
return result.events.map(formatSessionEventForCli).join("\n");
|
|
1483
1519
|
}
|
|
1484
1520
|
function formatSessionEventForCli(event) {
|
|
1521
|
+
if (isToolEvent(event)) {
|
|
1522
|
+
return formatToolEventForCli(event);
|
|
1523
|
+
}
|
|
1485
1524
|
const parts = [
|
|
1486
1525
|
event.createdAt,
|
|
1487
1526
|
event.type,
|
|
@@ -1491,10 +1530,39 @@ function formatSessionEventForCli(event) {
|
|
|
1491
1530
|
];
|
|
1492
1531
|
return parts.filter(Boolean).join(" ");
|
|
1493
1532
|
}
|
|
1533
|
+
function formatToolEventForCli(event) {
|
|
1534
|
+
const details = event.details ?? {};
|
|
1535
|
+
const toolName = readString2(details.toolName);
|
|
1536
|
+
const toolCallId = readString2(details.toolCallId);
|
|
1537
|
+
const durationMs = readNumber2(details.durationMs);
|
|
1538
|
+
const changedPathCount = readNumber2(details.changedPathCount);
|
|
1539
|
+
const error = readString2(details.error);
|
|
1540
|
+
const parts = [
|
|
1541
|
+
event.createdAt,
|
|
1542
|
+
event.type,
|
|
1543
|
+
toolName ? `tool=${toolName}` : void 0,
|
|
1544
|
+
toolCallId ? `call=${toolCallId}` : void 0,
|
|
1545
|
+
durationMs === void 0 ? void 0 : `duration=${durationMs}ms`,
|
|
1546
|
+
changedPathCount === void 0 ? void 0 : `changed=${changedPathCount}`,
|
|
1547
|
+
error ? `error=${formatInline(error)}` : void 0,
|
|
1548
|
+
event.host ? `host=${event.host}` : void 0,
|
|
1549
|
+
event.message ? `message=${formatInline(event.message)}` : void 0
|
|
1550
|
+
];
|
|
1551
|
+
return parts.filter(Boolean).join(" ");
|
|
1552
|
+
}
|
|
1553
|
+
function isToolEvent(event) {
|
|
1554
|
+
return event.type === "tool.started" || event.type === "tool.completed" || event.type === "tool.failed";
|
|
1555
|
+
}
|
|
1494
1556
|
function formatInline(value) {
|
|
1495
1557
|
const normalized = value.replace(/\s+/g, " ").trim();
|
|
1496
1558
|
return normalized.length > 120 ? `${normalized.slice(0, 117)}...` : normalized;
|
|
1497
1559
|
}
|
|
1560
|
+
function readString2(value) {
|
|
1561
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1562
|
+
}
|
|
1563
|
+
function readNumber2(value) {
|
|
1564
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
1565
|
+
}
|
|
1498
1566
|
|
|
1499
1567
|
// src/config/paths.ts
|
|
1500
1568
|
function getAppPaths(rootDir = process.cwd()) {
|