@karlorz/codexhost-cli-win32-x64 0.16.1-2 → 0.17.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 +2 -2
- package/THIRD_PARTY_NOTICES.txt +6 -2
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +86 -20
- package/app/console-web.js +76 -17
- package/app/cpa-live-voice-hook.js +62 -8
- package/app/desktop-controller.mjs +107 -31
- package/app/host-runtime.mjs +2560 -1634
- package/app/plugins/antigravity/plugin.mjs +66 -2
- package/app/plugins/claude-code/plugin.mjs +43 -6
- package/app/plugins/codebuddy/plugin.mjs +41 -0
- package/app/plugins/codex-usage/plugin.mjs +31 -0
- package/app/plugins/copilot/plugin.mjs +31 -0
- package/app/plugins/cursor-cli/plugin.mjs +40 -5
- package/app/plugins/deepseek-harness/plugin.mjs +490 -46
- package/app/plugins/devin/assets/icon.svg +1 -0
- package/app/plugins/devin/manifest.json +30 -0
- package/app/plugins/devin/plugin.mjs +23536 -0
- package/app/plugins/enabled.json +2 -0
- package/app/plugins/grok/plugin.mjs +1615 -495
- package/app/plugins/hermes/plugin.mjs +484 -196
- package/app/plugins/kimi-code/plugin.mjs +31 -0
- package/app/plugins/kiro-cli/plugin.mjs +31 -0
- package/app/plugins/omp/plugin.mjs +31 -0
- package/app/plugins/opencode/plugin.mjs +31 -0
- package/app/plugins/pi/plugin.mjs +1491 -411
- package/app/plugins/qoder/plugin.mjs +9555 -8654
- package/app/plugins/qoder-cn/plugin.mjs +9555 -8654
- package/app/plugins/qwen-code/assets/icon.svg +1 -0
- package/app/plugins/qwen-code/manifest.json +29 -0
- package/app/plugins/qwen-code/plugin.mjs +29471 -0
- package/app/plugins/workbuddy/plugin.mjs +41 -0
- package/app/plugins/zcode/plugin.mjs +31 -0
- package/app/renderer-extension.js +966 -233
- 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/licenses/Qwen-Code-SDK-LICENSE.txt +203 -0
- package/package.json +2 -2
|
@@ -227,13 +227,32 @@ var CdpClient = class _CdpClient {
|
|
|
227
227
|
returnByValue: true
|
|
228
228
|
});
|
|
229
229
|
if (!isRecord(response)) throw new Error("Runtime.evaluate returned an invalid result");
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
230
|
+
try {
|
|
231
|
+
if (isRecord(response.exceptionDetails)) {
|
|
232
|
+
throw new Error(
|
|
233
|
+
cdpExceptionMessage(response.exceptionDetails, "Renderer evaluation failed")
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
if (!isRecord(response.result) || !("value" in response.result)) {
|
|
237
|
+
throw new Error("Runtime.evaluate did not return a value");
|
|
238
|
+
}
|
|
239
|
+
return response.result.value;
|
|
240
|
+
} finally {
|
|
241
|
+
const objects = [
|
|
242
|
+
response.result,
|
|
243
|
+
isRecord(response.exceptionDetails) ? response.exceptionDetails.exception : void 0
|
|
244
|
+
];
|
|
245
|
+
const ids = new Set(
|
|
246
|
+
objects.flatMap(
|
|
247
|
+
(object2) => isRecord(object2) && typeof object2.objectId === "string" ? [object2.objectId] : []
|
|
248
|
+
)
|
|
249
|
+
);
|
|
250
|
+
await Promise.all(
|
|
251
|
+
[...ids].map(
|
|
252
|
+
(objectId) => this.command("Runtime.releaseObject", { objectId }).catch(() => void 0)
|
|
253
|
+
)
|
|
254
|
+
);
|
|
235
255
|
}
|
|
236
|
-
return response.result.value;
|
|
237
256
|
}
|
|
238
257
|
close() {
|
|
239
258
|
if (this.#closed) return;
|
|
@@ -16408,6 +16427,37 @@ var voiceSettingsStateSchema = external_exports.strictObject({
|
|
|
16408
16427
|
})
|
|
16409
16428
|
});
|
|
16410
16429
|
|
|
16430
|
+
// packages/shared-contracts/dist/background-activity.js
|
|
16431
|
+
var backgroundActivitySchema = external_exports.strictObject({
|
|
16432
|
+
id: external_exports.string().min(1),
|
|
16433
|
+
kind: external_exports.enum(["task", "monitor", "loop", "subagent"]),
|
|
16434
|
+
label: external_exports.string(),
|
|
16435
|
+
status: external_exports.enum(["running", "scheduled", "completed", "failed", "cancelled", "unknown"]),
|
|
16436
|
+
canStop: external_exports.boolean(),
|
|
16437
|
+
/** Existing detached command Item presented by Desktop's native process UI. */
|
|
16438
|
+
commandItemId: hostItemIdSchema.optional(),
|
|
16439
|
+
schedule: external_exports.string().optional(),
|
|
16440
|
+
nextRunAt: external_exports.string().datetime({ offset: true }).optional(),
|
|
16441
|
+
relatedActivityId: external_exports.string().optional(),
|
|
16442
|
+
threadId: hostThreadIdSchema.optional()
|
|
16443
|
+
});
|
|
16444
|
+
var backgroundActivityDetailSchema = external_exports.strictObject({
|
|
16445
|
+
activity: backgroundActivitySchema,
|
|
16446
|
+
output: external_exports.string(),
|
|
16447
|
+
truncated: external_exports.boolean()
|
|
16448
|
+
});
|
|
16449
|
+
var threadActivityParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
|
|
16450
|
+
var threadActivityItemParamsSchema = threadActivityParamsSchema.extend({
|
|
16451
|
+
activityId: external_exports.string().min(1)
|
|
16452
|
+
});
|
|
16453
|
+
var threadActivityListResultSchema = external_exports.strictObject({
|
|
16454
|
+
supported: external_exports.boolean(),
|
|
16455
|
+
activities: external_exports.array(backgroundActivitySchema)
|
|
16456
|
+
});
|
|
16457
|
+
var threadActivityStopResultSchema = external_exports.strictObject({
|
|
16458
|
+
outcome: external_exports.enum(["stopped", "alreadyStopped", "notFound"])
|
|
16459
|
+
});
|
|
16460
|
+
|
|
16411
16461
|
// packages/shared-contracts/dist/index.js
|
|
16412
16462
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
16413
16463
|
|
|
@@ -18022,16 +18072,20 @@ function installRendererHostRpcRouting(root, target, dependencies) {
|
|
|
18022
18072
|
if (!isRecord3(input) || !isRecord3(input.collaborationMode)) return message;
|
|
18023
18073
|
const settings = input.collaborationMode.settings;
|
|
18024
18074
|
if (!isRecord3(settings)) return message;
|
|
18075
|
+
const nativeModel = typeof settings.model === "string" ? settings.model : null;
|
|
18025
18076
|
let model2 = null;
|
|
18026
18077
|
if (path5[0] === "startConversation") {
|
|
18027
18078
|
const draftId = isRecord3(options) ? options.clientThreadId : null;
|
|
18028
18079
|
model2 = typeof draftId === "string" ? externalDrafts.get(draftId)?.model ?? null : null;
|
|
18029
18080
|
} else if (path5[0] === "prewarmConversation") {
|
|
18030
18081
|
if (input.ephemeral !== true) publishDraftWorkspace("local", input.cwd);
|
|
18031
|
-
const selected = selectedModels.get("local");
|
|
18032
|
-
|
|
18082
|
+
const selected = selectedModels.get("local") ?? null;
|
|
18083
|
+
const carrier = nativeModel?.startsWith("codexhost/") ? nativeModel : selected;
|
|
18084
|
+
model2 = carrier ? prewarmCarrier(carrier) : null;
|
|
18033
18085
|
}
|
|
18034
18086
|
if (!model2) return message;
|
|
18087
|
+
if (path5[0] === "startConversation" && nativeModel?.startsWith("codexhost/") && nativeModel !== model2)
|
|
18088
|
+
return message;
|
|
18035
18089
|
return [
|
|
18036
18090
|
"push",
|
|
18037
18091
|
[
|
|
@@ -18253,9 +18307,11 @@ function directRendererInstaller() {
|
|
|
18253
18307
|
}),
|
|
18254
18308
|
portPrototype: MessagePort.prototype,
|
|
18255
18309
|
});
|
|
18256
|
-
|
|
18257
|
-
|
|
18258
|
-
|
|
18310
|
+
const connected = (routing) => routing.forComposer() !== null ||
|
|
18311
|
+
['local', ...(routing.knownHostIds?.() ?? [])].some((hostId) => routing.forHost(hostId) !== null);
|
|
18312
|
+
let nativeReady = false;
|
|
18313
|
+
// A legacy registry can remain mounted without a usable native manager.
|
|
18314
|
+
// Prefer a ready native route, then try the identified main-process RPC store.
|
|
18259
18315
|
const routing = (() => {
|
|
18260
18316
|
if (window.__codexhostHostRoutingV1) {
|
|
18261
18317
|
const existing = window.__codexhostHostRoutingV1;
|
|
@@ -18265,17 +18321,21 @@ function directRendererInstaller() {
|
|
|
18265
18321
|
return existing;
|
|
18266
18322
|
}
|
|
18267
18323
|
const native = discover(document);
|
|
18268
|
-
if (native.managers.length || native.registries.length)
|
|
18324
|
+
if (native.managers.length || native.registries.length) {
|
|
18325
|
+
const routing = installNative();
|
|
18326
|
+
if (connected(routing)) {
|
|
18327
|
+
nativeReady = true;
|
|
18328
|
+
return routing;
|
|
18329
|
+
}
|
|
18330
|
+
routing.dispose();
|
|
18331
|
+
}
|
|
18269
18332
|
const rpc = installRpc();
|
|
18270
18333
|
if (rpc) return rpc;
|
|
18271
18334
|
throw new Error('Renderer Host request manager is unavailable');
|
|
18272
18335
|
})();
|
|
18273
18336
|
// Publish a default draft policy only when its Host is unambiguous. Host
|
|
18274
18337
|
// connections can be ready even when multiple Composers coexist.
|
|
18275
|
-
|
|
18276
|
-
const connected = composerRoute !== null ||
|
|
18277
|
-
['local', ...(routing.knownHostIds?.() ?? [])].some((hostId) => routing.forHost(hostId) !== null);
|
|
18278
|
-
if (!connected) throw new Error('Renderer Host request manager is unavailable');
|
|
18338
|
+
if (!nativeReady && !connected(routing)) throw new Error('Renderer Host request manager is unavailable');
|
|
18279
18339
|
return { state: 'ready', reason: 'owned-request-bridge' };
|
|
18280
18340
|
})()`;
|
|
18281
18341
|
}
|
|
@@ -18309,6 +18369,10 @@ function installRendererDraftPrewarmPolicyDirect(renderer) {
|
|
|
18309
18369
|
// packages/desktop-control/src/renderer-loaded-modules.ts
|
|
18310
18370
|
var record2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18311
18371
|
var MAX_MODULES = 4096;
|
|
18372
|
+
var STALE_CONTEXT_ERROR = /uniqueContextId not found|Cannot find context with specified id|Execution context was destroyed|Cannot find default execution context/i;
|
|
18373
|
+
function isStaleContextError(error51) {
|
|
18374
|
+
return error51 instanceof Error && STALE_CONTEXT_ERROR.test(error51.message);
|
|
18375
|
+
}
|
|
18312
18376
|
function nativeModuleCatalogExpression(urls, complete, owner) {
|
|
18313
18377
|
return `Object.defineProperty(globalThis, '__codexhostLoadedModulesV1', {
|
|
18314
18378
|
configurable: true,
|
|
@@ -18330,16 +18394,27 @@ async function installRendererLoadedModules(renderer) {
|
|
|
18330
18394
|
const pending = [...dirty];
|
|
18331
18395
|
dirty.clear();
|
|
18332
18396
|
publishing = publishing.catch(() => void 0).then(async () => {
|
|
18397
|
+
let failure;
|
|
18333
18398
|
for (const uniqueId of pending) {
|
|
18334
18399
|
const context = contexts.get(uniqueId);
|
|
18335
18400
|
if (!context || disposed) continue;
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18401
|
+
try {
|
|
18402
|
+
const response = await renderer.command("Runtime.evaluate", {
|
|
18403
|
+
expression: nativeModuleCatalogExpression([...context.urls], context.complete, owner),
|
|
18404
|
+
uniqueContextId: uniqueId
|
|
18405
|
+
});
|
|
18406
|
+
if (record2(response) && record2(response.exceptionDetails))
|
|
18407
|
+
throw new Error("Loaded Renderer module catalog publication failed");
|
|
18408
|
+
} catch (error51) {
|
|
18409
|
+
if (contexts.get(uniqueId) !== context) continue;
|
|
18410
|
+
if (isStaleContextError(error51)) {
|
|
18411
|
+
forget(uniqueId);
|
|
18412
|
+
continue;
|
|
18413
|
+
}
|
|
18414
|
+
failure ??= error51;
|
|
18415
|
+
}
|
|
18342
18416
|
}
|
|
18417
|
+
if (failure !== void 0) throw failure;
|
|
18343
18418
|
});
|
|
18344
18419
|
return publishing;
|
|
18345
18420
|
};
|
|
@@ -18352,13 +18427,15 @@ async function installRendererLoadedModules(renderer) {
|
|
|
18352
18427
|
});
|
|
18353
18428
|
}, 10);
|
|
18354
18429
|
};
|
|
18355
|
-
const
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
if (uniqueId)
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18430
|
+
const forget = (uniqueId) => {
|
|
18431
|
+
contexts.delete(uniqueId);
|
|
18432
|
+
dirty.delete(uniqueId);
|
|
18433
|
+
for (const [id, value] of contextIds) if (value === uniqueId) contextIds.delete(id);
|
|
18434
|
+
};
|
|
18435
|
+
const remove = (params) => {
|
|
18436
|
+
const byId = typeof params.executionContextId === "number" ? contextIds.get(params.executionContextId) : void 0;
|
|
18437
|
+
const uniqueId = typeof params.executionContextUniqueId === "string" ? params.executionContextUniqueId : byId;
|
|
18438
|
+
if (uniqueId) forget(uniqueId);
|
|
18362
18439
|
};
|
|
18363
18440
|
const listeners = [
|
|
18364
18441
|
renderer.on("Runtime.executionContextCreated", (params) => {
|
|
@@ -18370,8 +18447,7 @@ async function installRendererLoadedModules(renderer) {
|
|
|
18370
18447
|
schedule(context.uniqueId);
|
|
18371
18448
|
}),
|
|
18372
18449
|
renderer.on("Runtime.executionContextDestroyed", (params) => {
|
|
18373
|
-
if (record2(params)
|
|
18374
|
-
remove(params.executionContextId);
|
|
18450
|
+
if (record2(params)) remove(params);
|
|
18375
18451
|
}),
|
|
18376
18452
|
renderer.on("Runtime.executionContextsCleared", () => {
|
|
18377
18453
|
contextIds.clear();
|