@karlorz/codexhost-cli-win32-x64 0.14.0-4 → 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 +160 -19
- 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 +1384 -1048
- 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",
|
|
@@ -16787,12 +16802,57 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16787
16802
|
function isRecord2(value) {
|
|
16788
16803
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
16789
16804
|
}
|
|
16790
|
-
function
|
|
16791
|
-
if (
|
|
16792
|
-
return
|
|
16805
|
+
function notificationTarget(manager) {
|
|
16806
|
+
if (typeof manager.addNotificationCallback === "function") {
|
|
16807
|
+
return manager;
|
|
16808
|
+
}
|
|
16809
|
+
const nested = manager.requestClient;
|
|
16810
|
+
return isRecord2(nested) && typeof nested.addNotificationCallback === "function" ? nested : null;
|
|
16811
|
+
}
|
|
16812
|
+
function notificationParams(notification) {
|
|
16813
|
+
if (!isRecord2(notification)) return null;
|
|
16814
|
+
return isRecord2(notification.params) ? notification.params : notification;
|
|
16815
|
+
}
|
|
16816
|
+
function notificationThreadId(notification) {
|
|
16817
|
+
const params = notificationParams(notification);
|
|
16818
|
+
if (!params) return null;
|
|
16819
|
+
if (typeof params.threadId === "string" && params.threadId) return params.threadId;
|
|
16820
|
+
if (typeof params.conversationId === "string" && params.conversationId)
|
|
16821
|
+
return params.conversationId;
|
|
16822
|
+
return null;
|
|
16823
|
+
}
|
|
16824
|
+
function turnStatus(notification) {
|
|
16825
|
+
const params = notificationParams(notification);
|
|
16826
|
+
if (!params) return null;
|
|
16827
|
+
if (typeof params.status === "string") return params.status;
|
|
16828
|
+
const turn = params.turn;
|
|
16829
|
+
return isRecord2(turn) && typeof turn.status === "string" ? turn.status : null;
|
|
16830
|
+
}
|
|
16831
|
+
function isExternalConversation(conversation, threadId) {
|
|
16832
|
+
return isRecord2(conversation) && conversation.id === threadId && conversation.modelProvider === "codexhost";
|
|
16833
|
+
}
|
|
16834
|
+
function firstQueuedItemId(items) {
|
|
16835
|
+
if (!Array.isArray(items)) return null;
|
|
16836
|
+
for (const item of items) {
|
|
16837
|
+
if (!isRecord2(item) || item.pausedReason != null) continue;
|
|
16838
|
+
if (typeof item.id === "string" && item.id) return item.id;
|
|
16839
|
+
}
|
|
16840
|
+
return null;
|
|
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);
|
|
16793
16851
|
}
|
|
16794
|
-
|
|
16795
|
-
|
|
16852
|
+
}
|
|
16853
|
+
function installLocalQueueGate(target) {
|
|
16854
|
+
const getTurnCoordinator = target.getTurnCoordinator;
|
|
16855
|
+
const coordinator = getTurnCoordinator.call(target);
|
|
16796
16856
|
const queue = isRecord2(coordinator) ? coordinator.serverQueue : null;
|
|
16797
16857
|
if (!isRecord2(queue) || typeof queue.isEnabled !== "function") return null;
|
|
16798
16858
|
const descriptor = Object.getOwnPropertyDescriptor(queue, "isEnabled");
|
|
@@ -16801,13 +16861,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16801
16861
|
const getConversation = target.getConversation;
|
|
16802
16862
|
const isEnabled = (...args) => {
|
|
16803
16863
|
const threadId = args[0];
|
|
16804
|
-
if (typeof threadId === "string") {
|
|
16805
|
-
|
|
16806
|
-
if (isRecord2(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
|
|
16807
|
-
// Desktop in both newly created and hydrated conversation metadata.
|
|
16808
|
-
conversation.modelProvider === "codexhost") {
|
|
16809
|
-
return false;
|
|
16810
|
-
}
|
|
16864
|
+
if (typeof threadId === "string" && isExternalConversation(getConversation.call(target, threadId), threadId)) {
|
|
16865
|
+
return false;
|
|
16811
16866
|
}
|
|
16812
16867
|
return original.apply(queue, args);
|
|
16813
16868
|
};
|
|
@@ -16816,6 +16871,92 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16816
16871
|
if (queue.isEnabled === isEnabled) Object.defineProperty(queue, "isEnabled", descriptor);
|
|
16817
16872
|
};
|
|
16818
16873
|
}
|
|
16874
|
+
function installServerQueueDrain(target) {
|
|
16875
|
+
if (typeof target.sendRequest !== "function") return null;
|
|
16876
|
+
const notifications = notificationTarget(target);
|
|
16877
|
+
if (!notifications) return null;
|
|
16878
|
+
const getConversation = target.getConversation;
|
|
16879
|
+
const getTurnCoordinator = target.getTurnCoordinator;
|
|
16880
|
+
const getStreamRole = target.getStreamRole;
|
|
16881
|
+
const sendRequest = target.sendRequest;
|
|
16882
|
+
const draining = /* @__PURE__ */ new Set();
|
|
16883
|
+
let disposed = false;
|
|
16884
|
+
const isExternalOwner = (threadId) => {
|
|
16885
|
+
if (!isExternalConversation(getConversation.call(target, threadId), threadId)) return false;
|
|
16886
|
+
const role = getStreamRole.call(target, threadId);
|
|
16887
|
+
return !(isRecord2(role) && role.role === "follower");
|
|
16888
|
+
};
|
|
16889
|
+
const isIdle = (threadId, coordinator) => {
|
|
16890
|
+
const options = isRecord2(coordinator) ? coordinator.options : null;
|
|
16891
|
+
const host = isRecord2(options) ? options.submissionHost : null;
|
|
16892
|
+
if (isRecord2(host) && typeof host.getActiveTurnId === "function" && typeof host.hasPendingTurnStart === "function") {
|
|
16893
|
+
return host.getActiveTurnId.call(host, threadId) == null && host.hasPendingTurnStart.call(host, threadId) !== true;
|
|
16894
|
+
}
|
|
16895
|
+
const conversation = getConversation.call(target, threadId);
|
|
16896
|
+
return isRecord2(conversation) && isRecord2(conversation.threadRuntimeStatus) && conversation.threadRuntimeStatus.type === "idle";
|
|
16897
|
+
};
|
|
16898
|
+
const queuedSubmissionId = (coordinator, threadId) => {
|
|
16899
|
+
if (isRecord2(coordinator) && typeof coordinator.readMessages === "function") {
|
|
16900
|
+
const messages = coordinator.readMessages.call(coordinator, threadId);
|
|
16901
|
+
if (Array.isArray(messages)) return firstQueuedItemId(messages);
|
|
16902
|
+
}
|
|
16903
|
+
const queue = isRecord2(coordinator) ? coordinator.serverQueue : null;
|
|
16904
|
+
if (isRecord2(queue) && typeof queue.read === "function") {
|
|
16905
|
+
return firstQueuedItemId(queue.read.call(queue, threadId));
|
|
16906
|
+
}
|
|
16907
|
+
return null;
|
|
16908
|
+
};
|
|
16909
|
+
const drain = (threadId) => {
|
|
16910
|
+
if (disposed || draining.has(threadId) || !isExternalOwner(threadId)) return;
|
|
16911
|
+
const coordinator = getTurnCoordinator.call(target);
|
|
16912
|
+
if (!isIdle(threadId, coordinator)) return;
|
|
16913
|
+
const queuedSubmissionIdValue = queuedSubmissionId(coordinator, threadId);
|
|
16914
|
+
if (!queuedSubmissionIdValue) return;
|
|
16915
|
+
draining.add(threadId);
|
|
16916
|
+
Promise.resolve(
|
|
16917
|
+
sendRequest.call(target, "thread/queue/start", {
|
|
16918
|
+
threadId,
|
|
16919
|
+
queuedSubmissionId: queuedSubmissionIdValue
|
|
16920
|
+
})
|
|
16921
|
+
).then(() => {
|
|
16922
|
+
removeQueuedItem(coordinator, threadId, queuedSubmissionIdValue);
|
|
16923
|
+
}).catch((error51) => {
|
|
16924
|
+
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
16925
|
+
if (message.includes("Queued follow-up was not found")) return;
|
|
16926
|
+
console.error("codexhost could not start the queued follow-up", error51);
|
|
16927
|
+
}).finally(() => {
|
|
16928
|
+
draining.delete(threadId);
|
|
16929
|
+
});
|
|
16930
|
+
};
|
|
16931
|
+
const onNotification = (notification) => {
|
|
16932
|
+
if (disposed) return;
|
|
16933
|
+
const method = isRecord2(notification) && typeof notification.method === "string" ? notification.method : null;
|
|
16934
|
+
const threadId = notificationThreadId(notification);
|
|
16935
|
+
if (!threadId) return;
|
|
16936
|
+
if (method === "turn/completed") {
|
|
16937
|
+
if (turnStatus(notification) === "interrupted") return;
|
|
16938
|
+
drain(threadId);
|
|
16939
|
+
return;
|
|
16940
|
+
}
|
|
16941
|
+
if (method === "thread/queue/changed") drain(threadId);
|
|
16942
|
+
};
|
|
16943
|
+
const unsubscribe = notifications.addNotificationCallback(
|
|
16944
|
+
["turn/completed", "thread/queue/changed"],
|
|
16945
|
+
onNotification
|
|
16946
|
+
);
|
|
16947
|
+
return () => {
|
|
16948
|
+
disposed = true;
|
|
16949
|
+
draining.clear();
|
|
16950
|
+
if (typeof unsubscribe === "function") unsubscribe();
|
|
16951
|
+
};
|
|
16952
|
+
}
|
|
16953
|
+
function installRendererExternalQueue(target) {
|
|
16954
|
+
if (!isRecord2(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
|
|
16955
|
+
return null;
|
|
16956
|
+
}
|
|
16957
|
+
if (typeof target.getStreamRole === "function") return installServerQueueDrain(target);
|
|
16958
|
+
return installLocalQueueGate(target);
|
|
16959
|
+
}
|
|
16819
16960
|
|
|
16820
16961
|
// src/renderer-native-thread.ts
|
|
16821
16962
|
function isRecord3(value) {
|
|
@@ -17203,7 +17344,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17203
17344
|
if (BLOCKED_METHODS.has(method)) return true;
|
|
17204
17345
|
return method.startsWith("turn/") || method.startsWith("item/");
|
|
17205
17346
|
}
|
|
17206
|
-
function
|
|
17347
|
+
function notificationThreadId2(params) {
|
|
17207
17348
|
if (!isRecord5(params)) return void 0;
|
|
17208
17349
|
if (typeof params.threadId === "string" && params.threadId.length > 0) return params.threadId;
|
|
17209
17350
|
const thread = params.thread;
|
|
@@ -17227,7 +17368,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17227
17368
|
const message = event.data;
|
|
17228
17369
|
if (!isRecord5(message) || message.type !== "mcp-notification") return;
|
|
17229
17370
|
if (typeof message.method !== "string") return;
|
|
17230
|
-
const threadId =
|
|
17371
|
+
const threadId = notificationThreadId2(message.params);
|
|
17231
17372
|
if (message.method === "thread/realtime/started" && threadId) {
|
|
17232
17373
|
voiceThreadIds.add(threadId);
|
|
17233
17374
|
return;
|