@karlorz/codexhost-cli-win32-x64 0.17.0-1 → 0.17.3-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/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +15 -0
- package/app/console-web.js +16 -1
- package/app/cpa-live-voice-hook.js +51 -33
- package/app/desktop-controller.mjs +1182 -46
- package/app/host-runtime.mjs +1239 -59
- package/app/plugins/antigravity/plugin.mjs +42 -7
- package/app/plugins/claude-code/plugin.mjs +15 -0
- package/app/plugins/codebuddy/plugin.mjs +15 -0
- package/app/plugins/codex-usage/plugin.mjs +15 -0
- package/app/plugins/copilot/plugin.mjs +15 -0
- package/app/plugins/cursor-cli/plugin.mjs +34 -3
- package/app/plugins/deepseek-harness/plugin.mjs +15 -0
- package/app/plugins/devin/plugin.mjs +15 -0
- package/app/plugins/grok/plugin.mjs +383 -70
- package/app/plugins/hermes/plugin.mjs +15 -0
- package/app/plugins/kimi-code/plugin.mjs +65 -3
- package/app/plugins/kiro-cli/plugin.mjs +15 -0
- package/app/plugins/omp/plugin.mjs +15 -0
- package/app/plugins/opencode/plugin.mjs +15 -0
- package/app/plugins/pi/plugin.mjs +223 -88
- package/app/plugins/qoder/plugin.mjs +15 -0
- package/app/plugins/qoder-cn/plugin.mjs +15 -0
- package/app/plugins/qwen-code/plugin.mjs +15 -0
- package/app/plugins/workbuddy/plugin.mjs +15 -0
- package/app/plugins/zcode/plugin.mjs +157 -9
- package/app/renderer-extension.js +594 -251
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
|
@@ -15971,6 +15971,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15971
15971
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15972
15972
|
text: external_exports.string().optional()
|
|
15973
15973
|
}).strict();
|
|
15974
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15975
|
+
kind: external_exports.literal("application"),
|
|
15976
|
+
value: external_exports.string().transform((text, context) => {
|
|
15977
|
+
try {
|
|
15978
|
+
return JSON.parse(text);
|
|
15979
|
+
} catch {
|
|
15980
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15981
|
+
return external_exports.NEVER;
|
|
15982
|
+
}
|
|
15983
|
+
}).pipe(external_exports.object({
|
|
15984
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15985
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15986
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15987
|
+
}).strict())
|
|
15988
|
+
}).strict().transform((context) => context.value);
|
|
15974
15989
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15975
15990
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15976
15991
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -19977,17 +19992,20 @@ ${line}`).slice(-8e3);
|
|
|
19977
19992
|
else if (unshown.trim() !== "")
|
|
19978
19993
|
this.#appendAgentText(active, unshown);
|
|
19979
19994
|
}
|
|
19995
|
+
if (!convId) {
|
|
19996
|
+
this.#completeIdentitylessTurn(active, event);
|
|
19997
|
+
return;
|
|
19998
|
+
}
|
|
19980
19999
|
const safeTurnId = event.result.num_turns !== void 0 && event.result.num_turns !== null ? `turn:${event.result.num_turns}` : `turn:${this.#history.snapshot().length + 1}`;
|
|
19981
|
-
const safeSessionId = convId || this.#nativeRef?.nativeSessionId || "unknown-session";
|
|
19982
20000
|
const nativeTurnRef = nativeTurnRefSchema.parse({
|
|
19983
20001
|
harnessId: this.harnessId,
|
|
19984
|
-
nativeSessionId:
|
|
20002
|
+
nativeSessionId: convId,
|
|
19985
20003
|
nativeTurnKey: safeTurnId,
|
|
19986
20004
|
formatVersion: 1
|
|
19987
20005
|
});
|
|
19988
20006
|
const checkpoint = nativeCheckpointRefSchema.parse({
|
|
19989
20007
|
harnessId: this.harnessId,
|
|
19990
|
-
nativeSessionId:
|
|
20008
|
+
nativeSessionId: convId,
|
|
19991
20009
|
checkpointId: safeTurnId,
|
|
19992
20010
|
formatVersion: 1
|
|
19993
20011
|
});
|
|
@@ -20004,16 +20022,33 @@ ${line}`).slice(-8e3);
|
|
|
20004
20022
|
this.#completeTurn(active, { status: "succeeded", checkpoint }, nativeTurnRef);
|
|
20005
20023
|
}
|
|
20006
20024
|
} else {
|
|
20007
|
-
const
|
|
20008
|
-
|
|
20009
|
-
const error51 = normalizedProcessError(errorDetail, `Antigravity Turn ended with status ${event.result.status}`, nativeError !== void 0);
|
|
20010
|
-
if (repliedThisTurn && nativeError && this.#reportedEarlier(error51)) {
|
|
20025
|
+
const error51 = this.#resultError(active, event);
|
|
20026
|
+
if (repliedThisTurn && event.result.error?.trim() && this.#reportedEarlier(error51)) {
|
|
20011
20027
|
this.#completeTurn(active, { status: "succeeded", checkpoint }, nativeTurnRef);
|
|
20012
20028
|
} else {
|
|
20013
20029
|
this.#completeTurn(active, { status: "failed", error: error51, checkpoint }, nativeTurnRef);
|
|
20014
20030
|
}
|
|
20015
20031
|
}
|
|
20016
20032
|
}
|
|
20033
|
+
/** A Turn agy ended without a Conversation keeps its native outcome but no native identity. */
|
|
20034
|
+
#completeIdentitylessTurn(active, event) {
|
|
20035
|
+
if (active.cancellationRequested) {
|
|
20036
|
+
this.#completeTurn(active, { status: "cancelled", reason: "Cancelled by user" });
|
|
20037
|
+
return;
|
|
20038
|
+
}
|
|
20039
|
+
this.#completeTurn(active, {
|
|
20040
|
+
status: "failed",
|
|
20041
|
+
error: event.result.status === "SUCCESS" ? {
|
|
20042
|
+
code: "protocolError",
|
|
20043
|
+
message: "Antigravity finished the Turn without a Conversation identity",
|
|
20044
|
+
retryable: true
|
|
20045
|
+
} : this.#resultError(active, event)
|
|
20046
|
+
});
|
|
20047
|
+
}
|
|
20048
|
+
#resultError(active, event) {
|
|
20049
|
+
const nativeError = event.result.error?.trim();
|
|
20050
|
+
return normalizedProcessError(nativeError || active.stderr, `Antigravity Turn ended with status ${event.result.status}`, nativeError !== void 0);
|
|
20051
|
+
}
|
|
20017
20052
|
#reportedEarlier(error51) {
|
|
20018
20053
|
return this.#history.snapshot().some(({ outcome }) => outcome.status === "failed" && outcome.error.code === error51.code && outcome.error.message === error51.message);
|
|
20019
20054
|
}
|
|
@@ -15565,6 +15565,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15565
15565
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15566
15566
|
text: external_exports.string().optional()
|
|
15567
15567
|
}).strict();
|
|
15568
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15569
|
+
kind: external_exports.literal("application"),
|
|
15570
|
+
value: external_exports.string().transform((text2, context) => {
|
|
15571
|
+
try {
|
|
15572
|
+
return JSON.parse(text2);
|
|
15573
|
+
} catch {
|
|
15574
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15575
|
+
return external_exports.NEVER;
|
|
15576
|
+
}
|
|
15577
|
+
}).pipe(external_exports.object({
|
|
15578
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15579
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15580
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15581
|
+
}).strict())
|
|
15582
|
+
}).strict().transform((context) => context.value);
|
|
15568
15583
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15569
15584
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15570
15585
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -16041,6 +16041,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
16041
16041
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16042
16042
|
text: external_exports.string().optional()
|
|
16043
16043
|
}).strict();
|
|
16044
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
16045
|
+
kind: external_exports.literal("application"),
|
|
16046
|
+
value: external_exports.string().transform((text2, context) => {
|
|
16047
|
+
try {
|
|
16048
|
+
return JSON.parse(text2);
|
|
16049
|
+
} catch {
|
|
16050
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
16051
|
+
return external_exports.NEVER;
|
|
16052
|
+
}
|
|
16053
|
+
}).pipe(external_exports.object({
|
|
16054
|
+
expectedTurnId: hostTurnIdSchema,
|
|
16055
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
16056
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
16057
|
+
}).strict())
|
|
16058
|
+
}).strict().transform((context) => context.value);
|
|
16044
16059
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16045
16060
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16046
16061
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -15559,6 +15559,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15559
15559
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15560
15560
|
text: external_exports.string().optional()
|
|
15561
15561
|
}).strict();
|
|
15562
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15563
|
+
kind: external_exports.literal("application"),
|
|
15564
|
+
value: external_exports.string().transform((text2, context) => {
|
|
15565
|
+
try {
|
|
15566
|
+
return JSON.parse(text2);
|
|
15567
|
+
} catch {
|
|
15568
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15569
|
+
return external_exports.NEVER;
|
|
15570
|
+
}
|
|
15571
|
+
}).pipe(external_exports.object({
|
|
15572
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15573
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15574
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15575
|
+
}).strict())
|
|
15576
|
+
}).strict().transform((context) => context.value);
|
|
15562
15577
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15563
15578
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15564
15579
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -19616,6 +19616,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
19616
19616
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
19617
19617
|
text: external_exports.string().optional()
|
|
19618
19618
|
}).strict();
|
|
19619
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
19620
|
+
kind: external_exports.literal("application"),
|
|
19621
|
+
value: external_exports.string().transform((text, context) => {
|
|
19622
|
+
try {
|
|
19623
|
+
return JSON.parse(text);
|
|
19624
|
+
} catch {
|
|
19625
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
19626
|
+
return external_exports.NEVER;
|
|
19627
|
+
}
|
|
19628
|
+
}).pipe(external_exports.object({
|
|
19629
|
+
expectedTurnId: hostTurnIdSchema,
|
|
19630
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
19631
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
19632
|
+
}).strict())
|
|
19633
|
+
}).strict().transform((context) => context.value);
|
|
19619
19634
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
19620
19635
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
19621
19636
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -15926,6 +15926,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15926
15926
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15927
15927
|
text: external_exports.string().optional()
|
|
15928
15928
|
}).strict();
|
|
15929
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15930
|
+
kind: external_exports.literal("application"),
|
|
15931
|
+
value: external_exports.string().transform((text, context) => {
|
|
15932
|
+
try {
|
|
15933
|
+
return JSON.parse(text);
|
|
15934
|
+
} catch {
|
|
15935
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15936
|
+
return external_exports.NEVER;
|
|
15937
|
+
}
|
|
15938
|
+
}).pipe(external_exports.object({
|
|
15939
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15940
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15941
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15942
|
+
}).strict())
|
|
15943
|
+
}).strict().transform((context) => context.value);
|
|
15929
15944
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15930
15945
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15931
15946
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -17215,6 +17230,16 @@ function cursorConfigDirectory(environment) {
|
|
|
17215
17230
|
const home = environment.HOME ?? environment.USERPROFILE ?? os2.homedir();
|
|
17216
17231
|
return environment.CURSOR_CONFIG_DIR?.trim() ? path6.resolve(environment.CURSOR_CONFIG_DIR) : environment.XDG_CONFIG_HOME?.trim() ? path6.resolve(environment.XDG_CONFIG_HOME, "cursor") : path6.join(home, ".cursor");
|
|
17217
17232
|
}
|
|
17233
|
+
function cursorCliApprovalModeIsUnrestricted(environment, cwd = process.cwd()) {
|
|
17234
|
+
try {
|
|
17235
|
+
const home = (process.platform === "win32" ? environment.USERPROFILE : environment.HOME) ?? os2.userInfo().homedir;
|
|
17236
|
+
const directory = environment.CURSOR_CONFIG_DIR?.trim() ? environment.CURSOR_CONFIG_DIR : environment.XDG_CONFIG_HOME?.trim() ? path6.join(environment.XDG_CONFIG_HOME, "cursor") : path6.join(home, ".cursor");
|
|
17237
|
+
const raw = JSON.parse(readFileSync(path6.resolve(cwd, directory, "cli-config.json"), "utf8"));
|
|
17238
|
+
return !!raw && typeof raw === "object" && !Array.isArray(raw) && raw.approvalMode === "unrestricted";
|
|
17239
|
+
} catch {
|
|
17240
|
+
return false;
|
|
17241
|
+
}
|
|
17242
|
+
}
|
|
17218
17243
|
function cursorSessionDirectory(sessionId, environment) {
|
|
17219
17244
|
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(sessionId))
|
|
17220
17245
|
throw new Error("Unsupported Cursor native session ID");
|
|
@@ -17586,12 +17611,17 @@ function cursorCatalog(info) {
|
|
|
17586
17611
|
const native = cursorModels(info);
|
|
17587
17612
|
const thinking = /* @__PURE__ */ new Map();
|
|
17588
17613
|
const models = native.models.map((model2) => {
|
|
17589
|
-
const
|
|
17614
|
+
const live = model2.value === native.current;
|
|
17615
|
+
const config2 = live ? info.configOptions : info.nativeModels?.find((entry) => entry.value === model2.value)?.configOptions;
|
|
17590
17616
|
const options = cursorThinking(config2);
|
|
17591
17617
|
for (const { id, label } of options)
|
|
17592
17618
|
thinking.set(id, { id, label });
|
|
17593
17619
|
return {
|
|
17594
|
-
|
|
17620
|
+
// Only the live model's parameters reflect the user's Cursor settings. The parameterized
|
|
17621
|
+
// catalog reports Cursor's built-in defaults for every other model (for example
|
|
17622
|
+
// `fast=true`), so pinning them would override the user's remembered per-model parameters.
|
|
17623
|
+
// A bare Ref selects only the model and lets Cursor apply those parameters itself.
|
|
17624
|
+
ref: live ? cursorConfiguredModelRef(model2.value, config2) : cursorModelRef(model2.value),
|
|
17595
17625
|
label: model2.name,
|
|
17596
17626
|
supportedThinkingOptionIds: options.map(({ id }) => id)
|
|
17597
17627
|
};
|
|
@@ -21890,7 +21920,8 @@ var CursorTransport = class {
|
|
|
21890
21920
|
return this.#preparation ??= this.#prepare();
|
|
21891
21921
|
}
|
|
21892
21922
|
async #prepare() {
|
|
21893
|
-
const
|
|
21923
|
+
const useForce = this.options.executionPolicy === "unattended-full-access" || cursorCliApprovalModeIsUnrestricted(this.options.environment, this.options.cwd);
|
|
21924
|
+
const invocation = cursorInvocation(this.options.environment, this.options.command, useForce ? ["--force", "acp"] : ["acp"]);
|
|
21894
21925
|
const child = spawn(invocation.command, invocation.arguments, {
|
|
21895
21926
|
cwd: this.options.cwd,
|
|
21896
21927
|
env: this.options.environment,
|
|
@@ -19806,6 +19806,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
19806
19806
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
19807
19807
|
text: external_exports.string().optional()
|
|
19808
19808
|
}).strict();
|
|
19809
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
19810
|
+
kind: external_exports.literal("application"),
|
|
19811
|
+
value: external_exports.string().transform((text, context) => {
|
|
19812
|
+
try {
|
|
19813
|
+
return JSON.parse(text);
|
|
19814
|
+
} catch {
|
|
19815
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
19816
|
+
return external_exports.NEVER;
|
|
19817
|
+
}
|
|
19818
|
+
}).pipe(external_exports.object({
|
|
19819
|
+
expectedTurnId: hostTurnIdSchema,
|
|
19820
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
19821
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
19822
|
+
}).strict())
|
|
19823
|
+
}).strict().transform((context) => context.value);
|
|
19809
19824
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
19810
19825
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
19811
19826
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -15563,6 +15563,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15563
15563
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15564
15564
|
text: external_exports.string().optional()
|
|
15565
15565
|
}).strict();
|
|
15566
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15567
|
+
kind: external_exports.literal("application"),
|
|
15568
|
+
value: external_exports.string().transform((text, context) => {
|
|
15569
|
+
try {
|
|
15570
|
+
return JSON.parse(text);
|
|
15571
|
+
} catch {
|
|
15572
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15573
|
+
return external_exports.NEVER;
|
|
15574
|
+
}
|
|
15575
|
+
}).pipe(external_exports.object({
|
|
15576
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15577
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15578
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15579
|
+
}).strict())
|
|
15580
|
+
}).strict().transform((context) => context.value);
|
|
15566
15581
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15567
15582
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15568
15583
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|