@karlorz/codexhost-cli-win32-arm64 0.13.3-5 → 0.13.3-7
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 +844 -80
- package/app/console-web.js +1329 -223
- package/app/cpa-live-voice-hook.js +864 -164
- package/app/desktop-controller.mjs +138 -35
- package/app/host-runtime.mjs +1233 -573
- package/app/plugins/antigravity/plugin.mjs +72 -1
- package/app/plugins/claude-code/plugin.mjs +130 -12
- package/app/plugins/codebuddy/plugin.mjs +79 -5
- package/app/plugins/codex-usage/plugin.mjs +178 -67
- package/app/plugins/cursor-cli/plugin.mjs +20727 -44858
- package/app/plugins/deepseek-harness/plugin.mjs +79 -5
- package/app/plugins/grok/plugin.mjs +888 -157
- package/app/plugins/hermes/plugin.mjs +79 -5
- package/app/plugins/kimi-code/plugin.mjs +72 -1
- package/app/plugins/kiro-cli/plugin.mjs +72 -1
- package/app/plugins/omp/plugin.mjs +2335 -2072
- package/app/plugins/opencode/plugin.mjs +79 -5
- package/app/plugins/pi/plugin.mjs +2432 -2276
- package/app/plugins/qoder/plugin.mjs +79 -5
- package/app/plugins/qoder-cn/plugin.mjs +79 -5
- package/app/plugins/workbuddy/plugin.mjs +79 -5
- package/app/plugins/zcode/plugin.mjs +79 -5
- package/app/renderer-extension.js +2977 -912
- 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
|
@@ -14817,6 +14817,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
14817
14817
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
14818
14818
|
});
|
|
14819
14819
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
14820
|
+
"codexhost/voice/gateway-status",
|
|
14820
14821
|
"codexhost/console/remote-connections",
|
|
14821
14822
|
"codexhost/runtime/status",
|
|
14822
14823
|
"codexhost/remote/ssh-setup",
|
|
@@ -14827,6 +14828,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
14827
14828
|
"codexhost/harness/installation",
|
|
14828
14829
|
"codexhost/harness/launch-settings/get",
|
|
14829
14830
|
"codexhost/harness/launch-settings/set",
|
|
14831
|
+
"codexhost/harness/grok-computer-use/get",
|
|
14832
|
+
"codexhost/harness/grok-computer-use/set",
|
|
14830
14833
|
"codexhost/harness/web-ui/open",
|
|
14831
14834
|
"codexhost/harness/accounts/sources",
|
|
14832
14835
|
"codexhost/harness/accounts/list",
|
|
@@ -15355,7 +15358,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
15355
15358
|
var harnessInspectParamsSchema = external_exports.object({
|
|
15356
15359
|
harnessId: harnessIdSchema,
|
|
15357
15360
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
15358
|
-
refresh: external_exports.boolean().optional()
|
|
15361
|
+
refresh: external_exports.boolean().optional(),
|
|
15362
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
15363
|
+
purpose: external_exports.literal("availability").optional()
|
|
15359
15364
|
}).strict();
|
|
15360
15365
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
15361
15366
|
harnessId: harnessIdSchema
|
|
@@ -15529,6 +15534,26 @@ var harnessLaunchSettingsSchema = external_exports.object({
|
|
|
15529
15534
|
restartRequired: external_exports.boolean()
|
|
15530
15535
|
}).strict();
|
|
15531
15536
|
|
|
15537
|
+
// ../../shared-contracts/dist/grok-computer-use.js
|
|
15538
|
+
var grokComputerUseGetSchema = external_exports.object({}).strict();
|
|
15539
|
+
var grokComputerUseSetSchema = external_exports.object({
|
|
15540
|
+
enabled: external_exports.boolean().optional(),
|
|
15541
|
+
browser: external_exports.boolean().optional()
|
|
15542
|
+
}).strict().refine((value) => value.enabled !== void 0 || value.browser !== void 0, {
|
|
15543
|
+
message: "Expected enabled or browser"
|
|
15544
|
+
});
|
|
15545
|
+
var grokComputerUseSettingsSchema = external_exports.object({
|
|
15546
|
+
enabled: external_exports.boolean(),
|
|
15547
|
+
available: external_exports.boolean(),
|
|
15548
|
+
unavailableReason: external_exports.string().min(1).max(500).optional(),
|
|
15549
|
+
browser: external_exports.boolean().optional(),
|
|
15550
|
+
browserFilesPresent: external_exports.boolean().optional(),
|
|
15551
|
+
browserAvailable: external_exports.boolean().optional(),
|
|
15552
|
+
browserUnavailableReason: external_exports.string().min(1).max(500).optional(),
|
|
15553
|
+
applyFailed: external_exports.boolean().optional(),
|
|
15554
|
+
applyError: external_exports.string().min(1).max(500).optional()
|
|
15555
|
+
}).strict();
|
|
15556
|
+
|
|
15532
15557
|
// ../../shared-contracts/dist/harness-installation.js
|
|
15533
15558
|
var harnessInstallationParamsSchema = external_exports.object({
|
|
15534
15559
|
harnessId: harnessIdSchema,
|
|
@@ -15921,6 +15946,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
15921
15946
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
15922
15947
|
]);
|
|
15923
15948
|
|
|
15949
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
15950
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
15951
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
15952
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
15953
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
15954
|
+
});
|
|
15955
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
15956
|
+
chatExperience: "chatgpt",
|
|
15957
|
+
chatConnection: "desktop",
|
|
15958
|
+
workConnection: "gateway"
|
|
15959
|
+
});
|
|
15960
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
15961
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
15962
|
+
external_exports.strictObject({
|
|
15963
|
+
operation: external_exports.literal("get"),
|
|
15964
|
+
runtime: external_exports.strictObject({
|
|
15965
|
+
id: external_exports.string().uuid(),
|
|
15966
|
+
revision: external_exports.string().max(64),
|
|
15967
|
+
activeCall: external_exports.boolean()
|
|
15968
|
+
}).optional()
|
|
15969
|
+
}),
|
|
15970
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
15971
|
+
external_exports.strictObject({
|
|
15972
|
+
operation: external_exports.literal("set"),
|
|
15973
|
+
settings: voiceSettingsSchema,
|
|
15974
|
+
revision: external_exports.string().max(64)
|
|
15975
|
+
}),
|
|
15976
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
15977
|
+
]);
|
|
15978
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
15979
|
+
settings: voiceSettingsSchema,
|
|
15980
|
+
initialized: external_exports.boolean(),
|
|
15981
|
+
revision: external_exports.string(),
|
|
15982
|
+
activeInject: external_exports.boolean().nullable(),
|
|
15983
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15984
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15985
|
+
routesActive: external_exports.boolean().nullable(),
|
|
15986
|
+
activeCall: external_exports.boolean().nullable(),
|
|
15987
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
15988
|
+
restartAvailable: external_exports.boolean(),
|
|
15989
|
+
restart: external_exports.strictObject({
|
|
15990
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
15991
|
+
error: external_exports.string().nullable()
|
|
15992
|
+
})
|
|
15993
|
+
});
|
|
15994
|
+
|
|
15924
15995
|
// ../../shared-contracts/dist/index.js
|
|
15925
15996
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
15926
15997
|
|
|
@@ -15945,10 +16016,13 @@ function usageSessionTitle(value) {
|
|
|
15945
16016
|
return void 0;
|
|
15946
16017
|
if (normalized.length <= MAX_SESSION_TITLE_LENGTH)
|
|
15947
16018
|
return normalized;
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
16019
|
+
let title = "";
|
|
16020
|
+
for (const character of normalized) {
|
|
16021
|
+
if (title.length + character.length >= MAX_SESSION_TITLE_LENGTH)
|
|
16022
|
+
break;
|
|
16023
|
+
title += character;
|
|
16024
|
+
}
|
|
16025
|
+
return `${title.trimEnd()}…`;
|
|
15952
16026
|
}
|
|
15953
16027
|
function sessionIdOk(value) {
|
|
15954
16028
|
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
@@ -16451,8 +16525,9 @@ var CodexCounters = class {
|
|
|
16451
16525
|
// dist/rollout-io.js
|
|
16452
16526
|
import { createReadStream as createReadStream2 } from "node:fs";
|
|
16453
16527
|
import { StringDecoder } from "node:string_decoder";
|
|
16454
|
-
import {
|
|
16455
|
-
import {
|
|
16528
|
+
import { pipeline } from "node:stream/promises";
|
|
16529
|
+
import { Readable } from "node:stream";
|
|
16530
|
+
import { constants as zstdConstants, createZstdDecompress } from "node:zlib";
|
|
16456
16531
|
/*!
|
|
16457
16532
|
* Rollout reading: zstd frame walking, streaming copy-prefix comparison.
|
|
16458
16533
|
*
|
|
@@ -16475,74 +16550,103 @@ import { zstdDecompress } from "node:zlib";
|
|
|
16475
16550
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16476
16551
|
* SOFTWARE.
|
|
16477
16552
|
*/
|
|
16478
|
-
var decompress = promisify(zstdDecompress);
|
|
16479
|
-
var MAX_FRAME = 64 * 1024 * 1024;
|
|
16480
16553
|
var MAX_LINE = 128 * 1024 * 1024;
|
|
16481
|
-
function frameSize(data) {
|
|
16482
|
-
if (data.length < 8)
|
|
16483
|
-
return null;
|
|
16484
|
-
const magic = data.readUInt32LE(0);
|
|
16485
|
-
if ((magic & 4294967280) === 407710288) {
|
|
16486
|
-
const size = 8 + data.readUInt32LE(4);
|
|
16487
|
-
if (size > MAX_FRAME)
|
|
16488
|
-
throw new Error("Codex zstd frame exceeds the safety limit");
|
|
16489
|
-
return data.length >= size ? { size, skip: true } : null;
|
|
16490
|
-
}
|
|
16491
|
-
if (magic !== 4247762216)
|
|
16492
|
-
throw new Error("Invalid Codex zstd frame");
|
|
16493
|
-
const descriptor = data.readUInt8(4);
|
|
16494
|
-
if (descriptor & 8)
|
|
16495
|
-
throw new Error("Reserved Codex zstd frame header");
|
|
16496
|
-
const single = descriptor >> 5 & 1;
|
|
16497
|
-
let offset = 5 + (single ? 0 : 1) + ([0, 1, 2, 4][descriptor & 3] ?? 0) + ([single, 2, 4, 8][descriptor >> 6] ?? 0);
|
|
16498
|
-
for (; ; ) {
|
|
16499
|
-
if (offset + 3 > data.length)
|
|
16500
|
-
return null;
|
|
16501
|
-
const block = data.readUIntLE(offset, 3);
|
|
16502
|
-
const type = block >> 1 & 3;
|
|
16503
|
-
if (type === 3)
|
|
16504
|
-
throw new Error("Reserved Codex zstd block");
|
|
16505
|
-
offset += 3 + (type === 1 ? 1 : block >>> 3);
|
|
16506
|
-
if (offset > MAX_FRAME)
|
|
16507
|
-
throw new Error("Codex zstd frame exceeds the safety limit");
|
|
16508
|
-
if (block & 1)
|
|
16509
|
-
break;
|
|
16510
|
-
}
|
|
16511
|
-
if (descriptor & 4)
|
|
16512
|
-
offset += 4;
|
|
16513
|
-
return data.length >= offset ? { size: offset, skip: false } : null;
|
|
16514
|
-
}
|
|
16515
16554
|
async function* rolloutBytes(file2, signal) {
|
|
16516
16555
|
signal.throwIfAborted();
|
|
16517
16556
|
const stream = createReadStream2(file2, { signal });
|
|
16518
|
-
let pending = Buffer.alloc(0);
|
|
16519
16557
|
try {
|
|
16520
|
-
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
if (!file2.endsWith(".zst")) {
|
|
16558
|
+
if (!file2.endsWith(".zst")) {
|
|
16559
|
+
for await (const chunk of stream) {
|
|
16560
|
+
signal.throwIfAborted();
|
|
16524
16561
|
yield chunk;
|
|
16562
|
+
}
|
|
16563
|
+
return;
|
|
16564
|
+
}
|
|
16565
|
+
const input = stream[Symbol.asyncIterator]();
|
|
16566
|
+
let pending = Buffer.alloc(0);
|
|
16567
|
+
async function readExact(size, allowEof = false) {
|
|
16568
|
+
const parts = [];
|
|
16569
|
+
let length = 0;
|
|
16570
|
+
while (length < size) {
|
|
16571
|
+
signal.throwIfAborted();
|
|
16572
|
+
if (!pending.length) {
|
|
16573
|
+
const next = await input.next();
|
|
16574
|
+
if (next.done) {
|
|
16575
|
+
if (allowEof && !length)
|
|
16576
|
+
return Buffer.alloc(0);
|
|
16577
|
+
throw new Error("Truncated Codex zstd rollout");
|
|
16578
|
+
}
|
|
16579
|
+
pending = next.value;
|
|
16580
|
+
}
|
|
16581
|
+
const count2 = Math.min(size - length, pending.length);
|
|
16582
|
+
parts.push(pending.subarray(0, count2));
|
|
16583
|
+
pending = pending.subarray(count2);
|
|
16584
|
+
length += count2;
|
|
16585
|
+
}
|
|
16586
|
+
return Buffer.concat(parts, length);
|
|
16587
|
+
}
|
|
16588
|
+
for (; ; ) {
|
|
16589
|
+
const magicBytes = await readExact(4, true);
|
|
16590
|
+
if (!magicBytes.length)
|
|
16591
|
+
break;
|
|
16592
|
+
const magic = magicBytes.readUInt32LE(0);
|
|
16593
|
+
if ((magic & 4294967280) === 407710288) {
|
|
16594
|
+
let size = (await readExact(4)).readUInt32LE(0);
|
|
16595
|
+
while (size) {
|
|
16596
|
+
const count2 = Math.min(size, 64 * 1024);
|
|
16597
|
+
await readExact(count2);
|
|
16598
|
+
size -= count2;
|
|
16599
|
+
}
|
|
16525
16600
|
continue;
|
|
16526
16601
|
}
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
|
|
16535
|
-
|
|
16602
|
+
if (magic !== 4247762216)
|
|
16603
|
+
throw new Error("Invalid Codex zstd frame");
|
|
16604
|
+
const descriptorBytes = await readExact(1);
|
|
16605
|
+
const descriptor = descriptorBytes.readUInt8(0);
|
|
16606
|
+
if (descriptor & 8)
|
|
16607
|
+
throw new Error("Reserved Codex zstd frame header");
|
|
16608
|
+
const single = descriptor >> 5 & 1;
|
|
16609
|
+
const headerSize = (single ? 0 : 1) + ([0, 1, 2, 4][descriptor & 3] ?? 0) + ([single, 2, 4, 8][descriptor >> 6] ?? 0);
|
|
16610
|
+
const header = Buffer.concat([magicBytes, descriptorBytes, await readExact(headerSize)]);
|
|
16611
|
+
async function* frameChunks() {
|
|
16612
|
+
yield header;
|
|
16613
|
+
for (; ; ) {
|
|
16614
|
+
const blockBytes = await readExact(3);
|
|
16615
|
+
const block = blockBytes.readUIntLE(0, 3);
|
|
16616
|
+
const type = block >> 1 & 3;
|
|
16617
|
+
if (type === 3)
|
|
16618
|
+
throw new Error("Reserved Codex zstd block");
|
|
16619
|
+
const blockSize = block >>> 3;
|
|
16620
|
+
if (blockSize > 128 * 1024)
|
|
16621
|
+
throw new Error("Invalid Codex zstd block size");
|
|
16622
|
+
yield blockBytes;
|
|
16623
|
+
yield await readExact(type === 1 ? 1 : blockSize);
|
|
16624
|
+
if (block & 1)
|
|
16625
|
+
break;
|
|
16626
|
+
}
|
|
16627
|
+
if (descriptor & 4)
|
|
16628
|
+
yield await readExact(4);
|
|
16629
|
+
}
|
|
16630
|
+
const frame = Readable.from(frameChunks(), { objectMode: false });
|
|
16631
|
+
const decoder = createZstdDecompress({
|
|
16632
|
+
chunkSize: 64 * 1024,
|
|
16633
|
+
params: { [zstdConstants.ZSTD_d_windowLogMax]: 27 }
|
|
16634
|
+
});
|
|
16635
|
+
const completed = pipeline(frame, decoder, { signal }).then(() => null, (error51) => error51);
|
|
16636
|
+
try {
|
|
16637
|
+
for await (const chunk of decoder) {
|
|
16536
16638
|
signal.throwIfAborted();
|
|
16537
|
-
yield
|
|
16639
|
+
yield chunk;
|
|
16538
16640
|
}
|
|
16539
|
-
|
|
16641
|
+
const error51 = await completed;
|
|
16642
|
+
if (error51)
|
|
16643
|
+
throw error51;
|
|
16644
|
+
} finally {
|
|
16645
|
+
frame.destroy();
|
|
16646
|
+
decoder.destroy();
|
|
16647
|
+
await completed;
|
|
16540
16648
|
}
|
|
16541
|
-
if (pending.length > MAX_FRAME)
|
|
16542
|
-
throw new Error("Codex zstd frame exceeds the safety limit");
|
|
16543
16649
|
}
|
|
16544
|
-
if (pending.length)
|
|
16545
|
-
throw new Error("Truncated Codex zstd rollout");
|
|
16546
16650
|
} finally {
|
|
16547
16651
|
stream.destroy();
|
|
16548
16652
|
}
|
|
@@ -16616,12 +16720,17 @@ var ROW_KINDS = /* @__PURE__ */ new Set([
|
|
|
16616
16720
|
]);
|
|
16617
16721
|
var HEAD_TYPE = /"type"\s*:\s*"([^"]+)"/u;
|
|
16618
16722
|
var TAIL_TYPE = /"type"\s*:\s*"([^"]+)"\s*\}\s*$/u;
|
|
16723
|
+
var USER_ROLE = /"role"\s*:\s*"user"/u;
|
|
16724
|
+
var EVENT_OF_INTEREST = /"type"\s*:\s*"(?:token_count|task_started|thread_settings_applied|user_message)"/u;
|
|
16619
16725
|
function rowKind(line) {
|
|
16620
16726
|
const head = HEAD_TYPE.exec(line.slice(0, 1024))?.[1];
|
|
16621
16727
|
if (head && ROW_KINDS.has(head))
|
|
16622
16728
|
return head;
|
|
16623
16729
|
return TAIL_TYPE.exec(line.slice(-1024))?.[1] ?? head;
|
|
16624
16730
|
}
|
|
16731
|
+
function markerIn(pattern, line) {
|
|
16732
|
+
return pattern.test(line.slice(0, 1024)) || pattern.test(line.slice(-1024));
|
|
16733
|
+
}
|
|
16625
16734
|
async function stamp(file2) {
|
|
16626
16735
|
const s = await lstat(file2, { bigint: true });
|
|
16627
16736
|
if (!s.isFile())
|
|
@@ -16685,9 +16794,9 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
16685
16794
|
options.onIncomplete?.();
|
|
16686
16795
|
if (!kind || !ROW_KINDS.has(kind))
|
|
16687
16796
|
continue;
|
|
16688
|
-
if (kind === "response_item" &&
|
|
16797
|
+
if (kind === "response_item" && !markerIn(USER_ROLE, line))
|
|
16689
16798
|
continue;
|
|
16690
|
-
if (kind === "event_msg" &&
|
|
16799
|
+
if (kind === "event_msg" && !markerIn(EVENT_OF_INTEREST, line))
|
|
16691
16800
|
continue;
|
|
16692
16801
|
let row;
|
|
16693
16802
|
try {
|
|
@@ -16738,8 +16847,10 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
16738
16847
|
break;
|
|
16739
16848
|
}
|
|
16740
16849
|
case "response_item":
|
|
16741
|
-
|
|
16742
|
-
|
|
16850
|
+
if (p.type === "message" && p.role === "user") {
|
|
16851
|
+
counters.boundary();
|
|
16852
|
+
firstPrompt ??= userItemPrompt(p);
|
|
16853
|
+
}
|
|
16743
16854
|
break;
|
|
16744
16855
|
case "event_msg":
|
|
16745
16856
|
if (p.type === "task_started") {
|