@karlorz/codexhost-cli-win32-x64 0.0.0-stage → 0.13.2-1

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.
Files changed (80) hide show
  1. package/README.md +48 -2
  2. package/THIRD_PARTY_NOTICES.txt +61 -0
  3. package/app/codexhost-distribution.json +1 -0
  4. package/app/console-server.mjs +18402 -0
  5. package/app/console-web.js +32110 -0
  6. package/app/cpa-live-voice-hook.js +149 -0
  7. package/app/desktop-controller.mjs +18102 -0
  8. package/app/host-runtime.mjs +48687 -0
  9. package/app/plugins/antigravity/assets/icon.svg +1 -0
  10. package/app/plugins/antigravity/manifest.json +29 -0
  11. package/app/plugins/antigravity/plugin.mjs +20224 -0
  12. package/app/plugins/claude-code/assets/icon.svg +3 -0
  13. package/app/plugins/claude-code/manifest.json +40 -0
  14. package/app/plugins/claude-code/plugin.mjs +61317 -0
  15. package/app/plugins/codebuddy/assets/icon.svg +1 -0
  16. package/app/plugins/codebuddy/manifest.json +30 -0
  17. package/app/plugins/codebuddy/plugin.mjs +26267 -0
  18. package/app/plugins/codex-usage/manifest.json +9 -0
  19. package/app/plugins/codex-usage/plugin.mjs +17366 -0
  20. package/app/plugins/cursor-cli/assets/icon.svg +1 -0
  21. package/app/plugins/cursor-cli/manifest.json +30 -0
  22. package/app/plugins/cursor-cli/plugin.mjs +49066 -0
  23. package/app/plugins/deepseek-harness/assets/icon.svg +1 -0
  24. package/app/plugins/deepseek-harness/manifest.json +44 -0
  25. package/app/plugins/deepseek-harness/plugin.mjs +32564 -0
  26. package/app/plugins/enabled.json +22 -0
  27. package/app/plugins/grok/assets/icon.png +0 -0
  28. package/app/plugins/grok/manifest.json +32 -0
  29. package/app/plugins/grok/plugin.mjs +26443 -0
  30. package/app/plugins/hermes/assets/icon.png +0 -0
  31. package/app/plugins/hermes/manifest.json +39 -0
  32. package/app/plugins/hermes/plugin.mjs +20507 -0
  33. package/app/plugins/kimi-code/assets/icon.svg +5 -0
  34. package/app/plugins/kimi-code/manifest.json +34 -0
  35. package/app/plugins/kimi-code/plugin.mjs +25784 -0
  36. package/app/plugins/kiro-cli/assets/kiro-agent.svg +11 -0
  37. package/app/plugins/kiro-cli/manifest.json +29 -0
  38. package/app/plugins/kiro-cli/plugin.mjs +24529 -0
  39. package/app/plugins/omp/assets/icon.svg +14 -0
  40. package/app/plugins/omp/manifest.json +32 -0
  41. package/app/plugins/omp/plugin.mjs +22306 -0
  42. package/app/plugins/opencode/assets/icon.png +0 -0
  43. package/app/plugins/opencode/manifest.json +29 -0
  44. package/app/plugins/opencode/plugin.mjs +28285 -0
  45. package/app/plugins/pi/assets/icon.svg +4 -0
  46. package/app/plugins/pi/manifest.json +44 -0
  47. package/app/plugins/pi/plugin.mjs +23049 -0
  48. package/app/plugins/qoder/assets/icon.svg +1 -0
  49. package/app/plugins/qoder/manifest.json +29 -0
  50. package/app/plugins/qoder/plugin.mjs +53719 -0
  51. package/app/plugins/qoder-cn/assets/icon.svg +1 -0
  52. package/app/plugins/qoder-cn/manifest.json +29 -0
  53. package/app/plugins/qoder-cn/plugin.mjs +53725 -0
  54. package/app/plugins/workbuddy/assets/icon.svg +29 -0
  55. package/app/plugins/workbuddy/manifest.json +32 -0
  56. package/app/plugins/workbuddy/plugin.mjs +26379 -0
  57. package/app/plugins/zcode/assets/icon.svg +8 -0
  58. package/app/plugins/zcode/manifest.json +32 -0
  59. package/app/plugins/zcode/plugin.mjs +20136 -0
  60. package/app/renderer-extension.js +41740 -0
  61. package/bin/codexhost.exe +0 -0
  62. package/libexec/codexhost-node-repl.exe +0 -0
  63. package/libexec/codexhost-shim.exe +0 -0
  64. package/libexec/codexhost-updater.exe +0 -0
  65. package/licenses/Agent-Client-Protocol-SDK-LICENSE.txt +191 -0
  66. package/licenses/Anthropic-SDK-LICENSE.txt +8 -0
  67. package/licenses/Claude-Agent-SDK-LICENSE.md +1 -0
  68. package/licenses/Cordis-LICENSE.txt +21 -0
  69. package/licenses/Cosmokit-LICENSE.txt +21 -0
  70. package/licenses/MCP-SDK-LICENSE.txt +21 -0
  71. package/licenses/OpenCode-SDK-LICENSE.txt +24 -0
  72. package/licenses/OpenCode-v2-Client-LICENSE.txt +21 -0
  73. package/licenses/Qoder-Agent-SDK-LICENSE.txt +7 -0
  74. package/licenses/QoderCN-Agent-SDK-LICENSE.txt +7 -0
  75. package/licenses/diff-LICENSE.txt +29 -0
  76. package/licenses/lucide-LICENSE.txt +43 -0
  77. package/licenses/tailwindcss-LICENSE.txt +21 -0
  78. package/licenses/ws-LICENSE.txt +20 -0
  79. package/licenses/zod-LICENSE.txt +21 -0
  80. package/package.json +40 -4
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ (() => {
3
+ // src/renderer-cpa-live-voice-preference.ts
4
+ var CPA_LIVE_VOICE_STORAGE_KEY = "codexhost.cpa-live-voice.v1";
5
+ function cpaLiveVoicePreferenceAllowsInstall(globalObject) {
6
+ const storage = globalObject.localStorage;
7
+ if (!storage) return true;
8
+ try {
9
+ return storage.getItem(CPA_LIVE_VOICE_STORAGE_KEY) !== "0";
10
+ } catch {
11
+ return true;
12
+ }
13
+ }
14
+
15
+ // src/renderer-cpa-live-voice-hook.ts
16
+ var CPA_LIVE_VOICE_HOOK_GLOBAL = "__codexhostCpaLiveVoiceHookV1";
17
+ var AUDITED_CPA_LIVE_VOICE_DESKTOP_VERSION = "26.1007.30912";
18
+ var AUDITED_CPA_LIVE_VOICE_APP_INITIAL_ASSET = "app-initial-6350d04672d0.js";
19
+ var THREAD_REALTIME_EXISTING_CALL_GATE = "206132468";
20
+ var originalCheckGate = /* @__PURE__ */ new WeakMap();
21
+ var DISCOVERY_TIMEOUT_MS = 6e4;
22
+ function isRecord(value) {
23
+ return typeof value === "object" && value !== null;
24
+ }
25
+ function readCpaLiveVoiceHookConfig(globalObject) {
26
+ const value = globalObject[CPA_LIVE_VOICE_HOOK_GLOBAL];
27
+ if (!isRecord(value) || value.enabled !== true) return null;
28
+ if (typeof value.auditedDesktopVersion !== "string" || typeof value.auditedAppInitialAsset !== "string") {
29
+ return null;
30
+ }
31
+ return {
32
+ enabled: true,
33
+ auditedDesktopVersion: value.auditedDesktopVersion,
34
+ auditedAppInitialAsset: value.auditedAppInitialAsset,
35
+ ...typeof value.desktopVersion === "string" ? { desktopVersion: value.desktopVersion } : {}
36
+ };
37
+ }
38
+ function auditedAppInitialAssetPresent(resourceNames, asset) {
39
+ return resourceNames.some((name) => {
40
+ try {
41
+ const url = new URL(name, "app://-/");
42
+ return url.protocol === "app:" && url.hostname === "-" && url.pathname === `/assets/${asset}`;
43
+ } catch {
44
+ return false;
45
+ }
46
+ });
47
+ }
48
+ function resourceNamesFromPerformance() {
49
+ if (typeof performance === "undefined" || typeof performance.getEntriesByType !== "function") {
50
+ return [];
51
+ }
52
+ return performance.getEntriesByType("resource").map((entry) => entry.name).filter((name) => typeof name === "string");
53
+ }
54
+ function resourceNamesFromDocument(root) {
55
+ const names = resourceNamesFromPerformance();
56
+ if (!root || !("querySelectorAll" in root)) return names;
57
+ for (const element of root.querySelectorAll("script[src], link[href]")) {
58
+ const value = element.getAttribute("src") ?? element.getAttribute("href");
59
+ if (value) names.push(value);
60
+ }
61
+ return names;
62
+ }
63
+ function statsigClients(globalObject) {
64
+ const registry = globalObject.__STATSIG__;
65
+ if (!isRecord(registry)) return [];
66
+ const clients = new Set(
67
+ isRecord(registry.instances) ? Object.values(registry.instances) : []
68
+ );
69
+ if (registry.firstInstance) clients.add(registry.firstInstance);
70
+ return [...clients].filter(
71
+ (client) => isRecord(client) && typeof client.checkGate === "function"
72
+ );
73
+ }
74
+ function wrapCheckGate(client) {
75
+ if (originalCheckGate.has(client)) return false;
76
+ const original = client.checkGate;
77
+ originalCheckGate.set(client, original);
78
+ client.checkGate = function(name, ...rest) {
79
+ return name === THREAD_REALTIME_EXISTING_CALL_GATE ? false : original.call(this, name, ...rest);
80
+ };
81
+ return true;
82
+ }
83
+ function restoreCheckGate(client) {
84
+ const original = originalCheckGate.get(client);
85
+ if (!original) return;
86
+ client.checkGate = original;
87
+ originalCheckGate.delete(client);
88
+ }
89
+ function configAllowsInstall(config, resourceNames) {
90
+ if (config.desktopVersion !== void 0 && config.desktopVersion !== config.auditedDesktopVersion) {
91
+ return false;
92
+ }
93
+ if (config.auditedDesktopVersion !== AUDITED_CPA_LIVE_VOICE_DESKTOP_VERSION) return false;
94
+ if (config.auditedAppInitialAsset !== AUDITED_CPA_LIVE_VOICE_APP_INITIAL_ASSET) return false;
95
+ return auditedAppInitialAssetPresent(resourceNames, config.auditedAppInitialAsset);
96
+ }
97
+ function installCpaLiveVoiceHook(options = {}) {
98
+ const globalObject = options.globalThis ?? globalThis;
99
+ const config = options.config === void 0 ? readCpaLiveVoiceHookConfig(globalObject) : options.config;
100
+ if (!config?.enabled || !cpaLiveVoicePreferenceAllowsInstall(globalObject)) {
101
+ return { status: "disabled", dispose() {
102
+ } };
103
+ }
104
+ const root = options.document ?? globalObject.document;
105
+ const wrapped = [];
106
+ let disposed = false;
107
+ let auditedAssetFound = false;
108
+ const handle = {
109
+ status: "pending",
110
+ dispose() {
111
+ disposed = true;
112
+ for (const client of wrapped) restoreCheckGate(client);
113
+ wrapped.length = 0;
114
+ }
115
+ };
116
+ const attempt = () => {
117
+ if (!auditedAssetFound) {
118
+ const resourceNames = options.resourceNames ?? resourceNamesFromDocument(root);
119
+ auditedAssetFound = configAllowsInstall(config, resourceNames);
120
+ if (!auditedAssetFound) return false;
121
+ }
122
+ for (const client of statsigClients(globalObject)) {
123
+ if (wrapCheckGate(client)) wrapped.push(client);
124
+ }
125
+ if (wrapped.length === 0) return false;
126
+ handle.status = "active";
127
+ return true;
128
+ };
129
+ if (attempt()) return handle;
130
+ if (options.resourceNames && !configAllowsInstall(config, options.resourceNames)) {
131
+ handle.status = "unsupported";
132
+ return handle;
133
+ }
134
+ const started = Date.now();
135
+ const tick = () => {
136
+ if (disposed || attempt()) return;
137
+ if (Date.now() - started > DISCOVERY_TIMEOUT_MS) {
138
+ handle.status = "unsupported";
139
+ return;
140
+ }
141
+ globalThis.setTimeout(tick, 250);
142
+ };
143
+ globalThis.setTimeout(tick, 250);
144
+ return handle;
145
+ }
146
+
147
+ // src/cpa-live-voice-entry.ts
148
+ installCpaLiveVoiceHook();
149
+ })();