@codexhost/cli-win32-arm64 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +51 -6
- package/app/console-web.js +212 -64
- package/app/desktop-controller.mjs +48 -3
- package/app/host-runtime.mjs +358 -79
- package/app/plugins/antigravity/plugin.mjs +340 -53
- package/app/plugins/claude-code/plugin.mjs +373 -132
- package/app/plugins/codebuddy/plugin.mjs +205 -46
- package/app/plugins/codex-usage/plugin.mjs +73 -28
- package/app/plugins/copilot/plugin.mjs +98 -53
- package/app/plugins/cursor-cli/plugin.mjs +205 -46
- package/app/plugins/deepseek-harness/plugin.mjs +77 -32
- package/app/plugins/grok/plugin.mjs +352 -84
- package/app/plugins/hermes/plugin.mjs +48 -3
- package/app/plugins/kimi-code/plugin.mjs +60 -15
- package/app/plugins/kiro-cli/plugin.mjs +60 -15
- package/app/plugins/omp/plugin.mjs +80 -35
- package/app/plugins/opencode/plugin.mjs +102 -57
- package/app/plugins/pi/plugin.mjs +113 -43
- package/app/plugins/qoder/plugin.mjs +70 -25
- package/app/plugins/qoder-cn/plugin.mjs +70 -25
- package/app/plugins/workbuddy/plugin.mjs +205 -46
- package/app/plugins/zcode/plugin.mjs +99 -29
- package/app/renderer-extension.js +944 -249
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
package/app/console-web.js
CHANGED
|
@@ -3105,10 +3105,10 @@
|
|
|
3105
3105
|
const shape = def.shape;
|
|
3106
3106
|
const propValues = {};
|
|
3107
3107
|
for (const key in shape) {
|
|
3108
|
-
const
|
|
3109
|
-
if (
|
|
3108
|
+
const field2 = shape[key]._zod;
|
|
3109
|
+
if (field2.values) {
|
|
3110
3110
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3111
|
-
for (const v of
|
|
3111
|
+
for (const v of field2.values)
|
|
3112
3112
|
propValues[key].add(v);
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
@@ -14896,6 +14896,51 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14896
14896
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
14897
14897
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
14898
14898
|
|
|
14899
|
+
// ../shared-contracts/dist/thread-questions.js
|
|
14900
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
14901
|
+
external_exports.object({
|
|
14902
|
+
id: external_exports.string().min(1),
|
|
14903
|
+
type: external_exports.literal("choice"),
|
|
14904
|
+
prompt: external_exports.string(),
|
|
14905
|
+
options: external_exports.array(external_exports.object({
|
|
14906
|
+
value: external_exports.string().min(1),
|
|
14907
|
+
label: external_exports.string(),
|
|
14908
|
+
description: external_exports.string().optional()
|
|
14909
|
+
})).min(1),
|
|
14910
|
+
multiple: external_exports.boolean(),
|
|
14911
|
+
allowOther: external_exports.boolean(),
|
|
14912
|
+
optional: external_exports.boolean()
|
|
14913
|
+
}),
|
|
14914
|
+
external_exports.object({
|
|
14915
|
+
id: external_exports.string().min(1),
|
|
14916
|
+
type: external_exports.literal("text"),
|
|
14917
|
+
prompt: external_exports.string(),
|
|
14918
|
+
multiline: external_exports.boolean(),
|
|
14919
|
+
secret: external_exports.literal(false),
|
|
14920
|
+
optional: external_exports.boolean(),
|
|
14921
|
+
placeholder: external_exports.string().optional(),
|
|
14922
|
+
prefill: external_exports.string().optional()
|
|
14923
|
+
})
|
|
14924
|
+
]);
|
|
14925
|
+
var threadQuestionSchema = external_exports.object({
|
|
14926
|
+
interactionId: external_exports.string().min(1),
|
|
14927
|
+
turnId: external_exports.string().min(1),
|
|
14928
|
+
title: external_exports.string().optional(),
|
|
14929
|
+
questions: external_exports.array(field).min(1)
|
|
14930
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
14931
|
+
message: "Shared cards require at least one multi-select question"
|
|
14932
|
+
});
|
|
14933
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
14934
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
14935
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
14936
|
+
threadId: external_exports.string().min(1),
|
|
14937
|
+
turnId: external_exports.string().min(1),
|
|
14938
|
+
interactionId: external_exports.string().min(1),
|
|
14939
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
14940
|
+
cancelled: external_exports.boolean().default(false)
|
|
14941
|
+
});
|
|
14942
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
14943
|
+
|
|
14899
14944
|
// ../shared-contracts/dist/console.js
|
|
14900
14945
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
14901
14946
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -20795,12 +20840,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20795
20840
|
notAvailable: "Not available",
|
|
20796
20841
|
runtimeCapabilityNotInstalled: "This runtime capability is not installed yet.",
|
|
20797
20842
|
sessionImportHarness: "Harness",
|
|
20843
|
+
sessionImportSelectHost: "Select the Host to import sessions from",
|
|
20798
20844
|
sessionImportDescription: "Sessions keep their original project path. If a folder is not in the Codex sidebar, add it as a project first. Original history remains managed by the Harness.",
|
|
20799
|
-
sessionImportAvailabilityNote: "Available Harnesses come from the
|
|
20845
|
+
sessionImportAvailabilityNote: "Available Harnesses come from the selected Host. If activity is unknown, close the session in its native client before importing to avoid concurrent writes.",
|
|
20800
20846
|
sessionImportRefresh: "Refresh",
|
|
20801
|
-
sessionImportRefreshing: "Loading
|
|
20802
|
-
sessionImportUnavailable: "Session import is unavailable for this
|
|
20803
|
-
sessionImportEmpty: "No
|
|
20847
|
+
sessionImportRefreshing: "Loading sessions from the selected Host...",
|
|
20848
|
+
sessionImportUnavailable: "Session import is unavailable for this Harness or the selected Host protocol. Update the Host/plugin or choose another Harness.",
|
|
20849
|
+
sessionImportEmpty: "No sessions are available to import on the selected Host.",
|
|
20804
20850
|
sessionImportSearch: "Search",
|
|
20805
20851
|
sessionImportSearchPlaceholder: "Search titles, session IDs or project paths",
|
|
20806
20852
|
sessionImportNoMatches: "No sessions match your search.",
|
|
@@ -20808,7 +20854,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
20808
20854
|
sessionImportPrevious: "Previous",
|
|
20809
20855
|
sessionImportNext: "Next",
|
|
20810
20856
|
sessionImportPageSummary: "Page {page} of {pages} \xB7 {total} sessions",
|
|
20811
|
-
sessionImportLoadFailed: "
|
|
20857
|
+
sessionImportLoadFailed: "Sessions could not be loaded from the selected Host. Check directory access or duplicate session IDs, then retry.",
|
|
20812
20858
|
sessionImportFailed: "The session could not be imported.",
|
|
20813
20859
|
sessionImportUntitled: "Untitled session",
|
|
20814
20860
|
sessionImportUpdatedAt: "Updated",
|
|
@@ -21075,12 +21121,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21075
21121
|
notAvailable: "\u6682\u4E0D\u53EF\u7528",
|
|
21076
21122
|
runtimeCapabilityNotInstalled: "\u8FD0\u884C\u65F6\u5C1A\u672A\u5B89\u88C5\u8BE5\u9879\u80FD\u529B\uFF0C\u56E0\u6B64\u6682\u4E0D\u53EF\u7528\u3002",
|
|
21077
21123
|
sessionImportHarness: "Harness",
|
|
21124
|
+
sessionImportSelectHost: "\u8BF7\u9009\u62E9\u8981\u5BFC\u5165\u4F1A\u8BDD\u7684 Host",
|
|
21078
21125
|
sessionImportDescription: "\u4F1A\u8BDD\u5C06\u4FDD\u7559\u539F\u59CB\u9879\u76EE\u8DEF\u5F84\uFF1B\u82E5\u8BE5\u6587\u4EF6\u5939\u5C1A\u672A\u51FA\u73B0\u5728 Codex \u4FA7\u680F\uFF0C\u8BF7\u5148\u5C06\u5176\u6DFB\u52A0\u4E3A\u9879\u76EE\u3002\u539F\u59CB\u5386\u53F2\u4ECD\u7531 Harness \u7BA1\u7406\u3002",
|
|
21079
|
-
sessionImportAvailabilityNote: "\u53EF\u9009 Harness \u6765\u81EA\
|
|
21126
|
+
sessionImportAvailabilityNote: "\u53EF\u9009 Harness \u6765\u81EA\u5F53\u524D Host\u3002\u8FD0\u884C\u72B6\u6001\u672A\u77E5\u65F6\uFF0C\u8BF7\u5148\u5728\u539F\u751F\u5BA2\u6237\u7AEF\u5173\u95ED\u8BE5\u4F1A\u8BDD\u518D\u5BFC\u5165\uFF0C\u907F\u514D\u540C\u65F6\u5199\u5165\u3002",
|
|
21080
21127
|
sessionImportRefresh: "\u5237\u65B0",
|
|
21081
|
-
sessionImportRefreshing: "\u6B63\u5728\u8BFB\u53D6\
|
|
21082
|
-
sessionImportUnavailable: "\
|
|
21083
|
-
sessionImportEmpty: "\u6CA1\u6709\u53EF\u5BFC\u5165\u7684\
|
|
21128
|
+
sessionImportRefreshing: "\u6B63\u5728\u8BFB\u53D6\u5F53\u524D Host \u4E0A\u7684\u4F1A\u8BDD\u2026\u2026",
|
|
21129
|
+
sessionImportUnavailable: "\u8BE5 Harness \u6216\u5F53\u524D Host \u534F\u8BAE\u6682\u4E0D\u652F\u6301\u4F1A\u8BDD\u5BFC\u5165\uFF0C\u8BF7\u66F4\u65B0 Host/\u63D2\u4EF6\u6216\u9009\u62E9\u5176\u4ED6 Harness\u3002",
|
|
21130
|
+
sessionImportEmpty: "\u5F53\u524D Host \u4E0A\u6CA1\u6709\u53EF\u5BFC\u5165\u7684\u4F1A\u8BDD\u3002",
|
|
21084
21131
|
sessionImportSearch: "\u641C\u7D22",
|
|
21085
21132
|
sessionImportSearchPlaceholder: "\u641C\u7D22\u6807\u9898\u3001\u4F1A\u8BDD ID \u6216\u9879\u76EE\u8DEF\u5F84",
|
|
21086
21133
|
sessionImportNoMatches: "\u6CA1\u6709\u5339\u914D\u7684\u4F1A\u8BDD\u3002",
|
|
@@ -21088,7 +21135,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21088
21135
|
sessionImportPrevious: "\u4E0A\u4E00\u9875",
|
|
21089
21136
|
sessionImportNext: "\u4E0B\u4E00\u9875",
|
|
21090
21137
|
sessionImportPageSummary: "\u7B2C {page} / {pages} \u9875 \xB7 \u5171 {total} \u6761",
|
|
21091
|
-
sessionImportLoadFailed: "\u65E0\u6CD5\u8BFB\u53D6\
|
|
21138
|
+
sessionImportLoadFailed: "\u65E0\u6CD5\u8BFB\u53D6\u5F53\u524D Host \u4E0A\u7684\u4F1A\u8BDD\uFF0C\u8BF7\u68C0\u67E5\u76EE\u5F55\u8BBF\u95EE\u6743\u9650\u6216\u91CD\u590D\u7684\u4F1A\u8BDD ID \u540E\u91CD\u8BD5\u3002",
|
|
21092
21139
|
sessionImportFailed: "\u65E0\u6CD5\u5BFC\u5165\u8BE5\u4F1A\u8BDD\u3002",
|
|
21093
21140
|
sessionImportUntitled: "\u672A\u547D\u540D\u4F1A\u8BDD",
|
|
21094
21141
|
sessionImportUpdatedAt: "\u66F4\u65B0\u65F6\u95F4",
|
|
@@ -21668,7 +21715,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21668
21715
|
var DECIMAL = /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/iu;
|
|
21669
21716
|
function modelPriceDraft(key, price) {
|
|
21670
21717
|
const prices = Object.fromEntries(
|
|
21671
|
-
MODEL_PRICE_FIELDS.map((
|
|
21718
|
+
MODEL_PRICE_FIELDS.map((field2) => [field2, price?.[field2]?.toString() ?? ""])
|
|
21672
21719
|
);
|
|
21673
21720
|
return { model: key, prices };
|
|
21674
21721
|
}
|
|
@@ -21679,18 +21726,18 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21679
21726
|
return { error: { kind: "duplicate", key } };
|
|
21680
21727
|
}
|
|
21681
21728
|
const price = {};
|
|
21682
|
-
for (const
|
|
21683
|
-
const text = draft.prices[
|
|
21729
|
+
for (const field2 of MODEL_PRICE_FIELDS) {
|
|
21730
|
+
const text = draft.prices[field2].trim();
|
|
21684
21731
|
if (text === "") {
|
|
21685
|
-
if (
|
|
21686
|
-
return { error: { kind: "priceRequired", field } };
|
|
21732
|
+
if (field2 === "input" || field2 === "output")
|
|
21733
|
+
return { error: { kind: "priceRequired", field: field2 } };
|
|
21687
21734
|
continue;
|
|
21688
21735
|
}
|
|
21689
21736
|
const value = Number(text);
|
|
21690
21737
|
if (!DECIMAL.test(text) || !Number.isFinite(value)) {
|
|
21691
|
-
return { error: { kind: "priceInvalid", field } };
|
|
21738
|
+
return { error: { kind: "priceInvalid", field: field2 } };
|
|
21692
21739
|
}
|
|
21693
|
-
price[
|
|
21740
|
+
price[field2] = value;
|
|
21694
21741
|
}
|
|
21695
21742
|
return {
|
|
21696
21743
|
change: {
|
|
@@ -21710,7 +21757,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21710
21757
|
}
|
|
21711
21758
|
function formatPrice(messages, price) {
|
|
21712
21759
|
return MODEL_PRICE_FIELDS.map(
|
|
21713
|
-
(
|
|
21760
|
+
(field2) => `${messages.fields[field2]} ${price[field2] ?? messages.unset}`
|
|
21714
21761
|
).join(" \xB7 ");
|
|
21715
21762
|
}
|
|
21716
21763
|
function draftErrorText(messages, error51) {
|
|
@@ -21778,18 +21825,18 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21778
21825
|
function renderEditor(modelId, view, isCurrent) {
|
|
21779
21826
|
const existing = view.entries.find((entry) => entry.key === modelId);
|
|
21780
21827
|
const draft = modelPriceDraft(modelId, existing?.price ?? null);
|
|
21781
|
-
const
|
|
21828
|
+
const field2 = (label, value, placeholder = "") => h(document2, "input", {
|
|
21782
21829
|
type: "text",
|
|
21783
21830
|
className: "console-input",
|
|
21784
21831
|
value,
|
|
21785
21832
|
placeholder,
|
|
21786
21833
|
"aria-label": label
|
|
21787
21834
|
});
|
|
21788
|
-
const model2 =
|
|
21835
|
+
const model2 = field2(messages.model, modelId);
|
|
21789
21836
|
model2.readOnly = true;
|
|
21790
21837
|
const prices = Object.fromEntries(
|
|
21791
21838
|
MODEL_PRICE_FIELDS.map((name) => {
|
|
21792
|
-
const input =
|
|
21839
|
+
const input = field2(
|
|
21793
21840
|
messages.fields[name],
|
|
21794
21841
|
draft.prices[name],
|
|
21795
21842
|
name === "input" || name === "output" ? messages.required : messages.notSet
|
|
@@ -22601,8 +22648,8 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
22601
22648
|
for (const cell of options.cells) {
|
|
22602
22649
|
const key = options.singleDay ? cell.hour : cell.weekday * 24 + cell.hour;
|
|
22603
22650
|
const totals2 = byHour.get(key) ?? emptyTotals();
|
|
22604
|
-
for (const
|
|
22605
|
-
totals2[
|
|
22651
|
+
for (const field2 of Object.keys(totals2))
|
|
22652
|
+
totals2[field2] += cell.totals[field2];
|
|
22606
22653
|
byHour.set(key, totals2);
|
|
22607
22654
|
}
|
|
22608
22655
|
const max = Math.max(0, ...[...byHour.values()].map((totals2) => measured(totals2, measure)));
|
|
@@ -22965,8 +23012,8 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
22965
23012
|
save();
|
|
22966
23013
|
load();
|
|
22967
23014
|
}
|
|
22968
|
-
function toggleFilter(
|
|
22969
|
-
view[
|
|
23015
|
+
function toggleFilter(field2, key) {
|
|
23016
|
+
view[field2] = view[field2] === key ? "" : key;
|
|
22970
23017
|
changed();
|
|
22971
23018
|
}
|
|
22972
23019
|
function selectDate(next) {
|
|
@@ -23382,8 +23429,8 @@ ${messages.creditsCoverage}: ${value.reportedRequests} / ${row.requests}` : void
|
|
|
23382
23429
|
}
|
|
23383
23430
|
];
|
|
23384
23431
|
}
|
|
23385
|
-
function rowFilter(
|
|
23386
|
-
const selected = view[
|
|
23432
|
+
function rowFilter(field2, key, label, detail) {
|
|
23433
|
+
const selected = view[field2] === key;
|
|
23387
23434
|
const button2 = focusKey(
|
|
23388
23435
|
h(
|
|
23389
23436
|
document2,
|
|
@@ -23397,9 +23444,9 @@ ${detail}` : ""}`
|
|
|
23397
23444
|
},
|
|
23398
23445
|
label
|
|
23399
23446
|
),
|
|
23400
|
-
`${
|
|
23447
|
+
`${field2}:row:${key}`
|
|
23401
23448
|
);
|
|
23402
|
-
button2.addEventListener("click", () => toggleFilter(
|
|
23449
|
+
button2.addEventListener("click", () => toggleFilter(field2, key));
|
|
23403
23450
|
return button2;
|
|
23404
23451
|
}
|
|
23405
23452
|
function panel(title, content, extra = null, wide = false) {
|
|
@@ -24238,8 +24285,8 @@ ${detail}` : ""}`
|
|
|
24238
24285
|
return input;
|
|
24239
24286
|
}
|
|
24240
24287
|
function createNumberField(document2, input) {
|
|
24241
|
-
const
|
|
24242
|
-
|
|
24288
|
+
const field2 = document2.createElement("div");
|
|
24289
|
+
field2.className = "flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-settings-border bg-settings-surface px-2.5 transition-colors focus-within:border-settings-focus data-[invalid=true]:border-settings-danger";
|
|
24243
24290
|
const control = document2.createElement("input");
|
|
24244
24291
|
control.type = "number";
|
|
24245
24292
|
control.id = input.id;
|
|
@@ -24252,8 +24299,8 @@ ${detail}` : ""}`
|
|
|
24252
24299
|
unit.className = "text-xs text-settings-muted";
|
|
24253
24300
|
unit.setAttribute("aria-hidden", "true");
|
|
24254
24301
|
unit.textContent = input.unit;
|
|
24255
|
-
|
|
24256
|
-
return { field, control };
|
|
24302
|
+
field2.append(control, unit);
|
|
24303
|
+
return { field: field2, control };
|
|
24257
24304
|
}
|
|
24258
24305
|
|
|
24259
24306
|
// src/settings/remote-connections-dialogs.ts
|
|
@@ -24337,7 +24384,7 @@ ${detail}` : ""}`
|
|
|
24337
24384
|
);
|
|
24338
24385
|
if (!dialog) return;
|
|
24339
24386
|
const document2 = options.container.ownerDocument;
|
|
24340
|
-
const
|
|
24387
|
+
const field2 = (label, value, placeholder = "", hint = "") => {
|
|
24341
24388
|
const wrapper = remoteElement(document2, "div", "settings-credential-dialog__field");
|
|
24342
24389
|
const input = remoteElement(document2, "input");
|
|
24343
24390
|
input.id = preferenceId("remote-field");
|
|
@@ -24357,13 +24404,13 @@ ${detail}` : ""}`
|
|
|
24357
24404
|
dialog.body.append(wrapper);
|
|
24358
24405
|
return input;
|
|
24359
24406
|
};
|
|
24360
|
-
const name =
|
|
24407
|
+
const name = field2(t("\u540D\u79F0", "Name"), previous?.displayName ?? "");
|
|
24361
24408
|
name.required = true;
|
|
24362
24409
|
const addressHint = t(
|
|
24363
24410
|
"user@hostname\uFF0C\u6216 ~/.ssh/config \u4E2D\u7684\u4E3B\u673A\u522B\u540D",
|
|
24364
24411
|
"user@hostname, or a host alias from ~/.ssh/config"
|
|
24365
24412
|
);
|
|
24366
|
-
const hostname3 =
|
|
24413
|
+
const hostname3 = field2(
|
|
24367
24414
|
t("SSH \u5730\u5740", "SSH address"),
|
|
24368
24415
|
previous?.sshHost ?? "",
|
|
24369
24416
|
"user@hostname",
|
|
@@ -24372,7 +24419,7 @@ ${detail}` : ""}`
|
|
|
24372
24419
|
hostname3.required = true;
|
|
24373
24420
|
hostname3.pattern = "[^\\s\\-]\\S*";
|
|
24374
24421
|
hostname3.title = addressHint;
|
|
24375
|
-
const port =
|
|
24422
|
+
const port = field2(
|
|
24376
24423
|
t("\u7AEF\u53E3\uFF08\u53EF\u9009\uFF09", "Port (optional)"),
|
|
24377
24424
|
previous?.sshPort?.toString() ?? "",
|
|
24378
24425
|
"22"
|
|
@@ -24381,7 +24428,7 @@ ${detail}` : ""}`
|
|
|
24381
24428
|
port.min = "1";
|
|
24382
24429
|
port.max = "65535";
|
|
24383
24430
|
port.step = "1";
|
|
24384
|
-
const identity =
|
|
24431
|
+
const identity = field2(
|
|
24385
24432
|
t("\u79C1\u94A5\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09", "Identity file (optional)"),
|
|
24386
24433
|
previous?.identity ?? "",
|
|
24387
24434
|
"~/.ssh/id_ed25519"
|
|
@@ -26626,6 +26673,50 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26626
26673
|
};
|
|
26627
26674
|
setRefreshLabel(false);
|
|
26628
26675
|
header.append(heading, refresh);
|
|
26676
|
+
let selectedHostId;
|
|
26677
|
+
let availableHostIds = [];
|
|
26678
|
+
let displayedHostId = "";
|
|
26679
|
+
let hostsLocked = false;
|
|
26680
|
+
const hostButtons = [];
|
|
26681
|
+
const hostLabel = document2.createElement("div");
|
|
26682
|
+
hostLabel.className = "settings-session-import-host";
|
|
26683
|
+
const hostCaption = document2.createElement("span");
|
|
26684
|
+
hostCaption.textContent = "Host";
|
|
26685
|
+
const hostOptions = document2.createElement("div");
|
|
26686
|
+
hostOptions.className = "settings-connection-host-tabs";
|
|
26687
|
+
hostOptions.setAttribute("role", "group");
|
|
26688
|
+
hostOptions.setAttribute("aria-label", "Host");
|
|
26689
|
+
hostLabel.append(hostCaption, hostOptions);
|
|
26690
|
+
const lockHosts = (locked) => {
|
|
26691
|
+
hostsLocked = locked;
|
|
26692
|
+
for (const button2 of hostButtons) button2.disabled = locked;
|
|
26693
|
+
};
|
|
26694
|
+
const renderHosts = (client) => {
|
|
26695
|
+
const current = selectedHostId ?? (client ? client.hostId ?? "local" : "");
|
|
26696
|
+
availableHostIds = [
|
|
26697
|
+
.../* @__PURE__ */ new Set([
|
|
26698
|
+
...getDiagnostics()?.snapshot().hosts.map(({ hostId: hostId2 }) => hostId2) ?? [],
|
|
26699
|
+
...current ? [current] : []
|
|
26700
|
+
])
|
|
26701
|
+
];
|
|
26702
|
+
displayedHostId = current;
|
|
26703
|
+
const scrollLeft = hostOptions.scrollLeft;
|
|
26704
|
+
hostOptions.replaceChildren();
|
|
26705
|
+
hostButtons.length = 0;
|
|
26706
|
+
for (const hostId2 of availableHostIds) {
|
|
26707
|
+
const button2 = document2.createElement("button");
|
|
26708
|
+
button2.type = "button";
|
|
26709
|
+
button2.className = "settings-connection-host-tab";
|
|
26710
|
+
button2.dataset.sessionImportHost = hostId2;
|
|
26711
|
+
button2.textContent = connectionHostName(hostId2, messages);
|
|
26712
|
+
button2.setAttribute("aria-pressed", String(hostId2 === current));
|
|
26713
|
+
button2.disabled = hostsLocked;
|
|
26714
|
+
button2.addEventListener("click", () => selectHost(hostId2));
|
|
26715
|
+
hostButtons.push(button2);
|
|
26716
|
+
hostOptions.append(button2);
|
|
26717
|
+
}
|
|
26718
|
+
hostOptions.scrollLeft = scrollLeft;
|
|
26719
|
+
};
|
|
26629
26720
|
const harness2 = document2.createElement("div");
|
|
26630
26721
|
harness2.className = "settings-session-import-harness";
|
|
26631
26722
|
const harnessLabel = document2.createElement("span");
|
|
@@ -26686,6 +26777,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26686
26777
|
const listControls = createSessionImportListControls(document2, messages, () => load());
|
|
26687
26778
|
context.content.append(
|
|
26688
26779
|
header,
|
|
26780
|
+
hostLabel,
|
|
26689
26781
|
harness2,
|
|
26690
26782
|
description,
|
|
26691
26783
|
availabilityNote,
|
|
@@ -26695,9 +26787,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26695
26787
|
listControls.pagination
|
|
26696
26788
|
);
|
|
26697
26789
|
let candidates = [];
|
|
26790
|
+
let loadedClient = null;
|
|
26698
26791
|
let importingId = null;
|
|
26699
26792
|
let actions = [];
|
|
26700
26793
|
const updateImportActions = () => {
|
|
26794
|
+
lockHosts(importingId !== null);
|
|
26701
26795
|
listControls.setBusy(importingId !== null, importingId !== null);
|
|
26702
26796
|
for (const button2 of sourceButtons) button2.disabled = importingId !== null;
|
|
26703
26797
|
for (const { button: button2, candidate } of actions) {
|
|
@@ -26718,7 +26812,10 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26718
26812
|
listControls.setTotal(0);
|
|
26719
26813
|
candidates = [];
|
|
26720
26814
|
actions = [];
|
|
26721
|
-
const status = createStatus(
|
|
26815
|
+
const status = createStatus(
|
|
26816
|
+
document2,
|
|
26817
|
+
!displayedHostId && availableHostIds.length > 1 ? messages.sessionImportSelectHost : messages.sessionImportUnavailable
|
|
26818
|
+
);
|
|
26722
26819
|
content.replaceChildren(status);
|
|
26723
26820
|
if (focus) {
|
|
26724
26821
|
status.tabIndex = -1;
|
|
@@ -26743,7 +26840,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26743
26840
|
status.focus();
|
|
26744
26841
|
}
|
|
26745
26842
|
};
|
|
26746
|
-
const renderOpenRecovery = (candidate, threadId) => {
|
|
26843
|
+
const renderOpenRecovery = (candidate, threadId, hostId2) => {
|
|
26747
26844
|
if (!openImportedThread) return;
|
|
26748
26845
|
actions = [];
|
|
26749
26846
|
refresh.disabled = false;
|
|
@@ -26796,6 +26893,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26796
26893
|
retry.className = "settings-command-button";
|
|
26797
26894
|
retry.dataset.sessionImportAction = "retry-open";
|
|
26798
26895
|
const setRetrying = (pending) => {
|
|
26896
|
+
lockHosts(pending);
|
|
26799
26897
|
listControls.setBusy(pending, pending);
|
|
26800
26898
|
for (const button2 of sourceButtons) button2.disabled = pending;
|
|
26801
26899
|
retry.disabled = pending;
|
|
@@ -26810,12 +26908,12 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26810
26908
|
retry.addEventListener("click", () => {
|
|
26811
26909
|
if (retry.disabled) return;
|
|
26812
26910
|
setRetrying(true);
|
|
26813
|
-
void context.runLatest((signal) => openImportedThread(threadId, signal), {
|
|
26911
|
+
void context.runLatest((signal) => openImportedThread(threadId, signal, hostId2), {
|
|
26814
26912
|
success() {
|
|
26815
26913
|
setRetrying(false);
|
|
26816
26914
|
},
|
|
26817
26915
|
failure() {
|
|
26818
|
-
renderOpenRecovery(candidate, threadId);
|
|
26916
|
+
renderOpenRecovery(candidate, threadId, hostId2);
|
|
26819
26917
|
}
|
|
26820
26918
|
});
|
|
26821
26919
|
});
|
|
@@ -26892,7 +26990,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26892
26990
|
if (candidate.running === true || importingId !== null || selectedHarness === null)
|
|
26893
26991
|
return;
|
|
26894
26992
|
const harnessId = selectedHarness;
|
|
26895
|
-
const client =
|
|
26993
|
+
const client = loadedClient;
|
|
26896
26994
|
if (!client) {
|
|
26897
26995
|
renderUnavailable(true);
|
|
26898
26996
|
return;
|
|
@@ -26910,7 +27008,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26910
27008
|
});
|
|
26911
27009
|
committedThreadId = result.threadId;
|
|
26912
27010
|
if (!signal.aborted && openImportedThread)
|
|
26913
|
-
await openImportedThread(result.threadId, signal);
|
|
27011
|
+
await openImportedThread(result.threadId, signal, client.hostId);
|
|
26914
27012
|
},
|
|
26915
27013
|
{
|
|
26916
27014
|
success() {
|
|
@@ -26928,7 +27026,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26928
27026
|
updateImportActions();
|
|
26929
27027
|
refresh.disabled = false;
|
|
26930
27028
|
if (committedThreadId) {
|
|
26931
|
-
renderOpenRecovery(candidate, committedThreadId);
|
|
27029
|
+
renderOpenRecovery(candidate, committedThreadId, client.hostId);
|
|
26932
27030
|
} else {
|
|
26933
27031
|
renderFailure(error51, "import");
|
|
26934
27032
|
}
|
|
@@ -26946,23 +27044,22 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26946
27044
|
};
|
|
26947
27045
|
const load = () => {
|
|
26948
27046
|
if (importingId !== null || context.signal.aborted) return;
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26955
|
-
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
setRefreshLabel(true);
|
|
26959
|
-
content.replaceChildren(createStatus(document2, messages.sessionImportRefreshing));
|
|
27047
|
+
loadedClient = null;
|
|
27048
|
+
const client = getClient(selectedHostId);
|
|
27049
|
+
renderHosts(client);
|
|
27050
|
+
listControls.setBusy(client !== null);
|
|
27051
|
+
refresh.disabled = client !== null;
|
|
27052
|
+
setRefreshLabel(client !== null);
|
|
27053
|
+
if (client)
|
|
27054
|
+
content.replaceChildren(createStatus(document2, messages.sessionImportRefreshing));
|
|
27055
|
+
else renderUnavailable();
|
|
26960
27056
|
const requestedHarness = selectedHarness;
|
|
26961
27057
|
const pageParams = listControls.params();
|
|
26962
27058
|
void context.runLatest(
|
|
26963
27059
|
async (signal) => {
|
|
27060
|
+
if (!client) throw new RendererSessionImportUnavailableError();
|
|
26964
27061
|
const missing = new Set(
|
|
26965
|
-
getDiagnostics()?.snapshot().hosts.find(({ hostId: hostId2 }) => hostId2 === "local")?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
|
|
27062
|
+
getDiagnostics()?.snapshot().hosts.find(({ hostId: hostId2 }) => hostId2 === (client.hostId ?? "local"))?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
|
|
26966
27063
|
);
|
|
26967
27064
|
const harnesses = (await client.listSessionImportSources()).harnesses.filter(
|
|
26968
27065
|
({ harnessId }) => !missing.has(harnessId)
|
|
@@ -26980,6 +27077,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26980
27077
|
},
|
|
26981
27078
|
{
|
|
26982
27079
|
success(result) {
|
|
27080
|
+
loadedClient = client;
|
|
26983
27081
|
listControls.setBusy(false);
|
|
26984
27082
|
if (listControls.setTotal(result.total)) {
|
|
26985
27083
|
load();
|
|
@@ -26992,6 +27090,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
26992
27090
|
else renderCandidates();
|
|
26993
27091
|
},
|
|
26994
27092
|
failure(error51) {
|
|
27093
|
+
loadedClient = null;
|
|
26995
27094
|
listControls.setBusy(false);
|
|
26996
27095
|
candidates = [];
|
|
26997
27096
|
refresh.disabled = false;
|
|
@@ -27001,6 +27100,19 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27001
27100
|
}
|
|
27002
27101
|
);
|
|
27003
27102
|
};
|
|
27103
|
+
const selectHost = (hostId2) => {
|
|
27104
|
+
if (hostsLocked || !availableHostIds.includes(hostId2) || hostId2 === selectedHostId) return;
|
|
27105
|
+
selectedHostId = hostId2;
|
|
27106
|
+
selectedHarness = null;
|
|
27107
|
+
sources = [];
|
|
27108
|
+
candidates = [];
|
|
27109
|
+
actions = [];
|
|
27110
|
+
importStatus.replaceChildren();
|
|
27111
|
+
listControls.reset();
|
|
27112
|
+
renderHarnessOptions();
|
|
27113
|
+
load();
|
|
27114
|
+
hostButtons.find((button2) => button2.dataset.sessionImportHost === hostId2)?.focus();
|
|
27115
|
+
};
|
|
27004
27116
|
refresh.addEventListener("click", load);
|
|
27005
27117
|
load();
|
|
27006
27118
|
return void 0;
|
|
@@ -27177,14 +27289,14 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27177
27289
|
description: messages.idleReleaseTimeoutDescription,
|
|
27178
27290
|
controlId: minutesId
|
|
27179
27291
|
});
|
|
27180
|
-
const { field, control: minutes } = createNumberField(document2, {
|
|
27292
|
+
const { field: field2, control: minutes } = createNumberField(document2, {
|
|
27181
27293
|
id: minutesId,
|
|
27182
27294
|
describedBy: timeout.description.id,
|
|
27183
27295
|
unit: messages.idleReleaseMinutes,
|
|
27184
27296
|
min: IDLE_RELEASE_TIMEOUT_MINUTES_MIN,
|
|
27185
27297
|
max: IDLE_RELEASE_TIMEOUT_MINUTES_MAX
|
|
27186
27298
|
});
|
|
27187
|
-
timeout.item.append(
|
|
27299
|
+
timeout.item.append(field2);
|
|
27188
27300
|
timeout.item.id = preferenceId("idle-release-timeout");
|
|
27189
27301
|
enabled.setAttribute("aria-controls", timeout.item.id);
|
|
27190
27302
|
card.append(toggle.item, timeout.item);
|
|
@@ -27205,7 +27317,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27205
27317
|
statusText.textContent = value === "applied" ? "" : statusMessages[value];
|
|
27206
27318
|
};
|
|
27207
27319
|
const setInvalid = (invalid) => {
|
|
27208
|
-
|
|
27320
|
+
field2.dataset.invalid = String(invalid);
|
|
27209
27321
|
timeout.description.dataset.invalid = String(invalid);
|
|
27210
27322
|
timeout.description.textContent = invalid ? messages.idleReleaseInvalid : messages.idleReleaseTimeoutDescription;
|
|
27211
27323
|
minutes.setAttribute("aria-invalid", String(invalid));
|
|
@@ -30044,6 +30156,41 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30044
30156
|
margin-top: 0;
|
|
30045
30157
|
}
|
|
30046
30158
|
|
|
30159
|
+
.settings-session-import-host {
|
|
30160
|
+
display: flex;
|
|
30161
|
+
align-items: center;
|
|
30162
|
+
min-width: 0;
|
|
30163
|
+
gap: 12px;
|
|
30164
|
+
margin: -12px 0 12px;
|
|
30165
|
+
color: var(--settings-muted);
|
|
30166
|
+
font-size: 13px;
|
|
30167
|
+
}
|
|
30168
|
+
|
|
30169
|
+
.settings-session-import-host > span,
|
|
30170
|
+
.settings-session-import-host + .settings-session-import-harness > span {
|
|
30171
|
+
flex: none;
|
|
30172
|
+
min-width: 60px;
|
|
30173
|
+
}
|
|
30174
|
+
|
|
30175
|
+
.settings-session-import-host > .settings-connection-host-tabs {
|
|
30176
|
+
flex: 1;
|
|
30177
|
+
}
|
|
30178
|
+
|
|
30179
|
+
.settings-session-import-host .settings-connection-host-tab {
|
|
30180
|
+
height: 34px;
|
|
30181
|
+
padding: 0 12px;
|
|
30182
|
+
font-size: 13px;
|
|
30183
|
+
}
|
|
30184
|
+
|
|
30185
|
+
.settings-session-import-host .settings-connection-host-tab:disabled {
|
|
30186
|
+
opacity: 0.38;
|
|
30187
|
+
cursor: not-allowed;
|
|
30188
|
+
}
|
|
30189
|
+
|
|
30190
|
+
.settings-session-import-host + .settings-session-import-harness {
|
|
30191
|
+
margin-top: 0;
|
|
30192
|
+
}
|
|
30193
|
+
|
|
30047
30194
|
.settings-session-import-search,
|
|
30048
30195
|
.settings-session-import-pagination {
|
|
30049
30196
|
display: flex;
|
|
@@ -30400,7 +30547,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
30400
30547
|
background: var(--settings-hover);
|
|
30401
30548
|
}
|
|
30402
30549
|
|
|
30403
|
-
.settings-connection-host-tab[aria-selected="true"]
|
|
30550
|
+
.settings-connection-host-tab[aria-selected="true"],
|
|
30551
|
+
.settings-connection-host-tab[aria-pressed="true"] {
|
|
30404
30552
|
color: var(--settings-text);
|
|
30405
30553
|
font-weight: 600;
|
|
30406
30554
|
background: var(--settings-active);
|
|
@@ -3308,10 +3308,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3308
3308
|
const shape = def.shape;
|
|
3309
3309
|
const propValues = {};
|
|
3310
3310
|
for (const key in shape) {
|
|
3311
|
-
const
|
|
3312
|
-
if (
|
|
3311
|
+
const field2 = shape[key]._zod;
|
|
3312
|
+
if (field2.values) {
|
|
3313
3313
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3314
|
-
for (const v of
|
|
3314
|
+
for (const v of field2.values)
|
|
3315
3315
|
propValues[key].add(v);
|
|
3316
3316
|
}
|
|
3317
3317
|
}
|
|
@@ -15059,6 +15059,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15059
15059
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15060
15060
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15061
15061
|
|
|
15062
|
+
// packages/shared-contracts/dist/thread-questions.js
|
|
15063
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15064
|
+
external_exports.object({
|
|
15065
|
+
id: external_exports.string().min(1),
|
|
15066
|
+
type: external_exports.literal("choice"),
|
|
15067
|
+
prompt: external_exports.string(),
|
|
15068
|
+
options: external_exports.array(external_exports.object({
|
|
15069
|
+
value: external_exports.string().min(1),
|
|
15070
|
+
label: external_exports.string(),
|
|
15071
|
+
description: external_exports.string().optional()
|
|
15072
|
+
})).min(1),
|
|
15073
|
+
multiple: external_exports.boolean(),
|
|
15074
|
+
allowOther: external_exports.boolean(),
|
|
15075
|
+
optional: external_exports.boolean()
|
|
15076
|
+
}),
|
|
15077
|
+
external_exports.object({
|
|
15078
|
+
id: external_exports.string().min(1),
|
|
15079
|
+
type: external_exports.literal("text"),
|
|
15080
|
+
prompt: external_exports.string(),
|
|
15081
|
+
multiline: external_exports.boolean(),
|
|
15082
|
+
secret: external_exports.literal(false),
|
|
15083
|
+
optional: external_exports.boolean(),
|
|
15084
|
+
placeholder: external_exports.string().optional(),
|
|
15085
|
+
prefill: external_exports.string().optional()
|
|
15086
|
+
})
|
|
15087
|
+
]);
|
|
15088
|
+
var threadQuestionSchema = external_exports.object({
|
|
15089
|
+
interactionId: external_exports.string().min(1),
|
|
15090
|
+
turnId: external_exports.string().min(1),
|
|
15091
|
+
title: external_exports.string().optional(),
|
|
15092
|
+
questions: external_exports.array(field).min(1)
|
|
15093
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15094
|
+
message: "Shared cards require at least one multi-select question"
|
|
15095
|
+
});
|
|
15096
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15097
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15098
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15099
|
+
threadId: external_exports.string().min(1),
|
|
15100
|
+
turnId: external_exports.string().min(1),
|
|
15101
|
+
interactionId: external_exports.string().min(1),
|
|
15102
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15103
|
+
cancelled: external_exports.boolean().default(false)
|
|
15104
|
+
});
|
|
15105
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15106
|
+
|
|
15062
15107
|
// packages/shared-contracts/dist/console.js
|
|
15063
15108
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15064
15109
|
title: external_exports.string().trim().min(1).max(200),
|