@codexhost/cli-darwin-x64 0.3.4 → 0.4.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/desktop-controller.mjs +4 -35
- package/app/host-runtime.mjs +7516 -3308
- package/app/renderer-extension.js +1496 -700
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +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 @codexhost/cli@0.
|
|
10
|
+
npm install -g @codexhost/cli@0.4.0
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Do not install this package directly. npm selects it through the optional dependencies of `@codexhost/cli`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"version":"0.
|
|
1
|
+
{"schemaVersion":1,"version":"0.4.0","distribution":"npm","target":"macos-x64"}
|
|
@@ -55,14 +55,6 @@ async function startControllerAttachmentServer(options) {
|
|
|
55
55
|
);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
if (line === `COMPATIBILITY_UPDATE ${options.nonce}`) {
|
|
59
|
-
socket.setTimeout(2e4);
|
|
60
|
-
void options.compatibilityUpdate().then(
|
|
61
|
-
(outcome) => respond(socket, outcome),
|
|
62
|
-
() => respond(socket, "failed")
|
|
63
|
-
);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
58
|
respond(socket, "rejected");
|
|
67
59
|
});
|
|
68
60
|
});
|
|
@@ -993,6 +985,9 @@ function installDraftPrewarmPolicyBridge(manager, bridge, hostId, target, prewar
|
|
|
993
985
|
owns(candidateManager, candidate, candidateHostId, candidatePrewarmedThreadManager) {
|
|
994
986
|
return candidateManager === manager && candidate === bridge && candidateHostId === hostId && candidatePrewarmedThreadManager === prewarmedThreadManager;
|
|
995
987
|
},
|
|
988
|
+
requestTarget() {
|
|
989
|
+
return manager;
|
|
990
|
+
},
|
|
996
991
|
select(model) {
|
|
997
992
|
if (model !== null && (typeof model !== "string" || !model.startsWith("codexhost/"))) {
|
|
998
993
|
throw new Error("Draft route Model must be a codexhost transport carrier");
|
|
@@ -1524,15 +1519,6 @@ var InstalledRendererControlSession = class {
|
|
|
1524
1519
|
if (this.#closed) return Promise.reject(new Error("Renderer Control Session is closed"));
|
|
1525
1520
|
return activateElectronDesktop(this.inspector);
|
|
1526
1521
|
}
|
|
1527
|
-
async requestCompatibilityUpdate() {
|
|
1528
|
-
const value = await this.executeRenderer(
|
|
1529
|
-
"window.__codexhostRendererBindingProbeV1?.requestCompatibilityUpdate?.() ?? 'unavailable'"
|
|
1530
|
-
);
|
|
1531
|
-
if (value !== "update-started" && value !== "current" && value !== "unavailable") {
|
|
1532
|
-
throw new Error("Renderer returned an invalid compatibility update outcome");
|
|
1533
|
-
}
|
|
1534
|
-
return value;
|
|
1535
|
-
}
|
|
1536
1522
|
executeRenderer(expression) {
|
|
1537
1523
|
if (this.#closed) return Promise.reject(new Error("Renderer Control Session is closed"));
|
|
1538
1524
|
return this.operations.execute(
|
|
@@ -1657,21 +1643,8 @@ function startupTrace2(stage, detail) {
|
|
|
1657
1643
|
`[codexhost startup +${Date.now() - startupTraceStartedAt2}ms] controller: ${stage}${suffix}`
|
|
1658
1644
|
);
|
|
1659
1645
|
}
|
|
1660
|
-
function validCompatibilityIssue(state, issue) {
|
|
1661
|
-
const keys = Object.keys(issue);
|
|
1662
|
-
if (state === "degraded") {
|
|
1663
|
-
return [
|
|
1664
|
-
"permission-control",
|
|
1665
|
-
"sidebar-decoration",
|
|
1666
|
-
"fork-control",
|
|
1667
|
-
"usage-surface",
|
|
1668
|
-
"settings-surface"
|
|
1669
|
-
].includes(issue.capability) && issue.reason === "capability-unavailable" && keys.length === 2;
|
|
1670
|
-
}
|
|
1671
|
-
return false;
|
|
1672
|
-
}
|
|
1673
1646
|
function serializeDesktopControllerReadiness(readiness) {
|
|
1674
|
-
if (readiness.schemaVersion !== 2 ||
|
|
1647
|
+
if (readiness.schemaVersion !== 2 || readiness.state !== "compatible" || !Array.isArray(readiness.issues) || readiness.issues.length !== 0 || Object.keys(readiness).length !== 3) {
|
|
1675
1648
|
throw new Error("Desktop Controller readiness is invalid");
|
|
1676
1649
|
}
|
|
1677
1650
|
const line = JSON.stringify(readiness);
|
|
@@ -1873,10 +1846,6 @@ ${rendererSource}`,
|
|
|
1873
1846
|
attach: () => useSession(async () => {
|
|
1874
1847
|
const current = await recoverSession();
|
|
1875
1848
|
await current.activateDesktop();
|
|
1876
|
-
}),
|
|
1877
|
-
compatibilityUpdate: () => useSession(async () => {
|
|
1878
|
-
const current = await recoverSession();
|
|
1879
|
-
return current.requestCompatibilityUpdate();
|
|
1880
1849
|
})
|
|
1881
1850
|
});
|
|
1882
1851
|
startupTrace2("attachment server ready");
|