@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 text = shim.replaceAll("\\", "/").toLowerCase();
|
|
365
|
-
return text.includes(`%dp0%/${
|
|
365
|
+
return text.includes(`%dp0%/${target2}"`) || text.includes(`%~dp0/${target2}"`);
|
|
366
366
|
}
|
|
367
367
|
async function npmInstallation(command, packages, environment) {
|
|
368
368
|
let selected = await realpath(command);
|
|
@@ -401,8 +401,8 @@ async function npmInstallation(command, packages, environment) {
|
|
|
401
401
|
const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
|
|
402
402
|
if (path4.basename(bin) !== bin || entry.includes(".."))
|
|
403
403
|
return false;
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
404
|
+
const target2 = await realpath(path4.join(directory, entry)).catch(() => "");
|
|
405
|
+
if (target2.toLowerCase() !== selected.toLowerCase())
|
|
406
406
|
return false;
|
|
407
407
|
const shim = await readFile(path4.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
|
|
408
408
|
return referencesNpmBin(shim, name, entry);
|
|
@@ -1298,8 +1298,8 @@ function defineLazy(object2, key, getter) {
|
|
|
1298
1298
|
function objectClone(obj) {
|
|
1299
1299
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
1300
1300
|
}
|
|
1301
|
-
function assignProp(
|
|
1302
|
-
Object.defineProperty(
|
|
1301
|
+
function assignProp(target2, prop, value) {
|
|
1302
|
+
Object.defineProperty(target2, prop, {
|
|
1303
1303
|
value,
|
|
1304
1304
|
writable: true,
|
|
1305
1305
|
enumerable: true,
|
|
@@ -1482,35 +1482,35 @@ function normalizeParams(_params) {
|
|
|
1482
1482
|
return params;
|
|
1483
1483
|
}
|
|
1484
1484
|
function createTransparentProxy(getter) {
|
|
1485
|
-
let
|
|
1485
|
+
let target2;
|
|
1486
1486
|
return new Proxy({}, {
|
|
1487
1487
|
get(_, prop, receiver) {
|
|
1488
|
-
|
|
1489
|
-
return Reflect.get(
|
|
1488
|
+
target2 ?? (target2 = getter());
|
|
1489
|
+
return Reflect.get(target2, prop, receiver);
|
|
1490
1490
|
},
|
|
1491
1491
|
set(_, prop, value, receiver) {
|
|
1492
|
-
|
|
1493
|
-
return Reflect.set(
|
|
1492
|
+
target2 ?? (target2 = getter());
|
|
1493
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1494
1494
|
},
|
|
1495
1495
|
has(_, prop) {
|
|
1496
|
-
|
|
1497
|
-
return Reflect.has(
|
|
1496
|
+
target2 ?? (target2 = getter());
|
|
1497
|
+
return Reflect.has(target2, prop);
|
|
1498
1498
|
},
|
|
1499
1499
|
deleteProperty(_, prop) {
|
|
1500
|
-
|
|
1501
|
-
return Reflect.deleteProperty(
|
|
1500
|
+
target2 ?? (target2 = getter());
|
|
1501
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1502
1502
|
},
|
|
1503
1503
|
ownKeys(_) {
|
|
1504
|
-
|
|
1505
|
-
return Reflect.ownKeys(
|
|
1504
|
+
target2 ?? (target2 = getter());
|
|
1505
|
+
return Reflect.ownKeys(target2);
|
|
1506
1506
|
},
|
|
1507
1507
|
getOwnPropertyDescriptor(_, prop) {
|
|
1508
|
-
|
|
1509
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1508
|
+
target2 ?? (target2 = getter());
|
|
1509
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1510
1510
|
},
|
|
1511
1511
|
defineProperty(_, prop, descriptor) {
|
|
1512
|
-
|
|
1513
|
-
return Reflect.defineProperty(
|
|
1512
|
+
target2 ?? (target2 = getter());
|
|
1513
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1514
1514
|
}
|
|
1515
1515
|
});
|
|
1516
1516
|
}
|
|
@@ -11962,15 +11962,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11962
11962
|
|
|
11963
11963
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11964
11964
|
function initializeContext(params) {
|
|
11965
|
-
let
|
|
11966
|
-
if (
|
|
11967
|
-
|
|
11968
|
-
if (
|
|
11969
|
-
|
|
11965
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11966
|
+
if (target2 === "draft-4")
|
|
11967
|
+
target2 = "draft-04";
|
|
11968
|
+
if (target2 === "draft-7")
|
|
11969
|
+
target2 = "draft-07";
|
|
11970
11970
|
return {
|
|
11971
11971
|
processors: params.processors ?? {},
|
|
11972
11972
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11973
|
-
target,
|
|
11973
|
+
target: target2,
|
|
11974
11974
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11975
11975
|
override: params?.override ?? (() => {
|
|
11976
11976
|
}),
|
|
@@ -12312,8 +12312,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
12312
12312
|
return finalize(ctx, schema);
|
|
12313
12313
|
};
|
|
12314
12314
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
12315
|
-
const { libraryOptions, target } = params ?? {};
|
|
12316
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
12315
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
12316
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
12317
12317
|
process2(schema, ctx);
|
|
12318
12318
|
extractDefs(ctx, schema);
|
|
12319
12319
|
return finalize(ctx, schema);
|
|
@@ -13372,8 +13372,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13372
13372
|
catch(params) {
|
|
13373
13373
|
return _catch2(this, params);
|
|
13374
13374
|
},
|
|
13375
|
-
pipe(
|
|
13376
|
-
return pipe(this,
|
|
13375
|
+
pipe(target2) {
|
|
13376
|
+
return pipe(this, target2);
|
|
13377
13377
|
},
|
|
13378
13378
|
readonly() {
|
|
13379
13379
|
return readonly(this);
|
|
@@ -15603,15 +15603,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15603
15603
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15604
15604
|
}).strict().superRefine(({ threads }, context) => {
|
|
15605
15605
|
const seen = /* @__PURE__ */ new Set();
|
|
15606
|
-
for (const [index,
|
|
15607
|
-
if (seen.has(
|
|
15606
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15607
|
+
if (seen.has(thread2.threadId)) {
|
|
15608
15608
|
context.addIssue({
|
|
15609
15609
|
code: "custom",
|
|
15610
15610
|
message: "Thread ownership-list results must be unique",
|
|
15611
15611
|
path: ["threads", index, "threadId"]
|
|
15612
15612
|
});
|
|
15613
15613
|
}
|
|
15614
|
-
seen.add(
|
|
15614
|
+
seen.add(thread2.threadId);
|
|
15615
15615
|
}
|
|
15616
15616
|
});
|
|
15617
15617
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -15820,13 +15820,18 @@ var clientChannelResponseSchema = external_exports.object({
|
|
|
15820
15820
|
});
|
|
15821
15821
|
|
|
15822
15822
|
// ../../shared-contracts/dist/thread-catalog.js
|
|
15823
|
-
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15823
|
+
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15824
|
+
includeArchived: external_exports.boolean().optional(),
|
|
15825
|
+
/** Absent means first page; null means this branch is exhausted. Native cursors only. */
|
|
15826
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15827
|
+
}).strict();
|
|
15824
15828
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
15825
15829
|
threads: external_exports.array(jsonObjectSchema),
|
|
15826
15830
|
ownership: external_exports.array(threadOwnershipSchema),
|
|
15827
15831
|
/** Known archived IDs, including visible local external records even when their rows are
|
|
15828
|
-
* excluded. Native archived IDs
|
|
15829
|
-
archivedThreadIds: external_exports.array(hostThreadIdSchema)
|
|
15832
|
+
* excluded. Native archived IDs describe only the returned page, never a complete set. */
|
|
15833
|
+
archivedThreadIds: external_exports.array(hostThreadIdSchema),
|
|
15834
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15830
15835
|
}).strict();
|
|
15831
15836
|
|
|
15832
15837
|
// ../../shared-contracts/dist/voice.js
|
|
@@ -16041,7 +16046,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
|
16041
16046
|
});
|
|
16042
16047
|
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
16043
16048
|
enabled: false,
|
|
16044
|
-
timeoutMinutes:
|
|
16049
|
+
timeoutMinutes: 10
|
|
16045
16050
|
});
|
|
16046
16051
|
|
|
16047
16052
|
// ../../shared-contracts/dist/harness-preferences.js
|
|
@@ -16944,6 +16949,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16944
16949
|
}).strict();
|
|
16945
16950
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16946
16951
|
|
|
16952
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16953
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16954
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16955
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16956
|
+
var thread = { ...target, threadId: identity };
|
|
16957
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16958
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16959
|
+
external_exports.strictObject({
|
|
16960
|
+
kind: external_exports.literal("list"),
|
|
16961
|
+
...target,
|
|
16962
|
+
cursor: external_exports.string().nullable(),
|
|
16963
|
+
archived: external_exports.boolean()
|
|
16964
|
+
}),
|
|
16965
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16966
|
+
external_exports.strictObject({
|
|
16967
|
+
kind: external_exports.literal("prompt"),
|
|
16968
|
+
...thread,
|
|
16969
|
+
epoch: identity,
|
|
16970
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16971
|
+
requestId: identity.optional()
|
|
16972
|
+
}),
|
|
16973
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16974
|
+
external_exports.strictObject({
|
|
16975
|
+
kind: external_exports.literal("rename"),
|
|
16976
|
+
...thread,
|
|
16977
|
+
epoch: identity,
|
|
16978
|
+
name: external_exports.string().min(1).max(512)
|
|
16979
|
+
}),
|
|
16980
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16981
|
+
external_exports.strictObject({
|
|
16982
|
+
kind: external_exports.literal("respond"),
|
|
16983
|
+
...thread,
|
|
16984
|
+
epoch: identity,
|
|
16985
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16986
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16987
|
+
})
|
|
16988
|
+
]);
|
|
16989
|
+
|
|
16947
16990
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16948
16991
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16949
16992
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16964,7 +17007,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16964
17007
|
identity: external_exports.string().max(4096).nullable()
|
|
16965
17008
|
});
|
|
16966
17009
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
17010
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16967
17011
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
17012
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16968
17013
|
external_exports.strictObject({
|
|
16969
17014
|
action: external_exports.literal("read-thread"),
|
|
16970
17015
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -25757,9 +25802,9 @@ var __returnValue = (v) => v;
|
|
|
25757
25802
|
function __exportSetter(name, newValue) {
|
|
25758
25803
|
this[name] = __returnValue.bind(null, newValue);
|
|
25759
25804
|
}
|
|
25760
|
-
var __export2 = (
|
|
25805
|
+
var __export2 = (target2, all) => {
|
|
25761
25806
|
for (var name in all)
|
|
25762
|
-
__defProp2(
|
|
25807
|
+
__defProp2(target2, name, {
|
|
25763
25808
|
get: all[name],
|
|
25764
25809
|
enumerable: true,
|
|
25765
25810
|
configurable: true,
|
|
@@ -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
|
|
@@ -1298,8 +1298,8 @@ function defineLazy(object3, key, getter) {
|
|
|
1298
1298
|
function objectClone(obj) {
|
|
1299
1299
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
1300
1300
|
}
|
|
1301
|
-
function assignProp(
|
|
1302
|
-
Object.defineProperty(
|
|
1301
|
+
function assignProp(target2, prop, value) {
|
|
1302
|
+
Object.defineProperty(target2, prop, {
|
|
1303
1303
|
value,
|
|
1304
1304
|
writable: true,
|
|
1305
1305
|
enumerable: true,
|
|
@@ -1482,35 +1482,35 @@ function normalizeParams(_params) {
|
|
|
1482
1482
|
return params;
|
|
1483
1483
|
}
|
|
1484
1484
|
function createTransparentProxy(getter) {
|
|
1485
|
-
let
|
|
1485
|
+
let target2;
|
|
1486
1486
|
return new Proxy({}, {
|
|
1487
1487
|
get(_, prop, receiver) {
|
|
1488
|
-
|
|
1489
|
-
return Reflect.get(
|
|
1488
|
+
target2 ?? (target2 = getter());
|
|
1489
|
+
return Reflect.get(target2, prop, receiver);
|
|
1490
1490
|
},
|
|
1491
1491
|
set(_, prop, value, receiver) {
|
|
1492
|
-
|
|
1493
|
-
return Reflect.set(
|
|
1492
|
+
target2 ?? (target2 = getter());
|
|
1493
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1494
1494
|
},
|
|
1495
1495
|
has(_, prop) {
|
|
1496
|
-
|
|
1497
|
-
return Reflect.has(
|
|
1496
|
+
target2 ?? (target2 = getter());
|
|
1497
|
+
return Reflect.has(target2, prop);
|
|
1498
1498
|
},
|
|
1499
1499
|
deleteProperty(_, prop) {
|
|
1500
|
-
|
|
1501
|
-
return Reflect.deleteProperty(
|
|
1500
|
+
target2 ?? (target2 = getter());
|
|
1501
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1502
1502
|
},
|
|
1503
1503
|
ownKeys(_) {
|
|
1504
|
-
|
|
1505
|
-
return Reflect.ownKeys(
|
|
1504
|
+
target2 ?? (target2 = getter());
|
|
1505
|
+
return Reflect.ownKeys(target2);
|
|
1506
1506
|
},
|
|
1507
1507
|
getOwnPropertyDescriptor(_, prop) {
|
|
1508
|
-
|
|
1509
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1508
|
+
target2 ?? (target2 = getter());
|
|
1509
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1510
1510
|
},
|
|
1511
1511
|
defineProperty(_, prop, descriptor) {
|
|
1512
|
-
|
|
1513
|
-
return Reflect.defineProperty(
|
|
1512
|
+
target2 ?? (target2 = getter());
|
|
1513
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1514
1514
|
}
|
|
1515
1515
|
});
|
|
1516
1516
|
}
|
|
@@ -11962,15 +11962,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
11962
11962
|
|
|
11963
11963
|
// ../../../node_modules/zod/v4/core/to-json-schema.js
|
|
11964
11964
|
function initializeContext(params) {
|
|
11965
|
-
let
|
|
11966
|
-
if (
|
|
11967
|
-
|
|
11968
|
-
if (
|
|
11969
|
-
|
|
11965
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11966
|
+
if (target2 === "draft-4")
|
|
11967
|
+
target2 = "draft-04";
|
|
11968
|
+
if (target2 === "draft-7")
|
|
11969
|
+
target2 = "draft-07";
|
|
11970
11970
|
return {
|
|
11971
11971
|
processors: params.processors ?? {},
|
|
11972
11972
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11973
|
-
target,
|
|
11973
|
+
target: target2,
|
|
11974
11974
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11975
11975
|
override: params?.override ?? (() => {
|
|
11976
11976
|
}),
|
|
@@ -12312,8 +12312,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
12312
12312
|
return finalize(ctx, schema);
|
|
12313
12313
|
};
|
|
12314
12314
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
12315
|
-
const { libraryOptions, target } = params ?? {};
|
|
12316
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
12315
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
12316
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
12317
12317
|
process2(schema, ctx);
|
|
12318
12318
|
extractDefs(ctx, schema);
|
|
12319
12319
|
return finalize(ctx, schema);
|
|
@@ -13372,8 +13372,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
13372
13372
|
catch(params) {
|
|
13373
13373
|
return _catch2(this, params);
|
|
13374
13374
|
},
|
|
13375
|
-
pipe(
|
|
13376
|
-
return pipe(this,
|
|
13375
|
+
pipe(target2) {
|
|
13376
|
+
return pipe(this, target2);
|
|
13377
13377
|
},
|
|
13378
13378
|
readonly() {
|
|
13379
13379
|
return readonly(this);
|
|
@@ -15603,15 +15603,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15603
15603
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15604
15604
|
}).strict().superRefine(({ threads }, context) => {
|
|
15605
15605
|
const seen = /* @__PURE__ */ new Set();
|
|
15606
|
-
for (const [index,
|
|
15607
|
-
if (seen.has(
|
|
15606
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15607
|
+
if (seen.has(thread2.threadId)) {
|
|
15608
15608
|
context.addIssue({
|
|
15609
15609
|
code: "custom",
|
|
15610
15610
|
message: "Thread ownership-list results must be unique",
|
|
15611
15611
|
path: ["threads", index, "threadId"]
|
|
15612
15612
|
});
|
|
15613
15613
|
}
|
|
15614
|
-
seen.add(
|
|
15614
|
+
seen.add(thread2.threadId);
|
|
15615
15615
|
}
|
|
15616
15616
|
});
|
|
15617
15617
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -15820,13 +15820,18 @@ var clientChannelResponseSchema = external_exports.object({
|
|
|
15820
15820
|
});
|
|
15821
15821
|
|
|
15822
15822
|
// ../../shared-contracts/dist/thread-catalog.js
|
|
15823
|
-
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15823
|
+
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15824
|
+
includeArchived: external_exports.boolean().optional(),
|
|
15825
|
+
/** Absent means first page; null means this branch is exhausted. Native cursors only. */
|
|
15826
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15827
|
+
}).strict();
|
|
15824
15828
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
15825
15829
|
threads: external_exports.array(jsonObjectSchema),
|
|
15826
15830
|
ownership: external_exports.array(threadOwnershipSchema),
|
|
15827
15831
|
/** Known archived IDs, including visible local external records even when their rows are
|
|
15828
|
-
* excluded. Native archived IDs
|
|
15829
|
-
archivedThreadIds: external_exports.array(hostThreadIdSchema)
|
|
15832
|
+
* excluded. Native archived IDs describe only the returned page, never a complete set. */
|
|
15833
|
+
archivedThreadIds: external_exports.array(hostThreadIdSchema),
|
|
15834
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15830
15835
|
}).strict();
|
|
15831
15836
|
|
|
15832
15837
|
// ../../shared-contracts/dist/voice.js
|
|
@@ -16041,7 +16046,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
|
16041
16046
|
});
|
|
16042
16047
|
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
16043
16048
|
enabled: false,
|
|
16044
|
-
timeoutMinutes:
|
|
16049
|
+
timeoutMinutes: 10
|
|
16045
16050
|
});
|
|
16046
16051
|
|
|
16047
16052
|
// ../../shared-contracts/dist/harness-preferences.js
|
|
@@ -16944,6 +16949,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
|
|
|
16944
16949
|
}).strict();
|
|
16945
16950
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16946
16951
|
|
|
16952
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
16953
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16954
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16955
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16956
|
+
var thread = { ...target, threadId: identity };
|
|
16957
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16958
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16959
|
+
external_exports.strictObject({
|
|
16960
|
+
kind: external_exports.literal("list"),
|
|
16961
|
+
...target,
|
|
16962
|
+
cursor: external_exports.string().nullable(),
|
|
16963
|
+
archived: external_exports.boolean()
|
|
16964
|
+
}),
|
|
16965
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16966
|
+
external_exports.strictObject({
|
|
16967
|
+
kind: external_exports.literal("prompt"),
|
|
16968
|
+
...thread,
|
|
16969
|
+
epoch: identity,
|
|
16970
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16971
|
+
requestId: identity.optional()
|
|
16972
|
+
}),
|
|
16973
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16974
|
+
external_exports.strictObject({
|
|
16975
|
+
kind: external_exports.literal("rename"),
|
|
16976
|
+
...thread,
|
|
16977
|
+
epoch: identity,
|
|
16978
|
+
name: external_exports.string().min(1).max(512)
|
|
16979
|
+
}),
|
|
16980
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16981
|
+
external_exports.strictObject({
|
|
16982
|
+
kind: external_exports.literal("respond"),
|
|
16983
|
+
...thread,
|
|
16984
|
+
epoch: identity,
|
|
16985
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16986
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16987
|
+
})
|
|
16988
|
+
]);
|
|
16989
|
+
|
|
16947
16990
|
// ../../shared-contracts/dist/remote-connections.js
|
|
16948
16991
|
var hostId = external_exports.string().min(1).max(1024);
|
|
16949
16992
|
var codexSshConnectionSchema = external_exports.object({
|
|
@@ -16964,7 +17007,9 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
16964
17007
|
identity: external_exports.string().max(4096).nullable()
|
|
16965
17008
|
});
|
|
16966
17009
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
17010
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16967
17011
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
17012
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16968
17013
|
external_exports.strictObject({
|
|
16969
17014
|
action: external_exports.literal("read-thread"),
|
|
16970
17015
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -18518,17 +18563,17 @@ function piHistoryMessageIdentities(sessionId, entries) {
|
|
|
18518
18563
|
const timestampCounts = /* @__PURE__ */ new Map();
|
|
18519
18564
|
const identities = /* @__PURE__ */ new Map();
|
|
18520
18565
|
for (const entry of entries) {
|
|
18521
|
-
const
|
|
18522
|
-
if (
|
|
18523
|
-
identities.set(entry.id,
|
|
18566
|
+
const identity2 = piMessageIdentity(sessionId, entry.message, timestampCounts);
|
|
18567
|
+
if (identity2)
|
|
18568
|
+
identities.set(entry.id, identity2);
|
|
18524
18569
|
}
|
|
18525
18570
|
return { identities, timestampCounts };
|
|
18526
18571
|
}
|
|
18527
|
-
function piMessageItemId(
|
|
18528
|
-
if (!
|
|
18572
|
+
function piMessageItemId(identity2, kind) {
|
|
18573
|
+
if (!identity2)
|
|
18529
18574
|
return null;
|
|
18530
|
-
const timestampIdentity = "timestamp" in
|
|
18531
|
-
const value = timestampIdentity ? JSON.stringify([
|
|
18575
|
+
const timestampIdentity = "timestamp" in identity2;
|
|
18576
|
+
const value = timestampIdentity ? JSON.stringify([identity2.sessionId, identity2.timestamp, identity2.occurrence]) : identity2.responseId;
|
|
18532
18577
|
const digest = createHash("sha256").update(value).digest("hex");
|
|
18533
18578
|
return hostItemIdSchema.parse(`pi-${timestampIdentity ? "message" : "response"}-v1-${digest}-${kind}`);
|
|
18534
18579
|
}
|
|
@@ -20830,7 +20875,7 @@ function record8(value) {
|
|
|
20830
20875
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20831
20876
|
}
|
|
20832
20877
|
var MAX_SESSION_BYTES = 8 * 1024 * 1024;
|
|
20833
|
-
async function childHistory(file2, parentSessionId,
|
|
20878
|
+
async function childHistory(file2, parentSessionId, identity2, validateParent = false) {
|
|
20834
20879
|
if (!path13.isAbsolute(file2))
|
|
20835
20880
|
throw new Error("Pi child Session path is not absolute");
|
|
20836
20881
|
const handle = await open3(file2, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
@@ -20861,7 +20906,7 @@ async function childHistory(file2, parentSessionId, identity, validateParent = f
|
|
|
20861
20906
|
model: null,
|
|
20862
20907
|
...typeof header.cwd === "string" ? { cwd: header.cwd } : {}
|
|
20863
20908
|
});
|
|
20864
|
-
const prefix = createHash6("sha256").update(
|
|
20909
|
+
const prefix = createHash6("sha256").update(identity2).digest("hex");
|
|
20865
20910
|
return {
|
|
20866
20911
|
turns: snapshot.turns.map((turn) => {
|
|
20867
20912
|
const readonlyTurn = {
|
|
@@ -21207,7 +21252,7 @@ function nodeOnPath(environment) {
|
|
|
21207
21252
|
}
|
|
21208
21253
|
return process.execPath;
|
|
21209
21254
|
}
|
|
21210
|
-
function npmShim(
|
|
21255
|
+
function npmShim(target2, pathExtFix = false) {
|
|
21211
21256
|
return `@ECHO off
|
|
21212
21257
|
GOTO start
|
|
21213
21258
|
:find_dp0
|
|
@@ -21223,7 +21268,7 @@ IF EXIST "%dp0%\\node.exe" (
|
|
|
21223
21268
|
SET "_prog=node"
|
|
21224
21269
|
${pathExtFix ? "" : " SET PATHEXT=%PATHEXT:;.JS;=;%\n"})
|
|
21225
21270
|
|
|
21226
|
-
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & ${pathExtFix ? "set PATHEXT=%PATHEXT:;.JS;=;% & " : ""}"%_prog%" "%dp0%\\${
|
|
21271
|
+
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & ${pathExtFix ? "set PATHEXT=%PATHEXT:;.JS;=;% & " : ""}"%_prog%" "%dp0%\\${target2}" %*`;
|
|
21227
21272
|
}
|
|
21228
21273
|
var standaloneNodeSetup = 'IF EXIST "%LOCALAPPDATA%\\pi-node\\current\\node.exe" SET "node=%LOCALAPPDATA%\\pi-node\\current\\node.exe"';
|
|
21229
21274
|
function managedShim(standalone) {
|
|
@@ -21253,8 +21298,8 @@ function piUncNodeInvocation(command, arguments_, environment) {
|
|
|
21253
21298
|
const manifest = JSON.parse(text3(path15.join(packageDirectory, "package.json")) ?? "");
|
|
21254
21299
|
if (typeof manifest === "object" && manifest !== null && "name" in manifest && manifest.name === "@earendil-works/pi-coding-agent") {
|
|
21255
21300
|
const entry = findPiCliEntry(packageDirectory);
|
|
21256
|
-
const
|
|
21257
|
-
if (entry &&
|
|
21301
|
+
const target2 = entry && path15.relative(directory, entry).replaceAll("/", "\\");
|
|
21302
|
+
if (entry && target2 && [npmShim(target2), npmShim(target2, true)].includes(source)) {
|
|
21258
21303
|
const localNode = path15.join(directory, "node.exe");
|
|
21259
21304
|
return {
|
|
21260
21305
|
command: isFile(localNode) ? localNode : nodeOnPath(environment),
|
|
@@ -23372,15 +23417,15 @@ var PiHarnessSession = class {
|
|
|
23372
23417
|
void transport.runTurn(text4, (event) => this.#handleTurnEvent(active, event)).then(async (result) => {
|
|
23373
23418
|
active.settling = true;
|
|
23374
23419
|
try {
|
|
23375
|
-
const
|
|
23420
|
+
const identity2 = await this.#completedTurnIdentity(active, transport);
|
|
23376
23421
|
this.#completeTurn(active, result.cancelled ? {
|
|
23377
23422
|
status: "cancelled",
|
|
23378
23423
|
reason: "Cancelled by user",
|
|
23379
|
-
...
|
|
23424
|
+
...identity2.checkpoint ? { checkpoint: identity2.checkpoint } : {}
|
|
23380
23425
|
} : {
|
|
23381
23426
|
status: "succeeded",
|
|
23382
|
-
...
|
|
23383
|
-
}, result.text,
|
|
23427
|
+
...identity2.checkpoint ? { checkpoint: identity2.checkpoint } : {}
|
|
23428
|
+
}, result.text, identity2.nativeTurnRef);
|
|
23384
23429
|
} catch (error51) {
|
|
23385
23430
|
this.#completeTurn(active, {
|
|
23386
23431
|
status: "failed",
|
|
@@ -23389,20 +23434,20 @@ var PiHarnessSession = class {
|
|
|
23389
23434
|
}
|
|
23390
23435
|
}).catch(async (error51) => {
|
|
23391
23436
|
active.settling = true;
|
|
23392
|
-
let
|
|
23437
|
+
let identity2;
|
|
23393
23438
|
try {
|
|
23394
|
-
|
|
23439
|
+
identity2 = await this.#completedTurnIdentity(active, transport);
|
|
23395
23440
|
} catch {
|
|
23396
23441
|
}
|
|
23397
23442
|
this.#completeTurn(active, active.cancellationRequested ? {
|
|
23398
23443
|
status: "cancelled",
|
|
23399
23444
|
reason: "Cancelled by user",
|
|
23400
|
-
...
|
|
23445
|
+
...identity2?.checkpoint ? { checkpoint: identity2.checkpoint } : {}
|
|
23401
23446
|
} : {
|
|
23402
23447
|
status: "failed",
|
|
23403
23448
|
error: normalizedError(error51, "nativeFailure"),
|
|
23404
|
-
...
|
|
23405
|
-
}, void 0,
|
|
23449
|
+
...identity2?.checkpoint ? { checkpoint: identity2.checkpoint } : {}
|
|
23450
|
+
}, void 0, identity2?.nativeTurnRef);
|
|
23406
23451
|
});
|
|
23407
23452
|
return { ok: true, value: { turnId: command.turnId } };
|
|
23408
23453
|
} finally {
|