@codexhost/cli-darwin-x64 0.18.0-beta.4 → 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 +93 -53
- package/app/console-web.js +159 -119
- 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 +353 -295
- 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 +154 -114
- 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-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web/sw.js +1 -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
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({
|
|
@@ -16564,6 +16564,44 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16564
16564
|
}).strict();
|
|
16565
16565
|
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
16566
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
|
+
|
|
16567
16605
|
// ../shared-contracts/dist/remote-connections.js
|
|
16568
16606
|
var CONSOLE_REMOTE_CONNECTIONS_METHOD = "codexhost/console/remote-connections";
|
|
16569
16607
|
var hostId = external_exports.string().min(1).max(1024);
|
|
@@ -16585,7 +16623,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16585
16623
|
identity: external_exports.string().max(4096).nullable()
|
|
16586
16624
|
});
|
|
16587
16625
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
16626
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
16588
16627
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16628
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
16589
16629
|
external_exports.strictObject({
|
|
16590
16630
|
action: external_exports.literal("read-thread"),
|
|
16591
16631
|
hostId: hostId.refine((id) => id !== "local"),
|
|
@@ -19290,7 +19330,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19290
19330
|
list.replaceChildren(
|
|
19291
19331
|
...harnesses.map((harness2) => {
|
|
19292
19332
|
const guide = harness2.links?.installation ?? harness2.links?.documentation;
|
|
19293
|
-
const
|
|
19333
|
+
const identity2 = h(
|
|
19294
19334
|
document2,
|
|
19295
19335
|
"div",
|
|
19296
19336
|
{ className: "console-harness__identity" },
|
|
@@ -19318,7 +19358,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19318
19358
|
harness2.enabled ? messages.enabled : messages.disabled
|
|
19319
19359
|
)
|
|
19320
19360
|
);
|
|
19321
|
-
const row = h(document2, "div", { className: "console-harness" },
|
|
19361
|
+
const row = h(document2, "div", { className: "console-harness" }, identity2);
|
|
19322
19362
|
if (harness2.launchCommand) {
|
|
19323
19363
|
const input = h(document2, "input", {
|
|
19324
19364
|
type: "text",
|
|
@@ -19355,7 +19395,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19355
19395
|
}
|
|
19356
19396
|
}
|
|
19357
19397
|
if (guide) {
|
|
19358
|
-
|
|
19398
|
+
identity2.append(
|
|
19359
19399
|
h(
|
|
19360
19400
|
document2,
|
|
19361
19401
|
"a",
|
|
@@ -20126,8 +20166,8 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20126
20166
|
}
|
|
20127
20167
|
async function verifyNativeCodexThread(sendRequest, threadId) {
|
|
20128
20168
|
const native = await sendRequest("thread/read", { threadId, includeTurns: false });
|
|
20129
|
-
const
|
|
20130
|
-
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") {
|
|
20131
20171
|
throw new Error("Native Thread response cannot establish Codex ownership");
|
|
20132
20172
|
}
|
|
20133
20173
|
}
|
|
@@ -20395,7 +20435,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20395
20435
|
const params = threadOwnershipListParamsSchema.parse(input);
|
|
20396
20436
|
const value = await manager.sendRequest(THREAD_OWNERSHIP_LIST_METHOD, params);
|
|
20397
20437
|
const result = threadOwnershipListResultSchema.parse(value);
|
|
20398
|
-
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])) {
|
|
20399
20439
|
throw new Error("Thread ownership-list result does not match the requested IDs");
|
|
20400
20440
|
}
|
|
20401
20441
|
return result;
|
|
@@ -21292,13 +21332,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21292
21332
|
"\u6B63\u5728\u91CD\u542F Web\u2026 \u7B49\u5F85\u6062\u590D\u8FDE\u63A5\u3002",
|
|
21293
21333
|
"Restarting Web\u2026 waiting for reconnection."
|
|
21294
21334
|
);
|
|
21295
|
-
const
|
|
21335
|
+
const target2 = params.enabled;
|
|
21296
21336
|
const deadline = Date.now() + 6e4;
|
|
21297
21337
|
while (!signal.aborted) {
|
|
21298
21338
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
21299
21339
|
try {
|
|
21300
21340
|
await load();
|
|
21301
|
-
if (state?.background?.lan ===
|
|
21341
|
+
if (state?.background?.lan === target2) break;
|
|
21302
21342
|
} catch {
|
|
21303
21343
|
}
|
|
21304
21344
|
if (Date.now() >= deadline)
|
|
@@ -23403,20 +23443,20 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
23403
23443
|
unmeteredRequests: 0
|
|
23404
23444
|
};
|
|
23405
23445
|
}
|
|
23406
|
-
function addTotals(
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
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;
|
|
23420
23460
|
}
|
|
23421
23461
|
function inputWithoutCache(totals2) {
|
|
23422
23462
|
return totals2.inputTokens - totals2.cachedInputTokens - totals2.cacheWriteInputTokens;
|
|
@@ -26014,7 +26054,7 @@ ${detail}` : ""}`
|
|
|
26014
26054
|
card.setAttribute("aria-label", connection.displayName);
|
|
26015
26055
|
card.setAttribute("aria-busy", String(locked));
|
|
26016
26056
|
const head = remoteElement(document2, "div", "settings-remote-card__head");
|
|
26017
|
-
const
|
|
26057
|
+
const identity2 = remoteElement(document2, "div", "settings-remote-card__identity");
|
|
26018
26058
|
const titleLine = remoteElement(document2, "div", "settings-remote-card__title");
|
|
26019
26059
|
const [tone, stateLabel] = connectionState(row, t);
|
|
26020
26060
|
const state = remoteElement(document2, "span", "settings-remote-card__state", stateLabel);
|
|
@@ -26027,7 +26067,7 @@ ${detail}` : ""}`
|
|
|
26027
26067
|
addressLine.append(
|
|
26028
26068
|
remoteElement(document2, "span", "settings-status-badge", t("SSH \u914D\u7F6E", "SSH config"))
|
|
26029
26069
|
);
|
|
26030
|
-
|
|
26070
|
+
identity2.append(titleLine, addressLine);
|
|
26031
26071
|
const headActions = remoteElement(document2, "div", "settings-remote-card__actions");
|
|
26032
26072
|
if (row.installation !== "not-installed" && !row.probing) {
|
|
26033
26073
|
if (row.state === "error" && connection.autoConnect)
|
|
@@ -26050,7 +26090,7 @@ ${detail}` : ""}`
|
|
|
26050
26090
|
remove.append(createRendererSettingsIcon("trash", 15));
|
|
26051
26091
|
remove.addEventListener("click", () => onAction("remove"));
|
|
26052
26092
|
headActions.append(remove);
|
|
26053
|
-
head.append(
|
|
26093
|
+
head.append(identity2, headActions);
|
|
26054
26094
|
card.append(head);
|
|
26055
26095
|
if (row.stateError) {
|
|
26056
26096
|
const detail = remoteElement(
|
|
@@ -26102,15 +26142,15 @@ ${detail}` : ""}`
|
|
|
26102
26142
|
}
|
|
26103
26143
|
if (!remote) serviceActions.append(command("recheck", t("\u91CD\u65B0\u68C0\u6D4B", "Check again")));
|
|
26104
26144
|
}
|
|
26105
|
-
const
|
|
26145
|
+
const target2 = remote ? remoteMaintenanceTarget(local, remote) : null;
|
|
26106
26146
|
if (row.installation === "not-installed") {
|
|
26107
26147
|
const install = command("install", t("\u5B89\u88C5\u5E76\u8FDE\u63A5", "Install and connect"), true);
|
|
26108
26148
|
install.disabled ||= !remoteInstallVersion(local);
|
|
26109
26149
|
serviceActions.append(install);
|
|
26110
|
-
} else if (remote &&
|
|
26150
|
+
} else if (remote && target2 && !remoteBusy(remote)) {
|
|
26111
26151
|
const update = command(
|
|
26112
26152
|
"update",
|
|
26113
|
-
|
|
26153
|
+
target2 === remote.installedVersion ? t("\u91CD\u542F\u5E76\u8FDE\u63A5", "Restart and connect") : t("\u66F4\u65B0\u5230\u672C\u673A\u7248\u672C", "Match local version"),
|
|
26114
26154
|
true
|
|
26115
26155
|
);
|
|
26116
26156
|
serviceActions.append(update);
|
|
@@ -26344,13 +26384,13 @@ ${detail}` : ""}`
|
|
|
26344
26384
|
port.min = "1";
|
|
26345
26385
|
port.max = "65535";
|
|
26346
26386
|
port.step = "1";
|
|
26347
|
-
const
|
|
26387
|
+
const identity2 = field2(
|
|
26348
26388
|
t("\u79C1\u94A5\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09", "Identity file (optional)"),
|
|
26349
26389
|
previous?.identity ?? "",
|
|
26350
26390
|
"~/.ssh/id_ed25519"
|
|
26351
26391
|
);
|
|
26352
26392
|
if (previous?.source === "discovered") {
|
|
26353
|
-
hostname3.disabled = port.disabled =
|
|
26393
|
+
hostname3.disabled = port.disabled = identity2.disabled = true;
|
|
26354
26394
|
dialog.body.append(
|
|
26355
26395
|
remoteElement(
|
|
26356
26396
|
document2,
|
|
@@ -26370,7 +26410,7 @@ ${detail}` : ""}`
|
|
|
26370
26410
|
displayName: name.value,
|
|
26371
26411
|
hostname: hostname3.value,
|
|
26372
26412
|
sshPort: port.value ? Number(port.value) : null,
|
|
26373
|
-
identity:
|
|
26413
|
+
identity: identity2.value.trim() || null
|
|
26374
26414
|
})
|
|
26375
26415
|
);
|
|
26376
26416
|
});
|
|
@@ -26691,8 +26731,8 @@ ${detail}` : ""}`
|
|
|
26691
26731
|
});
|
|
26692
26732
|
}
|
|
26693
26733
|
function focusAction(card, action) {
|
|
26694
|
-
const
|
|
26695
|
-
|
|
26734
|
+
const target2 = card.querySelector(`[data-action="${action}"]:not(:disabled)`) ?? card.querySelector("button:not(:disabled)");
|
|
26735
|
+
target2?.focus();
|
|
26696
26736
|
}
|
|
26697
26737
|
async function probe(row) {
|
|
26698
26738
|
const { hostId: hostId2 } = row.connection;
|
|
@@ -26973,15 +27013,15 @@ ${detail}` : ""}`
|
|
|
26973
27013
|
});
|
|
26974
27014
|
break;
|
|
26975
27015
|
case "update": {
|
|
26976
|
-
const
|
|
26977
|
-
if (!
|
|
26978
|
-
const restart =
|
|
27016
|
+
const target2 = row.remote ? remoteMaintenanceTarget(local, row.remote) : null;
|
|
27017
|
+
if (!target2) break;
|
|
27018
|
+
const restart = target2 === row.remote?.installedVersion;
|
|
26979
27019
|
void act(
|
|
26980
27020
|
row,
|
|
26981
27021
|
action,
|
|
26982
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"),
|
|
26983
27023
|
async () => {
|
|
26984
|
-
await control.update(hostId2,
|
|
27024
|
+
await control.update(hostId2, target2);
|
|
26985
27025
|
await setConnected(true);
|
|
26986
27026
|
}
|
|
26987
27027
|
);
|
|
@@ -27661,20 +27701,20 @@ ${error51.stderrTail}`] : []
|
|
|
27661
27701
|
row.dataset.connectionSelected = String(selected);
|
|
27662
27702
|
row.tabIndex = selected ? 0 : -1;
|
|
27663
27703
|
row.setAttribute("role", "row");
|
|
27664
|
-
const
|
|
27665
|
-
|
|
27666
|
-
|
|
27704
|
+
const identity2 = document2.createElement("div");
|
|
27705
|
+
identity2.className = "settings-connection-row__identity";
|
|
27706
|
+
identity2.setAttribute("role", "cell");
|
|
27667
27707
|
if (group) {
|
|
27668
27708
|
const handle = document2.createElement("span");
|
|
27669
27709
|
handle.className = "settings-connection-row__handle";
|
|
27670
27710
|
handle.setAttribute("aria-hidden", "true");
|
|
27671
27711
|
handle.title = group.dragHandleTitle;
|
|
27672
27712
|
handle.append(createRendererSettingsIcon("grip-vertical", 15));
|
|
27673
|
-
|
|
27713
|
+
identity2.append(handle);
|
|
27674
27714
|
}
|
|
27675
27715
|
const label = document2.createElement("strong");
|
|
27676
27716
|
label.textContent = item.name;
|
|
27677
|
-
|
|
27717
|
+
identity2.append(createConnectionIdentityIcon(document2, item, 19), label);
|
|
27678
27718
|
const status = document2.createElement("span");
|
|
27679
27719
|
status.className = "settings-connection-row__status";
|
|
27680
27720
|
status.dataset.connectionTone = connectionStatusTone(item.availability, item.error !== null);
|
|
@@ -27752,8 +27792,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27752
27792
|
action.append(toggle);
|
|
27753
27793
|
}
|
|
27754
27794
|
row.addEventListener("click", (event) => {
|
|
27755
|
-
const
|
|
27756
|
-
if (
|
|
27795
|
+
const target2 = event.target;
|
|
27796
|
+
if (target2?.closest?.("a")) return;
|
|
27757
27797
|
select();
|
|
27758
27798
|
});
|
|
27759
27799
|
row.addEventListener("keydown", (event) => {
|
|
@@ -27771,17 +27811,17 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27771
27811
|
row.addEventListener("drop", group.onDrop);
|
|
27772
27812
|
row.addEventListener("dragend", group.onDragEnd);
|
|
27773
27813
|
}
|
|
27774
|
-
row.append(
|
|
27814
|
+
row.append(identity2, status, action);
|
|
27775
27815
|
return row;
|
|
27776
27816
|
}
|
|
27777
27817
|
function createInspectorHeader(document2, item, messages) {
|
|
27778
27818
|
const header = document2.createElement("header");
|
|
27779
27819
|
header.className = "settings-connection-inspector__header";
|
|
27780
|
-
const
|
|
27781
|
-
|
|
27820
|
+
const identity2 = document2.createElement("div");
|
|
27821
|
+
identity2.className = "settings-connection-inspector__identity";
|
|
27782
27822
|
const title = document2.createElement("strong");
|
|
27783
27823
|
title.textContent = item.name;
|
|
27784
|
-
|
|
27824
|
+
identity2.append(createConnectionIdentityIcon(document2, item, 20), title);
|
|
27785
27825
|
const websiteUrl = item.agentSnapshot?.plugin?.links?.website ?? item.agentSnapshot?.plugin?.links?.documentation;
|
|
27786
27826
|
if (websiteUrl) {
|
|
27787
27827
|
const website = document2.createElement("a");
|
|
@@ -27793,13 +27833,13 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27793
27833
|
website.setAttribute("aria-label", `${messages.connectionOfficialWebsite}: ${item.name}`);
|
|
27794
27834
|
website.append(createRendererSettingsIcon("external-link", 13));
|
|
27795
27835
|
website.addEventListener("click", (event) => event.stopPropagation());
|
|
27796
|
-
|
|
27836
|
+
identity2.append(website);
|
|
27797
27837
|
}
|
|
27798
27838
|
const status = document2.createElement("span");
|
|
27799
27839
|
status.className = "settings-connection-row__status";
|
|
27800
27840
|
status.dataset.connectionTone = connectionStatusTone(item.availability, item.error !== null);
|
|
27801
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);
|
|
27802
|
-
header.append(
|
|
27842
|
+
header.append(identity2, status);
|
|
27803
27843
|
return header;
|
|
27804
27844
|
}
|
|
27805
27845
|
function renderConnectionInspector(document2, inspector, item, hostId2, messages, diagnostics, existingLaunchControls, refresh) {
|
|
@@ -28986,15 +29026,15 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
28986
29026
|
cwd.className = "settings-session-import-row__cwd";
|
|
28987
29027
|
cwd.textContent = candidate.cwd;
|
|
28988
29028
|
cwd.title = candidate.cwd;
|
|
28989
|
-
const
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
|
|
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");
|
|
28993
29033
|
copy.append(
|
|
28994
29034
|
title,
|
|
28995
29035
|
metadata,
|
|
28996
29036
|
cwd,
|
|
28997
|
-
|
|
29037
|
+
identity2,
|
|
28998
29038
|
createAccessibleText(
|
|
28999
29039
|
document2,
|
|
29000
29040
|
`${messages.sessionImportSessionId}: ${candidate.nativeSessionId}`
|
|
@@ -29551,12 +29591,12 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29551
29591
|
let hideEmails = false;
|
|
29552
29592
|
const shown = (text) => accountDisplayText(text, hideEmails);
|
|
29553
29593
|
const targetButtons = /* @__PURE__ */ new Map();
|
|
29554
|
-
const importedRecords = () => snapshot.targets.find((
|
|
29594
|
+
const importedRecords = () => snapshot.targets.find((target2) => target2.harnessId === TARGET_HARNESS_ID)?.imports ?? [];
|
|
29555
29595
|
const sourceOf = (record3) => snapshot.sources.find((source) => source.id === record3.source.id);
|
|
29556
29596
|
const piTarget = () => snapshot.targets.find((candidate) => candidate.harnessId === TARGET_HARNESS_ID);
|
|
29557
29597
|
const compatibleSources = () => {
|
|
29558
|
-
const
|
|
29559
|
-
return
|
|
29598
|
+
const target2 = piTarget();
|
|
29599
|
+
return target2 ? snapshot.sources.filter((source) => target2.providers.includes(source.provider)) : [];
|
|
29560
29600
|
};
|
|
29561
29601
|
const section = document2.createElement("section");
|
|
29562
29602
|
section.className = "settings-pi-accounts";
|
|
@@ -29648,8 +29688,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29648
29688
|
row.setAttribute("aria-label", shown(record3.source.label));
|
|
29649
29689
|
const agent = record3.source.harnessId;
|
|
29650
29690
|
const mark = createMark(agent);
|
|
29651
|
-
const
|
|
29652
|
-
|
|
29691
|
+
const identity2 = document2.createElement("div");
|
|
29692
|
+
identity2.className = "settings-pi-accounts__identity";
|
|
29653
29693
|
const label = document2.createElement("strong");
|
|
29654
29694
|
label.className = "settings-account-email";
|
|
29655
29695
|
label.textContent = shown(record3.source.label);
|
|
@@ -29673,7 +29713,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29673
29713
|
}
|
|
29674
29714
|
meta3.append(part);
|
|
29675
29715
|
});
|
|
29676
|
-
|
|
29716
|
+
identity2.append(label, meta3);
|
|
29677
29717
|
const actions = document2.createElement("div");
|
|
29678
29718
|
actions.className = "settings-pi-accounts__actions";
|
|
29679
29719
|
const reimport = document2.createElement("button");
|
|
@@ -29695,7 +29735,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29695
29735
|
remove.addEventListener("click", () => openDialog("remove", { record: record3 }, `row:${record3.name}`));
|
|
29696
29736
|
if (source) actions.append(reimport);
|
|
29697
29737
|
actions.append(remove);
|
|
29698
|
-
row.append(mark,
|
|
29738
|
+
row.append(mark, identity2, actions);
|
|
29699
29739
|
rows.set(record3.name, row);
|
|
29700
29740
|
return row;
|
|
29701
29741
|
};
|
|
@@ -29709,8 +29749,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29709
29749
|
[shown(login.label ?? login.provider), agent && rendererAgentLabel(agent, pluginFor(agent))].filter(Boolean).join(" \xB7 ")
|
|
29710
29750
|
);
|
|
29711
29751
|
const mark = createMark(agent);
|
|
29712
|
-
const
|
|
29713
|
-
|
|
29752
|
+
const identity2 = document2.createElement("div");
|
|
29753
|
+
identity2.className = "settings-pi-accounts__identity";
|
|
29714
29754
|
const title = document2.createElement("strong");
|
|
29715
29755
|
title.className = "settings-account-email";
|
|
29716
29756
|
title.textContent = shown(login.label ?? login.provider);
|
|
@@ -29729,15 +29769,15 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29729
29769
|
}
|
|
29730
29770
|
meta3.append(part);
|
|
29731
29771
|
});
|
|
29732
|
-
|
|
29733
|
-
row.append(mark,
|
|
29772
|
+
identity2.append(title, meta3);
|
|
29773
|
+
row.append(mark, identity2);
|
|
29734
29774
|
return row;
|
|
29735
29775
|
};
|
|
29736
29776
|
const renderSection = () => {
|
|
29737
|
-
const
|
|
29738
|
-
section.hidden = !
|
|
29777
|
+
const target2 = piTarget();
|
|
29778
|
+
section.hidden = !target2;
|
|
29739
29779
|
const records = importedRecords();
|
|
29740
|
-
const others =
|
|
29780
|
+
const others = target2?.others ?? [];
|
|
29741
29781
|
sectionCount.textContent = String(records.length + others.length);
|
|
29742
29782
|
card.hidden = !sectionExpanded;
|
|
29743
29783
|
sectionImport.hidden = compatibleSources().length === 0;
|
|
@@ -29994,8 +30034,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
29994
30034
|
modal.addEventListener("close", () => {
|
|
29995
30035
|
modal.remove();
|
|
29996
30036
|
dialog = void 0;
|
|
29997
|
-
const
|
|
29998
|
-
(
|
|
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();
|
|
29999
30039
|
});
|
|
30000
30040
|
show(initialMode);
|
|
30001
30041
|
root.append(modal);
|
|
@@ -30023,11 +30063,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30023
30063
|
const source = snapshot.sources.find(
|
|
30024
30064
|
(candidate) => candidate.harnessId === harnessId && candidate.label === accountLabel
|
|
30025
30065
|
);
|
|
30026
|
-
const
|
|
30066
|
+
const target2 = snapshot.targets.find(
|
|
30027
30067
|
(candidate) => candidate.harnessId === TARGET_HARNESS_ID && source && candidate.providers.includes(source.provider)
|
|
30028
30068
|
);
|
|
30029
|
-
if (!source || !
|
|
30030
|
-
const record3 =
|
|
30069
|
+
if (!source || !target2) return null;
|
|
30070
|
+
const record3 = target2.imports.find((candidate) => candidate.source.id === source.id);
|
|
30031
30071
|
const key = `${harnessId}:${accountLabel}:import`;
|
|
30032
30072
|
const button2 = document2.createElement("button");
|
|
30033
30073
|
button2.type = "button";
|
|
@@ -30474,11 +30514,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30474
30514
|
const key = active.getAttribute("data-account-focus");
|
|
30475
30515
|
const accountId = active.closest(".settings-account-row")?.dataset.accountId;
|
|
30476
30516
|
return () => {
|
|
30477
|
-
const
|
|
30478
|
-
if (
|
|
30479
|
-
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");
|
|
30480
30520
|
if (dialog && !dialog.open) dialog.showModal();
|
|
30481
|
-
|
|
30521
|
+
target2.focus({ preventScroll: true });
|
|
30482
30522
|
return;
|
|
30483
30523
|
}
|
|
30484
30524
|
const row = accountId ? list.querySelector(
|
|
@@ -30521,8 +30561,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30521
30561
|
function createAccountPerson(document2, messages, input) {
|
|
30522
30562
|
const person = document2.createElement("div");
|
|
30523
30563
|
person.className = "settings-account-row__person";
|
|
30524
|
-
const
|
|
30525
|
-
|
|
30564
|
+
const identity2 = document2.createElement("div");
|
|
30565
|
+
identity2.className = "settings-account-row__identity";
|
|
30526
30566
|
const title = document2.createElement("strong");
|
|
30527
30567
|
title.className = "settings-account-email";
|
|
30528
30568
|
title.textContent = input.name;
|
|
@@ -30554,9 +30594,9 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30554
30594
|
badge.title = messages.accountDefaultHint;
|
|
30555
30595
|
metadata.append(badge);
|
|
30556
30596
|
}
|
|
30557
|
-
|
|
30558
|
-
if (metadata.childElementCount)
|
|
30559
|
-
person.append(input.mark,
|
|
30597
|
+
identity2.append(title);
|
|
30598
|
+
if (metadata.childElementCount) identity2.append(metadata);
|
|
30599
|
+
person.append(input.mark, identity2);
|
|
30560
30600
|
return person;
|
|
30561
30601
|
}
|
|
30562
30602
|
function appendAccountExtras(cell, items) {
|
|
@@ -31263,14 +31303,14 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
31263
31303
|
function isWindowsRenderer(window2) {
|
|
31264
31304
|
const navigator2 = window2?.navigator;
|
|
31265
31305
|
if (!navigator2) return false;
|
|
31266
|
-
const
|
|
31267
|
-
return /windows|win32|win64/iu.test(
|
|
31306
|
+
const identity2 = `${rendererUserAgentData(navigator2)?.platform ?? ""} ${navigator2.platform ?? ""} ${navigator2.userAgent}`;
|
|
31307
|
+
return /windows|win32|win64/iu.test(identity2);
|
|
31268
31308
|
}
|
|
31269
31309
|
function windowsInstallerDownloadUrl(window2, version2) {
|
|
31270
31310
|
const navigator2 = window2?.navigator;
|
|
31271
31311
|
const hints = navigator2 ? rendererUserAgentData(navigator2) : void 0;
|
|
31272
|
-
const
|
|
31273
|
-
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";
|
|
31274
31314
|
return `https://github.com/BytePioneer-AI/codex-host/releases/download/v${version2}/codexhost-${version2}-windows-${architecture}.exe`;
|
|
31275
31315
|
}
|
|
31276
31316
|
function panelIconName(view) {
|