@karlorz/codexhost-cli-darwin-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 +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -15121,6 +15121,36 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15121
15121
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15122
15122
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15123
15123
|
|
|
15124
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
15125
|
+
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
15126
|
+
"openai-alpha",
|
|
15127
|
+
"thread-id",
|
|
15128
|
+
"session-id",
|
|
15129
|
+
"originator",
|
|
15130
|
+
"x-codex-turn-metadata"
|
|
15131
|
+
];
|
|
15132
|
+
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
15133
|
+
var REALTIME_CALL_ID_PATTERN = /^rtc_[A-Za-z0-9_-]{1,128}$/u;
|
|
15134
|
+
var requestId = external_exports.string().min(1).max(128);
|
|
15135
|
+
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
15136
|
+
external_exports.object({
|
|
15137
|
+
operation: external_exports.literal("create"),
|
|
15138
|
+
requestId,
|
|
15139
|
+
body: external_exports.string().min(1).max(16 << 20),
|
|
15140
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).default({})
|
|
15141
|
+
}),
|
|
15142
|
+
external_exports.object({ operation: external_exports.literal("cancel"), requestId }),
|
|
15143
|
+
external_exports.object({
|
|
15144
|
+
operation: external_exports.literal("hangup"),
|
|
15145
|
+
callId: external_exports.string().regex(REALTIME_CALL_ID_PATTERN)
|
|
15146
|
+
})
|
|
15147
|
+
]);
|
|
15148
|
+
var realtimeCallResponseSchema = external_exports.object({
|
|
15149
|
+
status: external_exports.number().int().min(200).max(599),
|
|
15150
|
+
body: external_exports.string(),
|
|
15151
|
+
headers: external_exports.record(external_exports.string(), external_exports.string())
|
|
15152
|
+
});
|
|
15153
|
+
|
|
15124
15154
|
// ../../shared-contracts/dist/console.js
|
|
15125
15155
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15126
15156
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -15133,6 +15163,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
15133
15163
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
15134
15164
|
});
|
|
15135
15165
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
15166
|
+
"codexhost/voice/gateway-status",
|
|
15136
15167
|
"codexhost/console/remote-connections",
|
|
15137
15168
|
"codexhost/runtime/status",
|
|
15138
15169
|
"codexhost/remote/ssh-setup",
|
|
@@ -16242,6 +16273,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16242
16273
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16243
16274
|
]);
|
|
16244
16275
|
|
|
16276
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
16277
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
16278
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
16279
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
16280
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
16281
|
+
});
|
|
16282
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
16283
|
+
chatExperience: "chatgpt",
|
|
16284
|
+
chatConnection: "desktop",
|
|
16285
|
+
workConnection: "gateway"
|
|
16286
|
+
});
|
|
16287
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
16288
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
16289
|
+
external_exports.strictObject({
|
|
16290
|
+
operation: external_exports.literal("get"),
|
|
16291
|
+
runtime: external_exports.strictObject({
|
|
16292
|
+
id: external_exports.string().uuid(),
|
|
16293
|
+
revision: external_exports.string().max(64),
|
|
16294
|
+
activeCall: external_exports.boolean()
|
|
16295
|
+
}).optional()
|
|
16296
|
+
}),
|
|
16297
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
16298
|
+
external_exports.strictObject({
|
|
16299
|
+
operation: external_exports.literal("set"),
|
|
16300
|
+
settings: voiceSettingsSchema,
|
|
16301
|
+
revision: external_exports.string().max(64)
|
|
16302
|
+
}),
|
|
16303
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
16304
|
+
]);
|
|
16305
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
16306
|
+
settings: voiceSettingsSchema,
|
|
16307
|
+
initialized: external_exports.boolean(),
|
|
16308
|
+
revision: external_exports.string(),
|
|
16309
|
+
activeInject: external_exports.boolean().nullable(),
|
|
16310
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16311
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16312
|
+
routesActive: external_exports.boolean().nullable(),
|
|
16313
|
+
activeCall: external_exports.boolean().nullable(),
|
|
16314
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
16315
|
+
restartAvailable: external_exports.boolean(),
|
|
16316
|
+
restart: external_exports.strictObject({
|
|
16317
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
16318
|
+
error: external_exports.string().nullable()
|
|
16319
|
+
})
|
|
16320
|
+
});
|
|
16321
|
+
|
|
16245
16322
|
// ../../shared-contracts/dist/index.js
|
|
16246
16323
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
16247
16324
|
|
|
@@ -18559,8 +18636,8 @@ var ConnectionContext = class {
|
|
|
18559
18636
|
/**
|
|
18560
18637
|
* Sends a protocol-level request cancellation notification.
|
|
18561
18638
|
*/
|
|
18562
|
-
sendCancelRequest(
|
|
18563
|
-
return this.connection.sendCancelRequest(
|
|
18639
|
+
sendCancelRequest(requestId2) {
|
|
18640
|
+
return this.connection.sendCancelRequest(requestId2);
|
|
18564
18641
|
}
|
|
18565
18642
|
/**
|
|
18566
18643
|
* Registers a handler that can be disposed independently.
|
|
@@ -18745,8 +18822,8 @@ var Connection = class {
|
|
|
18745
18822
|
/**
|
|
18746
18823
|
* Sends a protocol-level request cancellation notification.
|
|
18747
18824
|
*/
|
|
18748
|
-
sendCancelRequest(
|
|
18749
|
-
return this.sendNotification(CANCEL_REQUEST_METHOD, { requestId });
|
|
18825
|
+
sendCancelRequest(requestId2) {
|
|
18826
|
+
return this.sendNotification(CANCEL_REQUEST_METHOD, { requestId: requestId2 });
|
|
18750
18827
|
}
|
|
18751
18828
|
/**
|
|
18752
18829
|
* Sends a JSON-RPC notification.
|
|
@@ -19054,15 +19131,15 @@ var Connection = class {
|
|
|
19054
19131
|
if (message.method !== CANCEL_REQUEST_METHOD) {
|
|
19055
19132
|
return;
|
|
19056
19133
|
}
|
|
19057
|
-
const
|
|
19058
|
-
if (
|
|
19134
|
+
const requestId2 = cancelRequestId(message.params);
|
|
19135
|
+
if (requestId2 === void 0) {
|
|
19059
19136
|
return;
|
|
19060
19137
|
}
|
|
19061
|
-
const controller = this.incomingRequests.get(
|
|
19138
|
+
const controller = this.incomingRequests.get(requestId2);
|
|
19062
19139
|
if (!controller || controller.signal.aborted) {
|
|
19063
19140
|
return;
|
|
19064
19141
|
}
|
|
19065
|
-
controller.abort(RequestError.requestCancelled({ requestId }));
|
|
19142
|
+
controller.abort(RequestError.requestCancelled({ requestId: requestId2 }));
|
|
19066
19143
|
}
|
|
19067
19144
|
closedReason() {
|
|
19068
19145
|
return this.abortController.signal.reason ?? new Error("ACP connection closed");
|
|
@@ -19528,12 +19605,12 @@ var AcpContext = class {
|
|
|
19528
19605
|
}
|
|
19529
19606
|
};
|
|
19530
19607
|
var AgentContext = class _AgentContext extends AcpContext {
|
|
19531
|
-
constructor(cx,
|
|
19532
|
-
super(cx,
|
|
19608
|
+
constructor(cx, requestId2) {
|
|
19609
|
+
super(cx, requestId2);
|
|
19533
19610
|
}
|
|
19534
19611
|
/** @internal */
|
|
19535
|
-
static create(cx,
|
|
19536
|
-
return new _AgentContext(cx,
|
|
19612
|
+
static create(cx, requestId2) {
|
|
19613
|
+
return new _AgentContext(cx, requestId2);
|
|
19537
19614
|
}
|
|
19538
19615
|
request(method, params, options) {
|
|
19539
19616
|
const spec = clientRequestSpecsByMethod[method];
|
|
@@ -19544,12 +19621,12 @@ var AgentContext = class _AgentContext extends AcpContext {
|
|
|
19544
19621
|
}
|
|
19545
19622
|
};
|
|
19546
19623
|
var ClientContext = class _ClientContext extends AcpContext {
|
|
19547
|
-
constructor(cx,
|
|
19548
|
-
super(cx,
|
|
19624
|
+
constructor(cx, requestId2) {
|
|
19625
|
+
super(cx, requestId2);
|
|
19549
19626
|
}
|
|
19550
19627
|
/** @internal */
|
|
19551
|
-
static create(cx,
|
|
19552
|
-
return new _ClientContext(cx,
|
|
19628
|
+
static create(cx, requestId2) {
|
|
19629
|
+
return new _ClientContext(cx, requestId2);
|
|
19553
19630
|
}
|
|
19554
19631
|
/** @internal */
|
|
19555
19632
|
[startActiveSession](params, options) {
|
|
@@ -19982,10 +20059,10 @@ var agentRequestSpecsByMethod = specsByMethod(agentRequestSpecs);
|
|
|
19982
20059
|
var agentNotificationSpecsByMethod = specsByMethod(agentNotificationSpecs);
|
|
19983
20060
|
var clientRequestSpecsByMethod = specsByMethod(clientRequestSpecs);
|
|
19984
20061
|
var clientNotificationSpecsByMethod = specsByMethod(clientNotificationSpecs);
|
|
19985
|
-
function agentRequestContext(params, client2, signal,
|
|
20062
|
+
function agentRequestContext(params, client2, signal, requestId2) {
|
|
19986
20063
|
return {
|
|
19987
20064
|
params,
|
|
19988
|
-
requestId,
|
|
20065
|
+
requestId: requestId2,
|
|
19989
20066
|
signal,
|
|
19990
20067
|
client: client2
|
|
19991
20068
|
};
|
|
@@ -19997,10 +20074,10 @@ function agentNotificationContext(params, client2, signal) {
|
|
|
19997
20074
|
client: client2
|
|
19998
20075
|
};
|
|
19999
20076
|
}
|
|
20000
|
-
function clientRequestContext(params, agent, signal,
|
|
20077
|
+
function clientRequestContext(params, agent, signal, requestId2) {
|
|
20001
20078
|
return {
|
|
20002
20079
|
params,
|
|
20003
|
-
requestId,
|
|
20080
|
+
requestId: requestId2,
|
|
20004
20081
|
signal,
|
|
20005
20082
|
agent
|
|
20006
20083
|
};
|
|
@@ -20125,7 +20202,7 @@ var AgentApp = class {
|
|
|
20125
20202
|
return this.notification(spec, handlerOrParams);
|
|
20126
20203
|
}
|
|
20127
20204
|
request(spec, handler) {
|
|
20128
|
-
registerAppRequest(this.builder, spec, (params, cx, signal,
|
|
20205
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId2) => agentRequestContext(params, AgentContext.create(cx, requestId2), signal, requestId2), handler);
|
|
20129
20206
|
return this;
|
|
20130
20207
|
}
|
|
20131
20208
|
notification(spec, handler) {
|
|
@@ -20225,7 +20302,7 @@ var ClientApp = class {
|
|
|
20225
20302
|
return this.notification(spec, handlerOrParams);
|
|
20226
20303
|
}
|
|
20227
20304
|
request(spec, handler) {
|
|
20228
|
-
registerAppRequest(this.builder, spec, (params, cx, signal,
|
|
20305
|
+
registerAppRequest(this.builder, spec, (params, cx, signal, requestId2) => clientRequestContext(params, ClientContext.create(cx, requestId2), signal, requestId2), handler);
|
|
20229
20306
|
return this;
|
|
20230
20307
|
}
|
|
20231
20308
|
notification(spec, handler) {
|
|
@@ -15321,6 +15321,36 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15321
15321
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15322
15322
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15323
15323
|
|
|
15324
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
15325
|
+
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
15326
|
+
"openai-alpha",
|
|
15327
|
+
"thread-id",
|
|
15328
|
+
"session-id",
|
|
15329
|
+
"originator",
|
|
15330
|
+
"x-codex-turn-metadata"
|
|
15331
|
+
];
|
|
15332
|
+
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
15333
|
+
var REALTIME_CALL_ID_PATTERN = /^rtc_[A-Za-z0-9_-]{1,128}$/u;
|
|
15334
|
+
var requestId = external_exports.string().min(1).max(128);
|
|
15335
|
+
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
15336
|
+
external_exports.object({
|
|
15337
|
+
operation: external_exports.literal("create"),
|
|
15338
|
+
requestId,
|
|
15339
|
+
body: external_exports.string().min(1).max(16 << 20),
|
|
15340
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).default({})
|
|
15341
|
+
}),
|
|
15342
|
+
external_exports.object({ operation: external_exports.literal("cancel"), requestId }),
|
|
15343
|
+
external_exports.object({
|
|
15344
|
+
operation: external_exports.literal("hangup"),
|
|
15345
|
+
callId: external_exports.string().regex(REALTIME_CALL_ID_PATTERN)
|
|
15346
|
+
})
|
|
15347
|
+
]);
|
|
15348
|
+
var realtimeCallResponseSchema = external_exports.object({
|
|
15349
|
+
status: external_exports.number().int().min(200).max(599),
|
|
15350
|
+
body: external_exports.string(),
|
|
15351
|
+
headers: external_exports.record(external_exports.string(), external_exports.string())
|
|
15352
|
+
});
|
|
15353
|
+
|
|
15324
15354
|
// ../../shared-contracts/dist/console.js
|
|
15325
15355
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15326
15356
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -15333,6 +15363,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
15333
15363
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
15334
15364
|
});
|
|
15335
15365
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
15366
|
+
"codexhost/voice/gateway-status",
|
|
15336
15367
|
"codexhost/console/remote-connections",
|
|
15337
15368
|
"codexhost/runtime/status",
|
|
15338
15369
|
"codexhost/remote/ssh-setup",
|
|
@@ -16442,6 +16473,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16442
16473
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16443
16474
|
]);
|
|
16444
16475
|
|
|
16476
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
16477
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
16478
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
16479
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
16480
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
16481
|
+
});
|
|
16482
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
16483
|
+
chatExperience: "chatgpt",
|
|
16484
|
+
chatConnection: "desktop",
|
|
16485
|
+
workConnection: "gateway"
|
|
16486
|
+
});
|
|
16487
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
16488
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
16489
|
+
external_exports.strictObject({
|
|
16490
|
+
operation: external_exports.literal("get"),
|
|
16491
|
+
runtime: external_exports.strictObject({
|
|
16492
|
+
id: external_exports.string().uuid(),
|
|
16493
|
+
revision: external_exports.string().max(64),
|
|
16494
|
+
activeCall: external_exports.boolean()
|
|
16495
|
+
}).optional()
|
|
16496
|
+
}),
|
|
16497
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
16498
|
+
external_exports.strictObject({
|
|
16499
|
+
operation: external_exports.literal("set"),
|
|
16500
|
+
settings: voiceSettingsSchema,
|
|
16501
|
+
revision: external_exports.string().max(64)
|
|
16502
|
+
}),
|
|
16503
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
16504
|
+
]);
|
|
16505
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
16506
|
+
settings: voiceSettingsSchema,
|
|
16507
|
+
initialized: external_exports.boolean(),
|
|
16508
|
+
revision: external_exports.string(),
|
|
16509
|
+
activeInject: external_exports.boolean().nullable(),
|
|
16510
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16511
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16512
|
+
routesActive: external_exports.boolean().nullable(),
|
|
16513
|
+
activeCall: external_exports.boolean().nullable(),
|
|
16514
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
16515
|
+
restartAvailable: external_exports.boolean(),
|
|
16516
|
+
restart: external_exports.strictObject({
|
|
16517
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
16518
|
+
error: external_exports.string().nullable()
|
|
16519
|
+
})
|
|
16520
|
+
});
|
|
16521
|
+
|
|
16445
16522
|
// ../../shared-contracts/dist/index.js
|
|
16446
16523
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
16447
16524
|
|
|
@@ -17630,8 +17707,8 @@ function ompUsageRecord(message3, extra = {}) {
|
|
|
17630
17707
|
const usage = isRecord5(message3.usage) ? message3.usage : null;
|
|
17631
17708
|
const input = nonNegativeSafeInteger(usage?.input);
|
|
17632
17709
|
const output = nonNegativeSafeInteger(usage?.output);
|
|
17633
|
-
const
|
|
17634
|
-
if (!usage || input === null || output === null ||
|
|
17710
|
+
const requestId2 = typeof message3.responseId === "string" && message3.responseId.length > 0 ? message3.responseId : typeof message3.timestamp === "number" && Number.isSafeInteger(message3.timestamp) ? `t${message3.timestamp}` : null;
|
|
17711
|
+
if (!usage || input === null || output === null || requestId2 === null) {
|
|
17635
17712
|
return { kind: "missing" };
|
|
17636
17713
|
}
|
|
17637
17714
|
const cacheRead = nonNegativeSafeInteger(usage.cacheRead);
|
|
@@ -17642,7 +17719,7 @@ function ompUsageRecord(message3, extra = {}) {
|
|
|
17642
17719
|
return {
|
|
17643
17720
|
kind: "request",
|
|
17644
17721
|
request: parseHostUsageRequest({
|
|
17645
|
-
requestId,
|
|
17722
|
+
requestId: requestId2,
|
|
17646
17723
|
...extra.historical ? { historical: true } : {},
|
|
17647
17724
|
// Omp's provider is a configurable name, not a standard provider ID.
|
|
17648
17725
|
...typeof message3.model === "string" && message3.model.length > 0 ? { model: message3.model } : {},
|
|
@@ -19492,11 +19569,11 @@ var OmpRpcSession = class {
|
|
|
19492
19569
|
#startInteraction(active, value) {
|
|
19493
19570
|
if (!this.#isBlockingInteraction(value))
|
|
19494
19571
|
return;
|
|
19495
|
-
const
|
|
19572
|
+
const requestId2 = value.id;
|
|
19496
19573
|
const method = value.method;
|
|
19497
19574
|
const title = value.title;
|
|
19498
19575
|
const timeoutMs = value.timeout;
|
|
19499
|
-
if (typeof
|
|
19576
|
+
if (typeof requestId2 !== "string" || requestId2.length === 0 || typeof method !== "string" || typeof title !== "string" || title.length === 0 || timeoutMs !== void 0 && (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs) || timeoutMs < 0) || active.interactions.has(requestId2)) {
|
|
19500
19577
|
throw new OmpRpcFaultError("protocolError", "Omp RPC returned an invalid Interaction request");
|
|
19501
19578
|
}
|
|
19502
19579
|
let request;
|
|
@@ -19512,7 +19589,7 @@ var OmpRpcSession = class {
|
|
|
19512
19589
|
optionDetails = value.optionDetails.map(({ description }) => description === void 0 ? {} : { description });
|
|
19513
19590
|
}
|
|
19514
19591
|
request = {
|
|
19515
|
-
requestId,
|
|
19592
|
+
requestId: requestId2,
|
|
19516
19593
|
method,
|
|
19517
19594
|
title,
|
|
19518
19595
|
options: [...value.options],
|
|
@@ -19524,7 +19601,7 @@ var OmpRpcSession = class {
|
|
|
19524
19601
|
throw new OmpRpcFaultError("protocolError", "Omp RPC confirm request has no message");
|
|
19525
19602
|
}
|
|
19526
19603
|
request = {
|
|
19527
|
-
requestId,
|
|
19604
|
+
requestId: requestId2,
|
|
19528
19605
|
method,
|
|
19529
19606
|
title,
|
|
19530
19607
|
message: value.message,
|
|
@@ -19535,7 +19612,7 @@ var OmpRpcSession = class {
|
|
|
19535
19612
|
throw new OmpRpcFaultError("protocolError", "Omp RPC input placeholder is invalid");
|
|
19536
19613
|
}
|
|
19537
19614
|
request = {
|
|
19538
|
-
requestId,
|
|
19615
|
+
requestId: requestId2,
|
|
19539
19616
|
method,
|
|
19540
19617
|
title,
|
|
19541
19618
|
...typeof value.placeholder === "string" ? { placeholder: value.placeholder } : {},
|
|
@@ -19546,7 +19623,7 @@ var OmpRpcSession = class {
|
|
|
19546
19623
|
throw new OmpRpcFaultError("protocolError", "Omp RPC editor prefill is invalid");
|
|
19547
19624
|
}
|
|
19548
19625
|
request = {
|
|
19549
|
-
requestId,
|
|
19626
|
+
requestId: requestId2,
|
|
19550
19627
|
method: "editor",
|
|
19551
19628
|
title,
|
|
19552
19629
|
...typeof value.prefill === "string" ? { prefill: value.prefill } : {},
|
|
@@ -19556,16 +19633,16 @@ var OmpRpcSession = class {
|
|
|
19556
19633
|
const pending = { request, timeout: null };
|
|
19557
19634
|
if (request.timeoutMs !== void 0) {
|
|
19558
19635
|
pending.timeout = setTimeout(() => {
|
|
19559
|
-
if (this.#activeTurn !== active || !active.interactions.has(
|
|
19636
|
+
if (this.#activeTurn !== active || !active.interactions.has(requestId2))
|
|
19560
19637
|
return;
|
|
19561
|
-
void this.#resolveInteraction({ requestId, cancelled: true }, "expired").catch((error51) => {
|
|
19638
|
+
void this.#resolveInteraction({ requestId: requestId2, cancelled: true }, "expired").catch((error51) => {
|
|
19562
19639
|
if (this.#closed || this.#failed)
|
|
19563
19640
|
return;
|
|
19564
19641
|
this.#fail(new OmpRpcFaultError("protocolError", `Omp RPC Interaction timeout handling failed: ${message2(error51)}`));
|
|
19565
19642
|
});
|
|
19566
19643
|
}, request.timeoutMs);
|
|
19567
19644
|
}
|
|
19568
|
-
active.interactions.set(
|
|
19645
|
+
active.interactions.set(requestId2, pending);
|
|
19569
19646
|
active.onEvent({ type: "interaction.requested", request });
|
|
19570
19647
|
}
|
|
19571
19648
|
#handleResponse(value) {
|
|
@@ -19917,11 +19994,11 @@ var OmpRpcSession = class {
|
|
|
19917
19994
|
this.#options.onFault?.(finalFault);
|
|
19918
19995
|
}
|
|
19919
19996
|
#closeInteractions(active, reason) {
|
|
19920
|
-
for (const [
|
|
19921
|
-
active.interactions.delete(
|
|
19997
|
+
for (const [requestId2, pending] of active.interactions) {
|
|
19998
|
+
active.interactions.delete(requestId2);
|
|
19922
19999
|
if (pending.timeout)
|
|
19923
20000
|
clearTimeout(pending.timeout);
|
|
19924
|
-
active.onEvent({ type: "interaction.closed", requestId, reason });
|
|
20001
|
+
active.onEvent({ type: "interaction.closed", requestId: requestId2, reason });
|
|
19925
20002
|
}
|
|
19926
20003
|
}
|
|
19927
20004
|
#rejectActiveTurn(error51) {
|
|
@@ -15318,6 +15318,36 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15318
15318
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15319
15319
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15320
15320
|
|
|
15321
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
15322
|
+
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
15323
|
+
"openai-alpha",
|
|
15324
|
+
"thread-id",
|
|
15325
|
+
"session-id",
|
|
15326
|
+
"originator",
|
|
15327
|
+
"x-codex-turn-metadata"
|
|
15328
|
+
];
|
|
15329
|
+
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
15330
|
+
var REALTIME_CALL_ID_PATTERN = /^rtc_[A-Za-z0-9_-]{1,128}$/u;
|
|
15331
|
+
var requestId = external_exports.string().min(1).max(128);
|
|
15332
|
+
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
15333
|
+
external_exports.object({
|
|
15334
|
+
operation: external_exports.literal("create"),
|
|
15335
|
+
requestId,
|
|
15336
|
+
body: external_exports.string().min(1).max(16 << 20),
|
|
15337
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).default({})
|
|
15338
|
+
}),
|
|
15339
|
+
external_exports.object({ operation: external_exports.literal("cancel"), requestId }),
|
|
15340
|
+
external_exports.object({
|
|
15341
|
+
operation: external_exports.literal("hangup"),
|
|
15342
|
+
callId: external_exports.string().regex(REALTIME_CALL_ID_PATTERN)
|
|
15343
|
+
})
|
|
15344
|
+
]);
|
|
15345
|
+
var realtimeCallResponseSchema = external_exports.object({
|
|
15346
|
+
status: external_exports.number().int().min(200).max(599),
|
|
15347
|
+
body: external_exports.string(),
|
|
15348
|
+
headers: external_exports.record(external_exports.string(), external_exports.string())
|
|
15349
|
+
});
|
|
15350
|
+
|
|
15321
15351
|
// ../../shared-contracts/dist/console.js
|
|
15322
15352
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15323
15353
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -15330,6 +15360,7 @@ var consoleOpenResultSchema = external_exports.strictObject({
|
|
|
15330
15360
|
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
15331
15361
|
});
|
|
15332
15362
|
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
15363
|
+
"codexhost/voice/gateway-status",
|
|
15333
15364
|
"codexhost/console/remote-connections",
|
|
15334
15365
|
"codexhost/runtime/status",
|
|
15335
15366
|
"codexhost/remote/ssh-setup",
|
|
@@ -16439,6 +16470,52 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16439
16470
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16440
16471
|
]);
|
|
16441
16472
|
|
|
16473
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
16474
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
16475
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
16476
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
16477
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
16478
|
+
});
|
|
16479
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
16480
|
+
chatExperience: "chatgpt",
|
|
16481
|
+
chatConnection: "desktop",
|
|
16482
|
+
workConnection: "gateway"
|
|
16483
|
+
});
|
|
16484
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
16485
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
16486
|
+
external_exports.strictObject({
|
|
16487
|
+
operation: external_exports.literal("get"),
|
|
16488
|
+
runtime: external_exports.strictObject({
|
|
16489
|
+
id: external_exports.string().uuid(),
|
|
16490
|
+
revision: external_exports.string().max(64),
|
|
16491
|
+
activeCall: external_exports.boolean()
|
|
16492
|
+
}).optional()
|
|
16493
|
+
}),
|
|
16494
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
16495
|
+
external_exports.strictObject({
|
|
16496
|
+
operation: external_exports.literal("set"),
|
|
16497
|
+
settings: voiceSettingsSchema,
|
|
16498
|
+
revision: external_exports.string().max(64)
|
|
16499
|
+
}),
|
|
16500
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
16501
|
+
]);
|
|
16502
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
16503
|
+
settings: voiceSettingsSchema,
|
|
16504
|
+
initialized: external_exports.boolean(),
|
|
16505
|
+
revision: external_exports.string(),
|
|
16506
|
+
activeInject: external_exports.boolean().nullable(),
|
|
16507
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16508
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16509
|
+
routesActive: external_exports.boolean().nullable(),
|
|
16510
|
+
activeCall: external_exports.boolean().nullable(),
|
|
16511
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
16512
|
+
restartAvailable: external_exports.boolean(),
|
|
16513
|
+
restart: external_exports.strictObject({
|
|
16514
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
16515
|
+
error: external_exports.string().nullable()
|
|
16516
|
+
})
|
|
16517
|
+
});
|
|
16518
|
+
|
|
16442
16519
|
// ../../shared-contracts/dist/index.js
|
|
16443
16520
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
16444
16521
|
|