@karlorz/codexhost-cli-linux-x64 0.21.0-0 → 0.22.0-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 +1 -0
- package/app/console-web.js +2 -1
- package/app/cpa-live-voice-hook.js +213 -178
- package/app/desktop-controller.mjs +8 -2
- package/app/host-runtime.mjs +96 -26
- package/app/overlay-voice-bootstrap.js +1 -1616
- package/app/plugins/antigravity/plugin.mjs +1144 -1254
- package/app/plugins/claude-code/plugin.mjs +389 -80
- package/app/plugins/codebuddy/plugin.mjs +1 -0
- package/app/plugins/codex-usage/plugin.mjs +1 -0
- package/app/plugins/copilot/plugin.mjs +1 -0
- package/app/plugins/cursor-cli/plugin.mjs +1 -0
- package/app/plugins/deepseek-harness/plugin.mjs +1 -0
- package/app/plugins/devin/plugin.mjs +1 -0
- package/app/plugins/grok/plugin.mjs +232 -217
- package/app/plugins/hermes/plugin.mjs +1 -0
- package/app/plugins/kimi-code/plugin.mjs +1 -0
- package/app/plugins/kiro-cli/plugin.mjs +1 -0
- package/app/plugins/omp/plugin.mjs +108 -22
- package/app/plugins/opencode/plugin.mjs +1 -0
- package/app/plugins/pi/plugin.mjs +119 -23
- package/app/plugins/qoder/plugin.mjs +1 -0
- package/app/plugins/qoder-cn/plugin.mjs +1 -0
- package/app/plugins/qwen-code/plugin.mjs +1 -0
- package/app/plugins/workbuddy/plugin.mjs +1 -0
- package/app/plugins/zcode/plugin.mjs +1 -0
- package/app/renderer-extension.js +799 -476
- package/app/voice-qualification.json +13 -13
- package/app/web/assets/index-CYo5zTz_.js +201 -0
- package/app/web/codexhost-settings.js +2 -1
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +9 -9
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +1 -1
- package/app/web-modules/server.mjs +130 -74
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-DLXdvkWR.js +0 -201
|
@@ -432,6 +432,8 @@ async function rendererRemoteSession(target2, operation) {
|
|
|
432
432
|
})
|
|
433
433
|
);
|
|
434
434
|
const threadId = operation.threadId;
|
|
435
|
+
if (operation.kind === "usage")
|
|
436
|
+
return read(() => manager.sendRequest("codexhost/thread/usage/inspect", { threadId }));
|
|
435
437
|
if (operation.kind === "status") {
|
|
436
438
|
const result = await read(
|
|
437
439
|
() => manager.sendRequest("thread/read", {
|
|
@@ -17679,6 +17681,7 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
17679
17681
|
message: "A history continuation requires its connection epoch"
|
|
17680
17682
|
}).optional()
|
|
17681
17683
|
}),
|
|
17684
|
+
external_exports.strictObject({ kind: external_exports.literal("usage"), ...thread, epoch: identity }),
|
|
17682
17685
|
external_exports.strictObject({
|
|
17683
17686
|
kind: external_exports.literal("configure"),
|
|
17684
17687
|
...thread,
|
|
@@ -20267,7 +20270,7 @@ async function installRendererLoadedModules(renderer) {
|
|
|
20267
20270
|
};
|
|
20268
20271
|
try {
|
|
20269
20272
|
await renderer.command("Runtime.enable");
|
|
20270
|
-
await renderer.command("Debugger.enable");
|
|
20273
|
+
await renderer.command("Debugger.enable", { maxScriptsCacheSize: 0 });
|
|
20271
20274
|
ready = true;
|
|
20272
20275
|
await flush();
|
|
20273
20276
|
return dispose;
|
|
@@ -22987,7 +22990,10 @@ ${bootstrap}${overlayBundle}` : void 0;
|
|
|
22987
22990
|
${bootstrap}${overlayBootstrapBundle}` : void 0;
|
|
22988
22991
|
startupTrace("installing Renderer Session");
|
|
22989
22992
|
if (!voiceHost && options.hostDataDirectory && !skipReason) {
|
|
22990
|
-
|
|
22993
|
+
for (let attempt = 0; attempt < 8 && !voiceHost; attempt += 1) {
|
|
22994
|
+
if (attempt > 0) await dependencies.sleep(250);
|
|
22995
|
+
voiceHost = await connectControllerVoiceHost(options.hostDataDirectory);
|
|
22996
|
+
}
|
|
22991
22997
|
}
|
|
22992
22998
|
const installed = await installProductionSession(
|
|
22993
22999
|
{
|
package/app/host-runtime.mjs
CHANGED
|
@@ -32960,6 +32960,7 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
32960
32960
|
message: "A history continuation requires its connection epoch"
|
|
32961
32961
|
}).optional()
|
|
32962
32962
|
}),
|
|
32963
|
+
external_exports.strictObject({ kind: external_exports.literal("usage"), ...thread, epoch: identity }),
|
|
32963
32964
|
external_exports.strictObject({
|
|
32964
32965
|
kind: external_exports.literal("configure"),
|
|
32965
32966
|
...thread,
|
|
@@ -36801,15 +36802,15 @@ function projectAgentMessageMedia(item, cwd) {
|
|
|
36801
36802
|
|
|
36802
36803
|
// packages/protocol-core/dist/codex-ui-projector.js
|
|
36803
36804
|
function resolvedItemDurationMs(item, startedAtMs, completedAtMs) {
|
|
36804
|
-
if ((item
|
|
36805
|
+
if (hasDuration(item) && item.durationMs !== void 0)
|
|
36805
36806
|
return item.durationMs;
|
|
36806
|
-
}
|
|
36807
36807
|
return Math.max(0, completedAtMs - startedAtMs);
|
|
36808
36808
|
}
|
|
36809
|
+
function hasDuration(item) {
|
|
36810
|
+
return item.type === "commandExecution" || item.type === "toolExecution" || item.type === "mcpToolCall";
|
|
36811
|
+
}
|
|
36809
36812
|
function withResolvedDuration(item, durationMs) {
|
|
36810
|
-
|
|
36811
|
-
return item;
|
|
36812
|
-
return { ...item, durationMs };
|
|
36813
|
+
return hasDuration(item) ? { ...item, durationMs } : item;
|
|
36813
36814
|
}
|
|
36814
36815
|
function itemStatus(outcome) {
|
|
36815
36816
|
if (!outcome)
|
|
@@ -37059,6 +37060,45 @@ function planStatus(value2) {
|
|
|
37059
37060
|
}
|
|
37060
37061
|
return "pending";
|
|
37061
37062
|
}
|
|
37063
|
+
function outcomeReason(outcome) {
|
|
37064
|
+
return outcome.status === "failed" ? outcome.error.message : outcome.status === "cancelled" ? outcome.reason ?? "" : "";
|
|
37065
|
+
}
|
|
37066
|
+
function presentedItem(item, outcome) {
|
|
37067
|
+
if (item.type !== "webSearch" || !outcome || outcome.status === "succeeded")
|
|
37068
|
+
return item;
|
|
37069
|
+
const reason = item.output ? "" : outcomeReason(outcome);
|
|
37070
|
+
const output = item.output ?? (reason.trim() === "" ? void 0 : { content: [{ type: "text", text: reason }] });
|
|
37071
|
+
return {
|
|
37072
|
+
type: "toolExecution",
|
|
37073
|
+
itemId: item.itemId,
|
|
37074
|
+
toolName: "web_search",
|
|
37075
|
+
arguments: { query: item.query },
|
|
37076
|
+
...output ? { output } : {}
|
|
37077
|
+
};
|
|
37078
|
+
}
|
|
37079
|
+
function mcpResultContent(output) {
|
|
37080
|
+
return (output?.content ?? []).map((content) => content.type === "text" ? { type: "text", text: content.text } : { type: "image", data: content.base64Data, mimeType: content.mimeType });
|
|
37081
|
+
}
|
|
37082
|
+
function projectMcpToolCall(item, outcome) {
|
|
37083
|
+
const status2 = itemStatus(outcome);
|
|
37084
|
+
const outputText = item.output?.content.flatMap((content) => content.type === "text" ? [content.text] : []).join("");
|
|
37085
|
+
const failure3 = outcome?.status === "failed" ? outcome.error.message : outcome?.status === "cancelled" ? outcome.reason ?? "Cancelled" : "";
|
|
37086
|
+
return {
|
|
37087
|
+
id: item.itemId,
|
|
37088
|
+
type: "mcpToolCall",
|
|
37089
|
+
server: item.server,
|
|
37090
|
+
tool: item.tool,
|
|
37091
|
+
status: status2,
|
|
37092
|
+
arguments: item.arguments,
|
|
37093
|
+
appContext: null,
|
|
37094
|
+
mcpAppUi: null,
|
|
37095
|
+
pluginId: null,
|
|
37096
|
+
readOnlyHint: null,
|
|
37097
|
+
result: status2 === "completed" ? { content: mcpResultContent(item.output), structuredContent: null, _meta: null } : null,
|
|
37098
|
+
error: status2 === "failed" ? { message: outputText || failure3 } : null,
|
|
37099
|
+
durationMs: item.durationMs ?? null
|
|
37100
|
+
};
|
|
37101
|
+
}
|
|
37062
37102
|
function toolContentItems(item) {
|
|
37063
37103
|
if (!item.output)
|
|
37064
37104
|
return null;
|
|
@@ -37183,6 +37223,16 @@ function projectItem(item, outcome, defaultCwd, includeCommandOutput = true, sen
|
|
|
37183
37223
|
durationMs: item.durationMs ?? null
|
|
37184
37224
|
};
|
|
37185
37225
|
}
|
|
37226
|
+
case "mcpToolCall":
|
|
37227
|
+
return projectMcpToolCall(item, outcome);
|
|
37228
|
+
case "webSearch":
|
|
37229
|
+
return {
|
|
37230
|
+
id: item.itemId,
|
|
37231
|
+
type: "webSearch",
|
|
37232
|
+
query: item.query,
|
|
37233
|
+
action: { type: "search", query: item.query, queries: null },
|
|
37234
|
+
results: null
|
|
37235
|
+
};
|
|
37186
37236
|
case "fileChange":
|
|
37187
37237
|
return {
|
|
37188
37238
|
id: item.itemId,
|
|
@@ -37277,7 +37327,9 @@ function projectHistoricalTurn(input) {
|
|
|
37277
37327
|
const completedAtMs = snapshot2.completedAtMs;
|
|
37278
37328
|
const hasTiming = startedAtMs !== void 0 && completedAtMs !== void 0 && Number.isFinite(startedAtMs) && Number.isFinite(completedAtMs) && startedAtMs >= 0 && completedAtMs >= startedAtMs;
|
|
37279
37329
|
const error51 = snapshot2.outcome.status === "failed" ? projectedTurnError(snapshot2.outcome.error) : null;
|
|
37280
|
-
const projectEntry = (
|
|
37330
|
+
const projectEntry = (entry) => {
|
|
37331
|
+
const { outcome } = entry;
|
|
37332
|
+
const item = presentedItem(entry.item, outcome);
|
|
37281
37333
|
if (itemFileChanges(item) !== null) {
|
|
37282
37334
|
return files?.itemId === item.itemId ? [projectItem(files, { status: "succeeded" }, cwd)] : [];
|
|
37283
37335
|
}
|
|
@@ -37643,6 +37695,11 @@ var CodexTurnProjector = class {
|
|
|
37643
37695
|
messages: this.#subagentActivityMessages(event.item, "item/started", startedAtMs, startedAtMs)
|
|
37644
37696
|
};
|
|
37645
37697
|
}
|
|
37698
|
+
if (event.item.type === "webSearch") {
|
|
37699
|
+
projected.orderReserved = true;
|
|
37700
|
+
this.#wireItemOrder.push(event.item.itemId);
|
|
37701
|
+
return { messages: [] };
|
|
37702
|
+
}
|
|
37646
37703
|
const startedItem = event.item.type === "reasoning" ? { ...event.item, text: "" } : this.#mediaItem(event.item);
|
|
37647
37704
|
const messages = [this.#startWireItem(projected, startedItem, startedAtMs)];
|
|
37648
37705
|
if (event.item.type === "reasoning") {
|
|
@@ -37748,7 +37805,7 @@ var CodexTurnProjector = class {
|
|
|
37748
37805
|
if (startedAtMs === void 0)
|
|
37749
37806
|
throw new Error("Codex Item completed without a start time");
|
|
37750
37807
|
const durationMs = resolvedItemDurationMs(projected.item, startedAtMs, emittedAtMs);
|
|
37751
|
-
projected.item = withResolvedDuration(projected.item, durationMs);
|
|
37808
|
+
projected.item = withResolvedDuration(presentedItem(projected.item, projected.outcome), durationMs);
|
|
37752
37809
|
projected.durationMs = durationMs;
|
|
37753
37810
|
if (itemFileChanges(projected.item) !== null) {
|
|
37754
37811
|
return { messages: this.#fileChangeUpdates(emittedAtMs) };
|
|
@@ -37765,6 +37822,14 @@ var CodexTurnProjector = class {
|
|
|
37765
37822
|
}
|
|
37766
37823
|
});
|
|
37767
37824
|
if (!projected.wireStarted) {
|
|
37825
|
+
if (event.snapshot.item.type === "webSearch") {
|
|
37826
|
+
return {
|
|
37827
|
+
messages: [
|
|
37828
|
+
this.#startWireItem(projected, projected.item, startedAtMs),
|
|
37829
|
+
completedItem(this.#projectItem(projected.item, projected.outcome))
|
|
37830
|
+
]
|
|
37831
|
+
};
|
|
37832
|
+
}
|
|
37768
37833
|
if (projected.item.type === "toolExecution") {
|
|
37769
37834
|
if (isTodoTool(projected.item.toolName)) {
|
|
37770
37835
|
const plan = planFromTodoValue(projected.item.arguments) ?? planFromTodoValue(projected.item.output);
|
|
@@ -37937,7 +38002,8 @@ var CodexTurnProjector = class {
|
|
|
37937
38002
|
throw new Error("Codex Item started more than once");
|
|
37938
38003
|
projected.wireStarted = true;
|
|
37939
38004
|
projected.startedAtMs = startedAtMs;
|
|
37940
|
-
|
|
38005
|
+
if (!projected.orderReserved)
|
|
38006
|
+
this.#wireItemOrder.push(item.itemId);
|
|
37941
38007
|
return {
|
|
37942
38008
|
method: "item/started",
|
|
37943
38009
|
emittedAtMs: startedAtMs,
|
|
@@ -50147,7 +50213,7 @@ async function installRendererLoadedModules(renderer) {
|
|
|
50147
50213
|
};
|
|
50148
50214
|
try {
|
|
50149
50215
|
await renderer.command("Runtime.enable");
|
|
50150
|
-
await renderer.command("Debugger.enable");
|
|
50216
|
+
await renderer.command("Debugger.enable", { maxScriptsCacheSize: 0 });
|
|
50151
50217
|
ready = true;
|
|
50152
50218
|
await flush();
|
|
50153
50219
|
return dispose;
|
|
@@ -59773,19 +59839,18 @@ var ExternalTurnSteering = class {
|
|
|
59773
59839
|
if (key) {
|
|
59774
59840
|
const receipt2 = { fingerprint: fingerprint2, result, settled: false };
|
|
59775
59841
|
this.#receipts.set(key, receipt2);
|
|
59776
|
-
|
|
59777
|
-
|
|
59778
|
-
|
|
59779
|
-
|
|
59780
|
-
|
|
59781
|
-
|
|
59782
|
-
this.#receipts.delete(oldest);
|
|
59783
|
-
}
|
|
59784
|
-
},
|
|
59785
|
-
() => {
|
|
59786
|
-
this.#receipts.delete(key);
|
|
59842
|
+
const settle = () => {
|
|
59843
|
+
receipt2.settled = true;
|
|
59844
|
+
while (this.#receipts.size > 128) {
|
|
59845
|
+
const oldest = [...this.#receipts].find(([, entry]) => entry.settled)?.[0];
|
|
59846
|
+
if (oldest === void 0) break;
|
|
59847
|
+
this.#receipts.delete(oldest);
|
|
59787
59848
|
}
|
|
59788
|
-
|
|
59849
|
+
};
|
|
59850
|
+
void result.then(settle, (error51) => {
|
|
59851
|
+
if (error51 instanceof ExternalSteerOutcomeUnknownError) settle();
|
|
59852
|
+
else this.#receipts.delete(key);
|
|
59853
|
+
});
|
|
59789
59854
|
}
|
|
59790
59855
|
return result;
|
|
59791
59856
|
} catch (error51) {
|
|
@@ -72892,9 +72957,10 @@ var AppServerHost = class {
|
|
|
72892
72957
|
if (this.#injectingQueuedFollowUp.has(thread3.id)) return;
|
|
72893
72958
|
this.#injectingQueuedFollowUp.add(thread3.id);
|
|
72894
72959
|
try {
|
|
72895
|
-
while (thread3.running && thread3.activeTurnId === turnId && this.#externalQueue.
|
|
72960
|
+
while (thread3.running && thread3.activeTurnId === turnId && this.#externalQueue.canStartAutomatically(thread3.id) && !this.#externalQueue.isPaused(thread3.id) && !this.#externalSteering.hasPending(thread3.id)) {
|
|
72896
72961
|
if (!await sessionCanNativeSteer(thread3)) return;
|
|
72897
|
-
if (!thread3.running || thread3.activeTurnId !== turnId)
|
|
72962
|
+
if (!thread3.running || thread3.activeTurnId !== turnId || !this.#externalQueue.canStartAutomatically(thread3.id) || this.#externalQueue.isPaused(thread3.id) || this.#externalSteering.hasPending(thread3.id))
|
|
72963
|
+
return;
|
|
72898
72964
|
const peeked = this.#externalQueue.peek(thread3.id);
|
|
72899
72965
|
if (!peeked) return;
|
|
72900
72966
|
const text4 = queuedSubmissionText(peeked.input);
|
|
@@ -72906,12 +72972,16 @@ var AppServerHost = class {
|
|
|
72906
72972
|
text: text4,
|
|
72907
72973
|
clientUserMessageId: taken.submission.clientUserMessageId
|
|
72908
72974
|
});
|
|
72909
|
-
await this.#publishExternalQueue(thread3.id);
|
|
72910
72975
|
} catch (error51) {
|
|
72976
|
+
if (error51 instanceof ExternalSteerOutcomeUnknownError)
|
|
72977
|
+
taken.automaticStartAllowed = false;
|
|
72911
72978
|
this.#externalQueue.restore(thread3.id, taken);
|
|
72912
|
-
|
|
72979
|
+
if (error51 instanceof ExternalSteerOutcomeUnknownError)
|
|
72980
|
+
this.#externalQueue.pause(thread3.id, "outcome-unknown");
|
|
72981
|
+
await this.#publishExternalQueue(thread3.id).catch((failure3) => this.#diagnose(failure3));
|
|
72913
72982
|
throw error51;
|
|
72914
72983
|
}
|
|
72984
|
+
await this.#publishExternalQueue(thread3.id).catch((error51) => this.#diagnose(error51));
|
|
72915
72985
|
}
|
|
72916
72986
|
} catch (error51) {
|
|
72917
72987
|
this.#diagnose(error51);
|
|
@@ -73531,7 +73601,7 @@ var AppServerHost = class {
|
|
|
73531
73601
|
event,
|
|
73532
73602
|
event.type === "turn.completed" ? thread3.turns.at(-1) : void 0
|
|
73533
73603
|
);
|
|
73534
|
-
if (event.type === "item.completed" && !ephemeralTurn && (event.snapshot.item.type === "commandExecution" || event.snapshot.item.type === "toolExecution" || event.snapshot.item.type === "agentMessage")) {
|
|
73604
|
+
if (event.type === "item.completed" && !ephemeralTurn && (event.snapshot.item.type === "commandExecution" || event.snapshot.item.type === "toolExecution" || event.snapshot.item.type === "mcpToolCall" || event.snapshot.item.type === "webSearch" || event.snapshot.item.type === "agentMessage")) {
|
|
73535
73605
|
await this.#injectQueuedFollowUp(thread3, event.turnId);
|
|
73536
73606
|
}
|
|
73537
73607
|
if (event.type === "turn.completed" && !ephemeralTurn && isRecord29(thread3.turns.at(-1)) && thread3.turns.at(-1)?.status === "completed" && this.#externalQueue.has(thread3.id)) {
|