@codexhost/cli-win32-x64 0.34.0 → 0.35.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 +479 -107
- package/app/console-web.js +1106 -145
- package/app/desktop-controller.mjs +356 -63
- package/app/host-runtime.mjs +4345 -1470
- package/app/plugins/antigravity/plugin.mjs +1002 -99
- package/app/plugins/claude-code/plugin.mjs +336 -61
- package/app/plugins/codebuddy/plugin.mjs +389 -84
- package/app/plugins/codex-usage/plugin.mjs +468 -65
- package/app/plugins/copilot/plugin.mjs +336 -63
- package/app/plugins/cursor-cli/plugin.mjs +336 -61
- package/app/plugins/deepseek-harness/plugin.mjs +336 -61
- package/app/plugins/devin/plugin.mjs +336 -61
- package/app/plugins/grok/plugin.mjs +389 -83
- package/app/plugins/hermes/plugin.mjs +335 -60
- package/app/plugins/kimi-code/plugin.mjs +336 -61
- package/app/plugins/kiro-cli/plugin.mjs +336 -61
- package/app/plugins/omp/plugin.mjs +336 -61
- package/app/plugins/opencode/plugin.mjs +336 -61
- package/app/plugins/pi/plugin.mjs +336 -61
- package/app/plugins/qoder/plugin.mjs +337 -62
- package/app/plugins/qoder-cn/plugin.mjs +337 -62
- package/app/plugins/qwen-code/plugin.mjs +335 -60
- package/app/plugins/workbuddy/plugin.mjs +408 -95
- package/app/plugins/workbuddy-cn/plugin.mjs +408 -95
- package/app/plugins/zcode/plugin.mjs +337 -61
- package/app/renderer-extension.js +1516 -346
- package/app/web/assets/{abnfDiagram-XWFEHMT6-Cg-E7mc4.js → abnfDiagram-XWFEHMT6-CGkBtBVj.js} +1 -1
- package/app/web/assets/{architectureDiagram-CSQXQB3N-B__CwXjW.js → architectureDiagram-CSQXQB3N-Byv-cZeH.js} +1 -1
- package/app/web/assets/{blockDiagram-BEDRHYPZ-Bk2gCIVM.js → blockDiagram-BEDRHYPZ-DjLzUtwg.js} +1 -1
- package/app/web/assets/{c4Diagram-M2UUVUY5-DU_TpjJ3.js → c4Diagram-M2UUVUY5-CJlsb6QO.js} +1 -1
- package/app/web/assets/{chunk-2Q5K7J3B-DnJEi6e4.js → chunk-2Q5K7J3B-CWm537bw.js} +1 -1
- package/app/web/assets/{chunk-3GCGMST5-Dia9jGkf.js → chunk-3GCGMST5-NpcInIx4.js} +1 -1
- package/app/web/assets/{chunk-5VM5RSS4-2PGDiDvK.js → chunk-5VM5RSS4-CeyyP0dm.js} +1 -1
- package/app/web/assets/{chunk-7U7NFRK5-BLPm3d5H.js → chunk-7U7NFRK5-Bto5OgbF.js} +1 -1
- package/app/web/assets/{chunk-CNRTWJTD-GH_nAEXs.js → chunk-CNRTWJTD-CuRMFCjT.js} +1 -1
- package/app/web/assets/{chunk-D5HYT7QG-DnIm-Ely.js → chunk-D5HYT7QG-DtQM1-2k.js} +1 -1
- package/app/web/assets/{chunk-EBZ3SEQC-C6N5qLCR.js → chunk-EBZ3SEQC-DbUb3ZJ4.js} +2 -2
- package/app/web/assets/{chunk-JWPE2WC7-D_kMgdmr.js → chunk-JWPE2WC7-Dxh3d9Ag.js} +1 -1
- package/app/web/assets/{chunk-KTR4FSNJ-BRb9femQ.js → chunk-KTR4FSNJ-BfwavXUO.js} +1 -1
- package/app/web/assets/{chunk-XXDRQBXY-BFaK95zq.js → chunk-XXDRQBXY-CxR1flID.js} +1 -1
- package/app/web/assets/{classDiagram-v2-KXABOMEV--_hR_XrU.js → classDiagram-v2-KXABOMEV-2WV2q_X2.js} +1 -1
- package/app/web/assets/{cose-bilkent-JH36ORCC-C7ghEB3_.js → cose-bilkent-JH36ORCC-C-ENrCL_.js} +1 -1
- package/app/web/assets/{cynefin-EF2NZ3EQ-Ce1lURwZ.js → cynefin-EF2NZ3EQ-Bg5LeTZO.js} +1 -1
- package/app/web/assets/{cynefinDiagram-NJNITYFG-Cgr5aSTS.js → cynefinDiagram-NJNITYFG-CRAdbGGt.js} +1 -1
- package/app/web/assets/{dagre-KIHZ2IZ3-BBFKmRP1.js → dagre-KIHZ2IZ3-dNHEvUqL.js} +1 -1
- package/app/web/assets/{diagram-7YQZDPLS-CJQih32K.js → diagram-7YQZDPLS-7F4O37o5.js} +1 -1
- package/app/web/assets/{diagram-QBROCOUO-Cl3S7IUT.js → diagram-QBROCOUO-B-5KpeI2.js} +1 -1
- package/app/web/assets/{diagram-RJJCUUZO-B6C8N2cV.js → diagram-RJJCUUZO-DqDsyDaL.js} +1 -1
- package/app/web/assets/{diagram-WERXNKYE-NkciBSQl.js → diagram-WERXNKYE-f1oaPKos.js} +1 -1
- package/app/web/assets/{diagram-YHHI257C-DlEvljeY.js → diagram-YHHI257C-DVMtl9Bt.js} +1 -1
- package/app/web/assets/{diagram-YR4HJLHV-e4_Gzbt6.js → diagram-YR4HJLHV-BWFCNFFF.js} +1 -1
- package/app/web/assets/{ebnfDiagram-N527522P-WvQEFmPi.js → ebnfDiagram-N527522P-B4N7d-Bi.js} +1 -1
- package/app/web/assets/{elk-O5DQBFGD-CkyJsjzf.js → elk-O5DQBFGD-DRdfF_UQ.js} +1 -1
- package/app/web/assets/{erDiagram-K3K3BIDK-B93gK3X0.js → erDiagram-K3K3BIDK-BW4-_5sZ.js} +1 -1
- package/app/web/assets/{flowDiagram-Z6JWZHQI-NFaGX6B4.js → flowDiagram-Z6JWZHQI-DIQa5yEv.js} +1 -1
- package/app/web/assets/{ganttDiagram-3PRQTZWP-Czh68CQm.js → ganttDiagram-3PRQTZWP-JBK9PM7A.js} +1 -1
- package/app/web/assets/{gitGraphDiagram-VXDFKS5L-t95UHKja.js → gitGraphDiagram-VXDFKS5L-TPI9Su0g.js} +1 -1
- package/app/web/assets/{grid-E2QIVN74-C87DucDN.js → grid-E2QIVN74-DmHbunuP.js} +1 -1
- package/app/web/assets/index-BKDmniRf.js +209 -0
- package/app/web/assets/index-BPMnQdGr.css +1 -0
- package/app/web/assets/{infoDiagram-EZ3ZOAHP-CxFlfQbY.js → infoDiagram-EZ3ZOAHP-BeFwO9PI.js} +1 -1
- package/app/web/assets/{ishikawaDiagram-S3EKX5GW-D4IwQJde.js → ishikawaDiagram-S3EKX5GW-BTbrKF_p.js} +1 -1
- package/app/web/assets/{journeyDiagram-POQNLL5X-C0Bf5W4T.js → journeyDiagram-POQNLL5X-DR0yWxJi.js} +1 -1
- package/app/web/assets/{kanban-definition-BH5XI6FM-Cda7r2yr.js → kanban-definition-BH5XI6FM-DMHrC9oV.js} +1 -1
- package/app/web/assets/{mermaid.core-f4LJm6AC.js → mermaid.core-Brmc1kJw.js} +4 -4
- package/app/web/assets/{mindmap-definition-WVAN44T4-DKapinG7.js → mindmap-definition-WVAN44T4-NT_XVwlI.js} +1 -1
- package/app/web/assets/{pegDiagram-D4NLKWP3-D7iEZGN2.js → pegDiagram-D4NLKWP3-K67_THcc.js} +1 -1
- package/app/web/assets/{pieDiagram-36ENHN4W-CopXZ5qt.js → pieDiagram-36ENHN4W-GlTgKnTi.js} +1 -1
- package/app/web/assets/{quadrantDiagram-ZQUDMS73-mmkKPDGK.js → quadrantDiagram-ZQUDMS73-yMEZ6-Nr.js} +1 -1
- package/app/web/assets/{railroadDiagram-JIZHGYPL-BAGwIIkV.js → railroadDiagram-JIZHGYPL-MXCqwbuq.js} +1 -1
- package/app/web/assets/{render-VIF2ZAQL-dXxGa09y.js → render-VIF2ZAQL-BRUlhHPG.js} +2 -2
- package/app/web/assets/{requirementDiagram-AXW2TVFA-C35tmLFs.js → requirementDiagram-AXW2TVFA-Dqx4p0Bz.js} +1 -1
- package/app/web/assets/{sankeyDiagram-FBCJTAIF-BbSo5yeK.js → sankeyDiagram-FBCJTAIF-COp3IWvs.js} +1 -1
- package/app/web/assets/{sequenceDiagram-3LA2ROMG-Cgm2unNy.js → sequenceDiagram-3LA2ROMG-j1xwrmp8.js} +1 -1
- package/app/web/assets/{sizeCapture-2Q2CQKSF-DCXFjl2x.js → sizeCapture-2Q2CQKSF-ZEXdxLeY.js} +1 -1
- package/app/web/assets/{stateDiagram-v2-ATKHQDJO-B349iAao.js → stateDiagram-v2-ATKHQDJO-2pt2L-Zd.js} +1 -1
- package/app/web/assets/{swimlanes-YQL5WMAO-6OvL1sEz.js → swimlanes-YQL5WMAO-BHpgfPPd.js} +1 -1
- package/app/web/assets/swimlanesDiagram-UCCPES4V-BrYKheZO.js +8 -0
- package/app/web/assets/{timeline-definition-7Z437IG3-Bh1E3mhW.js → timeline-definition-7Z437IG3-Cw4F_3FM.js} +1 -1
- package/app/web/assets/{usecaseDiagram-RDK6N6HP-Dr5A05lL.js → usecaseDiagram-RDK6N6HP-DefiMBIg.js} +1 -1
- package/app/web/assets/{vennDiagram-SHRQU5PJ-CQPPBa27.js → vennDiagram-SHRQU5PJ-D30EMFrI.js} +1 -1
- package/app/web/assets/{wardleyDiagram-F3OXNVQS-BHin00q8.js → wardleyDiagram-F3OXNVQS-4ok25PKp.js} +1 -1
- package/app/web/assets/{xychartDiagram-GDYJKCDI-D4BAWlQZ.js → xychartDiagram-GDYJKCDI-BB0uAQX5.js} +1 -1
- package/app/web/codexhost-settings.js +157 -87
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +63 -63
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +70 -70
- package/app/web/plugins/deepseek-ai__dsh-client-file-upload/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +75 -75
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +90 -78
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +98 -98
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +65 -65
- package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.pdf.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-right/client.js +62 -62
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +80 -80
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +70 -70
- package/app/web/plugins.json +1 -0
- package/app/web-modules/server.mjs +1862 -1096
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-screenshot.exe +0 -0
- package/libexec/codexhost-shell.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-CGI50Nfg.css +0 -1
- package/app/web/assets/index-Dr6wHi0A.js +0 -208
- package/app/web/assets/swimlanesDiagram-UCCPES4V-CIKaQUvP.js +0 -8
|
@@ -20248,26 +20248,51 @@ var jsonPrimitiveSchema = external_exports.union([
|
|
|
20248
20248
|
external_exports.boolean(),
|
|
20249
20249
|
external_exports.null()
|
|
20250
20250
|
]);
|
|
20251
|
-
function
|
|
20252
|
-
const
|
|
20253
|
-
|
|
20251
|
+
function isPlainObject2(value) {
|
|
20252
|
+
const prototype = Object.getPrototypeOf(value);
|
|
20253
|
+
return prototype === Object.prototype || prototype === null;
|
|
20254
|
+
}
|
|
20255
|
+
var JSON_VALIDATION_LEAVE = /* @__PURE__ */ Symbol("json-validation-leave");
|
|
20256
|
+
function isValidJsonValue(value) {
|
|
20257
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value)) {
|
|
20258
|
+
return true;
|
|
20259
|
+
}
|
|
20260
|
+
if (typeof value !== "object")
|
|
20261
|
+
return false;
|
|
20262
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
20263
|
+
const stack = [value];
|
|
20254
20264
|
try {
|
|
20255
20265
|
while (stack.length > 0) {
|
|
20256
|
-
const
|
|
20257
|
-
if (
|
|
20258
|
-
|
|
20259
|
-
if (frame.leaving) {
|
|
20260
|
-
ancestors.delete(frame.value);
|
|
20266
|
+
const current = stack.pop();
|
|
20267
|
+
if (current === JSON_VALIDATION_LEAVE) {
|
|
20268
|
+
ancestors.delete(stack.pop());
|
|
20261
20269
|
continue;
|
|
20262
20270
|
}
|
|
20263
|
-
if (typeof
|
|
20271
|
+
if (current === null || typeof current === "string" || typeof current === "boolean" || typeof current === "number" && Number.isFinite(current)) {
|
|
20272
|
+
continue;
|
|
20273
|
+
}
|
|
20274
|
+
if (typeof current !== "object")
|
|
20275
|
+
return false;
|
|
20276
|
+
if (ancestors.has(current))
|
|
20277
|
+
return false;
|
|
20278
|
+
if (Array.isArray(current)) {
|
|
20279
|
+
ancestors.add(current);
|
|
20280
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
20281
|
+
for (let index = current.length - 1; index >= 0; index -= 1) {
|
|
20282
|
+
stack.push(current[index]);
|
|
20283
|
+
}
|
|
20264
20284
|
continue;
|
|
20265
|
-
|
|
20285
|
+
}
|
|
20286
|
+
if (!isPlainObject2(current))
|
|
20266
20287
|
return false;
|
|
20267
|
-
ancestors.add(
|
|
20268
|
-
stack.push(
|
|
20269
|
-
for (const
|
|
20270
|
-
|
|
20288
|
+
ancestors.add(current);
|
|
20289
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
20290
|
+
for (const key in current) {
|
|
20291
|
+
if (Object.hasOwn(current, key)) {
|
|
20292
|
+
if (key === "__proto__")
|
|
20293
|
+
return false;
|
|
20294
|
+
stack.push(current[key]);
|
|
20295
|
+
}
|
|
20271
20296
|
}
|
|
20272
20297
|
}
|
|
20273
20298
|
} catch {
|
|
@@ -20275,17 +20300,11 @@ function hasNoCircularReferences(value) {
|
|
|
20275
20300
|
}
|
|
20276
20301
|
return true;
|
|
20277
20302
|
}
|
|
20278
|
-
var
|
|
20279
|
-
message: "JSON value
|
|
20280
|
-
});
|
|
20281
|
-
var
|
|
20282
|
-
|
|
20283
|
-
external_exports.array(recursiveJsonValueSchema),
|
|
20284
|
-
external_exports.record(external_exports.string(), recursiveJsonValueSchema)
|
|
20285
|
-
]));
|
|
20286
|
-
var jsonValueSchema = nonCircularSchema.pipe(recursiveJsonValueSchema);
|
|
20287
|
-
var jsonArraySchema = nonCircularSchema.pipe(external_exports.array(recursiveJsonValueSchema));
|
|
20288
|
-
var jsonObjectSchema = nonCircularSchema.pipe(external_exports.record(external_exports.string(), recursiveJsonValueSchema));
|
|
20303
|
+
var jsonValueSchema = external_exports.custom(isValidJsonValue, {
|
|
20304
|
+
message: "Invalid JSON value"
|
|
20305
|
+
});
|
|
20306
|
+
var jsonArraySchema = external_exports.custom((value) => Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON array" });
|
|
20307
|
+
var jsonObjectSchema = external_exports.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON object" });
|
|
20289
20308
|
|
|
20290
20309
|
// ../../shared-contracts/dist/errors.js
|
|
20291
20310
|
var codexhostErrorSchema = external_exports.strictObject({
|
|
@@ -21409,6 +21428,7 @@ var hostExtensionCatalogEntrySchema = external_exports.object({
|
|
|
21409
21428
|
backend: external_exports.int().positive().optional()
|
|
21410
21429
|
}),
|
|
21411
21430
|
downloadUrl: downloadUrl.refine((url2) => url2.startsWith("https://"), "Expected HTTPS"),
|
|
21431
|
+
downloads7d: external_exports.number().int().min(0).optional(),
|
|
21412
21432
|
featured: external_exports.boolean().optional(),
|
|
21413
21433
|
featuredOrder: external_exports.int().nonnegative().optional(),
|
|
21414
21434
|
changelog: external_exports.array(hostExtensionChangelogEntrySchema).max(20).optional()
|
|
@@ -21478,24 +21498,42 @@ var hostExtensionInstallationSchema = external_exports.strictObject({
|
|
|
21478
21498
|
var rasterDataUrlSchema = (maxBytes) => external_exports.string().max("data:image/jpeg;base64,".length + 4 * Math.ceil(maxBytes / 3)).regex(/^data:image\/(?:png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$/u);
|
|
21479
21499
|
var desktopConflict = { desktopConflictWith: hostExtensionIdSchema.optional() };
|
|
21480
21500
|
var backendState = external_exports.enum(["none", "inactive", "starting", "running", "failed"]);
|
|
21501
|
+
var HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH = 512;
|
|
21502
|
+
var hostExtensionOperationStatusSchema = external_exports.discriminatedUnion("state", [
|
|
21503
|
+
external_exports.object({
|
|
21504
|
+
state: external_exports.literal("updating"),
|
|
21505
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21506
|
+
startedAt: external_exports.iso.datetime()
|
|
21507
|
+
}),
|
|
21508
|
+
external_exports.object({
|
|
21509
|
+
state: external_exports.literal("failed"),
|
|
21510
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21511
|
+
startedAt: external_exports.iso.datetime(),
|
|
21512
|
+
updatedAt: external_exports.iso.datetime(),
|
|
21513
|
+
error: external_exports.string().min(1).max(HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH),
|
|
21514
|
+
interruptedByShutdown: external_exports.boolean().optional()
|
|
21515
|
+
})
|
|
21516
|
+
]);
|
|
21481
21517
|
var hostExtensionListItemSchema = external_exports.discriminatedUnion("state", [
|
|
21482
|
-
|
|
21518
|
+
external_exports.object({
|
|
21519
|
+
...hostExtensionInstallationSchema.shape,
|
|
21483
21520
|
state: external_exports.literal("valid"),
|
|
21484
21521
|
enabled: external_exports.boolean(),
|
|
21485
21522
|
...desktopConflict,
|
|
21486
21523
|
iconDataUrl: rasterDataUrlSchema(DESKTOP_EXTENSION_ICON_MAX_BYTES).optional(),
|
|
21487
21524
|
screenshotDataUrls: external_exports.array(rasterDataUrlSchema(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT).optional(),
|
|
21488
21525
|
backendState: backendState.optional(),
|
|
21489
|
-
backendError: external_exports.string().optional()
|
|
21526
|
+
backendError: external_exports.string().optional(),
|
|
21527
|
+
operation: hostExtensionOperationStatusSchema.optional()
|
|
21490
21528
|
}),
|
|
21491
|
-
external_exports.
|
|
21529
|
+
external_exports.object({
|
|
21492
21530
|
state: external_exports.enum(["invalid", "incompatible"]),
|
|
21493
21531
|
id: external_exports.string().min(1),
|
|
21494
21532
|
enabled: external_exports.boolean(),
|
|
21495
21533
|
error: external_exports.string()
|
|
21496
21534
|
})
|
|
21497
21535
|
]);
|
|
21498
|
-
var hostExtensionsListResultSchema = external_exports.
|
|
21536
|
+
var hostExtensionsListResultSchema = external_exports.object({
|
|
21499
21537
|
revision: hostExtensionRevisionSchema,
|
|
21500
21538
|
configuration: hostExtensionConfigurationSchema,
|
|
21501
21539
|
diagnostics: external_exports.array(external_exports.string()),
|
|
@@ -21534,7 +21572,10 @@ var methods = new Set(HOST_EXTENSION_MANAGEMENT_METHODS);
|
|
|
21534
21572
|
var noParams = external_exports.strictObject({});
|
|
21535
21573
|
var expectedRevision = { expectedRevision: hostExtensionRevisionSchema };
|
|
21536
21574
|
var selection = external_exports.strictObject({ ...id, ...expectedRevision });
|
|
21537
|
-
var installationResult =
|
|
21575
|
+
var installationResult = external_exports.object({
|
|
21576
|
+
...hostExtensionInstallationSchema.shape,
|
|
21577
|
+
replaced: external_exports.boolean()
|
|
21578
|
+
});
|
|
21538
21579
|
var mutationResult = external_exports.discriminatedUnion("state", [
|
|
21539
21580
|
external_exports.strictObject({ state: external_exports.literal("saved"), configuration: hostExtensionConfigurationSchema }),
|
|
21540
21581
|
external_exports.strictObject({ state: external_exports.literal("revision-conflict"), revision: hostExtensionRevisionSchema })
|
|
@@ -21563,7 +21604,12 @@ var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
|
21563
21604
|
values: jsonObjectSchema
|
|
21564
21605
|
});
|
|
21565
21606
|
var hostExtensionsRpcSchemas = {
|
|
21566
|
-
[HOST_EXTENSIONS_RPC.list]: {
|
|
21607
|
+
[HOST_EXTENSIONS_RPC.list]: {
|
|
21608
|
+
params: external_exports.object({
|
|
21609
|
+
includeOperations: external_exports.boolean().optional()
|
|
21610
|
+
}),
|
|
21611
|
+
result: hostExtensionsListResultSchema
|
|
21612
|
+
},
|
|
21567
21613
|
[HOST_EXTENSIONS_RPC.snapshot]: { params: noParams, result: hostExtensionsSnapshotResultSchema },
|
|
21568
21614
|
[HOST_EXTENSIONS_RPC.catalog]: {
|
|
21569
21615
|
params: external_exports.strictObject({
|
|
@@ -21589,6 +21635,7 @@ var hostExtensionsRpcSchemas = {
|
|
|
21589
21635
|
...id,
|
|
21590
21636
|
expectedDigest: active.digest,
|
|
21591
21637
|
expectedActivationId: active.activationId.optional(),
|
|
21638
|
+
expectedVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21592
21639
|
source: hostExtensionInstallSourceSchema.optional()
|
|
21593
21640
|
}),
|
|
21594
21641
|
result: installationResult
|
|
@@ -21638,9 +21685,39 @@ var hostExtensionsRpcSchemas = {
|
|
|
21638
21685
|
};
|
|
21639
21686
|
|
|
21640
21687
|
// ../../shared-contracts/dist/group-chat.js
|
|
21641
|
-
var
|
|
21642
|
-
var
|
|
21688
|
+
var GROUP_MEMORY_MAX_BYTES = 4096;
|
|
21689
|
+
var DEFAULT_GROUP_MAX_AGENT_HOPS = 10;
|
|
21690
|
+
var MAX_GROUP_AGENT_HOPS = 200;
|
|
21643
21691
|
var GROUP_NOTICE_MAX_LENGTH = 2e3;
|
|
21692
|
+
var cachedUtf8Encoder;
|
|
21693
|
+
function groupUtf8ByteLength(text3) {
|
|
21694
|
+
if (cachedUtf8Encoder === void 0) {
|
|
21695
|
+
cachedUtf8Encoder = typeof TextEncoder === "function" ? new TextEncoder() : null;
|
|
21696
|
+
}
|
|
21697
|
+
if (cachedUtf8Encoder !== null) {
|
|
21698
|
+
return cachedUtf8Encoder.encode(text3).length;
|
|
21699
|
+
}
|
|
21700
|
+
let bytes = 0;
|
|
21701
|
+
for (let i = 0; i < text3.length; i += 1) {
|
|
21702
|
+
const code = text3.charCodeAt(i);
|
|
21703
|
+
if (code <= 127) {
|
|
21704
|
+
bytes += 1;
|
|
21705
|
+
} else if (code <= 2047) {
|
|
21706
|
+
bytes += 2;
|
|
21707
|
+
} else if (code >= 55296 && code <= 56319 && i + 1 < text3.length) {
|
|
21708
|
+
const next = text3.charCodeAt(i + 1);
|
|
21709
|
+
if (next >= 56320 && next <= 57343) {
|
|
21710
|
+
bytes += 4;
|
|
21711
|
+
i += 1;
|
|
21712
|
+
} else {
|
|
21713
|
+
bytes += 3;
|
|
21714
|
+
}
|
|
21715
|
+
} else {
|
|
21716
|
+
bytes += 3;
|
|
21717
|
+
}
|
|
21718
|
+
}
|
|
21719
|
+
return bytes;
|
|
21720
|
+
}
|
|
21644
21721
|
var remoteGroupRoomIdSchema = external_exports.string().regex(/^remote:[A-Za-z0-9_-]{8,512}$/u);
|
|
21645
21722
|
var groupRoomIdSchema = external_exports.union([external_exports.uuidv4(), remoteGroupRoomIdSchema]);
|
|
21646
21723
|
var groupMemberIdSchema = external_exports.uuidv4();
|
|
@@ -21649,7 +21726,7 @@ var groupUnmentionedPolicySchema = external_exports.enum(["none", "last_speaker"
|
|
|
21649
21726
|
var groupMemberStatusSchema = external_exports.enum(["active", "muted", "removed"]);
|
|
21650
21727
|
var nonnegativeInteger = external_exports.int().nonnegative();
|
|
21651
21728
|
var positiveInteger = external_exports.int().positive();
|
|
21652
|
-
var maxAgentHopsSchema =
|
|
21729
|
+
var maxAgentHopsSchema = nonnegativeInteger.max(MAX_GROUP_AGENT_HOPS);
|
|
21653
21730
|
var nonblankString = external_exports.string().refine((value) => value.trim().length > 0);
|
|
21654
21731
|
var timestamp = external_exports.iso.datetime();
|
|
21655
21732
|
var optionalMemberEdits = {
|
|
@@ -21668,9 +21745,11 @@ var groupMemberSchema = external_exports.object({
|
|
|
21668
21745
|
harnessId: harnessIdSchema,
|
|
21669
21746
|
status: groupMemberStatusSchema,
|
|
21670
21747
|
projectless: external_exports.boolean().optional(),
|
|
21748
|
+
showInSidebar: external_exports.boolean().optional(),
|
|
21671
21749
|
joinedAtSeq: nonnegativeInteger,
|
|
21672
21750
|
lastDeliveredSeq: nonnegativeInteger,
|
|
21673
21751
|
lastRosterVersion: nonnegativeInteger,
|
|
21752
|
+
lastMemoryVersion: nonnegativeInteger.default(0),
|
|
21674
21753
|
createdAt: timestamp
|
|
21675
21754
|
});
|
|
21676
21755
|
var groupProjectlessWorkspaceSchema = external_exports.object({
|
|
@@ -21682,19 +21761,25 @@ var groupRoomRemoteHostSchema = external_exports.object({
|
|
|
21682
21761
|
displayName: nonblankString,
|
|
21683
21762
|
state: nonblankString.optional(),
|
|
21684
21763
|
color: external_exports.string().optional(),
|
|
21685
|
-
filePreview: external_exports.boolean().optional()
|
|
21764
|
+
filePreview: external_exports.boolean().optional(),
|
|
21765
|
+
memberSidebarVisibility: external_exports.boolean().optional(),
|
|
21766
|
+
sharedMemory: external_exports.boolean().optional()
|
|
21686
21767
|
});
|
|
21687
|
-
var
|
|
21768
|
+
var groupRoomObjectSchema = external_exports.object({
|
|
21688
21769
|
roomId: groupRoomIdSchema,
|
|
21689
21770
|
title: nonblankString,
|
|
21690
21771
|
defaultCwd: nonblankString,
|
|
21691
21772
|
projectlessWorkspace: groupProjectlessWorkspaceSchema.optional(),
|
|
21692
21773
|
unmentionedPolicy: groupUnmentionedPolicySchema.default("none"),
|
|
21774
|
+
unmentionedMemberId: groupMemberIdSchema.optional(),
|
|
21693
21775
|
allowAgentMentions: external_exports.boolean().default(true),
|
|
21694
21776
|
maxAgentHops: maxAgentHopsSchema.default(DEFAULT_GROUP_MAX_AGENT_HOPS),
|
|
21777
|
+
relayHopLimit: maxAgentHopsSchema.optional(),
|
|
21695
21778
|
lastSeq: nonnegativeInteger,
|
|
21696
21779
|
lastSpeakerMemberId: groupMemberIdSchema.optional(),
|
|
21697
21780
|
rosterVersion: nonnegativeInteger,
|
|
21781
|
+
memoryVersion: nonnegativeInteger.default(0),
|
|
21782
|
+
memorySha256: external_exports.string().regex(/^[0-9a-f]{64}$/u).optional(),
|
|
21698
21783
|
humanEpoch: nonnegativeInteger,
|
|
21699
21784
|
relayPaused: external_exports.boolean(),
|
|
21700
21785
|
pinned: external_exports.boolean(),
|
|
@@ -21702,7 +21787,14 @@ var groupRoomSchema = external_exports.object({
|
|
|
21702
21787
|
updatedAt: timestamp,
|
|
21703
21788
|
members: external_exports.array(groupMemberSchema),
|
|
21704
21789
|
remote: groupRoomRemoteHostSchema.optional()
|
|
21705
|
-
}).superRefine(({ members: members2 }, context) => {
|
|
21790
|
+
}).superRefine(({ members: members2, unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21791
|
+
if (unmentionedMemberId !== void 0 && unmentionedPolicy !== "none") {
|
|
21792
|
+
context.addIssue({
|
|
21793
|
+
code: "custom",
|
|
21794
|
+
path: ["unmentionedMemberId"],
|
|
21795
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21796
|
+
});
|
|
21797
|
+
}
|
|
21706
21798
|
const handles = /* @__PURE__ */ new Set();
|
|
21707
21799
|
for (const [index, { handle, status }] of members2.entries()) {
|
|
21708
21800
|
if (status === "removed")
|
|
@@ -21717,6 +21809,15 @@ var groupRoomSchema = external_exports.object({
|
|
|
21717
21809
|
handles.add(handle);
|
|
21718
21810
|
}
|
|
21719
21811
|
});
|
|
21812
|
+
var groupRoomSchema = external_exports.preprocess((value) => {
|
|
21813
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
21814
|
+
const record5 = value;
|
|
21815
|
+
if (record5.unmentionedPolicy === "member" && record5.unmentionedMemberId !== void 0) {
|
|
21816
|
+
return { ...record5, unmentionedPolicy: "none" };
|
|
21817
|
+
}
|
|
21818
|
+
}
|
|
21819
|
+
return value;
|
|
21820
|
+
}, groupRoomObjectSchema);
|
|
21720
21821
|
var groupAttachmentSchema = external_exports.object({
|
|
21721
21822
|
kind: external_exports.enum(["image", "file"]),
|
|
21722
21823
|
attachmentId: nonblankString.max(256),
|
|
@@ -21743,6 +21844,7 @@ var groupMessageSchema = external_exports.object({
|
|
|
21743
21844
|
mentionedMemberIds: external_exports.array(groupMemberIdSchema),
|
|
21744
21845
|
mentionAll: external_exports.boolean().optional(),
|
|
21745
21846
|
hopCount: nonnegativeInteger,
|
|
21847
|
+
durationMs: nonnegativeInteger.optional(),
|
|
21746
21848
|
createdAt: timestamp
|
|
21747
21849
|
});
|
|
21748
21850
|
var newThreadOptions = {
|
|
@@ -21772,6 +21874,8 @@ var GROUPS_REMOVE_MEMBER_METHOD = "codexhost/groups/member/remove";
|
|
|
21772
21874
|
var GROUPS_REBIND_MEMBER_METHOD = "codexhost/groups/member/rebind";
|
|
21773
21875
|
var GROUPS_POST_MESSAGE_METHOD = "codexhost/groups/message/post";
|
|
21774
21876
|
var GROUPS_READ_MESSAGES_METHOD = "codexhost/groups/messages/read";
|
|
21877
|
+
var GROUPS_READ_MEMORY_METHOD = "codexhost/groups/memory/read";
|
|
21878
|
+
var GROUPS_UPDATE_MEMORY_METHOD = "codexhost/groups/memory/update";
|
|
21775
21879
|
var GROUPS_INSPECT_CWD_METHOD = "codexhost/groups/cwd/inspect";
|
|
21776
21880
|
var roomIdentity = { roomId: groupRoomIdSchema };
|
|
21777
21881
|
var memberIdentity = { ...roomIdentity, memberId: groupMemberIdSchema };
|
|
@@ -21802,8 +21906,17 @@ var groupsCreateResultSchema = external_exports.object({ room: groupRoomSchema }
|
|
|
21802
21906
|
var groupsUpdateParamsSchema = external_exports.strictObject({
|
|
21803
21907
|
...roomIdentity,
|
|
21804
21908
|
...roomEdits,
|
|
21909
|
+
unmentionedMemberId: groupMemberIdSchema.nullable().optional(),
|
|
21805
21910
|
pinned: external_exports.boolean().optional(),
|
|
21806
21911
|
relayPaused: external_exports.boolean().optional()
|
|
21912
|
+
}).superRefine(({ unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21913
|
+
if (unmentionedMemberId !== void 0 && unmentionedMemberId !== null && unmentionedPolicy !== void 0 && unmentionedPolicy !== "none") {
|
|
21914
|
+
context.addIssue({
|
|
21915
|
+
code: "custom",
|
|
21916
|
+
path: ["unmentionedMemberId"],
|
|
21917
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21918
|
+
});
|
|
21919
|
+
}
|
|
21807
21920
|
});
|
|
21808
21921
|
var groupsDeleteParamsSchema = external_exports.strictObject(roomIdentity);
|
|
21809
21922
|
var groupsDeleteResultSchema = external_exports.object({ deleted: external_exports.boolean() });
|
|
@@ -21818,7 +21931,8 @@ var groupsAddMemberResultSchema = external_exports.object({
|
|
|
21818
21931
|
var groupsUpdateMemberParamsSchema = external_exports.strictObject({
|
|
21819
21932
|
...memberIdentity,
|
|
21820
21933
|
...optionalMemberEdits,
|
|
21821
|
-
status: groupMemberStatusSchema.optional()
|
|
21934
|
+
status: groupMemberStatusSchema.optional(),
|
|
21935
|
+
showInSidebar: external_exports.boolean().optional()
|
|
21822
21936
|
});
|
|
21823
21937
|
var groupsRemoveMemberParamsSchema = external_exports.strictObject(memberIdentity);
|
|
21824
21938
|
var groupsRebindMemberParamsSchema = external_exports.strictObject({
|
|
@@ -21921,6 +22035,24 @@ var groupsReadMessagesResultSchema = external_exports.object({
|
|
|
21921
22035
|
messages: external_exports.array(groupMessageSchema),
|
|
21922
22036
|
totalSeq: nonnegativeInteger
|
|
21923
22037
|
});
|
|
22038
|
+
var groupsReadMemoryParamsSchema = external_exports.strictObject(roomIdentity);
|
|
22039
|
+
var groupsReadMemoryResultSchema = external_exports.object({
|
|
22040
|
+
...roomIdentity,
|
|
22041
|
+
memoryVersion: nonnegativeInteger,
|
|
22042
|
+
content: external_exports.string(),
|
|
22043
|
+
updatedAt: timestamp
|
|
22044
|
+
});
|
|
22045
|
+
var groupsUpdateMemoryParamsSchema = external_exports.strictObject({
|
|
22046
|
+
...roomIdentity,
|
|
22047
|
+
content: external_exports.string().refine((value) => groupUtf8ByteLength(value) <= GROUP_MEMORY_MAX_BYTES, `Shared room memory must be at most ${GROUP_MEMORY_MAX_BYTES} UTF-8 bytes`),
|
|
22048
|
+
expectedVersion: nonnegativeInteger.optional()
|
|
22049
|
+
});
|
|
22050
|
+
var groupsUpdateMemoryResultSchema = external_exports.object({
|
|
22051
|
+
room: groupRoomSchema,
|
|
22052
|
+
memoryVersion: nonnegativeInteger,
|
|
22053
|
+
content: external_exports.string(),
|
|
22054
|
+
updatedAt: timestamp
|
|
22055
|
+
});
|
|
21924
22056
|
var groupsInspectCwdParamsSchema = external_exports.strictObject({
|
|
21925
22057
|
cwd: nonblankString,
|
|
21926
22058
|
roomId: groupRoomIdSchema.optional()
|
|
@@ -22056,6 +22188,149 @@ var nativeCodexGoalResultSchema = external_exports.object({
|
|
|
22056
22188
|
}).nullable()
|
|
22057
22189
|
});
|
|
22058
22190
|
|
|
22191
|
+
// ../../shared-contracts/dist/voice.js
|
|
22192
|
+
var VOICE_AUDIO_MAX_BYTES = 10 * 1024 * 1024;
|
|
22193
|
+
var VOICE_CONFIG_GET_METHOD = "codexhost/voice/config/get";
|
|
22194
|
+
var VOICE_CONFIG_SET_METHOD = "codexhost/voice/config/set";
|
|
22195
|
+
var voiceProviderModeSchema = external_exports.enum([
|
|
22196
|
+
"codex",
|
|
22197
|
+
"openai-compatible",
|
|
22198
|
+
"deepseek-asr",
|
|
22199
|
+
"openai-chat-audio"
|
|
22200
|
+
]);
|
|
22201
|
+
var voiceAudioFormatSchema = external_exports.enum(["native", "wav"]);
|
|
22202
|
+
var SENSITIVE_VOICE_QUERY_PARAM = /(?:^|[_-])(?:key|token|secret|password|passwd|pwd|auth|authorization|credential|signature|sig)(?:$|[_-])|(?:api|access|auth|client|app|private|bearer)[_-]?(?:key|token|secret)/i;
|
|
22203
|
+
function isLoopbackVoiceHost(hostname3) {
|
|
22204
|
+
const bare = hostname3.trim().toLowerCase().replace(/^\[|\]$/g, "");
|
|
22205
|
+
if (bare === "localhost" || bare.endsWith(".localhost") || bare === "::1")
|
|
22206
|
+
return true;
|
|
22207
|
+
return /^127(?:\.(?:25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(bare);
|
|
22208
|
+
}
|
|
22209
|
+
function isValidVoiceBaseUrl(value) {
|
|
22210
|
+
const trimmed = value.trim();
|
|
22211
|
+
if (!trimmed)
|
|
22212
|
+
return false;
|
|
22213
|
+
try {
|
|
22214
|
+
const parsed = new URL(trimmed);
|
|
22215
|
+
if (!parsed.hostname)
|
|
22216
|
+
return false;
|
|
22217
|
+
if (parsed.username !== "" || parsed.password !== "" || parsed.hash !== "")
|
|
22218
|
+
return false;
|
|
22219
|
+
if (parsed.protocol === "https:") {
|
|
22220
|
+
} else if (parsed.protocol === "http:") {
|
|
22221
|
+
if (!isLoopbackVoiceHost(parsed.hostname))
|
|
22222
|
+
return false;
|
|
22223
|
+
} else {
|
|
22224
|
+
return false;
|
|
22225
|
+
}
|
|
22226
|
+
for (const key of parsed.searchParams.keys()) {
|
|
22227
|
+
if (SENSITIVE_VOICE_QUERY_PARAM.test(key))
|
|
22228
|
+
return false;
|
|
22229
|
+
}
|
|
22230
|
+
return true;
|
|
22231
|
+
} catch {
|
|
22232
|
+
return false;
|
|
22233
|
+
}
|
|
22234
|
+
}
|
|
22235
|
+
var voiceBaseUrlSchema = external_exports.string().max(2048).refine((value) => value === "" || isValidVoiceBaseUrl(value), {
|
|
22236
|
+
message: "Base URL must be empty or a valid https:// URL (http:// is allowed only for localhost/127.0.0.1/[::1]) without embedded credentials"
|
|
22237
|
+
});
|
|
22238
|
+
var voiceProviderConfigSnapshotSchema = external_exports.object({
|
|
22239
|
+
baseUrl: voiceBaseUrlSchema,
|
|
22240
|
+
model: external_exports.string().max(256),
|
|
22241
|
+
hasApiKey: external_exports.boolean(),
|
|
22242
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
22243
|
+
apiKey: external_exports.never().optional()
|
|
22244
|
+
});
|
|
22245
|
+
var voiceConfigSnapshotSchema = external_exports.object({
|
|
22246
|
+
mode: voiceProviderModeSchema,
|
|
22247
|
+
baseUrl: voiceBaseUrlSchema,
|
|
22248
|
+
model: external_exports.string().max(256),
|
|
22249
|
+
hasApiKey: external_exports.boolean(),
|
|
22250
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
22251
|
+
apiKey: external_exports.never().optional(),
|
|
22252
|
+
audioFormat: voiceAudioFormatSchema.optional(),
|
|
22253
|
+
providers: external_exports.object({
|
|
22254
|
+
"openai-compatible": voiceProviderConfigSnapshotSchema,
|
|
22255
|
+
"deepseek-asr": voiceProviderConfigSnapshotSchema,
|
|
22256
|
+
"openai-chat-audio": voiceProviderConfigSnapshotSchema
|
|
22257
|
+
}).optional(),
|
|
22258
|
+
codexAvailable: external_exports.boolean(),
|
|
22259
|
+
available: external_exports.boolean()
|
|
22260
|
+
});
|
|
22261
|
+
var voiceConfigUpdateParamsSchema = external_exports.object({
|
|
22262
|
+
mode: voiceProviderModeSchema,
|
|
22263
|
+
baseUrl: external_exports.string().max(2048).optional(),
|
|
22264
|
+
model: external_exports.string().max(256).optional(),
|
|
22265
|
+
apiKey: external_exports.string().max(4096).nullable().optional()
|
|
22266
|
+
}).strict().superRefine((value, ctx) => {
|
|
22267
|
+
const trimmedBaseUrl = value.baseUrl?.trim() ?? "";
|
|
22268
|
+
const trimmedModel = value.model?.trim() ?? "";
|
|
22269
|
+
if (value.mode === "openai-compatible") {
|
|
22270
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
22271
|
+
ctx.addIssue({
|
|
22272
|
+
code: external_exports.ZodIssueCode.custom,
|
|
22273
|
+
path: ["baseUrl"],
|
|
22274
|
+
message: "OpenAI-compatible mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
22275
|
+
});
|
|
22276
|
+
}
|
|
22277
|
+
return;
|
|
22278
|
+
}
|
|
22279
|
+
if (value.mode === "openai-chat-audio") {
|
|
22280
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
22281
|
+
ctx.addIssue({
|
|
22282
|
+
code: external_exports.ZodIssueCode.custom,
|
|
22283
|
+
path: ["baseUrl"],
|
|
22284
|
+
message: "Multimodal Chat Audio mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
22285
|
+
});
|
|
22286
|
+
}
|
|
22287
|
+
if (!trimmedModel) {
|
|
22288
|
+
ctx.addIssue({
|
|
22289
|
+
code: external_exports.ZodIssueCode.custom,
|
|
22290
|
+
path: ["model"],
|
|
22291
|
+
message: "Multimodal Chat Audio mode requires a model name"
|
|
22292
|
+
});
|
|
22293
|
+
}
|
|
22294
|
+
return;
|
|
22295
|
+
}
|
|
22296
|
+
if (trimmedBaseUrl !== "" && !isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
22297
|
+
ctx.addIssue({
|
|
22298
|
+
code: external_exports.ZodIssueCode.custom,
|
|
22299
|
+
path: ["baseUrl"],
|
|
22300
|
+
message: "Base URL must be empty or a valid https:// URL (http:// is allowed only for loopback hosts)"
|
|
22301
|
+
});
|
|
22302
|
+
}
|
|
22303
|
+
});
|
|
22304
|
+
var voiceAudioMimeTypeSchema = external_exports.string().regex(/^audio\/[a-z0-9.+-]+(?:\s*;[^\r\n]*)?$/i);
|
|
22305
|
+
var voiceStatusResultSchema = external_exports.object({
|
|
22306
|
+
available: external_exports.boolean(),
|
|
22307
|
+
audioFormat: voiceAudioFormatSchema.optional()
|
|
22308
|
+
});
|
|
22309
|
+
var voiceTranscribeParamsSchema = external_exports.object({ path: external_exports.string().min(1), mimeType: voiceAudioMimeTypeSchema }).strict();
|
|
22310
|
+
var voiceErrorCodeSchema = external_exports.enum([
|
|
22311
|
+
"credentials-unavailable",
|
|
22312
|
+
"login-expired",
|
|
22313
|
+
"rate-limited",
|
|
22314
|
+
"service-rejected",
|
|
22315
|
+
"host-incompatible",
|
|
22316
|
+
"network",
|
|
22317
|
+
"timeout",
|
|
22318
|
+
"audio-empty",
|
|
22319
|
+
"audio-too-large",
|
|
22320
|
+
"audio-format",
|
|
22321
|
+
"audio-invalid"
|
|
22322
|
+
]);
|
|
22323
|
+
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
22324
|
+
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
22325
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
22326
|
+
]);
|
|
22327
|
+
|
|
22328
|
+
// ../../shared-contracts/dist/github-star.js
|
|
22329
|
+
var GITHUB_STAR_STATUS_METHOD = "codexhost/githubStar/status";
|
|
22330
|
+
var GITHUB_STAR_ADD_METHOD = "codexhost/githubStar/star";
|
|
22331
|
+
var githubStarParamsSchema = external_exports.object({}).strict();
|
|
22332
|
+
var githubStarStateSchema = external_exports.object({ ghAvailable: external_exports.boolean(), starred: external_exports.boolean() });
|
|
22333
|
+
|
|
22059
22334
|
// ../../shared-contracts/dist/client-channel.js
|
|
22060
22335
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
22061
22336
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -22117,9 +22392,13 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
22117
22392
|
GROUPS_REBIND_MEMBER_METHOD,
|
|
22118
22393
|
GROUPS_POST_MESSAGE_METHOD,
|
|
22119
22394
|
GROUPS_READ_MESSAGES_METHOD,
|
|
22395
|
+
GROUPS_READ_MEMORY_METHOD,
|
|
22396
|
+
GROUPS_UPDATE_MEMORY_METHOD,
|
|
22120
22397
|
GROUPS_INSPECT_CWD_METHOD,
|
|
22121
22398
|
"codexhost/voice/status",
|
|
22122
22399
|
"codexhost/voice/transcribe",
|
|
22400
|
+
VOICE_CONFIG_GET_METHOD,
|
|
22401
|
+
VOICE_CONFIG_SET_METHOD,
|
|
22123
22402
|
"codexhost/harness/display-settings/get",
|
|
22124
22403
|
"codexhost/harness/display-settings/set",
|
|
22125
22404
|
"codexhost/harness/display-settings/capabilities",
|
|
@@ -22185,6 +22464,8 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
22185
22464
|
"codexhost/harness/session-import/list",
|
|
22186
22465
|
"codexhost/harness/session-import/import",
|
|
22187
22466
|
// Host settings shared across Desktop and Web.
|
|
22467
|
+
GITHUB_STAR_STATUS_METHOD,
|
|
22468
|
+
GITHUB_STAR_ADD_METHOD,
|
|
22188
22469
|
...HOST_EXTENSION_MANAGEMENT_METHODS,
|
|
22189
22470
|
"codexhost/harness/installation",
|
|
22190
22471
|
"codexhost/harness/installation/start",
|
|
@@ -22524,28 +22805,16 @@ var extensionActivitySchema = external_exports.strictObject({
|
|
|
22524
22805
|
})).max(256)
|
|
22525
22806
|
});
|
|
22526
22807
|
|
|
22527
|
-
// ../../shared-contracts/dist/
|
|
22528
|
-
var
|
|
22529
|
-
var
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
"
|
|
22534
|
-
"
|
|
22535
|
-
"
|
|
22536
|
-
|
|
22537
|
-
"host-incompatible",
|
|
22538
|
-
"network",
|
|
22539
|
-
"timeout",
|
|
22540
|
-
"audio-empty",
|
|
22541
|
-
"audio-too-large",
|
|
22542
|
-
"audio-format",
|
|
22543
|
-
"audio-invalid"
|
|
22544
|
-
]);
|
|
22545
|
-
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
22546
|
-
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
22547
|
-
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
22548
|
-
]);
|
|
22808
|
+
// ../../shared-contracts/dist/host-extension-ranking.js
|
|
22809
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
22810
|
+
var CATEGORY_SEARCH_LABELS = Object.freeze({
|
|
22811
|
+
appearance: ["appearance", "外观主题"],
|
|
22812
|
+
interface: ["interface", "界面增强"],
|
|
22813
|
+
workflow: ["workflow", "效率与协作"],
|
|
22814
|
+
analytics: ["analytics", "数据与统计"],
|
|
22815
|
+
integrations: ["integrations", "外部集成"],
|
|
22816
|
+
tools: ["tools", "实用工具"]
|
|
22817
|
+
});
|
|
22549
22818
|
|
|
22550
22819
|
// ../../shared-contracts/dist/skills.js
|
|
22551
22820
|
var skillsListParamsSchema = external_exports.object({
|
|
@@ -22854,7 +23123,13 @@ var remotePeerCapabilitiesSchema = external_exports.object({
|
|
|
22854
23123
|
/** /api/peer/v1/delegation is available for fixed-whitelist cross-host delegation. */
|
|
22855
23124
|
delegation: external_exports.literal(1).optional(),
|
|
22856
23125
|
/** POST /api/peer/v1/peers is available. */
|
|
22857
|
-
peerPairing: external_exports.literal(1).optional()
|
|
23126
|
+
peerPairing: external_exports.literal(1).optional(),
|
|
23127
|
+
/** Host supports includeOperations on extensions/list and expectedVersion on extensions/update. */
|
|
23128
|
+
extensionUpdateTracking: external_exports.literal(1).optional(),
|
|
23129
|
+
/** Peer supports per-member `showInSidebar` in `codexhost/groups/member/update`. */
|
|
23130
|
+
groupMemberSidebarVisibility: external_exports.literal(1).optional(),
|
|
23131
|
+
/** Peer supports `codexhost/groups/memory/read` and `codexhost/groups/memory/update`. */
|
|
23132
|
+
groupSharedMemory: external_exports.literal(1).optional()
|
|
22858
23133
|
});
|
|
22859
23134
|
var remotePeerManifestSchema = external_exports.object({
|
|
22860
23135
|
version: external_exports.string().max(128),
|
|
@@ -25267,16 +25542,37 @@ function modelRef(modelId2) {
|
|
|
25267
25542
|
function normalizeStoredCodeBuddyModelRef(ref, catalog) {
|
|
25268
25543
|
return normalizeLegacyBase64ModelRef(ref, catalog, "cb.");
|
|
25269
25544
|
}
|
|
25270
|
-
function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
25545
|
+
function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE, nativeModels = []) {
|
|
25271
25546
|
const options = rows(value);
|
|
25272
25547
|
const get = (id2) => options.find((option) => option.id === id2) ?? {};
|
|
25273
25548
|
const model2 = get("model"), mode = get("mode"), thought = get("thought_level");
|
|
25274
|
-
const
|
|
25275
|
-
const
|
|
25276
|
-
const
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25549
|
+
const nativeThinkingOptions = rows(thought.options).map((option) => harnessThinkingOptionSchema.parse({ id: option.value, label: option.name }));
|
|
25550
|
+
const metadata = new Map(rows(nativeModels).map((row) => [row.modelId, record3(row._meta)]));
|
|
25551
|
+
const thinkingById = new Map(nativeThinkingOptions.map((option) => [option.id, option]));
|
|
25552
|
+
const models = rows(model2.options).map((option) => {
|
|
25553
|
+
const details = metadata.get(option.value);
|
|
25554
|
+
const label = text2(option.name);
|
|
25555
|
+
const rate = profile.modelRates ? /^x(\d+(?:\.\d+)?)(?:\s+credits)?$/iu.exec((text2(details?.credits) || text2(option.description)).trim()) : null;
|
|
25556
|
+
const annotatedLabel = rate ? `${label} · ${Number(rate[1]) === 0 ? "Free" : `${rate[1]}x`}` : label;
|
|
25557
|
+
let supportedThinkingOptionIds;
|
|
25558
|
+
if (details && (Array.isArray(details.effortOptions) || details.supportsReasoning === false)) {
|
|
25559
|
+
const efforts = details.supportsReasoning === false ? [] : rows(details.effortOptions);
|
|
25560
|
+
const supported = efforts.map((effort) => harnessThinkingOptionSchema.parse({ id: effort.value, label: effort.name }));
|
|
25561
|
+
const defaultOption = nativeThinkingOptions.find((entry) => entry.id === profile.defaultThinkingOptionId);
|
|
25562
|
+
if (defaultOption && details.supportsReasoning !== false) {
|
|
25563
|
+
supported.push(defaultOption);
|
|
25564
|
+
}
|
|
25565
|
+
for (const entry of supported) {
|
|
25566
|
+
thinkingById.set(entry.id, entry);
|
|
25567
|
+
}
|
|
25568
|
+
supportedThinkingOptionIds = [...new Set(supported.map((entry) => entry.id))];
|
|
25569
|
+
}
|
|
25570
|
+
return {
|
|
25571
|
+
ref: modelRef(text2(option.value)),
|
|
25572
|
+
label: annotatedLabel.length <= HARNESS_MODEL_LABEL_MAX_LENGTH ? annotatedLabel : label,
|
|
25573
|
+
...supportedThinkingOptionIds ? { supportedThinkingOptionIds } : {}
|
|
25574
|
+
};
|
|
25575
|
+
});
|
|
25280
25576
|
const currentModelRef = modelRef(text2(model2.currentValue));
|
|
25281
25577
|
let currentModel = models.find((item) => item.ref.id === currentModelRef.id);
|
|
25282
25578
|
if (!currentModel && !profile.allowUnlistedModelSelection && !currentModelRef.id.startsWith(CUSTOM_LOCAL_MODEL_PREFIX)) {
|
|
@@ -25286,17 +25582,23 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
25286
25582
|
currentModel = { ref: currentModelRef, label: text2(model2.currentValue) };
|
|
25287
25583
|
models.push(currentModel);
|
|
25288
25584
|
}
|
|
25289
|
-
if (!currentModel)
|
|
25585
|
+
if (!currentModel) {
|
|
25290
25586
|
throw new CodeBuddyError("protocolError", "ACP did not report a valid current Model");
|
|
25587
|
+
}
|
|
25588
|
+
const availableThinkingOptions = currentModel.supportedThinkingOptionIds ? currentModel.supportedThinkingOptionIds.map((id2) => thinkingById.get(id2)) : nativeThinkingOptions;
|
|
25589
|
+
const currentThinking = availableThinkingOptions.find((option) => option.id === thought.currentValue);
|
|
25590
|
+
const defaultThinking = profile.defaultThinkingOptionId ? [...thinkingById.values()].find((option) => option.id === profile.defaultThinkingOptionId) : currentThinking;
|
|
25591
|
+
const thinkingOptions = [...thinkingById.values()];
|
|
25592
|
+
const completeModelThinking = models.every((item) => item.supportedThinkingOptionIds !== void 0);
|
|
25291
25593
|
const catalog = harnessModelCatalogSchema.parse({
|
|
25292
25594
|
models: models.map((item) => ({
|
|
25293
25595
|
...item,
|
|
25294
|
-
...item === currentModel ? { supportedThinkingOptionIds:
|
|
25596
|
+
...item === currentModel && item.supportedThinkingOptionIds === void 0 ? { supportedThinkingOptionIds: availableThinkingOptions.map((option) => option.id) } : {}
|
|
25295
25597
|
})),
|
|
25296
25598
|
defaultModel: currentModel.ref,
|
|
25297
25599
|
thinkingOptions,
|
|
25298
|
-
thinkingOptionsScope: "activeModel",
|
|
25299
|
-
...
|
|
25600
|
+
thinkingOptionsScope: completeModelThinking ? "catalog" : "activeModel",
|
|
25601
|
+
...defaultThinking ? { defaultThinkingOptionId: defaultThinking.id } : {}
|
|
25300
25602
|
});
|
|
25301
25603
|
const permissionModes = harnessPermissionModeCatalogSchema.parse({
|
|
25302
25604
|
modes: rows(mode.options).map((option) => ({
|
|
@@ -25312,10 +25614,10 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
25312
25614
|
effectiveModel: currentModel.ref,
|
|
25313
25615
|
resolvedModelLabel: currentModel.label,
|
|
25314
25616
|
effectivePermissionModeId: harnessPermissionModeIdSchema.parse(mode.currentValue),
|
|
25315
|
-
availableThinkingOptions
|
|
25617
|
+
availableThinkingOptions,
|
|
25316
25618
|
...currentThinking ? { effectiveThinkingOptionId: currentThinking.id } : {}
|
|
25317
25619
|
};
|
|
25318
|
-
return { catalog, permissionModes, state, options };
|
|
25620
|
+
return { catalog, permissionModes, state, options, nativeModels };
|
|
25319
25621
|
}
|
|
25320
25622
|
function effectiveOptionValue(config2, id2) {
|
|
25321
25623
|
if (id2 === "model")
|
|
@@ -25324,10 +25626,11 @@ function effectiveOptionValue(config2, id2) {
|
|
|
25324
25626
|
}
|
|
25325
25627
|
async function selectConfiguration(config2, id2, value, profile, request) {
|
|
25326
25628
|
const option = config2?.options.find((option2) => option2.id === id2);
|
|
25327
|
-
const listed = rows(option?.options).some((option2) => option2.value === value);
|
|
25328
|
-
if (!listed && !(id2 === "model" && profile.allowUnlistedModelSelection))
|
|
25629
|
+
const listed = id2 === "thought_level" ? config2?.state.availableThinkingOptions?.some((option2) => option2.id === value) : rows(option?.options).some((option2) => option2.value === value);
|
|
25630
|
+
if (!listed && !(id2 === "model" && profile.allowUnlistedModelSelection)) {
|
|
25329
25631
|
throw new CodeBuddyError("invalidRequest", `Unavailable ${profile.displayName} ${id2} selection`);
|
|
25330
|
-
|
|
25632
|
+
}
|
|
25633
|
+
return confirmedConfiguration(await request(id2, value), id2, value, profile, config2?.nativeModels);
|
|
25331
25634
|
}
|
|
25332
25635
|
async function restoreConfiguration(config2, saved, profile, request) {
|
|
25333
25636
|
const selections = [
|
|
@@ -25346,8 +25649,9 @@ async function restoreConfiguration(config2, saved, profile, request) {
|
|
|
25346
25649
|
}
|
|
25347
25650
|
return config2;
|
|
25348
25651
|
}
|
|
25349
|
-
function confirmedConfiguration(response, id2, value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
25350
|
-
const
|
|
25652
|
+
function confirmedConfiguration(response, id2, value, profile = CODEBUDDY_RUNTIME_PROFILE, nativeModels = []) {
|
|
25653
|
+
const reply = record3(response);
|
|
25654
|
+
const result = configuration(reply.configOptions, profile, record3(reply.models).availableModels ?? nativeModels);
|
|
25351
25655
|
if (effectiveOptionValue(result, id2) !== value) {
|
|
25352
25656
|
throw new CodeBuddyError("protocolError", `ACP did not confirm ${id2}`);
|
|
25353
25657
|
}
|
|
@@ -33283,7 +33587,7 @@ var CodeBuddySession = class {
|
|
|
33283
33587
|
}
|
|
33284
33588
|
} : {}
|
|
33285
33589
|
});
|
|
33286
|
-
this.#apply(configuration(opened.configOptions, this.profile), false);
|
|
33590
|
+
this.#apply(configuration(opened.configOptions, this.profile, record3(opened.models).availableModels), false);
|
|
33287
33591
|
if (this.input.kind === "create" && this.input.executionPolicy === "unattended-full-access") {
|
|
33288
33592
|
await this.#configure("mode", "fullAccess");
|
|
33289
33593
|
} else if (this.input.permissionModeId || text2(saved.mode))
|
|
@@ -33385,8 +33689,9 @@ var CodeBuddySession = class {
|
|
|
33385
33689
|
#applyUpdate(update) {
|
|
33386
33690
|
if ((text2(record3(update._meta)["codebuddy.ai/parentToolCallId"]) || !this.#active?.output.hasItem(`tool-${text2(update.toolCallId)}`)) && this.subagents.update(update))
|
|
33387
33691
|
return;
|
|
33388
|
-
if (update.sessionUpdate === "config_option_update" && this.#config)
|
|
33389
|
-
this.#apply(configuration(update.configOptions, this.profile));
|
|
33692
|
+
if (update.sessionUpdate === "config_option_update" && this.#config) {
|
|
33693
|
+
this.#apply(configuration(update.configOptions, this.profile, this.#config.nativeModels));
|
|
33694
|
+
}
|
|
33390
33695
|
if (update.sessionUpdate === "usage_update" && typeof update.used === "number" && typeof update.size === "number" && update.size > 0) {
|
|
33391
33696
|
this.#context = {
|
|
33392
33697
|
contextUsedTokens: update.used,
|
|
@@ -33763,7 +34068,7 @@ var CodeBuddySession = class {
|
|
|
33763
34068
|
this.#client = candidate = this.#createClient();
|
|
33764
34069
|
const generation = this.#generation;
|
|
33765
34070
|
const loaded = await this.#openClient();
|
|
33766
|
-
const restored = await restoreConfiguration(configuration(loaded.configOptions, this.profile), this.#state, this.profile, this.#configurationRequest());
|
|
34071
|
+
const restored = await restoreConfiguration(configuration(loaded.configOptions, this.profile, record3(loaded.models).availableModels), this.#state, this.profile, this.#configurationRequest());
|
|
33767
34072
|
this.#assertClient(generation);
|
|
33768
34073
|
this.#apply(restored);
|
|
33769
34074
|
if (!this.profile.staticCommandCatalog)
|
|
@@ -33934,7 +34239,7 @@ var CodeBuddyAdapter = class {
|
|
|
33934
34239
|
this.#inspections.add(client2);
|
|
33935
34240
|
await client2.initialize();
|
|
33936
34241
|
const opened = await client2.open(cwd);
|
|
33937
|
-
const config2 = configuration(opened.configOptions, this.#profile);
|
|
34242
|
+
const config2 = configuration(opened.configOptions, this.#profile, record3(opened.models).availableModels);
|
|
33938
34243
|
return harnessInspectionSchema.parse({
|
|
33939
34244
|
status: "ready",
|
|
33940
34245
|
catalog: config2.catalog,
|