@liberseek/boft-cli-win32-arm64 0.6.9 → 0.7.0
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 +1 -1
- package/THIRD_PARTY_NOTICES.txt +12 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +67 -27
- package/app/host-runtime.mjs +1963 -880
- package/app/plugins/antigravity/plugin.mjs +44 -15
- package/app/plugins/claude-code/plugin.mjs +59 -12
- package/app/plugins/codebuddy/plugin.mjs +76 -23
- package/app/plugins/cursor-cli/plugin.mjs +43 -4
- package/app/plugins/deepseek-harness/plugin.mjs +55 -7
- package/app/plugins/enabled.json +3 -1
- package/app/plugins/grok/plugin.mjs +68 -15
- package/app/plugins/hermes/plugin.mjs +40 -3
- package/app/plugins/kiro-cli/plugin.mjs +50 -3
- package/app/plugins/muse/plugin.mjs +40 -0
- package/app/plugins/omp/plugin.mjs +53 -6
- package/app/plugins/opencode/plugin.mjs +92 -46
- package/app/plugins/pi/plugin.mjs +53 -6
- package/app/plugins/qoder/assets/icon.svg +1 -0
- package/app/plugins/qoder/manifest.json +12 -0
- package/app/plugins/qoder/plugin.mjs +52290 -0
- package/app/plugins/qoder-cn/assets/icon.svg +1 -0
- package/app/plugins/qoder-cn/manifest.json +12 -0
- package/app/plugins/qoder-cn/plugin.mjs +52288 -0
- package/app/renderer-extension.js +3297 -162
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/licenses/Qoder-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/QoderCN-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/tailwindcss-LICENSE.txt +21 -0
- package/package.json +1 -1
|
@@ -14531,6 +14531,46 @@ config(en_default());
|
|
|
14531
14531
|
// ../../shared-contracts/dist/version.js
|
|
14532
14532
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14533
14533
|
|
|
14534
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
14535
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
14536
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
14537
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
14538
|
+
enabled: external_exports.boolean(),
|
|
14539
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
14540
|
+
});
|
|
14541
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
14542
|
+
enabled: false,
|
|
14543
|
+
timeoutMinutes: 30
|
|
14544
|
+
});
|
|
14545
|
+
|
|
14546
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
14547
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
14548
|
+
"idle",
|
|
14549
|
+
"running",
|
|
14550
|
+
"busy",
|
|
14551
|
+
"closing",
|
|
14552
|
+
"failed",
|
|
14553
|
+
"blocked"
|
|
14554
|
+
]);
|
|
14555
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
14556
|
+
"none",
|
|
14557
|
+
"disabled",
|
|
14558
|
+
"timeout",
|
|
14559
|
+
"operation",
|
|
14560
|
+
"background",
|
|
14561
|
+
"identity",
|
|
14562
|
+
"persistence",
|
|
14563
|
+
"closeFailed"
|
|
14564
|
+
]);
|
|
14565
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
14566
|
+
threadId: external_exports.string(),
|
|
14567
|
+
title: external_exports.string(),
|
|
14568
|
+
harnessId: external_exports.string(),
|
|
14569
|
+
state: loadedSessionStateSchema,
|
|
14570
|
+
reason: loadedSessionReasonSchema,
|
|
14571
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
14572
|
+
}));
|
|
14573
|
+
|
|
14534
14574
|
// ../../shared-contracts/dist/ids.js
|
|
14535
14575
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14536
14576
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -18411,6 +18451,7 @@ var AntigravitySession = class {
|
|
|
18411
18451
|
}
|
|
18412
18452
|
const active = {
|
|
18413
18453
|
command,
|
|
18454
|
+
model: this.#model,
|
|
18414
18455
|
process: child,
|
|
18415
18456
|
exited: new Promise((resolve) => child.once("close", () => resolve())),
|
|
18416
18457
|
questions,
|
|
@@ -18579,7 +18620,7 @@ ${line}`).slice(-8e3);
|
|
|
18579
18620
|
if (event.step_update.conversation_id !== this.#nativeRef?.nativeSessionId)
|
|
18580
18621
|
return;
|
|
18581
18622
|
await this.#handleStep(active, event.step_update);
|
|
18582
|
-
const usage = hostUsage(event.step_update.usage,
|
|
18623
|
+
const usage = hostUsage(event.step_update.usage, active.model?.id);
|
|
18583
18624
|
if (usage)
|
|
18584
18625
|
this.#publishUsage(active, usage);
|
|
18585
18626
|
this.#ensureContextUsage(active, event.step_update.conversation_id);
|
|
@@ -18593,7 +18634,7 @@ ${line}`).slice(-8e3);
|
|
|
18593
18634
|
async #handleResult(active, event) {
|
|
18594
18635
|
if (this.#active !== active)
|
|
18595
18636
|
return;
|
|
18596
|
-
const usage = hostUsage(event.result.usage,
|
|
18637
|
+
const usage = hostUsage(event.result.usage, active.model?.id);
|
|
18597
18638
|
if (usage)
|
|
18598
18639
|
this.#publishUsage(active, usage);
|
|
18599
18640
|
this.#ensureContextUsage(active, event.result.conversation_id);
|
|
@@ -18665,7 +18706,7 @@ ${line}`).slice(-8e3);
|
|
|
18665
18706
|
#ensureContextUsage(active, conversationId) {
|
|
18666
18707
|
if (active.contextUsagePromise)
|
|
18667
18708
|
return;
|
|
18668
|
-
active.contextUsagePromise = pollAntigravityContextUsage(active.logPath, conversationId,
|
|
18709
|
+
active.contextUsagePromise = pollAntigravityContextUsage(active.logPath, conversationId, active.model?.id, () => active.receivedResult || active.cancellationRequested || active.process.exitCode !== null);
|
|
18669
18710
|
}
|
|
18670
18711
|
async #handleStep(active, step) {
|
|
18671
18712
|
if (step.step_type === "subagent") {
|
|
@@ -18913,12 +18954,6 @@ ${line}`).slice(-8e3);
|
|
|
18913
18954
|
return { ok: true, value: { cancellationRequested: true } };
|
|
18914
18955
|
}
|
|
18915
18956
|
#selectModel(command) {
|
|
18916
|
-
if (this.isActive) {
|
|
18917
|
-
return {
|
|
18918
|
-
ok: false,
|
|
18919
|
-
error: { code: "sessionBusy", message: "Turn is active", retryable: true }
|
|
18920
|
-
};
|
|
18921
|
-
}
|
|
18922
18957
|
this.#model = harnessModelRefSchema.parse(command.model);
|
|
18923
18958
|
const available = antigravityAvailableThinkingOptions(this.#catalog, this.#model);
|
|
18924
18959
|
if (this.#thinkingOptionId && !available?.some(({ id }) => id === this.#thinkingOptionId)) {
|
|
@@ -18929,12 +18964,6 @@ ${line}`).slice(-8e3);
|
|
|
18929
18964
|
return { ok: true, value: { completed: true } };
|
|
18930
18965
|
}
|
|
18931
18966
|
#selectThinking(command) {
|
|
18932
|
-
if (this.isActive) {
|
|
18933
|
-
return {
|
|
18934
|
-
ok: false,
|
|
18935
|
-
error: { code: "sessionBusy", message: "Turn is active", retryable: true }
|
|
18936
|
-
};
|
|
18937
|
-
}
|
|
18938
18967
|
const requested = harnessThinkingOptionIdSchema.safeParse(command.thinkingOptionId);
|
|
18939
18968
|
if (!requested.success) {
|
|
18940
18969
|
return {
|
|
@@ -14527,6 +14527,46 @@ config(en_default());
|
|
|
14527
14527
|
// ../../shared-contracts/dist/version.js
|
|
14528
14528
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14529
14529
|
|
|
14530
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
14531
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
14532
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
14533
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
14534
|
+
enabled: external_exports.boolean(),
|
|
14535
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
14536
|
+
});
|
|
14537
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
14538
|
+
enabled: false,
|
|
14539
|
+
timeoutMinutes: 30
|
|
14540
|
+
});
|
|
14541
|
+
|
|
14542
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
14543
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
14544
|
+
"idle",
|
|
14545
|
+
"running",
|
|
14546
|
+
"busy",
|
|
14547
|
+
"closing",
|
|
14548
|
+
"failed",
|
|
14549
|
+
"blocked"
|
|
14550
|
+
]);
|
|
14551
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
14552
|
+
"none",
|
|
14553
|
+
"disabled",
|
|
14554
|
+
"timeout",
|
|
14555
|
+
"operation",
|
|
14556
|
+
"background",
|
|
14557
|
+
"identity",
|
|
14558
|
+
"persistence",
|
|
14559
|
+
"closeFailed"
|
|
14560
|
+
]);
|
|
14561
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
14562
|
+
threadId: external_exports.string(),
|
|
14563
|
+
title: external_exports.string(),
|
|
14564
|
+
harnessId: external_exports.string(),
|
|
14565
|
+
state: loadedSessionStateSchema,
|
|
14566
|
+
reason: loadedSessionReasonSchema,
|
|
14567
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
14568
|
+
}));
|
|
14569
|
+
|
|
14530
14570
|
// ../../shared-contracts/dist/ids.js
|
|
14531
14571
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14532
14572
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -44993,6 +45033,7 @@ async function closeClaudeProcessGroup(child, timeoutMs) {
|
|
|
44993
45033
|
|
|
44994
45034
|
// dist/sdk-transport.js
|
|
44995
45035
|
var CLIENT_APP = "codexhost-claude-code-adapter/0.0.0";
|
|
45036
|
+
var SESSION_ENTRYPOINT = "codexhost-sdk";
|
|
44996
45037
|
var APPROVAL_TITLE_MAX_LENGTH = 120;
|
|
44997
45038
|
var APPROVAL_DESCRIPTION_MAX_LENGTH = 500;
|
|
44998
45039
|
var DEFAULT_ABORT_TIMEOUT_MS = 2e3;
|
|
@@ -45315,6 +45356,7 @@ var ClaudeSdkTransport = class {
|
|
|
45315
45356
|
forwardSubagentText: true,
|
|
45316
45357
|
env: withNodeRuntimeOnPath({
|
|
45317
45358
|
...this.#environment,
|
|
45359
|
+
CLAUDE_CODE_ENTRYPOINT: SESSION_ENTRYPOINT,
|
|
45318
45360
|
CLAUDE_AGENT_SDK_CLIENT_APP: CLIENT_APP
|
|
45319
45361
|
}),
|
|
45320
45362
|
spawnClaudeCodeProcess: (options) => this.#spawn(options)
|
|
@@ -46214,6 +46256,7 @@ var ClaudeToolLifecycle = class {
|
|
|
46214
46256
|
const fileItem = {
|
|
46215
46257
|
type: "fileChange",
|
|
46216
46258
|
itemId: this.#newItemId(),
|
|
46259
|
+
sourceItemIds: [tool.item.itemId],
|
|
46217
46260
|
changes: [change]
|
|
46218
46261
|
};
|
|
46219
46262
|
this.#emit({ type: "item.started", turnId, item: fileItem });
|
|
@@ -46964,7 +47007,7 @@ var ClaudeHarnessSession = class {
|
|
|
46964
47007
|
return this.#closePromise;
|
|
46965
47008
|
}
|
|
46966
47009
|
async #selectModel(command) {
|
|
46967
|
-
if (this.#acceptingTurn || this.#
|
|
47010
|
+
if (this.#acceptingTurn || this.#configurationTask || this.#readingHistory) {
|
|
46968
47011
|
return {
|
|
46969
47012
|
ok: false,
|
|
46970
47013
|
error: {
|
|
@@ -47022,7 +47065,7 @@ var ClaudeHarnessSession = class {
|
|
|
47022
47065
|
}
|
|
47023
47066
|
}
|
|
47024
47067
|
async #selectThinking(command) {
|
|
47025
|
-
if (this.#acceptingTurn || this.#
|
|
47068
|
+
if (this.#acceptingTurn || this.#configurationTask || this.#readingHistory) {
|
|
47026
47069
|
return {
|
|
47027
47070
|
ok: false,
|
|
47028
47071
|
error: {
|
|
@@ -48408,7 +48451,8 @@ var ClaudeCodeAdapter = class {
|
|
|
48408
48451
|
#latestPlanLimit = null;
|
|
48409
48452
|
#accountInspection = null;
|
|
48410
48453
|
constructor(options = {}, dependencies) {
|
|
48411
|
-
|
|
48454
|
+
const environment = options.environment ?? process.env;
|
|
48455
|
+
this.#pendingSessions = new ClaudePendingSessions(environment);
|
|
48412
48456
|
this.#closeTimeoutMs = options.closeTimeoutMs ?? DEFAULT_CLOSE_TIMEOUT_MS;
|
|
48413
48457
|
this.#cancelTimeoutMs = options.cancelTimeoutMs ?? DEFAULT_CANCEL_TIMEOUT_MS;
|
|
48414
48458
|
if (!Number.isSafeInteger(this.#cancelTimeoutMs) || this.#cancelTimeoutMs <= 0) {
|
|
@@ -48809,7 +48853,7 @@ var ClaudeCodeAdapter = class {
|
|
|
48809
48853
|
|
|
48810
48854
|
// dist/user-shell-environment.js
|
|
48811
48855
|
import path13 from "node:path";
|
|
48812
|
-
import {
|
|
48856
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
48813
48857
|
var ENVIRONMENT_MARKER = Buffer.from("\0CODEXHOST_USER_SHELL_ENV_V1\0");
|
|
48814
48858
|
var ENVIRONMENT_COMMAND = "printf '\\0CODEXHOST_USER_SHELL_ENV_V1\\0'; /usr/bin/env -0";
|
|
48815
48859
|
var SHELL_ENVIRONMENT_TIMEOUT_MS = 3e3;
|
|
@@ -48846,7 +48890,7 @@ function mergeMissingEnvironment(environment, shellEnvironment) {
|
|
|
48846
48890
|
}
|
|
48847
48891
|
return merged;
|
|
48848
48892
|
}
|
|
48849
|
-
function withUserShellEnvironment(environment, dependencies) {
|
|
48893
|
+
async function withUserShellEnvironment(environment, dependencies) {
|
|
48850
48894
|
const platform = dependencies?.platform ?? process.platform;
|
|
48851
48895
|
if (platform === "win32" || !environment.HOME)
|
|
48852
48896
|
return environment;
|
|
@@ -48857,13 +48901,16 @@ function withUserShellEnvironment(environment, dependencies) {
|
|
|
48857
48901
|
const cached2 = dependencies ? void 0 : shellEnvironmentCache.get(cacheKey);
|
|
48858
48902
|
if (cached2)
|
|
48859
48903
|
return mergeMissingEnvironment(environment, cached2);
|
|
48860
|
-
const run = dependencies?.run ?? ((command, arguments_, options) =>
|
|
48861
|
-
|
|
48862
|
-
|
|
48863
|
-
|
|
48904
|
+
const run = dependencies?.run ?? ((command, arguments_, options) => new Promise((resolve2) => {
|
|
48905
|
+
const child = execFile2(command, arguments_, {
|
|
48906
|
+
...options,
|
|
48907
|
+
encoding: "buffer",
|
|
48908
|
+
killSignal: "SIGKILL"
|
|
48909
|
+
}, (error52, stdout) => resolve2({ status: error52 ? 1 : 0, stdout }));
|
|
48910
|
+
child.stdin?.end();
|
|
48864
48911
|
}));
|
|
48865
48912
|
try {
|
|
48866
|
-
const result = run(shell, ["-ilc", ENVIRONMENT_COMMAND], {
|
|
48913
|
+
const result = await run(shell, ["-ilc", ENVIRONMENT_COMMAND], {
|
|
48867
48914
|
env: environment,
|
|
48868
48915
|
maxBuffer: SHELL_ENVIRONMENT_MAX_BYTES,
|
|
48869
48916
|
timeout: SHELL_ENVIRONMENT_TIMEOUT_MS,
|
|
@@ -48882,8 +48929,8 @@ function withUserShellEnvironment(environment, dependencies) {
|
|
|
48882
48929
|
|
|
48883
48930
|
// dist/plugin.js
|
|
48884
48931
|
var CLAUDE_CODE_COMMAND_ENV = "CODEXHOST_CLAUDE_COMMAND";
|
|
48885
|
-
function createHarnessAdapter(context) {
|
|
48886
|
-
const environment = withUserShellEnvironment({ ...context.environment });
|
|
48932
|
+
async function createHarnessAdapter(context) {
|
|
48933
|
+
const environment = await withUserShellEnvironment({ ...context.environment });
|
|
48887
48934
|
if (context.platform === "darwin" && context.managedRemoteHost) {
|
|
48888
48935
|
return new BrokeredHarnessAdapter({
|
|
48889
48936
|
commandCatalog: claudeCommandCatalog,
|
|
@@ -14525,6 +14525,46 @@ config(en_default());
|
|
|
14525
14525
|
// ../../shared-contracts/dist/version.js
|
|
14526
14526
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14527
14527
|
|
|
14528
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
14529
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
14530
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
14531
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
14532
|
+
enabled: external_exports.boolean(),
|
|
14533
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
14534
|
+
});
|
|
14535
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
14536
|
+
enabled: false,
|
|
14537
|
+
timeoutMinutes: 30
|
|
14538
|
+
});
|
|
14539
|
+
|
|
14540
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
14541
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
14542
|
+
"idle",
|
|
14543
|
+
"running",
|
|
14544
|
+
"busy",
|
|
14545
|
+
"closing",
|
|
14546
|
+
"failed",
|
|
14547
|
+
"blocked"
|
|
14548
|
+
]);
|
|
14549
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
14550
|
+
"none",
|
|
14551
|
+
"disabled",
|
|
14552
|
+
"timeout",
|
|
14553
|
+
"operation",
|
|
14554
|
+
"background",
|
|
14555
|
+
"identity",
|
|
14556
|
+
"persistence",
|
|
14557
|
+
"closeFailed"
|
|
14558
|
+
]);
|
|
14559
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
14560
|
+
threadId: external_exports.string(),
|
|
14561
|
+
title: external_exports.string(),
|
|
14562
|
+
harnessId: external_exports.string(),
|
|
14563
|
+
state: loadedSessionStateSchema,
|
|
14564
|
+
reason: loadedSessionReasonSchema,
|
|
14565
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
14566
|
+
}));
|
|
14567
|
+
|
|
14528
14568
|
// ../../shared-contracts/dist/ids.js
|
|
14529
14569
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14530
14570
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -21053,6 +21093,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21053
21093
|
const turns = [];
|
|
21054
21094
|
let current;
|
|
21055
21095
|
const tools = /* @__PURE__ */ new Map();
|
|
21096
|
+
const earlyResults = /* @__PURE__ */ new Map();
|
|
21097
|
+
const applyResult = (snapshot, row) => {
|
|
21098
|
+
snapshot.outcome = toolOutcome(row.status);
|
|
21099
|
+
if (snapshot.item.type === "subagentDelegation") {
|
|
21100
|
+
const childId = codeBuddyChildId(row);
|
|
21101
|
+
snapshot.item.subagents = snapshot.item.subagents.map((child) => ({
|
|
21102
|
+
...child,
|
|
21103
|
+
...childId ? { subagentId: childId, nativeSubagentId: childId } : {},
|
|
21104
|
+
status: snapshot.outcome.status === "failed" ? "failed" : child.background ? "interrupted" : "completed",
|
|
21105
|
+
resultSummary: child.background ? "Live background observation is unavailable after reload" : contentText(row.output).slice(0, 2e3)
|
|
21106
|
+
}));
|
|
21107
|
+
}
|
|
21108
|
+
if (snapshot.item.type === "toolExecution")
|
|
21109
|
+
snapshot.item.output = toolOutput(row.output);
|
|
21110
|
+
if (snapshot.item.type === "commandExecution") {
|
|
21111
|
+
const output = toolOutput(row.output);
|
|
21112
|
+
snapshot.item.output = contentText(output.content);
|
|
21113
|
+
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
21114
|
+
}
|
|
21115
|
+
};
|
|
21056
21116
|
for (const row of nativeHistoryRows(contents)) {
|
|
21057
21117
|
if (row.type === "message" && row.role === "user") {
|
|
21058
21118
|
current = {
|
|
@@ -21069,6 +21129,7 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21069
21129
|
};
|
|
21070
21130
|
turns.push(current);
|
|
21071
21131
|
tools.clear();
|
|
21132
|
+
earlyResults.clear();
|
|
21072
21133
|
continue;
|
|
21073
21134
|
}
|
|
21074
21135
|
if (!current)
|
|
@@ -21098,34 +21159,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21098
21159
|
throw new CodeBuddyError("protocolError", "Invalid native Tool arguments");
|
|
21099
21160
|
}
|
|
21100
21161
|
}
|
|
21162
|
+
const callId = text(row.callId);
|
|
21101
21163
|
const snapshot = {
|
|
21102
|
-
item: row.name === "Agent" ? codeBuddyDelegation(
|
|
21164
|
+
item: row.name === "Agent" ? codeBuddyDelegation(callId, input, "running") : toolItem(callId, text(row.name), input, cwd),
|
|
21103
21165
|
outcome: toolOutcome("unknown")
|
|
21104
21166
|
};
|
|
21105
|
-
tools.set(
|
|
21167
|
+
tools.set(callId, snapshot);
|
|
21106
21168
|
current.items.push(snapshot);
|
|
21107
21169
|
current.outcome = { status: "unknown", reason: "Native Tool has not completed" };
|
|
21108
|
-
|
|
21109
|
-
|
|
21110
|
-
|
|
21111
|
-
|
|
21112
|
-
snapshot.outcome = toolOutcome(row.status);
|
|
21113
|
-
if (snapshot.item.type === "subagentDelegation") {
|
|
21114
|
-
const childId = codeBuddyChildId(row);
|
|
21115
|
-
snapshot.item.subagents = snapshot.item.subagents.map((child) => ({
|
|
21116
|
-
...child,
|
|
21117
|
-
...childId ? { subagentId: childId, nativeSubagentId: childId } : {},
|
|
21118
|
-
status: snapshot.outcome.status === "failed" ? "failed" : child.background ? "interrupted" : "completed",
|
|
21119
|
-
resultSummary: child.background ? "Live background observation is unavailable after reload" : contentText(row.output).slice(0, 2e3)
|
|
21120
|
-
}));
|
|
21121
|
-
}
|
|
21122
|
-
if (snapshot.item.type === "toolExecution")
|
|
21123
|
-
snapshot.item.output = toolOutput(row.output);
|
|
21124
|
-
if (snapshot.item.type === "commandExecution") {
|
|
21125
|
-
const output = toolOutput(row.output);
|
|
21126
|
-
snapshot.item.output = contentText(output.content);
|
|
21127
|
-
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
21170
|
+
const early = earlyResults.get(callId);
|
|
21171
|
+
if (early) {
|
|
21172
|
+
earlyResults.delete(callId);
|
|
21173
|
+
applyResult(snapshot, early);
|
|
21128
21174
|
}
|
|
21175
|
+
} else if (row.type === "function_call_result") {
|
|
21176
|
+
const callId = text(row.callId);
|
|
21177
|
+
const snapshot = tools.get(callId);
|
|
21178
|
+
if (snapshot)
|
|
21179
|
+
applyResult(snapshot, row);
|
|
21180
|
+
else
|
|
21181
|
+
earlyResults.set(callId, row);
|
|
21129
21182
|
}
|
|
21130
21183
|
}
|
|
21131
21184
|
return { turns };
|
|
@@ -21865,7 +21918,7 @@ var CodeBuddySession = class {
|
|
|
21865
21918
|
}
|
|
21866
21919
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21867
21920
|
}
|
|
21868
|
-
if (this.#busy || this.#active)
|
|
21921
|
+
if (this.#busy || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21869
21922
|
return failure("sessionBusy", "Session is executing an operation");
|
|
21870
21923
|
this.#busy = true;
|
|
21871
21924
|
try {
|
|
@@ -14525,6 +14525,46 @@ config(en_default());
|
|
|
14525
14525
|
// ../../shared-contracts/dist/version.js
|
|
14526
14526
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14527
14527
|
|
|
14528
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
14529
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
14530
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
14531
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
14532
|
+
enabled: external_exports.boolean(),
|
|
14533
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
14534
|
+
});
|
|
14535
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
14536
|
+
enabled: false,
|
|
14537
|
+
timeoutMinutes: 30
|
|
14538
|
+
});
|
|
14539
|
+
|
|
14540
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
14541
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
14542
|
+
"idle",
|
|
14543
|
+
"running",
|
|
14544
|
+
"busy",
|
|
14545
|
+
"closing",
|
|
14546
|
+
"failed",
|
|
14547
|
+
"blocked"
|
|
14548
|
+
]);
|
|
14549
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
14550
|
+
"none",
|
|
14551
|
+
"disabled",
|
|
14552
|
+
"timeout",
|
|
14553
|
+
"operation",
|
|
14554
|
+
"background",
|
|
14555
|
+
"identity",
|
|
14556
|
+
"persistence",
|
|
14557
|
+
"closeFailed"
|
|
14558
|
+
]);
|
|
14559
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
14560
|
+
threadId: external_exports.string(),
|
|
14561
|
+
title: external_exports.string(),
|
|
14562
|
+
harnessId: external_exports.string(),
|
|
14563
|
+
state: loadedSessionStateSchema,
|
|
14564
|
+
reason: loadedSessionReasonSchema,
|
|
14565
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
14566
|
+
}));
|
|
14567
|
+
|
|
14528
14568
|
// ../../shared-contracts/dist/ids.js
|
|
14529
14569
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14530
14570
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -21359,7 +21399,7 @@ var CursorAdapter = class {
|
|
|
21359
21399
|
};
|
|
21360
21400
|
const cwd = path5.resolve(input.cwd ?? process.cwd());
|
|
21361
21401
|
const cached2 = this.#inspections.get(cwd);
|
|
21362
|
-
if (cached2 && (cached2.pending || !input.refresh
|
|
21402
|
+
if (cached2 && (cached2.pending || !input.refresh))
|
|
21363
21403
|
return cached2.result;
|
|
21364
21404
|
const result = (async () => {
|
|
21365
21405
|
const transport = new CursorTransport(this.transportOptions(cwd));
|
|
@@ -21381,11 +21421,10 @@ var CursorAdapter = class {
|
|
|
21381
21421
|
await transport.close();
|
|
21382
21422
|
}
|
|
21383
21423
|
})();
|
|
21384
|
-
const entry = {
|
|
21424
|
+
const entry = { pending: true, result };
|
|
21385
21425
|
this.#inspections.set(cwd, entry);
|
|
21386
21426
|
void result.finally(() => {
|
|
21387
21427
|
entry.pending = false;
|
|
21388
|
-
entry.expires = Date.now() + 5 * 6e4;
|
|
21389
21428
|
});
|
|
21390
21429
|
return result;
|
|
21391
21430
|
}
|
|
@@ -21537,7 +21576,7 @@ var CursorSession = class {
|
|
|
21537
21576
|
void active.task.finally(() => clearTimeout(timer));
|
|
21538
21577
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21539
21578
|
}
|
|
21540
|
-
if (this.#
|
|
21579
|
+
if (this.#configuring || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21541
21580
|
return rejected("sessionBusy", "Cursor session is busy");
|
|
21542
21581
|
if (command.type === "turn.start") {
|
|
21543
21582
|
if (this.#submitted.has(command.turnId))
|
|
@@ -18226,6 +18226,46 @@ config(en_default());
|
|
|
18226
18226
|
// ../../shared-contracts/dist/version.js
|
|
18227
18227
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
18228
18228
|
|
|
18229
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
18230
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
18231
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
18232
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
18233
|
+
enabled: external_exports.boolean(),
|
|
18234
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
18235
|
+
});
|
|
18236
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
18237
|
+
enabled: false,
|
|
18238
|
+
timeoutMinutes: 30
|
|
18239
|
+
});
|
|
18240
|
+
|
|
18241
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
18242
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
18243
|
+
"idle",
|
|
18244
|
+
"running",
|
|
18245
|
+
"busy",
|
|
18246
|
+
"closing",
|
|
18247
|
+
"failed",
|
|
18248
|
+
"blocked"
|
|
18249
|
+
]);
|
|
18250
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
18251
|
+
"none",
|
|
18252
|
+
"disabled",
|
|
18253
|
+
"timeout",
|
|
18254
|
+
"operation",
|
|
18255
|
+
"background",
|
|
18256
|
+
"identity",
|
|
18257
|
+
"persistence",
|
|
18258
|
+
"closeFailed"
|
|
18259
|
+
]);
|
|
18260
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
18261
|
+
threadId: external_exports.string(),
|
|
18262
|
+
title: external_exports.string(),
|
|
18263
|
+
harnessId: external_exports.string(),
|
|
18264
|
+
state: loadedSessionStateSchema,
|
|
18265
|
+
reason: loadedSessionReasonSchema,
|
|
18266
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
18267
|
+
}));
|
|
18268
|
+
|
|
18229
18269
|
// ../../shared-contracts/dist/ids.js
|
|
18230
18270
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
18231
18271
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -19177,6 +19217,11 @@ var HarnessOutputChannel = class {
|
|
|
19177
19217
|
var DIAGNOSTIC_TAIL_MAX_LENGTH = 8e3;
|
|
19178
19218
|
var SENSITIVE_VALUE_PATTERN = /(api[_-]?key|access[_-]?token|auth(?:orization)?|password|secret)(\s*[:=]\s*)([^\s,;]+)/giu;
|
|
19179
19219
|
var BEARER_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]+/giu;
|
|
19220
|
+
var NODE_WARNING_PREFIX_PATTERN = /^\(node:\d+\)\s+/u;
|
|
19221
|
+
var NODE_TRACE_WARNINGS_HINT_PATTERN = /^\(Use\s+`node\s+--trace-warnings/u;
|
|
19222
|
+
function filterAmbientNodeWarnings(output) {
|
|
19223
|
+
return output.split("\n").filter((line) => !NODE_WARNING_PREFIX_PATTERN.test(line) && !NODE_TRACE_WARNINGS_HINT_PATTERN.test(line)).join("\n");
|
|
19224
|
+
}
|
|
19180
19225
|
function sanitizeDiagnosticTail(value) {
|
|
19181
19226
|
const redacted = value.replace(BEARER_PATTERN, "Bearer [redacted]").replace(SENSITIVE_VALUE_PATTERN, "$1$2[redacted]");
|
|
19182
19227
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
@@ -19734,9 +19779,10 @@ async function probeDeepSeekExecutableGeneration(options = {}, dependencies = {
|
|
|
19734
19779
|
cleanupTimeoutMs,
|
|
19735
19780
|
outputLimitBytes
|
|
19736
19781
|
}, dependencies);
|
|
19737
|
-
|
|
19782
|
+
const substantiveStderr = filterAmbientNodeWarnings(output.stderr);
|
|
19783
|
+
if (substantiveStderr.length > 0) {
|
|
19738
19784
|
throw probeError("protocolError", "DeepSeek Harness --version wrote unexpected stderr", {
|
|
19739
|
-
stderrTail: sanitizeDiagnosticTail(
|
|
19785
|
+
stderrTail: sanitizeDiagnosticTail(substantiveStderr)
|
|
19740
19786
|
});
|
|
19741
19787
|
}
|
|
19742
19788
|
return { ...classifyDeepSeekVersionOutput(output.stdout), command };
|
|
@@ -21857,7 +21903,7 @@ function structuredDiffs(meta3) {
|
|
|
21857
21903
|
const oldHeader = kind === "add" ? "/dev/null" : `a/${candidate.path}`;
|
|
21858
21904
|
const newHeader = kind === "delete" ? "/dev/null" : `b/${candidate.path}`;
|
|
21859
21905
|
const unifiedDiff = createTwoFilesPatch(oldHeader, newHeader, oldText ?? "", newText ?? "", "", "", { context: 3 });
|
|
21860
|
-
changes.push({ path: candidate.path, kind, unifiedDiff });
|
|
21906
|
+
changes.push({ path: candidate.path, kind, unifiedDiff, diffScope: "fragment" });
|
|
21861
21907
|
}
|
|
21862
21908
|
return changes;
|
|
21863
21909
|
}
|
|
@@ -27216,6 +27262,7 @@ function projectToolResultEvent(turn, sessionId, data, seq, limit) {
|
|
|
27216
27262
|
const fileItem = {
|
|
27217
27263
|
type: "fileChange",
|
|
27218
27264
|
itemId: modernItemId(sessionId, `event:${seq}:file-change`),
|
|
27265
|
+
sourceItemIds: [item.itemId],
|
|
27219
27266
|
changes
|
|
27220
27267
|
};
|
|
27221
27268
|
turn.items.push({ item: fileItem, outcome: { status: "succeeded" } });
|
|
@@ -28287,14 +28334,14 @@ ${question.detail}` : question.question;
|
|
|
28287
28334
|
if (force || changed)
|
|
28288
28335
|
this.#emit({ type: "session.state.changed", state: next });
|
|
28289
28336
|
}
|
|
28290
|
-
#configurationBusy(area) {
|
|
28291
|
-
if (this.#active || this.#buffer || this.#pendingByRequestId.size > 0 || this.#activeCommand || this.#commandAdmission || this.#queuedDeliveries.size > 0
|
|
28337
|
+
#configurationBusy(area, allowActiveTurn = false) {
|
|
28338
|
+
if (this.#configuring || this.#reading || !allowActiveTurn && (this.#active || this.#buffer || this.#pendingByRequestId.size > 0 || this.#activeCommand || this.#commandAdmission || this.#queuedDeliveries.size > 0)) {
|
|
28292
28339
|
return busyError(`select ${area}`);
|
|
28293
28340
|
}
|
|
28294
28341
|
return void 0;
|
|
28295
28342
|
}
|
|
28296
28343
|
async #selectModel(command) {
|
|
28297
|
-
const busy = this.#configurationBusy("a Model");
|
|
28344
|
+
const busy = this.#configurationBusy("a Model", true);
|
|
28298
28345
|
if (busy)
|
|
28299
28346
|
return { ok: false, error: busy };
|
|
28300
28347
|
let requested;
|
|
@@ -28309,7 +28356,7 @@ ${question.detail}` : question.question;
|
|
|
28309
28356
|
});
|
|
28310
28357
|
}
|
|
28311
28358
|
async #selectThinking(command) {
|
|
28312
|
-
const busy = this.#configurationBusy("Thinking");
|
|
28359
|
+
const busy = this.#configurationBusy("Thinking", true);
|
|
28313
28360
|
if (busy)
|
|
28314
28361
|
return { ok: false, error: busy };
|
|
28315
28362
|
let requested;
|
|
@@ -29416,6 +29463,7 @@ ${question.detail}` : question.question;
|
|
|
29416
29463
|
const fileItem = {
|
|
29417
29464
|
type: "fileChange",
|
|
29418
29465
|
itemId: modernItemId(this.#sessionId, `event:${seq}:file-change`),
|
|
29466
|
+
sourceItemIds: [item.itemId],
|
|
29419
29467
|
changes
|
|
29420
29468
|
};
|
|
29421
29469
|
this.#emit({ type: "item.started", turnId: active.turnId, item: fileItem });
|