@codexhost/cli-linux-arm64 0.18.0-beta.4 → 0.18.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 +98 -55
- package/app/console-web.js +276 -188
- package/app/desktop-controller.mjs +283 -113
- package/app/host-runtime.mjs +2129 -1529
- package/app/plugins/antigravity/plugin.mjs +787 -303
- package/app/plugins/claude-code/plugin.mjs +85 -45
- package/app/plugins/codebuddy/plugin.mjs +99 -59
- package/app/plugins/codex-usage/plugin.mjs +85 -45
- package/app/plugins/copilot/plugin.mjs +90 -50
- package/app/plugins/cursor-cli/plugin.mjs +113 -73
- package/app/plugins/deepseek-harness/plugin.mjs +116 -76
- package/app/plugins/devin/plugin.mjs +90 -50
- package/app/plugins/grok/plugin.mjs +96 -56
- package/app/plugins/hermes/plugin.mjs +77 -37
- package/app/plugins/kimi-code/plugin.mjs +94 -54
- package/app/plugins/kiro-cli/plugin.mjs +90 -50
- package/app/plugins/omp/plugin.mjs +81 -41
- package/app/plugins/opencode/plugin.mjs +78 -38
- package/app/plugins/pi/plugin.mjs +94 -54
- package/app/plugins/qoder/plugin.mjs +106 -66
- package/app/plugins/qoder-cn/plugin.mjs +106 -66
- package/app/plugins/qwen-code/plugin.mjs +101 -61
- package/app/plugins/workbuddy/plugin.mjs +99 -59
- package/app/plugins/zcode/plugin.mjs +82 -42
- package/app/renderer-extension.js +435 -361
- package/app/web/assets/{index-D1dOzBMI.js → index-C0aXz2jD.js} +63 -63
- package/app/web/codex-agent.png +0 -0
- package/app/web/codexhost-settings.js +229 -175
- 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 +61 -61
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +8 -8
- 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 +12 -12
- package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-theme/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web/sw.js +41 -6
- package/app/web-modules/server.mjs +2079 -1201
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -18,9 +18,9 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
18
18
|
throw mod = 0, e;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
var __export = (
|
|
21
|
+
var __export = (target2, all) => {
|
|
22
22
|
for (var name in all)
|
|
23
|
-
__defProp(
|
|
23
|
+
__defProp(target2, name, { get: all[name], enumerable: true });
|
|
24
24
|
};
|
|
25
25
|
var __copyProps = (to, from, except, desc) => {
|
|
26
26
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -30,12 +30,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
30
30
|
}
|
|
31
31
|
return to;
|
|
32
32
|
};
|
|
33
|
-
var __toESM = (mod, isNodeMode,
|
|
33
|
+
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
34
34
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
35
35
|
// file that has been converted to a CommonJS file using a Babel-
|
|
36
36
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
37
37
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
38
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
38
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
|
|
39
39
|
mod
|
|
40
40
|
));
|
|
41
41
|
|
|
@@ -71,17 +71,17 @@ var require_buffer_util = __commonJS({
|
|
|
71
71
|
function concat(list, totalLength) {
|
|
72
72
|
if (list.length === 0) return EMPTY_BUFFER;
|
|
73
73
|
if (list.length === 1) return list[0];
|
|
74
|
-
const
|
|
74
|
+
const target2 = Buffer.allocUnsafe(totalLength);
|
|
75
75
|
let offset = 0;
|
|
76
76
|
for (let i = 0; i < list.length; i++) {
|
|
77
77
|
const buf = list[i];
|
|
78
|
-
|
|
78
|
+
target2.set(buf, offset);
|
|
79
79
|
offset += buf.length;
|
|
80
80
|
}
|
|
81
81
|
if (offset < totalLength) {
|
|
82
|
-
return new FastBuffer(
|
|
82
|
+
return new FastBuffer(target2.buffer, target2.byteOffset, offset);
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return target2;
|
|
85
85
|
}
|
|
86
86
|
function _mask(source, mask, output, offset, length) {
|
|
87
87
|
for (let i = 0; i < length; i++) {
|
|
@@ -1505,29 +1505,29 @@ var require_sender = __commonJS({
|
|
|
1505
1505
|
offset += 2;
|
|
1506
1506
|
payloadLength = 126;
|
|
1507
1507
|
}
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1510
|
-
if (options.rsv1)
|
|
1511
|
-
|
|
1508
|
+
const target2 = Buffer.allocUnsafe(merge2 ? dataLength + offset : offset);
|
|
1509
|
+
target2[0] = options.fin ? options.opcode | 128 : options.opcode;
|
|
1510
|
+
if (options.rsv1) target2[0] |= 64;
|
|
1511
|
+
target2[1] = payloadLength;
|
|
1512
1512
|
if (payloadLength === 126) {
|
|
1513
|
-
|
|
1513
|
+
target2.writeUInt16BE(dataLength, 2);
|
|
1514
1514
|
} else if (payloadLength === 127) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
}
|
|
1518
|
-
if (!options.mask) return [
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
if (skipMasking) return [
|
|
1515
|
+
target2[2] = target2[3] = 0;
|
|
1516
|
+
target2.writeUIntBE(dataLength, 4, 6);
|
|
1517
|
+
}
|
|
1518
|
+
if (!options.mask) return [target2, data];
|
|
1519
|
+
target2[1] |= 128;
|
|
1520
|
+
target2[offset - 4] = mask[0];
|
|
1521
|
+
target2[offset - 3] = mask[1];
|
|
1522
|
+
target2[offset - 2] = mask[2];
|
|
1523
|
+
target2[offset - 1] = mask[3];
|
|
1524
|
+
if (skipMasking) return [target2, data];
|
|
1525
1525
|
if (merge2) {
|
|
1526
|
-
applyMask(data, mask,
|
|
1527
|
-
return [
|
|
1526
|
+
applyMask(data, mask, target2, offset, dataLength);
|
|
1527
|
+
return [target2];
|
|
1528
1528
|
}
|
|
1529
1529
|
applyMask(data, mask, data, 0, dataLength);
|
|
1530
|
-
return [
|
|
1530
|
+
return [target2, data];
|
|
1531
1531
|
}
|
|
1532
1532
|
/**
|
|
1533
1533
|
* Sends a close message to the other peer.
|
|
@@ -4064,9 +4064,9 @@ import path4 from "node:path";
|
|
|
4064
4064
|
function referencesNpmBin(shim, name, bin) {
|
|
4065
4065
|
if (bin.includes(".."))
|
|
4066
4066
|
return false;
|
|
4067
|
-
const
|
|
4067
|
+
const target2 = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
|
|
4068
4068
|
const text = shim.replaceAll("\\", "/").toLowerCase();
|
|
4069
|
-
return text.includes(`%dp0%/${
|
|
4069
|
+
return text.includes(`%dp0%/${target2}"`) || text.includes(`%~dp0/${target2}"`);
|
|
4070
4070
|
}
|
|
4071
4071
|
async function npmInstallation(command, packages, environment) {
|
|
4072
4072
|
let selected = await realpath(command);
|
|
@@ -4105,8 +4105,8 @@ async function npmInstallation(command, packages, environment) {
|
|
|
4105
4105
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
4106
4106
|
if (path4.basename(bin) !== bin || entry.includes(".."))
|
|
4107
4107
|
return false;
|
|
4108
|
-
const
|
|
4109
|
-
if (
|
|
4108
|
+
const target2 = await realpath(path4.join(directory, entry)).catch(() => "");
|
|
4109
|
+
if (target2.toLowerCase() !== selected.toLowerCase())
|
|
4110
4110
|
return false;
|
|
4111
4111
|
const shim = await readFile(path4.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
4112
4112
|
return referencesNpmBin(shim, name, entry);
|
|
@@ -4999,8 +4999,8 @@ function defineLazy(object2, key, getter) {
|
|
|
4999
4999
|
function objectClone(obj) {
|
|
5000
5000
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
5001
5001
|
}
|
|
5002
|
-
function assignProp(
|
|
5003
|
-
Object.defineProperty(
|
|
5002
|
+
function assignProp(target2, prop, value) {
|
|
5003
|
+
Object.defineProperty(target2, prop, {
|
|
5004
5004
|
value,
|
|
5005
5005
|
writable: true,
|
|
5006
5006
|
enumerable: true,
|
|
@@ -5183,35 +5183,35 @@ function normalizeParams(_params) {
|
|
|
5183
5183
|
return params;
|
|
5184
5184
|
}
|
|
5185
5185
|
function createTransparentProxy(getter) {
|
|
5186
|
-
let
|
|
5186
|
+
let target2;
|
|
5187
5187
|
return new Proxy({}, {
|
|
5188
5188
|
get(_, prop, receiver) {
|
|
5189
|
-
|
|
5190
|
-
return Reflect.get(
|
|
5189
|
+
target2 ?? (target2 = getter());
|
|
5190
|
+
return Reflect.get(target2, prop, receiver);
|
|
5191
5191
|
},
|
|
5192
5192
|
set(_, prop, value, receiver) {
|
|
5193
|
-
|
|
5194
|
-
return Reflect.set(
|
|
5193
|
+
target2 ?? (target2 = getter());
|
|
5194
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
5195
5195
|
},
|
|
5196
5196
|
has(_, prop) {
|
|
5197
|
-
|
|
5198
|
-
return Reflect.has(
|
|
5197
|
+
target2 ?? (target2 = getter());
|
|
5198
|
+
return Reflect.has(target2, prop);
|
|
5199
5199
|
},
|
|
5200
5200
|
deleteProperty(_, prop) {
|
|
5201
|
-
|
|
5202
|
-
return Reflect.deleteProperty(
|
|
5201
|
+
target2 ?? (target2 = getter());
|
|
5202
|
+
return Reflect.deleteProperty(target2, prop);
|
|
5203
5203
|
},
|
|
5204
5204
|
ownKeys(_) {
|
|
5205
|
-
|
|
5206
|
-
return Reflect.ownKeys(
|
|
5205
|
+
target2 ?? (target2 = getter());
|
|
5206
|
+
return Reflect.ownKeys(target2);
|
|
5207
5207
|
},
|
|
5208
5208
|
getOwnPropertyDescriptor(_, prop) {
|
|
5209
|
-
|
|
5210
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
5209
|
+
target2 ?? (target2 = getter());
|
|
5210
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
5211
5211
|
},
|
|
5212
5212
|
defineProperty(_, prop, descriptor) {
|
|
5213
|
-
|
|
5214
|
-
return Reflect.defineProperty(
|
|
5213
|
+
target2 ?? (target2 = getter());
|
|
5214
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
5215
5215
|
}
|
|
5216
5216
|
});
|
|
5217
5217
|
}
|
|
@@ -15663,15 +15663,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15663
15663
|
|
|
15664
15664
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
15665
15665
|
function initializeContext(params) {
|
|
15666
|
-
let
|
|
15667
|
-
if (
|
|
15668
|
-
|
|
15669
|
-
if (
|
|
15670
|
-
|
|
15666
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
15667
|
+
if (target2 === "draft-4")
|
|
15668
|
+
target2 = "draft-04";
|
|
15669
|
+
if (target2 === "draft-7")
|
|
15670
|
+
target2 = "draft-07";
|
|
15671
15671
|
return {
|
|
15672
15672
|
processors: params.processors ?? {},
|
|
15673
15673
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
15674
|
-
target,
|
|
15674
|
+
target: target2,
|
|
15675
15675
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
15676
15676
|
override: params?.override ?? (() => {
|
|
15677
15677
|
}),
|
|
@@ -16013,8 +16013,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
16013
16013
|
return finalize(ctx, schema);
|
|
16014
16014
|
};
|
|
16015
16015
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
16016
|
-
const { libraryOptions, target } = params ?? {};
|
|
16017
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
16016
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
16017
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
16018
16018
|
process2(schema, ctx);
|
|
16019
16019
|
extractDefs(ctx, schema);
|
|
16020
16020
|
return finalize(ctx, schema);
|
|
@@ -17073,8 +17073,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
17073
17073
|
catch(params) {
|
|
17074
17074
|
return _catch2(this, params);
|
|
17075
17075
|
},
|
|
17076
|
-
pipe(
|
|
17077
|
-
return pipe(this,
|
|
17076
|
+
pipe(target2) {
|
|
17077
|
+
return pipe(this, target2);
|
|
17078
17078
|
},
|
|
17079
17079
|
readonly() {
|
|
17080
17080
|
return readonly(this);
|
|
@@ -19304,15 +19304,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
19304
19304
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
19305
19305
|
}).strict().superRefine(({ threads }, context) => {
|
|
19306
19306
|
const seen = /* @__PURE__ */ new Set();
|
|
19307
|
-
for (const [index,
|
|
19308
|
-
if (seen.has(
|
|
19307
|
+
for (const [index, thread2] of threads.entries()) {
|
|
19308
|
+
if (seen.has(thread2.threadId)) {
|
|
19309
19309
|
context.addIssue({
|
|
19310
19310
|
code: "custom",
|
|
19311
19311
|
message: "Thread ownership-list results must be unique",
|
|
19312
19312
|
path: ["threads", index, "threadId"]
|
|
19313
19313
|
});
|
|
19314
19314
|
}
|
|
19315
|
-
seen.add(
|
|
19315
|
+
seen.add(thread2.threadId);
|
|
19316
19316
|
}
|
|
19317
19317
|
});
|
|
19318
19318
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -20654,6 +20654,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
20654
20654
|
}).strict();
|
|
20655
20655
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
20656
20656
|
|
|
20657
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
20658
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
20659
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
20660
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
20661
|
+
var thread = { ...target, threadId: identity };
|
|
20662
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
20663
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
20664
|
+
external_exports.strictObject({
|
|
20665
|
+
kind: external_exports.literal("list"),
|
|
20666
|
+
...target,
|
|
20667
|
+
cursor: external_exports.string().nullable(),
|
|
20668
|
+
archived: external_exports.boolean()
|
|
20669
|
+
}),
|
|
20670
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
20671
|
+
external_exports.strictObject({
|
|
20672
|
+
kind: external_exports.literal("prompt"),
|
|
20673
|
+
...thread,
|
|
20674
|
+
epoch: identity,
|
|
20675
|
+
text: external_exports.string().min(1).max(8e3),
|
|
20676
|
+
requestId: identity.optional()
|
|
20677
|
+
}),
|
|
20678
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
20679
|
+
external_exports.strictObject({
|
|
20680
|
+
kind: external_exports.literal("rename"),
|
|
20681
|
+
...thread,
|
|
20682
|
+
epoch: identity,
|
|
20683
|
+
name: external_exports.string().min(1).max(512)
|
|
20684
|
+
}),
|
|
20685
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
20686
|
+
external_exports.strictObject({
|
|
20687
|
+
kind: external_exports.literal("respond"),
|
|
20688
|
+
...thread,
|
|
20689
|
+
epoch: identity,
|
|
20690
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
20691
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
20692
|
+
})
|
|
20693
|
+
]);
|
|
20694
|
+
|
|
20657
20695
|
// ../../shared-contracts/dist/remote-connections.js
|
|
20658
20696
|
var hostId = external_exports.string().min(1).max(1024);
|
|
20659
20697
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -20674,7 +20712,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
20674
20712
|
identity: external_exports.string().max(4096).nullable()
|
|
20675
20713
|
});
|
|
20676
20714
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
20715
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
20677
20716
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
20717
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
20678
20718
|
external_exports.strictObject({
|
|
20679
20719
|
action: external_exports.literal("read-thread"),
|
|
20680
20720
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -23189,12 +23229,12 @@ DeepSeek Harness ${version2} is older than the minimum version ${DEEPSEEK_MINIMU
|
|
|
23189
23229
|
function verifiedVersionList(separator, lastSeparator) {
|
|
23190
23230
|
return DEEPSEEK_VERIFIED_VERSIONS.slice(0, -1).join(separator) + lastSeparator + DEEPSEEK_NEWEST_VERIFIED_VERSION;
|
|
23191
23231
|
}
|
|
23192
|
-
function appendOutput(
|
|
23232
|
+
function appendOutput(target2, value, limit) {
|
|
23193
23233
|
const chunk = Buffer.isBuffer(value) ? value : Buffer.from(String(value));
|
|
23194
|
-
if (
|
|
23234
|
+
if (target2.bytes + chunk.byteLength > limit)
|
|
23195
23235
|
return false;
|
|
23196
|
-
|
|
23197
|
-
|
|
23236
|
+
target2.chunks.push(chunk);
|
|
23237
|
+
target2.bytes += chunk.byteLength;
|
|
23198
23238
|
return true;
|
|
23199
23239
|
}
|
|
23200
23240
|
function capturedText(output) {
|
|
@@ -23243,8 +23283,8 @@ async function captureVersionOutput(child, input, dependencies) {
|
|
|
23243
23283
|
finished = true;
|
|
23244
23284
|
reject({ error: error51, requiresCleanup });
|
|
23245
23285
|
};
|
|
23246
|
-
const append = (
|
|
23247
|
-
if (finished || appendOutput(
|
|
23286
|
+
const append = (target2, value) => {
|
|
23287
|
+
if (finished || appendOutput(target2, value, input.outputLimitBytes))
|
|
23248
23288
|
return;
|
|
23249
23289
|
rejectOnce(probeError("protocolError", "DeepSeek Harness --version exceeded the bounded output limit"), true);
|
|
23250
23290
|
};
|
|
@@ -26628,13 +26668,13 @@ var ModernEventGateway = class {
|
|
|
26628
26668
|
if (!pending.released)
|
|
26629
26669
|
this.#notifyCancel(pending.sink, eventId);
|
|
26630
26670
|
}
|
|
26631
|
-
async #rejectMalformed(
|
|
26632
|
-
await this.#sendResult(generation.clientId,
|
|
26633
|
-
this.#rememberRetired(
|
|
26671
|
+
async #rejectMalformed(identity2, generation) {
|
|
26672
|
+
await this.#sendResult(generation.clientId, identity2.eventId, malformedOutcome(identity2.event)).catch(() => void 0);
|
|
26673
|
+
this.#rememberRetired(identity2.eventId, {
|
|
26634
26674
|
kind: "claimed",
|
|
26635
26675
|
clientId: generation.clientId
|
|
26636
26676
|
});
|
|
26637
|
-
await this.#faultSink(
|
|
26677
|
+
await this.#faultSink(identity2.agentId, gatewayError("protocolError", malformedOutcome(identity2.event).error.message));
|
|
26638
26678
|
}
|
|
26639
26679
|
async #sendResult(clientId, eventId, outcome) {
|
|
26640
26680
|
let result;
|
|
@@ -28520,11 +28560,11 @@ function strictIndex(value, label) {
|
|
|
28520
28560
|
}
|
|
28521
28561
|
function validateImageOffload(data, trace) {
|
|
28522
28562
|
const seen = /* @__PURE__ */ new Set();
|
|
28523
|
-
for (const
|
|
28524
|
-
if (!isRecord4(
|
|
28563
|
+
for (const target2 of data.targets) {
|
|
28564
|
+
if (!isRecord4(target2))
|
|
28525
28565
|
fail("Modern history image/offload target is malformed");
|
|
28526
|
-
exactKeys(
|
|
28527
|
-
const seq = strictIndex(
|
|
28566
|
+
exactKeys(target2, ["seq", "imageIndexes"]);
|
|
28567
|
+
const seq = strictIndex(target2.seq, "image/offload target seq");
|
|
28528
28568
|
if (seen.has(seq))
|
|
28529
28569
|
fail("Modern history image/offload repeats a target");
|
|
28530
28570
|
seen.add(seq);
|
|
@@ -28534,7 +28574,7 @@ function validateImageOffload(data, trace) {
|
|
|
28534
28574
|
}
|
|
28535
28575
|
const sourceData = source.type === "user/message" ? source.data : source.data.message;
|
|
28536
28576
|
const content = isRecord4(sourceData) ? sourceData.content : void 0;
|
|
28537
|
-
if (!Array.isArray(content) || !Array.isArray(
|
|
28577
|
+
if (!Array.isArray(content) || !Array.isArray(target2.imageIndexes) || !target2.imageIndexes.length) {
|
|
28538
28578
|
fail("Modern history image/offload indexes are malformed");
|
|
28539
28579
|
}
|
|
28540
28580
|
const images = [];
|
|
@@ -28552,7 +28592,7 @@ function validateImageOffload(data, trace) {
|
|
|
28552
28592
|
};
|
|
28553
28593
|
collectImages(content);
|
|
28554
28594
|
let previous = -1;
|
|
28555
|
-
for (const value of
|
|
28595
|
+
for (const value of target2.imageIndexes) {
|
|
28556
28596
|
const index = strictIndex(value, "image/offload index");
|
|
28557
28597
|
const image = images[index];
|
|
28558
28598
|
if (index <= previous || !isRecord4(image) || image.offloaded === true || trace.offloadedImages.has(`${seq}:${index}`)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __codexhostCreateRequire } from "node:module"; const require = __codexhostCreateRequire(import.meta.url);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __export = (
|
|
3
|
+
var __export = (target2, all) => {
|
|
4
4
|
for (var name in all)
|
|
5
|
-
__defProp(
|
|
5
|
+
__defProp(target2, name, { get: all[name], enumerable: true });
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// dist/adapter.js
|
|
@@ -756,8 +756,8 @@ function defineLazy(object2, key, getter) {
|
|
|
756
756
|
function objectClone(obj) {
|
|
757
757
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
758
758
|
}
|
|
759
|
-
function assignProp(
|
|
760
|
-
Object.defineProperty(
|
|
759
|
+
function assignProp(target2, prop, value) {
|
|
760
|
+
Object.defineProperty(target2, prop, {
|
|
761
761
|
value,
|
|
762
762
|
writable: true,
|
|
763
763
|
enumerable: true,
|
|
@@ -940,35 +940,35 @@ function normalizeParams(_params) {
|
|
|
940
940
|
return params;
|
|
941
941
|
}
|
|
942
942
|
function createTransparentProxy(getter) {
|
|
943
|
-
let
|
|
943
|
+
let target2;
|
|
944
944
|
return new Proxy({}, {
|
|
945
945
|
get(_, prop, receiver) {
|
|
946
|
-
|
|
947
|
-
return Reflect.get(
|
|
946
|
+
target2 ?? (target2 = getter());
|
|
947
|
+
return Reflect.get(target2, prop, receiver);
|
|
948
948
|
},
|
|
949
949
|
set(_, prop, value, receiver) {
|
|
950
|
-
|
|
951
|
-
return Reflect.set(
|
|
950
|
+
target2 ?? (target2 = getter());
|
|
951
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
952
952
|
},
|
|
953
953
|
has(_, prop) {
|
|
954
|
-
|
|
955
|
-
return Reflect.has(
|
|
954
|
+
target2 ?? (target2 = getter());
|
|
955
|
+
return Reflect.has(target2, prop);
|
|
956
956
|
},
|
|
957
957
|
deleteProperty(_, prop) {
|
|
958
|
-
|
|
959
|
-
return Reflect.deleteProperty(
|
|
958
|
+
target2 ?? (target2 = getter());
|
|
959
|
+
return Reflect.deleteProperty(target2, prop);
|
|
960
960
|
},
|
|
961
961
|
ownKeys(_) {
|
|
962
|
-
|
|
963
|
-
return Reflect.ownKeys(
|
|
962
|
+
target2 ?? (target2 = getter());
|
|
963
|
+
return Reflect.ownKeys(target2);
|
|
964
964
|
},
|
|
965
965
|
getOwnPropertyDescriptor(_, prop) {
|
|
966
|
-
|
|
967
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
966
|
+
target2 ?? (target2 = getter());
|
|
967
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
968
968
|
},
|
|
969
969
|
defineProperty(_, prop, descriptor) {
|
|
970
|
-
|
|
971
|
-
return Reflect.defineProperty(
|
|
970
|
+
target2 ?? (target2 = getter());
|
|
971
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
}
|
|
@@ -11420,15 +11420,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11420
11420
|
|
|
11421
11421
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11422
11422
|
function initializeContext(params) {
|
|
11423
|
-
let
|
|
11424
|
-
if (
|
|
11425
|
-
|
|
11426
|
-
if (
|
|
11427
|
-
|
|
11423
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11424
|
+
if (target2 === "draft-4")
|
|
11425
|
+
target2 = "draft-04";
|
|
11426
|
+
if (target2 === "draft-7")
|
|
11427
|
+
target2 = "draft-07";
|
|
11428
11428
|
return {
|
|
11429
11429
|
processors: params.processors ?? {},
|
|
11430
11430
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11431
|
-
target,
|
|
11431
|
+
target: target2,
|
|
11432
11432
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11433
11433
|
override: params?.override ?? (() => {
|
|
11434
11434
|
}),
|
|
@@ -11770,8 +11770,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
11770
11770
|
return finalize(ctx, schema);
|
|
11771
11771
|
};
|
|
11772
11772
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
11773
|
-
const { libraryOptions, target } = params ?? {};
|
|
11774
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
11773
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
11774
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
11775
11775
|
process2(schema, ctx);
|
|
11776
11776
|
extractDefs(ctx, schema);
|
|
11777
11777
|
return finalize(ctx, schema);
|
|
@@ -12830,8 +12830,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12830
12830
|
catch(params) {
|
|
12831
12831
|
return _catch2(this, params);
|
|
12832
12832
|
},
|
|
12833
|
-
pipe(
|
|
12834
|
-
return pipe(this,
|
|
12833
|
+
pipe(target2) {
|
|
12834
|
+
return pipe(this, target2);
|
|
12835
12835
|
},
|
|
12836
12836
|
readonly() {
|
|
12837
12837
|
return readonly(this);
|
|
@@ -15061,15 +15061,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15061
15061
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15062
15062
|
}).strict().superRefine(({ threads }, context) => {
|
|
15063
15063
|
const seen = /* @__PURE__ */ new Set();
|
|
15064
|
-
for (const [index,
|
|
15065
|
-
if (seen.has(
|
|
15064
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15065
|
+
if (seen.has(thread2.threadId)) {
|
|
15066
15066
|
context.addIssue({
|
|
15067
15067
|
code: "custom",
|
|
15068
15068
|
message: "Thread ownership-list results must be unique",
|
|
15069
15069
|
path: ["threads", index, "threadId"]
|
|
15070
15070
|
});
|
|
15071
15071
|
}
|
|
15072
|
-
seen.add(
|
|
15072
|
+
seen.add(thread2.threadId);
|
|
15073
15073
|
}
|
|
15074
15074
|
});
|
|
15075
15075
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -16407,6 +16407,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16407
16407
|
}).strict();
|
|
16408
16408
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16409
16409
|
|
|
16410
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16411
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16412
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16413
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16414
|
+
var thread = { ...target, threadId: identity };
|
|
16415
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16416
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16417
|
+
external_exports.strictObject({
|
|
16418
|
+
kind: external_exports.literal("list"),
|
|
16419
|
+
...target,
|
|
16420
|
+
cursor: external_exports.string().nullable(),
|
|
16421
|
+
archived: external_exports.boolean()
|
|
16422
|
+
}),
|
|
16423
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16424
|
+
external_exports.strictObject({
|
|
16425
|
+
kind: external_exports.literal("prompt"),
|
|
16426
|
+
...thread,
|
|
16427
|
+
epoch: identity,
|
|
16428
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16429
|
+
requestId: identity.optional()
|
|
16430
|
+
}),
|
|
16431
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16432
|
+
external_exports.strictObject({
|
|
16433
|
+
kind: external_exports.literal("rename"),
|
|
16434
|
+
...thread,
|
|
16435
|
+
epoch: identity,
|
|
16436
|
+
name: external_exports.string().min(1).max(512)
|
|
16437
|
+
}),
|
|
16438
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16439
|
+
external_exports.strictObject({
|
|
16440
|
+
kind: external_exports.literal("respond"),
|
|
16441
|
+
...thread,
|
|
16442
|
+
epoch: identity,
|
|
16443
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16444
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16445
|
+
})
|
|
16446
|
+
]);
|
|
16447
|
+
|
|
16410
16448
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16411
16449
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16412
16450
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16427,7 +16465,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16427
16465
|
identity: external_exports.string().max(4096).nullable()
|
|
16428
16466
|
});
|
|
16429
16467
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16468
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16430
16469
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16470
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16431
16471
|
external_exports.strictObject({
|
|
16432
16472
|
action: external_exports.literal("read-thread"),
|
|
16433
16473
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -20247,11 +20287,11 @@ var AgentApp = class {
|
|
|
20247
20287
|
[runAgentConnectHandlers](connection) {
|
|
20248
20288
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20249
20289
|
}
|
|
20250
|
-
connect(
|
|
20251
|
-
return this.connectConnection(
|
|
20290
|
+
connect(target2, options = {}) {
|
|
20291
|
+
return this.connectConnection(target2, options).connection;
|
|
20252
20292
|
}
|
|
20253
|
-
connectWith(
|
|
20254
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20293
|
+
connectWith(target2, op) {
|
|
20294
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20255
20295
|
return rawConnection.runUntil(() => op(connection.client));
|
|
20256
20296
|
}
|
|
20257
20297
|
/**
|
|
@@ -20292,22 +20332,22 @@ var AgentApp = class {
|
|
|
20292
20332
|
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
20293
20333
|
return this;
|
|
20294
20334
|
}
|
|
20295
|
-
connectConnection(
|
|
20296
|
-
if (isStream(
|
|
20297
|
-
const state2 = this.openStreamConnection(
|
|
20335
|
+
connectConnection(target2, options = {}) {
|
|
20336
|
+
if (isStream(target2)) {
|
|
20337
|
+
const state2 = this.openStreamConnection(target2);
|
|
20298
20338
|
if (!options.deferConnectHandlers) {
|
|
20299
20339
|
this[runAgentConnectHandlers](state2.connection);
|
|
20300
20340
|
}
|
|
20301
20341
|
return state2;
|
|
20302
20342
|
}
|
|
20303
20343
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20304
|
-
const peerRawConnection =
|
|
20344
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20305
20345
|
const peerConnection = clientConnection(peerRawConnection);
|
|
20306
20346
|
const state = this.openStreamConnection(thisStream);
|
|
20307
20347
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20308
20348
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20309
20349
|
try {
|
|
20310
|
-
|
|
20350
|
+
target2[runClientConnectHandlers](peerConnection);
|
|
20311
20351
|
this[runAgentConnectHandlers](state.connection);
|
|
20312
20352
|
} catch (error51) {
|
|
20313
20353
|
peerConnection.close(error51);
|
|
@@ -20347,11 +20387,11 @@ var ClientApp = class {
|
|
|
20347
20387
|
[runClientConnectHandlers](connection) {
|
|
20348
20388
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20349
20389
|
}
|
|
20350
|
-
connect(
|
|
20351
|
-
return this.connectConnection(
|
|
20390
|
+
connect(target2) {
|
|
20391
|
+
return this.connectConnection(target2).connection;
|
|
20352
20392
|
}
|
|
20353
|
-
connectWith(
|
|
20354
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20393
|
+
connectWith(target2, op) {
|
|
20394
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20355
20395
|
return rawConnection.runUntil(() => op(connection.agent));
|
|
20356
20396
|
}
|
|
20357
20397
|
/**
|
|
@@ -20392,20 +20432,20 @@ var ClientApp = class {
|
|
|
20392
20432
|
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
20393
20433
|
return this;
|
|
20394
20434
|
}
|
|
20395
|
-
connectConnection(
|
|
20396
|
-
if (isStream(
|
|
20397
|
-
const state2 = this.openStreamConnection(
|
|
20435
|
+
connectConnection(target2) {
|
|
20436
|
+
if (isStream(target2)) {
|
|
20437
|
+
const state2 = this.openStreamConnection(target2);
|
|
20398
20438
|
this[runClientConnectHandlers](state2.connection);
|
|
20399
20439
|
return state2;
|
|
20400
20440
|
}
|
|
20401
20441
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20402
|
-
const peerRawConnection =
|
|
20442
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20403
20443
|
const peerConnection = agentConnection(peerRawConnection);
|
|
20404
20444
|
const state = this.openStreamConnection(thisStream);
|
|
20405
20445
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20406
20446
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20407
20447
|
try {
|
|
20408
|
-
|
|
20448
|
+
target2[runAgentConnectHandlers](peerConnection);
|
|
20409
20449
|
this[runClientConnectHandlers](state.connection);
|
|
20410
20450
|
} catch (error51) {
|
|
20411
20451
|
peerConnection.close(error51);
|