@codexhost/cli-darwin-x64 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
|
@@ -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
|
// ../../harness-discovery/dist/environment.js
|
|
@@ -360,9 +360,9 @@ import path4 from "node:path";
|
|
|
360
360
|
function referencesNpmBin(shim, name, bin) {
|
|
361
361
|
if (bin.includes(".."))
|
|
362
362
|
return false;
|
|
363
|
-
const
|
|
363
|
+
const target2 = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
|
|
364
364
|
const text = shim.replaceAll("\\", "/").toLowerCase();
|
|
365
|
-
return text.includes(`%dp0%/${
|
|
365
|
+
return text.includes(`%dp0%/${target2}"`) || text.includes(`%~dp0/${target2}"`);
|
|
366
366
|
}
|
|
367
367
|
async function npmInstallation(command, packages, environment) {
|
|
368
368
|
let selected = await realpath(command);
|
|
@@ -401,8 +401,8 @@ async function npmInstallation(command, packages, environment) {
|
|
|
401
401
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
402
402
|
if (path4.basename(bin) !== bin || entry.includes(".."))
|
|
403
403
|
return false;
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
404
|
+
const target2 = await realpath(path4.join(directory, entry)).catch(() => "");
|
|
405
|
+
if (target2.toLowerCase() !== selected.toLowerCase())
|
|
406
406
|
return false;
|
|
407
407
|
const shim = await readFile(path4.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
408
408
|
return referencesNpmBin(shim, name, entry);
|
|
@@ -1239,8 +1239,8 @@ function defineLazy(object2, key, getter) {
|
|
|
1239
1239
|
function objectClone(obj) {
|
|
1240
1240
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
1241
1241
|
}
|
|
1242
|
-
function assignProp(
|
|
1243
|
-
Object.defineProperty(
|
|
1242
|
+
function assignProp(target2, prop, value) {
|
|
1243
|
+
Object.defineProperty(target2, prop, {
|
|
1244
1244
|
value,
|
|
1245
1245
|
writable: true,
|
|
1246
1246
|
enumerable: true,
|
|
@@ -1423,35 +1423,35 @@ function normalizeParams(_params) {
|
|
|
1423
1423
|
return params;
|
|
1424
1424
|
}
|
|
1425
1425
|
function createTransparentProxy(getter) {
|
|
1426
|
-
let
|
|
1426
|
+
let target2;
|
|
1427
1427
|
return new Proxy({}, {
|
|
1428
1428
|
get(_, prop, receiver) {
|
|
1429
|
-
|
|
1430
|
-
return Reflect.get(
|
|
1429
|
+
target2 ?? (target2 = getter());
|
|
1430
|
+
return Reflect.get(target2, prop, receiver);
|
|
1431
1431
|
},
|
|
1432
1432
|
set(_, prop, value, receiver) {
|
|
1433
|
-
|
|
1434
|
-
return Reflect.set(
|
|
1433
|
+
target2 ?? (target2 = getter());
|
|
1434
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1435
1435
|
},
|
|
1436
1436
|
has(_, prop) {
|
|
1437
|
-
|
|
1438
|
-
return Reflect.has(
|
|
1437
|
+
target2 ?? (target2 = getter());
|
|
1438
|
+
return Reflect.has(target2, prop);
|
|
1439
1439
|
},
|
|
1440
1440
|
deleteProperty(_, prop) {
|
|
1441
|
-
|
|
1442
|
-
return Reflect.deleteProperty(
|
|
1441
|
+
target2 ?? (target2 = getter());
|
|
1442
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1443
1443
|
},
|
|
1444
1444
|
ownKeys(_) {
|
|
1445
|
-
|
|
1446
|
-
return Reflect.ownKeys(
|
|
1445
|
+
target2 ?? (target2 = getter());
|
|
1446
|
+
return Reflect.ownKeys(target2);
|
|
1447
1447
|
},
|
|
1448
1448
|
getOwnPropertyDescriptor(_, prop) {
|
|
1449
|
-
|
|
1450
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1449
|
+
target2 ?? (target2 = getter());
|
|
1450
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1451
1451
|
},
|
|
1452
1452
|
defineProperty(_, prop, descriptor) {
|
|
1453
|
-
|
|
1454
|
-
return Reflect.defineProperty(
|
|
1453
|
+
target2 ?? (target2 = getter());
|
|
1454
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1455
1455
|
}
|
|
1456
1456
|
});
|
|
1457
1457
|
}
|
|
@@ -11903,15 +11903,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11903
11903
|
|
|
11904
11904
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11905
11905
|
function initializeContext(params) {
|
|
11906
|
-
let
|
|
11907
|
-
if (
|
|
11908
|
-
|
|
11909
|
-
if (
|
|
11910
|
-
|
|
11906
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11907
|
+
if (target2 === "draft-4")
|
|
11908
|
+
target2 = "draft-04";
|
|
11909
|
+
if (target2 === "draft-7")
|
|
11910
|
+
target2 = "draft-07";
|
|
11911
11911
|
return {
|
|
11912
11912
|
processors: params.processors ?? {},
|
|
11913
11913
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11914
|
-
target,
|
|
11914
|
+
target: target2,
|
|
11915
11915
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11916
11916
|
override: params?.override ?? (() => {
|
|
11917
11917
|
}),
|
|
@@ -12253,8 +12253,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
12253
12253
|
return finalize(ctx, schema);
|
|
12254
12254
|
};
|
|
12255
12255
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
12256
|
-
const { libraryOptions, target } = params ?? {};
|
|
12257
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
12256
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
12257
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
12258
12258
|
process2(schema, ctx);
|
|
12259
12259
|
extractDefs(ctx, schema);
|
|
12260
12260
|
return finalize(ctx, schema);
|
|
@@ -13313,8 +13313,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13313
13313
|
catch(params) {
|
|
13314
13314
|
return _catch2(this, params);
|
|
13315
13315
|
},
|
|
13316
|
-
pipe(
|
|
13317
|
-
return pipe(this,
|
|
13316
|
+
pipe(target2) {
|
|
13317
|
+
return pipe(this, target2);
|
|
13318
13318
|
},
|
|
13319
13319
|
readonly() {
|
|
13320
13320
|
return readonly(this);
|
|
@@ -15544,15 +15544,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15544
15544
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15545
15545
|
}).strict().superRefine(({ threads }, context) => {
|
|
15546
15546
|
const seen = /* @__PURE__ */ new Set();
|
|
15547
|
-
for (const [index,
|
|
15548
|
-
if (seen.has(
|
|
15547
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15548
|
+
if (seen.has(thread2.threadId)) {
|
|
15549
15549
|
context.addIssue({
|
|
15550
15550
|
code: "custom",
|
|
15551
15551
|
message: "Thread ownership-list results must be unique",
|
|
15552
15552
|
path: ["threads", index, "threadId"]
|
|
15553
15553
|
});
|
|
15554
15554
|
}
|
|
15555
|
-
seen.add(
|
|
15555
|
+
seen.add(thread2.threadId);
|
|
15556
15556
|
}
|
|
15557
15557
|
});
|
|
15558
15558
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -16890,6 +16890,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16890
16890
|
}).strict();
|
|
16891
16891
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16892
16892
|
|
|
16893
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16894
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16895
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16896
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16897
|
+
var thread = { ...target, threadId: identity };
|
|
16898
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16899
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16900
|
+
external_exports.strictObject({
|
|
16901
|
+
kind: external_exports.literal("list"),
|
|
16902
|
+
...target,
|
|
16903
|
+
cursor: external_exports.string().nullable(),
|
|
16904
|
+
archived: external_exports.boolean()
|
|
16905
|
+
}),
|
|
16906
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16907
|
+
external_exports.strictObject({
|
|
16908
|
+
kind: external_exports.literal("prompt"),
|
|
16909
|
+
...thread,
|
|
16910
|
+
epoch: identity,
|
|
16911
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16912
|
+
requestId: identity.optional()
|
|
16913
|
+
}),
|
|
16914
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16915
|
+
external_exports.strictObject({
|
|
16916
|
+
kind: external_exports.literal("rename"),
|
|
16917
|
+
...thread,
|
|
16918
|
+
epoch: identity,
|
|
16919
|
+
name: external_exports.string().min(1).max(512)
|
|
16920
|
+
}),
|
|
16921
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16922
|
+
external_exports.strictObject({
|
|
16923
|
+
kind: external_exports.literal("respond"),
|
|
16924
|
+
...thread,
|
|
16925
|
+
epoch: identity,
|
|
16926
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16927
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16928
|
+
})
|
|
16929
|
+
]);
|
|
16930
|
+
|
|
16893
16931
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16894
16932
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16895
16933
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16910,7 +16948,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16910
16948
|
identity: external_exports.string().max(4096).nullable()
|
|
16911
16949
|
});
|
|
16912
16950
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16951
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16913
16952
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16953
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16914
16954
|
external_exports.strictObject({
|
|
16915
16955
|
action: external_exports.literal("read-thread"),
|
|
16916
16956
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -20713,11 +20753,11 @@ var AgentApp = class {
|
|
|
20713
20753
|
[runAgentConnectHandlers](connection) {
|
|
20714
20754
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20715
20755
|
}
|
|
20716
|
-
connect(
|
|
20717
|
-
return this.connectConnection(
|
|
20756
|
+
connect(target2, options = {}) {
|
|
20757
|
+
return this.connectConnection(target2, options).connection;
|
|
20718
20758
|
}
|
|
20719
|
-
connectWith(
|
|
20720
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20759
|
+
connectWith(target2, op) {
|
|
20760
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20721
20761
|
return rawConnection.runUntil(() => op(connection.client));
|
|
20722
20762
|
}
|
|
20723
20763
|
/**
|
|
@@ -20758,22 +20798,22 @@ var AgentApp = class {
|
|
|
20758
20798
|
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
20759
20799
|
return this;
|
|
20760
20800
|
}
|
|
20761
|
-
connectConnection(
|
|
20762
|
-
if (isStream(
|
|
20763
|
-
const state2 = this.openStreamConnection(
|
|
20801
|
+
connectConnection(target2, options = {}) {
|
|
20802
|
+
if (isStream(target2)) {
|
|
20803
|
+
const state2 = this.openStreamConnection(target2);
|
|
20764
20804
|
if (!options.deferConnectHandlers) {
|
|
20765
20805
|
this[runAgentConnectHandlers](state2.connection);
|
|
20766
20806
|
}
|
|
20767
20807
|
return state2;
|
|
20768
20808
|
}
|
|
20769
20809
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20770
|
-
const peerRawConnection =
|
|
20810
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20771
20811
|
const peerConnection = clientConnection(peerRawConnection);
|
|
20772
20812
|
const state = this.openStreamConnection(thisStream);
|
|
20773
20813
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20774
20814
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20775
20815
|
try {
|
|
20776
|
-
|
|
20816
|
+
target2[runClientConnectHandlers](peerConnection);
|
|
20777
20817
|
this[runAgentConnectHandlers](state.connection);
|
|
20778
20818
|
} catch (error51) {
|
|
20779
20819
|
peerConnection.close(error51);
|
|
@@ -20813,11 +20853,11 @@ var ClientApp = class {
|
|
|
20813
20853
|
[runClientConnectHandlers](connection) {
|
|
20814
20854
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20815
20855
|
}
|
|
20816
|
-
connect(
|
|
20817
|
-
return this.connectConnection(
|
|
20856
|
+
connect(target2) {
|
|
20857
|
+
return this.connectConnection(target2).connection;
|
|
20818
20858
|
}
|
|
20819
|
-
connectWith(
|
|
20820
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20859
|
+
connectWith(target2, op) {
|
|
20860
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20821
20861
|
return rawConnection.runUntil(() => op(connection.agent));
|
|
20822
20862
|
}
|
|
20823
20863
|
/**
|
|
@@ -20858,20 +20898,20 @@ var ClientApp = class {
|
|
|
20858
20898
|
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
20859
20899
|
return this;
|
|
20860
20900
|
}
|
|
20861
|
-
connectConnection(
|
|
20862
|
-
if (isStream(
|
|
20863
|
-
const state2 = this.openStreamConnection(
|
|
20901
|
+
connectConnection(target2) {
|
|
20902
|
+
if (isStream(target2)) {
|
|
20903
|
+
const state2 = this.openStreamConnection(target2);
|
|
20864
20904
|
this[runClientConnectHandlers](state2.connection);
|
|
20865
20905
|
return state2;
|
|
20866
20906
|
}
|
|
20867
20907
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20868
|
-
const peerRawConnection =
|
|
20908
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20869
20909
|
const peerConnection = agentConnection(peerRawConnection);
|
|
20870
20910
|
const state = this.openStreamConnection(thisStream);
|
|
20871
20911
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20872
20912
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20873
20913
|
try {
|
|
20874
|
-
|
|
20914
|
+
target2[runAgentConnectHandlers](peerConnection);
|
|
20875
20915
|
this[runClientConnectHandlers](state.connection);
|
|
20876
20916
|
} catch (error51) {
|
|
20877
20917
|
peerConnection.close(error51);
|
|
@@ -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
|
// ../../harness-discovery/dist/environment.js
|
|
@@ -1098,8 +1098,8 @@ function defineLazy(object2, key, getter) {
|
|
|
1098
1098
|
function objectClone(obj) {
|
|
1099
1099
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
1100
1100
|
}
|
|
1101
|
-
function assignProp(
|
|
1102
|
-
Object.defineProperty(
|
|
1101
|
+
function assignProp(target2, prop, value) {
|
|
1102
|
+
Object.defineProperty(target2, prop, {
|
|
1103
1103
|
value,
|
|
1104
1104
|
writable: true,
|
|
1105
1105
|
enumerable: true,
|
|
@@ -1282,35 +1282,35 @@ function normalizeParams(_params) {
|
|
|
1282
1282
|
return params;
|
|
1283
1283
|
}
|
|
1284
1284
|
function createTransparentProxy(getter) {
|
|
1285
|
-
let
|
|
1285
|
+
let target2;
|
|
1286
1286
|
return new Proxy({}, {
|
|
1287
1287
|
get(_, prop, receiver) {
|
|
1288
|
-
|
|
1289
|
-
return Reflect.get(
|
|
1288
|
+
target2 ?? (target2 = getter());
|
|
1289
|
+
return Reflect.get(target2, prop, receiver);
|
|
1290
1290
|
},
|
|
1291
1291
|
set(_, prop, value, receiver) {
|
|
1292
|
-
|
|
1293
|
-
return Reflect.set(
|
|
1292
|
+
target2 ?? (target2 = getter());
|
|
1293
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1294
1294
|
},
|
|
1295
1295
|
has(_, prop) {
|
|
1296
|
-
|
|
1297
|
-
return Reflect.has(
|
|
1296
|
+
target2 ?? (target2 = getter());
|
|
1297
|
+
return Reflect.has(target2, prop);
|
|
1298
1298
|
},
|
|
1299
1299
|
deleteProperty(_, prop) {
|
|
1300
|
-
|
|
1301
|
-
return Reflect.deleteProperty(
|
|
1300
|
+
target2 ?? (target2 = getter());
|
|
1301
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1302
1302
|
},
|
|
1303
1303
|
ownKeys(_) {
|
|
1304
|
-
|
|
1305
|
-
return Reflect.ownKeys(
|
|
1304
|
+
target2 ?? (target2 = getter());
|
|
1305
|
+
return Reflect.ownKeys(target2);
|
|
1306
1306
|
},
|
|
1307
1307
|
getOwnPropertyDescriptor(_, prop) {
|
|
1308
|
-
|
|
1309
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1308
|
+
target2 ?? (target2 = getter());
|
|
1309
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1310
1310
|
},
|
|
1311
1311
|
defineProperty(_, prop, descriptor) {
|
|
1312
|
-
|
|
1313
|
-
return Reflect.defineProperty(
|
|
1312
|
+
target2 ?? (target2 = getter());
|
|
1313
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
1316
|
}
|
|
@@ -11762,15 +11762,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11762
11762
|
|
|
11763
11763
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11764
11764
|
function initializeContext(params) {
|
|
11765
|
-
let
|
|
11766
|
-
if (
|
|
11767
|
-
|
|
11768
|
-
if (
|
|
11769
|
-
|
|
11765
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11766
|
+
if (target2 === "draft-4")
|
|
11767
|
+
target2 = "draft-04";
|
|
11768
|
+
if (target2 === "draft-7")
|
|
11769
|
+
target2 = "draft-07";
|
|
11770
11770
|
return {
|
|
11771
11771
|
processors: params.processors ?? {},
|
|
11772
11772
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11773
|
-
target,
|
|
11773
|
+
target: target2,
|
|
11774
11774
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11775
11775
|
override: params?.override ?? (() => {
|
|
11776
11776
|
}),
|
|
@@ -12112,8 +12112,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
12112
12112
|
return finalize(ctx, schema);
|
|
12113
12113
|
};
|
|
12114
12114
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
12115
|
-
const { libraryOptions, target } = params ?? {};
|
|
12116
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
12115
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
12116
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
12117
12117
|
process2(schema, ctx);
|
|
12118
12118
|
extractDefs(ctx, schema);
|
|
12119
12119
|
return finalize(ctx, schema);
|
|
@@ -13172,8 +13172,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13172
13172
|
catch(params) {
|
|
13173
13173
|
return _catch2(this, params);
|
|
13174
13174
|
},
|
|
13175
|
-
pipe(
|
|
13176
|
-
return pipe(this,
|
|
13175
|
+
pipe(target2) {
|
|
13176
|
+
return pipe(this, target2);
|
|
13177
13177
|
},
|
|
13178
13178
|
readonly() {
|
|
13179
13179
|
return readonly(this);
|
|
@@ -15403,15 +15403,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15403
15403
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15404
15404
|
}).strict().superRefine(({ threads }, context) => {
|
|
15405
15405
|
const seen = /* @__PURE__ */ new Set();
|
|
15406
|
-
for (const [index,
|
|
15407
|
-
if (seen.has(
|
|
15406
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15407
|
+
if (seen.has(thread2.threadId)) {
|
|
15408
15408
|
context.addIssue({
|
|
15409
15409
|
code: "custom",
|
|
15410
15410
|
message: "Thread ownership-list results must be unique",
|
|
15411
15411
|
path: ["threads", index, "threadId"]
|
|
15412
15412
|
});
|
|
15413
15413
|
}
|
|
15414
|
-
seen.add(
|
|
15414
|
+
seen.add(thread2.threadId);
|
|
15415
15415
|
}
|
|
15416
15416
|
});
|
|
15417
15417
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -16749,6 +16749,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16749
16749
|
}).strict();
|
|
16750
16750
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16751
16751
|
|
|
16752
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16753
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16754
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16755
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16756
|
+
var thread = { ...target, threadId: identity };
|
|
16757
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16758
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16759
|
+
external_exports.strictObject({
|
|
16760
|
+
kind: external_exports.literal("list"),
|
|
16761
|
+
...target,
|
|
16762
|
+
cursor: external_exports.string().nullable(),
|
|
16763
|
+
archived: external_exports.boolean()
|
|
16764
|
+
}),
|
|
16765
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16766
|
+
external_exports.strictObject({
|
|
16767
|
+
kind: external_exports.literal("prompt"),
|
|
16768
|
+
...thread,
|
|
16769
|
+
epoch: identity,
|
|
16770
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16771
|
+
requestId: identity.optional()
|
|
16772
|
+
}),
|
|
16773
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16774
|
+
external_exports.strictObject({
|
|
16775
|
+
kind: external_exports.literal("rename"),
|
|
16776
|
+
...thread,
|
|
16777
|
+
epoch: identity,
|
|
16778
|
+
name: external_exports.string().min(1).max(512)
|
|
16779
|
+
}),
|
|
16780
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16781
|
+
external_exports.strictObject({
|
|
16782
|
+
kind: external_exports.literal("respond"),
|
|
16783
|
+
...thread,
|
|
16784
|
+
epoch: identity,
|
|
16785
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16786
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16787
|
+
})
|
|
16788
|
+
]);
|
|
16789
|
+
|
|
16752
16790
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16753
16791
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16754
16792
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16769,7 +16807,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16769
16807
|
identity: external_exports.string().max(4096).nullable()
|
|
16770
16808
|
});
|
|
16771
16809
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16810
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16772
16811
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16812
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16773
16813
|
external_exports.strictObject({
|
|
16774
16814
|
action: external_exports.literal("read-thread"),
|
|
16775
16815
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -20694,11 +20734,11 @@ var AgentApp = class {
|
|
|
20694
20734
|
[runAgentConnectHandlers](connection) {
|
|
20695
20735
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20696
20736
|
}
|
|
20697
|
-
connect(
|
|
20698
|
-
return this.connectConnection(
|
|
20737
|
+
connect(target2, options = {}) {
|
|
20738
|
+
return this.connectConnection(target2, options).connection;
|
|
20699
20739
|
}
|
|
20700
|
-
connectWith(
|
|
20701
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20740
|
+
connectWith(target2, op) {
|
|
20741
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20702
20742
|
return rawConnection.runUntil(() => op(connection.client));
|
|
20703
20743
|
}
|
|
20704
20744
|
/**
|
|
@@ -20739,22 +20779,22 @@ var AgentApp = class {
|
|
|
20739
20779
|
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
20740
20780
|
return this;
|
|
20741
20781
|
}
|
|
20742
|
-
connectConnection(
|
|
20743
|
-
if (isStream(
|
|
20744
|
-
const state2 = this.openStreamConnection(
|
|
20782
|
+
connectConnection(target2, options = {}) {
|
|
20783
|
+
if (isStream(target2)) {
|
|
20784
|
+
const state2 = this.openStreamConnection(target2);
|
|
20745
20785
|
if (!options.deferConnectHandlers) {
|
|
20746
20786
|
this[runAgentConnectHandlers](state2.connection);
|
|
20747
20787
|
}
|
|
20748
20788
|
return state2;
|
|
20749
20789
|
}
|
|
20750
20790
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20751
|
-
const peerRawConnection =
|
|
20791
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20752
20792
|
const peerConnection = clientConnection(peerRawConnection);
|
|
20753
20793
|
const state = this.openStreamConnection(thisStream);
|
|
20754
20794
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20755
20795
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20756
20796
|
try {
|
|
20757
|
-
|
|
20797
|
+
target2[runClientConnectHandlers](peerConnection);
|
|
20758
20798
|
this[runAgentConnectHandlers](state.connection);
|
|
20759
20799
|
} catch (error51) {
|
|
20760
20800
|
peerConnection.close(error51);
|
|
@@ -20794,11 +20834,11 @@ var ClientApp = class {
|
|
|
20794
20834
|
[runClientConnectHandlers](connection) {
|
|
20795
20835
|
runConnectHandlers(connection, this.connectHandlers);
|
|
20796
20836
|
}
|
|
20797
|
-
connect(
|
|
20798
|
-
return this.connectConnection(
|
|
20837
|
+
connect(target2) {
|
|
20838
|
+
return this.connectConnection(target2).connection;
|
|
20799
20839
|
}
|
|
20800
|
-
connectWith(
|
|
20801
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
20840
|
+
connectWith(target2, op) {
|
|
20841
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
20802
20842
|
return rawConnection.runUntil(() => op(connection.agent));
|
|
20803
20843
|
}
|
|
20804
20844
|
/**
|
|
@@ -20839,20 +20879,20 @@ var ClientApp = class {
|
|
|
20839
20879
|
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
20840
20880
|
return this;
|
|
20841
20881
|
}
|
|
20842
|
-
connectConnection(
|
|
20843
|
-
if (isStream(
|
|
20844
|
-
const state2 = this.openStreamConnection(
|
|
20882
|
+
connectConnection(target2) {
|
|
20883
|
+
if (isStream(target2)) {
|
|
20884
|
+
const state2 = this.openStreamConnection(target2);
|
|
20845
20885
|
this[runClientConnectHandlers](state2.connection);
|
|
20846
20886
|
return state2;
|
|
20847
20887
|
}
|
|
20848
20888
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
20849
|
-
const peerRawConnection =
|
|
20889
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
20850
20890
|
const peerConnection = agentConnection(peerRawConnection);
|
|
20851
20891
|
const state = this.openStreamConnection(thisStream);
|
|
20852
20892
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
20853
20893
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
20854
20894
|
try {
|
|
20855
|
-
|
|
20895
|
+
target2[runAgentConnectHandlers](peerConnection);
|
|
20856
20896
|
this[runClientConnectHandlers](state.connection);
|
|
20857
20897
|
} catch (error51) {
|
|
20858
20898
|
peerConnection.close(error51);
|