@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
|
// ../../../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({
|
|
@@ -16398,6 +16398,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16398
16398
|
}).strict();
|
|
16399
16399
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16400
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
|
+
|
|
16401
16439
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16402
16440
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16403
16441
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16418,7 +16456,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16418
16456
|
identity: external_exports.string().max(4096).nullable()
|
|
16419
16457
|
});
|
|
16420
16458
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16459
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16421
16460
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16461
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16422
16462
|
external_exports.strictObject({
|
|
16423
16463
|
action: external_exports.literal("read-thread"),
|
|
16424
16464
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -16732,10 +16772,10 @@ var CodexCounters = class {
|
|
|
16732
16772
|
if (model2 && this.#turn)
|
|
16733
16773
|
this.#models.set(this.#turn, model2);
|
|
16734
16774
|
}
|
|
16735
|
-
snapshot(at,
|
|
16775
|
+
snapshot(at, thread2, payload) {
|
|
16736
16776
|
if (payload.history_mode === "paginated" && !payload.history_base && typeof payload.subagent_history_start_ordinal === "number" && payload.subagent_history_start_ordinal > 0) {
|
|
16737
16777
|
this.#snapshotAt = at;
|
|
16738
|
-
this.#snapshotThread =
|
|
16778
|
+
this.#snapshotThread = thread2;
|
|
16739
16779
|
}
|
|
16740
16780
|
}
|
|
16741
16781
|
#align(at, total, last) {
|
|
@@ -17280,7 +17320,7 @@ async function readThreadNames(home, signal) {
|
|
|
17280
17320
|
}
|
|
17281
17321
|
return names;
|
|
17282
17322
|
}
|
|
17283
|
-
async function readCodexRollouts(files,
|
|
17323
|
+
async function readCodexRollouts(files, thread2, signal, options = {}) {
|
|
17284
17324
|
const counters = new CodexCounters();
|
|
17285
17325
|
let model2 = "", cwd = "", ownFrom = null, firstMeta = false, forkAt = 0, seen = 0, firstPrompt;
|
|
17286
17326
|
let lastOrdinal = -1;
|
|
@@ -17324,7 +17364,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17324
17364
|
switch (row.type) {
|
|
17325
17365
|
case "session_meta": {
|
|
17326
17366
|
if (!firstMeta) {
|
|
17327
|
-
if (text(p.id) !==
|
|
17367
|
+
if (text(p.id) !== thread2)
|
|
17328
17368
|
throw new Error("Codex rollout identity does not match its source");
|
|
17329
17369
|
if (p.forked_from_id || p.parent_thread_id || p.subagent_history_start_ordinal || object2(p.history_base)) {
|
|
17330
17370
|
forkAt = nativeTimeMs(p.timestamp) ?? at;
|
|
@@ -17407,7 +17447,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17407
17447
|
return counters.entries.flatMap((v, index) => {
|
|
17408
17448
|
if (ownFrom !== null && index < ownFrom)
|
|
17409
17449
|
return [];
|
|
17410
|
-
if (v.thread && v.thread !==
|
|
17450
|
+
if (v.thread && v.thread !== thread2 || !v.thread && forkAt && v.at < forkAt)
|
|
17411
17451
|
return [];
|
|
17412
17452
|
const [input, output, cached2, written, reasoning] = v.usage.values;
|
|
17413
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")}`;
|
|
@@ -17421,7 +17461,7 @@ async function readCodexRollouts(files, thread, signal, options = {}) {
|
|
|
17421
17461
|
...v.usage.known & 8 ? { cacheWriteInputTokens: written } : {},
|
|
17422
17462
|
...v.usage.known & 16 ? { reasoningOutputTokens: reasoning } : {}
|
|
17423
17463
|
});
|
|
17424
|
-
return entry ? [withUsageSession(entry, { sessionId:
|
|
17464
|
+
return entry ? [withUsageSession(entry, { sessionId: thread2, cwd, title: firstPrompt })] : [];
|
|
17425
17465
|
});
|
|
17426
17466
|
}
|
|
17427
17467
|
function createCodexUsageStatistics(environment, options = {}) {
|
|
@@ -17454,12 +17494,12 @@ function createCodexUsageStatistics(environment, options = {}) {
|
|
|
17454
17494
|
await visit(file2, depth + 1);
|
|
17455
17495
|
if (!entry.isFile())
|
|
17456
17496
|
continue;
|
|
17457
|
-
const
|
|
17458
|
-
if (!
|
|
17497
|
+
const thread2 = ROLLOUT.exec(entry.name)?.[1];
|
|
17498
|
+
if (!thread2 || options.sessionId && thread2 !== options.sessionId)
|
|
17459
17499
|
continue;
|
|
17460
|
-
const list = found.get(
|
|
17500
|
+
const list = found.get(thread2) ?? [];
|
|
17461
17501
|
list.push({ file: file2, fingerprint: await stamp(file2) });
|
|
17462
|
-
found.set(
|
|
17502
|
+
found.set(thread2, list);
|
|
17463
17503
|
}
|
|
17464
17504
|
}
|
|
17465
17505
|
await visit(path.join(home, "sessions"), 0);
|
|
@@ -17467,10 +17507,10 @@ function createCodexUsageStatistics(environment, options = {}) {
|
|
|
17467
17507
|
const indexStamp = options.sessionId ? "" : await stamp(path.join(home, "session_index.jsonl")).catch(() => "-");
|
|
17468
17508
|
const result = [];
|
|
17469
17509
|
groups.clear();
|
|
17470
|
-
for (const [
|
|
17510
|
+
for (const [thread2, files] of found) {
|
|
17471
17511
|
files.sort((a, b) => path.basename(a.file).localeCompare(path.basename(b.file)) || a.file.localeCompare(b.file));
|
|
17472
|
-
const id = path.join(home, `usage-thread-${
|
|
17473
|
-
groups.set(id, { thread, files });
|
|
17512
|
+
const id = path.join(home, `usage-thread-${thread2}`);
|
|
17513
|
+
groups.set(id, { thread: thread2, files });
|
|
17474
17514
|
result.push({ id, fingerprint: fingerprint(files, indexStamp) });
|
|
17475
17515
|
}
|
|
17476
17516
|
return result;
|
|
@@ -26,9 +26,9 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
26
26
|
throw mod = 0, e;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
var __export = (
|
|
29
|
+
var __export = (target2, all) => {
|
|
30
30
|
for (var name in all)
|
|
31
|
-
__defProp(
|
|
31
|
+
__defProp(target2, name, { get: all[name], enumerable: true });
|
|
32
32
|
};
|
|
33
33
|
var __copyProps = (to, from, except, desc) => {
|
|
34
34
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -38,12 +38,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
38
38
|
}
|
|
39
39
|
return to;
|
|
40
40
|
};
|
|
41
|
-
var __toESM = (mod, isNodeMode,
|
|
41
|
+
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
42
42
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
43
43
|
// file that has been converted to a CommonJS file using a Babel-
|
|
44
44
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
45
45
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
46
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(
|
|
46
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
|
|
47
47
|
mod
|
|
48
48
|
));
|
|
49
49
|
|
|
@@ -4809,8 +4809,8 @@ function defineLazy(object2, key, getter) {
|
|
|
4809
4809
|
function objectClone(obj) {
|
|
4810
4810
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
4811
4811
|
}
|
|
4812
|
-
function assignProp(
|
|
4813
|
-
Object.defineProperty(
|
|
4812
|
+
function assignProp(target2, prop, value) {
|
|
4813
|
+
Object.defineProperty(target2, prop, {
|
|
4814
4814
|
value,
|
|
4815
4815
|
writable: true,
|
|
4816
4816
|
enumerable: true,
|
|
@@ -4993,35 +4993,35 @@ function normalizeParams(_params) {
|
|
|
4993
4993
|
return params;
|
|
4994
4994
|
}
|
|
4995
4995
|
function createTransparentProxy(getter) {
|
|
4996
|
-
let
|
|
4996
|
+
let target2;
|
|
4997
4997
|
return new Proxy({}, {
|
|
4998
4998
|
get(_, prop, receiver) {
|
|
4999
|
-
|
|
5000
|
-
return Reflect.get(
|
|
4999
|
+
target2 ?? (target2 = getter());
|
|
5000
|
+
return Reflect.get(target2, prop, receiver);
|
|
5001
5001
|
},
|
|
5002
5002
|
set(_, prop, value, receiver) {
|
|
5003
|
-
|
|
5004
|
-
return Reflect.set(
|
|
5003
|
+
target2 ?? (target2 = getter());
|
|
5004
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
5005
5005
|
},
|
|
5006
5006
|
has(_, prop) {
|
|
5007
|
-
|
|
5008
|
-
return Reflect.has(
|
|
5007
|
+
target2 ?? (target2 = getter());
|
|
5008
|
+
return Reflect.has(target2, prop);
|
|
5009
5009
|
},
|
|
5010
5010
|
deleteProperty(_, prop) {
|
|
5011
|
-
|
|
5012
|
-
return Reflect.deleteProperty(
|
|
5011
|
+
target2 ?? (target2 = getter());
|
|
5012
|
+
return Reflect.deleteProperty(target2, prop);
|
|
5013
5013
|
},
|
|
5014
5014
|
ownKeys(_) {
|
|
5015
|
-
|
|
5016
|
-
return Reflect.ownKeys(
|
|
5015
|
+
target2 ?? (target2 = getter());
|
|
5016
|
+
return Reflect.ownKeys(target2);
|
|
5017
5017
|
},
|
|
5018
5018
|
getOwnPropertyDescriptor(_, prop) {
|
|
5019
|
-
|
|
5020
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
5019
|
+
target2 ?? (target2 = getter());
|
|
5020
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
5021
5021
|
},
|
|
5022
5022
|
defineProperty(_, prop, descriptor) {
|
|
5023
|
-
|
|
5024
|
-
return Reflect.defineProperty(
|
|
5023
|
+
target2 ?? (target2 = getter());
|
|
5024
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
5025
5025
|
}
|
|
5026
5026
|
});
|
|
5027
5027
|
}
|
|
@@ -15473,15 +15473,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15473
15473
|
|
|
15474
15474
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
15475
15475
|
function initializeContext(params) {
|
|
15476
|
-
let
|
|
15477
|
-
if (
|
|
15478
|
-
|
|
15479
|
-
if (
|
|
15480
|
-
|
|
15476
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
15477
|
+
if (target2 === "draft-4")
|
|
15478
|
+
target2 = "draft-04";
|
|
15479
|
+
if (target2 === "draft-7")
|
|
15480
|
+
target2 = "draft-07";
|
|
15481
15481
|
return {
|
|
15482
15482
|
processors: params.processors ?? {},
|
|
15483
15483
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
15484
|
-
target,
|
|
15484
|
+
target: target2,
|
|
15485
15485
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
15486
15486
|
override: params?.override ?? (() => {
|
|
15487
15487
|
}),
|
|
@@ -15823,8 +15823,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
15823
15823
|
return finalize(ctx, schema);
|
|
15824
15824
|
};
|
|
15825
15825
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
15826
|
-
const { libraryOptions, target } = params ?? {};
|
|
15827
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
15826
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
15827
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
15828
15828
|
process2(schema, ctx);
|
|
15829
15829
|
extractDefs(ctx, schema);
|
|
15830
15830
|
return finalize(ctx, schema);
|
|
@@ -16883,8 +16883,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
16883
16883
|
catch(params) {
|
|
16884
16884
|
return _catch2(this, params);
|
|
16885
16885
|
},
|
|
16886
|
-
pipe(
|
|
16887
|
-
return pipe(this,
|
|
16886
|
+
pipe(target2) {
|
|
16887
|
+
return pipe(this, target2);
|
|
16888
16888
|
},
|
|
16889
16889
|
readonly() {
|
|
16890
16890
|
return readonly(this);
|
|
@@ -19114,15 +19114,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
19114
19114
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
19115
19115
|
}).strict().superRefine(({ threads }, context) => {
|
|
19116
19116
|
const seen = /* @__PURE__ */ new Set();
|
|
19117
|
-
for (const [index,
|
|
19118
|
-
if (seen.has(
|
|
19117
|
+
for (const [index, thread2] of threads.entries()) {
|
|
19118
|
+
if (seen.has(thread2.threadId)) {
|
|
19119
19119
|
context.addIssue({
|
|
19120
19120
|
code: "custom",
|
|
19121
19121
|
message: "Thread ownership-list results must be unique",
|
|
19122
19122
|
path: ["threads", index, "threadId"]
|
|
19123
19123
|
});
|
|
19124
19124
|
}
|
|
19125
|
-
seen.add(
|
|
19125
|
+
seen.add(thread2.threadId);
|
|
19126
19126
|
}
|
|
19127
19127
|
});
|
|
19128
19128
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -20460,6 +20460,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
20460
20460
|
}).strict();
|
|
20461
20461
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
20462
20462
|
|
|
20463
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
20464
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
20465
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
20466
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
20467
|
+
var thread = { ...target, threadId: identity };
|
|
20468
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
20469
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
20470
|
+
external_exports.strictObject({
|
|
20471
|
+
kind: external_exports.literal("list"),
|
|
20472
|
+
...target,
|
|
20473
|
+
cursor: external_exports.string().nullable(),
|
|
20474
|
+
archived: external_exports.boolean()
|
|
20475
|
+
}),
|
|
20476
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
20477
|
+
external_exports.strictObject({
|
|
20478
|
+
kind: external_exports.literal("prompt"),
|
|
20479
|
+
...thread,
|
|
20480
|
+
epoch: identity,
|
|
20481
|
+
text: external_exports.string().min(1).max(8e3),
|
|
20482
|
+
requestId: identity.optional()
|
|
20483
|
+
}),
|
|
20484
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
20485
|
+
external_exports.strictObject({
|
|
20486
|
+
kind: external_exports.literal("rename"),
|
|
20487
|
+
...thread,
|
|
20488
|
+
epoch: identity,
|
|
20489
|
+
name: external_exports.string().min(1).max(512)
|
|
20490
|
+
}),
|
|
20491
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
20492
|
+
external_exports.strictObject({
|
|
20493
|
+
kind: external_exports.literal("respond"),
|
|
20494
|
+
...thread,
|
|
20495
|
+
epoch: identity,
|
|
20496
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
20497
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
20498
|
+
})
|
|
20499
|
+
]);
|
|
20500
|
+
|
|
20463
20501
|
// ../../shared-contracts/dist/remote-connections.js
|
|
20464
20502
|
var hostId = external_exports.string().min(1).max(1024);
|
|
20465
20503
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -20480,7 +20518,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
20480
20518
|
identity: external_exports.string().max(4096).nullable()
|
|
20481
20519
|
});
|
|
20482
20520
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
20521
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
20483
20522
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
20523
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
20484
20524
|
external_exports.strictObject({
|
|
20485
20525
|
action: external_exports.literal("read-thread"),
|
|
20486
20526
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -26468,10 +26508,10 @@ function getWorkflowDefinition(handle) {
|
|
|
26468
26508
|
function isWorkflowResumeErrorCode(value) {
|
|
26469
26509
|
return value === "not_found" || value === "non_resumable" || value === "workflow_run_not_resumable" || value === "already_active" || value === "workflow_already_running" || value === "workflow_limits_invalid" || value === "workflow_session_disposed" || value === "workflow_storage_unavailable" || value === "workflow_storage_corrupt";
|
|
26470
26510
|
}
|
|
26471
|
-
function copyDefinedWorkflowAgentOption(source,
|
|
26511
|
+
function copyDefinedWorkflowAgentOption(source, target2, key) {
|
|
26472
26512
|
const value = source[key];
|
|
26473
26513
|
if (value !== void 0) {
|
|
26474
|
-
|
|
26514
|
+
target2[key] = value;
|
|
26475
26515
|
}
|
|
26476
26516
|
}
|
|
26477
26517
|
function toToolDefinition(tool) {
|
|
@@ -32359,9 +32399,9 @@ import path4 from "node:path";
|
|
|
32359
32399
|
function referencesNpmBin(shim, name, bin) {
|
|
32360
32400
|
if (bin.includes(".."))
|
|
32361
32401
|
return false;
|
|
32362
|
-
const
|
|
32402
|
+
const target2 = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
|
|
32363
32403
|
const text = shim.replaceAll("\\", "/").toLowerCase();
|
|
32364
|
-
return text.includes(`%dp0%/${
|
|
32404
|
+
return text.includes(`%dp0%/${target2}"`) || text.includes(`%~dp0/${target2}"`);
|
|
32365
32405
|
}
|
|
32366
32406
|
async function npmInstallation(command, packages, environment) {
|
|
32367
32407
|
let selected = await realpath(command);
|
|
@@ -32400,8 +32440,8 @@ async function npmInstallation(command, packages, environment) {
|
|
|
32400
32440
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
32401
32441
|
if (path4.basename(bin) !== bin || entry.includes(".."))
|
|
32402
32442
|
return false;
|
|
32403
|
-
const
|
|
32404
|
-
if (
|
|
32443
|
+
const target2 = await realpath(path4.join(directory, entry)).catch(() => "");
|
|
32444
|
+
if (target2.toLowerCase() !== selected.toLowerCase())
|
|
32405
32445
|
return false;
|
|
32406
32446
|
const shim = await readFile(path4.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
32407
32447
|
return referencesNpmBin(shim, name, entry);
|
|
@@ -32466,13 +32506,13 @@ function resolveCopilotExecutable(input, dependencies = {}) {
|
|
|
32466
32506
|
const metadata = JSON.parse(read(paths.join(root, "package.json")));
|
|
32467
32507
|
const bin = typeof metadata.bin === "string" ? metadata.bin : metadata.bin?.copilot;
|
|
32468
32508
|
if (metadata.name === "@github/copilot" && typeof bin === "string" && !paths.parse(bin).root && !bin.split(/[\\/]/u).includes("..") && (bin.endsWith(".js") || /\.exe$/iu.test(bin))) {
|
|
32469
|
-
const
|
|
32509
|
+
const target2 = paths.resolve(root, bin);
|
|
32470
32510
|
const relative2 = `node_modules/@github/copilot/${bin.replaceAll("\\", "/").replace(/^\.\//u, "")}`.toLowerCase();
|
|
32471
32511
|
const shim = read(executable).replaceAll("\\", "/").toLowerCase();
|
|
32472
32512
|
if (shim.includes(`"%dp0%/${relative2}" %*`) || shim.includes(`"%~dp0/${relative2}" %*`)) {
|
|
32473
32513
|
const exists = dependencies.isExecutable ?? ((file2) => isExecutableFile(file2, platform));
|
|
32474
|
-
if (exists(
|
|
32475
|
-
return
|
|
32514
|
+
if (exists(target2))
|
|
32515
|
+
return target2;
|
|
32476
32516
|
}
|
|
32477
32517
|
}
|
|
32478
32518
|
} catch {
|
|
@@ -32962,9 +33002,9 @@ async function readModels(client, session, auth, refresh = true) {
|
|
|
32962
33002
|
auto = !!result.auto || !!result.providers?.some((provider) => provider.kind === "copilot");
|
|
32963
33003
|
} else {
|
|
32964
33004
|
const result = await bounded(client.rpc.models.list({}));
|
|
32965
|
-
const
|
|
33005
|
+
const identity3 = auth ?? await bounded(client.getAuthStatus());
|
|
32966
33006
|
entries = result.models;
|
|
32967
|
-
auto = !!result.auto ||
|
|
33007
|
+
auto = !!result.auto || identity3.isAuthenticated && ["user", "env", "gh-cli", "hmac", "token"].includes(identity3.authType ?? "");
|
|
32968
33008
|
}
|
|
32969
33009
|
const models = entries.map((entry) => modelSchema.parse(entry));
|
|
32970
33010
|
if (auto && !models.some((model2) => model2.id === "auto"))
|
|
@@ -34036,15 +34076,15 @@ var CopilotHarnessSession = class {
|
|
|
34036
34076
|
}
|
|
34037
34077
|
startTurn(id) {
|
|
34038
34078
|
this.usageTelemetry.begin(id);
|
|
34039
|
-
const
|
|
34040
|
-
void
|
|
34079
|
+
const identity3 = Promise.withResolvers();
|
|
34080
|
+
void identity3.promise.catch(() => {
|
|
34041
34081
|
});
|
|
34042
34082
|
return {
|
|
34043
34083
|
id,
|
|
34044
34084
|
items: new CopilotItems(id, (event) => this.emit(event)),
|
|
34045
34085
|
cancelling: false,
|
|
34046
34086
|
accepted: false,
|
|
34047
|
-
identity:
|
|
34087
|
+
identity: identity3,
|
|
34048
34088
|
aliases: /* @__PURE__ */ new Set()
|
|
34049
34089
|
};
|
|
34050
34090
|
}
|
|
@@ -34549,7 +34589,7 @@ function projectCopilotAccount(quota) {
|
|
|
34549
34589
|
|
|
34550
34590
|
// dist/account.js
|
|
34551
34591
|
var CACHE_MS = 15e3;
|
|
34552
|
-
var
|
|
34592
|
+
var identity2 = (auth) => JSON.stringify([auth.authType, auth.host, auth.login]);
|
|
34553
34593
|
async function deleteDraft(client, id) {
|
|
34554
34594
|
try {
|
|
34555
34595
|
await bounded(client.deleteSession(id), 5e3);
|
|
@@ -34633,7 +34673,7 @@ var CopilotAccount = class {
|
|
|
34633
34673
|
return null;
|
|
34634
34674
|
const quota = await bounded(session.rpc.quota.refresh(), 1e4);
|
|
34635
34675
|
const after = await bounded(client.getAuthStatus(), 3e3);
|
|
34636
|
-
if (after.isAuthenticated &&
|
|
34676
|
+
if (after.isAuthenticated && identity2(before) === identity2(after))
|
|
34637
34677
|
result = projectCopilotAccount(quota);
|
|
34638
34678
|
} catch {
|
|
34639
34679
|
result = null;
|