@karlorz/codexhost-cli-win32-x64 0.13.3-4 → 0.13.3-6
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 +432 -31
- package/app/console-web.js +806 -186
- package/app/cpa-live-voice-hook.js +16310 -31
- package/app/desktop-controller.mjs +147 -37
- package/app/host-runtime.mjs +3535 -3126
- package/app/plugins/antigravity/plugin.mjs +77 -0
- package/app/plugins/claude-code/plugin.mjs +152 -29
- package/app/plugins/codebuddy/plugin.mjs +109 -32
- package/app/plugins/codex-usage/plugin.mjs +77 -0
- package/app/plugins/cursor-cli/plugin.mjs +120 -43
- package/app/plugins/deepseek-harness/plugin.mjs +82 -5
- package/app/plugins/grok/plugin.mjs +138 -24
- package/app/plugins/hermes/plugin.mjs +77 -0
- package/app/plugins/kimi-code/plugin.mjs +99 -22
- package/app/plugins/kiro-cli/plugin.mjs +99 -22
- package/app/plugins/omp/plugin.mjs +92 -15
- package/app/plugins/opencode/plugin.mjs +77 -0
- package/app/plugins/pi/plugin.mjs +98 -21
- package/app/plugins/qoder/plugin.mjs +85 -8
- package/app/plugins/qoder-cn/plugin.mjs +85 -8
- package/app/plugins/workbuddy/plugin.mjs +109 -32
- package/app/plugins/zcode/plugin.mjs +100 -23
- package/app/renderer-extension.js +2238 -860
- 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
|
@@ -27836,6 +27836,36 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
27836
27836
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
27837
27837
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
27838
27838
|
|
|
27839
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
27840
|
+
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
27841
|
+
"openai-alpha",
|
|
27842
|
+
"thread-id",
|
|
27843
|
+
"session-id",
|
|
27844
|
+
"originator",
|
|
27845
|
+
"x-codex-turn-metadata"
|
|
27846
|
+
];
|
|
27847
|
+
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
27848
|
+
var REALTIME_CALL_ID_PATTERN = /^rtc_[A-Za-z0-9_-]{1,128}$/u;
|
|
27849
|
+
var requestId = external_exports.string().min(1).max(128);
|
|
27850
|
+
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
27851
|
+
external_exports.object({
|
|
27852
|
+
operation: external_exports.literal("create"),
|
|
27853
|
+
requestId,
|
|
27854
|
+
body: external_exports.string().min(1).max(16 << 20),
|
|
27855
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).default({})
|
|
27856
|
+
}),
|
|
27857
|
+
external_exports.object({ operation: external_exports.literal("cancel"), requestId }),
|
|
27858
|
+
external_exports.object({
|
|
27859
|
+
operation: external_exports.literal("hangup"),
|
|
27860
|
+
callId: external_exports.string().regex(REALTIME_CALL_ID_PATTERN)
|
|
27861
|
+
})
|
|
27862
|
+
]);
|
|
27863
|
+
var realtimeCallResponseSchema = external_exports.object({
|
|
27864
|
+
status: external_exports.number().int().min(200).max(599),
|
|
27865
|
+
body: external_exports.string(),
|
|
27866
|
+
headers: external_exports.record(external_exports.string(), external_exports.string())
|
|
27867
|
+
});
|
|
27868
|
+
|
|
27839
27869
|
// ../../shared-contracts/dist/console.js
|
|
27840
27870
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
27841
27871
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -27848,6 +27878,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
27848
27878
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
27849
27879
|
});
|
|
27850
27880
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
27881
|
+
"codexhost/voice/gateway-status",
|
|
27851
27882
|
"codexhost/console/remote-connections",
|
|
27852
27883
|
"codexhost/runtime/status",
|
|
27853
27884
|
"codexhost/remote/ssh-setup",
|
|
@@ -28957,6 +28988,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
28957
28988
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
28958
28989
|
]);
|
|
28959
28990
|
|
|
28991
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
28992
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
28993
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
28994
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
28995
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
28996
|
+
});
|
|
28997
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
28998
|
+
chatExperience: "chatgpt",
|
|
28999
|
+
chatConnection: "desktop",
|
|
29000
|
+
workConnection: "gateway"
|
|
29001
|
+
});
|
|
29002
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
29003
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
29004
|
+
external_exports.strictObject({
|
|
29005
|
+
operation: external_exports.literal("get"),
|
|
29006
|
+
runtime: external_exports.strictObject({
|
|
29007
|
+
id: external_exports.string().uuid(),
|
|
29008
|
+
revision: external_exports.string().max(64),
|
|
29009
|
+
activeCall: external_exports.boolean()
|
|
29010
|
+
}).optional()
|
|
29011
|
+
}),
|
|
29012
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
29013
|
+
external_exports.strictObject({
|
|
29014
|
+
operation: external_exports.literal("set"),
|
|
29015
|
+
settings: voiceSettingsSchema,
|
|
29016
|
+
revision: external_exports.string().max(64)
|
|
29017
|
+
}),
|
|
29018
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
29019
|
+
]);
|
|
29020
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
29021
|
+
settings: voiceSettingsSchema,
|
|
29022
|
+
initialized: external_exports.boolean(),
|
|
29023
|
+
revision: external_exports.string(),
|
|
29024
|
+
activeInject: external_exports.boolean().nullable(),
|
|
29025
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
29026
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
29027
|
+
routesActive: external_exports.boolean().nullable(),
|
|
29028
|
+
activeCall: external_exports.boolean().nullable(),
|
|
29029
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
29030
|
+
restartAvailable: external_exports.boolean(),
|
|
29031
|
+
restart: external_exports.strictObject({
|
|
29032
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
29033
|
+
error: external_exports.string().nullable()
|
|
29034
|
+
})
|
|
29035
|
+
});
|
|
29036
|
+
|
|
28960
29037
|
// ../../shared-contracts/dist/index.js
|
|
28961
29038
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
28962
29039
|
|
|
@@ -32023,8 +32100,8 @@ var ConnectionContext = class {
|
|
|
32023
32100
|
/**
|
|
32024
32101
|
* Sends a protocol-level request cancellation notification.
|
|
32025
32102
|
*/
|
|
32026
|
-
sendCancelRequest(
|
|
32027
|
-
return this.connection.sendCancelRequest(
|
|
32103
|
+
sendCancelRequest(requestId2) {
|
|
32104
|
+
return this.connection.sendCancelRequest(requestId2);
|
|
32028
32105
|
}
|
|
32029
32106
|
/**
|
|
32030
32107
|
* Registers a handler that can be disposed independently.
|
|
@@ -32209,8 +32286,8 @@ var Connection = class {
|
|
|
32209
32286
|
/**
|
|
32210
32287
|
* Sends a protocol-level request cancellation notification.
|
|
32211
32288
|
*/
|
|
32212
|
-
sendCancelRequest(
|
|
32213
|
-
return this.sendNotification(CANCEL_REQUEST_METHOD, { requestId });
|
|
32289
|
+
sendCancelRequest(requestId2) {
|
|
32290
|
+
return this.sendNotification(CANCEL_REQUEST_METHOD, { requestId: requestId2 });
|
|
32214
32291
|
}
|
|
32215
32292
|
/**
|
|
32216
32293
|
* Sends a JSON-RPC notification.
|
|
@@ -32518,15 +32595,15 @@ var Connection = class {
|
|
|
32518
32595
|
if (message.method !== CANCEL_REQUEST_METHOD) {
|
|
32519
32596
|
return;
|
|
32520
32597
|
}
|
|
32521
|
-
const
|
|
32522
|
-
if (
|
|
32598
|
+
const requestId2 = cancelRequestId(message.params);
|
|
32599
|
+
if (requestId2 === void 0) {
|
|
32523
32600
|
return;
|
|
32524
32601
|
}
|
|
32525
|
-
const controller = this.incomingRequests.get(
|
|
32602
|
+
const controller = this.incomingRequests.get(requestId2);
|
|
32526
32603
|
if (!controller || controller.signal.aborted) {
|
|
32527
32604
|
return;
|
|
32528
32605
|
}
|
|
32529
|
-
controller.abort(RequestError.requestCancelled({ requestId }));
|
|
32606
|
+
controller.abort(RequestError.requestCancelled({ requestId: requestId2 }));
|
|
32530
32607
|
}
|
|
32531
32608
|
closedReason() {
|
|
32532
32609
|
return this.abortController.signal.reason ?? new Error("ACP connection closed");
|
|
@@ -32992,12 +33069,12 @@ var AcpContext = class {
|
|
|
32992
33069
|
}
|
|
32993
33070
|
};
|
|
32994
33071
|
var AgentContext = class _AgentContext extends AcpContext {
|
|
32995
|
-
constructor(cx,
|
|
32996
|
-
super(cx,
|
|
33072
|
+
constructor(cx, requestId2) {
|
|
33073
|
+
super(cx, requestId2);
|
|
32997
33074
|
}
|
|
32998
33075
|
/** @internal */
|
|
32999
|
-
static create(cx,
|
|
33000
|
-
return new _AgentContext(cx,
|
|
33076
|
+
static create(cx, requestId2) {
|
|
33077
|
+
return new _AgentContext(cx, requestId2);
|
|
33001
33078
|
}
|
|
33002
33079
|
request(method, params, options) {
|
|
33003
33080
|
const spec = clientRequestSpecsByMethod[method];
|
|
@@ -33008,12 +33085,12 @@ var AgentContext = class _AgentContext extends AcpContext {
|
|
|
33008
33085
|
}
|
|
33009
33086
|
};
|
|
33010
33087
|
var ClientContext = class _ClientContext extends AcpContext {
|
|
33011
|
-
constructor(cx,
|
|
33012
|
-
super(cx,
|
|
33088
|
+
constructor(cx, requestId2) {
|
|
33089
|
+
super(cx, requestId2);
|
|
33013
33090
|
}
|
|
33014
33091
|
/** @internal */
|
|
33015
|
-
static create(cx,
|
|
33016
|
-
return new _ClientContext(cx,
|
|
33092
|
+
static create(cx, requestId2) {
|
|
33093
|
+
return new _ClientContext(cx, requestId2);
|
|
33017
33094
|
}
|
|
33018
33095
|
/** @internal */
|
|
33019
33096
|
[startActiveSession](params, options) {
|
|
@@ -33446,10 +33523,10 @@ var agentRequestSpecsByMethod = specsByMethod(agentRequestSpecs);
|
|
|
33446
33523
|
var agentNotificationSpecsByMethod = specsByMethod(agentNotificationSpecs);
|
|
33447
33524
|
var clientRequestSpecsByMethod = specsByMethod(clientRequestSpecs);
|
|
33448
33525
|
var clientNotificationSpecsByMethod = specsByMethod(clientNotificationSpecs);
|
|
33449
|
-
function agentRequestContext(params, client2, signal,
|
|
33526
|
+
function agentRequestContext(params, client2, signal, requestId2) {
|
|
33450
33527
|
return {
|
|
33451
33528
|
params,
|
|
33452
|
-
requestId,
|
|
33529
|
+
requestId: requestId2,
|
|
33453
33530
|
signal,
|
|
33454
33531
|
client: client2
|
|
33455
33532
|
};
|
|
@@ -33461,10 +33538,10 @@ function agentNotificationContext(params, client2, signal) {
|
|
|
33461
33538
|
client: client2
|
|
33462
33539
|
};
|
|
33463
33540
|
}
|
|
33464
|
-
function clientRequestContext(params, agent, signal,
|
|
33541
|
+
function clientRequestContext(params, agent, signal, requestId2) {
|
|
33465
33542
|
return {
|
|
33466
33543
|
params,
|
|
33467
|
-
requestId,
|
|
33544
|
+
requestId: requestId2,
|
|
33468
33545
|
signal,
|
|
33469
33546
|
agent
|
|
33470
33547
|
};
|
|
@@ -33589,7 +33666,7 @@ var AgentApp = class {
|
|
|
33589
33666
|
return this.notification(spec, handlerOrParams);
|
|
33590
33667
|
}
|
|
33591
33668
|
request(spec, handler) {
|
|
33592
|
-
registerAppRequest(this.builder, spec, (params, cx, signal,
|
|
33669
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId2) => agentRequestContext(params, AgentContext.create(cx, requestId2), signal, requestId2), handler);
|
|
33593
33670
|
return this;
|
|
33594
33671
|
}
|
|
33595
33672
|
notification(spec, handler) {
|
|
@@ -33689,7 +33766,7 @@ var ClientApp = class {
|
|
|
33689
33766
|
return this.notification(spec, handlerOrParams);
|
|
33690
33767
|
}
|
|
33691
33768
|
request(spec, handler) {
|
|
33692
|
-
registerAppRequest(this.builder, spec, (params, cx, signal,
|
|
33769
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId2) => clientRequestContext(params, ClientContext.create(cx, requestId2), signal, requestId2), handler);
|
|
33693
33770
|
return this;
|
|
33694
33771
|
}
|
|
33695
33772
|
notification(spec, handler) {
|
|
@@ -41236,10 +41313,10 @@ var Protocol = class {
|
|
|
41236
41313
|
while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
|
|
41237
41314
|
if (queuedMessage.type === "response" || queuedMessage.type === "error") {
|
|
41238
41315
|
const message = queuedMessage.message;
|
|
41239
|
-
const
|
|
41240
|
-
const resolver = this._requestResolvers.get(
|
|
41316
|
+
const requestId2 = message.id;
|
|
41317
|
+
const resolver = this._requestResolvers.get(requestId2);
|
|
41241
41318
|
if (resolver) {
|
|
41242
|
-
this._requestResolvers.delete(
|
|
41319
|
+
this._requestResolvers.delete(requestId2);
|
|
41243
41320
|
if (queuedMessage.type === "response") {
|
|
41244
41321
|
resolver(message);
|
|
41245
41322
|
} else {
|
|
@@ -41249,7 +41326,7 @@ var Protocol = class {
|
|
|
41249
41326
|
}
|
|
41250
41327
|
} else {
|
|
41251
41328
|
const messageType = queuedMessage.type === "response" ? "Response" : "Error";
|
|
41252
|
-
this._onerror(new Error(`${messageType} handler missing for request ${
|
|
41329
|
+
this._onerror(new Error(`${messageType} handler missing for request ${requestId2}`));
|
|
41253
41330
|
}
|
|
41254
41331
|
continue;
|
|
41255
41332
|
}
|
|
@@ -42018,13 +42095,13 @@ var Protocol = class {
|
|
|
42018
42095
|
const messages = await this._taskMessageQueue.dequeueAll(taskId, sessionId);
|
|
42019
42096
|
for (const message of messages) {
|
|
42020
42097
|
if (message.type === "request" && isJSONRPCRequest(message.message)) {
|
|
42021
|
-
const
|
|
42022
|
-
const resolver = this._requestResolvers.get(
|
|
42098
|
+
const requestId2 = message.message.id;
|
|
42099
|
+
const resolver = this._requestResolvers.get(requestId2);
|
|
42023
42100
|
if (resolver) {
|
|
42024
42101
|
resolver(new McpError(ErrorCode.InternalError, "Task cancelled or completed"));
|
|
42025
|
-
this._requestResolvers.delete(
|
|
42102
|
+
this._requestResolvers.delete(requestId2);
|
|
42026
42103
|
} else {
|
|
42027
|
-
this._onerror(new Error(`Resolver missing for request ${
|
|
42104
|
+
this._onerror(new Error(`Resolver missing for request ${requestId2} during task ${taskId} cleanup`));
|
|
42028
42105
|
}
|
|
42029
42106
|
}
|
|
42030
42107
|
}
|
|
@@ -45401,8 +45478,8 @@ data:
|
|
|
45401
45478
|
* Use this to implement polling behavior during long-running operations -
|
|
45402
45479
|
* client will reconnect after the retry interval specified in the priming event.
|
|
45403
45480
|
*/
|
|
45404
|
-
closeSSEStream(
|
|
45405
|
-
const streamId = this._requestToStreamMapping.get(
|
|
45481
|
+
closeSSEStream(requestId2) {
|
|
45482
|
+
const streamId = this._requestToStreamMapping.get(requestId2);
|
|
45406
45483
|
if (!streamId)
|
|
45407
45484
|
return;
|
|
45408
45485
|
const stream = this._streamMapping.get(streamId);
|
|
@@ -45421,11 +45498,11 @@ data:
|
|
|
45421
45498
|
}
|
|
45422
45499
|
}
|
|
45423
45500
|
async send(message, options) {
|
|
45424
|
-
let
|
|
45501
|
+
let requestId2 = options?.relatedRequestId;
|
|
45425
45502
|
if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
|
|
45426
|
-
|
|
45503
|
+
requestId2 = message.id;
|
|
45427
45504
|
}
|
|
45428
|
-
if (
|
|
45505
|
+
if (requestId2 === void 0) {
|
|
45429
45506
|
if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
|
|
45430
45507
|
throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");
|
|
45431
45508
|
}
|
|
@@ -45442,9 +45519,9 @@ data:
|
|
|
45442
45519
|
}
|
|
45443
45520
|
return;
|
|
45444
45521
|
}
|
|
45445
|
-
const streamId = this._requestToStreamMapping.get(
|
|
45522
|
+
const streamId = this._requestToStreamMapping.get(requestId2);
|
|
45446
45523
|
if (!streamId) {
|
|
45447
|
-
throw new Error(`No connection established for request ID: ${String(
|
|
45524
|
+
throw new Error(`No connection established for request ID: ${String(requestId2)}`);
|
|
45448
45525
|
}
|
|
45449
45526
|
let stream = this._streamMapping.get(streamId);
|
|
45450
45527
|
if (!this._enableJsonResponse) {
|
|
@@ -45461,7 +45538,7 @@ data:
|
|
|
45461
45538
|
}
|
|
45462
45539
|
}
|
|
45463
45540
|
if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
|
|
45464
|
-
this._requestResponseMap.set(
|
|
45541
|
+
this._requestResponseMap.set(requestId2, message);
|
|
45465
45542
|
const relatedIds = Array.from(this._requestToStreamMapping.entries()).filter(([_, sid]) => sid === streamId).map(([id]) => id);
|
|
45466
45543
|
const allResponsesReady = relatedIds.every((id) => this._requestResponseMap.has(id));
|
|
45467
45544
|
if (allResponsesReady) {
|
|
@@ -45485,7 +45562,7 @@ data:
|
|
|
45485
45562
|
this._requestResponseMap.delete(id);
|
|
45486
45563
|
this._requestToStreamMapping.delete(id);
|
|
45487
45564
|
}
|
|
45488
|
-
throw new Error(`No connection established for request ID: ${String(
|
|
45565
|
+
throw new Error(`No connection established for request ID: ${String(requestId2)}`);
|
|
45489
45566
|
}
|
|
45490
45567
|
if (this._enableJsonResponse && stream.resolveJson) {
|
|
45491
45568
|
const headers = {
|
|
@@ -45603,8 +45680,8 @@ var StreamableHTTPServerTransport = class {
|
|
|
45603
45680
|
* Use this to implement polling behavior during long-running operations -
|
|
45604
45681
|
* client will reconnect after the retry interval specified in the priming event.
|
|
45605
45682
|
*/
|
|
45606
|
-
closeSSEStream(
|
|
45607
|
-
this._webStandardTransport.closeSSEStream(
|
|
45683
|
+
closeSSEStream(requestId2) {
|
|
45684
|
+
this._webStandardTransport.closeSSEStream(requestId2);
|
|
45608
45685
|
}
|
|
45609
45686
|
/**
|
|
45610
45687
|
* Close the standalone GET SSE stream, triggering client reconnection.
|
|
@@ -45679,7 +45756,7 @@ async function createCursorDelegationBridge(cwd, environment, commandTimeoutMs =
|
|
|
45679
45756
|
thinking: text.optional(),
|
|
45680
45757
|
requestId: text.optional()
|
|
45681
45758
|
}
|
|
45682
|
-
}, ({ harness: harness2, task, cwd: cwd2, model: model2, thinking, requestId }) => run([
|
|
45759
|
+
}, ({ harness: harness2, task, cwd: cwd2, model: model2, thinking, requestId: requestId2 }) => run([
|
|
45683
45760
|
"delegate",
|
|
45684
45761
|
"start",
|
|
45685
45762
|
"--harness",
|
|
@@ -45689,7 +45766,7 @@ async function createCursorDelegationBridge(cwd, environment, commandTimeoutMs =
|
|
|
45689
45766
|
...optional2("--cwd", cwd2),
|
|
45690
45767
|
...optional2("--model", model2),
|
|
45691
45768
|
...optional2("--thinking", thinking),
|
|
45692
|
-
...optional2("--request-id",
|
|
45769
|
+
...optional2("--request-id", requestId2)
|
|
45693
45770
|
]));
|
|
45694
45771
|
server.registerTool("thread_send", {
|
|
45695
45772
|
description: "Send follow-up work to an existing idle task. Busy tasks must finish or be cancelled first.",
|
|
@@ -19019,6 +19019,36 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
19019
19019
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
19020
19020
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
19021
19021
|
|
|
19022
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
19023
|
+
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
19024
|
+
"openai-alpha",
|
|
19025
|
+
"thread-id",
|
|
19026
|
+
"session-id",
|
|
19027
|
+
"originator",
|
|
19028
|
+
"x-codex-turn-metadata"
|
|
19029
|
+
];
|
|
19030
|
+
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
19031
|
+
var REALTIME_CALL_ID_PATTERN = /^rtc_[A-Za-z0-9_-]{1,128}$/u;
|
|
19032
|
+
var requestId = external_exports.string().min(1).max(128);
|
|
19033
|
+
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
19034
|
+
external_exports.object({
|
|
19035
|
+
operation: external_exports.literal("create"),
|
|
19036
|
+
requestId,
|
|
19037
|
+
body: external_exports.string().min(1).max(16 << 20),
|
|
19038
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).default({})
|
|
19039
|
+
}),
|
|
19040
|
+
external_exports.object({ operation: external_exports.literal("cancel"), requestId }),
|
|
19041
|
+
external_exports.object({
|
|
19042
|
+
operation: external_exports.literal("hangup"),
|
|
19043
|
+
callId: external_exports.string().regex(REALTIME_CALL_ID_PATTERN)
|
|
19044
|
+
})
|
|
19045
|
+
]);
|
|
19046
|
+
var realtimeCallResponseSchema = external_exports.object({
|
|
19047
|
+
status: external_exports.number().int().min(200).max(599),
|
|
19048
|
+
body: external_exports.string(),
|
|
19049
|
+
headers: external_exports.record(external_exports.string(), external_exports.string())
|
|
19050
|
+
});
|
|
19051
|
+
|
|
19022
19052
|
// ../../shared-contracts/dist/console.js
|
|
19023
19053
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
19024
19054
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -19031,6 +19061,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
19031
19061
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
19032
19062
|
});
|
|
19033
19063
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
19064
|
+
"codexhost/voice/gateway-status",
|
|
19034
19065
|
"codexhost/console/remote-connections",
|
|
19035
19066
|
"codexhost/runtime/status",
|
|
19036
19067
|
"codexhost/remote/ssh-setup",
|
|
@@ -20144,6 +20175,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
20144
20175
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
20145
20176
|
]);
|
|
20146
20177
|
|
|
20178
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
20179
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
20180
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
20181
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
20182
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
20183
|
+
});
|
|
20184
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
20185
|
+
chatExperience: "chatgpt",
|
|
20186
|
+
chatConnection: "desktop",
|
|
20187
|
+
workConnection: "gateway"
|
|
20188
|
+
});
|
|
20189
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
20190
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
20191
|
+
external_exports.strictObject({
|
|
20192
|
+
operation: external_exports.literal("get"),
|
|
20193
|
+
runtime: external_exports.strictObject({
|
|
20194
|
+
id: external_exports.string().uuid(),
|
|
20195
|
+
revision: external_exports.string().max(64),
|
|
20196
|
+
activeCall: external_exports.boolean()
|
|
20197
|
+
}).optional()
|
|
20198
|
+
}),
|
|
20199
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
20200
|
+
external_exports.strictObject({
|
|
20201
|
+
operation: external_exports.literal("set"),
|
|
20202
|
+
settings: voiceSettingsSchema,
|
|
20203
|
+
revision: external_exports.string().max(64)
|
|
20204
|
+
}),
|
|
20205
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
20206
|
+
]);
|
|
20207
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
20208
|
+
settings: voiceSettingsSchema,
|
|
20209
|
+
initialized: external_exports.boolean(),
|
|
20210
|
+
revision: external_exports.string(),
|
|
20211
|
+
activeInject: external_exports.boolean().nullable(),
|
|
20212
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
20213
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
20214
|
+
routesActive: external_exports.boolean().nullable(),
|
|
20215
|
+
activeCall: external_exports.boolean().nullable(),
|
|
20216
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
20217
|
+
restartAvailable: external_exports.boolean(),
|
|
20218
|
+
restart: external_exports.strictObject({
|
|
20219
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
20220
|
+
error: external_exports.string().nullable()
|
|
20221
|
+
})
|
|
20222
|
+
});
|
|
20223
|
+
|
|
20147
20224
|
// ../../shared-contracts/dist/index.js
|
|
20148
20225
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
20149
20226
|
|
|
@@ -29293,8 +29370,8 @@ ${question.detail}` : question.question;
|
|
|
29293
29370
|
}
|
|
29294
29371
|
};
|
|
29295
29372
|
}
|
|
29296
|
-
const
|
|
29297
|
-
if (!
|
|
29373
|
+
const requestId2 = this.#randomUUID();
|
|
29374
|
+
if (!requestId2 || this.#pendingByRequestId.has(requestId2) || this.#boundRequestIds.has(requestId2)) {
|
|
29298
29375
|
return {
|
|
29299
29376
|
ok: false,
|
|
29300
29377
|
error: {
|
|
@@ -29307,7 +29384,7 @@ ${question.detail}` : question.question;
|
|
|
29307
29384
|
const abort = new AbortController();
|
|
29308
29385
|
const pending = {
|
|
29309
29386
|
command,
|
|
29310
|
-
requestId,
|
|
29387
|
+
requestId: requestId2,
|
|
29311
29388
|
abort,
|
|
29312
29389
|
admissionObserved: false,
|
|
29313
29390
|
observed: false,
|
|
@@ -29317,12 +29394,12 @@ ${question.detail}` : question.question;
|
|
|
29317
29394
|
grace: void 0,
|
|
29318
29395
|
correlationTimer: void 0
|
|
29319
29396
|
};
|
|
29320
|
-
this.#pendingByRequestId.set(
|
|
29397
|
+
this.#pendingByRequestId.set(requestId2, pending);
|
|
29321
29398
|
this.#operationControllers.add(abort);
|
|
29322
29399
|
try {
|
|
29323
29400
|
const response = await callAbortable(this.#remote.call("session/prompt", {
|
|
29324
29401
|
request: {
|
|
29325
|
-
requestId,
|
|
29402
|
+
requestId: requestId2,
|
|
29326
29403
|
sessionId: this.#sessionId,
|
|
29327
29404
|
mode: "queue",
|
|
29328
29405
|
content: command.input.map(({ text }) => ({ type: "text", text }))
|