@codexhost/cli-darwin-x64 0.8.0 → 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 +12 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +66 -26
- package/app/host-runtime.mjs +3760 -6598
- package/app/plugins/antigravity/plugin.mjs +46 -92
- package/app/plugins/claude-code/plugin.mjs +464 -238
- package/app/plugins/codebuddy/plugin.mjs +78 -100
- package/app/plugins/cursor-cli/plugin.mjs +45 -81
- package/app/plugins/deepseek-harness/plugin.mjs +57 -84
- package/app/plugins/enabled.json +3 -1
- package/app/plugins/grok/plugin.mjs +45 -78
- package/app/plugins/hermes/plugin.mjs +42 -80
- package/app/plugins/kiro-cli/plugin.mjs +52 -80
- package/app/plugins/omp/plugin.mjs +55 -83
- package/app/plugins/opencode/plugin.mjs +94 -123
- package/app/plugins/pi/plugin.mjs +55 -83
- 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 +2893 -914
- 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/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"
|
|
@@ -15075,75 +15115,15 @@ var codexAccountSchema = external_exports.object({
|
|
|
15075
15115
|
email: external_exports.string().email().max(320).optional(),
|
|
15076
15116
|
planType: codexAccountPlanTypeSchema.optional()
|
|
15077
15117
|
}).strict();
|
|
15078
|
-
var codexAccountPhaseSchema = external_exports.enum(["ready", "
|
|
15079
|
-
var codexAccountPendingOperationSchema = external_exports.object({
|
|
15080
|
-
operationId: nonBlankTextSchema3.max(1024),
|
|
15081
|
-
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
15082
|
-
}).strict();
|
|
15083
|
-
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
15084
|
-
manage: external_exports.boolean(),
|
|
15085
|
-
switch: external_exports.boolean(),
|
|
15086
|
-
login: external_exports.boolean(),
|
|
15087
|
-
delete: external_exports.boolean(),
|
|
15088
|
-
recover: external_exports.boolean().optional(),
|
|
15089
|
-
logout: external_exports.boolean().optional(),
|
|
15090
|
-
reason: external_exports.enum([
|
|
15091
|
-
"ssh-single-account",
|
|
15092
|
-
"unsupported-storage",
|
|
15093
|
-
"unsupported-version",
|
|
15094
|
-
"recovery-required",
|
|
15095
|
-
"keyring-unavailable",
|
|
15096
|
-
"migration-required"
|
|
15097
|
-
]).optional()
|
|
15098
|
-
}).strict();
|
|
15118
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15099
15119
|
var codexAccountListResultSchema = external_exports.object({
|
|
15100
15120
|
version: external_exports.literal(2),
|
|
15101
15121
|
currentAccountId: accountIdSchema.nullable(),
|
|
15102
15122
|
phase: codexAccountPhaseSchema,
|
|
15103
15123
|
revision: external_exports.number().int().nonnegative(),
|
|
15104
15124
|
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15105
|
-
|
|
15106
|
-
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
15107
|
-
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
15108
|
-
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
15109
|
-
capabilities: codexAccountCapabilitiesSchema,
|
|
15110
|
-
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
15111
|
-
}).strict();
|
|
15112
|
-
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15113
|
-
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15114
|
-
var codexAccountReadyMutationResultShape = {
|
|
15115
|
-
phase: external_exports.literal("ready"),
|
|
15116
|
-
revision: external_exports.number().int().nonnegative()
|
|
15117
|
-
};
|
|
15118
|
-
var codexAccountSwitchResultSchema = external_exports.object({
|
|
15119
|
-
currentAccountId: accountIdSchema,
|
|
15120
|
-
...codexAccountReadyMutationResultShape
|
|
15121
|
-
}).strict();
|
|
15122
|
-
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15123
|
-
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
15124
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
15125
|
-
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
15126
|
-
accountId: accountIdSchema,
|
|
15127
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15128
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15129
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15130
|
-
}).strict();
|
|
15131
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15132
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15133
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15134
|
-
accountId: accountIdSchema,
|
|
15135
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15136
|
-
success: external_exports.boolean(),
|
|
15137
|
-
error: external_exports.string().max(4096).nullable(),
|
|
15138
|
-
saved: external_exports.boolean().optional(),
|
|
15139
|
-
cleanupRequired: external_exports.boolean().optional()
|
|
15140
|
-
}).strict();
|
|
15141
|
-
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
15142
|
-
var codexAccountLogoutResultSchema = external_exports.object({
|
|
15143
|
-
currentAccountId: external_exports.null(),
|
|
15144
|
-
...codexAccountReadyMutationResultShape
|
|
15125
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15145
15126
|
}).strict();
|
|
15146
|
-
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
15147
15127
|
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15148
15128
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15149
15129
|
accountId: accountIdSchema,
|
|
@@ -15152,21 +15132,6 @@ var codexAccountUsageResultSchema = external_exports.object({
|
|
|
15152
15132
|
freshness: external_exports.enum(["live", "cached"]),
|
|
15153
15133
|
observedAt: external_exports.string().datetime().nullable()
|
|
15154
15134
|
}).strict();
|
|
15155
|
-
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
15156
|
-
accountId: accountIdSchema,
|
|
15157
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15158
|
-
}).strict();
|
|
15159
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15160
|
-
"reset",
|
|
15161
|
-
"nothingToReset",
|
|
15162
|
-
"noCredit",
|
|
15163
|
-
"alreadyRedeemed"
|
|
15164
|
-
]);
|
|
15165
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15166
|
-
accountId: accountIdSchema,
|
|
15167
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15168
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15169
|
-
}).strict();
|
|
15170
15135
|
|
|
15171
15136
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
15172
15137
|
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
@@ -21098,6 +21063,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21098
21063
|
const turns = [];
|
|
21099
21064
|
let current;
|
|
21100
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
|
+
};
|
|
21101
21086
|
for (const row of nativeHistoryRows(contents)) {
|
|
21102
21087
|
if (row.type === "message" && row.role === "user") {
|
|
21103
21088
|
current = {
|
|
@@ -21114,6 +21099,7 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21114
21099
|
};
|
|
21115
21100
|
turns.push(current);
|
|
21116
21101
|
tools.clear();
|
|
21102
|
+
earlyResults.clear();
|
|
21117
21103
|
continue;
|
|
21118
21104
|
}
|
|
21119
21105
|
if (!current)
|
|
@@ -21143,34 +21129,26 @@ function snapshotFromHistory(contents, ref, cwd) {
|
|
|
21143
21129
|
throw new CodeBuddyError("protocolError", "Invalid native Tool arguments");
|
|
21144
21130
|
}
|
|
21145
21131
|
}
|
|
21132
|
+
const callId = text(row.callId);
|
|
21146
21133
|
const snapshot = {
|
|
21147
|
-
item: row.name === "Agent" ? codeBuddyDelegation(
|
|
21134
|
+
item: row.name === "Agent" ? codeBuddyDelegation(callId, input, "running") : toolItem(callId, text(row.name), input, cwd),
|
|
21148
21135
|
outcome: toolOutcome("unknown")
|
|
21149
21136
|
};
|
|
21150
|
-
tools.set(
|
|
21137
|
+
tools.set(callId, snapshot);
|
|
21151
21138
|
current.items.push(snapshot);
|
|
21152
21139
|
current.outcome = { status: "unknown", reason: "Native Tool has not completed" };
|
|
21153
|
-
|
|
21154
|
-
|
|
21155
|
-
|
|
21156
|
-
|
|
21157
|
-
snapshot.outcome = toolOutcome(row.status);
|
|
21158
|
-
if (snapshot.item.type === "subagentDelegation") {
|
|
21159
|
-
const childId = codeBuddyChildId(row);
|
|
21160
|
-
snapshot.item.subagents = snapshot.item.subagents.map((child) => ({
|
|
21161
|
-
...child,
|
|
21162
|
-
...childId ? { subagentId: childId, nativeSubagentId: childId } : {},
|
|
21163
|
-
status: snapshot.outcome.status === "failed" ? "failed" : child.background ? "interrupted" : "completed",
|
|
21164
|
-
resultSummary: child.background ? "Live background observation is unavailable after reload" : contentText(row.output).slice(0, 2e3)
|
|
21165
|
-
}));
|
|
21166
|
-
}
|
|
21167
|
-
if (snapshot.item.type === "toolExecution")
|
|
21168
|
-
snapshot.item.output = toolOutput(row.output);
|
|
21169
|
-
if (snapshot.item.type === "commandExecution") {
|
|
21170
|
-
const output = toolOutput(row.output);
|
|
21171
|
-
snapshot.item.output = contentText(output.content);
|
|
21172
|
-
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
21140
|
+
const early = earlyResults.get(callId);
|
|
21141
|
+
if (early) {
|
|
21142
|
+
earlyResults.delete(callId);
|
|
21143
|
+
applyResult(snapshot, early);
|
|
21173
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);
|
|
21174
21152
|
}
|
|
21175
21153
|
}
|
|
21176
21154
|
return { turns };
|
|
@@ -21910,7 +21888,7 @@ var CodeBuddySession = class {
|
|
|
21910
21888
|
}
|
|
21911
21889
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21912
21890
|
}
|
|
21913
|
-
if (this.#busy || this.#active)
|
|
21891
|
+
if (this.#busy || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21914
21892
|
return failure("sessionBusy", "Session is executing an operation");
|
|
21915
21893
|
this.#busy = true;
|
|
21916
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"
|
|
@@ -15075,75 +15115,15 @@ var codexAccountSchema = external_exports.object({
|
|
|
15075
15115
|
email: external_exports.string().email().max(320).optional(),
|
|
15076
15116
|
planType: codexAccountPlanTypeSchema.optional()
|
|
15077
15117
|
}).strict();
|
|
15078
|
-
var codexAccountPhaseSchema = external_exports.enum(["ready", "
|
|
15079
|
-
var codexAccountPendingOperationSchema = external_exports.object({
|
|
15080
|
-
operationId: nonBlankTextSchema3.max(1024),
|
|
15081
|
-
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
15082
|
-
}).strict();
|
|
15083
|
-
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
15084
|
-
manage: external_exports.boolean(),
|
|
15085
|
-
switch: external_exports.boolean(),
|
|
15086
|
-
login: external_exports.boolean(),
|
|
15087
|
-
delete: external_exports.boolean(),
|
|
15088
|
-
recover: external_exports.boolean().optional(),
|
|
15089
|
-
logout: external_exports.boolean().optional(),
|
|
15090
|
-
reason: external_exports.enum([
|
|
15091
|
-
"ssh-single-account",
|
|
15092
|
-
"unsupported-storage",
|
|
15093
|
-
"unsupported-version",
|
|
15094
|
-
"recovery-required",
|
|
15095
|
-
"keyring-unavailable",
|
|
15096
|
-
"migration-required"
|
|
15097
|
-
]).optional()
|
|
15098
|
-
}).strict();
|
|
15118
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15099
15119
|
var codexAccountListResultSchema = external_exports.object({
|
|
15100
15120
|
version: external_exports.literal(2),
|
|
15101
15121
|
currentAccountId: accountIdSchema.nullable(),
|
|
15102
15122
|
phase: codexAccountPhaseSchema,
|
|
15103
15123
|
revision: external_exports.number().int().nonnegative(),
|
|
15104
15124
|
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15105
|
-
|
|
15106
|
-
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
15107
|
-
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
15108
|
-
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
15109
|
-
capabilities: codexAccountCapabilitiesSchema,
|
|
15110
|
-
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
15125
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15111
15126
|
}).strict();
|
|
15112
|
-
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15113
|
-
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15114
|
-
var codexAccountReadyMutationResultShape = {
|
|
15115
|
-
phase: external_exports.literal("ready"),
|
|
15116
|
-
revision: external_exports.number().int().nonnegative()
|
|
15117
|
-
};
|
|
15118
|
-
var codexAccountSwitchResultSchema = external_exports.object({
|
|
15119
|
-
currentAccountId: accountIdSchema,
|
|
15120
|
-
...codexAccountReadyMutationResultShape
|
|
15121
|
-
}).strict();
|
|
15122
|
-
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15123
|
-
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
15124
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
15125
|
-
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
15126
|
-
accountId: accountIdSchema,
|
|
15127
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15128
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15129
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15130
|
-
}).strict();
|
|
15131
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15132
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15133
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15134
|
-
accountId: accountIdSchema,
|
|
15135
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15136
|
-
success: external_exports.boolean(),
|
|
15137
|
-
error: external_exports.string().max(4096).nullable(),
|
|
15138
|
-
saved: external_exports.boolean().optional(),
|
|
15139
|
-
cleanupRequired: external_exports.boolean().optional()
|
|
15140
|
-
}).strict();
|
|
15141
|
-
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
15142
|
-
var codexAccountLogoutResultSchema = external_exports.object({
|
|
15143
|
-
currentAccountId: external_exports.null(),
|
|
15144
|
-
...codexAccountReadyMutationResultShape
|
|
15145
|
-
}).strict();
|
|
15146
|
-
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
15147
15127
|
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15148
15128
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15149
15129
|
accountId: accountIdSchema,
|
|
@@ -15152,21 +15132,6 @@ var codexAccountUsageResultSchema = external_exports.object({
|
|
|
15152
15132
|
freshness: external_exports.enum(["live", "cached"]),
|
|
15153
15133
|
observedAt: external_exports.string().datetime().nullable()
|
|
15154
15134
|
}).strict();
|
|
15155
|
-
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
15156
|
-
accountId: accountIdSchema,
|
|
15157
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15158
|
-
}).strict();
|
|
15159
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15160
|
-
"reset",
|
|
15161
|
-
"nothingToReset",
|
|
15162
|
-
"noCredit",
|
|
15163
|
-
"alreadyRedeemed"
|
|
15164
|
-
]);
|
|
15165
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15166
|
-
accountId: accountIdSchema,
|
|
15167
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15168
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15169
|
-
}).strict();
|
|
15170
15135
|
|
|
15171
15136
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
15172
15137
|
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
@@ -21404,7 +21369,7 @@ var CursorAdapter = class {
|
|
|
21404
21369
|
};
|
|
21405
21370
|
const cwd = path5.resolve(input.cwd ?? process.cwd());
|
|
21406
21371
|
const cached2 = this.#inspections.get(cwd);
|
|
21407
|
-
if (cached2 && (cached2.pending || !input.refresh
|
|
21372
|
+
if (cached2 && (cached2.pending || !input.refresh))
|
|
21408
21373
|
return cached2.result;
|
|
21409
21374
|
const result = (async () => {
|
|
21410
21375
|
const transport = new CursorTransport(this.transportOptions(cwd));
|
|
@@ -21426,11 +21391,10 @@ var CursorAdapter = class {
|
|
|
21426
21391
|
await transport.close();
|
|
21427
21392
|
}
|
|
21428
21393
|
})();
|
|
21429
|
-
const entry = {
|
|
21394
|
+
const entry = { pending: true, result };
|
|
21430
21395
|
this.#inspections.set(cwd, entry);
|
|
21431
21396
|
void result.finally(() => {
|
|
21432
21397
|
entry.pending = false;
|
|
21433
|
-
entry.expires = Date.now() + 5 * 6e4;
|
|
21434
21398
|
});
|
|
21435
21399
|
return result;
|
|
21436
21400
|
}
|
|
@@ -21582,7 +21546,7 @@ var CursorSession = class {
|
|
|
21582
21546
|
void active.task.finally(() => clearTimeout(timer));
|
|
21583
21547
|
return { ok: true, value: { cancellationRequested: true } };
|
|
21584
21548
|
}
|
|
21585
|
-
if (this.#
|
|
21549
|
+
if (this.#configuring || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
21586
21550
|
return rejected("sessionBusy", "Cursor session is busy");
|
|
21587
21551
|
if (command.type === "turn.start") {
|
|
21588
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"
|
|
@@ -18776,75 +18816,15 @@ var codexAccountSchema = external_exports.object({
|
|
|
18776
18816
|
email: external_exports.string().email().max(320).optional(),
|
|
18777
18817
|
planType: codexAccountPlanTypeSchema.optional()
|
|
18778
18818
|
}).strict();
|
|
18779
|
-
var codexAccountPhaseSchema = external_exports.enum(["ready", "
|
|
18780
|
-
var codexAccountPendingOperationSchema = external_exports.object({
|
|
18781
|
-
operationId: nonBlankTextSchema3.max(1024),
|
|
18782
|
-
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
18783
|
-
}).strict();
|
|
18784
|
-
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
18785
|
-
manage: external_exports.boolean(),
|
|
18786
|
-
switch: external_exports.boolean(),
|
|
18787
|
-
login: external_exports.boolean(),
|
|
18788
|
-
delete: external_exports.boolean(),
|
|
18789
|
-
recover: external_exports.boolean().optional(),
|
|
18790
|
-
logout: external_exports.boolean().optional(),
|
|
18791
|
-
reason: external_exports.enum([
|
|
18792
|
-
"ssh-single-account",
|
|
18793
|
-
"unsupported-storage",
|
|
18794
|
-
"unsupported-version",
|
|
18795
|
-
"recovery-required",
|
|
18796
|
-
"keyring-unavailable",
|
|
18797
|
-
"migration-required"
|
|
18798
|
-
]).optional()
|
|
18799
|
-
}).strict();
|
|
18819
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
18800
18820
|
var codexAccountListResultSchema = external_exports.object({
|
|
18801
18821
|
version: external_exports.literal(2),
|
|
18802
18822
|
currentAccountId: accountIdSchema.nullable(),
|
|
18803
18823
|
phase: codexAccountPhaseSchema,
|
|
18804
18824
|
revision: external_exports.number().int().nonnegative(),
|
|
18805
18825
|
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
18806
|
-
|
|
18807
|
-
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
18808
|
-
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
18809
|
-
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
18810
|
-
capabilities: codexAccountCapabilitiesSchema,
|
|
18811
|
-
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
18826
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
18812
18827
|
}).strict();
|
|
18813
|
-
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
18814
|
-
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
18815
|
-
var codexAccountReadyMutationResultShape = {
|
|
18816
|
-
phase: external_exports.literal("ready"),
|
|
18817
|
-
revision: external_exports.number().int().nonnegative()
|
|
18818
|
-
};
|
|
18819
|
-
var codexAccountSwitchResultSchema = external_exports.object({
|
|
18820
|
-
currentAccountId: accountIdSchema,
|
|
18821
|
-
...codexAccountReadyMutationResultShape
|
|
18822
|
-
}).strict();
|
|
18823
|
-
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
18824
|
-
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
18825
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
18826
|
-
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
18827
|
-
accountId: accountIdSchema,
|
|
18828
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
18829
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
18830
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
18831
|
-
}).strict();
|
|
18832
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
18833
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
18834
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
18835
|
-
accountId: accountIdSchema,
|
|
18836
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
18837
|
-
success: external_exports.boolean(),
|
|
18838
|
-
error: external_exports.string().max(4096).nullable(),
|
|
18839
|
-
saved: external_exports.boolean().optional(),
|
|
18840
|
-
cleanupRequired: external_exports.boolean().optional()
|
|
18841
|
-
}).strict();
|
|
18842
|
-
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
18843
|
-
var codexAccountLogoutResultSchema = external_exports.object({
|
|
18844
|
-
currentAccountId: external_exports.null(),
|
|
18845
|
-
...codexAccountReadyMutationResultShape
|
|
18846
|
-
}).strict();
|
|
18847
|
-
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
18848
18828
|
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
18849
18829
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
18850
18830
|
accountId: accountIdSchema,
|
|
@@ -18853,21 +18833,6 @@ var codexAccountUsageResultSchema = external_exports.object({
|
|
|
18853
18833
|
freshness: external_exports.enum(["live", "cached"]),
|
|
18854
18834
|
observedAt: external_exports.string().datetime().nullable()
|
|
18855
18835
|
}).strict();
|
|
18856
|
-
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
18857
|
-
accountId: accountIdSchema,
|
|
18858
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
18859
|
-
}).strict();
|
|
18860
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
18861
|
-
"reset",
|
|
18862
|
-
"nothingToReset",
|
|
18863
|
-
"noCredit",
|
|
18864
|
-
"alreadyRedeemed"
|
|
18865
|
-
]);
|
|
18866
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
18867
|
-
accountId: accountIdSchema,
|
|
18868
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
18869
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
18870
|
-
}).strict();
|
|
18871
18836
|
|
|
18872
18837
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
18873
18838
|
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
@@ -19228,6 +19193,11 @@ var HarnessOutputChannel = class {
|
|
|
19228
19193
|
var DIAGNOSTIC_TAIL_MAX_LENGTH = 8e3;
|
|
19229
19194
|
var SENSITIVE_VALUE_PATTERN = /(api[_-]?key|access[_-]?token|auth(?:orization)?|password|secret)(\s*[:=]\s*)([^\s,;]+)/giu;
|
|
19230
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
|
+
}
|
|
19231
19201
|
function sanitizeDiagnosticTail(value) {
|
|
19232
19202
|
const redacted = value.replace(BEARER_PATTERN, "Bearer [redacted]").replace(SENSITIVE_VALUE_PATTERN, "$1$2[redacted]");
|
|
19233
19203
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
@@ -19779,9 +19749,10 @@ async function probeDeepSeekExecutableGeneration(options = {}, dependencies = {
|
|
|
19779
19749
|
cleanupTimeoutMs,
|
|
19780
19750
|
outputLimitBytes
|
|
19781
19751
|
}, dependencies);
|
|
19782
|
-
|
|
19752
|
+
const substantiveStderr = filterAmbientNodeWarnings(output.stderr);
|
|
19753
|
+
if (substantiveStderr.length > 0) {
|
|
19783
19754
|
throw probeError("protocolError", "DeepSeek Harness --version wrote unexpected stderr", {
|
|
19784
|
-
stderrTail: sanitizeDiagnosticTail(
|
|
19755
|
+
stderrTail: sanitizeDiagnosticTail(substantiveStderr)
|
|
19785
19756
|
});
|
|
19786
19757
|
}
|
|
19787
19758
|
return { ...classifyDeepSeekVersionOutput(output.stdout), command };
|
|
@@ -21902,7 +21873,7 @@ function structuredDiffs(meta3) {
|
|
|
21902
21873
|
const oldHeader = kind === "add" ? "/dev/null" : `a/${candidate.path}`;
|
|
21903
21874
|
const newHeader = kind === "delete" ? "/dev/null" : `b/${candidate.path}`;
|
|
21904
21875
|
const unifiedDiff = createTwoFilesPatch(oldHeader, newHeader, oldText ?? "", newText ?? "", "", "", { context: 3 });
|
|
21905
|
-
changes.push({ path: candidate.path, kind, unifiedDiff });
|
|
21876
|
+
changes.push({ path: candidate.path, kind, unifiedDiff, diffScope: "fragment" });
|
|
21906
21877
|
}
|
|
21907
21878
|
return changes;
|
|
21908
21879
|
}
|
|
@@ -27261,6 +27232,7 @@ function projectToolResultEvent(turn, sessionId, data, seq, limit) {
|
|
|
27261
27232
|
const fileItem = {
|
|
27262
27233
|
type: "fileChange",
|
|
27263
27234
|
itemId: modernItemId(sessionId, `event:${seq}:file-change`),
|
|
27235
|
+
sourceItemIds: [item.itemId],
|
|
27264
27236
|
changes
|
|
27265
27237
|
};
|
|
27266
27238
|
turn.items.push({ item: fileItem, outcome: { status: "succeeded" } });
|
|
@@ -28332,14 +28304,14 @@ ${question.detail}` : question.question;
|
|
|
28332
28304
|
if (force || changed)
|
|
28333
28305
|
this.#emit({ type: "session.state.changed", state: next });
|
|
28334
28306
|
}
|
|
28335
|
-
#configurationBusy(area) {
|
|
28336
|
-
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)) {
|
|
28337
28309
|
return busyError(`select ${area}`);
|
|
28338
28310
|
}
|
|
28339
28311
|
return void 0;
|
|
28340
28312
|
}
|
|
28341
28313
|
async #selectModel(command) {
|
|
28342
|
-
const busy = this.#configurationBusy("a Model");
|
|
28314
|
+
const busy = this.#configurationBusy("a Model", true);
|
|
28343
28315
|
if (busy)
|
|
28344
28316
|
return { ok: false, error: busy };
|
|
28345
28317
|
let requested;
|
|
@@ -28354,7 +28326,7 @@ ${question.detail}` : question.question;
|
|
|
28354
28326
|
});
|
|
28355
28327
|
}
|
|
28356
28328
|
async #selectThinking(command) {
|
|
28357
|
-
const busy = this.#configurationBusy("Thinking");
|
|
28329
|
+
const busy = this.#configurationBusy("Thinking", true);
|
|
28358
28330
|
if (busy)
|
|
28359
28331
|
return { ok: false, error: busy };
|
|
28360
28332
|
let requested;
|
|
@@ -29418,6 +29390,7 @@ ${question.detail}` : question.question;
|
|
|
29418
29390
|
const fileItem = {
|
|
29419
29391
|
type: "fileChange",
|
|
29420
29392
|
itemId: modernItemId(this.#sessionId, `event:${seq}:file-change`),
|
|
29393
|
+
sourceItemIds: [item.itemId],
|
|
29421
29394
|
changes
|
|
29422
29395
|
};
|
|
29423
29396
|
this.#emit({ type: "item.started", turnId: active.turnId, item: fileItem });
|