@botconnector/bccli 0.4.0-beta.49 → 0.4.0-beta.50
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/{acp-HMH7DCSE.js → acp-V5RP42VB.js} +2 -2
- package/dist/{args-BTFKKLNQ.js → args-2R45YZ42.js} +4 -4
- package/dist/{chunk-6AW3CPSO.js → chunk-2QYHSESB.js} +1 -1
- package/dist/{chunk-MA4SBA6I.js → chunk-4WVIPZFV.js} +2 -2
- package/dist/{chunk-R72DRWZ6.js → chunk-DP7EBW53.js} +1 -1
- package/dist/{chunk-P6JWJ7D7.js → chunk-EUCSCUYP.js} +1 -1
- package/dist/{chunk-HBR62GF2.js → chunk-F6ACN47V.js} +54 -6
- package/dist/{chunk-VMWT4IRJ.js → chunk-FTFVW7XD.js} +3 -3
- package/dist/{chunk-TQA7WGVC.js → chunk-H73FO5YK.js} +2 -2
- package/dist/{chunk-GSZZA5KX.js → chunk-KD2LMIS4.js} +6 -6
- package/dist/{chunk-KH4HOMBL.js → chunk-KIZC5XV4.js} +10 -10
- package/dist/{chunk-H3S2WAQT.js → chunk-N7KP6RNP.js} +4 -4
- package/dist/{chunk-GKNLIIRL.js → chunk-NDEJUL44.js} +10 -1
- package/dist/{chunk-WKUYO6HY.js → chunk-QXOV4DUZ.js} +4 -4
- package/dist/{chunk-EC67VAZX.js → chunk-R4BJBTWC.js} +2 -2
- package/dist/{chunk-YGITX6JU.js → chunk-SNKVS26H.js} +1 -1
- package/dist/{chunk-67ORWLS2.js → chunk-TQWCM5RO.js} +3 -3
- package/dist/{chunk-JRUQQRP6.js → chunk-XLC6T4SX.js} +1 -0
- package/dist/{chunk-DAFJ7VOQ.js → chunk-YIYX3FFS.js} +1 -1
- package/dist/cli.js +38 -38
- package/dist/{completion-QO5B6N4R.js → completion-OV3MW2N4.js} +1 -1
- package/dist/{config-SUUUHLRX.js → config-AZZFOXKV.js} +3 -3
- package/dist/{config-46ESEU4Z.js → config-H5A7XHHK.js} +2 -2
- package/dist/{ghBotCli-2INYL4WH.js → ghBotCli-7WDYF4L7.js} +13 -13
- package/dist/{integrationCli-VKVDUAPU.js → integrationCli-ZMTSILYF.js} +2 -2
- package/dist/{login-4JQLULNJ.js → login-W4Y6WHLV.js} +3 -3
- package/dist/{mcpCli-TG6BMOE6.js → mcpCli-5QISTOFK.js} +5 -5
- package/dist/{modelsCli-LOUEMOGH.js → modelsCli-FZMBD4OE.js} +6 -6
- package/dist/{oauthLogin-ZVKAVGJH.js → oauthLogin-VESMXG4M.js} +1 -1
- package/dist/{pluginsCli-QYL6C6IK.js → pluginsCli-GEHR7FQR.js} +2 -2
- package/dist/{prCli-26OUBDFO.js → prCli-JXA7DJW4.js} +1 -1
- package/dist/providerCli-EUZGKP5F.js +15 -0
- package/dist/sdk.js +63 -5
- package/dist/{serve-CG3HVPOA.js → serve-6KX4MXHC.js} +3 -3
- package/dist/{serve-UR2LWREA.js → serve-XDHMB7TO.js} +14 -14
- package/dist/session-F6MG3UCU.js +12 -0
- package/dist/setup-LLWREJQH.js +24 -0
- package/dist/{statsCli-ZHURTHK7.js → statsCli-H4HEY5ID.js} +1 -1
- package/dist/{transferCli-PQCFSIVT.js → transferCli-2XUKBG2L.js} +4 -4
- package/dist/{ui-XJ657AHE.js → ui-6HJVYI46.js} +26 -30
- package/dist/{update-6LN4CCR2.js → update-IQR346E5.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-S4233ZA5.js +0 -15
- package/dist/session-GDPYDGOX.js +0 -12
- package/dist/setup-TRKD4EQ6.js +0 -24
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KIZC5XV4.js";
|
|
5
5
|
import "./chunk-QZKLZELZ.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-YIYX3FFS.js";
|
|
7
|
+
import "./chunk-DP7EBW53.js";
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
LOOPBACK_BIND,
|
|
11
11
|
parseCliArgs
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FTFVW7XD.js";
|
|
13
13
|
import "./chunk-GAFJEQTJ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-N7KP6RNP.js";
|
|
15
|
+
import "./chunk-QXOV4DUZ.js";
|
|
16
|
+
import "./chunk-2QYHSESB.js";
|
|
17
17
|
import "./chunk-7F3IWBPQ.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-F6ACN47V.js";
|
|
19
|
+
import "./chunk-R4BJBTWC.js";
|
|
20
|
+
import "./chunk-SNKVS26H.js";
|
|
21
|
+
import "./chunk-H73FO5YK.js";
|
|
22
22
|
import {
|
|
23
23
|
ConfigError,
|
|
24
24
|
globalConfigPath,
|
|
25
25
|
readJsonConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NDEJUL44.js";
|
|
27
27
|
import {
|
|
28
28
|
t
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XLC6T4SX.js";
|
|
30
30
|
|
|
31
31
|
// src/ghBotWebhook.ts
|
|
32
32
|
import { createHmac, timingSafeEqual } from "crypto";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
readCredentials,
|
|
7
7
|
resolveModel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NDEJUL44.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XLC6T4SX.js";
|
|
12
12
|
|
|
13
13
|
// src/integrationCli.ts
|
|
14
14
|
import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readLine,
|
|
5
5
|
readSecret,
|
|
6
6
|
runLogin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KD2LMIS4.js";
|
|
8
8
|
import "./chunk-7F3IWBPQ.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NDEJUL44.js";
|
|
10
|
+
import "./chunk-XLC6T4SX.js";
|
|
11
11
|
export {
|
|
12
12
|
defaultLoginDeps,
|
|
13
13
|
readLine,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CATALOG,
|
|
4
4
|
fillTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4WVIPZFV.js";
|
|
6
6
|
import {
|
|
7
7
|
authorizeMcpServer,
|
|
8
8
|
clearTokens
|
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
globalMcpPath,
|
|
13
13
|
readMcpFile,
|
|
14
14
|
removeGlobalServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-H73FO5YK.js";
|
|
16
16
|
import {
|
|
17
17
|
bccliHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NDEJUL44.js";
|
|
19
19
|
import {
|
|
20
20
|
t
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XLC6T4SX.js";
|
|
22
22
|
|
|
23
23
|
// src/mcpCli.ts
|
|
24
24
|
async function runMcpCommand(args, deps) {
|
|
25
25
|
const home = bccliHome(deps.env);
|
|
26
26
|
const [action = "list", name] = args.subArgs;
|
|
27
27
|
if (action === "serve") {
|
|
28
|
-
const { runMcpServe } = await import("./serve-
|
|
28
|
+
const { runMcpServe } = await import("./serve-6KX4MXHC.js");
|
|
29
29
|
return runMcpServe(args, deps);
|
|
30
30
|
}
|
|
31
31
|
const installed = readMcpFile(globalMcpPath(home));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
listAllModels
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-QXOV4DUZ.js";
|
|
5
|
+
import "./chunk-2QYHSESB.js";
|
|
6
|
+
import "./chunk-R4BJBTWC.js";
|
|
7
|
+
import "./chunk-SNKVS26H.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
resolveModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NDEJUL44.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XLC6T4SX.js";
|
|
15
15
|
|
|
16
16
|
// src/modelsCli.ts
|
|
17
17
|
async function runModelsCommand(args, deps) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
bccliHome,
|
|
4
4
|
globalConfigPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NDEJUL44.js";
|
|
6
6
|
import {
|
|
7
7
|
t
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XLC6T4SX.js";
|
|
9
9
|
|
|
10
10
|
// src/pluginsCli.ts
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addProviderKey,
|
|
4
|
+
runProviderCommand
|
|
5
|
+
} from "./chunk-N7KP6RNP.js";
|
|
6
|
+
import "./chunk-QXOV4DUZ.js";
|
|
7
|
+
import "./chunk-2QYHSESB.js";
|
|
8
|
+
import "./chunk-R4BJBTWC.js";
|
|
9
|
+
import "./chunk-SNKVS26H.js";
|
|
10
|
+
import "./chunk-NDEJUL44.js";
|
|
11
|
+
import "./chunk-XLC6T4SX.js";
|
|
12
|
+
export {
|
|
13
|
+
addProviderKey,
|
|
14
|
+
runProviderCommand
|
|
15
|
+
};
|
package/dist/sdk.js
CHANGED
|
@@ -308,6 +308,7 @@ Opsi:
|
|
|
308
308
|
"--output-format must be one of: {formats}": "--output-format harus salah satu dari: {formats}",
|
|
309
309
|
"Invalid config: {path} ({error})": "Config tidak valid: {path} ({error})",
|
|
310
310
|
"maxSteps must be a positive number, or 0/null to disable the limit.": "maxSteps harus berupa angka positif, atau 0/null untuk menonaktifkan batas.",
|
|
311
|
+
"sessionRetentionDays must be a positive number of days, or 0/null to keep sessions.": "sessionRetentionDays harus berupa jumlah hari positif, atau 0/null untuk menyimpan sesi.",
|
|
311
312
|
"Hook {event} failed: {reason}": "Hook {event} gagal: {reason}",
|
|
312
313
|
"list background tasks": "daftar tugas latar belakang",
|
|
313
314
|
"Nothing to rewind.": "Tidak ada yang bisa di-rewind.",
|
|
@@ -553,6 +554,14 @@ function resolvedMaxSteps(global) {
|
|
|
553
554
|
}
|
|
554
555
|
return Math.max(1, Math.floor(value));
|
|
555
556
|
}
|
|
557
|
+
function resolvedSessionRetentionDays(global) {
|
|
558
|
+
const value = global.sessionRetentionDays;
|
|
559
|
+
if (value === void 0 || value === null || value === 0) return null;
|
|
560
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
561
|
+
throw new ConfigError(t("sessionRetentionDays must be a positive number of days, or 0/null to keep sessions."));
|
|
562
|
+
}
|
|
563
|
+
return Math.max(1, Math.floor(value));
|
|
564
|
+
}
|
|
556
565
|
function resolvedNetworkPolicy(global) {
|
|
557
566
|
const value = global.networkPolicy ?? "allow";
|
|
558
567
|
if (value !== "allow" && value !== "offline") {
|
|
@@ -686,6 +695,7 @@ function loadConfig(cwd, env = process.env) {
|
|
|
686
695
|
reasoning: global.reasoning ?? DEFAULT_CONFIG.reasoning,
|
|
687
696
|
thinkingVisible: global.thinkingVisible === true,
|
|
688
697
|
thinkingClickCollapse: global.thinkingClickCollapse === true,
|
|
698
|
+
sessionRetentionDays: resolvedSessionRetentionDays(global),
|
|
689
699
|
maxSteps: resolvedMaxSteps(global),
|
|
690
700
|
hooks: global.hooks,
|
|
691
701
|
vision: global.vision ?? DEFAULT_CONFIG.vision,
|
|
@@ -4447,23 +4457,71 @@ var Session = class _Session {
|
|
|
4447
4457
|
reset() {
|
|
4448
4458
|
this.write({ t: "reset" });
|
|
4449
4459
|
}
|
|
4450
|
-
|
|
4460
|
+
records() {
|
|
4451
4461
|
if (!existsSync10(this.file)) return [];
|
|
4452
|
-
|
|
4462
|
+
const out = [];
|
|
4453
4463
|
for (const line of readFileSync7(this.file, "utf8").split("\n")) {
|
|
4454
4464
|
if (!line.trim()) continue;
|
|
4455
|
-
let record;
|
|
4456
4465
|
try {
|
|
4457
|
-
|
|
4466
|
+
out.push(JSON.parse(line));
|
|
4458
4467
|
} catch {
|
|
4459
|
-
continue;
|
|
4460
4468
|
}
|
|
4469
|
+
}
|
|
4470
|
+
return out;
|
|
4471
|
+
}
|
|
4472
|
+
/** What the model continues from: everything after the last reset (after a compaction that is the summary and the recent turns). */
|
|
4473
|
+
load() {
|
|
4474
|
+
let messages = [];
|
|
4475
|
+
for (const record of this.records()) {
|
|
4461
4476
|
if (record.t === "reset") messages = [];
|
|
4462
4477
|
else if (record.t === "msg") messages.push(record.m);
|
|
4463
4478
|
}
|
|
4464
4479
|
return repairTail(messages);
|
|
4465
4480
|
}
|
|
4481
|
+
/**
|
|
4482
|
+
* What the user sees on resume: the whole conversation. Compaction only shrinks what the model is sent, so
|
|
4483
|
+
* its reset does not hide the older turns here. A real reset (/clear, rewind) still starts over, the
|
|
4484
|
+
* synthetic summary pair is never shown, and the recent turns a compaction re-writes are not shown twice.
|
|
4485
|
+
*/
|
|
4486
|
+
loadHistory() {
|
|
4487
|
+
const segments = [[]];
|
|
4488
|
+
for (const record of this.records()) {
|
|
4489
|
+
if (record.t === "reset") segments.push([]);
|
|
4490
|
+
else if (record.t === "msg") segments[segments.length - 1].push(record.m);
|
|
4491
|
+
}
|
|
4492
|
+
let shown = segments[0];
|
|
4493
|
+
for (const segment of segments.slice(1)) {
|
|
4494
|
+
if (!isCompactionSummary(segment[0])) {
|
|
4495
|
+
shown = segment;
|
|
4496
|
+
continue;
|
|
4497
|
+
}
|
|
4498
|
+
const kept = segment.slice(2);
|
|
4499
|
+
let at = 0;
|
|
4500
|
+
while (at <= shown.length && !endsWithPrefixOf(shown, at, kept)) at++;
|
|
4501
|
+
shown = [...shown, ...kept.slice(shown.length - at)];
|
|
4502
|
+
}
|
|
4503
|
+
return repairTail(shown.filter((m) => !isCompactionSummary(m) && !isCompactionAck(m)));
|
|
4504
|
+
}
|
|
4466
4505
|
};
|
|
4506
|
+
var SUMMARY_PREFIX = "Summary of the previous conversation:";
|
|
4507
|
+
var SUMMARY_ACK = "OK, I will continue from this summary.";
|
|
4508
|
+
function isCompactionSummary(m) {
|
|
4509
|
+
return m?.role === "user" && typeof m.content === "string" && m.content.startsWith(SUMMARY_PREFIX);
|
|
4510
|
+
}
|
|
4511
|
+
function isCompactionAck(m) {
|
|
4512
|
+
return m.role === "assistant" && m.content === SUMMARY_ACK;
|
|
4513
|
+
}
|
|
4514
|
+
function sameMessage2(a, b) {
|
|
4515
|
+
if (a.role !== b.role) return false;
|
|
4516
|
+
if (a.role === "tool" && b.role === "tool") return a.tool_call_id === b.tool_call_id;
|
|
4517
|
+
return JSON.stringify(a.content) === JSON.stringify(b.content) && JSON.stringify("tool_calls" in a && a.tool_calls) === JSON.stringify("tool_calls" in b && b.tool_calls);
|
|
4518
|
+
}
|
|
4519
|
+
function endsWithPrefixOf(shown, at, kept) {
|
|
4520
|
+
const n = shown.length - at;
|
|
4521
|
+
if (n > kept.length) return false;
|
|
4522
|
+
for (let j = 0; j < n; j++) if (!sameMessage2(shown[at + j], kept[j])) return false;
|
|
4523
|
+
return true;
|
|
4524
|
+
}
|
|
4467
4525
|
|
|
4468
4526
|
// src/tools/plan.ts
|
|
4469
4527
|
import { z as z10 } from "zod";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
createFetchTool,
|
|
4
4
|
createWebSearchTool,
|
|
5
5
|
isPrivateHost
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DP7EBW53.js";
|
|
7
7
|
import "./chunk-PSO7R5AD.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
readCredentials
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NDEJUL44.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XLC6T4SX.js";
|
|
15
15
|
|
|
16
16
|
// src/mcpServer/serve.ts
|
|
17
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KIZC5XV4.js";
|
|
5
5
|
import "./chunk-QZKLZELZ.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-YIYX3FFS.js";
|
|
7
|
+
import "./chunk-DP7EBW53.js";
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EUCSCUYP.js";
|
|
12
12
|
import {
|
|
13
13
|
LOOPBACK_BIND,
|
|
14
14
|
MAX_FRAME_BYTES,
|
|
@@ -17,25 +17,25 @@ import {
|
|
|
17
17
|
parseClientFrame,
|
|
18
18
|
randomToken,
|
|
19
19
|
trustFence
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FTFVW7XD.js";
|
|
21
21
|
import "./chunk-GAFJEQTJ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-N7KP6RNP.js";
|
|
23
23
|
import {
|
|
24
24
|
listAllModels
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-QXOV4DUZ.js";
|
|
26
|
+
import "./chunk-2QYHSESB.js";
|
|
27
27
|
import "./chunk-7F3IWBPQ.js";
|
|
28
28
|
import {
|
|
29
29
|
Session
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-F6ACN47V.js";
|
|
31
|
+
import "./chunk-R4BJBTWC.js";
|
|
32
|
+
import "./chunk-SNKVS26H.js";
|
|
33
|
+
import "./chunk-H73FO5YK.js";
|
|
34
34
|
import {
|
|
35
35
|
bccliHome,
|
|
36
36
|
loadConfig
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-NDEJUL44.js";
|
|
38
|
+
import "./chunk-XLC6T4SX.js";
|
|
39
39
|
|
|
40
40
|
// src/serve.ts
|
|
41
41
|
import { randomBytes } from "crypto";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
createRuntime,
|
|
4
|
+
lunaPtcAutoEnabled
|
|
5
|
+
} from "./chunk-KIZC5XV4.js";
|
|
6
|
+
import "./chunk-QZKLZELZ.js";
|
|
7
|
+
import "./chunk-YIYX3FFS.js";
|
|
8
|
+
import "./chunk-DP7EBW53.js";
|
|
9
|
+
import "./chunk-PSO7R5AD.js";
|
|
10
|
+
import "./chunk-GAFJEQTJ.js";
|
|
11
|
+
import "./chunk-N7KP6RNP.js";
|
|
12
|
+
import "./chunk-QXOV4DUZ.js";
|
|
13
|
+
import "./chunk-2QYHSESB.js";
|
|
14
|
+
import "./chunk-7F3IWBPQ.js";
|
|
15
|
+
import "./chunk-F6ACN47V.js";
|
|
16
|
+
import "./chunk-R4BJBTWC.js";
|
|
17
|
+
import "./chunk-SNKVS26H.js";
|
|
18
|
+
import "./chunk-H73FO5YK.js";
|
|
19
|
+
import "./chunk-NDEJUL44.js";
|
|
20
|
+
import "./chunk-XLC6T4SX.js";
|
|
21
|
+
export {
|
|
22
|
+
createRuntime,
|
|
23
|
+
lunaPtcAutoEnabled
|
|
24
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
Session
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-F6ACN47V.js";
|
|
5
|
+
import "./chunk-R4BJBTWC.js";
|
|
6
|
+
import "./chunk-SNKVS26H.js";
|
|
7
7
|
import {
|
|
8
8
|
t
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XLC6T4SX.js";
|
|
10
10
|
|
|
11
11
|
// src/transferCli.ts
|
|
12
12
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CATALOG,
|
|
4
4
|
fillTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4WVIPZFV.js";
|
|
6
6
|
import {
|
|
7
7
|
MAX_VERIFY_ROUNDS,
|
|
8
8
|
runVerify,
|
|
9
9
|
toolLabel,
|
|
10
10
|
verifyFollowup,
|
|
11
11
|
worktreeListText
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TQWCM5RO.js";
|
|
13
13
|
import {
|
|
14
14
|
BUILTIN_AGENTS,
|
|
15
15
|
appendMemory,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
renderBackgroundTasks,
|
|
22
22
|
runHooks,
|
|
23
23
|
validateGlobPattern
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YIYX3FFS.js";
|
|
25
25
|
import "./chunk-PSO7R5AD.js";
|
|
26
26
|
import {
|
|
27
27
|
nextMode
|
|
@@ -30,39 +30,39 @@ import {
|
|
|
30
30
|
hasKey,
|
|
31
31
|
providerName,
|
|
32
32
|
writeGlobalConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-2QYHSESB.js";
|
|
34
34
|
import {
|
|
35
35
|
Session
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-F6ACN47V.js";
|
|
37
37
|
import {
|
|
38
38
|
contentText
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-R4BJBTWC.js";
|
|
40
40
|
import {
|
|
41
41
|
REASONING_LEVELS,
|
|
42
42
|
assertReasoningSupported,
|
|
43
43
|
parseReasoningLevel,
|
|
44
44
|
supportedReasoningLevels
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SNKVS26H.js";
|
|
46
46
|
import {
|
|
47
47
|
addGlobalServer,
|
|
48
48
|
globalMcpPath,
|
|
49
49
|
readMcpFile,
|
|
50
50
|
removeGlobalServer
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-H73FO5YK.js";
|
|
52
52
|
import {
|
|
53
53
|
ACCENT,
|
|
54
54
|
PRESETS,
|
|
55
55
|
color,
|
|
56
56
|
matchKeybind,
|
|
57
57
|
removeCredential
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NDEJUL44.js";
|
|
59
59
|
import {
|
|
60
60
|
getLanguage,
|
|
61
61
|
locale,
|
|
62
62
|
parseLang,
|
|
63
63
|
setLanguage,
|
|
64
64
|
t
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-XLC6T4SX.js";
|
|
66
66
|
|
|
67
67
|
// src/ui/index.tsx
|
|
68
68
|
import { render } from "ink";
|
|
@@ -1439,6 +1439,15 @@ function applyEvent(t2, event) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
1441
|
|
|
1442
|
+
// src/ui/replay.ts
|
|
1443
|
+
function replayEntries(history) {
|
|
1444
|
+
const chat = history.map((m) => m.role === "user" ? { role: "user", text: contentText(m.content) } : m.role === "assistant" && typeof m.content === "string" ? { role: "assistant", text: m.content } : void 0).filter((m) => !!m && !!m.text.trim());
|
|
1445
|
+
return [
|
|
1446
|
+
entry({ kind: "notice", text: t("Resuming the session ({messages} messages saved \xB7 {chat} user/assistant chats shown).", { messages: history.length, chat: chat.length }), tone: "info" }),
|
|
1447
|
+
...chat.map((m) => entry(m.role === "user" ? { kind: "user", text: m.text } : { kind: "assistant", text: m.text }))
|
|
1448
|
+
];
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1442
1451
|
// src/clipboardImage.ts
|
|
1443
1452
|
import { execFile as execFile2 } from "child_process";
|
|
1444
1453
|
import { existsSync, statSync as statSync2 } from "fs";
|
|
@@ -1528,7 +1537,10 @@ var INIT_PROMPT = "Study this project (folder structure, package/build files, te
|
|
|
1528
1537
|
var labelFor = (runtime, ref) => `${ref.slice(ref.indexOf("/") + 1)} \xB7 ${runtime.providerLabel()}`;
|
|
1529
1538
|
function App({ runtime, initialPrompt, version }) {
|
|
1530
1539
|
const { exit } = useApp();
|
|
1531
|
-
const [transcript, setTranscript] = useState8(() => ({
|
|
1540
|
+
const [transcript, setTranscript] = useState8(() => ({
|
|
1541
|
+
done: [entry({ kind: "header" }), ...runtime.agent.messages.length ? replayEntries(runtime.session.loadHistory()) : []],
|
|
1542
|
+
live: []
|
|
1543
|
+
}));
|
|
1532
1544
|
const [busy, setBusy] = useState8(false);
|
|
1533
1545
|
const [cancelling, setCancelling] = useState8(false);
|
|
1534
1546
|
const [startedAt, setStartedAt] = useState8(0);
|
|
@@ -1781,23 +1793,7 @@ function App({ runtime, initialPrompt, version }) {
|
|
|
1781
1793
|
runtime.resume(chosen.session);
|
|
1782
1794
|
setTokens(0);
|
|
1783
1795
|
setLastThinking("");
|
|
1784
|
-
|
|
1785
|
-
(m) => (m.role === "user" || m.role === "assistant") && typeof m.content === "string" && !!m.content.trim()
|
|
1786
|
-
);
|
|
1787
|
-
setTranscript({
|
|
1788
|
-
done: [
|
|
1789
|
-
entry({ kind: "header" }),
|
|
1790
|
-
entry({
|
|
1791
|
-
kind: "notice",
|
|
1792
|
-
text: t("Resuming the session ({messages} messages saved \xB7 {chat} user/assistant chats shown).", { messages: runtime.agent.messages.length, chat: chat.length }),
|
|
1793
|
-
tone: "info"
|
|
1794
|
-
}),
|
|
1795
|
-
...chat.map(
|
|
1796
|
-
(m) => entry(m.role === "user" ? { kind: "user", text: m.content } : { kind: "assistant", text: m.content })
|
|
1797
|
-
)
|
|
1798
|
-
],
|
|
1799
|
-
live: []
|
|
1800
|
-
});
|
|
1796
|
+
setTranscript({ done: [entry({ kind: "header" }), ...replayEntries(chosen.session.loadHistory())], live: [] });
|
|
1801
1797
|
}
|
|
1802
1798
|
});
|
|
1803
1799
|
return;
|
|
@@ -2333,7 +2329,7 @@ ${t2.output}`);
|
|
|
2333
2329
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2334
2330
|
async function startInteractive(rt, opts) {
|
|
2335
2331
|
if (opts.resume) {
|
|
2336
|
-
const { Session: Session2 } = await import("./session-
|
|
2332
|
+
const { Session: Session2 } = await import("./session-F6MG3UCU.js");
|
|
2337
2333
|
const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
|
|
2338
2334
|
if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
|
|
2339
2335
|
else {
|
|
@@ -2348,7 +2344,7 @@ async function startInteractive(rt, opts) {
|
|
|
2348
2344
|
if (chosen) rt.resume(chosen.session);
|
|
2349
2345
|
}
|
|
2350
2346
|
}
|
|
2351
|
-
const { serversToStart, setProjectTrust } = await import("./config-
|
|
2347
|
+
const { serversToStart, setProjectTrust } = await import("./config-AZZFOXKV.js");
|
|
2352
2348
|
const plan = serversToStart(rt.home, rt.cwd);
|
|
2353
2349
|
if (plan.needTrust.length) {
|
|
2354
2350
|
const { createInterface } = await import("readline/promises");
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
addProviderKey,
|
|
4
|
-
runProviderCommand
|
|
5
|
-
} from "./chunk-H3S2WAQT.js";
|
|
6
|
-
import "./chunk-WKUYO6HY.js";
|
|
7
|
-
import "./chunk-6AW3CPSO.js";
|
|
8
|
-
import "./chunk-EC67VAZX.js";
|
|
9
|
-
import "./chunk-YGITX6JU.js";
|
|
10
|
-
import "./chunk-GKNLIIRL.js";
|
|
11
|
-
import "./chunk-JRUQQRP6.js";
|
|
12
|
-
export {
|
|
13
|
-
addProviderKey,
|
|
14
|
-
runProviderCommand
|
|
15
|
-
};
|
package/dist/session-GDPYDGOX.js
DELETED
package/dist/setup-TRKD4EQ6.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
createRuntime,
|
|
4
|
-
lunaPtcAutoEnabled
|
|
5
|
-
} from "./chunk-KH4HOMBL.js";
|
|
6
|
-
import "./chunk-QZKLZELZ.js";
|
|
7
|
-
import "./chunk-DAFJ7VOQ.js";
|
|
8
|
-
import "./chunk-R72DRWZ6.js";
|
|
9
|
-
import "./chunk-PSO7R5AD.js";
|
|
10
|
-
import "./chunk-GAFJEQTJ.js";
|
|
11
|
-
import "./chunk-H3S2WAQT.js";
|
|
12
|
-
import "./chunk-WKUYO6HY.js";
|
|
13
|
-
import "./chunk-6AW3CPSO.js";
|
|
14
|
-
import "./chunk-7F3IWBPQ.js";
|
|
15
|
-
import "./chunk-HBR62GF2.js";
|
|
16
|
-
import "./chunk-EC67VAZX.js";
|
|
17
|
-
import "./chunk-YGITX6JU.js";
|
|
18
|
-
import "./chunk-TQA7WGVC.js";
|
|
19
|
-
import "./chunk-GKNLIIRL.js";
|
|
20
|
-
import "./chunk-JRUQQRP6.js";
|
|
21
|
-
export {
|
|
22
|
-
createRuntime,
|
|
23
|
-
lunaPtcAutoEnabled
|
|
24
|
-
};
|