@codexhost/cli-linux-arm64 0.18.0-beta.4 → 0.18.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 +98 -55
- package/app/console-web.js +276 -188
- package/app/desktop-controller.mjs +283 -113
- package/app/host-runtime.mjs +2129 -1529
- package/app/plugins/antigravity/plugin.mjs +787 -303
- package/app/plugins/claude-code/plugin.mjs +85 -45
- package/app/plugins/codebuddy/plugin.mjs +99 -59
- package/app/plugins/codex-usage/plugin.mjs +85 -45
- package/app/plugins/copilot/plugin.mjs +90 -50
- package/app/plugins/cursor-cli/plugin.mjs +113 -73
- package/app/plugins/deepseek-harness/plugin.mjs +116 -76
- package/app/plugins/devin/plugin.mjs +90 -50
- package/app/plugins/grok/plugin.mjs +96 -56
- package/app/plugins/hermes/plugin.mjs +77 -37
- package/app/plugins/kimi-code/plugin.mjs +94 -54
- package/app/plugins/kiro-cli/plugin.mjs +90 -50
- package/app/plugins/omp/plugin.mjs +81 -41
- package/app/plugins/opencode/plugin.mjs +78 -38
- package/app/plugins/pi/plugin.mjs +94 -54
- package/app/plugins/qoder/plugin.mjs +106 -66
- package/app/plugins/qoder-cn/plugin.mjs +106 -66
- package/app/plugins/qwen-code/plugin.mjs +101 -61
- package/app/plugins/workbuddy/plugin.mjs +99 -59
- package/app/plugins/zcode/plugin.mjs +82 -42
- package/app/renderer-extension.js +435 -361
- package/app/web/assets/{index-D1dOzBMI.js → index-C0aXz2jD.js} +63 -63
- package/app/web/codex-agent.png +0 -0
- package/app/web/codexhost-settings.js +229 -175
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +61 -61
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +12 -12
- package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-theme/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web/sw.js +41 -6
- package/app/web-modules/server.mjs +2079 -1201
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
package/app/web/sw.js
CHANGED
|
@@ -145,6 +145,46 @@ function offlineResponse() {
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
async function pushRequest(method, args) {
|
|
149
|
+
const response = await fetch(new URL(`api/${method}`, self.registration.scope).href, {
|
|
150
|
+
method: "POST",
|
|
151
|
+
credentials: "same-origin",
|
|
152
|
+
headers: { "content-type": "application/json" },
|
|
153
|
+
body: JSON.stringify({
|
|
154
|
+
type: "client-request",
|
|
155
|
+
rpcId: crypto.randomUUID(),
|
|
156
|
+
method,
|
|
157
|
+
payload: { args },
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
if (!response.ok) throw new Error(`HTTP ${String(response.status)}`);
|
|
161
|
+
const envelope = await response.json();
|
|
162
|
+
if (!envelope.result.ok) throw new Error(envelope.result.error.message);
|
|
163
|
+
return envelope.result.value;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
self.addEventListener("pushsubscriptionchange", (event) => {
|
|
167
|
+
event.waitUntil(
|
|
168
|
+
(async () => {
|
|
169
|
+
let applicationServerKey = event.oldSubscription?.options?.applicationServerKey;
|
|
170
|
+
if (!applicationServerKey) {
|
|
171
|
+
const { publicKey } = await pushRequest("codexhost/pushConfig", {});
|
|
172
|
+
const padding = "=".repeat((4 - (publicKey.length % 4)) % 4);
|
|
173
|
+
const raw = atob((publicKey + padding).replace(/-/gu, "+").replace(/_/gu, "/"));
|
|
174
|
+
applicationServerKey = Uint8Array.from(raw, (character) => character.charCodeAt(0));
|
|
175
|
+
}
|
|
176
|
+
const subscription = await self.registration.pushManager.subscribe({
|
|
177
|
+
userVisibleOnly: true,
|
|
178
|
+
applicationServerKey,
|
|
179
|
+
});
|
|
180
|
+
await pushRequest("codexhost/pushSubscribe", {
|
|
181
|
+
subscription: subscription.toJSON(),
|
|
182
|
+
userAgent: navigator.userAgent,
|
|
183
|
+
});
|
|
184
|
+
})(),
|
|
185
|
+
);
|
|
186
|
+
});
|
|
187
|
+
|
|
148
188
|
self.addEventListener("push", (event) => {
|
|
149
189
|
let message = {};
|
|
150
190
|
try {
|
|
@@ -154,12 +194,7 @@ self.addEventListener("push", (event) => {
|
|
|
154
194
|
}
|
|
155
195
|
event.waitUntil(
|
|
156
196
|
(async () => {
|
|
157
|
-
//
|
|
158
|
-
const windows = await self.clients.matchAll({ type: "window", includeUncontrolled: true });
|
|
159
|
-
const visible = windows.some(
|
|
160
|
-
(client) => client.visibilityState === "visible" && client.focused,
|
|
161
|
-
);
|
|
162
|
-
if (visible && message.kind === "turn") return;
|
|
197
|
+
// Web Push requires a visible notification even while the app is in the foreground.
|
|
163
198
|
await self.registration.showNotification(message.title || "CodexHost", {
|
|
164
199
|
body: message.body || "",
|
|
165
200
|
tag: message.tag || undefined,
|