@codexhost/cli-darwin-x64 0.18.0-beta.3 → 0.18.0-beta.5
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 +102 -57
- package/app/console-web.js +168 -123
- package/app/desktop-controller.mjs +292 -117
- package/app/host-runtime.mjs +5875 -3270
- package/app/plugins/antigravity/plugin.mjs +796 -307
- package/app/plugins/claude-code/plugin.mjs +214 -103
- package/app/plugins/codebuddy/plugin.mjs +108 -63
- package/app/plugins/codex-usage/plugin.mjs +94 -49
- package/app/plugins/copilot/plugin.mjs +99 -54
- package/app/plugins/cursor-cli/plugin.mjs +122 -77
- package/app/plugins/deepseek-harness/plugin.mjs +125 -80
- package/app/plugins/devin/plugin.mjs +99 -54
- package/app/plugins/grok/plugin.mjs +105 -60
- package/app/plugins/hermes/plugin.mjs +86 -41
- package/app/plugins/kimi-code/plugin.mjs +103 -58
- package/app/plugins/kiro-cli/plugin.mjs +99 -54
- package/app/plugins/omp/plugin.mjs +90 -45
- package/app/plugins/opencode/plugin.mjs +87 -42
- package/app/plugins/pi/plugin.mjs +103 -58
- package/app/plugins/qoder/plugin.mjs +115 -70
- package/app/plugins/qoder-cn/plugin.mjs +115 -70
- package/app/plugins/qwen-code/plugin.mjs +110 -65
- package/app/plugins/workbuddy/plugin.mjs +108 -63
- package/app/plugins/zcode/plugin.mjs +91 -46
- package/app/renderer-extension.js +362 -299
- package/app/web/assets/index-C0aXz2jD.js +199 -0
- package/app/web/codex-agent.png +0 -0
- package/app/web/codexhost-settings.js +163 -118
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +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-connection/client.js +1 -1
- 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 +63 -63
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +12 -12
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- 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 +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
- 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 +9 -13
- package/app/web/plugins.json +4 -0
- package/app/web/sw.js +1 -6
- package/app/web-modules/server.mjs +2443 -1345
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-aKvkfNJN.js +0 -199
|
@@ -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 text2 = shim.replaceAll("\\", "/").toLowerCase();
|
|
365
|
-
return text2.includes(`%dp0%/${
|
|
365
|
+
return text2.includes(`%dp0%/${target2}"`) || text2.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);
|
|
@@ -1234,8 +1234,8 @@ function defineLazy(object2, key, getter) {
|
|
|
1234
1234
|
function objectClone(obj) {
|
|
1235
1235
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
1236
1236
|
}
|
|
1237
|
-
function assignProp(
|
|
1238
|
-
Object.defineProperty(
|
|
1237
|
+
function assignProp(target2, prop, value) {
|
|
1238
|
+
Object.defineProperty(target2, prop, {
|
|
1239
1239
|
value,
|
|
1240
1240
|
writable: true,
|
|
1241
1241
|
enumerable: true,
|
|
@@ -1418,35 +1418,35 @@ function normalizeParams(_params) {
|
|
|
1418
1418
|
return params;
|
|
1419
1419
|
}
|
|
1420
1420
|
function createTransparentProxy(getter) {
|
|
1421
|
-
let
|
|
1421
|
+
let target2;
|
|
1422
1422
|
return new Proxy({}, {
|
|
1423
1423
|
get(_, prop, receiver) {
|
|
1424
|
-
|
|
1425
|
-
return Reflect.get(
|
|
1424
|
+
target2 ?? (target2 = getter());
|
|
1425
|
+
return Reflect.get(target2, prop, receiver);
|
|
1426
1426
|
},
|
|
1427
1427
|
set(_, prop, value, receiver) {
|
|
1428
|
-
|
|
1429
|
-
return Reflect.set(
|
|
1428
|
+
target2 ?? (target2 = getter());
|
|
1429
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1430
1430
|
},
|
|
1431
1431
|
has(_, prop) {
|
|
1432
|
-
|
|
1433
|
-
return Reflect.has(
|
|
1432
|
+
target2 ?? (target2 = getter());
|
|
1433
|
+
return Reflect.has(target2, prop);
|
|
1434
1434
|
},
|
|
1435
1435
|
deleteProperty(_, prop) {
|
|
1436
|
-
|
|
1437
|
-
return Reflect.deleteProperty(
|
|
1436
|
+
target2 ?? (target2 = getter());
|
|
1437
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1438
1438
|
},
|
|
1439
1439
|
ownKeys(_) {
|
|
1440
|
-
|
|
1441
|
-
return Reflect.ownKeys(
|
|
1440
|
+
target2 ?? (target2 = getter());
|
|
1441
|
+
return Reflect.ownKeys(target2);
|
|
1442
1442
|
},
|
|
1443
1443
|
getOwnPropertyDescriptor(_, prop) {
|
|
1444
|
-
|
|
1445
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1444
|
+
target2 ?? (target2 = getter());
|
|
1445
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1446
1446
|
},
|
|
1447
1447
|
defineProperty(_, prop, descriptor) {
|
|
1448
|
-
|
|
1449
|
-
return Reflect.defineProperty(
|
|
1448
|
+
target2 ?? (target2 = getter());
|
|
1449
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1450
1450
|
}
|
|
1451
1451
|
});
|
|
1452
1452
|
}
|
|
@@ -11898,15 +11898,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11898
11898
|
|
|
11899
11899
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11900
11900
|
function initializeContext(params) {
|
|
11901
|
-
let
|
|
11902
|
-
if (
|
|
11903
|
-
|
|
11904
|
-
if (
|
|
11905
|
-
|
|
11901
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11902
|
+
if (target2 === "draft-4")
|
|
11903
|
+
target2 = "draft-04";
|
|
11904
|
+
if (target2 === "draft-7")
|
|
11905
|
+
target2 = "draft-07";
|
|
11906
11906
|
return {
|
|
11907
11907
|
processors: params.processors ?? {},
|
|
11908
11908
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11909
|
-
target,
|
|
11909
|
+
target: target2,
|
|
11910
11910
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11911
11911
|
override: params?.override ?? (() => {
|
|
11912
11912
|
}),
|
|
@@ -12248,8 +12248,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
12248
12248
|
return finalize(ctx, schema);
|
|
12249
12249
|
};
|
|
12250
12250
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
12251
|
-
const { libraryOptions, target } = params ?? {};
|
|
12252
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
12251
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
12252
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
12253
12253
|
process2(schema, ctx);
|
|
12254
12254
|
extractDefs(ctx, schema);
|
|
12255
12255
|
return finalize(ctx, schema);
|
|
@@ -13308,8 +13308,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13308
13308
|
catch(params) {
|
|
13309
13309
|
return _catch2(this, params);
|
|
13310
13310
|
},
|
|
13311
|
-
pipe(
|
|
13312
|
-
return pipe(this,
|
|
13311
|
+
pipe(target2) {
|
|
13312
|
+
return pipe(this, target2);
|
|
13313
13313
|
},
|
|
13314
13314
|
readonly() {
|
|
13315
13315
|
return readonly(this);
|
|
@@ -15539,15 +15539,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15539
15539
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15540
15540
|
}).strict().superRefine(({ threads }, context) => {
|
|
15541
15541
|
const seen = /* @__PURE__ */ new Set();
|
|
15542
|
-
for (const [index,
|
|
15543
|
-
if (seen.has(
|
|
15542
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15543
|
+
if (seen.has(thread2.threadId)) {
|
|
15544
15544
|
context.addIssue({
|
|
15545
15545
|
code: "custom",
|
|
15546
15546
|
message: "Thread ownership-list results must be unique",
|
|
15547
15547
|
path: ["threads", index, "threadId"]
|
|
15548
15548
|
});
|
|
15549
15549
|
}
|
|
15550
|
-
seen.add(
|
|
15550
|
+
seen.add(thread2.threadId);
|
|
15551
15551
|
}
|
|
15552
15552
|
});
|
|
15553
15553
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -15756,13 +15756,18 @@ var clientChannelResponseSchema = external_exports.object({
|
|
|
15756
15756
|
});
|
|
15757
15757
|
|
|
15758
15758
|
// ../../shared-contracts/dist/thread-catalog.js
|
|
15759
|
-
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15759
|
+
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15760
|
+
includeArchived: external_exports.boolean().optional(),
|
|
15761
|
+
/** Absent means first page; null means this branch is exhausted. Native cursors only. */
|
|
15762
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15763
|
+
}).strict();
|
|
15760
15764
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
15761
15765
|
threads: external_exports.array(jsonObjectSchema),
|
|
15762
15766
|
ownership: external_exports.array(threadOwnershipSchema),
|
|
15763
15767
|
/** Known archived IDs, including visible local external records even when their rows are
|
|
15764
|
-
* excluded. Native archived IDs
|
|
15765
|
-
archivedThreadIds: external_exports.array(hostThreadIdSchema)
|
|
15768
|
+
* excluded. Native archived IDs describe only the returned page, never a complete set. */
|
|
15769
|
+
archivedThreadIds: external_exports.array(hostThreadIdSchema),
|
|
15770
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15766
15771
|
}).strict();
|
|
15767
15772
|
|
|
15768
15773
|
// ../../shared-contracts/dist/voice.js
|
|
@@ -15977,7 +15982,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
|
15977
15982
|
});
|
|
15978
15983
|
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
15979
15984
|
enabled: false,
|
|
15980
|
-
timeoutMinutes:
|
|
15985
|
+
timeoutMinutes: 10
|
|
15981
15986
|
});
|
|
15982
15987
|
|
|
15983
15988
|
// ../../shared-contracts/dist/harness-preferences.js
|
|
@@ -16880,6 +16885,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16880
16885
|
}).strict();
|
|
16881
16886
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16882
16887
|
|
|
16888
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16889
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16890
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16891
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16892
|
+
var thread = { ...target, threadId: identity };
|
|
16893
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16894
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16895
|
+
external_exports.strictObject({
|
|
16896
|
+
kind: external_exports.literal("list"),
|
|
16897
|
+
...target,
|
|
16898
|
+
cursor: external_exports.string().nullable(),
|
|
16899
|
+
archived: external_exports.boolean()
|
|
16900
|
+
}),
|
|
16901
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16902
|
+
external_exports.strictObject({
|
|
16903
|
+
kind: external_exports.literal("prompt"),
|
|
16904
|
+
...thread,
|
|
16905
|
+
epoch: identity,
|
|
16906
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16907
|
+
requestId: identity.optional()
|
|
16908
|
+
}),
|
|
16909
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16910
|
+
external_exports.strictObject({
|
|
16911
|
+
kind: external_exports.literal("rename"),
|
|
16912
|
+
...thread,
|
|
16913
|
+
epoch: identity,
|
|
16914
|
+
name: external_exports.string().min(1).max(512)
|
|
16915
|
+
}),
|
|
16916
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16917
|
+
external_exports.strictObject({
|
|
16918
|
+
kind: external_exports.literal("respond"),
|
|
16919
|
+
...thread,
|
|
16920
|
+
epoch: identity,
|
|
16921
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16922
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16923
|
+
})
|
|
16924
|
+
]);
|
|
16925
|
+
|
|
16883
16926
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16884
16927
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16885
16928
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16900,7 +16943,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16900
16943
|
identity: external_exports.string().max(4096).nullable()
|
|
16901
16944
|
});
|
|
16902
16945
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16946
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16903
16947
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16948
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16904
16949
|
external_exports.strictObject({
|
|
16905
16950
|
action: external_exports.literal("read-thread"),
|
|
16906
16951
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -22590,11 +22635,11 @@ var AgentApp = class {
|
|
|
22590
22635
|
[runAgentConnectHandlers](connection) {
|
|
22591
22636
|
runConnectHandlers(connection, this.connectHandlers);
|
|
22592
22637
|
}
|
|
22593
|
-
connect(
|
|
22594
|
-
return this.connectConnection(
|
|
22638
|
+
connect(target2, options = {}) {
|
|
22639
|
+
return this.connectConnection(target2, options).connection;
|
|
22595
22640
|
}
|
|
22596
|
-
connectWith(
|
|
22597
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
22641
|
+
connectWith(target2, op) {
|
|
22642
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
22598
22643
|
return rawConnection.runUntil(() => op(connection.client));
|
|
22599
22644
|
}
|
|
22600
22645
|
/**
|
|
@@ -22635,22 +22680,22 @@ var AgentApp = class {
|
|
|
22635
22680
|
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
22636
22681
|
return this;
|
|
22637
22682
|
}
|
|
22638
|
-
connectConnection(
|
|
22639
|
-
if (isStream(
|
|
22640
|
-
const state2 = this.openStreamConnection(
|
|
22683
|
+
connectConnection(target2, options = {}) {
|
|
22684
|
+
if (isStream(target2)) {
|
|
22685
|
+
const state2 = this.openStreamConnection(target2);
|
|
22641
22686
|
if (!options.deferConnectHandlers) {
|
|
22642
22687
|
this[runAgentConnectHandlers](state2.connection);
|
|
22643
22688
|
}
|
|
22644
22689
|
return state2;
|
|
22645
22690
|
}
|
|
22646
22691
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
22647
|
-
const peerRawConnection =
|
|
22692
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
22648
22693
|
const peerConnection = clientConnection(peerRawConnection);
|
|
22649
22694
|
const state = this.openStreamConnection(thisStream);
|
|
22650
22695
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
22651
22696
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
22652
22697
|
try {
|
|
22653
|
-
|
|
22698
|
+
target2[runClientConnectHandlers](peerConnection);
|
|
22654
22699
|
this[runAgentConnectHandlers](state.connection);
|
|
22655
22700
|
} catch (error51) {
|
|
22656
22701
|
peerConnection.close(error51);
|
|
@@ -22690,11 +22735,11 @@ var ClientApp = class {
|
|
|
22690
22735
|
[runClientConnectHandlers](connection) {
|
|
22691
22736
|
runConnectHandlers(connection, this.connectHandlers);
|
|
22692
22737
|
}
|
|
22693
|
-
connect(
|
|
22694
|
-
return this.connectConnection(
|
|
22738
|
+
connect(target2) {
|
|
22739
|
+
return this.connectConnection(target2).connection;
|
|
22695
22740
|
}
|
|
22696
|
-
connectWith(
|
|
22697
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
22741
|
+
connectWith(target2, op) {
|
|
22742
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
22698
22743
|
return rawConnection.runUntil(() => op(connection.agent));
|
|
22699
22744
|
}
|
|
22700
22745
|
/**
|
|
@@ -22735,20 +22780,20 @@ var ClientApp = class {
|
|
|
22735
22780
|
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
22736
22781
|
return this;
|
|
22737
22782
|
}
|
|
22738
|
-
connectConnection(
|
|
22739
|
-
if (isStream(
|
|
22740
|
-
const state2 = this.openStreamConnection(
|
|
22783
|
+
connectConnection(target2) {
|
|
22784
|
+
if (isStream(target2)) {
|
|
22785
|
+
const state2 = this.openStreamConnection(target2);
|
|
22741
22786
|
this[runClientConnectHandlers](state2.connection);
|
|
22742
22787
|
return state2;
|
|
22743
22788
|
}
|
|
22744
22789
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
22745
|
-
const peerRawConnection =
|
|
22790
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
22746
22791
|
const peerConnection = agentConnection(peerRawConnection);
|
|
22747
22792
|
const state = this.openStreamConnection(thisStream);
|
|
22748
22793
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
22749
22794
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
22750
22795
|
try {
|
|
22751
|
-
|
|
22796
|
+
target2[runAgentConnectHandlers](peerConnection);
|
|
22752
22797
|
this[runClientConnectHandlers](state.connection);
|
|
22753
22798
|
} catch (error51) {
|
|
22754
22799
|
peerConnection.close(error51);
|
|
@@ -23629,7 +23674,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
|
|
|
23629
23674
|
throw new CodeBuddyError("protocolError", "Inherited Subagent identity changed");
|
|
23630
23675
|
inheritedEntries = prefixParsed.entries;
|
|
23631
23676
|
}
|
|
23632
|
-
const
|
|
23677
|
+
const target2 = await realpath4(cwd);
|
|
23633
23678
|
const inheritedCwds = inheritedEntries.flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
|
|
23634
23679
|
const suffixCwds = parsed.entries.slice(inheritedEntries.length).flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
|
|
23635
23680
|
const canonical = await canonicalCwds(suffixCwds);
|
|
@@ -23641,7 +23686,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
|
|
|
23641
23686
|
}
|
|
23642
23687
|
for (const value of suffixCwds) {
|
|
23643
23688
|
const actual = canonical.get(value);
|
|
23644
|
-
if (!actual || !equalPath(actual,
|
|
23689
|
+
if (!actual || !equalPath(actual, target2))
|
|
23645
23690
|
throw new CodeBuddyError("invalidRequest", "Subagent workspace differs from parent");
|
|
23646
23691
|
}
|
|
23647
23692
|
const bindings = new Map((inherited?.workspaceBindings ?? []).map((binding) => [
|
|
@@ -26435,15 +26480,15 @@ async function startBrokerLaunchAgent(harnessId, environment) {
|
|
|
26435
26480
|
const uid = process.getuid?.();
|
|
26436
26481
|
if (uid === void 0)
|
|
26437
26482
|
return;
|
|
26438
|
-
const
|
|
26439
|
-
if (await runLaunchctl(["kickstart",
|
|
26483
|
+
const target2 = `gui/${uid}/${harnessBrokerLaunchAgentLabel(harnessId)}`;
|
|
26484
|
+
if (await runLaunchctl(["kickstart", target2]))
|
|
26440
26485
|
return;
|
|
26441
26486
|
await runLaunchctl([
|
|
26442
26487
|
"bootstrap",
|
|
26443
26488
|
`gui/${uid}`,
|
|
26444
26489
|
harnessBrokerLaunchAgentPlistPath(environment, harnessId)
|
|
26445
26490
|
]);
|
|
26446
|
-
await runLaunchctl(["kickstart",
|
|
26491
|
+
await runLaunchctl(["kickstart", target2]);
|
|
26447
26492
|
}
|
|
26448
26493
|
var BrokerConnection = class _BrokerConnection {
|
|
26449
26494
|
#onClose;
|
|
@@ -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
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
@@ -752,8 +752,8 @@ function defineLazy(object3, key2, getter) {
|
|
|
752
752
|
function objectClone(obj) {
|
|
753
753
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
754
754
|
}
|
|
755
|
-
function assignProp(
|
|
756
|
-
Object.defineProperty(
|
|
755
|
+
function assignProp(target2, prop, value) {
|
|
756
|
+
Object.defineProperty(target2, prop, {
|
|
757
757
|
value,
|
|
758
758
|
writable: true,
|
|
759
759
|
enumerable: true,
|
|
@@ -936,35 +936,35 @@ function normalizeParams(_params) {
|
|
|
936
936
|
return params;
|
|
937
937
|
}
|
|
938
938
|
function createTransparentProxy(getter) {
|
|
939
|
-
let
|
|
939
|
+
let target2;
|
|
940
940
|
return new Proxy({}, {
|
|
941
941
|
get(_, prop, receiver) {
|
|
942
|
-
|
|
943
|
-
return Reflect.get(
|
|
942
|
+
target2 ?? (target2 = getter());
|
|
943
|
+
return Reflect.get(target2, prop, receiver);
|
|
944
944
|
},
|
|
945
945
|
set(_, prop, value, receiver) {
|
|
946
|
-
|
|
947
|
-
return Reflect.set(
|
|
946
|
+
target2 ?? (target2 = getter());
|
|
947
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
948
948
|
},
|
|
949
949
|
has(_, prop) {
|
|
950
|
-
|
|
951
|
-
return Reflect.has(
|
|
950
|
+
target2 ?? (target2 = getter());
|
|
951
|
+
return Reflect.has(target2, prop);
|
|
952
952
|
},
|
|
953
953
|
deleteProperty(_, prop) {
|
|
954
|
-
|
|
955
|
-
return Reflect.deleteProperty(
|
|
954
|
+
target2 ?? (target2 = getter());
|
|
955
|
+
return Reflect.deleteProperty(target2, prop);
|
|
956
956
|
},
|
|
957
957
|
ownKeys(_) {
|
|
958
|
-
|
|
959
|
-
return Reflect.ownKeys(
|
|
958
|
+
target2 ?? (target2 = getter());
|
|
959
|
+
return Reflect.ownKeys(target2);
|
|
960
960
|
},
|
|
961
961
|
getOwnPropertyDescriptor(_, prop) {
|
|
962
|
-
|
|
963
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
962
|
+
target2 ?? (target2 = getter());
|
|
963
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
964
964
|
},
|
|
965
965
|
defineProperty(_, prop, descriptor) {
|
|
966
|
-
|
|
967
|
-
return Reflect.defineProperty(
|
|
966
|
+
target2 ?? (target2 = getter());
|
|
967
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
968
968
|
}
|
|
969
969
|
});
|
|
970
970
|
}
|
|
@@ -11416,15 +11416,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11416
11416
|
|
|
11417
11417
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11418
11418
|
function initializeContext(params) {
|
|
11419
|
-
let
|
|
11420
|
-
if (
|
|
11421
|
-
|
|
11422
|
-
if (
|
|
11423
|
-
|
|
11419
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11420
|
+
if (target2 === "draft-4")
|
|
11421
|
+
target2 = "draft-04";
|
|
11422
|
+
if (target2 === "draft-7")
|
|
11423
|
+
target2 = "draft-07";
|
|
11424
11424
|
return {
|
|
11425
11425
|
processors: params.processors ?? {},
|
|
11426
11426
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11427
|
-
target,
|
|
11427
|
+
target: target2,
|
|
11428
11428
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11429
11429
|
override: params?.override ?? (() => {
|
|
11430
11430
|
}),
|
|
@@ -11766,8 +11766,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
11766
11766
|
return finalize(ctx, schema);
|
|
11767
11767
|
};
|
|
11768
11768
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
11769
|
-
const { libraryOptions, target } = params ?? {};
|
|
11770
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
11769
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
11770
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
11771
11771
|
process(schema, ctx);
|
|
11772
11772
|
extractDefs(ctx, schema);
|
|
11773
11773
|
return finalize(ctx, schema);
|
|
@@ -12826,8 +12826,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12826
12826
|
catch(params) {
|
|
12827
12827
|
return _catch2(this, params);
|
|
12828
12828
|
},
|
|
12829
|
-
pipe(
|
|
12830
|
-
return pipe(this,
|
|
12829
|
+
pipe(target2) {
|
|
12830
|
+
return pipe(this, target2);
|
|
12831
12831
|
},
|
|
12832
12832
|
readonly() {
|
|
12833
12833
|
return readonly(this);
|
|
@@ -15057,15 +15057,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15057
15057
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15058
15058
|
}).strict().superRefine(({ threads }, context) => {
|
|
15059
15059
|
const seen = /* @__PURE__ */ new Set();
|
|
15060
|
-
for (const [index,
|
|
15061
|
-
if (seen.has(
|
|
15060
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15061
|
+
if (seen.has(thread2.threadId)) {
|
|
15062
15062
|
context.addIssue({
|
|
15063
15063
|
code: "custom",
|
|
15064
15064
|
message: "Thread ownership-list results must be unique",
|
|
15065
15065
|
path: ["threads", index, "threadId"]
|
|
15066
15066
|
});
|
|
15067
15067
|
}
|
|
15068
|
-
seen.add(
|
|
15068
|
+
seen.add(thread2.threadId);
|
|
15069
15069
|
}
|
|
15070
15070
|
});
|
|
15071
15071
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -15274,13 +15274,18 @@ var clientChannelResponseSchema = external_exports.object({
|
|
|
15274
15274
|
});
|
|
15275
15275
|
|
|
15276
15276
|
// ../../shared-contracts/dist/thread-catalog.js
|
|
15277
|
-
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15277
|
+
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15278
|
+
includeArchived: external_exports.boolean().optional(),
|
|
15279
|
+
/** Absent means first page; null means this branch is exhausted. Native cursors only. */
|
|
15280
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15281
|
+
}).strict();
|
|
15278
15282
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
15279
15283
|
threads: external_exports.array(jsonObjectSchema),
|
|
15280
15284
|
ownership: external_exports.array(threadOwnershipSchema),
|
|
15281
15285
|
/** Known archived IDs, including visible local external records even when their rows are
|
|
15282
|
-
* excluded. Native archived IDs
|
|
15283
|
-
archivedThreadIds: external_exports.array(hostThreadIdSchema)
|
|
15286
|
+
* excluded. Native archived IDs describe only the returned page, never a complete set. */
|
|
15287
|
+
archivedThreadIds: external_exports.array(hostThreadIdSchema),
|
|
15288
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15284
15289
|
}).strict();
|
|
15285
15290
|
|
|
15286
15291
|
// ../../shared-contracts/dist/voice.js
|
|
@@ -15495,7 +15500,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
|
15495
15500
|
});
|
|
15496
15501
|
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
15497
15502
|
enabled: false,
|
|
15498
|
-
timeoutMinutes:
|
|
15503
|
+
timeoutMinutes: 10
|
|
15499
15504
|
});
|
|
15500
15505
|
|
|
15501
15506
|
// ../../shared-contracts/dist/harness-preferences.js
|
|
@@ -16393,6 +16398,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16393
16398
|
}).strict();
|
|
16394
16399
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16395
16400
|
|
|
16401
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16402
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16403
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16404
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16405
|
+
var thread = { ...target, threadId: identity };
|
|
16406
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16407
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16408
|
+
external_exports.strictObject({
|
|
16409
|
+
kind: external_exports.literal("list"),
|
|
16410
|
+
...target,
|
|
16411
|
+
cursor: external_exports.string().nullable(),
|
|
16412
|
+
archived: external_exports.boolean()
|
|
16413
|
+
}),
|
|
16414
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16415
|
+
external_exports.strictObject({
|
|
16416
|
+
kind: external_exports.literal("prompt"),
|
|
16417
|
+
...thread,
|
|
16418
|
+
epoch: identity,
|
|
16419
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16420
|
+
requestId: identity.optional()
|
|
16421
|
+
}),
|
|
16422
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16423
|
+
external_exports.strictObject({
|
|
16424
|
+
kind: external_exports.literal("rename"),
|
|
16425
|
+
...thread,
|
|
16426
|
+
epoch: identity,
|
|
16427
|
+
name: external_exports.string().min(1).max(512)
|
|
16428
|
+
}),
|
|
16429
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16430
|
+
external_exports.strictObject({
|
|
16431
|
+
kind: external_exports.literal("respond"),
|
|
16432
|
+
...thread,
|
|
16433
|
+
epoch: identity,
|
|
16434
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16435
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16436
|
+
})
|
|
16437
|
+
]);
|
|
16438
|
+
|
|
16396
16439
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16397
16440
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16398
16441
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16413,7 +16456,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16413
16456
|
identity: external_exports.string().max(4096).nullable()
|
|
16414
16457
|
});
|
|
16415
16458
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16459
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16416
16460
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16461
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16417
16462
|
external_exports.strictObject({
|
|
16418
16463
|
action: external_exports.literal("read-thread"),
|
|
16419
16464
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -16727,10 +16772,10 @@ var CodexCounters = class {
|
|
|
16727
16772
|
if (model2 && this.#turn)
|
|
16728
16773
|
this.#models.set(this.#turn, model2);
|
|
16729
16774
|
}
|
|
16730
|
-
snapshot(at,
|
|
16775
|
+
snapshot(at, thread2, payload) {
|
|
16731
16776
|
if (payload.history_mode === "paginated" && !payload.history_base && typeof payload.subagent_history_start_ordinal === "number" && payload.subagent_history_start_ordinal > 0) {
|
|
16732
16777
|
this.#snapshotAt = at;
|
|
16733
|
-
this.#snapshotThread =
|
|
16778
|
+
this.#snapshotThread = thread2;
|
|
16734
16779
|
}
|
|
16735
16780
|
}
|
|
16736
16781
|
#align(at, total, last) {
|
|
@@ -17275,7 +17320,7 @@ async function readThreadNames(home, signal) {
|
|
|
17275
17320
|
}
|
|
17276
17321
|
return names;
|
|
17277
17322
|
}
|
|
17278
|
-
async function readCodexRollouts(files,
|
|
17323
|
+
async function readCodexRollouts(files, thread2, signal, options = {}) {
|
|
17279
17324
|
const counters = new CodexCounters();
|
|
17280
17325
|
let model2 = "", cwd = "", ownFrom = null, firstMeta = false, forkAt = 0, seen = 0, firstPrompt;
|
|
17281
17326
|
let lastOrdinal = -1;
|
|
@@ -17319,7 +17364,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17319
17364
|
switch (row.type) {
|
|
17320
17365
|
case "session_meta": {
|
|
17321
17366
|
if (!firstMeta) {
|
|
17322
|
-
if (text(p.id) !==
|
|
17367
|
+
if (text(p.id) !== thread2)
|
|
17323
17368
|
throw new Error("Codex rollout identity does not match its source");
|
|
17324
17369
|
if (p.forked_from_id || p.parent_thread_id || p.subagent_history_start_ordinal || object2(p.history_base)) {
|
|
17325
17370
|
forkAt = nativeTimeMs(p.timestamp) ?? at;
|
|
@@ -17402,7 +17447,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17402
17447
|
return counters.entries.flatMap((v, index) => {
|
|
17403
17448
|
if (ownFrom !== null && index < ownFrom)
|
|
17404
17449
|
return [];
|
|
17405
|
-
if (v.thread && v.thread !==
|
|
17450
|
+
if (v.thread && v.thread !== thread2 || !v.thread && forkAt && v.at < forkAt)
|
|
17406
17451
|
return [];
|
|
17407
17452
|
const [input, output, cached2, written, reasoning] = v.usage.values;
|
|
17408
17453
|
const id = v.response ? `${v.session}:${v.response}` : `legacy:${createHash("sha256").update(JSON.stringify([v.session, v.turn, v.epoch, v.at, v.total?.values, v.usage.values])).digest("hex")}`;
|
|
@@ -17416,7 +17461,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17416
17461
|
...v.usage.known & 8 ? { cacheWriteInputTokens: written } : {},
|
|
17417
17462
|
...v.usage.known & 16 ? { reasoningOutputTokens: reasoning } : {}
|
|
17418
17463
|
});
|
|
17419
|
-
return entry ? [withUsageSession(entry, { sessionId:
|
|
17464
|
+
return entry ? [withUsageSession(entry, { sessionId: thread2, cwd, title: firstPrompt })] : [];
|
|
17420
17465
|
});
|
|
17421
17466
|
}
|
|
17422
17467
|
function createCodexUsageStatistics(environment, options = {}) {
|
|
@@ -17449,12 +17494,12 @@ function createCodexUsageStatistics(environment, options = {}) {
|
|
|
17449
17494
|
await visit(file2, depth + 1);
|
|
17450
17495
|
if (!entry.isFile())
|
|
17451
17496
|
continue;
|
|
17452
|
-
const
|
|
17453
|
-
if (!
|
|
17497
|
+
const thread2 = ROLLOUT.exec(entry.name)?.[1];
|
|
17498
|
+
if (!thread2 || options.sessionId && thread2 !== options.sessionId)
|
|
17454
17499
|
continue;
|
|
17455
|
-
const list = found.get(
|
|
17500
|
+
const list = found.get(thread2) ?? [];
|
|
17456
17501
|
list.push({ file: file2, fingerprint: await stamp(file2) });
|
|
17457
|
-
found.set(
|
|
17502
|
+
found.set(thread2, list);
|
|
17458
17503
|
}
|
|
17459
17504
|
}
|
|
17460
17505
|
await visit(path.join(home, "sessions"), 0);
|
|
@@ -17462,10 +17507,10 @@ function createCodexUsageStatistics(environment, options = {}) {
|
|
|
17462
17507
|
const indexStamp = options.sessionId ? "" : await stamp(path.join(home, "session_index.jsonl")).catch(() => "-");
|
|
17463
17508
|
const result = [];
|
|
17464
17509
|
groups.clear();
|
|
17465
|
-
for (const [
|
|
17510
|
+
for (const [thread2, files] of found) {
|
|
17466
17511
|
files.sort((a, b) => path.basename(a.file).localeCompare(path.basename(b.file)) || a.file.localeCompare(b.file));
|
|
17467
|
-
const id = path.join(home, `usage-thread-${
|
|
17468
|
-
groups.set(id, { thread, files });
|
|
17512
|
+
const id = path.join(home, `usage-thread-${thread2}`);
|
|
17513
|
+
groups.set(id, { thread: thread2, files });
|
|
17469
17514
|
result.push({ id, fingerprint: fingerprint(files, indexStamp) });
|
|
17470
17515
|
}
|
|
17471
17516
|
return result;
|