@karlorz/codexhost-cli-darwin-x64 0.21.0-0 → 0.22.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-server.mjs +1 -0
- package/app/console-web.js +2 -1
- package/app/cpa-live-voice-hook.js +213 -178
- package/app/desktop-controller.mjs +8 -2
- package/app/host-runtime.mjs +96 -26
- package/app/overlay-voice-bootstrap.js +1 -1616
- package/app/plugins/antigravity/plugin.mjs +1144 -1254
- package/app/plugins/claude-code/plugin.mjs +389 -80
- package/app/plugins/codebuddy/plugin.mjs +1 -0
- package/app/plugins/codex-usage/plugin.mjs +1 -0
- package/app/plugins/copilot/plugin.mjs +1 -0
- package/app/plugins/cursor-cli/plugin.mjs +1 -0
- package/app/plugins/deepseek-harness/plugin.mjs +1 -0
- package/app/plugins/devin/plugin.mjs +1 -0
- package/app/plugins/grok/plugin.mjs +232 -217
- package/app/plugins/hermes/plugin.mjs +1 -0
- package/app/plugins/kimi-code/plugin.mjs +1 -0
- package/app/plugins/kiro-cli/plugin.mjs +1 -0
- package/app/plugins/omp/plugin.mjs +108 -22
- package/app/plugins/opencode/plugin.mjs +1 -0
- package/app/plugins/pi/plugin.mjs +119 -23
- package/app/plugins/qoder/plugin.mjs +1 -0
- package/app/plugins/qoder-cn/plugin.mjs +1 -0
- package/app/plugins/qwen-code/plugin.mjs +1 -0
- package/app/plugins/workbuddy/plugin.mjs +1 -0
- package/app/plugins/zcode/plugin.mjs +1 -0
- package/app/renderer-extension.js +799 -476
- package/app/voice-qualification.json +13 -13
- package/app/web/assets/index-CYo5zTz_.js +201 -0
- package/app/web/codexhost-settings.js +2 -1
- 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 +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +9 -9
- 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 +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +1 -1
- package/app/web-modules/server.mjs +130 -74
- 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/assets/index-DLXdvkWR.js +0 -201
|
@@ -16985,6 +16985,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16985
16985
|
message: "A history continuation requires its connection epoch"
|
|
16986
16986
|
}).optional()
|
|
16987
16987
|
}),
|
|
16988
|
+
external_exports.strictObject({ kind: external_exports.literal("usage"), ...thread, epoch: identity }),
|
|
16988
16989
|
external_exports.strictObject({
|
|
16989
16990
|
kind: external_exports.literal("configure"),
|
|
16990
16991
|
...thread,
|
|
@@ -17159,13 +17160,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17159
17160
|
}
|
|
17160
17161
|
function parseVoiceRoutes(value) {
|
|
17161
17162
|
if (value === null || typeof value !== "object") return;
|
|
17162
|
-
const
|
|
17163
|
-
if (
|
|
17163
|
+
const record6 = value;
|
|
17164
|
+
if (record6.chatExperience !== "chatgpt" && record6.chatExperience !== "codex" || record6.chatConnection !== "desktop" && record6.chatConnection !== "gateway" || record6.workConnection !== "desktop" && record6.workConnection !== "gateway")
|
|
17164
17165
|
return;
|
|
17165
17166
|
return {
|
|
17166
|
-
chatExperience:
|
|
17167
|
-
chatConnection:
|
|
17168
|
-
workConnection:
|
|
17167
|
+
chatExperience: record6.chatExperience,
|
|
17168
|
+
chatConnection: record6.chatConnection,
|
|
17169
|
+
workConnection: record6.workConnection
|
|
17169
17170
|
};
|
|
17170
17171
|
}
|
|
17171
17172
|
function cachedVoiceRoutes(owner) {
|
|
@@ -17195,8 +17196,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17195
17196
|
const routes = cachedVoiceRoutes(owner);
|
|
17196
17197
|
return routes ? routes.chatExperience === "chatgpt" : !readVoiceStorageFlag(owner, CHAT_LIVE_VOICE_STORAGE_KEY, false);
|
|
17197
17198
|
}
|
|
17198
|
-
|
|
17199
|
-
// src/renderer-cpa-live-voice-preference.ts
|
|
17200
17199
|
function readCpaLiveVoicePreference(owner) {
|
|
17201
17200
|
const routes = cachedVoiceRoutes(owner);
|
|
17202
17201
|
return routes ? routes.workConnection === "gateway" : readVoiceStorageFlag(owner, CPA_LIVE_VOICE_STORAGE_KEY, true);
|
|
@@ -17327,7 +17326,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17327
17326
|
}
|
|
17328
17327
|
|
|
17329
17328
|
// src/renderer-voice-implementation-revision.generated.ts
|
|
17330
|
-
var VOICE_IMPLEMENTATION_REVISION = "
|
|
17329
|
+
var VOICE_IMPLEMENTATION_REVISION = "af0ca16ef25a57ae";
|
|
17331
17330
|
|
|
17332
17331
|
// src/renderer-voice-profiles.ts
|
|
17333
17332
|
var NATIVE_CHAT_VOICE_VERSION = "26.1027.61615";
|
|
@@ -18030,106 +18029,106 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18030
18029
|
function recordObject(value) {
|
|
18031
18030
|
return value !== null && typeof value === "object";
|
|
18032
18031
|
}
|
|
18033
|
-
function missingStages(
|
|
18034
|
-
return REQUIRED_STAGES.filter((stage) =>
|
|
18032
|
+
function missingStages(record6) {
|
|
18033
|
+
return REQUIRED_STAGES.filter((stage) => record6.stages[stage] !== true);
|
|
18035
18034
|
}
|
|
18036
18035
|
function productForPath(path) {
|
|
18037
18036
|
return path === "chat" ? "chat" : "work";
|
|
18038
18037
|
}
|
|
18039
|
-
function evaluateVoiceEvidence(
|
|
18038
|
+
function evaluateVoiceEvidence(record6) {
|
|
18040
18039
|
const expectedKey = profileIdentityKey(
|
|
18041
|
-
productForPath(
|
|
18042
|
-
|
|
18043
|
-
|
|
18040
|
+
productForPath(record6.path),
|
|
18041
|
+
record6.platform,
|
|
18042
|
+
record6.desktopVersion
|
|
18044
18043
|
);
|
|
18045
|
-
if (
|
|
18044
|
+
if (record6.profileKey !== expectedKey) {
|
|
18046
18045
|
return {
|
|
18047
18046
|
outcome: "mismatch",
|
|
18048
18047
|
qualified: false,
|
|
18049
|
-
missing: missingStages(
|
|
18048
|
+
missing: missingStages(record6),
|
|
18050
18049
|
reason: "evidence-profile-mismatch"
|
|
18051
18050
|
};
|
|
18052
18051
|
}
|
|
18053
|
-
if (typeof
|
|
18052
|
+
if (typeof record6.implementationRevision !== "string" || record6.implementationRevision === "") {
|
|
18054
18053
|
return {
|
|
18055
18054
|
outcome: "mismatch",
|
|
18056
18055
|
qualified: false,
|
|
18057
|
-
missing: missingStages(
|
|
18056
|
+
missing: missingStages(record6),
|
|
18058
18057
|
reason: "missing-implementation-revision"
|
|
18059
18058
|
};
|
|
18060
18059
|
}
|
|
18061
|
-
if (
|
|
18060
|
+
if (record6.policy !== "legacy-retained" && record6.implementationRevision !== voiceImplementationRevision()) {
|
|
18062
18061
|
return {
|
|
18063
18062
|
outcome: "mismatch",
|
|
18064
18063
|
qualified: false,
|
|
18065
|
-
missing: missingStages(
|
|
18064
|
+
missing: missingStages(record6),
|
|
18066
18065
|
reason: "implementation-revision-mismatch"
|
|
18067
18066
|
};
|
|
18068
18067
|
}
|
|
18069
|
-
if (
|
|
18070
|
-
if (typeof
|
|
18068
|
+
if (record6.policy !== "legacy-retained") {
|
|
18069
|
+
if (typeof record6.desktopBuild !== "string" || record6.desktopBuild === "" || typeof record6.asarDigest !== "string" || record6.asarDigest === "") {
|
|
18071
18070
|
return {
|
|
18072
18071
|
outcome: "mismatch",
|
|
18073
18072
|
qualified: false,
|
|
18074
|
-
missing: missingStages(
|
|
18073
|
+
missing: missingStages(record6),
|
|
18075
18074
|
reason: "missing-native-identity"
|
|
18076
18075
|
};
|
|
18077
18076
|
}
|
|
18078
18077
|
}
|
|
18079
|
-
if (typeof
|
|
18078
|
+
if (typeof record6.profileDigest !== "string" || record6.profileDigest === "") {
|
|
18080
18079
|
return {
|
|
18081
18080
|
outcome: "mismatch",
|
|
18082
18081
|
qualified: false,
|
|
18083
|
-
missing: missingStages(
|
|
18082
|
+
missing: missingStages(record6),
|
|
18084
18083
|
reason: "missing-profile-digest"
|
|
18085
18084
|
};
|
|
18086
18085
|
}
|
|
18087
18086
|
const expectedDigest = voiceProfileDigest(
|
|
18088
|
-
productForPath(
|
|
18089
|
-
|
|
18090
|
-
|
|
18087
|
+
productForPath(record6.path),
|
|
18088
|
+
record6.platform,
|
|
18089
|
+
record6.desktopVersion
|
|
18091
18090
|
);
|
|
18092
|
-
if (!expectedDigest ||
|
|
18091
|
+
if (!expectedDigest || record6.profileDigest !== expectedDigest) {
|
|
18093
18092
|
return {
|
|
18094
18093
|
outcome: "mismatch",
|
|
18095
18094
|
qualified: false,
|
|
18096
|
-
missing: missingStages(
|
|
18095
|
+
missing: missingStages(record6),
|
|
18097
18096
|
reason: "stale-profile-digest"
|
|
18098
18097
|
};
|
|
18099
18098
|
}
|
|
18100
|
-
if (
|
|
18099
|
+
if (record6.startAcknowledged === true && record6.connected !== true) {
|
|
18101
18100
|
return {
|
|
18102
18101
|
outcome: "incomplete",
|
|
18103
18102
|
qualified: false,
|
|
18104
|
-
missing: missingStages(
|
|
18103
|
+
missing: missingStages(record6).length > 0 ? missingStages(record6) : ["connection"],
|
|
18105
18104
|
reason: "start-acknowledged-without-connection"
|
|
18106
18105
|
};
|
|
18107
18106
|
}
|
|
18108
|
-
if (
|
|
18107
|
+
if (record6.path !== "chat" && record6.gatewayOwned !== true && record6.stages.connection === true) {
|
|
18109
18108
|
return {
|
|
18110
18109
|
outcome: "incomplete",
|
|
18111
18110
|
qualified: false,
|
|
18112
|
-
missing: missingStages(
|
|
18111
|
+
missing: missingStages(record6).length > 0 ? missingStages(record6) : ["connection"],
|
|
18113
18112
|
reason: "route-only-without-connected-gateway"
|
|
18114
18113
|
};
|
|
18115
18114
|
}
|
|
18116
|
-
if (
|
|
18115
|
+
if (record6.speech?.attended === true && (!record6.speech.witness || !record6.speech.run)) {
|
|
18117
18116
|
return {
|
|
18118
18117
|
outcome: "incomplete",
|
|
18119
18118
|
qualified: false,
|
|
18120
|
-
missing: missingStages(
|
|
18119
|
+
missing: missingStages(record6).includes("speech") ? missingStages(record6) : ["speech"],
|
|
18121
18120
|
reason: "attended-speech-missing-provenance"
|
|
18122
18121
|
};
|
|
18123
18122
|
}
|
|
18124
|
-
if (
|
|
18123
|
+
if (record6.speech && record6.speech.attended !== true) {
|
|
18125
18124
|
return {
|
|
18126
18125
|
outcome: "incomplete",
|
|
18127
18126
|
qualified: false,
|
|
18128
|
-
missing: missingStages(
|
|
18127
|
+
missing: missingStages(record6),
|
|
18129
18128
|
reason: "synthetic-speech-is-not-qualification"
|
|
18130
18129
|
};
|
|
18131
18130
|
}
|
|
18132
|
-
const missing = missingStages(
|
|
18131
|
+
const missing = missingStages(record6);
|
|
18133
18132
|
if (missing.length > 0) {
|
|
18134
18133
|
return {
|
|
18135
18134
|
outcome: "incomplete",
|
|
@@ -18138,7 +18137,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18138
18137
|
reason: `missing:${missing.join(",")}`
|
|
18139
18138
|
};
|
|
18140
18139
|
}
|
|
18141
|
-
if (
|
|
18140
|
+
if (record6.connected !== true || record6.conversationMatched !== true || (record6.path === "chat" ? record6.harnessMatched !== void 0 && record6.harnessMatched !== true : record6.harnessMatched !== true) || record6.speech?.attended !== true || record6.speech.bothDirections !== true || record6.cleanup?.ended !== true || record6.cleanup.microphoneReleased !== true) {
|
|
18142
18141
|
return {
|
|
18143
18142
|
outcome: "fail",
|
|
18144
18143
|
qualified: false,
|
|
@@ -18148,15 +18147,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18148
18147
|
}
|
|
18149
18148
|
return { outcome: "pass", qualified: true, missing: [], reason: "qualified" };
|
|
18150
18149
|
}
|
|
18151
|
-
function evidenceMatchesRuntime(
|
|
18152
|
-
if (
|
|
18153
|
-
if (
|
|
18154
|
-
if (
|
|
18155
|
-
if (
|
|
18156
|
-
if (typeof
|
|
18150
|
+
function evidenceMatchesRuntime(record6, config2) {
|
|
18151
|
+
if (record6.platform !== config2.desktopPlatform) return false;
|
|
18152
|
+
if (record6.desktopVersion !== config2.desktopVersion) return false;
|
|
18153
|
+
if (record6.implementationRevision !== config2.implementationRevision) return false;
|
|
18154
|
+
if (record6.policy === "legacy-retained") return true;
|
|
18155
|
+
if (typeof record6.desktopBuild !== "string" || record6.desktopBuild === "" || typeof record6.asarDigest !== "string" || record6.asarDigest === "" || typeof config2.desktopBuild !== "string" || config2.desktopBuild === "" || typeof config2.asarDigest !== "string" || config2.asarDigest === "" || typeof config2.implementationRevision !== "string" || config2.implementationRevision === "") {
|
|
18157
18156
|
return false;
|
|
18158
18157
|
}
|
|
18159
|
-
return
|
|
18158
|
+
return record6.desktopBuild === config2.desktopBuild && record6.asarDigest === config2.asarDigest;
|
|
18160
18159
|
}
|
|
18161
18160
|
function isolatedVoicePathEnabled(config2, path) {
|
|
18162
18161
|
return isolatedQualificationMatches(path, config2);
|
|
@@ -18180,27 +18179,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18180
18179
|
if (!config2.desktopVersion || !config2.desktopPlatform) {
|
|
18181
18180
|
return { enabled: false, policy: "unreviewed", reason: "waiting-for-identity" };
|
|
18182
18181
|
}
|
|
18183
|
-
const pathRecords = records.filter((
|
|
18182
|
+
const pathRecords = records.filter((record6) => record6.path === path);
|
|
18184
18183
|
if (pathRecords.length > 0) {
|
|
18185
|
-
const matching = pathRecords.filter((
|
|
18184
|
+
const matching = pathRecords.filter((record7) => evidenceMatchesRuntime(record7, config2));
|
|
18186
18185
|
if (matching.length === 0) {
|
|
18187
18186
|
return { enabled: false, policy: "unreviewed", reason: "stale-or-wrong-platform-evidence" };
|
|
18188
18187
|
}
|
|
18189
|
-
for (const
|
|
18190
|
-
const evaluation = evaluateVoiceEvidence(
|
|
18188
|
+
for (const record7 of matching) {
|
|
18189
|
+
const evaluation = evaluateVoiceEvidence(record7);
|
|
18191
18190
|
if (!evaluation.qualified) {
|
|
18192
18191
|
return { enabled: false, policy: "unreviewed", reason: evaluation.reason };
|
|
18193
18192
|
}
|
|
18194
18193
|
}
|
|
18195
|
-
const
|
|
18196
|
-
if (!
|
|
18194
|
+
const record6 = matching[0];
|
|
18195
|
+
if (!record6) {
|
|
18197
18196
|
return { enabled: false, policy: "unreviewed", reason: "missing-evidence" };
|
|
18198
18197
|
}
|
|
18199
18198
|
if (hashedVoiceCandidateOwner(config2) && !hashedVoiceProfileSupported(config2)) {
|
|
18200
18199
|
} else {
|
|
18201
18200
|
return {
|
|
18202
18201
|
enabled: true,
|
|
18203
|
-
policy:
|
|
18202
|
+
policy: record6.policy === "legacy-retained" ? "legacy-retained" : "reviewed"
|
|
18204
18203
|
};
|
|
18205
18204
|
}
|
|
18206
18205
|
}
|
|
@@ -18344,15 +18343,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18344
18343
|
function parseRealtimeCallResponse(value) {
|
|
18345
18344
|
if (value === null || typeof value !== "object")
|
|
18346
18345
|
throw new Error("Invalid voice gateway response");
|
|
18347
|
-
const
|
|
18348
|
-
if (typeof
|
|
18346
|
+
const record6 = value;
|
|
18347
|
+
if (typeof record6.status !== "number" || !Number.isInteger(record6.status) || record6.status < 200 || record6.status > 599 || typeof record6.body !== "string" || record6.headers === null || typeof record6.headers !== "object" || Array.isArray(record6.headers)) {
|
|
18349
18348
|
throw new Error("Invalid voice gateway response");
|
|
18350
18349
|
}
|
|
18351
18350
|
const headers = {};
|
|
18352
|
-
for (const [name, header] of Object.entries(
|
|
18351
|
+
for (const [name, header] of Object.entries(record6.headers)) {
|
|
18353
18352
|
if (typeof header === "string") headers[name] = header;
|
|
18354
18353
|
}
|
|
18355
|
-
return { status:
|
|
18354
|
+
return { status: record6.status, body: record6.body, headers };
|
|
18356
18355
|
}
|
|
18357
18356
|
function backendModelName(headers) {
|
|
18358
18357
|
const raw = new Headers(headers).get("x-codex-turn-metadata");
|
|
@@ -18703,19 +18702,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18703
18702
|
function hookWebpackVoiceFactory(req, onExports) {
|
|
18704
18703
|
const modules = req.m;
|
|
18705
18704
|
const factoryId = HASHED_OVERLAY_VOICE_ROLES.fetchFactoryId;
|
|
18706
|
-
const
|
|
18707
|
-
if (!modules || typeof
|
|
18708
|
-
|
|
18709
|
-
const
|
|
18705
|
+
const installed = modules?.[factoryId];
|
|
18706
|
+
if (!modules || typeof installed !== "function") return void 0;
|
|
18707
|
+
const owned = installed.__codexhostVoiceFactory === true && typeof installed.__codexhostVoiceOriginal === "function";
|
|
18708
|
+
const original = owned ? installed.__codexhostVoiceOriginal : installed;
|
|
18709
|
+
const wrapped = owned ? installed : function(module, exports, webpackRequire) {
|
|
18710
18710
|
try {
|
|
18711
18711
|
return original.apply(this, [module, exports, webpackRequire]);
|
|
18712
18712
|
} finally {
|
|
18713
|
-
|
|
18713
|
+
try {
|
|
18714
|
+
wrapped.__codexhostVoiceSubscriber?.(exports ?? module?.exports);
|
|
18715
|
+
} catch {
|
|
18716
|
+
}
|
|
18714
18717
|
}
|
|
18715
18718
|
};
|
|
18716
18719
|
wrapped.__codexhostVoiceFactory = true;
|
|
18717
|
-
|
|
18718
|
-
|
|
18720
|
+
wrapped.__codexhostVoiceOriginal = original;
|
|
18721
|
+
wrapped.__codexhostVoiceSubscriber = onExports;
|
|
18722
|
+
if (!owned) modules[factoryId] = wrapped;
|
|
18723
|
+
return () => {
|
|
18724
|
+
if (wrapped.__codexhostVoiceSubscriber !== onExports) return;
|
|
18725
|
+
Reflect.deleteProperty(wrapped, "__codexhostVoiceSubscriber");
|
|
18726
|
+
if (modules[factoryId] === wrapped) modules[factoryId] = original;
|
|
18727
|
+
};
|
|
18719
18728
|
}
|
|
18720
18729
|
async function resolveHashedWebpackVoice(importModule) {
|
|
18721
18730
|
const runtime = await importModule(`app://-/assets/${HASHED_WEBPACK_VOICE_RUNTIME_ASSET}`);
|
|
@@ -18735,7 +18744,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18735
18744
|
return {
|
|
18736
18745
|
client,
|
|
18737
18746
|
bridge: bridged,
|
|
18738
|
-
responseError
|
|
18747
|
+
responseError,
|
|
18748
|
+
require: req
|
|
18739
18749
|
};
|
|
18740
18750
|
if (typeof req.m?.[HASHED_OVERLAY_VOICE_ROLES.fetchFactoryId] !== "function") return null;
|
|
18741
18751
|
return {
|
|
@@ -18758,6 +18768,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18758
18768
|
let timer;
|
|
18759
18769
|
let surfaceTimer;
|
|
18760
18770
|
let restore;
|
|
18771
|
+
let restoreFactory;
|
|
18772
|
+
const wrappedClients = /* @__PURE__ */ new WeakSet();
|
|
18761
18773
|
const started = Date.now();
|
|
18762
18774
|
const activation = {
|
|
18763
18775
|
assetSeen: false,
|
|
@@ -18776,6 +18788,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18776
18788
|
if (timer !== void 0) target2.clearTimeout(timer);
|
|
18777
18789
|
if (surfaceTimer !== void 0) target2.clearTimeout(surfaceTimer);
|
|
18778
18790
|
pointerTarget?.removeEventListener?.("pointerdown", onPointerDown, true);
|
|
18791
|
+
restoreFactory?.();
|
|
18779
18792
|
restore?.();
|
|
18780
18793
|
if (target2[HOOK_GLOBAL] === handle) Reflect.deleteProperty(target2, HOOK_GLOBAL);
|
|
18781
18794
|
}
|
|
@@ -18789,7 +18802,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18789
18802
|
};
|
|
18790
18803
|
publishLoop();
|
|
18791
18804
|
const activate = (client, bridge, responseError) => {
|
|
18792
|
-
|
|
18805
|
+
if (wrappedClients.has(client)) {
|
|
18806
|
+
activation.wrapperActive = true;
|
|
18807
|
+
handle.status = "active";
|
|
18808
|
+
return;
|
|
18809
|
+
}
|
|
18810
|
+
wrappedClients.add(client);
|
|
18811
|
+
const disposeWrap = wrapClientOwnedVoiceFetch(
|
|
18793
18812
|
client,
|
|
18794
18813
|
bridge,
|
|
18795
18814
|
() => workGatewayPreference(target2),
|
|
@@ -18808,11 +18827,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18808
18827
|
() => false,
|
|
18809
18828
|
() => nativeChatVoicePreferenceAllowsStart(target2)
|
|
18810
18829
|
);
|
|
18830
|
+
const previous = restore;
|
|
18831
|
+
restore = () => {
|
|
18832
|
+
disposeWrap();
|
|
18833
|
+
previous?.();
|
|
18834
|
+
};
|
|
18811
18835
|
activation.wrapperActive = true;
|
|
18812
18836
|
handle.status = "active";
|
|
18813
18837
|
};
|
|
18814
18838
|
const attempt = async () => {
|
|
18815
|
-
if (disposed ||
|
|
18839
|
+
if (disposed || activation.wrapperActive && activation.factoryHooked) return;
|
|
18816
18840
|
publishComposerLaunchExperience(target2);
|
|
18817
18841
|
const names = loadedAssetNames(target2.document, target2.performance);
|
|
18818
18842
|
const hashedAssetSeen = names.some((name) => name.includes(HASHED_WEBPACK_VOICE_RUNTIME_ASSET));
|
|
@@ -18821,38 +18845,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18821
18845
|
activation.importStarted = true;
|
|
18822
18846
|
try {
|
|
18823
18847
|
const resolved = await resolveHashedWebpackVoice(importModule);
|
|
18824
|
-
if (disposed ||
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
const webpackRequire = resolved?.require;
|
|
18832
|
-
if (webpackRequire && hookWebpackVoiceFactory(webpackRequire, (exports) => {
|
|
18833
|
-
if (disposed || activation.wrapperActive) return;
|
|
18834
|
-
const client = nativeVoiceFetch(
|
|
18835
|
-
object3(exports) ? exports[HASHED_OVERLAY_VOICE_ROLES.fetchExport] : void 0
|
|
18836
|
-
);
|
|
18837
|
-
if (!client) {
|
|
18838
|
-
unpoisonIncompleteWebpackModule(
|
|
18839
|
-
webpackRequire,
|
|
18840
|
-
HASHED_OVERLAY_VOICE_ROLES.fetchFactoryId,
|
|
18841
|
-
(value) => Boolean(
|
|
18842
|
-
nativeVoiceFetch(
|
|
18843
|
-
object3(value) ? value[HASHED_OVERLAY_VOICE_ROLES.fetchExport] : void 0
|
|
18844
|
-
)
|
|
18845
|
-
)
|
|
18848
|
+
if (disposed || !resolved) {
|
|
18849
|
+
if (!disposed) activation.importFailed = "hashed-exports-missing";
|
|
18850
|
+
} else {
|
|
18851
|
+
const wrapExports = (exports) => {
|
|
18852
|
+
if (disposed) return;
|
|
18853
|
+
const client = nativeVoiceFetch(
|
|
18854
|
+
object3(exports) ? exports[HASHED_OVERLAY_VOICE_ROLES.fetchExport] : void 0
|
|
18846
18855
|
);
|
|
18847
|
-
|
|
18856
|
+
if (!client) {
|
|
18857
|
+
if (resolved.require)
|
|
18858
|
+
unpoisonIncompleteWebpackModule(
|
|
18859
|
+
resolved.require,
|
|
18860
|
+
HASHED_OVERLAY_VOICE_ROLES.fetchFactoryId,
|
|
18861
|
+
(value) => Boolean(
|
|
18862
|
+
nativeVoiceFetch(
|
|
18863
|
+
object3(value) ? value[HASHED_OVERLAY_VOICE_ROLES.fetchExport] : void 0
|
|
18864
|
+
)
|
|
18865
|
+
)
|
|
18866
|
+
);
|
|
18867
|
+
return;
|
|
18868
|
+
}
|
|
18869
|
+
activate(client, resolved.bridge, resolved.responseError);
|
|
18870
|
+
};
|
|
18871
|
+
if (resolved.client) {
|
|
18872
|
+
activation.importResolved = true;
|
|
18873
|
+
delete activation.importFailed;
|
|
18874
|
+
activate(resolved.client, resolved.bridge, resolved.responseError);
|
|
18875
|
+
}
|
|
18876
|
+
const disposeFactory = resolved.require ? hookWebpackVoiceFactory(resolved.require, wrapExports) : void 0;
|
|
18877
|
+
if (disposeFactory) {
|
|
18878
|
+
restoreFactory = disposeFactory;
|
|
18879
|
+
activation.importResolved = true;
|
|
18880
|
+
activation.factoryHooked = true;
|
|
18881
|
+
delete activation.importFailed;
|
|
18848
18882
|
}
|
|
18849
|
-
activate(client, resolved.bridge, resolved.responseError);
|
|
18850
|
-
})) {
|
|
18851
|
-
activation.importResolved = true;
|
|
18852
|
-
activation.factoryHooked = true;
|
|
18853
|
-
delete activation.importFailed;
|
|
18854
|
-
return;
|
|
18855
18883
|
}
|
|
18884
|
+
if (activation.wrapperActive || activation.factoryHooked) return;
|
|
18856
18885
|
activation.importFailed = "hashed-exports-missing";
|
|
18857
18886
|
} catch {
|
|
18858
18887
|
activation.importFailed = "hashed-import-failed";
|
|
@@ -19874,10 +19903,80 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19874
19903
|
return handle;
|
|
19875
19904
|
}
|
|
19876
19905
|
|
|
19877
|
-
// src/renderer-voice-
|
|
19906
|
+
// src/renderer-voice-starter-core.ts
|
|
19907
|
+
var record3 = (v) => v !== null && typeof v === "object";
|
|
19908
|
+
function gatewayVoiceStartRequest(request, workGateway, chatGateway = false, externalHarness = false) {
|
|
19909
|
+
if (!record3(request) || request.productExperience !== "work" && request.productExperience !== "codex" && request.productExperience !== "chat")
|
|
19910
|
+
return false;
|
|
19911
|
+
if (request.source === "composer_button_existing_thread") {
|
|
19912
|
+
if (!record3(request.locator) || request.locator.hostId !== "local") return false;
|
|
19913
|
+
} else if (request.source !== "composer_button_new_thread" || (request.hostId ?? "local") !== "local")
|
|
19914
|
+
return false;
|
|
19915
|
+
if (request.productExperience === "chat") return chatGateway;
|
|
19916
|
+
const mode = request.activeCollaborationMode;
|
|
19917
|
+
const settings = record3(mode) ? mode.settings : void 0;
|
|
19918
|
+
const model2 = record3(settings) ? settings.model : void 0;
|
|
19919
|
+
if (typeof model2 === "string" && model2.startsWith("codexhost/")) return externalHarness;
|
|
19920
|
+
return workGateway || externalHarness;
|
|
19921
|
+
}
|
|
19922
|
+
function wrapGatewayVoiceStarter(start, options) {
|
|
19923
|
+
let active;
|
|
19924
|
+
return {
|
|
19925
|
+
async start(...args) {
|
|
19926
|
+
const request = args[0];
|
|
19927
|
+
const qualified = options.qualifies(request);
|
|
19928
|
+
const wantsGateway = options.configured?.(request) ?? qualified;
|
|
19929
|
+
if (!wantsGateway) return start(...args);
|
|
19930
|
+
if (!qualified) {
|
|
19931
|
+
throw new Error(
|
|
19932
|
+
options.unavailable?.(request) ?? "Work voice is not qualified on this Desktop."
|
|
19933
|
+
);
|
|
19934
|
+
}
|
|
19935
|
+
if (active) {
|
|
19936
|
+
active.binding?.dispose();
|
|
19937
|
+
active = void 0;
|
|
19938
|
+
}
|
|
19939
|
+
const attempt = {};
|
|
19940
|
+
active = attempt;
|
|
19941
|
+
const allowed = () => active === attempt && options.qualifies(args[0]);
|
|
19942
|
+
try {
|
|
19943
|
+
if (!await options.ready()) throw new Error("Voice gateway is not ready");
|
|
19944
|
+
if (!allowed()) throw new Error("Voice gateway start was cancelled");
|
|
19945
|
+
attempt.binding = await options.prepare(allowed);
|
|
19946
|
+
await options.committed(attempt.binding);
|
|
19947
|
+
if (!allowed()) throw new Error("Voice gateway start was cancelled");
|
|
19948
|
+
if (!attempt.binding.current()) throw new Error("Voice starter subscription changed");
|
|
19949
|
+
rememberVoiceProductExperience(args[0]);
|
|
19950
|
+
return await start(...args);
|
|
19951
|
+
} finally {
|
|
19952
|
+
attempt.binding?.dispose();
|
|
19953
|
+
if (active === attempt) active = void 0;
|
|
19954
|
+
}
|
|
19955
|
+
},
|
|
19956
|
+
cancel() {
|
|
19957
|
+
active?.binding?.dispose();
|
|
19958
|
+
active = void 0;
|
|
19959
|
+
}
|
|
19960
|
+
};
|
|
19961
|
+
}
|
|
19962
|
+
function overlayVoiceStarterFibers(document, page) {
|
|
19963
|
+
const fibers = /* @__PURE__ */ new Set();
|
|
19964
|
+
for (const element of document.querySelectorAll("[data-avatar-overlay-native-surface-id]")) {
|
|
19965
|
+
const key = Object.getOwnPropertyNames(element).find((key2) => key2.startsWith("__reactFiber$"));
|
|
19966
|
+
const ancestors = committedReactAncestors(
|
|
19967
|
+
key && Object.getOwnPropertyDescriptor(element, key)?.value
|
|
19968
|
+
);
|
|
19969
|
+
const boundary = ancestors.findIndex((fiber) => record3(fiber) && fiber.type === page);
|
|
19970
|
+
if (boundary < 0) continue;
|
|
19971
|
+
for (const fiber of ancestors.slice(0, boundary)) if (record3(fiber)) fibers.add(fiber);
|
|
19972
|
+
}
|
|
19973
|
+
return fibers;
|
|
19974
|
+
}
|
|
19975
|
+
|
|
19976
|
+
// src/renderer-voice-capability-subscriptions.ts
|
|
19878
19977
|
var INFERENCE_GATE = "3683713372";
|
|
19879
|
-
var
|
|
19880
|
-
var capable = (value) =>
|
|
19978
|
+
var record4 = (value) => value !== null && typeof value === "object";
|
|
19979
|
+
var capable = (value) => record4(value) && typeof value.isLoading === "boolean" && typeof value.isError === "boolean" && typeof value.isCapable === "boolean";
|
|
19881
19980
|
var equal = (a, b) => a.isLoading === b.isLoading && a.isError === b.isError && a.isCapable === b.isCapable;
|
|
19882
19981
|
function replayVoiceCapability(store, atom, gate) {
|
|
19883
19982
|
const evaluate = (override) => {
|
|
@@ -19915,7 +20014,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19915
20014
|
}
|
|
19916
20015
|
}
|
|
19917
20016
|
function isFamily(value) {
|
|
19918
|
-
return
|
|
20017
|
+
return record4(value) && record4(value.scope) && typeof value.resolve === "function";
|
|
19919
20018
|
}
|
|
19920
20019
|
function initializeVoiceCapabilityFamilies(module, assets) {
|
|
19921
20020
|
const initialize = module[assets.capabilityInit];
|
|
@@ -19931,7 +20030,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19931
20030
|
const result = [];
|
|
19932
20031
|
const seen = /* @__PURE__ */ new Set();
|
|
19933
20032
|
let hook = fiber.memoizedState;
|
|
19934
|
-
while (
|
|
20033
|
+
while (record4(hook) && result.length < 4096 && !seen.has(hook)) {
|
|
19935
20034
|
seen.add(hook);
|
|
19936
20035
|
result.push(hook);
|
|
19937
20036
|
hook = hook.next;
|
|
@@ -19947,7 +20046,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19947
20046
|
const list = hooks(fiber);
|
|
19948
20047
|
for (const memo of list) {
|
|
19949
20048
|
const [signal, deps] = Array.isArray(memo.memoizedState) ? memo.memoizedState : [];
|
|
19950
|
-
if (!
|
|
20049
|
+
if (!record4(signal) || !Array.isArray(deps) || deps.length !== 5 || deps[3] !== family || !(deps[1] instanceof Map) || deps[2] !== void 0)
|
|
19951
20050
|
continue;
|
|
19952
20051
|
const chain = deps[1];
|
|
19953
20052
|
const node = chain.get(family.scope.id);
|
|
@@ -19956,7 +20055,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19956
20055
|
const matches = [...members].filter(([, member]) => member.cacheKey === deps[0]);
|
|
19957
20056
|
if (matches.length !== 1 || typeof matches[0]?.[0] !== "string") continue;
|
|
19958
20057
|
const parameter = JSON.parse(matches[0][0]);
|
|
19959
|
-
if (!
|
|
20058
|
+
if (!record4(parameter) || Object.keys(parameter).some((key) => key !== "name" && key !== "hostId") || !names.some((name) => parameter.name === name) || realtimeOnly && parameter.name !== "voice.realtime" || parameter.hostId !== void 0 && parameter.hostId !== "local" || parameter.name === "voice.thread" && parameter.hostId !== "local")
|
|
19960
20059
|
continue;
|
|
19961
20060
|
const subscriptions = list.filter((hook2) => {
|
|
19962
20061
|
const state = hook2.memoizedState;
|
|
@@ -19969,7 +20068,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19969
20068
|
const effect = hook.next?.next?.memoizedState;
|
|
19970
20069
|
const store = signal.store;
|
|
19971
20070
|
const gate = gates.resolve(node, chain, INFERENCE_GATE)?.atom;
|
|
19972
|
-
if (!gate || !instance || !
|
|
20071
|
+
if (!gate || !instance || !record4(effect) || !Array.isArray(effect.deps) || effect.deps[0] !== subscriber.subscribe || typeof effect.create !== "function" || typeof instance.getSnapshot !== "function" || !capable(store.get(signal.atom)) || !capable(subscriber.getSnapshot()) || !capable(instance.getSnapshot()) || !equal(
|
|
19973
20072
|
store.get(signal.atom),
|
|
19974
20073
|
subscriber.getSnapshot()
|
|
19975
20074
|
) || !equal(subscriber.getSnapshot(), instance.getSnapshot()) || subscriber.createRender?.() != null)
|
|
@@ -20066,71 +20165,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20066
20165
|
|
|
20067
20166
|
// src/renderer-voice-start-capability.ts
|
|
20068
20167
|
var GLOBAL2 = "__codexhostVoiceStartCapabilityV1";
|
|
20069
|
-
var
|
|
20070
|
-
function gatewayVoiceStartRequest(request, workGateway, chatGateway = false, externalHarness = false) {
|
|
20071
|
-
if (!record4(request) || request.productExperience !== "work" && request.productExperience !== "codex" && request.productExperience !== "chat")
|
|
20072
|
-
return false;
|
|
20073
|
-
if (request.source === "composer_button_existing_thread") {
|
|
20074
|
-
if (!record4(request.locator) || request.locator.hostId !== "local") return false;
|
|
20075
|
-
} else if (request.source !== "composer_button_new_thread" || (request.hostId ?? "local") !== "local")
|
|
20076
|
-
return false;
|
|
20077
|
-
if (request.productExperience === "chat") return chatGateway;
|
|
20078
|
-
const mode = request.activeCollaborationMode;
|
|
20079
|
-
const settings = record4(mode) ? mode.settings : void 0;
|
|
20080
|
-
const model2 = record4(settings) ? settings.model : void 0;
|
|
20081
|
-
if (typeof model2 === "string" && model2.startsWith("codexhost/")) return externalHarness;
|
|
20082
|
-
return workGateway || externalHarness;
|
|
20083
|
-
}
|
|
20084
|
-
function wrapGatewayVoiceStarter(start, options) {
|
|
20085
|
-
let active;
|
|
20086
|
-
return {
|
|
20087
|
-
async start(...args) {
|
|
20088
|
-
const request = args[0];
|
|
20089
|
-
const qualified = options.qualifies(request);
|
|
20090
|
-
const wantsGateway = options.configured?.(request) ?? qualified;
|
|
20091
|
-
if (!wantsGateway) return start(...args);
|
|
20092
|
-
if (!qualified) {
|
|
20093
|
-
throw new Error(
|
|
20094
|
-
options.unavailable?.(request) ?? "Work voice is not qualified on this Desktop."
|
|
20095
|
-
);
|
|
20096
|
-
}
|
|
20097
|
-
if (active) throw new Error("Voice gateway start is already pending");
|
|
20098
|
-
const attempt = {};
|
|
20099
|
-
active = attempt;
|
|
20100
|
-
const allowed = () => active === attempt && options.qualifies(args[0]);
|
|
20101
|
-
try {
|
|
20102
|
-
if (!await options.ready()) throw new Error("Voice gateway is not ready");
|
|
20103
|
-
if (!allowed()) throw new Error("Voice gateway start was cancelled");
|
|
20104
|
-
attempt.binding = await options.prepare(allowed);
|
|
20105
|
-
await options.committed(attempt.binding);
|
|
20106
|
-
if (!allowed()) throw new Error("Voice gateway start was cancelled");
|
|
20107
|
-
if (!attempt.binding.current()) throw new Error("Voice starter subscription changed");
|
|
20108
|
-
rememberVoiceProductExperience(args[0]);
|
|
20109
|
-
return await start(...args);
|
|
20110
|
-
} finally {
|
|
20111
|
-
attempt.binding?.dispose();
|
|
20112
|
-
if (active === attempt) active = void 0;
|
|
20113
|
-
}
|
|
20114
|
-
},
|
|
20115
|
-
cancel() {
|
|
20116
|
-
active?.binding?.dispose();
|
|
20117
|
-
active = void 0;
|
|
20118
|
-
}
|
|
20119
|
-
};
|
|
20120
|
-
}
|
|
20121
|
-
function overlayVoiceStarterFibers(document, page) {
|
|
20122
|
-
const fibers = /* @__PURE__ */ new Set();
|
|
20123
|
-
for (const element of document.querySelectorAll("[data-avatar-overlay-native-surface-id]")) {
|
|
20124
|
-
const key = Object.getOwnPropertyNames(element).find((key2) => key2.startsWith("__reactFiber$"));
|
|
20125
|
-
const ancestors = committedReactAncestors(
|
|
20126
|
-
key && Object.getOwnPropertyDescriptor(element, key)?.value
|
|
20127
|
-
);
|
|
20128
|
-
const boundary = ancestors.findIndex((fiber) => record4(fiber) && fiber.type === page);
|
|
20129
|
-
if (boundary < 0) continue;
|
|
20130
|
-
for (const fiber of ancestors.slice(0, boundary)) if (record4(fiber)) fibers.add(fiber);
|
|
20131
|
-
}
|
|
20132
|
-
return fibers;
|
|
20133
|
-
}
|
|
20168
|
+
var record5 = (v) => v !== null && typeof v === "object";
|
|
20134
20169
|
function installVoiceStartCapabilityHook(options = {}) {
|
|
20135
20170
|
const target2 = options.target ?? globalThis;
|
|
20136
20171
|
if (target2[GLOBAL2]) return target2[GLOBAL2];
|
|
@@ -20175,7 +20210,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20175
20210
|
shared[init]();
|
|
20176
20211
|
}
|
|
20177
20212
|
const services = shared[assets.services];
|
|
20178
|
-
if (
|
|
20213
|
+
if (record5(services) && (record5(services.realtimeVoiceRuntime) || typeof services.realtimeVoiceRuntime === "function")) {
|
|
20179
20214
|
const original = services.realtimeVoiceRuntime;
|
|
20180
20215
|
const register = Reflect.get(original, "registerRealtimeStarter");
|
|
20181
20216
|
if (typeof register !== "function") throw new Error("Voice starter unavailable");
|
|
@@ -20187,9 +20222,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20187
20222
|
throw new Error("Voice starter callback unavailable");
|
|
20188
20223
|
const wrapper = wrapGatewayVoiceStarter(start, {
|
|
20189
20224
|
configured: (request) => {
|
|
20190
|
-
const mode =
|
|
20191
|
-
const settings =
|
|
20192
|
-
const model2 =
|
|
20225
|
+
const mode = record5(request) ? request.activeCollaborationMode : void 0;
|
|
20226
|
+
const settings = record5(mode) ? mode.settings : void 0;
|
|
20227
|
+
const model2 = record5(settings) ? settings.model : void 0;
|
|
20193
20228
|
return gatewayVoiceStartRequest(
|
|
20194
20229
|
request,
|
|
20195
20230
|
cpaLiveVoicePreferenceAllowsInstall(target2),
|
|
@@ -20204,15 +20239,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20204
20239
|
workVoiceLaneEnabled(target2, "work-grok")
|
|
20205
20240
|
),
|
|
20206
20241
|
unavailable: (request) => {
|
|
20207
|
-
const mode =
|
|
20208
|
-
const settings =
|
|
20209
|
-
const model2 =
|
|
20242
|
+
const mode = record5(request) ? request.activeCollaborationMode : void 0;
|
|
20243
|
+
const settings = record5(mode) ? mode.settings : void 0;
|
|
20244
|
+
const model2 = record5(settings) ? settings.model : void 0;
|
|
20210
20245
|
const path = typeof model2 === "string" && model2.startsWith("codexhost/") ? "work-grok" : "work-codex";
|
|
20211
20246
|
return workVoiceUserFacingUnavailable(target2, path);
|
|
20212
20247
|
},
|
|
20213
20248
|
ready: async () => {
|
|
20214
20249
|
const hook = target2.__codexhostClientOwnedVoiceV1;
|
|
20215
|
-
if (!
|
|
20250
|
+
if (!record5(hook) || hook.status !== "active") return false;
|
|
20216
20251
|
const bridgeClass = shared[assets.bridge];
|
|
20217
20252
|
const result = await requestVoiceHost(
|
|
20218
20253
|
bridgeClass.getInstance(),
|