@karlorz/codexhost-cli-win32-x64 0.14.0-5 → 0.15.0-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-web.js +133 -30
- package/app/cpa-live-voice-hook.js +34 -6
- package/app/desktop-controller.mjs +79 -39
- package/app/host-runtime.mjs +3234 -3054
- package/app/plugins/antigravity/plugin.mjs +292 -50
- package/app/plugins/claude-code/plugin.mjs +304 -108
- package/app/plugins/codebuddy/plugin.mjs +139 -25
- package/app/plugins/cursor-cli/plugin.mjs +139 -25
- package/app/plugins/grok/plugin.mjs +31 -18
- package/app/plugins/pi/plugin.mjs +31 -6
- package/app/plugins/workbuddy/plugin.mjs +139 -25
- package/app/plugins/zcode/plugin.mjs +28 -3
- package/app/renderer-extension.js +1263 -1040
- 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/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g @karlorz/codexhost-cli@0.
|
|
10
|
+
npm install -g @karlorz/codexhost-cli@0.15.0-0
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Do not install this package directly. npm selects it through the optional dependencies of `@karlorz/codexhost-cli`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"version":"0.
|
|
1
|
+
{"schemaVersion":1,"version":"0.15.0-0","distribution":"npm","target":"windows-x64"}
|
package/app/console-web.js
CHANGED
|
@@ -21707,12 +21707,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21707
21707
|
notAvailable: "Not available",
|
|
21708
21708
|
runtimeCapabilityNotInstalled: "This runtime capability is not installed yet.",
|
|
21709
21709
|
sessionImportHarness: "Harness",
|
|
21710
|
+
sessionImportSelectHost: "Select the Host to import sessions from",
|
|
21710
21711
|
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.",
|
|
21711
|
-
sessionImportAvailabilityNote: "Available Harnesses come from the
|
|
21712
|
+
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.",
|
|
21712
21713
|
sessionImportRefresh: "Refresh",
|
|
21713
|
-
sessionImportRefreshing: "Loading
|
|
21714
|
-
sessionImportUnavailable: "Session import is unavailable for this
|
|
21715
|
-
sessionImportEmpty: "No
|
|
21714
|
+
sessionImportRefreshing: "Loading sessions from the selected Host...",
|
|
21715
|
+
sessionImportUnavailable: "Session import is unavailable for this Harness or the selected Host protocol. Update the Host/plugin or choose another Harness.",
|
|
21716
|
+
sessionImportEmpty: "No sessions are available to import on the selected Host.",
|
|
21716
21717
|
sessionImportSearch: "Search",
|
|
21717
21718
|
sessionImportSearchPlaceholder: "Search titles, session IDs or project paths",
|
|
21718
21719
|
sessionImportNoMatches: "No sessions match your search.",
|
|
@@ -21720,7 +21721,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21720
21721
|
sessionImportPrevious: "Previous",
|
|
21721
21722
|
sessionImportNext: "Next",
|
|
21722
21723
|
sessionImportPageSummary: "Page {page} of {pages} \xB7 {total} sessions",
|
|
21723
|
-
sessionImportLoadFailed: "
|
|
21724
|
+
sessionImportLoadFailed: "Sessions could not be loaded from the selected Host. Check directory access or duplicate session IDs, then retry.",
|
|
21724
21725
|
sessionImportFailed: "The session could not be imported.",
|
|
21725
21726
|
sessionImportUntitled: "Untitled session",
|
|
21726
21727
|
sessionImportUpdatedAt: "Updated",
|
|
@@ -22016,12 +22017,13 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
22016
22017
|
notAvailable: "\u6682\u4E0D\u53EF\u7528",
|
|
22017
22018
|
runtimeCapabilityNotInstalled: "\u8FD0\u884C\u65F6\u5C1A\u672A\u5B89\u88C5\u8BE5\u9879\u80FD\u529B\uFF0C\u56E0\u6B64\u6682\u4E0D\u53EF\u7528\u3002",
|
|
22018
22019
|
sessionImportHarness: "Harness",
|
|
22020
|
+
sessionImportSelectHost: "\u8BF7\u9009\u62E9\u8981\u5BFC\u5165\u4F1A\u8BDD\u7684 Host",
|
|
22019
22021
|
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",
|
|
22020
|
-
sessionImportAvailabilityNote: "\u53EF\u9009 Harness \u6765\u81EA\
|
|
22022
|
+
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",
|
|
22021
22023
|
sessionImportRefresh: "\u5237\u65B0",
|
|
22022
|
-
sessionImportRefreshing: "\u6B63\u5728\u8BFB\u53D6\
|
|
22023
|
-
sessionImportUnavailable: "\
|
|
22024
|
-
sessionImportEmpty: "\u6CA1\u6709\u53EF\u5BFC\u5165\u7684\
|
|
22024
|
+
sessionImportRefreshing: "\u6B63\u5728\u8BFB\u53D6\u5F53\u524D Host \u4E0A\u7684\u4F1A\u8BDD\u2026\u2026",
|
|
22025
|
+
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",
|
|
22026
|
+
sessionImportEmpty: "\u5F53\u524D Host \u4E0A\u6CA1\u6709\u53EF\u5BFC\u5165\u7684\u4F1A\u8BDD\u3002",
|
|
22025
22027
|
sessionImportSearch: "\u641C\u7D22",
|
|
22026
22028
|
sessionImportSearchPlaceholder: "\u641C\u7D22\u6807\u9898\u3001\u4F1A\u8BDD ID \u6216\u9879\u76EE\u8DEF\u5F84",
|
|
22027
22029
|
sessionImportNoMatches: "\u6CA1\u6709\u5339\u914D\u7684\u4F1A\u8BDD\u3002",
|
|
@@ -22029,7 +22031,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
22029
22031
|
sessionImportPrevious: "\u4E0A\u4E00\u9875",
|
|
22030
22032
|
sessionImportNext: "\u4E0B\u4E00\u9875",
|
|
22031
22033
|
sessionImportPageSummary: "\u7B2C {page} / {pages} \u9875 \xB7 \u5171 {total} \u6761",
|
|
22032
|
-
sessionImportLoadFailed: "\u65E0\u6CD5\u8BFB\u53D6\
|
|
22034
|
+
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",
|
|
22033
22035
|
sessionImportFailed: "\u65E0\u6CD5\u5BFC\u5165\u8BE5\u4F1A\u8BDD\u3002",
|
|
22034
22036
|
sessionImportUntitled: "\u672A\u547D\u540D\u4F1A\u8BDD",
|
|
22035
22037
|
sessionImportUpdatedAt: "\u66F4\u65B0\u65F6\u95F4",
|
|
@@ -27638,6 +27640,50 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27638
27640
|
};
|
|
27639
27641
|
setRefreshLabel(false);
|
|
27640
27642
|
header.append(heading, refresh);
|
|
27643
|
+
let selectedHostId;
|
|
27644
|
+
let availableHostIds = [];
|
|
27645
|
+
let displayedHostId = "";
|
|
27646
|
+
let hostsLocked = false;
|
|
27647
|
+
const hostButtons = [];
|
|
27648
|
+
const hostLabel = document2.createElement("div");
|
|
27649
|
+
hostLabel.className = "settings-session-import-host";
|
|
27650
|
+
const hostCaption = document2.createElement("span");
|
|
27651
|
+
hostCaption.textContent = "Host";
|
|
27652
|
+
const hostOptions = document2.createElement("div");
|
|
27653
|
+
hostOptions.className = "settings-connection-host-tabs";
|
|
27654
|
+
hostOptions.setAttribute("role", "group");
|
|
27655
|
+
hostOptions.setAttribute("aria-label", "Host");
|
|
27656
|
+
hostLabel.append(hostCaption, hostOptions);
|
|
27657
|
+
const lockHosts = (locked) => {
|
|
27658
|
+
hostsLocked = locked;
|
|
27659
|
+
for (const button2 of hostButtons) button2.disabled = locked;
|
|
27660
|
+
};
|
|
27661
|
+
const renderHosts = (client) => {
|
|
27662
|
+
const current = selectedHostId ?? (client ? client.hostId ?? "local" : "");
|
|
27663
|
+
availableHostIds = [
|
|
27664
|
+
.../* @__PURE__ */ new Set([
|
|
27665
|
+
...getDiagnostics()?.snapshot().hosts.map(({ hostId: hostId2 }) => hostId2) ?? [],
|
|
27666
|
+
...current ? [current] : []
|
|
27667
|
+
])
|
|
27668
|
+
];
|
|
27669
|
+
displayedHostId = current;
|
|
27670
|
+
const scrollLeft = hostOptions.scrollLeft;
|
|
27671
|
+
hostOptions.replaceChildren();
|
|
27672
|
+
hostButtons.length = 0;
|
|
27673
|
+
for (const hostId2 of availableHostIds) {
|
|
27674
|
+
const button2 = document2.createElement("button");
|
|
27675
|
+
button2.type = "button";
|
|
27676
|
+
button2.className = "settings-connection-host-tab";
|
|
27677
|
+
button2.dataset.sessionImportHost = hostId2;
|
|
27678
|
+
button2.textContent = connectionHostName(hostId2, messages);
|
|
27679
|
+
button2.setAttribute("aria-pressed", String(hostId2 === current));
|
|
27680
|
+
button2.disabled = hostsLocked;
|
|
27681
|
+
button2.addEventListener("click", () => selectHost(hostId2));
|
|
27682
|
+
hostButtons.push(button2);
|
|
27683
|
+
hostOptions.append(button2);
|
|
27684
|
+
}
|
|
27685
|
+
hostOptions.scrollLeft = scrollLeft;
|
|
27686
|
+
};
|
|
27641
27687
|
const harness2 = document2.createElement("div");
|
|
27642
27688
|
harness2.className = "settings-session-import-harness";
|
|
27643
27689
|
const harnessLabel = document2.createElement("span");
|
|
@@ -27698,6 +27744,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27698
27744
|
const listControls = createSessionImportListControls(document2, messages, () => load());
|
|
27699
27745
|
context.content.append(
|
|
27700
27746
|
header,
|
|
27747
|
+
hostLabel,
|
|
27701
27748
|
harness2,
|
|
27702
27749
|
description,
|
|
27703
27750
|
availabilityNote,
|
|
@@ -27707,9 +27754,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27707
27754
|
listControls.pagination
|
|
27708
27755
|
);
|
|
27709
27756
|
let candidates = [];
|
|
27757
|
+
let loadedClient = null;
|
|
27710
27758
|
let importingId = null;
|
|
27711
27759
|
let actions = [];
|
|
27712
27760
|
const updateImportActions = () => {
|
|
27761
|
+
lockHosts(importingId !== null);
|
|
27713
27762
|
listControls.setBusy(importingId !== null, importingId !== null);
|
|
27714
27763
|
for (const button2 of sourceButtons) button2.disabled = importingId !== null;
|
|
27715
27764
|
for (const { button: button2, candidate } of actions) {
|
|
@@ -27730,7 +27779,10 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27730
27779
|
listControls.setTotal(0);
|
|
27731
27780
|
candidates = [];
|
|
27732
27781
|
actions = [];
|
|
27733
|
-
const status = createStatus(
|
|
27782
|
+
const status = createStatus(
|
|
27783
|
+
document2,
|
|
27784
|
+
!displayedHostId && availableHostIds.length > 1 ? messages.sessionImportSelectHost : messages.sessionImportUnavailable
|
|
27785
|
+
);
|
|
27734
27786
|
content.replaceChildren(status);
|
|
27735
27787
|
if (focus) {
|
|
27736
27788
|
status.tabIndex = -1;
|
|
@@ -27755,7 +27807,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27755
27807
|
status.focus();
|
|
27756
27808
|
}
|
|
27757
27809
|
};
|
|
27758
|
-
const renderOpenRecovery = (candidate, threadId) => {
|
|
27810
|
+
const renderOpenRecovery = (candidate, threadId, hostId2) => {
|
|
27759
27811
|
if (!openImportedThread) return;
|
|
27760
27812
|
actions = [];
|
|
27761
27813
|
refresh.disabled = false;
|
|
@@ -27808,6 +27860,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27808
27860
|
retry.className = "settings-command-button";
|
|
27809
27861
|
retry.dataset.sessionImportAction = "retry-open";
|
|
27810
27862
|
const setRetrying = (pending) => {
|
|
27863
|
+
lockHosts(pending);
|
|
27811
27864
|
listControls.setBusy(pending, pending);
|
|
27812
27865
|
for (const button2 of sourceButtons) button2.disabled = pending;
|
|
27813
27866
|
retry.disabled = pending;
|
|
@@ -27822,12 +27875,12 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27822
27875
|
retry.addEventListener("click", () => {
|
|
27823
27876
|
if (retry.disabled) return;
|
|
27824
27877
|
setRetrying(true);
|
|
27825
|
-
void context.runLatest((signal) => openImportedThread(threadId, signal), {
|
|
27878
|
+
void context.runLatest((signal) => openImportedThread(threadId, signal, hostId2), {
|
|
27826
27879
|
success() {
|
|
27827
27880
|
setRetrying(false);
|
|
27828
27881
|
},
|
|
27829
27882
|
failure() {
|
|
27830
|
-
renderOpenRecovery(candidate, threadId);
|
|
27883
|
+
renderOpenRecovery(candidate, threadId, hostId2);
|
|
27831
27884
|
}
|
|
27832
27885
|
});
|
|
27833
27886
|
});
|
|
@@ -27904,7 +27957,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27904
27957
|
if (candidate.running === true || importingId !== null || selectedHarness === null)
|
|
27905
27958
|
return;
|
|
27906
27959
|
const harnessId = selectedHarness;
|
|
27907
|
-
const client =
|
|
27960
|
+
const client = loadedClient;
|
|
27908
27961
|
if (!client) {
|
|
27909
27962
|
renderUnavailable(true);
|
|
27910
27963
|
return;
|
|
@@ -27922,7 +27975,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27922
27975
|
});
|
|
27923
27976
|
committedThreadId = result.threadId;
|
|
27924
27977
|
if (!signal.aborted && openImportedThread)
|
|
27925
|
-
await openImportedThread(result.threadId, signal);
|
|
27978
|
+
await openImportedThread(result.threadId, signal, client.hostId);
|
|
27926
27979
|
},
|
|
27927
27980
|
{
|
|
27928
27981
|
success() {
|
|
@@ -27940,7 +27993,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27940
27993
|
updateImportActions();
|
|
27941
27994
|
refresh.disabled = false;
|
|
27942
27995
|
if (committedThreadId) {
|
|
27943
|
-
renderOpenRecovery(candidate, committedThreadId);
|
|
27996
|
+
renderOpenRecovery(candidate, committedThreadId, client.hostId);
|
|
27944
27997
|
} else {
|
|
27945
27998
|
renderFailure(error51, "import");
|
|
27946
27999
|
}
|
|
@@ -27958,23 +28011,22 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27958
28011
|
};
|
|
27959
28012
|
const load = () => {
|
|
27960
28013
|
if (importingId !== null || context.signal.aborted) return;
|
|
27961
|
-
|
|
27962
|
-
|
|
27963
|
-
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
setRefreshLabel(true);
|
|
27971
|
-
content.replaceChildren(createStatus(document2, messages.sessionImportRefreshing));
|
|
28014
|
+
loadedClient = null;
|
|
28015
|
+
const client = getClient(selectedHostId);
|
|
28016
|
+
renderHosts(client);
|
|
28017
|
+
listControls.setBusy(client !== null);
|
|
28018
|
+
refresh.disabled = client !== null;
|
|
28019
|
+
setRefreshLabel(client !== null);
|
|
28020
|
+
if (client)
|
|
28021
|
+
content.replaceChildren(createStatus(document2, messages.sessionImportRefreshing));
|
|
28022
|
+
else renderUnavailable();
|
|
27972
28023
|
const requestedHarness = selectedHarness;
|
|
27973
28024
|
const pageParams = listControls.params();
|
|
27974
28025
|
void context.runLatest(
|
|
27975
28026
|
async (signal) => {
|
|
28027
|
+
if (!client) throw new RendererSessionImportUnavailableError();
|
|
27976
28028
|
const missing = new Set(
|
|
27977
|
-
getDiagnostics()?.snapshot().hosts.find(({ hostId: hostId2 }) => hostId2 === "local")?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
|
|
28029
|
+
getDiagnostics()?.snapshot().hosts.find(({ hostId: hostId2 }) => hostId2 === (client.hostId ?? "local"))?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
|
|
27978
28030
|
);
|
|
27979
28031
|
const harnesses = (await client.listSessionImportSources()).harnesses.filter(
|
|
27980
28032
|
({ harnessId }) => !missing.has(harnessId)
|
|
@@ -27992,6 +28044,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27992
28044
|
},
|
|
27993
28045
|
{
|
|
27994
28046
|
success(result) {
|
|
28047
|
+
loadedClient = client;
|
|
27995
28048
|
listControls.setBusy(false);
|
|
27996
28049
|
if (listControls.setTotal(result.total)) {
|
|
27997
28050
|
load();
|
|
@@ -28004,6 +28057,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
28004
28057
|
else renderCandidates();
|
|
28005
28058
|
},
|
|
28006
28059
|
failure(error51) {
|
|
28060
|
+
loadedClient = null;
|
|
28007
28061
|
listControls.setBusy(false);
|
|
28008
28062
|
candidates = [];
|
|
28009
28063
|
refresh.disabled = false;
|
|
@@ -28013,6 +28067,19 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
28013
28067
|
}
|
|
28014
28068
|
);
|
|
28015
28069
|
};
|
|
28070
|
+
const selectHost = (hostId2) => {
|
|
28071
|
+
if (hostsLocked || !availableHostIds.includes(hostId2) || hostId2 === selectedHostId) return;
|
|
28072
|
+
selectedHostId = hostId2;
|
|
28073
|
+
selectedHarness = null;
|
|
28074
|
+
sources = [];
|
|
28075
|
+
candidates = [];
|
|
28076
|
+
actions = [];
|
|
28077
|
+
importStatus.replaceChildren();
|
|
28078
|
+
listControls.reset();
|
|
28079
|
+
renderHarnessOptions();
|
|
28080
|
+
load();
|
|
28081
|
+
hostButtons.find((button2) => button2.dataset.sessionImportHost === hostId2)?.focus();
|
|
28082
|
+
};
|
|
28016
28083
|
refresh.addEventListener("click", load);
|
|
28017
28084
|
load();
|
|
28018
28085
|
return void 0;
|
|
@@ -31104,6 +31171,41 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
31104
31171
|
margin-top: 0;
|
|
31105
31172
|
}
|
|
31106
31173
|
|
|
31174
|
+
.settings-session-import-host {
|
|
31175
|
+
display: flex;
|
|
31176
|
+
align-items: center;
|
|
31177
|
+
min-width: 0;
|
|
31178
|
+
gap: 12px;
|
|
31179
|
+
margin: -12px 0 12px;
|
|
31180
|
+
color: var(--settings-muted);
|
|
31181
|
+
font-size: 13px;
|
|
31182
|
+
}
|
|
31183
|
+
|
|
31184
|
+
.settings-session-import-host > span,
|
|
31185
|
+
.settings-session-import-host + .settings-session-import-harness > span {
|
|
31186
|
+
flex: none;
|
|
31187
|
+
min-width: 60px;
|
|
31188
|
+
}
|
|
31189
|
+
|
|
31190
|
+
.settings-session-import-host > .settings-connection-host-tabs {
|
|
31191
|
+
flex: 1;
|
|
31192
|
+
}
|
|
31193
|
+
|
|
31194
|
+
.settings-session-import-host .settings-connection-host-tab {
|
|
31195
|
+
height: 34px;
|
|
31196
|
+
padding: 0 12px;
|
|
31197
|
+
font-size: 13px;
|
|
31198
|
+
}
|
|
31199
|
+
|
|
31200
|
+
.settings-session-import-host .settings-connection-host-tab:disabled {
|
|
31201
|
+
opacity: 0.38;
|
|
31202
|
+
cursor: not-allowed;
|
|
31203
|
+
}
|
|
31204
|
+
|
|
31205
|
+
.settings-session-import-host + .settings-session-import-harness {
|
|
31206
|
+
margin-top: 0;
|
|
31207
|
+
}
|
|
31208
|
+
|
|
31107
31209
|
.settings-session-import-search,
|
|
31108
31210
|
.settings-session-import-pagination {
|
|
31109
31211
|
display: flex;
|
|
@@ -31460,7 +31562,8 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
31460
31562
|
background: var(--settings-hover);
|
|
31461
31563
|
}
|
|
31462
31564
|
|
|
31463
|
-
.settings-connection-host-tab[aria-selected="true"]
|
|
31565
|
+
.settings-connection-host-tab[aria-selected="true"],
|
|
31566
|
+
.settings-connection-host-tab[aria-pressed="true"] {
|
|
31464
31567
|
color: var(--settings-text);
|
|
31465
31568
|
font-weight: 600;
|
|
31466
31569
|
background: var(--settings-active);
|
|
@@ -16357,10 +16357,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16357
16357
|
var RENDERER_NEW_THREAD_PREFERENCE_KEY = "codexhost.new-thread-preference.v1";
|
|
16358
16358
|
|
|
16359
16359
|
// src/renderer-client-owned-voice.ts
|
|
16360
|
-
var CLIENT_OWNED_VOICE_VERSION = "26.
|
|
16361
|
-
var CLIENT_OWNED_VOICE_INITIAL_ASSET = "app-initial-
|
|
16362
|
-
var CLIENT_OWNED_VOICE_SHARED_ASSET = "app-shared-
|
|
16363
|
-
var CLIENT_OWNED_VOICE_OVERLAY_ASSET = "avatar-overlay-native-page-
|
|
16360
|
+
var CLIENT_OWNED_VOICE_VERSION = "26.1023.51421";
|
|
16361
|
+
var CLIENT_OWNED_VOICE_INITIAL_ASSET = "app-initial-bc8256c3cccb.js";
|
|
16362
|
+
var CLIENT_OWNED_VOICE_SHARED_ASSET = "app-shared-e9f258fd3588.js";
|
|
16363
|
+
var CLIENT_OWNED_VOICE_OVERLAY_ASSET = "avatar-overlay-native-page-af6c3662f64f.js";
|
|
16364
16364
|
var CLIENT_OWNED_VOICE_ASSETS = [
|
|
16365
16365
|
{
|
|
16366
16366
|
platform: "darwin",
|
|
@@ -16368,6 +16368,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16368
16368
|
initial: CLIENT_OWNED_VOICE_INITIAL_ASSET,
|
|
16369
16369
|
shared: CLIENT_OWNED_VOICE_SHARED_ASSET,
|
|
16370
16370
|
overlay: CLIENT_OWNED_VOICE_OVERLAY_ASSET,
|
|
16371
|
+
init: "xir",
|
|
16372
|
+
fetch: "yir",
|
|
16373
|
+
fetchFrom: "initial",
|
|
16374
|
+
bridge: "QIt",
|
|
16375
|
+
services: "Sst",
|
|
16376
|
+
capabilityInit: "N4n",
|
|
16377
|
+
capabilityFamily: "M4n",
|
|
16378
|
+
inferenceGateFamily: "Par"
|
|
16379
|
+
},
|
|
16380
|
+
{
|
|
16381
|
+
platform: "darwin",
|
|
16382
|
+
version: "26.1021.31345",
|
|
16383
|
+
initial: "app-initial-feb30b196d11.js",
|
|
16384
|
+
shared: "app-shared-2cae01273bae.js",
|
|
16385
|
+
overlay: "avatar-overlay-native-page-d549db3706f1.js",
|
|
16371
16386
|
fetch: "Htr",
|
|
16372
16387
|
fetchFrom: "initial",
|
|
16373
16388
|
bridge: "bIt",
|
|
@@ -16378,7 +16393,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16378
16393
|
},
|
|
16379
16394
|
{
|
|
16380
16395
|
platform: "win32",
|
|
16381
|
-
version:
|
|
16396
|
+
version: "26.1021.31345",
|
|
16382
16397
|
initial: "app-initial-438d1df57f70.js",
|
|
16383
16398
|
shared: "app-shared-955d52676f9c.js",
|
|
16384
16399
|
overlay: "avatar-overlay-native-page-1549fe5955e1.js",
|
|
@@ -16824,6 +16839,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16824
16839
|
}
|
|
16825
16840
|
return null;
|
|
16826
16841
|
}
|
|
16842
|
+
function removeQueuedItem(coordinator, threadId, queuedSubmissionId) {
|
|
16843
|
+
if (!isRecord2(coordinator) || typeof coordinator.mutate !== "function") return;
|
|
16844
|
+
try {
|
|
16845
|
+
coordinator.mutate.call(coordinator, threadId, (current) => {
|
|
16846
|
+
if (!Array.isArray(current)) return current;
|
|
16847
|
+
return current.filter((item) => !isRecord2(item) || item.id !== queuedSubmissionId);
|
|
16848
|
+
});
|
|
16849
|
+
} catch (error51) {
|
|
16850
|
+
console.error("codexhost could not reconcile the submitted local follow-up", error51);
|
|
16851
|
+
}
|
|
16852
|
+
}
|
|
16827
16853
|
function installLocalQueueGate(target) {
|
|
16828
16854
|
const getTurnCoordinator = target.getTurnCoordinator;
|
|
16829
16855
|
const coordinator = getTurnCoordinator.call(target);
|
|
@@ -16892,7 +16918,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16892
16918
|
threadId,
|
|
16893
16919
|
queuedSubmissionId: queuedSubmissionIdValue
|
|
16894
16920
|
})
|
|
16895
|
-
).
|
|
16921
|
+
).then(() => {
|
|
16922
|
+
removeQueuedItem(coordinator, threadId, queuedSubmissionIdValue);
|
|
16923
|
+
}).catch((error51) => {
|
|
16896
16924
|
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
16897
16925
|
if (message.includes("Queued follow-up was not found")) return;
|
|
16898
16926
|
console.error("codexhost could not start the queued follow-up", error51);
|
|
@@ -17778,29 +17778,43 @@ function awaitWithSignal(promise2, signal, timeoutMessage) {
|
|
|
17778
17778
|
);
|
|
17779
17779
|
});
|
|
17780
17780
|
}
|
|
17781
|
+
function runWithCdpSignal(signal, timeoutMessage, operation) {
|
|
17782
|
+
signal.throwIfAborted();
|
|
17783
|
+
return awaitWithSignal(operation(), signal, timeoutMessage);
|
|
17784
|
+
}
|
|
17785
|
+
async function connectRendererTarget(target, operations, signal, timeoutMessage) {
|
|
17786
|
+
return runWithCdpSignal(signal, timeoutMessage, async () => {
|
|
17787
|
+
const connected = await operations.connect(target.webSocketDebuggerUrl);
|
|
17788
|
+
if (signal.aborted) {
|
|
17789
|
+
connected.close();
|
|
17790
|
+
signal.throwIfAborted();
|
|
17791
|
+
}
|
|
17792
|
+
return connected;
|
|
17793
|
+
});
|
|
17794
|
+
}
|
|
17781
17795
|
function sameAgents(actual, expected) {
|
|
17782
17796
|
if (!actual.includes("codex") || new Set(actual).size !== actual.length) return false;
|
|
17783
17797
|
if (!expected) return true;
|
|
17784
17798
|
const expectedSet = new Set(expected);
|
|
17785
17799
|
return actual.length === expected.length && actual.every((agent) => expectedSet.has(agent));
|
|
17786
17800
|
}
|
|
17787
|
-
function
|
|
17801
|
+
function parseCodexAppUrl(value) {
|
|
17788
17802
|
try {
|
|
17789
17803
|
const url2 = new URL(value);
|
|
17790
|
-
return url2.protocol === "app:" && url2.hostname === "-"
|
|
17804
|
+
return url2.protocol === "app:" && url2.hostname === "-" ? url2 : null;
|
|
17791
17805
|
} catch {
|
|
17792
|
-
return
|
|
17806
|
+
return null;
|
|
17793
17807
|
}
|
|
17794
17808
|
}
|
|
17809
|
+
function isPrimaryRendererUrl(value) {
|
|
17810
|
+
const url2 = parseCodexAppUrl(value);
|
|
17811
|
+
return url2 !== null && url2.pathname === "/index.html" && url2.search === "" && url2.hash === "";
|
|
17812
|
+
}
|
|
17795
17813
|
function isAvatarOverlayRendererUrl(value) {
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
return url2.pathname === "/index.html" && url2.searchParams.get("initialRoute") === "/avatar-overlay";
|
|
17801
|
-
} catch {
|
|
17802
|
-
return false;
|
|
17803
|
-
}
|
|
17814
|
+
const url2 = parseCodexAppUrl(value);
|
|
17815
|
+
if (!url2) return false;
|
|
17816
|
+
if (url2.pathname === "/avatar-overlay.html") return true;
|
|
17817
|
+
return url2.pathname === "/index.html" && url2.searchParams.get("initialRoute") === "/avatar-overlay";
|
|
17804
17818
|
}
|
|
17805
17819
|
function selectPrimaryRendererTarget(targets, preferredTargetId) {
|
|
17806
17820
|
const candidates = targets.filter(
|
|
@@ -17881,20 +17895,25 @@ async function evaluateSource(renderer, source) {
|
|
|
17881
17895
|
async function readBinding(renderer) {
|
|
17882
17896
|
return renderer.evaluate("window.__codexhostRendererBindingProbeV1?.status() ?? null");
|
|
17883
17897
|
}
|
|
17884
|
-
async function waitForBinding(renderer, enabledAgents, timeoutMs, pollIntervalMs) {
|
|
17898
|
+
async function waitForBinding(renderer, enabledAgents, timeoutMs, pollIntervalMs, signal) {
|
|
17885
17899
|
const deadline = Date.now() + timeoutMs;
|
|
17886
17900
|
let lastError;
|
|
17887
17901
|
while (Date.now() < deadline) {
|
|
17902
|
+
signal?.throwIfAborted();
|
|
17888
17903
|
try {
|
|
17889
|
-
const
|
|
17904
|
+
const reading = readBinding(renderer);
|
|
17905
|
+
const value = await (signal ? awaitWithSignal(reading, signal, "Renderer binding readiness timed out") : reading);
|
|
17906
|
+
signal?.throwIfAborted();
|
|
17890
17907
|
if (value !== null) return validateBindingStatus(value, enabledAgents);
|
|
17891
17908
|
} catch (error51) {
|
|
17909
|
+
signal?.throwIfAborted();
|
|
17892
17910
|
lastError = error51;
|
|
17893
17911
|
if (error51 instanceof RendererAdapterReadinessError && error51.state !== "installing") {
|
|
17894
17912
|
throw error51;
|
|
17895
17913
|
}
|
|
17896
17914
|
}
|
|
17897
|
-
|
|
17915
|
+
const pause = sleep(pollIntervalMs);
|
|
17916
|
+
await (signal ? awaitWithSignal(pause, signal, "Renderer binding readiness timed out") : pause);
|
|
17898
17917
|
}
|
|
17899
17918
|
const detail = lastError instanceof Error ? `: ${lastError.message}` : "";
|
|
17900
17919
|
throw new Error(`Production Renderer binding did not become ready${detail}`);
|
|
@@ -17910,18 +17929,9 @@ async function overlayHookAlreadyEnabled(renderer) {
|
|
|
17910
17929
|
}
|
|
17911
17930
|
}
|
|
17912
17931
|
async function installOverlayHook(target, overlayHookSource, operations, signal) {
|
|
17913
|
-
const
|
|
17914
|
-
|
|
17915
|
-
|
|
17916
|
-
};
|
|
17917
|
-
const renderer = await run(async () => {
|
|
17918
|
-
const connected = await operations.connect(target.webSocketDebuggerUrl);
|
|
17919
|
-
if (signal.aborted) {
|
|
17920
|
-
connected.close();
|
|
17921
|
-
signal.throwIfAborted();
|
|
17922
|
-
}
|
|
17923
|
-
return connected;
|
|
17924
|
-
});
|
|
17932
|
+
const timeoutMessage = "Overlay hook installation timed out";
|
|
17933
|
+
const run = (operation) => runWithCdpSignal(signal, timeoutMessage, operation);
|
|
17934
|
+
const renderer = await connectRendererTarget(target, operations, signal, timeoutMessage);
|
|
17925
17935
|
try {
|
|
17926
17936
|
await run(() => renderer.command("Runtime.enable"));
|
|
17927
17937
|
await run(() => renderer.command("Page.enable"));
|
|
@@ -17934,19 +17944,45 @@ async function installOverlayHook(target, overlayHookSource, operations, signal)
|
|
|
17934
17944
|
renderer.close();
|
|
17935
17945
|
}
|
|
17936
17946
|
}
|
|
17937
|
-
|
|
17938
|
-
if (
|
|
17947
|
+
function isLocalThreadRenderer(target) {
|
|
17948
|
+
if (target.type !== "page") return false;
|
|
17949
|
+
const url2 = parseCodexAppUrl(target.url);
|
|
17950
|
+
if (!url2 || url2.pathname !== "/index.html" || url2.hash !== "") return false;
|
|
17951
|
+
const route = url2.searchParams.get("initialRoute");
|
|
17952
|
+
return [...url2.searchParams.keys()].length === 1 && (route === "/local" || route?.startsWith("/local/") === true);
|
|
17953
|
+
}
|
|
17954
|
+
async function installLocalThreadRenderer(target, source, enabledAgents, operations, signal) {
|
|
17955
|
+
const timeoutMessage = "Local chat Renderer installation timed out";
|
|
17956
|
+
const run = (operation) => runWithCdpSignal(signal, timeoutMessage, operation);
|
|
17957
|
+
const renderer = await connectRendererTarget(target, operations, signal, timeoutMessage);
|
|
17939
17958
|
try {
|
|
17940
|
-
|
|
17941
|
-
await
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
);
|
|
17947
|
-
await
|
|
17948
|
-
|
|
17959
|
+
if (await run(() => readBinding(renderer)) === null) {
|
|
17960
|
+
await run(() => renderer.command("Runtime.enable"));
|
|
17961
|
+
await run(() => renderer.command("Page.enable"));
|
|
17962
|
+
await run(() => renderer.command("Page.addScriptToEvaluateOnNewDocument", { source }));
|
|
17963
|
+
await run(() => evaluateSource(renderer, source));
|
|
17964
|
+
}
|
|
17965
|
+
await run(() => operations.installDraftPrewarmPolicy(renderer));
|
|
17966
|
+
await waitForBinding(renderer, enabledAgents, 3e4, 25, signal);
|
|
17967
|
+
} finally {
|
|
17968
|
+
renderer.close();
|
|
17969
|
+
}
|
|
17970
|
+
}
|
|
17971
|
+
async function installAuxiliaryRenderers(endpoint, rendererSource, enabledAgents, overlayHookSource, operations, signal) {
|
|
17972
|
+
try {
|
|
17973
|
+
const targets = await awaitWithSignal(
|
|
17974
|
+
operations.listTargets(endpoint, signal),
|
|
17975
|
+
signal,
|
|
17976
|
+
"Auxiliary Renderer CDP target discovery timed out"
|
|
17949
17977
|
);
|
|
17978
|
+
await Promise.allSettled([
|
|
17979
|
+
...overlayHookSource ? selectAvatarOverlayRendererTargets(targets).map(
|
|
17980
|
+
(overlay) => installOverlayHook(overlay, overlayHookSource, operations, signal)
|
|
17981
|
+
) : [],
|
|
17982
|
+
...targets.filter(isLocalThreadRenderer).map(
|
|
17983
|
+
(target) => installLocalThreadRenderer(target, rendererSource, enabledAgents, operations, signal)
|
|
17984
|
+
)
|
|
17985
|
+
]);
|
|
17950
17986
|
} catch {
|
|
17951
17987
|
}
|
|
17952
17988
|
}
|
|
@@ -18037,8 +18073,10 @@ var InstalledRendererCdpControlSession = class {
|
|
|
18037
18073
|
this.currentSnapshot = replacement.snapshot;
|
|
18038
18074
|
}
|
|
18039
18075
|
}
|
|
18040
|
-
await
|
|
18076
|
+
await installAuxiliaryRenderers(
|
|
18041
18077
|
this.rendererCdpEndpoint,
|
|
18078
|
+
this.rendererSource,
|
|
18079
|
+
this.enabledAgents,
|
|
18042
18080
|
this.overlayHookSource,
|
|
18043
18081
|
this.operations,
|
|
18044
18082
|
discoveryTimeoutSignal(this.timeoutMs)
|
|
@@ -18086,8 +18124,10 @@ async function createRendererCdpControlSession(options) {
|
|
|
18086
18124
|
pollIntervalMs,
|
|
18087
18125
|
operations
|
|
18088
18126
|
);
|
|
18089
|
-
await
|
|
18127
|
+
await installAuxiliaryRenderers(
|
|
18090
18128
|
options.rendererCdpEndpoint,
|
|
18129
|
+
options.rendererSource,
|
|
18130
|
+
enabledAgents,
|
|
18091
18131
|
options.overlayHookSource,
|
|
18092
18132
|
operations,
|
|
18093
18133
|
discoveryTimeoutSignal(timeoutMs, options.signal)
|