@codexhost/cli-linux-arm64 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
package/app/console-web.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __export = (
|
|
4
|
+
var __export = (target2, all) => {
|
|
5
5
|
for (var name in all)
|
|
6
|
-
__defProp(
|
|
6
|
+
__defProp(target2, name, { get: all[name], enumerable: true });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/console/api.ts
|
|
@@ -840,8 +840,8 @@
|
|
|
840
840
|
function objectClone(obj) {
|
|
841
841
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
842
842
|
}
|
|
843
|
-
function assignProp(
|
|
844
|
-
Object.defineProperty(
|
|
843
|
+
function assignProp(target2, prop, value) {
|
|
844
|
+
Object.defineProperty(target2, prop, {
|
|
845
845
|
value,
|
|
846
846
|
writable: true,
|
|
847
847
|
enumerable: true,
|
|
@@ -1024,35 +1024,35 @@
|
|
|
1024
1024
|
return params;
|
|
1025
1025
|
}
|
|
1026
1026
|
function createTransparentProxy(getter) {
|
|
1027
|
-
let
|
|
1027
|
+
let target2;
|
|
1028
1028
|
return new Proxy({}, {
|
|
1029
1029
|
get(_, prop, receiver) {
|
|
1030
|
-
|
|
1031
|
-
return Reflect.get(
|
|
1030
|
+
target2 ?? (target2 = getter());
|
|
1031
|
+
return Reflect.get(target2, prop, receiver);
|
|
1032
1032
|
},
|
|
1033
1033
|
set(_, prop, value, receiver) {
|
|
1034
|
-
|
|
1035
|
-
return Reflect.set(
|
|
1034
|
+
target2 ?? (target2 = getter());
|
|
1035
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
1036
1036
|
},
|
|
1037
1037
|
has(_, prop) {
|
|
1038
|
-
|
|
1039
|
-
return Reflect.has(
|
|
1038
|
+
target2 ?? (target2 = getter());
|
|
1039
|
+
return Reflect.has(target2, prop);
|
|
1040
1040
|
},
|
|
1041
1041
|
deleteProperty(_, prop) {
|
|
1042
|
-
|
|
1043
|
-
return Reflect.deleteProperty(
|
|
1042
|
+
target2 ?? (target2 = getter());
|
|
1043
|
+
return Reflect.deleteProperty(target2, prop);
|
|
1044
1044
|
},
|
|
1045
1045
|
ownKeys(_) {
|
|
1046
|
-
|
|
1047
|
-
return Reflect.ownKeys(
|
|
1046
|
+
target2 ?? (target2 = getter());
|
|
1047
|
+
return Reflect.ownKeys(target2);
|
|
1048
1048
|
},
|
|
1049
1049
|
getOwnPropertyDescriptor(_, prop) {
|
|
1050
|
-
|
|
1051
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1050
|
+
target2 ?? (target2 = getter());
|
|
1051
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
1052
1052
|
},
|
|
1053
1053
|
defineProperty(_, prop, descriptor) {
|
|
1054
|
-
|
|
1055
|
-
return Reflect.defineProperty(
|
|
1054
|
+
target2 ?? (target2 = getter());
|
|
1055
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
@@ -11504,15 +11504,15 @@
|
|
|
11504
11504
|
|
|
11505
11505
|
// ../../node_modules/zod/v4/core/to-json-schema.js
|
|
11506
11506
|
function initializeContext(params) {
|
|
11507
|
-
let
|
|
11508
|
-
if (
|
|
11509
|
-
|
|
11510
|
-
if (
|
|
11511
|
-
|
|
11507
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
11508
|
+
if (target2 === "draft-4")
|
|
11509
|
+
target2 = "draft-04";
|
|
11510
|
+
if (target2 === "draft-7")
|
|
11511
|
+
target2 = "draft-07";
|
|
11512
11512
|
return {
|
|
11513
11513
|
processors: params.processors ?? {},
|
|
11514
11514
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
11515
|
-
target,
|
|
11515
|
+
target: target2,
|
|
11516
11516
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
11517
11517
|
override: params?.override ?? (() => {
|
|
11518
11518
|
}),
|
|
@@ -11854,8 +11854,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11854
11854
|
return finalize(ctx, schema);
|
|
11855
11855
|
};
|
|
11856
11856
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
11857
|
-
const { libraryOptions, target } = params ?? {};
|
|
11858
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
11857
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
11858
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
|
|
11859
11859
|
process(schema, ctx);
|
|
11860
11860
|
extractDefs(ctx, schema);
|
|
11861
11861
|
return finalize(ctx, schema);
|
|
@@ -12914,8 +12914,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
12914
12914
|
catch(params) {
|
|
12915
12915
|
return _catch2(this, params);
|
|
12916
12916
|
},
|
|
12917
|
-
pipe(
|
|
12918
|
-
return pipe(this,
|
|
12917
|
+
pipe(target2) {
|
|
12918
|
+
return pipe(this, target2);
|
|
12919
12919
|
},
|
|
12920
12920
|
readonly() {
|
|
12921
12921
|
return readonly(this);
|
|
@@ -15167,15 +15167,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15167
15167
|
threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
|
|
15168
15168
|
}).strict().superRefine(({ threads }, context) => {
|
|
15169
15169
|
const seen = /* @__PURE__ */ new Set();
|
|
15170
|
-
for (const [index,
|
|
15171
|
-
if (seen.has(
|
|
15170
|
+
for (const [index, thread2] of threads.entries()) {
|
|
15171
|
+
if (seen.has(thread2.threadId)) {
|
|
15172
15172
|
context.addIssue({
|
|
15173
15173
|
code: "custom",
|
|
15174
15174
|
message: "Thread ownership-list results must be unique",
|
|
15175
15175
|
path: ["threads", index, "threadId"]
|
|
15176
15176
|
});
|
|
15177
15177
|
}
|
|
15178
|
-
seen.add(
|
|
15178
|
+
seen.add(thread2.threadId);
|
|
15179
15179
|
}
|
|
15180
15180
|
});
|
|
15181
15181
|
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
@@ -15384,13 +15384,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15384
15384
|
});
|
|
15385
15385
|
|
|
15386
15386
|
// ../shared-contracts/dist/thread-catalog.js
|
|
15387
|
-
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15387
|
+
var threadCatalogReadParamsSchema = external_exports.object({
|
|
15388
|
+
includeArchived: external_exports.boolean().optional(),
|
|
15389
|
+
/** Absent means first page; null means this branch is exhausted. Native cursors only. */
|
|
15390
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15391
|
+
}).strict();
|
|
15388
15392
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
15389
15393
|
threads: external_exports.array(jsonObjectSchema),
|
|
15390
15394
|
ownership: external_exports.array(threadOwnershipSchema),
|
|
15391
15395
|
/** Known archived IDs, including visible local external records even when their rows are
|
|
15392
|
-
* excluded. Native archived IDs
|
|
15393
|
-
archivedThreadIds: external_exports.array(hostThreadIdSchema)
|
|
15396
|
+
* excluded. Native archived IDs describe only the returned page, never a complete set. */
|
|
15397
|
+
archivedThreadIds: external_exports.array(hostThreadIdSchema),
|
|
15398
|
+
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
15394
15399
|
}).strict();
|
|
15395
15400
|
|
|
15396
15401
|
// ../shared-contracts/dist/voice.js
|
|
@@ -15630,7 +15635,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15630
15635
|
});
|
|
15631
15636
|
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
15632
15637
|
enabled: false,
|
|
15633
|
-
timeoutMinutes:
|
|
15638
|
+
timeoutMinutes: 10
|
|
15634
15639
|
});
|
|
15635
15640
|
|
|
15636
15641
|
// ../shared-contracts/dist/harness-preferences.js
|
|
@@ -16559,6 +16564,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16559
16564
|
}).strict();
|
|
16560
16565
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16561
16566
|
|
|
16567
|
+
// ../shared-contracts/dist/remote-sessions.js
|
|
16568
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
16569
|
+
var identity = external_exports.string().min(1).max(1024);
|
|
16570
|
+
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
16571
|
+
var thread = { ...target, threadId: identity };
|
|
16572
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16573
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16574
|
+
external_exports.strictObject({
|
|
16575
|
+
kind: external_exports.literal("list"),
|
|
16576
|
+
...target,
|
|
16577
|
+
cursor: external_exports.string().nullable(),
|
|
16578
|
+
archived: external_exports.boolean()
|
|
16579
|
+
}),
|
|
16580
|
+
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16581
|
+
external_exports.strictObject({
|
|
16582
|
+
kind: external_exports.literal("prompt"),
|
|
16583
|
+
...thread,
|
|
16584
|
+
epoch: identity,
|
|
16585
|
+
text: external_exports.string().min(1).max(8e3),
|
|
16586
|
+
requestId: identity.optional()
|
|
16587
|
+
}),
|
|
16588
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
16589
|
+
external_exports.strictObject({
|
|
16590
|
+
kind: external_exports.literal("rename"),
|
|
16591
|
+
...thread,
|
|
16592
|
+
epoch: identity,
|
|
16593
|
+
name: external_exports.string().min(1).max(512)
|
|
16594
|
+
}),
|
|
16595
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
16596
|
+
external_exports.strictObject({
|
|
16597
|
+
kind: external_exports.literal("respond"),
|
|
16598
|
+
...thread,
|
|
16599
|
+
epoch: identity,
|
|
16600
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
16601
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
16602
|
+
})
|
|
16603
|
+
]);
|
|
16604
|
+
|
|
16562
16605
|
// ../shared-contracts/dist/remote-connections.js
|
|
16563
16606
|
var CONSOLE_REMOTE_CONNECTIONS_METHOD = "codexhost/console/remote-connections";
|
|
16564
16607
|
var hostId = external_exports.string().min(1).max(1024);
|
|
@@ -16580,7 +16623,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16580
16623
|
identity: external_exports.string().max(4096).nullable()
|
|
16581
16624
|
});
|
|
16582
16625
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16626
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16583
16627
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16628
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16584
16629
|
external_exports.strictObject({
|
|
16585
16630
|
action: external_exports.literal("read-thread"),
|
|
16586
16631
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -19285,7 +19330,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19285
19330
|
list.replaceChildren(
|
|
19286
19331
|
...harnesses.map((harness2) => {
|
|
19287
19332
|
const guide = harness2.links?.installation ?? harness2.links?.documentation;
|
|
19288
|
-
const
|
|
19333
|
+
const identity2 = h(
|
|
19289
19334
|
document2,
|
|
19290
19335
|
"div",
|
|
19291
19336
|
{ className: "console-harness__identity" },
|
|
@@ -19313,7 +19358,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19313
19358
|
harness2.enabled ? messages.enabled : messages.disabled
|
|
19314
19359
|
)
|
|
19315
19360
|
);
|
|
19316
|
-
const row = h(document2, "div", { className: "console-harness" },
|
|
19361
|
+
const row = h(document2, "div", { className: "console-harness" }, identity2);
|
|
19317
19362
|
if (harness2.launchCommand) {
|
|
19318
19363
|
const input = h(document2, "input", {
|
|
19319
19364
|
type: "text",
|
|
@@ -19350,7 +19395,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19350
19395
|
}
|
|
19351
19396
|
}
|
|
19352
19397
|
if (guide) {
|
|
19353
|
-
|
|
19398
|
+
identity2.append(
|
|
19354
19399
|
h(
|
|
19355
19400
|
document2,
|
|
19356
19401
|
"a",
|
|
@@ -20121,8 +20166,8 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20121
20166
|
}
|
|
20122
20167
|
async function verifyNativeCodexThread(sendRequest, threadId) {
|
|
20123
20168
|
const native = await sendRequest("thread/read", { threadId, includeTurns: false });
|
|
20124
|
-
const
|
|
20125
|
-
if (!isRecord(
|
|
20169
|
+
const thread2 = isRecord(native) ? native.thread : null;
|
|
20170
|
+
if (!isRecord(thread2) || thread2.id !== threadId || typeof thread2.modelProvider !== "string" || !thread2.modelProvider || thread2.modelProvider === "codexhost" || typeof thread2.cliVersion !== "string" || !thread2.cliVersion || thread2.cliVersion === "codexhost") {
|
|
20126
20171
|
throw new Error("Native Thread response cannot establish Codex ownership");
|
|
20127
20172
|
}
|
|
20128
20173
|
}
|
|
@@ -20390,7 +20435,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20390
20435
|
const params = threadOwnershipListParamsSchema.parse(input);
|
|
20391
20436
|
const value = await manager.sendRequest(THREAD_OWNERSHIP_LIST_METHOD, params);
|
|
20392
20437
|
const result = threadOwnershipListResultSchema.parse(value);
|
|
20393
|
-
if (result.threads.length !== params.threadIds.length || result.threads.some((
|
|
20438
|
+
if (result.threads.length !== params.threadIds.length || result.threads.some((thread2, index) => thread2.threadId !== params.threadIds[index])) {
|
|
20394
20439
|
throw new Error("Thread ownership-list result does not match the requested IDs");
|
|
20395
20440
|
}
|
|
20396
20441
|
return result;
|
|
@@ -21287,13 +21332,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21287
21332
|
"\u6B63\u5728\u91CD\u542F Web\u2026 \u7B49\u5F85\u6062\u590D\u8FDE\u63A5\u3002",
|
|
21288
21333
|
"Restarting Web\u2026 waiting for reconnection."
|
|
21289
21334
|
);
|
|
21290
|
-
const
|
|
21335
|
+
const target2 = params.enabled;
|
|
21291
21336
|
const deadline = Date.now() + 6e4;
|
|
21292
21337
|
while (!signal.aborted) {
|
|
21293
21338
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
21294
21339
|
try {
|
|
21295
21340
|
await load();
|
|
21296
|
-
if (state?.background?.lan ===
|
|
21341
|
+
if (state?.background?.lan === target2) break;
|
|
21297
21342
|
} catch {
|
|
21298
21343
|
}
|
|
21299
21344
|
if (Date.now() >= deadline)
|
|
@@ -23398,20 +23443,20 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
23398
23443
|
unmeteredRequests: 0
|
|
23399
23444
|
};
|
|
23400
23445
|
}
|
|
23401
|
-
function addTotals(
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
return
|
|
23446
|
+
function addTotals(target2, source) {
|
|
23447
|
+
target2.requests += source.requests;
|
|
23448
|
+
target2.inputTokens += source.inputTokens;
|
|
23449
|
+
target2.cachedInputTokens += source.cachedInputTokens;
|
|
23450
|
+
target2.cacheWriteInputTokens += source.cacheWriteInputTokens;
|
|
23451
|
+
target2.cacheKnownInputTokens += source.cacheKnownInputTokens;
|
|
23452
|
+
target2.cacheHitCachedInputTokens += source.cacheHitCachedInputTokens;
|
|
23453
|
+
target2.cacheHitInputTokens += source.cacheHitInputTokens;
|
|
23454
|
+
target2.outputTokens += source.outputTokens;
|
|
23455
|
+
target2.reasoningOutputTokens += source.reasoningOutputTokens;
|
|
23456
|
+
target2.costUsd += source.costUsd;
|
|
23457
|
+
target2.unpricedRequests += source.unpricedRequests;
|
|
23458
|
+
target2.unmeteredRequests += source.unmeteredRequests;
|
|
23459
|
+
return target2;
|
|
23415
23460
|
}
|
|
23416
23461
|
function inputWithoutCache(totals2) {
|
|
23417
23462
|
return totals2.inputTokens - totals2.cachedInputTokens - totals2.cacheWriteInputTokens;
|
|
@@ -26009,7 +26054,7 @@ ${detail}` : ""}`
|
|
|
26009
26054
|
card.setAttribute("aria-label", connection.displayName);
|
|
26010
26055
|
card.setAttribute("aria-busy", String(locked));
|
|
26011
26056
|
const head = remoteElement(document2, "div", "settings-remote-card__head");
|
|
26012
|
-
const
|
|
26057
|
+
const identity2 = remoteElement(document2, "div", "settings-remote-card__identity");
|
|
26013
26058
|
const titleLine = remoteElement(document2, "div", "settings-remote-card__title");
|
|
26014
26059
|
const [tone, stateLabel] = connectionState(row, t);
|
|
26015
26060
|
const state = remoteElement(document2, "span", "settings-remote-card__state", stateLabel);
|
|
@@ -26022,7 +26067,7 @@ ${detail}` : ""}`
|
|
|
26022
26067
|
addressLine.append(
|
|
26023
26068
|
remoteElement(document2, "span", "settings-status-badge", t("SSH \u914D\u7F6E", "SSH config"))
|
|
26024
26069
|
);
|
|
26025
|
-
|
|
26070
|
+
identity2.append(titleLine, addressLine);
|
|
26026
26071
|
const headActions = remoteElement(document2, "div", "settings-remote-card__actions");
|
|
26027
26072
|
if (row.installation !== "not-installed" && !row.probing) {
|
|
26028
26073
|
if (row.state === "error" && connection.autoConnect)
|
|
@@ -26045,7 +26090,7 @@ ${detail}` : ""}`
|
|
|
26045
26090
|
remove.append(createRendererSettingsIcon("trash", 15));
|
|
26046
26091
|
remove.addEventListener("click", () => onAction("remove"));
|
|
26047
26092
|
headActions.append(remove);
|
|
26048
|
-
head.append(
|
|
26093
|
+
head.append(identity2, headActions);
|
|
26049
26094
|
card.append(head);
|
|
26050
26095
|
if (row.stateError) {
|
|
26051
26096
|
const detail = remoteElement(
|
|
@@ -26097,15 +26142,15 @@ ${detail}` : ""}`
|
|
|
26097
26142
|
}
|
|
26098
26143
|
if (!remote) serviceActions.append(command("recheck", t("\u91CD\u65B0\u68C0\u6D4B", "Check again")));
|
|
26099
26144
|
}
|
|
26100
|
-
const
|
|
26145
|
+
const target2 = remote ? remoteMaintenanceTarget(local, remote) : null;
|
|
26101
26146
|
if (row.installation === "not-installed") {
|
|
26102
26147
|
const install = command("install", t("\u5B89\u88C5\u5E76\u8FDE\u63A5", "Install and connect"), true);
|
|
26103
26148
|
install.disabled ||= !remoteInstallVersion(local);
|
|
26104
26149
|
serviceActions.append(install);
|
|
26105
|
-
} else if (remote &&
|
|
26150
|
+
} else if (remote && target2 && !remoteBusy(remote)) {
|
|
26106
26151
|
const update = command(
|
|
26107
26152
|
"update",
|
|
26108
|
-
|
|
26153
|
+
target2 === remote.installedVersion ? t("\u91CD\u542F\u5E76\u8FDE\u63A5", "Restart and connect") : t("\u66F4\u65B0\u5230\u672C\u673A\u7248\u672C", "Match local version"),
|
|
26109
26154
|
true
|
|
26110
26155
|
);
|
|
26111
26156
|
serviceActions.append(update);
|
|
@@ -26339,13 +26384,13 @@ ${detail}` : ""}`
|
|
|
26339
26384
|
port.min = "1";
|
|
26340
26385
|
port.max = "65535";
|
|
26341
26386
|
port.step = "1";
|
|
26342
|
-
const
|
|
26387
|
+
const identity2 = field2(
|
|
26343
26388
|
t("\u79C1\u94A5\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09", "Identity file (optional)"),
|
|
26344
26389
|
previous?.identity ?? "",
|
|
26345
26390
|
"~/.ssh/id_ed25519"
|
|
26346
26391
|
);
|
|
26347
26392
|
if (previous?.source === "discovered") {
|
|
26348
|
-
hostname3.disabled = port.disabled =
|
|
26393
|
+
hostname3.disabled = port.disabled = identity2.disabled = true;
|
|
26349
26394
|
dialog.body.append(
|
|
26350
26395
|
remoteElement(
|
|
26351
26396
|
document2,
|
|
@@ -26365,7 +26410,7 @@ ${detail}` : ""}`
|
|
|
26365
26410
|
displayName: name.value,
|
|
26366
26411
|
hostname: hostname3.value,
|
|
26367
26412
|
sshPort: port.value ? Number(port.value) : null,
|
|
26368
|
-
identity:
|
|
26413
|
+
identity: identity2.value.trim() || null
|
|
26369
26414
|
})
|
|
26370
26415
|
);
|
|
26371
26416
|
});
|
|
@@ -26686,8 +26731,8 @@ ${detail}` : ""}`
|
|
|
26686
26731
|
});
|
|
26687
26732
|
}
|
|
26688
26733
|
function focusAction(card, action) {
|
|
26689
|
-
const
|
|
26690
|
-
|
|
26734
|
+
const target2 = card.querySelector(`[data-action="${action}"]:not(:disabled)`) ?? card.querySelector("button:not(:disabled)");
|
|
26735
|
+
target2?.focus();
|
|
26691
26736
|
}
|
|
26692
26737
|
async function probe(row) {
|
|
26693
26738
|
const { hostId: hostId2 } = row.connection;
|
|
@@ -26968,15 +27013,15 @@ ${detail}` : ""}`
|
|
|
26968
27013
|
});
|
|
26969
27014
|
break;
|
|
26970
27015
|
case "update": {
|
|
26971
|
-
const
|
|
26972
|
-
if (!
|
|
26973
|
-
const restart =
|
|
27016
|
+
const target2 = row.remote ? remoteMaintenanceTarget(local, row.remote) : null;
|
|
27017
|
+
if (!target2) break;
|
|
27018
|
+
const restart = target2 === row.remote?.installedVersion;
|
|
26974
27019
|
void act(
|
|
26975
27020
|
row,
|
|
26976
27021
|
action,
|
|
26977
27022
|
restart ? t("\u6B63\u5728\u91CD\u542F\u8FDC\u7A0B\u670D\u52A1\u2026", "Restarting remote service\u2026") : t("\u6B63\u5728\u63D0\u4EA4\u66F4\u65B0\u2026", "Starting update\u2026"),
|
|
26978
27023
|
async () => {
|
|
26979
|
-
await control.update(hostId2,
|
|
27024
|
+
await control.update(hostId2, target2);
|
|
26980
27025
|
await setConnected(true);
|
|
26981
27026
|
}
|
|
26982
27027
|
);
|
|
@@ -27656,20 +27701,20 @@ ${error51.stderrTail}`] : []
|
|
|
27656
27701
|
row.dataset.connectionSelected = String(selected);
|
|
27657
27702
|
row.tabIndex = selected ? 0 : -1;
|
|
27658
27703
|
row.setAttribute("role", "row");
|
|
27659
|
-
const
|
|
27660
|
-
|
|
27661
|
-
|
|
27704
|
+
const identity2 = document2.createElement("div");
|
|
27705
|
+
identity2.className = "settings-connection-row__identity";
|
|
27706
|
+
identity2.setAttribute("role", "cell");
|
|
27662
27707
|
if (group) {
|
|
27663
27708
|
const handle = document2.createElement("span");
|
|
27664
27709
|
handle.className = "settings-connection-row__handle";
|
|
27665
27710
|
handle.setAttribute("aria-hidden", "true");
|
|
27666
27711
|
handle.title = group.dragHandleTitle;
|
|
27667
27712
|
handle.append(createRendererSettingsIcon("grip-vertical", 15));
|
|
27668
|
-
|
|
27713
|
+
identity2.append(handle);
|
|
27669
27714
|
}
|
|
27670
27715
|
const label = document2.createElement("strong");
|
|
27671
27716
|
label.textContent = item.name;
|
|
27672
|
-
|
|
27717
|
+
identity2.append(createConnectionIdentityIcon(document2, item, 19), label);
|
|
27673
27718
|
const status = document2.createElement("span");
|
|
27674
27719
|
status.className = "settings-connection-row__status";
|
|
27675
27720
|
status.dataset.connectionTone = connectionStatusTone(item.availability, item.error !== null);
|
|
@@ -27747,8 +27792,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27747
27792
|
action.append(toggle);
|
|
27748
27793
|
}
|
|
27749
27794
|
row.addEventListener("click", (event) => {
|
|
27750
|
-
const
|
|
27751
|
-
if (
|
|
27795
|
+
const target2 = event.target;
|
|
27796
|
+
if (target2?.closest?.("a")) return;
|
|
27752
27797
|
select();
|
|
27753
27798
|
});
|
|
27754
27799
|
row.addEventListener("keydown", (event) => {
|
|
@@ -27766,17 +27811,17 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27766
27811
|
row.addEventListener("drop", group.onDrop);
|
|
27767
27812
|
row.addEventListener("dragend", group.onDragEnd);
|
|
27768
27813
|
}
|
|
27769
|
-
row.append(
|
|
27814
|
+
row.append(identity2, status, action);
|
|
27770
27815
|
return row;
|
|
27771
27816
|
}
|
|
27772
27817
|
function createInspectorHeader(document2, item, messages) {
|
|
27773
27818
|
const header = document2.createElement("header");
|
|
27774
27819
|
header.className = "settings-connection-inspector__header";
|
|
27775
|
-
const
|
|
27776
|
-
|
|
27820
|
+
const identity2 = document2.createElement("div");
|
|
27821
|
+
identity2.className = "settings-connection-inspector__identity";
|
|
27777
27822
|
const title = document2.createElement("strong");
|
|
27778
27823
|
title.textContent = item.name;
|
|
27779
|
-
|
|
27824
|
+
identity2.append(createConnectionIdentityIcon(document2, item, 20), title);
|
|
27780
27825
|
const websiteUrl = item.agentSnapshot?.plugin?.links?.website ?? item.agentSnapshot?.plugin?.links?.documentation;
|
|
27781
27826
|
if (websiteUrl) {
|
|
27782
27827
|
const website = document2.createElement("a");
|
|
@@ -27788,13 +27833,13 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27788
27833
|
website.setAttribute("aria-label", `${messages.connectionOfficialWebsite}: ${item.name}`);
|
|
27789
27834
|
website.append(createRendererSettingsIcon("external-link", 13));
|
|
27790
27835
|
website.addEventListener("click", (event) => event.stopPropagation());
|
|
27791
|
-
|
|
27836
|
+
identity2.append(website);
|
|
27792
27837
|
}
|
|
27793
27838
|
const status = document2.createElement("span");
|
|
27794
27839
|
status.className = "settings-connection-row__status";
|
|
27795
27840
|
status.dataset.connectionTone = connectionStatusTone(item.availability, item.error !== null);
|
|
27796
27841
|
status.textContent = item.error?.code === "authenticationRequired" ? messages.connectionLoginRequired : item.error?.code === "configurationRequired" ? messages.connectionConfigurationRequired : item.agentSnapshot && item.availability === "ready" && !item.error ? messages.connectionStatusConnected : connectionStatusLabel(item.availability, messages, item.error !== null);
|
|
27797
|
-
header.append(
|
|
27842
|
+
header.append(identity2, status);
|
|
27798
27843
|
return header;
|
|
27799
27844
|
}
|
|
27800
27845
|
function renderConnectionInspector(document2, inspector, item, hostId2, messages, diagnostics, existingLaunchControls, refresh) {
|
|
@@ -28981,15 +29026,15 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
28981
29026
|
cwd.className = "settings-session-import-row__cwd";
|
|
28982
29027
|
cwd.textContent = candidate.cwd;
|
|
28983
29028
|
cwd.title = candidate.cwd;
|
|
28984
|
-
const
|
|
28985
|
-
|
|
28986
|
-
|
|
28987
|
-
|
|
29029
|
+
const identity2 = document2.createElement("span");
|
|
29030
|
+
identity2.textContent = `${messages.sessionImportSessionId}: ${shortSessionId(candidate.nativeSessionId)}`;
|
|
29031
|
+
identity2.title = candidate.nativeSessionId;
|
|
29032
|
+
identity2.setAttribute("aria-hidden", "true");
|
|
28988
29033
|
copy.append(
|
|
28989
29034
|
title,
|
|
28990
29035
|
metadata,
|
|
28991
29036
|
cwd,
|
|
28992
|
-
|
|
29037
|
+
identity2,
|
|
28993
29038
|
createAccessibleText(
|
|
28994
29039
|
document2,
|
|
28995
29040
|
`${messages.sessionImportSessionId}: ${candidate.nativeSessionId}`
|
|
@@ -29546,12 +29591,12 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29546
29591
|
let hideEmails = false;
|
|
29547
29592
|
const shown = (text) => accountDisplayText(text, hideEmails);
|
|
29548
29593
|
const targetButtons = /* @__PURE__ */ new Map();
|
|
29549
|
-
const importedRecords = () => snapshot.targets.find((
|
|
29594
|
+
const importedRecords = () => snapshot.targets.find((target2) => target2.harnessId === TARGET_HARNESS_ID)?.imports ?? [];
|
|
29550
29595
|
const sourceOf = (record3) => snapshot.sources.find((source) => source.id === record3.source.id);
|
|
29551
29596
|
const piTarget = () => snapshot.targets.find((candidate) => candidate.harnessId === TARGET_HARNESS_ID);
|
|
29552
29597
|
const compatibleSources = () => {
|
|
29553
|
-
const
|
|
29554
|
-
return
|
|
29598
|
+
const target2 = piTarget();
|
|
29599
|
+
return target2 ? snapshot.sources.filter((source) => target2.providers.includes(source.provider)) : [];
|
|
29555
29600
|
};
|
|
29556
29601
|
const section = document2.createElement("section");
|
|
29557
29602
|
section.className = "settings-pi-accounts";
|
|
@@ -29643,8 +29688,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29643
29688
|
row.setAttribute("aria-label", shown(record3.source.label));
|
|
29644
29689
|
const agent = record3.source.harnessId;
|
|
29645
29690
|
const mark = createMark(agent);
|
|
29646
|
-
const
|
|
29647
|
-
|
|
29691
|
+
const identity2 = document2.createElement("div");
|
|
29692
|
+
identity2.className = "settings-pi-accounts__identity";
|
|
29648
29693
|
const label = document2.createElement("strong");
|
|
29649
29694
|
label.className = "settings-account-email";
|
|
29650
29695
|
label.textContent = shown(record3.source.label);
|
|
@@ -29668,7 +29713,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29668
29713
|
}
|
|
29669
29714
|
meta3.append(part);
|
|
29670
29715
|
});
|
|
29671
|
-
|
|
29716
|
+
identity2.append(label, meta3);
|
|
29672
29717
|
const actions = document2.createElement("div");
|
|
29673
29718
|
actions.className = "settings-pi-accounts__actions";
|
|
29674
29719
|
const reimport = document2.createElement("button");
|
|
@@ -29690,7 +29735,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29690
29735
|
remove.addEventListener("click", () => openDialog("remove", { record: record3 }, `row:${record3.name}`));
|
|
29691
29736
|
if (source) actions.append(reimport);
|
|
29692
29737
|
actions.append(remove);
|
|
29693
|
-
row.append(mark,
|
|
29738
|
+
row.append(mark, identity2, actions);
|
|
29694
29739
|
rows.set(record3.name, row);
|
|
29695
29740
|
return row;
|
|
29696
29741
|
};
|
|
@@ -29704,8 +29749,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29704
29749
|
[shown(login.label ?? login.provider), agent && rendererAgentLabel(agent, pluginFor(agent))].filter(Boolean).join(" \xB7 ")
|
|
29705
29750
|
);
|
|
29706
29751
|
const mark = createMark(agent);
|
|
29707
|
-
const
|
|
29708
|
-
|
|
29752
|
+
const identity2 = document2.createElement("div");
|
|
29753
|
+
identity2.className = "settings-pi-accounts__identity";
|
|
29709
29754
|
const title = document2.createElement("strong");
|
|
29710
29755
|
title.className = "settings-account-email";
|
|
29711
29756
|
title.textContent = shown(login.label ?? login.provider);
|
|
@@ -29724,15 +29769,15 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29724
29769
|
}
|
|
29725
29770
|
meta3.append(part);
|
|
29726
29771
|
});
|
|
29727
|
-
|
|
29728
|
-
row.append(mark,
|
|
29772
|
+
identity2.append(title, meta3);
|
|
29773
|
+
row.append(mark, identity2);
|
|
29729
29774
|
return row;
|
|
29730
29775
|
};
|
|
29731
29776
|
const renderSection = () => {
|
|
29732
|
-
const
|
|
29733
|
-
section.hidden = !
|
|
29777
|
+
const target2 = piTarget();
|
|
29778
|
+
section.hidden = !target2;
|
|
29734
29779
|
const records = importedRecords();
|
|
29735
|
-
const others =
|
|
29780
|
+
const others = target2?.others ?? [];
|
|
29736
29781
|
sectionCount.textContent = String(records.length + others.length);
|
|
29737
29782
|
card.hidden = !sectionExpanded;
|
|
29738
29783
|
sectionImport.hidden = compatibleSources().length === 0;
|
|
@@ -29989,8 +30034,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29989
30034
|
modal.addEventListener("close", () => {
|
|
29990
30035
|
modal.remove();
|
|
29991
30036
|
dialog = void 0;
|
|
29992
|
-
const
|
|
29993
|
-
(
|
|
30037
|
+
const target2 = returnKey ? returnKey === SECTION_IMPORT_KEY ? sectionImport : targetButtons.get(returnKey) ?? rows.get(returnKey.replace(/^row:/, "")) : void 0;
|
|
30038
|
+
(target2?.isConnected ? target2 : section).focus();
|
|
29994
30039
|
});
|
|
29995
30040
|
show(initialMode);
|
|
29996
30041
|
root.append(modal);
|
|
@@ -30018,11 +30063,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30018
30063
|
const source = snapshot.sources.find(
|
|
30019
30064
|
(candidate) => candidate.harnessId === harnessId && candidate.label === accountLabel
|
|
30020
30065
|
);
|
|
30021
|
-
const
|
|
30066
|
+
const target2 = snapshot.targets.find(
|
|
30022
30067
|
(candidate) => candidate.harnessId === TARGET_HARNESS_ID && source && candidate.providers.includes(source.provider)
|
|
30023
30068
|
);
|
|
30024
|
-
if (!source || !
|
|
30025
|
-
const record3 =
|
|
30069
|
+
if (!source || !target2) return null;
|
|
30070
|
+
const record3 = target2.imports.find((candidate) => candidate.source.id === source.id);
|
|
30026
30071
|
const key = `${harnessId}:${accountLabel}:import`;
|
|
30027
30072
|
const button2 = document2.createElement("button");
|
|
30028
30073
|
button2.type = "button";
|
|
@@ -30469,11 +30514,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30469
30514
|
const key = active.getAttribute("data-account-focus");
|
|
30470
30515
|
const accountId = active.closest(".settings-account-row")?.dataset.accountId;
|
|
30471
30516
|
return () => {
|
|
30472
|
-
const
|
|
30473
|
-
if (
|
|
30474
|
-
const dialog =
|
|
30517
|
+
const target2 = key ? list.querySelector(`[data-account-focus="${CSS.escape(key)}"]`) : null;
|
|
30518
|
+
if (target2 && !target2.matches(":disabled")) {
|
|
30519
|
+
const dialog = target2.closest("dialog");
|
|
30475
30520
|
if (dialog && !dialog.open) dialog.showModal();
|
|
30476
|
-
|
|
30521
|
+
target2.focus({ preventScroll: true });
|
|
30477
30522
|
return;
|
|
30478
30523
|
}
|
|
30479
30524
|
const row = accountId ? list.querySelector(
|
|
@@ -30516,8 +30561,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30516
30561
|
function createAccountPerson(document2, messages, input) {
|
|
30517
30562
|
const person = document2.createElement("div");
|
|
30518
30563
|
person.className = "settings-account-row__person";
|
|
30519
|
-
const
|
|
30520
|
-
|
|
30564
|
+
const identity2 = document2.createElement("div");
|
|
30565
|
+
identity2.className = "settings-account-row__identity";
|
|
30521
30566
|
const title = document2.createElement("strong");
|
|
30522
30567
|
title.className = "settings-account-email";
|
|
30523
30568
|
title.textContent = input.name;
|
|
@@ -30549,9 +30594,9 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30549
30594
|
badge.title = messages.accountDefaultHint;
|
|
30550
30595
|
metadata.append(badge);
|
|
30551
30596
|
}
|
|
30552
|
-
|
|
30553
|
-
if (metadata.childElementCount)
|
|
30554
|
-
person.append(input.mark,
|
|
30597
|
+
identity2.append(title);
|
|
30598
|
+
if (metadata.childElementCount) identity2.append(metadata);
|
|
30599
|
+
person.append(input.mark, identity2);
|
|
30555
30600
|
return person;
|
|
30556
30601
|
}
|
|
30557
30602
|
function appendAccountExtras(cell, items) {
|
|
@@ -31258,14 +31303,14 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
31258
31303
|
function isWindowsRenderer(window2) {
|
|
31259
31304
|
const navigator2 = window2?.navigator;
|
|
31260
31305
|
if (!navigator2) return false;
|
|
31261
|
-
const
|
|
31262
|
-
return /windows|win32|win64/iu.test(
|
|
31306
|
+
const identity2 = `${rendererUserAgentData(navigator2)?.platform ?? ""} ${navigator2.platform ?? ""} ${navigator2.userAgent}`;
|
|
31307
|
+
return /windows|win32|win64/iu.test(identity2);
|
|
31263
31308
|
}
|
|
31264
31309
|
function windowsInstallerDownloadUrl(window2, version2) {
|
|
31265
31310
|
const navigator2 = window2?.navigator;
|
|
31266
31311
|
const hints = navigator2 ? rendererUserAgentData(navigator2) : void 0;
|
|
31267
|
-
const
|
|
31268
|
-
const architecture = /arm64|aarch64|\barm\b/iu.test(
|
|
31312
|
+
const identity2 = `${hints?.architecture ?? ""} ${hints?.platform ?? ""} ${navigator2?.platform ?? ""} ${navigator2?.userAgent ?? ""}`;
|
|
31313
|
+
const architecture = /arm64|aarch64|\barm\b/iu.test(identity2) ? "arm64" : "x64";
|
|
31269
31314
|
return `https://github.com/BytePioneer-AI/codex-host/releases/download/v${version2}/codexhost-${version2}-windows-${architecture}.exe`;
|
|
31270
31315
|
}
|
|
31271
31316
|
function panelIconName(view) {
|