@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
|
@@ -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-broker/dist/client.js
|
|
@@ -758,8 +758,8 @@ function defineLazy(object2, key, getter) {
|
|
|
758
758
|
function objectClone(obj) {
|
|
759
759
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
760
760
|
}
|
|
761
|
-
function assignProp(
|
|
762
|
-
Object.defineProperty(
|
|
761
|
+
function assignProp(target2, prop, value) {
|
|
762
|
+
Object.defineProperty(target2, prop, {
|
|
763
763
|
value,
|
|
764
764
|
writable: true,
|
|
765
765
|
enumerable: true,
|
|
@@ -942,35 +942,35 @@ function normalizeParams(_params) {
|
|
|
942
942
|
return params;
|
|
943
943
|
}
|
|
944
944
|
function createTransparentProxy(getter) {
|
|
945
|
-
let
|
|
945
|
+
let target2;
|
|
946
946
|
return new Proxy({}, {
|
|
947
947
|
get(_, prop, receiver) {
|
|
948
|
-
|
|
949
|
-
return Reflect.get(
|
|
948
|
+
target2 ?? (target2 = getter());
|
|
949
|
+
return Reflect.get(target2, prop, receiver);
|
|
950
950
|
},
|
|
951
951
|
set(_, prop, value, receiver) {
|
|
952
|
-
|
|
953
|
-
return Reflect.set(
|
|
952
|
+
target2 ?? (target2 = getter());
|
|
953
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
954
954
|
},
|
|
955
955
|
has(_, prop) {
|
|
956
|
-
|
|
957
|
-
return Reflect.has(
|
|
956
|
+
target2 ?? (target2 = getter());
|
|
957
|
+
return Reflect.has(target2, prop);
|
|
958
958
|
},
|
|
959
959
|
deleteProperty(_, prop) {
|
|
960
|
-
|
|
961
|
-
return Reflect.deleteProperty(
|
|
960
|
+
target2 ?? (target2 = getter());
|
|
961
|
+
return Reflect.deleteProperty(target2, prop);
|
|
962
962
|
},
|
|
963
963
|
ownKeys(_) {
|
|
964
|
-
|
|
965
|
-
return Reflect.ownKeys(
|
|
964
|
+
target2 ?? (target2 = getter());
|
|
965
|
+
return Reflect.ownKeys(target2);
|
|
966
966
|
},
|
|
967
967
|
getOwnPropertyDescriptor(_, prop) {
|
|
968
|
-
|
|
969
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
968
|
+
target2 ?? (target2 = getter());
|
|
969
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
970
970
|
},
|
|
971
971
|
defineProperty(_, prop, descriptor) {
|
|
972
|
-
|
|
973
|
-
return Reflect.defineProperty(
|
|
972
|
+
target2 ?? (target2 = getter());
|
|
973
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
}
|
|
@@ -11422,15 +11422,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11422
11422
|
|
|
11423
11423
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11424
11424
|
function initializeContext(params) {
|
|
11425
|
-
let
|
|
11426
|
-
if (
|
|
11427
|
-
|
|
11428
|
-
if (
|
|
11429
|
-
|
|
11425
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11426
|
+
if (target2 === "draft-4")
|
|
11427
|
+
target2 = "draft-04";
|
|
11428
|
+
if (target2 === "draft-7")
|
|
11429
|
+
target2 = "draft-07";
|
|
11430
11430
|
return {
|
|
11431
11431
|
processors: params.processors ?? {},
|
|
11432
11432
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11433
|
-
target,
|
|
11433
|
+
target: target2,
|
|
11434
11434
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11435
11435
|
override: params?.override ?? (() => {
|
|
11436
11436
|
}),
|
|
@@ -11772,8 +11772,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
11772
11772
|
return finalize(ctx, schema);
|
|
11773
11773
|
};
|
|
11774
11774
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
11775
|
-
const { libraryOptions, target } = params ?? {};
|
|
11776
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
11775
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
11776
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
11777
11777
|
process2(schema, ctx);
|
|
11778
11778
|
extractDefs(ctx, schema);
|
|
11779
11779
|
return finalize(ctx, schema);
|
|
@@ -12832,8 +12832,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12832
12832
|
catch(params) {
|
|
12833
12833
|
return _catch2(this, params);
|
|
12834
12834
|
},
|
|
12835
|
-
pipe(
|
|
12836
|
-
return pipe(this,
|
|
12835
|
+
pipe(target2) {
|
|
12836
|
+
return pipe(this, target2);
|
|
12837
12837
|
},
|
|
12838
12838
|
readonly() {
|
|
12839
12839
|
return readonly(this);
|
|
@@ -15063,15 +15063,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15063
15063
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15064
15064
|
}).strict().superRefine(({ threads }, context) => {
|
|
15065
15065
|
const seen = /* @__PURE__ */ new Set();
|
|
15066
|
-
for (const [index,
|
|
15067
|
-
if (seen.has(
|
|
15066
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15067
|
+
if (seen.has(thread2.threadId)) {
|
|
15068
15068
|
context.addIssue({
|
|
15069
15069
|
code: "custom",
|
|
15070
15070
|
message: "Thread ownership-list results must be unique",
|
|
15071
15071
|
path: ["threads", index, "threadId"]
|
|
15072
15072
|
});
|
|
15073
15073
|
}
|
|
15074
|
-
seen.add(
|
|
15074
|
+
seen.add(thread2.threadId);
|
|
15075
15075
|
}
|
|
15076
15076
|
});
|
|
15077
15077
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -16409,6 +16409,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16409
16409
|
}).strict();
|
|
16410
16410
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16411
16411
|
|
|
16412
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16413
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16414
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16415
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16416
|
+
var thread = { ...target, threadId: identity };
|
|
16417
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16418
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16419
|
+
external_exports.strictObject({
|
|
16420
|
+
kind: external_exports.literal("list"),
|
|
16421
|
+
...target,
|
|
16422
|
+
cursor: external_exports.string().nullable(),
|
|
16423
|
+
archived: external_exports.boolean()
|
|
16424
|
+
}),
|
|
16425
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16426
|
+
external_exports.strictObject({
|
|
16427
|
+
kind: external_exports.literal("prompt"),
|
|
16428
|
+
...thread,
|
|
16429
|
+
epoch: identity,
|
|
16430
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16431
|
+
requestId: identity.optional()
|
|
16432
|
+
}),
|
|
16433
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16434
|
+
external_exports.strictObject({
|
|
16435
|
+
kind: external_exports.literal("rename"),
|
|
16436
|
+
...thread,
|
|
16437
|
+
epoch: identity,
|
|
16438
|
+
name: external_exports.string().min(1).max(512)
|
|
16439
|
+
}),
|
|
16440
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16441
|
+
external_exports.strictObject({
|
|
16442
|
+
kind: external_exports.literal("respond"),
|
|
16443
|
+
...thread,
|
|
16444
|
+
epoch: identity,
|
|
16445
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16446
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16447
|
+
})
|
|
16448
|
+
]);
|
|
16449
|
+
|
|
16412
16450
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16413
16451
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16414
16452
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16429,7 +16467,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16429
16467
|
identity: external_exports.string().max(4096).nullable()
|
|
16430
16468
|
});
|
|
16431
16469
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16470
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16432
16471
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16472
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16433
16473
|
external_exports.strictObject({
|
|
16434
16474
|
action: external_exports.literal("read-thread"),
|
|
16435
16475
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -17491,15 +17531,15 @@ async function startBrokerLaunchAgent(harnessId, environment) {
|
|
|
17491
17531
|
const uid = process.getuid?.();
|
|
17492
17532
|
if (uid === void 0)
|
|
17493
17533
|
return;
|
|
17494
|
-
const
|
|
17495
|
-
if (await runLaunchctl(["kickstart",
|
|
17534
|
+
const target2 = `gui/${uid}/${harnessBrokerLaunchAgentLabel(harnessId)}`;
|
|
17535
|
+
if (await runLaunchctl(["kickstart", target2]))
|
|
17496
17536
|
return;
|
|
17497
17537
|
await runLaunchctl([
|
|
17498
17538
|
"bootstrap",
|
|
17499
17539
|
`gui/${uid}`,
|
|
17500
17540
|
harnessBrokerLaunchAgentPlistPath(environment, harnessId)
|
|
17501
17541
|
]);
|
|
17502
|
-
await runLaunchctl(["kickstart",
|
|
17542
|
+
await runLaunchctl(["kickstart", target2]);
|
|
17503
17543
|
}
|
|
17504
17544
|
var BrokerConnection = class _BrokerConnection {
|
|
17505
17545
|
#onClose;
|
|
@@ -23293,11 +23333,11 @@ var AgentApp = class {
|
|
|
23293
23333
|
[runAgentConnectHandlers](connection) {
|
|
23294
23334
|
runConnectHandlers(connection, this.connectHandlers);
|
|
23295
23335
|
}
|
|
23296
|
-
connect(
|
|
23297
|
-
return this.connectConnection(
|
|
23336
|
+
connect(target2, options = {}) {
|
|
23337
|
+
return this.connectConnection(target2, options).connection;
|
|
23298
23338
|
}
|
|
23299
|
-
connectWith(
|
|
23300
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
23339
|
+
connectWith(target2, op) {
|
|
23340
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
23301
23341
|
return rawConnection.runUntil(() => op(connection.client));
|
|
23302
23342
|
}
|
|
23303
23343
|
/**
|
|
@@ -23338,22 +23378,22 @@ var AgentApp = class {
|
|
|
23338
23378
|
registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
|
|
23339
23379
|
return this;
|
|
23340
23380
|
}
|
|
23341
|
-
connectConnection(
|
|
23342
|
-
if (isStream(
|
|
23343
|
-
const state2 = this.openStreamConnection(
|
|
23381
|
+
connectConnection(target2, options = {}) {
|
|
23382
|
+
if (isStream(target2)) {
|
|
23383
|
+
const state2 = this.openStreamConnection(target2);
|
|
23344
23384
|
if (!options.deferConnectHandlers) {
|
|
23345
23385
|
this[runAgentConnectHandlers](state2.connection);
|
|
23346
23386
|
}
|
|
23347
23387
|
return state2;
|
|
23348
23388
|
}
|
|
23349
23389
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
23350
|
-
const peerRawConnection =
|
|
23390
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
23351
23391
|
const peerConnection = clientConnection(peerRawConnection);
|
|
23352
23392
|
const state = this.openStreamConnection(thisStream);
|
|
23353
23393
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
23354
23394
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
23355
23395
|
try {
|
|
23356
|
-
|
|
23396
|
+
target2[runClientConnectHandlers](peerConnection);
|
|
23357
23397
|
this[runAgentConnectHandlers](state.connection);
|
|
23358
23398
|
} catch (error51) {
|
|
23359
23399
|
peerConnection.close(error51);
|
|
@@ -23393,11 +23433,11 @@ var ClientApp = class {
|
|
|
23393
23433
|
[runClientConnectHandlers](connection) {
|
|
23394
23434
|
runConnectHandlers(connection, this.connectHandlers);
|
|
23395
23435
|
}
|
|
23396
|
-
connect(
|
|
23397
|
-
return this.connectConnection(
|
|
23436
|
+
connect(target2) {
|
|
23437
|
+
return this.connectConnection(target2).connection;
|
|
23398
23438
|
}
|
|
23399
|
-
connectWith(
|
|
23400
|
-
const { rawConnection, connection } = this.connectConnection(
|
|
23439
|
+
connectWith(target2, op) {
|
|
23440
|
+
const { rawConnection, connection } = this.connectConnection(target2);
|
|
23401
23441
|
return rawConnection.runUntil(() => op(connection.agent));
|
|
23402
23442
|
}
|
|
23403
23443
|
/**
|
|
@@ -23438,20 +23478,20 @@ var ClientApp = class {
|
|
|
23438
23478
|
registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
|
|
23439
23479
|
return this;
|
|
23440
23480
|
}
|
|
23441
|
-
connectConnection(
|
|
23442
|
-
if (isStream(
|
|
23443
|
-
const state2 = this.openStreamConnection(
|
|
23481
|
+
connectConnection(target2) {
|
|
23482
|
+
if (isStream(target2)) {
|
|
23483
|
+
const state2 = this.openStreamConnection(target2);
|
|
23444
23484
|
this[runClientConnectHandlers](state2.connection);
|
|
23445
23485
|
return state2;
|
|
23446
23486
|
}
|
|
23447
23487
|
const [thisStream, peerStream] = memoryStreamPair();
|
|
23448
|
-
const peerRawConnection =
|
|
23488
|
+
const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
|
|
23449
23489
|
const peerConnection = agentConnection(peerRawConnection);
|
|
23450
23490
|
const state = this.openStreamConnection(thisStream);
|
|
23451
23491
|
void state.rawConnection.closed.then(() => peerConnection.close());
|
|
23452
23492
|
void peerRawConnection.closed.then(() => state.connection.close());
|
|
23453
23493
|
try {
|
|
23454
|
-
|
|
23494
|
+
target2[runAgentConnectHandlers](peerConnection);
|
|
23455
23495
|
this[runClientConnectHandlers](state.connection);
|
|
23456
23496
|
} catch (error51) {
|
|
23457
23497
|
peerConnection.close(error51);
|
|
@@ -24698,7 +24738,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
|
|
|
24698
24738
|
throw new CodeBuddyError("protocolError", "Inherited Subagent identity changed");
|
|
24699
24739
|
inheritedEntries = prefixParsed.entries;
|
|
24700
24740
|
}
|
|
24701
|
-
const
|
|
24741
|
+
const target2 = await realpath3(cwd);
|
|
24702
24742
|
const inheritedCwds = inheritedEntries.flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
|
|
24703
24743
|
const suffixCwds = parsed.entries.slice(inheritedEntries.length).flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
|
|
24704
24744
|
const canonical = await canonicalCwds(suffixCwds);
|
|
@@ -24710,7 +24750,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
|
|
|
24710
24750
|
}
|
|
24711
24751
|
for (const value of suffixCwds) {
|
|
24712
24752
|
const actual = canonical.get(value);
|
|
24713
|
-
if (!actual || !equalPath(actual,
|
|
24753
|
+
if (!actual || !equalPath(actual, target2))
|
|
24714
24754
|
throw new CodeBuddyError("invalidRequest", "Subagent workspace differs from parent");
|
|
24715
24755
|
}
|
|
24716
24756
|
const bindings = new Map((inherited?.workspaceBindings ?? []).map((binding) => [
|
|
@@ -27480,16 +27520,16 @@ function createWorkBuddyInstallation(environment, dependencies = {}) {
|
|
|
27480
27520
|
}
|
|
27481
27521
|
};
|
|
27482
27522
|
const root = product.applicationName === "workbuddy-ai" && product.updateUrl === "https://www.workbuddy.ai" ? "https://www.workbuddy.ai" : product.applicationName === "workbuddy" && product.updateUrl === "https://www.workbuddy.cn" ? "https://www.workbuddy.cn" : void 0;
|
|
27483
|
-
const
|
|
27484
|
-
if (!root || !
|
|
27523
|
+
const target2 = platform === "darwin" && (arch === "arm64" || arch === "x64") ? `darwin-${arch}` : platform === "win32" && arch === "x64" ? "win32-x64-user" : void 0;
|
|
27524
|
+
if (!root || !target2 || environment.WORKBUDDY_UPDATE_URL?.trim() && environment.WORKBUDDY_UPDATE_URL.trim() !== root)
|
|
27485
27525
|
return unknown2;
|
|
27486
27526
|
try {
|
|
27487
|
-
const feed = JSON.parse(await (dependencies.fetchText ?? fetchInstallationText)(`${root}/v2/update?platform=workbuddy-${
|
|
27527
|
+
const feed = JSON.parse(await (dependencies.fetchText ?? fetchInstallationText)(`${root}/v2/update?platform=workbuddy-${target2}`));
|
|
27488
27528
|
const feedVersion = installationVersion(feed.version);
|
|
27489
27529
|
const latestVersion = appVersion(feedVersion);
|
|
27490
27530
|
const download = new URL(typeof feed.url === "string" ? feed.url : "");
|
|
27491
27531
|
const downloadHost = root.endsWith(".ai") ? "download.codebuddy.ai" : "download.codebuddy.cn";
|
|
27492
|
-
if (download.origin !== `https://${downloadHost}` || download.username || download.password || download.search || download.hash || !download.pathname.startsWith(`/workbuddy/saas/${
|
|
27532
|
+
if (download.origin !== `https://${downloadHost}` || download.username || download.password || download.search || download.hash || !download.pathname.startsWith(`/workbuddy/saas/${target2}/WorkBuddy-${target2}-${feedVersion}-`) || !download.pathname.endsWith(platform === "darwin" ? ".zip" : ".exe"))
|
|
27493
27533
|
throw new Error("WorkBuddy update feed returned an invalid installer URL");
|
|
27494
27534
|
if (platform === "darwin")
|
|
27495
27535
|
download.pathname = download.pathname.replace(/\.zip$/u, ".dmg");
|
|
@@ -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/usage-statistics.js
|
|
@@ -816,8 +816,8 @@ function defineLazy(object2, key, getter) {
|
|
|
816
816
|
function objectClone(obj) {
|
|
817
817
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
818
818
|
}
|
|
819
|
-
function assignProp(
|
|
820
|
-
Object.defineProperty(
|
|
819
|
+
function assignProp(target2, prop, value) {
|
|
820
|
+
Object.defineProperty(target2, prop, {
|
|
821
821
|
value,
|
|
822
822
|
writable: true,
|
|
823
823
|
enumerable: true,
|
|
@@ -1000,35 +1000,35 @@ function normalizeParams(_params) {
|
|
|
1000
1000
|
return params;
|
|
1001
1001
|
}
|
|
1002
1002
|
function createTransparentProxy(getter) {
|
|
1003
|
-
let
|
|
1003
|
+
let target2;
|
|
1004
1004
|
return new Proxy({}, {
|
|
1005
1005
|
get(_, prop, receiver) {
|
|
1006
|
-
|
|
1007
|
-
return Reflect.get(
|
|
1006
|
+
target2 ?? (target2 = getter());
|
|
1007
|
+
return Reflect.get(target2, prop, receiver);
|
|
1008
1008
|
},
|
|
1009
1009
|
set(_, prop, value, receiver) {
|
|
1010
|
-
|
|
1011
|
-
return Reflect.set(
|
|
1010
|
+
target2 ?? (target2 = getter());
|
|
1011
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1012
1012
|
},
|
|
1013
1013
|
has(_, prop) {
|
|
1014
|
-
|
|
1015
|
-
return Reflect.has(
|
|
1014
|
+
target2 ?? (target2 = getter());
|
|
1015
|
+
return Reflect.has(target2, prop);
|
|
1016
1016
|
},
|
|
1017
1017
|
deleteProperty(_, prop) {
|
|
1018
|
-
|
|
1019
|
-
return Reflect.deleteProperty(
|
|
1018
|
+
target2 ?? (target2 = getter());
|
|
1019
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1020
1020
|
},
|
|
1021
1021
|
ownKeys(_) {
|
|
1022
|
-
|
|
1023
|
-
return Reflect.ownKeys(
|
|
1022
|
+
target2 ?? (target2 = getter());
|
|
1023
|
+
return Reflect.ownKeys(target2);
|
|
1024
1024
|
},
|
|
1025
1025
|
getOwnPropertyDescriptor(_, prop) {
|
|
1026
|
-
|
|
1027
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1026
|
+
target2 ?? (target2 = getter());
|
|
1027
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1028
1028
|
},
|
|
1029
1029
|
defineProperty(_, prop, descriptor) {
|
|
1030
|
-
|
|
1031
|
-
return Reflect.defineProperty(
|
|
1030
|
+
target2 ?? (target2 = getter());
|
|
1031
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1032
1032
|
}
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
@@ -11480,15 +11480,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11480
11480
|
|
|
11481
11481
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11482
11482
|
function initializeContext(params) {
|
|
11483
|
-
let
|
|
11484
|
-
if (
|
|
11485
|
-
|
|
11486
|
-
if (
|
|
11487
|
-
|
|
11483
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11484
|
+
if (target2 === "draft-4")
|
|
11485
|
+
target2 = "draft-04";
|
|
11486
|
+
if (target2 === "draft-7")
|
|
11487
|
+
target2 = "draft-07";
|
|
11488
11488
|
return {
|
|
11489
11489
|
processors: params.processors ?? {},
|
|
11490
11490
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11491
|
-
target,
|
|
11491
|
+
target: target2,
|
|
11492
11492
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11493
11493
|
override: params?.override ?? (() => {
|
|
11494
11494
|
}),
|
|
@@ -11830,8 +11830,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
11830
11830
|
return finalize(ctx, schema);
|
|
11831
11831
|
};
|
|
11832
11832
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
11833
|
-
const { libraryOptions, target } = params ?? {};
|
|
11834
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
11833
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
11834
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
11835
11835
|
process2(schema, ctx);
|
|
11836
11836
|
extractDefs(ctx, schema);
|
|
11837
11837
|
return finalize(ctx, schema);
|
|
@@ -12890,8 +12890,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12890
12890
|
catch(params) {
|
|
12891
12891
|
return _catch2(this, params);
|
|
12892
12892
|
},
|
|
12893
|
-
pipe(
|
|
12894
|
-
return pipe(this,
|
|
12893
|
+
pipe(target2) {
|
|
12894
|
+
return pipe(this, target2);
|
|
12895
12895
|
},
|
|
12896
12896
|
readonly() {
|
|
12897
12897
|
return readonly(this);
|
|
@@ -15249,15 +15249,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15249
15249
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15250
15250
|
}).strict().superRefine(({ threads }, context) => {
|
|
15251
15251
|
const seen = /* @__PURE__ */ new Set();
|
|
15252
|
-
for (const [index,
|
|
15253
|
-
if (seen.has(
|
|
15252
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15253
|
+
if (seen.has(thread2.threadId)) {
|
|
15254
15254
|
context.addIssue({
|
|
15255
15255
|
code: "custom",
|
|
15256
15256
|
message: "Thread ownership-list results must be unique",
|
|
15257
15257
|
path: ["threads", index, "threadId"]
|
|
15258
15258
|
});
|
|
15259
15259
|
}
|
|
15260
|
-
seen.add(
|
|
15260
|
+
seen.add(thread2.threadId);
|
|
15261
15261
|
}
|
|
15262
15262
|
});
|
|
15263
15263
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -16595,6 +16595,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16595
16595
|
}).strict();
|
|
16596
16596
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16597
16597
|
|
|
16598
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16599
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16600
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16601
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16602
|
+
var thread = { ...target, threadId: identity };
|
|
16603
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16604
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16605
|
+
external_exports.strictObject({
|
|
16606
|
+
kind: external_exports.literal("list"),
|
|
16607
|
+
...target,
|
|
16608
|
+
cursor: external_exports.string().nullable(),
|
|
16609
|
+
archived: external_exports.boolean()
|
|
16610
|
+
}),
|
|
16611
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16612
|
+
external_exports.strictObject({
|
|
16613
|
+
kind: external_exports.literal("prompt"),
|
|
16614
|
+
...thread,
|
|
16615
|
+
epoch: identity,
|
|
16616
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16617
|
+
requestId: identity.optional()
|
|
16618
|
+
}),
|
|
16619
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16620
|
+
external_exports.strictObject({
|
|
16621
|
+
kind: external_exports.literal("rename"),
|
|
16622
|
+
...thread,
|
|
16623
|
+
epoch: identity,
|
|
16624
|
+
name: external_exports.string().min(1).max(512)
|
|
16625
|
+
}),
|
|
16626
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16627
|
+
external_exports.strictObject({
|
|
16628
|
+
kind: external_exports.literal("respond"),
|
|
16629
|
+
...thread,
|
|
16630
|
+
epoch: identity,
|
|
16631
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16632
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16633
|
+
})
|
|
16634
|
+
]);
|
|
16635
|
+
|
|
16598
16636
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16599
16637
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16600
16638
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16615,7 +16653,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16615
16653
|
identity: external_exports.string().max(4096).nullable()
|
|
16616
16654
|
});
|
|
16617
16655
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16656
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16618
16657
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16658
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16619
16659
|
external_exports.strictObject({
|
|
16620
16660
|
action: external_exports.literal("read-thread"),
|
|
16621
16661
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -17430,8 +17470,8 @@ var locationSchema = external_exports.object({
|
|
|
17430
17470
|
projectId: external_exports.string().trim().min(1),
|
|
17431
17471
|
apiKeyId: external_exports.string().trim().min(1)
|
|
17432
17472
|
});
|
|
17433
|
-
function readProjectCredential(credential, family,
|
|
17434
|
-
const key = `project-key-location:v1:${encodeURIComponent(JSON.stringify([origin, family,
|
|
17473
|
+
function readProjectCredential(credential, family, identity2, origin) {
|
|
17474
|
+
const key = `project-key-location:v1:${encodeURIComponent(JSON.stringify([origin, family, identity2, null, 1, "non-team"]))}`;
|
|
17435
17475
|
const raw = credential(key);
|
|
17436
17476
|
if (!raw)
|
|
17437
17477
|
return void 0;
|
|
@@ -17617,14 +17657,14 @@ var PersonalCodingPlanAccount = class {
|
|
|
17617
17657
|
return void 0;
|
|
17618
17658
|
const profile = recordSchema2.parse(JSON.parse(raw));
|
|
17619
17659
|
const normalized = external_exports.object({ id: external_exports.string(), username: external_exports.string(), displayName: external_exports.string() }).safeParse(profile).data;
|
|
17620
|
-
const
|
|
17621
|
-
if (!
|
|
17660
|
+
const identity2 = normalized ? normalized.id.trim() : family === "zai" && typeof profile.user_id === "string" ? profile.user_id.trim() : "";
|
|
17661
|
+
if (!identity2 || identity2 === "unknown")
|
|
17622
17662
|
return void 0;
|
|
17623
|
-
const project2 = readProjectCredential(credential, family,
|
|
17663
|
+
const project2 = readProjectCredential(credential, family, identity2, personalCodingPlanOrigin(family, this.environment));
|
|
17624
17664
|
if (project2)
|
|
17625
|
-
return { identity, current, apiKey: project2.loginToken, project: project2 };
|
|
17626
|
-
const key = `account-provider:coding-plan:${providerId}:account:${encodeURIComponent(
|
|
17627
|
-
return { identity, current, apiKey: credential(key).trim() };
|
|
17665
|
+
return { identity: identity2, current, apiKey: project2.loginToken, project: project2 };
|
|
17666
|
+
const key = `account-provider:coding-plan:${providerId}:account:${encodeURIComponent(identity2)}:api-key`;
|
|
17667
|
+
return { identity: identity2, current, apiKey: credential(key).trim() };
|
|
17628
17668
|
}
|
|
17629
17669
|
async inspect(providerId, accountType) {
|
|
17630
17670
|
const family = familySchema.parse(accountType);
|
|
@@ -20318,14 +20358,14 @@ var ZcodeSession = class {
|
|
|
20318
20358
|
const snapshot = await this.#readNative();
|
|
20319
20359
|
const usage = record2(await this.transport.request("getTaskTokenUsage", { sessionId: this.sessionId }));
|
|
20320
20360
|
const fields = { ...sessionUsage(snapshot, this.nativeCatalog) ?? {} };
|
|
20321
|
-
for (const [source,
|
|
20361
|
+
for (const [source, target2] of [
|
|
20322
20362
|
["inputTokens", "inputTokens"],
|
|
20323
20363
|
["outputTokens", "outputTokens"],
|
|
20324
20364
|
["totalTokens", "totalTokens"],
|
|
20325
20365
|
["reasoningTokens", "reasoningOutputTokens"]
|
|
20326
20366
|
])
|
|
20327
20367
|
if (typeof usage[source] === "number")
|
|
20328
|
-
fields[
|
|
20368
|
+
fields[target2] = usage[source];
|
|
20329
20369
|
this.#emit({
|
|
20330
20370
|
type: "session.usage.changed",
|
|
20331
20371
|
usage: parseHostUsage(fields),
|