@codexhost/cli-darwin-x64 0.7.1 → 0.9.1-test.2
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 +16 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +185 -47
- package/app/host-runtime.mjs +5084 -3890
- package/app/plugins/antigravity/plugin.mjs +71 -62
- package/app/plugins/claude-code/plugin.mjs +512 -217
- package/app/plugins/codebuddy/plugin.mjs +103 -70
- package/app/plugins/cursor-cli/plugin.mjs +70 -51
- package/app/plugins/deepseek-harness/plugin.mjs +82 -54
- package/app/plugins/enabled.json +4 -1
- package/app/plugins/grok/plugin.mjs +70 -48
- package/app/plugins/hermes/manifest.json +11 -0
- package/app/plugins/hermes/plugin.mjs +21680 -0
- package/app/plugins/kiro-cli/plugin.mjs +77 -50
- package/app/plugins/omp/plugin.mjs +80 -53
- package/app/plugins/opencode/plugin.mjs +139 -94
- package/app/plugins/pi/plugin.mjs +80 -53
- package/app/plugins/qoder/assets/icon.svg +1 -0
- package/app/plugins/qoder/manifest.json +12 -0
- package/app/plugins/qoder/plugin.mjs +52260 -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 +52258 -0
- package/app/renderer-extension.js +3389 -1036
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/licenses/Qoder-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/QoderCN-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/opencodex-LICENSE.txt +21 -0
- package/licenses/tailwindcss-LICENSE.txt +21 -0
- package/package.json +1 -1
|
@@ -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"
|
|
@@ -14629,12 +14669,21 @@ var harnessAccountSnapshotSchema = external_exports.object({
|
|
|
14629
14669
|
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
14630
14670
|
credits: accountCreditsSnapshotSchema
|
|
14631
14671
|
}).strict();
|
|
14632
|
-
var
|
|
14672
|
+
var harnessAccountIdentityShape = {
|
|
14673
|
+
harnessId: harnessIdSchema,
|
|
14674
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
14675
|
+
};
|
|
14676
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
14677
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
14678
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
14679
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
14680
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
14681
|
+
...harnessAccountIdentityShape,
|
|
14682
|
+
account: harnessAccountSnapshotSchema.nullable()
|
|
14683
|
+
}).strict();
|
|
14684
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
14633
14685
|
var harnessAccountListResultSchema = external_exports.object({
|
|
14634
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(
|
|
14635
|
-
harnessId: harnessIdSchema,
|
|
14636
|
-
harnessName: external_exports.string().min(1)
|
|
14637
|
-
})).max(128)
|
|
14686
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
|
|
14638
14687
|
}).strict();
|
|
14639
14688
|
|
|
14640
14689
|
// ../../shared-contracts/dist/json-value.js
|
|
@@ -14927,7 +14976,6 @@ var threadInspectionParamsSchema = external_exports.object({
|
|
|
14927
14976
|
}).strict();
|
|
14928
14977
|
var codexThreadInspectionSchema = external_exports.object({
|
|
14929
14978
|
owner: external_exports.literal("codex"),
|
|
14930
|
-
accountId: nonBlankTextSchema2.optional(),
|
|
14931
14979
|
locked: external_exports.literal(true)
|
|
14932
14980
|
}).strict();
|
|
14933
14981
|
var externalThreadInspectionSchema = external_exports.object({
|
|
@@ -15065,52 +15113,24 @@ var codexAccountSchema = external_exports.object({
|
|
|
15065
15113
|
accountId: accountIdSchema,
|
|
15066
15114
|
label: nonBlankTextSchema3.max(256),
|
|
15067
15115
|
email: external_exports.string().email().max(320).optional(),
|
|
15068
|
-
planType: codexAccountPlanTypeSchema.optional()
|
|
15069
|
-
codexHome: nonBlankTextSchema3.max(16384),
|
|
15070
|
-
active: external_exports.boolean(),
|
|
15071
|
-
isDefault: external_exports.boolean()
|
|
15116
|
+
planType: codexAccountPlanTypeSchema.optional()
|
|
15072
15117
|
}).strict();
|
|
15073
|
-
var
|
|
15074
|
-
var
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
accountId: accountIdSchema,
|
|
15082
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15083
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15084
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15118
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15119
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
15120
|
+
version: external_exports.literal(2),
|
|
15121
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
15122
|
+
phase: codexAccountPhaseSchema,
|
|
15123
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15124
|
+
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15125
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15085
15126
|
}).strict();
|
|
15086
|
-
var
|
|
15087
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15088
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15089
|
-
accountId: accountIdSchema,
|
|
15090
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15091
|
-
success: external_exports.boolean(),
|
|
15092
|
-
error: external_exports.string().max(4096).nullable()
|
|
15093
|
-
}).strict();
|
|
15094
|
-
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15127
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15095
15128
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15096
15129
|
accountId: accountIdSchema,
|
|
15097
15130
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15098
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
accountId: accountIdSchema,
|
|
15102
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15103
|
-
}).strict();
|
|
15104
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15105
|
-
"reset",
|
|
15106
|
-
"nothingToReset",
|
|
15107
|
-
"noCredit",
|
|
15108
|
-
"alreadyRedeemed"
|
|
15109
|
-
]);
|
|
15110
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15111
|
-
accountId: accountIdSchema,
|
|
15112
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15113
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15131
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15132
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
15133
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
15114
15134
|
}).strict();
|
|
15115
15135
|
|
|
15116
15136
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
@@ -21043,6 +21063,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21043
21063
|
const turns = [];
|
|
21044
21064
|
let current;
|
|
21045
21065
|
const tools = /* @__PURE__ */ new Map();
|
|
21066
|
+
const earlyResults = /* @__PURE__ */ new Map();
|
|
21067
|
+
const applyResult = (snapshot, row) => {
|
|
21068
|
+
snapshot.outcome = toolOutcome(row.status);
|
|
21069
|
+
if (snapshot.item.type === "subagentDelegation") {
|
|
21070
|
+
const childId = codeBuddyChildId(row);
|
|
21071
|
+
snapshot.item.subagents = snapshot.item.subagents.map((child) => ({
|
|
21072
|
+
...child,
|
|
21073
|
+
...childId ? { subagentId: childId, nativeSubagentId: childId } : {},
|
|
21074
|
+
status: snapshot.outcome.status === "failed" ? "failed" : child.background ? "interrupted" : "completed",
|
|
21075
|
+
resultSummary: child.background ? "Live background observation is unavailable after reload" : contentText(row.output).slice(0, 2e3)
|
|
21076
|
+
}));
|
|
21077
|
+
}
|
|
21078
|
+
if (snapshot.item.type === "toolExecution")
|
|
21079
|
+
snapshot.item.output = toolOutput(row.output);
|
|
21080
|
+
if (snapshot.item.type === "commandExecution") {
|
|
21081
|
+
const output = toolOutput(row.output);
|
|
21082
|
+
snapshot.item.output = contentText(output.content);
|
|
21083
|
+
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
21084
|
+
}
|
|
21085
|
+
};
|
|
21046
21086
|
for (const row of nativeHistoryRows(contents)) {
|
|
21047
21087
|
if (row.type === "message" && row.role === "user") {
|
|
21048
21088
|
current = {
|
|
@@ -21059,6 +21099,7 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21059
21099
|
};
|
|
21060
21100
|
turns.push(current);
|
|
21061
21101
|
tools.clear();
|
|
21102
|
+
earlyResults.clear();
|
|
21062
21103
|
continue;
|
|
21063
21104
|
}
|
|
21064
21105
|
if (!current)
|
|
@@ -21088,34 +21129,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21088
21129
|
throw new CodeBuddyError("protocolError", "Invalid native Tool arguments");
|
|
21089
21130
|
}
|
|
21090
21131
|
}
|
|
21132
|
+
const callId = text(row.callId);
|
|
21091
21133
|
const snapshot = {
|
|
21092
|
-
item: row.name === "Agent" ? codeBuddyDelegation(
|
|
21134
|
+
item: row.name === "Agent" ? codeBuddyDelegation(callId, input, "running") : toolItem(callId, text(row.name), input, cwd),
|
|
21093
21135
|
outcome: toolOutcome("unknown")
|
|
21094
21136
|
};
|
|
21095
|
-
tools.set(
|
|
21137
|
+
tools.set(callId, snapshot);
|
|
21096
21138
|
current.items.push(snapshot);
|
|
21097
21139
|
current.outcome = { status: "unknown", reason: "Native Tool has not completed" };
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
snapshot.outcome = toolOutcome(row.status);
|
|
21103
|
-
if (snapshot.item.type === "subagentDelegation") {
|
|
21104
|
-
const childId = codeBuddyChildId(row);
|
|
21105
|
-
snapshot.item.subagents = snapshot.item.subagents.map((child) => ({
|
|
21106
|
-
...child,
|
|
21107
|
-
...childId ? { subagentId: childId, nativeSubagentId: childId } : {},
|
|
21108
|
-
status: snapshot.outcome.status === "failed" ? "failed" : child.background ? "interrupted" : "completed",
|
|
21109
|
-
resultSummary: child.background ? "Live background observation is unavailable after reload" : contentText(row.output).slice(0, 2e3)
|
|
21110
|
-
}));
|
|
21111
|
-
}
|
|
21112
|
-
if (snapshot.item.type === "toolExecution")
|
|
21113
|
-
snapshot.item.output = toolOutput(row.output);
|
|
21114
|
-
if (snapshot.item.type === "commandExecution") {
|
|
21115
|
-
const output = toolOutput(row.output);
|
|
21116
|
-
snapshot.item.output = contentText(output.content);
|
|
21117
|
-
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
21140
|
+
const early = earlyResults.get(callId);
|
|
21141
|
+
if (early) {
|
|
21142
|
+
earlyResults.delete(callId);
|
|
21143
|
+
applyResult(snapshot, early);
|
|
21118
21144
|
}
|
|
21145
|
+
} else if (row.type === "function_call_result") {
|
|
21146
|
+
const callId = text(row.callId);
|
|
21147
|
+
const snapshot = tools.get(callId);
|
|
21148
|
+
if (snapshot)
|
|
21149
|
+
applyResult(snapshot, row);
|
|
21150
|
+
else
|
|
21151
|
+
earlyResults.set(callId, row);
|
|
21119
21152
|
}
|
|
21120
21153
|
}
|
|
21121
21154
|
return { turns };
|
|
@@ -21855,7 +21888,7 @@ var CodeBuddySession = class {
|
|
|
21855
21888
|
}
|
|
21856
21889
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21857
21890
|
}
|
|
21858
|
-
if (this.#busy || this.#active)
|
|
21891
|
+
if (this.#busy || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21859
21892
|
return failure("sessionBusy", "Session is executing an operation");
|
|
21860
21893
|
this.#busy = true;
|
|
21861
21894
|
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"
|
|
@@ -14629,12 +14669,21 @@ var harnessAccountSnapshotSchema = external_exports.object({
|
|
|
14629
14669
|
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
14630
14670
|
credits: accountCreditsSnapshotSchema
|
|
14631
14671
|
}).strict();
|
|
14632
|
-
var
|
|
14672
|
+
var harnessAccountIdentityShape = {
|
|
14673
|
+
harnessId: harnessIdSchema,
|
|
14674
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
14675
|
+
};
|
|
14676
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
14677
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
14678
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
14679
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
14680
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
14681
|
+
...harnessAccountIdentityShape,
|
|
14682
|
+
account: harnessAccountSnapshotSchema.nullable()
|
|
14683
|
+
}).strict();
|
|
14684
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
14633
14685
|
var harnessAccountListResultSchema = external_exports.object({
|
|
14634
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(
|
|
14635
|
-
harnessId: harnessIdSchema,
|
|
14636
|
-
harnessName: external_exports.string().min(1)
|
|
14637
|
-
})).max(128)
|
|
14686
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
|
|
14638
14687
|
}).strict();
|
|
14639
14688
|
|
|
14640
14689
|
// ../../shared-contracts/dist/json-value.js
|
|
@@ -14927,7 +14976,6 @@ var threadInspectionParamsSchema = external_exports.object({
|
|
|
14927
14976
|
}).strict();
|
|
14928
14977
|
var codexThreadInspectionSchema = external_exports.object({
|
|
14929
14978
|
owner: external_exports.literal("codex"),
|
|
14930
|
-
accountId: nonBlankTextSchema2.optional(),
|
|
14931
14979
|
locked: external_exports.literal(true)
|
|
14932
14980
|
}).strict();
|
|
14933
14981
|
var externalThreadInspectionSchema = external_exports.object({
|
|
@@ -15065,52 +15113,24 @@ var codexAccountSchema = external_exports.object({
|
|
|
15065
15113
|
accountId: accountIdSchema,
|
|
15066
15114
|
label: nonBlankTextSchema3.max(256),
|
|
15067
15115
|
email: external_exports.string().email().max(320).optional(),
|
|
15068
|
-
planType: codexAccountPlanTypeSchema.optional()
|
|
15069
|
-
codexHome: nonBlankTextSchema3.max(16384),
|
|
15070
|
-
active: external_exports.boolean(),
|
|
15071
|
-
isDefault: external_exports.boolean()
|
|
15116
|
+
planType: codexAccountPlanTypeSchema.optional()
|
|
15072
15117
|
}).strict();
|
|
15073
|
-
var
|
|
15074
|
-
var
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
accountId: accountIdSchema,
|
|
15082
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15083
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15084
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15118
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15119
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
15120
|
+
version: external_exports.literal(2),
|
|
15121
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
15122
|
+
phase: codexAccountPhaseSchema,
|
|
15123
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15124
|
+
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15125
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15085
15126
|
}).strict();
|
|
15086
|
-
var
|
|
15087
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15088
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15089
|
-
accountId: accountIdSchema,
|
|
15090
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15091
|
-
success: external_exports.boolean(),
|
|
15092
|
-
error: external_exports.string().max(4096).nullable()
|
|
15093
|
-
}).strict();
|
|
15094
|
-
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15127
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15095
15128
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15096
15129
|
accountId: accountIdSchema,
|
|
15097
15130
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15098
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
accountId: accountIdSchema,
|
|
15102
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15103
|
-
}).strict();
|
|
15104
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15105
|
-
"reset",
|
|
15106
|
-
"nothingToReset",
|
|
15107
|
-
"noCredit",
|
|
15108
|
-
"alreadyRedeemed"
|
|
15109
|
-
]);
|
|
15110
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15111
|
-
accountId: accountIdSchema,
|
|
15112
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15113
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15131
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15132
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
15133
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
15114
15134
|
}).strict();
|
|
15115
15135
|
|
|
15116
15136
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
@@ -21349,7 +21369,7 @@ var CursorAdapter = class {
|
|
|
21349
21369
|
};
|
|
21350
21370
|
const cwd = path5.resolve(input.cwd ?? process.cwd());
|
|
21351
21371
|
const cached2 = this.#inspections.get(cwd);
|
|
21352
|
-
if (cached2 && (cached2.pending || !input.refresh
|
|
21372
|
+
if (cached2 && (cached2.pending || !input.refresh))
|
|
21353
21373
|
return cached2.result;
|
|
21354
21374
|
const result = (async () => {
|
|
21355
21375
|
const transport = new CursorTransport(this.transportOptions(cwd));
|
|
@@ -21371,11 +21391,10 @@ var CursorAdapter = class {
|
|
|
21371
21391
|
await transport.close();
|
|
21372
21392
|
}
|
|
21373
21393
|
})();
|
|
21374
|
-
const entry = {
|
|
21394
|
+
const entry = { pending: true, result };
|
|
21375
21395
|
this.#inspections.set(cwd, entry);
|
|
21376
21396
|
void result.finally(() => {
|
|
21377
21397
|
entry.pending = false;
|
|
21378
|
-
entry.expires = Date.now() + 5 * 6e4;
|
|
21379
21398
|
});
|
|
21380
21399
|
return result;
|
|
21381
21400
|
}
|
|
@@ -21527,7 +21546,7 @@ var CursorSession = class {
|
|
|
21527
21546
|
void active.task.finally(() => clearTimeout(timer));
|
|
21528
21547
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21529
21548
|
}
|
|
21530
|
-
if (this.#
|
|
21549
|
+
if (this.#configuring || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21531
21550
|
return rejected("sessionBusy", "Cursor session is busy");
|
|
21532
21551
|
if (command.type === "turn.start") {
|
|
21533
21552
|
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"
|
|
@@ -18330,12 +18370,21 @@ var harnessAccountSnapshotSchema = external_exports.object({
|
|
|
18330
18370
|
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
18331
18371
|
credits: accountCreditsSnapshotSchema
|
|
18332
18372
|
}).strict();
|
|
18333
|
-
var
|
|
18373
|
+
var harnessAccountIdentityShape = {
|
|
18374
|
+
harnessId: harnessIdSchema,
|
|
18375
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
18376
|
+
};
|
|
18377
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
18378
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
18379
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
18380
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
18381
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
18382
|
+
...harnessAccountIdentityShape,
|
|
18383
|
+
account: harnessAccountSnapshotSchema.nullable()
|
|
18384
|
+
}).strict();
|
|
18385
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
18334
18386
|
var harnessAccountListResultSchema = external_exports.object({
|
|
18335
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(
|
|
18336
|
-
harnessId: harnessIdSchema,
|
|
18337
|
-
harnessName: external_exports.string().min(1)
|
|
18338
|
-
})).max(128)
|
|
18387
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema.extend(harnessAccountIdentityShape)).max(128)
|
|
18339
18388
|
}).strict();
|
|
18340
18389
|
|
|
18341
18390
|
// ../../shared-contracts/dist/json-value.js
|
|
@@ -18628,7 +18677,6 @@ var threadInspectionParamsSchema = external_exports.object({
|
|
|
18628
18677
|
}).strict();
|
|
18629
18678
|
var codexThreadInspectionSchema = external_exports.object({
|
|
18630
18679
|
owner: external_exports.literal("codex"),
|
|
18631
|
-
accountId: nonBlankTextSchema2.optional(),
|
|
18632
18680
|
locked: external_exports.literal(true)
|
|
18633
18681
|
}).strict();
|
|
18634
18682
|
var externalThreadInspectionSchema = external_exports.object({
|
|
@@ -18766,52 +18814,24 @@ var codexAccountSchema = external_exports.object({
|
|
|
18766
18814
|
accountId: accountIdSchema,
|
|
18767
18815
|
label: nonBlankTextSchema3.max(256),
|
|
18768
18816
|
email: external_exports.string().email().max(320).optional(),
|
|
18769
|
-
planType: codexAccountPlanTypeSchema.optional()
|
|
18770
|
-
codexHome: nonBlankTextSchema3.max(16384),
|
|
18771
|
-
active: external_exports.boolean(),
|
|
18772
|
-
isDefault: external_exports.boolean()
|
|
18817
|
+
planType: codexAccountPlanTypeSchema.optional()
|
|
18773
18818
|
}).strict();
|
|
18774
|
-
var
|
|
18775
|
-
var
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
accountId: accountIdSchema,
|
|
18783
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
18784
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
18785
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
18819
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
18820
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
18821
|
+
version: external_exports.literal(2),
|
|
18822
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
18823
|
+
phase: codexAccountPhaseSchema,
|
|
18824
|
+
revision: external_exports.number().int().nonnegative(),
|
|
18825
|
+
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
18826
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
18786
18827
|
}).strict();
|
|
18787
|
-
var
|
|
18788
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
18789
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
18790
|
-
accountId: accountIdSchema,
|
|
18791
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
18792
|
-
success: external_exports.boolean(),
|
|
18793
|
-
error: external_exports.string().max(4096).nullable()
|
|
18794
|
-
}).strict();
|
|
18795
|
-
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
18828
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
18796
18829
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
18797
18830
|
accountId: accountIdSchema,
|
|
18798
18831
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
18799
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
accountId: accountIdSchema,
|
|
18803
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
18804
|
-
}).strict();
|
|
18805
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
18806
|
-
"reset",
|
|
18807
|
-
"nothingToReset",
|
|
18808
|
-
"noCredit",
|
|
18809
|
-
"alreadyRedeemed"
|
|
18810
|
-
]);
|
|
18811
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
18812
|
-
accountId: accountIdSchema,
|
|
18813
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
18814
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
18832
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
18833
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
18834
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
18815
18835
|
}).strict();
|
|
18816
18836
|
|
|
18817
18837
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
@@ -19173,6 +19193,11 @@ var HarnessOutputChannel = class {
|
|
|
19173
19193
|
var DIAGNOSTIC_TAIL_MAX_LENGTH = 8e3;
|
|
19174
19194
|
var SENSITIVE_VALUE_PATTERN = /(api[_-]?key|access[_-]?token|auth(?:orization)?|password|secret)(\s*[:=]\s*)([^\s,;]+)/giu;
|
|
19175
19195
|
var BEARER_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]+/giu;
|
|
19196
|
+
var NODE_WARNING_PREFIX_PATTERN = /^\(node:\d+\)\s+/u;
|
|
19197
|
+
var NODE_TRACE_WARNINGS_HINT_PATTERN = /^\(Use\s+`node\s+--trace-warnings/u;
|
|
19198
|
+
function filterAmbientNodeWarnings(output) {
|
|
19199
|
+
return output.split("\n").filter((line) => !NODE_WARNING_PREFIX_PATTERN.test(line) && !NODE_TRACE_WARNINGS_HINT_PATTERN.test(line)).join("\n");
|
|
19200
|
+
}
|
|
19176
19201
|
function sanitizeDiagnosticTail(value) {
|
|
19177
19202
|
const redacted = value.replace(BEARER_PATTERN, "Bearer [redacted]").replace(SENSITIVE_VALUE_PATTERN, "$1$2[redacted]");
|
|
19178
19203
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
@@ -19724,9 +19749,10 @@ async function probeDeepSeekExecutableGeneration(options = {}, dependencies = {
|
|
|
19724
19749
|
cleanupTimeoutMs,
|
|
19725
19750
|
outputLimitBytes
|
|
19726
19751
|
}, dependencies);
|
|
19727
|
-
|
|
19752
|
+
const substantiveStderr = filterAmbientNodeWarnings(output.stderr);
|
|
19753
|
+
if (substantiveStderr.length > 0) {
|
|
19728
19754
|
throw probeError("protocolError", "DeepSeek Harness --version wrote unexpected stderr", {
|
|
19729
|
-
stderrTail: sanitizeDiagnosticTail(
|
|
19755
|
+
stderrTail: sanitizeDiagnosticTail(substantiveStderr)
|
|
19730
19756
|
});
|
|
19731
19757
|
}
|
|
19732
19758
|
return { ...classifyDeepSeekVersionOutput(output.stdout), command };
|
|
@@ -21847,7 +21873,7 @@ function structuredDiffs(meta3) {
|
|
|
21847
21873
|
const oldHeader = kind === "add" ? "/dev/null" : `a/${candidate.path}`;
|
|
21848
21874
|
const newHeader = kind === "delete" ? "/dev/null" : `b/${candidate.path}`;
|
|
21849
21875
|
const unifiedDiff = createTwoFilesPatch(oldHeader, newHeader, oldText ?? "", newText ?? "", "", "", { context: 3 });
|
|
21850
|
-
changes.push({ path: candidate.path, kind, unifiedDiff });
|
|
21876
|
+
changes.push({ path: candidate.path, kind, unifiedDiff, diffScope: "fragment" });
|
|
21851
21877
|
}
|
|
21852
21878
|
return changes;
|
|
21853
21879
|
}
|
|
@@ -27206,6 +27232,7 @@ function projectToolResultEvent(turn, sessionId, data, seq, limit) {
|
|
|
27206
27232
|
const fileItem = {
|
|
27207
27233
|
type: "fileChange",
|
|
27208
27234
|
itemId: modernItemId(sessionId, `event:${seq}:file-change`),
|
|
27235
|
+
sourceItemIds: [item.itemId],
|
|
27209
27236
|
changes
|
|
27210
27237
|
};
|
|
27211
27238
|
turn.items.push({ item: fileItem, outcome: { status: "succeeded" } });
|
|
@@ -28277,14 +28304,14 @@ ${question.detail}` : question.question;
|
|
|
28277
28304
|
if (force || changed)
|
|
28278
28305
|
this.#emit({ type: "session.state.changed", state: next });
|
|
28279
28306
|
}
|
|
28280
|
-
#configurationBusy(area) {
|
|
28281
|
-
if (this.#active || this.#buffer || this.#pendingByRequestId.size > 0 || this.#activeCommand || this.#commandAdmission || this.#queuedDeliveries.size > 0
|
|
28307
|
+
#configurationBusy(area, allowActiveTurn = false) {
|
|
28308
|
+
if (this.#configuring || this.#reading || !allowActiveTurn && (this.#active || this.#buffer || this.#pendingByRequestId.size > 0 || this.#activeCommand || this.#commandAdmission || this.#queuedDeliveries.size > 0)) {
|
|
28282
28309
|
return busyError(`select ${area}`);
|
|
28283
28310
|
}
|
|
28284
28311
|
return void 0;
|
|
28285
28312
|
}
|
|
28286
28313
|
async #selectModel(command) {
|
|
28287
|
-
const busy = this.#configurationBusy("a Model");
|
|
28314
|
+
const busy = this.#configurationBusy("a Model", true);
|
|
28288
28315
|
if (busy)
|
|
28289
28316
|
return { ok: false, error: busy };
|
|
28290
28317
|
let requested;
|
|
@@ -28299,7 +28326,7 @@ ${question.detail}` : question.question;
|
|
|
28299
28326
|
});
|
|
28300
28327
|
}
|
|
28301
28328
|
async #selectThinking(command) {
|
|
28302
|
-
const busy = this.#configurationBusy("Thinking");
|
|
28329
|
+
const busy = this.#configurationBusy("Thinking", true);
|
|
28303
28330
|
if (busy)
|
|
28304
28331
|
return { ok: false, error: busy };
|
|
28305
28332
|
let requested;
|
|
@@ -29363,6 +29390,7 @@ ${question.detail}` : question.question;
|
|
|
29363
29390
|
const fileItem = {
|
|
29364
29391
|
type: "fileChange",
|
|
29365
29392
|
itemId: modernItemId(this.#sessionId, `event:${seq}:file-change`),
|
|
29393
|
+
sourceItemIds: [item.itemId],
|
|
29366
29394
|
changes
|
|
29367
29395
|
};
|
|
29368
29396
|
this.#emit({ type: "item.started", turnId: active.turnId, item: fileItem });
|