@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
|
@@ -19748,26 +19748,51 @@ var jsonPrimitiveSchema = external_exports.union([
|
|
|
19748
19748
|
external_exports.boolean(),
|
|
19749
19749
|
external_exports.null()
|
|
19750
19750
|
]);
|
|
19751
|
-
function
|
|
19752
|
-
const
|
|
19753
|
-
|
|
19751
|
+
function isPlainObject2(value) {
|
|
19752
|
+
const prototype = Object.getPrototypeOf(value);
|
|
19753
|
+
return prototype === Object.prototype || prototype === null;
|
|
19754
|
+
}
|
|
19755
|
+
var JSON_VALIDATION_LEAVE = /* @__PURE__ */ Symbol("json-validation-leave");
|
|
19756
|
+
function isValidJsonValue(value) {
|
|
19757
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value)) {
|
|
19758
|
+
return true;
|
|
19759
|
+
}
|
|
19760
|
+
if (typeof value !== "object")
|
|
19761
|
+
return false;
|
|
19762
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
19763
|
+
const stack = [value];
|
|
19754
19764
|
try {
|
|
19755
19765
|
while (stack.length > 0) {
|
|
19756
|
-
const
|
|
19757
|
-
if (
|
|
19758
|
-
|
|
19759
|
-
if (frame.leaving) {
|
|
19760
|
-
ancestors.delete(frame.value);
|
|
19766
|
+
const current = stack.pop();
|
|
19767
|
+
if (current === JSON_VALIDATION_LEAVE) {
|
|
19768
|
+
ancestors.delete(stack.pop());
|
|
19761
19769
|
continue;
|
|
19762
19770
|
}
|
|
19763
|
-
if (typeof
|
|
19771
|
+
if (current === null || typeof current === "string" || typeof current === "boolean" || typeof current === "number" && Number.isFinite(current)) {
|
|
19764
19772
|
continue;
|
|
19765
|
-
|
|
19773
|
+
}
|
|
19774
|
+
if (typeof current !== "object")
|
|
19775
|
+
return false;
|
|
19776
|
+
if (ancestors.has(current))
|
|
19766
19777
|
return false;
|
|
19767
|
-
|
|
19768
|
-
|
|
19769
|
-
|
|
19770
|
-
|
|
19778
|
+
if (Array.isArray(current)) {
|
|
19779
|
+
ancestors.add(current);
|
|
19780
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
19781
|
+
for (let index = current.length - 1; index >= 0; index -= 1) {
|
|
19782
|
+
stack.push(current[index]);
|
|
19783
|
+
}
|
|
19784
|
+
continue;
|
|
19785
|
+
}
|
|
19786
|
+
if (!isPlainObject2(current))
|
|
19787
|
+
return false;
|
|
19788
|
+
ancestors.add(current);
|
|
19789
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
19790
|
+
for (const key in current) {
|
|
19791
|
+
if (Object.hasOwn(current, key)) {
|
|
19792
|
+
if (key === "__proto__")
|
|
19793
|
+
return false;
|
|
19794
|
+
stack.push(current[key]);
|
|
19795
|
+
}
|
|
19771
19796
|
}
|
|
19772
19797
|
}
|
|
19773
19798
|
} catch {
|
|
@@ -19775,17 +19800,11 @@ function hasNoCircularReferences(value) {
|
|
|
19775
19800
|
}
|
|
19776
19801
|
return true;
|
|
19777
19802
|
}
|
|
19778
|
-
var
|
|
19779
|
-
message: "JSON value
|
|
19780
|
-
});
|
|
19781
|
-
var
|
|
19782
|
-
|
|
19783
|
-
external_exports.array(recursiveJsonValueSchema),
|
|
19784
|
-
external_exports.record(external_exports.string(), recursiveJsonValueSchema)
|
|
19785
|
-
]));
|
|
19786
|
-
var jsonValueSchema = nonCircularSchema.pipe(recursiveJsonValueSchema);
|
|
19787
|
-
var jsonArraySchema = nonCircularSchema.pipe(external_exports.array(recursiveJsonValueSchema));
|
|
19788
|
-
var jsonObjectSchema = nonCircularSchema.pipe(external_exports.record(external_exports.string(), recursiveJsonValueSchema));
|
|
19803
|
+
var jsonValueSchema = external_exports.custom(isValidJsonValue, {
|
|
19804
|
+
message: "Invalid JSON value"
|
|
19805
|
+
});
|
|
19806
|
+
var jsonArraySchema = external_exports.custom((value) => Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON array" });
|
|
19807
|
+
var jsonObjectSchema = external_exports.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON object" });
|
|
19789
19808
|
|
|
19790
19809
|
// ../../shared-contracts/dist/errors.js
|
|
19791
19810
|
var codexhostErrorSchema = external_exports.strictObject({
|
|
@@ -20909,6 +20928,7 @@ var hostExtensionCatalogEntrySchema = external_exports.object({
|
|
|
20909
20928
|
backend: external_exports.int().positive().optional()
|
|
20910
20929
|
}),
|
|
20911
20930
|
downloadUrl: downloadUrl.refine((url2) => url2.startsWith("https://"), "Expected HTTPS"),
|
|
20931
|
+
downloads7d: external_exports.number().int().min(0).optional(),
|
|
20912
20932
|
featured: external_exports.boolean().optional(),
|
|
20913
20933
|
featuredOrder: external_exports.int().nonnegative().optional(),
|
|
20914
20934
|
changelog: external_exports.array(hostExtensionChangelogEntrySchema).max(20).optional()
|
|
@@ -20978,24 +20998,42 @@ var hostExtensionInstallationSchema = external_exports.strictObject({
|
|
|
20978
20998
|
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);
|
|
20979
20999
|
var desktopConflict = { desktopConflictWith: hostExtensionIdSchema.optional() };
|
|
20980
21000
|
var backendState = external_exports.enum(["none", "inactive", "starting", "running", "failed"]);
|
|
21001
|
+
var HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH = 512;
|
|
21002
|
+
var hostExtensionOperationStatusSchema = external_exports.discriminatedUnion("state", [
|
|
21003
|
+
external_exports.object({
|
|
21004
|
+
state: external_exports.literal("updating"),
|
|
21005
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21006
|
+
startedAt: external_exports.iso.datetime()
|
|
21007
|
+
}),
|
|
21008
|
+
external_exports.object({
|
|
21009
|
+
state: external_exports.literal("failed"),
|
|
21010
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21011
|
+
startedAt: external_exports.iso.datetime(),
|
|
21012
|
+
updatedAt: external_exports.iso.datetime(),
|
|
21013
|
+
error: external_exports.string().min(1).max(HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH),
|
|
21014
|
+
interruptedByShutdown: external_exports.boolean().optional()
|
|
21015
|
+
})
|
|
21016
|
+
]);
|
|
20981
21017
|
var hostExtensionListItemSchema = external_exports.discriminatedUnion("state", [
|
|
20982
|
-
|
|
21018
|
+
external_exports.object({
|
|
21019
|
+
...hostExtensionInstallationSchema.shape,
|
|
20983
21020
|
state: external_exports.literal("valid"),
|
|
20984
21021
|
enabled: external_exports.boolean(),
|
|
20985
21022
|
...desktopConflict,
|
|
20986
21023
|
iconDataUrl: rasterDataUrlSchema(DESKTOP_EXTENSION_ICON_MAX_BYTES).optional(),
|
|
20987
21024
|
screenshotDataUrls: external_exports.array(rasterDataUrlSchema(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT).optional(),
|
|
20988
21025
|
backendState: backendState.optional(),
|
|
20989
|
-
backendError: external_exports.string().optional()
|
|
21026
|
+
backendError: external_exports.string().optional(),
|
|
21027
|
+
operation: hostExtensionOperationStatusSchema.optional()
|
|
20990
21028
|
}),
|
|
20991
|
-
external_exports.
|
|
21029
|
+
external_exports.object({
|
|
20992
21030
|
state: external_exports.enum(["invalid", "incompatible"]),
|
|
20993
21031
|
id: external_exports.string().min(1),
|
|
20994
21032
|
enabled: external_exports.boolean(),
|
|
20995
21033
|
error: external_exports.string()
|
|
20996
21034
|
})
|
|
20997
21035
|
]);
|
|
20998
|
-
var hostExtensionsListResultSchema = external_exports.
|
|
21036
|
+
var hostExtensionsListResultSchema = external_exports.object({
|
|
20999
21037
|
revision: hostExtensionRevisionSchema,
|
|
21000
21038
|
configuration: hostExtensionConfigurationSchema,
|
|
21001
21039
|
diagnostics: external_exports.array(external_exports.string()),
|
|
@@ -21034,7 +21072,10 @@ var methods = new Set(HOST_EXTENSION_MANAGEMENT_METHODS);
|
|
|
21034
21072
|
var noParams = external_exports.strictObject({});
|
|
21035
21073
|
var expectedRevision = { expectedRevision: hostExtensionRevisionSchema };
|
|
21036
21074
|
var selection = external_exports.strictObject({ ...id, ...expectedRevision });
|
|
21037
|
-
var installationResult =
|
|
21075
|
+
var installationResult = external_exports.object({
|
|
21076
|
+
...hostExtensionInstallationSchema.shape,
|
|
21077
|
+
replaced: external_exports.boolean()
|
|
21078
|
+
});
|
|
21038
21079
|
var mutationResult = external_exports.discriminatedUnion("state", [
|
|
21039
21080
|
external_exports.strictObject({ state: external_exports.literal("saved"), configuration: hostExtensionConfigurationSchema }),
|
|
21040
21081
|
external_exports.strictObject({ state: external_exports.literal("revision-conflict"), revision: hostExtensionRevisionSchema })
|
|
@@ -21063,7 +21104,12 @@ var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
|
21063
21104
|
values: jsonObjectSchema
|
|
21064
21105
|
});
|
|
21065
21106
|
var hostExtensionsRpcSchemas = {
|
|
21066
|
-
[HOST_EXTENSIONS_RPC.list]: {
|
|
21107
|
+
[HOST_EXTENSIONS_RPC.list]: {
|
|
21108
|
+
params: external_exports.object({
|
|
21109
|
+
includeOperations: external_exports.boolean().optional()
|
|
21110
|
+
}),
|
|
21111
|
+
result: hostExtensionsListResultSchema
|
|
21112
|
+
},
|
|
21067
21113
|
[HOST_EXTENSIONS_RPC.snapshot]: { params: noParams, result: hostExtensionsSnapshotResultSchema },
|
|
21068
21114
|
[HOST_EXTENSIONS_RPC.catalog]: {
|
|
21069
21115
|
params: external_exports.strictObject({
|
|
@@ -21089,6 +21135,7 @@ var hostExtensionsRpcSchemas = {
|
|
|
21089
21135
|
...id,
|
|
21090
21136
|
expectedDigest: active.digest,
|
|
21091
21137
|
expectedActivationId: active.activationId.optional(),
|
|
21138
|
+
expectedVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21092
21139
|
source: hostExtensionInstallSourceSchema.optional()
|
|
21093
21140
|
}),
|
|
21094
21141
|
result: installationResult
|
|
@@ -21138,9 +21185,39 @@ var hostExtensionsRpcSchemas = {
|
|
|
21138
21185
|
};
|
|
21139
21186
|
|
|
21140
21187
|
// ../../shared-contracts/dist/group-chat.js
|
|
21141
|
-
var
|
|
21142
|
-
var
|
|
21188
|
+
var GROUP_MEMORY_MAX_BYTES = 4096;
|
|
21189
|
+
var DEFAULT_GROUP_MAX_AGENT_HOPS = 10;
|
|
21190
|
+
var MAX_GROUP_AGENT_HOPS = 200;
|
|
21143
21191
|
var GROUP_NOTICE_MAX_LENGTH = 2e3;
|
|
21192
|
+
var cachedUtf8Encoder;
|
|
21193
|
+
function groupUtf8ByteLength(text3) {
|
|
21194
|
+
if (cachedUtf8Encoder === void 0) {
|
|
21195
|
+
cachedUtf8Encoder = typeof TextEncoder === "function" ? new TextEncoder() : null;
|
|
21196
|
+
}
|
|
21197
|
+
if (cachedUtf8Encoder !== null) {
|
|
21198
|
+
return cachedUtf8Encoder.encode(text3).length;
|
|
21199
|
+
}
|
|
21200
|
+
let bytes = 0;
|
|
21201
|
+
for (let i = 0; i < text3.length; i += 1) {
|
|
21202
|
+
const code = text3.charCodeAt(i);
|
|
21203
|
+
if (code <= 127) {
|
|
21204
|
+
bytes += 1;
|
|
21205
|
+
} else if (code <= 2047) {
|
|
21206
|
+
bytes += 2;
|
|
21207
|
+
} else if (code >= 55296 && code <= 56319 && i + 1 < text3.length) {
|
|
21208
|
+
const next = text3.charCodeAt(i + 1);
|
|
21209
|
+
if (next >= 56320 && next <= 57343) {
|
|
21210
|
+
bytes += 4;
|
|
21211
|
+
i += 1;
|
|
21212
|
+
} else {
|
|
21213
|
+
bytes += 3;
|
|
21214
|
+
}
|
|
21215
|
+
} else {
|
|
21216
|
+
bytes += 3;
|
|
21217
|
+
}
|
|
21218
|
+
}
|
|
21219
|
+
return bytes;
|
|
21220
|
+
}
|
|
21144
21221
|
var remoteGroupRoomIdSchema = external_exports.string().regex(/^remote:[A-Za-z0-9_-]{8,512}$/u);
|
|
21145
21222
|
var groupRoomIdSchema = external_exports.union([external_exports.uuidv4(), remoteGroupRoomIdSchema]);
|
|
21146
21223
|
var groupMemberIdSchema = external_exports.uuidv4();
|
|
@@ -21149,7 +21226,7 @@ var groupUnmentionedPolicySchema = external_exports.enum(["none", "last_speaker"
|
|
|
21149
21226
|
var groupMemberStatusSchema = external_exports.enum(["active", "muted", "removed"]);
|
|
21150
21227
|
var nonnegativeInteger = external_exports.int().nonnegative();
|
|
21151
21228
|
var positiveInteger = external_exports.int().positive();
|
|
21152
|
-
var maxAgentHopsSchema =
|
|
21229
|
+
var maxAgentHopsSchema = nonnegativeInteger.max(MAX_GROUP_AGENT_HOPS);
|
|
21153
21230
|
var nonblankString = external_exports.string().refine((value) => value.trim().length > 0);
|
|
21154
21231
|
var timestamp = external_exports.iso.datetime();
|
|
21155
21232
|
var optionalMemberEdits = {
|
|
@@ -21168,9 +21245,11 @@ var groupMemberSchema = external_exports.object({
|
|
|
21168
21245
|
harnessId: harnessIdSchema,
|
|
21169
21246
|
status: groupMemberStatusSchema,
|
|
21170
21247
|
projectless: external_exports.boolean().optional(),
|
|
21248
|
+
showInSidebar: external_exports.boolean().optional(),
|
|
21171
21249
|
joinedAtSeq: nonnegativeInteger,
|
|
21172
21250
|
lastDeliveredSeq: nonnegativeInteger,
|
|
21173
21251
|
lastRosterVersion: nonnegativeInteger,
|
|
21252
|
+
lastMemoryVersion: nonnegativeInteger.default(0),
|
|
21174
21253
|
createdAt: timestamp
|
|
21175
21254
|
});
|
|
21176
21255
|
var groupProjectlessWorkspaceSchema = external_exports.object({
|
|
@@ -21182,19 +21261,25 @@ var groupRoomRemoteHostSchema = external_exports.object({
|
|
|
21182
21261
|
displayName: nonblankString,
|
|
21183
21262
|
state: nonblankString.optional(),
|
|
21184
21263
|
color: external_exports.string().optional(),
|
|
21185
|
-
filePreview: external_exports.boolean().optional()
|
|
21264
|
+
filePreview: external_exports.boolean().optional(),
|
|
21265
|
+
memberSidebarVisibility: external_exports.boolean().optional(),
|
|
21266
|
+
sharedMemory: external_exports.boolean().optional()
|
|
21186
21267
|
});
|
|
21187
|
-
var
|
|
21268
|
+
var groupRoomObjectSchema = external_exports.object({
|
|
21188
21269
|
roomId: groupRoomIdSchema,
|
|
21189
21270
|
title: nonblankString,
|
|
21190
21271
|
defaultCwd: nonblankString,
|
|
21191
21272
|
projectlessWorkspace: groupProjectlessWorkspaceSchema.optional(),
|
|
21192
21273
|
unmentionedPolicy: groupUnmentionedPolicySchema.default("none"),
|
|
21274
|
+
unmentionedMemberId: groupMemberIdSchema.optional(),
|
|
21193
21275
|
allowAgentMentions: external_exports.boolean().default(true),
|
|
21194
21276
|
maxAgentHops: maxAgentHopsSchema.default(DEFAULT_GROUP_MAX_AGENT_HOPS),
|
|
21277
|
+
relayHopLimit: maxAgentHopsSchema.optional(),
|
|
21195
21278
|
lastSeq: nonnegativeInteger,
|
|
21196
21279
|
lastSpeakerMemberId: groupMemberIdSchema.optional(),
|
|
21197
21280
|
rosterVersion: nonnegativeInteger,
|
|
21281
|
+
memoryVersion: nonnegativeInteger.default(0),
|
|
21282
|
+
memorySha256: external_exports.string().regex(/^[0-9a-f]{64}$/u).optional(),
|
|
21198
21283
|
humanEpoch: nonnegativeInteger,
|
|
21199
21284
|
relayPaused: external_exports.boolean(),
|
|
21200
21285
|
pinned: external_exports.boolean(),
|
|
@@ -21202,7 +21287,14 @@ var groupRoomSchema = external_exports.object({
|
|
|
21202
21287
|
updatedAt: timestamp,
|
|
21203
21288
|
members: external_exports.array(groupMemberSchema),
|
|
21204
21289
|
remote: groupRoomRemoteHostSchema.optional()
|
|
21205
|
-
}).superRefine(({ members: members2 }, context) => {
|
|
21290
|
+
}).superRefine(({ members: members2, unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21291
|
+
if (unmentionedMemberId !== void 0 && unmentionedPolicy !== "none") {
|
|
21292
|
+
context.addIssue({
|
|
21293
|
+
code: "custom",
|
|
21294
|
+
path: ["unmentionedMemberId"],
|
|
21295
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21296
|
+
});
|
|
21297
|
+
}
|
|
21206
21298
|
const handles = /* @__PURE__ */ new Set();
|
|
21207
21299
|
for (const [index, { handle, status }] of members2.entries()) {
|
|
21208
21300
|
if (status === "removed")
|
|
@@ -21217,6 +21309,15 @@ var groupRoomSchema = external_exports.object({
|
|
|
21217
21309
|
handles.add(handle);
|
|
21218
21310
|
}
|
|
21219
21311
|
});
|
|
21312
|
+
var groupRoomSchema = external_exports.preprocess((value) => {
|
|
21313
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
21314
|
+
const record6 = value;
|
|
21315
|
+
if (record6.unmentionedPolicy === "member" && record6.unmentionedMemberId !== void 0) {
|
|
21316
|
+
return { ...record6, unmentionedPolicy: "none" };
|
|
21317
|
+
}
|
|
21318
|
+
}
|
|
21319
|
+
return value;
|
|
21320
|
+
}, groupRoomObjectSchema);
|
|
21220
21321
|
var groupAttachmentSchema = external_exports.object({
|
|
21221
21322
|
kind: external_exports.enum(["image", "file"]),
|
|
21222
21323
|
attachmentId: nonblankString.max(256),
|
|
@@ -21243,6 +21344,7 @@ var groupMessageSchema = external_exports.object({
|
|
|
21243
21344
|
mentionedMemberIds: external_exports.array(groupMemberIdSchema),
|
|
21244
21345
|
mentionAll: external_exports.boolean().optional(),
|
|
21245
21346
|
hopCount: nonnegativeInteger,
|
|
21347
|
+
durationMs: nonnegativeInteger.optional(),
|
|
21246
21348
|
createdAt: timestamp
|
|
21247
21349
|
});
|
|
21248
21350
|
var newThreadOptions = {
|
|
@@ -21272,6 +21374,8 @@ var GROUPS_REMOVE_MEMBER_METHOD = "codexhost/groups/member/remove";
|
|
|
21272
21374
|
var GROUPS_REBIND_MEMBER_METHOD = "codexhost/groups/member/rebind";
|
|
21273
21375
|
var GROUPS_POST_MESSAGE_METHOD = "codexhost/groups/message/post";
|
|
21274
21376
|
var GROUPS_READ_MESSAGES_METHOD = "codexhost/groups/messages/read";
|
|
21377
|
+
var GROUPS_READ_MEMORY_METHOD = "codexhost/groups/memory/read";
|
|
21378
|
+
var GROUPS_UPDATE_MEMORY_METHOD = "codexhost/groups/memory/update";
|
|
21275
21379
|
var GROUPS_INSPECT_CWD_METHOD = "codexhost/groups/cwd/inspect";
|
|
21276
21380
|
var roomIdentity = { roomId: groupRoomIdSchema };
|
|
21277
21381
|
var memberIdentity = { ...roomIdentity, memberId: groupMemberIdSchema };
|
|
@@ -21302,8 +21406,17 @@ var groupsCreateResultSchema = external_exports.object({ room: groupRoomSchema }
|
|
|
21302
21406
|
var groupsUpdateParamsSchema = external_exports.strictObject({
|
|
21303
21407
|
...roomIdentity,
|
|
21304
21408
|
...roomEdits,
|
|
21409
|
+
unmentionedMemberId: groupMemberIdSchema.nullable().optional(),
|
|
21305
21410
|
pinned: external_exports.boolean().optional(),
|
|
21306
21411
|
relayPaused: external_exports.boolean().optional()
|
|
21412
|
+
}).superRefine(({ unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21413
|
+
if (unmentionedMemberId !== void 0 && unmentionedMemberId !== null && unmentionedPolicy !== void 0 && unmentionedPolicy !== "none") {
|
|
21414
|
+
context.addIssue({
|
|
21415
|
+
code: "custom",
|
|
21416
|
+
path: ["unmentionedMemberId"],
|
|
21417
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21418
|
+
});
|
|
21419
|
+
}
|
|
21307
21420
|
});
|
|
21308
21421
|
var groupsDeleteParamsSchema = external_exports.strictObject(roomIdentity);
|
|
21309
21422
|
var groupsDeleteResultSchema = external_exports.object({ deleted: external_exports.boolean() });
|
|
@@ -21318,7 +21431,8 @@ var groupsAddMemberResultSchema = external_exports.object({
|
|
|
21318
21431
|
var groupsUpdateMemberParamsSchema = external_exports.strictObject({
|
|
21319
21432
|
...memberIdentity,
|
|
21320
21433
|
...optionalMemberEdits,
|
|
21321
|
-
status: groupMemberStatusSchema.optional()
|
|
21434
|
+
status: groupMemberStatusSchema.optional(),
|
|
21435
|
+
showInSidebar: external_exports.boolean().optional()
|
|
21322
21436
|
});
|
|
21323
21437
|
var groupsRemoveMemberParamsSchema = external_exports.strictObject(memberIdentity);
|
|
21324
21438
|
var groupsRebindMemberParamsSchema = external_exports.strictObject({
|
|
@@ -21421,6 +21535,24 @@ var groupsReadMessagesResultSchema = external_exports.object({
|
|
|
21421
21535
|
messages: external_exports.array(groupMessageSchema),
|
|
21422
21536
|
totalSeq: nonnegativeInteger
|
|
21423
21537
|
});
|
|
21538
|
+
var groupsReadMemoryParamsSchema = external_exports.strictObject(roomIdentity);
|
|
21539
|
+
var groupsReadMemoryResultSchema = external_exports.object({
|
|
21540
|
+
...roomIdentity,
|
|
21541
|
+
memoryVersion: nonnegativeInteger,
|
|
21542
|
+
content: external_exports.string(),
|
|
21543
|
+
updatedAt: timestamp
|
|
21544
|
+
});
|
|
21545
|
+
var groupsUpdateMemoryParamsSchema = external_exports.strictObject({
|
|
21546
|
+
...roomIdentity,
|
|
21547
|
+
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`),
|
|
21548
|
+
expectedVersion: nonnegativeInteger.optional()
|
|
21549
|
+
});
|
|
21550
|
+
var groupsUpdateMemoryResultSchema = external_exports.object({
|
|
21551
|
+
room: groupRoomSchema,
|
|
21552
|
+
memoryVersion: nonnegativeInteger,
|
|
21553
|
+
content: external_exports.string(),
|
|
21554
|
+
updatedAt: timestamp
|
|
21555
|
+
});
|
|
21424
21556
|
var groupsInspectCwdParamsSchema = external_exports.strictObject({
|
|
21425
21557
|
cwd: nonblankString,
|
|
21426
21558
|
roomId: groupRoomIdSchema.optional()
|
|
@@ -21556,6 +21688,149 @@ var nativeCodexGoalResultSchema = external_exports.object({
|
|
|
21556
21688
|
}).nullable()
|
|
21557
21689
|
});
|
|
21558
21690
|
|
|
21691
|
+
// ../../shared-contracts/dist/voice.js
|
|
21692
|
+
var VOICE_AUDIO_MAX_BYTES = 10 * 1024 * 1024;
|
|
21693
|
+
var VOICE_CONFIG_GET_METHOD = "codexhost/voice/config/get";
|
|
21694
|
+
var VOICE_CONFIG_SET_METHOD = "codexhost/voice/config/set";
|
|
21695
|
+
var voiceProviderModeSchema = external_exports.enum([
|
|
21696
|
+
"codex",
|
|
21697
|
+
"openai-compatible",
|
|
21698
|
+
"deepseek-asr",
|
|
21699
|
+
"openai-chat-audio"
|
|
21700
|
+
]);
|
|
21701
|
+
var voiceAudioFormatSchema = external_exports.enum(["native", "wav"]);
|
|
21702
|
+
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;
|
|
21703
|
+
function isLoopbackVoiceHost(hostname3) {
|
|
21704
|
+
const bare = hostname3.trim().toLowerCase().replace(/^\[|\]$/g, "");
|
|
21705
|
+
if (bare === "localhost" || bare.endsWith(".localhost") || bare === "::1")
|
|
21706
|
+
return true;
|
|
21707
|
+
return /^127(?:\.(?:25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(bare);
|
|
21708
|
+
}
|
|
21709
|
+
function isValidVoiceBaseUrl(value) {
|
|
21710
|
+
const trimmed = value.trim();
|
|
21711
|
+
if (!trimmed)
|
|
21712
|
+
return false;
|
|
21713
|
+
try {
|
|
21714
|
+
const parsed = new URL(trimmed);
|
|
21715
|
+
if (!parsed.hostname)
|
|
21716
|
+
return false;
|
|
21717
|
+
if (parsed.username !== "" || parsed.password !== "" || parsed.hash !== "")
|
|
21718
|
+
return false;
|
|
21719
|
+
if (parsed.protocol === "https:") {
|
|
21720
|
+
} else if (parsed.protocol === "http:") {
|
|
21721
|
+
if (!isLoopbackVoiceHost(parsed.hostname))
|
|
21722
|
+
return false;
|
|
21723
|
+
} else {
|
|
21724
|
+
return false;
|
|
21725
|
+
}
|
|
21726
|
+
for (const key of parsed.searchParams.keys()) {
|
|
21727
|
+
if (SENSITIVE_VOICE_QUERY_PARAM.test(key))
|
|
21728
|
+
return false;
|
|
21729
|
+
}
|
|
21730
|
+
return true;
|
|
21731
|
+
} catch {
|
|
21732
|
+
return false;
|
|
21733
|
+
}
|
|
21734
|
+
}
|
|
21735
|
+
var voiceBaseUrlSchema = external_exports.string().max(2048).refine((value) => value === "" || isValidVoiceBaseUrl(value), {
|
|
21736
|
+
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"
|
|
21737
|
+
});
|
|
21738
|
+
var voiceProviderConfigSnapshotSchema = external_exports.object({
|
|
21739
|
+
baseUrl: voiceBaseUrlSchema,
|
|
21740
|
+
model: external_exports.string().max(256),
|
|
21741
|
+
hasApiKey: external_exports.boolean(),
|
|
21742
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
21743
|
+
apiKey: external_exports.never().optional()
|
|
21744
|
+
});
|
|
21745
|
+
var voiceConfigSnapshotSchema = external_exports.object({
|
|
21746
|
+
mode: voiceProviderModeSchema,
|
|
21747
|
+
baseUrl: voiceBaseUrlSchema,
|
|
21748
|
+
model: external_exports.string().max(256),
|
|
21749
|
+
hasApiKey: external_exports.boolean(),
|
|
21750
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
21751
|
+
apiKey: external_exports.never().optional(),
|
|
21752
|
+
audioFormat: voiceAudioFormatSchema.optional(),
|
|
21753
|
+
providers: external_exports.object({
|
|
21754
|
+
"openai-compatible": voiceProviderConfigSnapshotSchema,
|
|
21755
|
+
"deepseek-asr": voiceProviderConfigSnapshotSchema,
|
|
21756
|
+
"openai-chat-audio": voiceProviderConfigSnapshotSchema
|
|
21757
|
+
}).optional(),
|
|
21758
|
+
codexAvailable: external_exports.boolean(),
|
|
21759
|
+
available: external_exports.boolean()
|
|
21760
|
+
});
|
|
21761
|
+
var voiceConfigUpdateParamsSchema = external_exports.object({
|
|
21762
|
+
mode: voiceProviderModeSchema,
|
|
21763
|
+
baseUrl: external_exports.string().max(2048).optional(),
|
|
21764
|
+
model: external_exports.string().max(256).optional(),
|
|
21765
|
+
apiKey: external_exports.string().max(4096).nullable().optional()
|
|
21766
|
+
}).strict().superRefine((value, ctx) => {
|
|
21767
|
+
const trimmedBaseUrl = value.baseUrl?.trim() ?? "";
|
|
21768
|
+
const trimmedModel = value.model?.trim() ?? "";
|
|
21769
|
+
if (value.mode === "openai-compatible") {
|
|
21770
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21771
|
+
ctx.addIssue({
|
|
21772
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21773
|
+
path: ["baseUrl"],
|
|
21774
|
+
message: "OpenAI-compatible mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
21775
|
+
});
|
|
21776
|
+
}
|
|
21777
|
+
return;
|
|
21778
|
+
}
|
|
21779
|
+
if (value.mode === "openai-chat-audio") {
|
|
21780
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21781
|
+
ctx.addIssue({
|
|
21782
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21783
|
+
path: ["baseUrl"],
|
|
21784
|
+
message: "Multimodal Chat Audio mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
21785
|
+
});
|
|
21786
|
+
}
|
|
21787
|
+
if (!trimmedModel) {
|
|
21788
|
+
ctx.addIssue({
|
|
21789
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21790
|
+
path: ["model"],
|
|
21791
|
+
message: "Multimodal Chat Audio mode requires a model name"
|
|
21792
|
+
});
|
|
21793
|
+
}
|
|
21794
|
+
return;
|
|
21795
|
+
}
|
|
21796
|
+
if (trimmedBaseUrl !== "" && !isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21797
|
+
ctx.addIssue({
|
|
21798
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21799
|
+
path: ["baseUrl"],
|
|
21800
|
+
message: "Base URL must be empty or a valid https:// URL (http:// is allowed only for loopback hosts)"
|
|
21801
|
+
});
|
|
21802
|
+
}
|
|
21803
|
+
});
|
|
21804
|
+
var voiceAudioMimeTypeSchema = external_exports.string().regex(/^audio\/[a-z0-9.+-]+(?:\s*;[^\r\n]*)?$/i);
|
|
21805
|
+
var voiceStatusResultSchema = external_exports.object({
|
|
21806
|
+
available: external_exports.boolean(),
|
|
21807
|
+
audioFormat: voiceAudioFormatSchema.optional()
|
|
21808
|
+
});
|
|
21809
|
+
var voiceTranscribeParamsSchema = external_exports.object({ path: external_exports.string().min(1), mimeType: voiceAudioMimeTypeSchema }).strict();
|
|
21810
|
+
var voiceErrorCodeSchema = external_exports.enum([
|
|
21811
|
+
"credentials-unavailable",
|
|
21812
|
+
"login-expired",
|
|
21813
|
+
"rate-limited",
|
|
21814
|
+
"service-rejected",
|
|
21815
|
+
"host-incompatible",
|
|
21816
|
+
"network",
|
|
21817
|
+
"timeout",
|
|
21818
|
+
"audio-empty",
|
|
21819
|
+
"audio-too-large",
|
|
21820
|
+
"audio-format",
|
|
21821
|
+
"audio-invalid"
|
|
21822
|
+
]);
|
|
21823
|
+
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
21824
|
+
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
21825
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
21826
|
+
]);
|
|
21827
|
+
|
|
21828
|
+
// ../../shared-contracts/dist/github-star.js
|
|
21829
|
+
var GITHUB_STAR_STATUS_METHOD = "codexhost/githubStar/status";
|
|
21830
|
+
var GITHUB_STAR_ADD_METHOD = "codexhost/githubStar/star";
|
|
21831
|
+
var githubStarParamsSchema = external_exports.object({}).strict();
|
|
21832
|
+
var githubStarStateSchema = external_exports.object({ ghAvailable: external_exports.boolean(), starred: external_exports.boolean() });
|
|
21833
|
+
|
|
21559
21834
|
// ../../shared-contracts/dist/client-channel.js
|
|
21560
21835
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
21561
21836
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -21617,9 +21892,13 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21617
21892
|
GROUPS_REBIND_MEMBER_METHOD,
|
|
21618
21893
|
GROUPS_POST_MESSAGE_METHOD,
|
|
21619
21894
|
GROUPS_READ_MESSAGES_METHOD,
|
|
21895
|
+
GROUPS_READ_MEMORY_METHOD,
|
|
21896
|
+
GROUPS_UPDATE_MEMORY_METHOD,
|
|
21620
21897
|
GROUPS_INSPECT_CWD_METHOD,
|
|
21621
21898
|
"codexhost/voice/status",
|
|
21622
21899
|
"codexhost/voice/transcribe",
|
|
21900
|
+
VOICE_CONFIG_GET_METHOD,
|
|
21901
|
+
VOICE_CONFIG_SET_METHOD,
|
|
21623
21902
|
"codexhost/harness/display-settings/get",
|
|
21624
21903
|
"codexhost/harness/display-settings/set",
|
|
21625
21904
|
"codexhost/harness/display-settings/capabilities",
|
|
@@ -21685,6 +21964,8 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21685
21964
|
"codexhost/harness/session-import/list",
|
|
21686
21965
|
"codexhost/harness/session-import/import",
|
|
21687
21966
|
// Host settings shared across Desktop and Web.
|
|
21967
|
+
GITHUB_STAR_STATUS_METHOD,
|
|
21968
|
+
GITHUB_STAR_ADD_METHOD,
|
|
21688
21969
|
...HOST_EXTENSION_MANAGEMENT_METHODS,
|
|
21689
21970
|
"codexhost/harness/installation",
|
|
21690
21971
|
"codexhost/harness/installation/start",
|
|
@@ -22024,28 +22305,16 @@ var extensionActivitySchema = external_exports.strictObject({
|
|
|
22024
22305
|
})).max(256)
|
|
22025
22306
|
});
|
|
22026
22307
|
|
|
22027
|
-
// ../../shared-contracts/dist/
|
|
22028
|
-
var
|
|
22029
|
-
var
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
"
|
|
22034
|
-
"
|
|
22035
|
-
"
|
|
22036
|
-
|
|
22037
|
-
"host-incompatible",
|
|
22038
|
-
"network",
|
|
22039
|
-
"timeout",
|
|
22040
|
-
"audio-empty",
|
|
22041
|
-
"audio-too-large",
|
|
22042
|
-
"audio-format",
|
|
22043
|
-
"audio-invalid"
|
|
22044
|
-
]);
|
|
22045
|
-
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
22046
|
-
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
22047
|
-
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
22048
|
-
]);
|
|
22308
|
+
// ../../shared-contracts/dist/host-extension-ranking.js
|
|
22309
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
22310
|
+
var CATEGORY_SEARCH_LABELS = Object.freeze({
|
|
22311
|
+
appearance: ["appearance", "外观主题"],
|
|
22312
|
+
interface: ["interface", "界面增强"],
|
|
22313
|
+
workflow: ["workflow", "效率与协作"],
|
|
22314
|
+
analytics: ["analytics", "数据与统计"],
|
|
22315
|
+
integrations: ["integrations", "外部集成"],
|
|
22316
|
+
tools: ["tools", "实用工具"]
|
|
22317
|
+
});
|
|
22049
22318
|
|
|
22050
22319
|
// ../../shared-contracts/dist/skills.js
|
|
22051
22320
|
var skillsListParamsSchema = external_exports.object({
|
|
@@ -22354,7 +22623,13 @@ var remotePeerCapabilitiesSchema = external_exports.object({
|
|
|
22354
22623
|
/** /api/peer/v1/delegation is available for fixed-whitelist cross-host delegation. */
|
|
22355
22624
|
delegation: external_exports.literal(1).optional(),
|
|
22356
22625
|
/** POST /api/peer/v1/peers is available. */
|
|
22357
|
-
peerPairing: external_exports.literal(1).optional()
|
|
22626
|
+
peerPairing: external_exports.literal(1).optional(),
|
|
22627
|
+
/** Host supports includeOperations on extensions/list and expectedVersion on extensions/update. */
|
|
22628
|
+
extensionUpdateTracking: external_exports.literal(1).optional(),
|
|
22629
|
+
/** Peer supports per-member `showInSidebar` in `codexhost/groups/member/update`. */
|
|
22630
|
+
groupMemberSidebarVisibility: external_exports.literal(1).optional(),
|
|
22631
|
+
/** Peer supports `codexhost/groups/memory/read` and `codexhost/groups/memory/update`. */
|
|
22632
|
+
groupSharedMemory: external_exports.literal(1).optional()
|
|
22358
22633
|
});
|
|
22359
22634
|
var remotePeerManifestSchema = external_exports.object({
|
|
22360
22635
|
version: external_exports.string().max(128),
|
|
@@ -26371,16 +26646,37 @@ function modelRef(modelId2) {
|
|
|
26371
26646
|
function normalizeStoredCodeBuddyModelRef(ref, catalog) {
|
|
26372
26647
|
return normalizeLegacyBase64ModelRef(ref, catalog, "cb.");
|
|
26373
26648
|
}
|
|
26374
|
-
function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
26649
|
+
function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE, nativeModels = []) {
|
|
26375
26650
|
const options = rows(value);
|
|
26376
26651
|
const get = (id2) => options.find((option) => option.id === id2) ?? {};
|
|
26377
26652
|
const model2 = get("model"), mode = get("mode"), thought = get("thought_level");
|
|
26378
|
-
const
|
|
26379
|
-
const
|
|
26380
|
-
const
|
|
26381
|
-
|
|
26382
|
-
|
|
26383
|
-
|
|
26653
|
+
const nativeThinkingOptions = rows(thought.options).map((option) => harnessThinkingOptionSchema.parse({ id: option.value, label: option.name }));
|
|
26654
|
+
const metadata = new Map(rows(nativeModels).map((row) => [row.modelId, record3(row._meta)]));
|
|
26655
|
+
const thinkingById = new Map(nativeThinkingOptions.map((option) => [option.id, option]));
|
|
26656
|
+
const models = rows(model2.options).map((option) => {
|
|
26657
|
+
const details = metadata.get(option.value);
|
|
26658
|
+
const label = text2(option.name);
|
|
26659
|
+
const rate = profile.modelRates ? /^x(\d+(?:\.\d+)?)(?:\s+credits)?$/iu.exec((text2(details?.credits) || text2(option.description)).trim()) : null;
|
|
26660
|
+
const annotatedLabel = rate ? `${label} · ${Number(rate[1]) === 0 ? "Free" : `${rate[1]}x`}` : label;
|
|
26661
|
+
let supportedThinkingOptionIds;
|
|
26662
|
+
if (details && (Array.isArray(details.effortOptions) || details.supportsReasoning === false)) {
|
|
26663
|
+
const efforts = details.supportsReasoning === false ? [] : rows(details.effortOptions);
|
|
26664
|
+
const supported = efforts.map((effort) => harnessThinkingOptionSchema.parse({ id: effort.value, label: effort.name }));
|
|
26665
|
+
const defaultOption = nativeThinkingOptions.find((entry) => entry.id === profile.defaultThinkingOptionId);
|
|
26666
|
+
if (defaultOption && details.supportsReasoning !== false) {
|
|
26667
|
+
supported.push(defaultOption);
|
|
26668
|
+
}
|
|
26669
|
+
for (const entry of supported) {
|
|
26670
|
+
thinkingById.set(entry.id, entry);
|
|
26671
|
+
}
|
|
26672
|
+
supportedThinkingOptionIds = [...new Set(supported.map((entry) => entry.id))];
|
|
26673
|
+
}
|
|
26674
|
+
return {
|
|
26675
|
+
ref: modelRef(text2(option.value)),
|
|
26676
|
+
label: annotatedLabel.length <= HARNESS_MODEL_LABEL_MAX_LENGTH ? annotatedLabel : label,
|
|
26677
|
+
...supportedThinkingOptionIds ? { supportedThinkingOptionIds } : {}
|
|
26678
|
+
};
|
|
26679
|
+
});
|
|
26384
26680
|
const currentModelRef = modelRef(text2(model2.currentValue));
|
|
26385
26681
|
let currentModel = models.find((item) => item.ref.id === currentModelRef.id);
|
|
26386
26682
|
if (!currentModel && !profile.allowUnlistedModelSelection && !currentModelRef.id.startsWith(CUSTOM_LOCAL_MODEL_PREFIX)) {
|
|
@@ -26390,17 +26686,23 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
26390
26686
|
currentModel = { ref: currentModelRef, label: text2(model2.currentValue) };
|
|
26391
26687
|
models.push(currentModel);
|
|
26392
26688
|
}
|
|
26393
|
-
if (!currentModel)
|
|
26689
|
+
if (!currentModel) {
|
|
26394
26690
|
throw new CodeBuddyError("protocolError", "ACP did not report a valid current Model");
|
|
26691
|
+
}
|
|
26692
|
+
const availableThinkingOptions = currentModel.supportedThinkingOptionIds ? currentModel.supportedThinkingOptionIds.map((id2) => thinkingById.get(id2)) : nativeThinkingOptions;
|
|
26693
|
+
const currentThinking = availableThinkingOptions.find((option) => option.id === thought.currentValue);
|
|
26694
|
+
const defaultThinking = profile.defaultThinkingOptionId ? [...thinkingById.values()].find((option) => option.id === profile.defaultThinkingOptionId) : currentThinking;
|
|
26695
|
+
const thinkingOptions = [...thinkingById.values()];
|
|
26696
|
+
const completeModelThinking = models.every((item) => item.supportedThinkingOptionIds !== void 0);
|
|
26395
26697
|
const catalog = harnessModelCatalogSchema.parse({
|
|
26396
26698
|
models: models.map((item) => ({
|
|
26397
26699
|
...item,
|
|
26398
|
-
...item === currentModel ? { supportedThinkingOptionIds:
|
|
26700
|
+
...item === currentModel && item.supportedThinkingOptionIds === void 0 ? { supportedThinkingOptionIds: availableThinkingOptions.map((option) => option.id) } : {}
|
|
26399
26701
|
})),
|
|
26400
26702
|
defaultModel: currentModel.ref,
|
|
26401
26703
|
thinkingOptions,
|
|
26402
|
-
thinkingOptionsScope: "activeModel",
|
|
26403
|
-
...
|
|
26704
|
+
thinkingOptionsScope: completeModelThinking ? "catalog" : "activeModel",
|
|
26705
|
+
...defaultThinking ? { defaultThinkingOptionId: defaultThinking.id } : {}
|
|
26404
26706
|
});
|
|
26405
26707
|
const permissionModes = harnessPermissionModeCatalogSchema.parse({
|
|
26406
26708
|
modes: rows(mode.options).map((option) => ({
|
|
@@ -26416,10 +26718,10 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
26416
26718
|
effectiveModel: currentModel.ref,
|
|
26417
26719
|
resolvedModelLabel: currentModel.label,
|
|
26418
26720
|
effectivePermissionModeId: harnessPermissionModeIdSchema.parse(mode.currentValue),
|
|
26419
|
-
availableThinkingOptions
|
|
26721
|
+
availableThinkingOptions,
|
|
26420
26722
|
...currentThinking ? { effectiveThinkingOptionId: currentThinking.id } : {}
|
|
26421
26723
|
};
|
|
26422
|
-
return { catalog, permissionModes, state, options };
|
|
26724
|
+
return { catalog, permissionModes, state, options, nativeModels };
|
|
26423
26725
|
}
|
|
26424
26726
|
function effectiveOptionValue(config2, id2) {
|
|
26425
26727
|
if (id2 === "model")
|
|
@@ -26428,10 +26730,11 @@ function effectiveOptionValue(config2, id2) {
|
|
|
26428
26730
|
}
|
|
26429
26731
|
async function selectConfiguration(config2, id2, value, profile, request) {
|
|
26430
26732
|
const option = config2?.options.find((option2) => option2.id === id2);
|
|
26431
|
-
const listed = rows(option?.options).some((option2) => option2.value === value);
|
|
26432
|
-
if (!listed && !(id2 === "model" && profile.allowUnlistedModelSelection))
|
|
26733
|
+
const listed = id2 === "thought_level" ? config2?.state.availableThinkingOptions?.some((option2) => option2.id === value) : rows(option?.options).some((option2) => option2.value === value);
|
|
26734
|
+
if (!listed && !(id2 === "model" && profile.allowUnlistedModelSelection)) {
|
|
26433
26735
|
throw new CodeBuddyError("invalidRequest", `Unavailable ${profile.displayName} ${id2} selection`);
|
|
26434
|
-
|
|
26736
|
+
}
|
|
26737
|
+
return confirmedConfiguration(await request(id2, value), id2, value, profile, config2?.nativeModels);
|
|
26435
26738
|
}
|
|
26436
26739
|
async function restoreConfiguration(config2, saved, profile, request) {
|
|
26437
26740
|
const selections = [
|
|
@@ -26450,8 +26753,9 @@ async function restoreConfiguration(config2, saved, profile, request) {
|
|
|
26450
26753
|
}
|
|
26451
26754
|
return config2;
|
|
26452
26755
|
}
|
|
26453
|
-
function confirmedConfiguration(response, id2, value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
26454
|
-
const
|
|
26756
|
+
function confirmedConfiguration(response, id2, value, profile = CODEBUDDY_RUNTIME_PROFILE, nativeModels = []) {
|
|
26757
|
+
const reply = record3(response);
|
|
26758
|
+
const result = configuration(reply.configOptions, profile, record3(reply.models).availableModels ?? nativeModels);
|
|
26455
26759
|
if (effectiveOptionValue(result, id2) !== value) {
|
|
26456
26760
|
throw new CodeBuddyError("protocolError", `ACP did not confirm ${id2}`);
|
|
26457
26761
|
}
|
|
@@ -34505,7 +34809,7 @@ var CodeBuddySession = class {
|
|
|
34505
34809
|
}
|
|
34506
34810
|
} : {}
|
|
34507
34811
|
});
|
|
34508
|
-
this.#apply(configuration(opened.configOptions, this.profile), false);
|
|
34812
|
+
this.#apply(configuration(opened.configOptions, this.profile, record3(opened.models).availableModels), false);
|
|
34509
34813
|
if (this.input.kind === "create" && this.input.executionPolicy === "unattended-full-access") {
|
|
34510
34814
|
await this.#configure("mode", "fullAccess");
|
|
34511
34815
|
} else if (this.input.permissionModeId || text2(saved.mode))
|
|
@@ -34607,8 +34911,9 @@ var CodeBuddySession = class {
|
|
|
34607
34911
|
#applyUpdate(update) {
|
|
34608
34912
|
if ((text2(record3(update._meta)["codebuddy.ai/parentToolCallId"]) || !this.#active?.output.hasItem(`tool-${text2(update.toolCallId)}`)) && this.subagents.update(update))
|
|
34609
34913
|
return;
|
|
34610
|
-
if (update.sessionUpdate === "config_option_update" && this.#config)
|
|
34611
|
-
this.#apply(configuration(update.configOptions, this.profile));
|
|
34914
|
+
if (update.sessionUpdate === "config_option_update" && this.#config) {
|
|
34915
|
+
this.#apply(configuration(update.configOptions, this.profile, this.#config.nativeModels));
|
|
34916
|
+
}
|
|
34612
34917
|
if (update.sessionUpdate === "usage_update" && typeof update.used === "number" && typeof update.size === "number" && update.size > 0) {
|
|
34613
34918
|
this.#context = {
|
|
34614
34919
|
contextUsedTokens: update.used,
|
|
@@ -34985,7 +35290,7 @@ var CodeBuddySession = class {
|
|
|
34985
35290
|
this.#client = candidate = this.#createClient();
|
|
34986
35291
|
const generation = this.#generation;
|
|
34987
35292
|
const loaded = await this.#openClient();
|
|
34988
|
-
const restored = await restoreConfiguration(configuration(loaded.configOptions, this.profile), this.#state, this.profile, this.#configurationRequest());
|
|
35293
|
+
const restored = await restoreConfiguration(configuration(loaded.configOptions, this.profile, record3(loaded.models).availableModels), this.#state, this.profile, this.#configurationRequest());
|
|
34989
35294
|
this.#assertClient(generation);
|
|
34990
35295
|
this.#apply(restored);
|
|
34991
35296
|
if (!this.profile.staticCommandCatalog)
|
|
@@ -35156,7 +35461,7 @@ var CodeBuddyAdapter = class {
|
|
|
35156
35461
|
this.#inspections.add(client2);
|
|
35157
35462
|
await client2.initialize();
|
|
35158
35463
|
const opened = await client2.open(cwd);
|
|
35159
|
-
const config2 = configuration(opened.configOptions, this.#profile);
|
|
35464
|
+
const config2 = configuration(opened.configOptions, this.#profile, record3(opened.models).availableModels);
|
|
35160
35465
|
return harnessInspectionSchema.parse({
|
|
35161
35466
|
status: "ready",
|
|
35162
35467
|
catalog: config2.catalog,
|
|
@@ -35907,6 +36212,8 @@ function workBuddyRuntimeProfile(distribution) {
|
|
|
35907
36212
|
projectDirectoryName: (cwd) => cwd.replace(/[/\\:]/gu, "-").replace(/^-+/u, "").replace(/-+$/u, "").replace(/-+/gu, "-"),
|
|
35908
36213
|
staticCommandCatalog: WORKBUDDY_COMMAND_CATALOG,
|
|
35909
36214
|
nativeCommands: true,
|
|
36215
|
+
modelRates: true,
|
|
36216
|
+
defaultThinkingOptionId: "enabled",
|
|
35910
36217
|
// Verified online on the international CLI 2.137.1. The China CLI 2.147.0 ships the same
|
|
35911
36218
|
// public `--fork-session` mode and `_codebuddy.ai/session/rollback` extension.
|
|
35912
36219
|
historyCapabilities: { fork: true, forkAcrossCwd: true, rollbackLastTurn: true }
|
|
@@ -36010,28 +36317,34 @@ async function loadWorkBuddyProductModels(environment, distribution) {
|
|
|
36010
36317
|
return [];
|
|
36011
36318
|
}
|
|
36012
36319
|
}
|
|
36013
|
-
function normalizedLabel(value) {
|
|
36014
|
-
return value.trim().toLocaleLowerCase();
|
|
36015
|
-
}
|
|
36016
36320
|
function mergeWorkBuddyProductModels(catalog, productModels) {
|
|
36017
36321
|
const refs = new Set(catalog.models.map((model2) => model2.ref.id));
|
|
36018
|
-
const
|
|
36019
|
-
const models = [...catalog.models];
|
|
36322
|
+
const models = [];
|
|
36020
36323
|
for (const productModel of productModels) {
|
|
36021
36324
|
const ref = modelRef(productModel.id);
|
|
36022
|
-
|
|
36023
|
-
if (refs.has(ref.id) || labels2.has(labelKey))
|
|
36325
|
+
if (refs.has(ref.id)) {
|
|
36024
36326
|
continue;
|
|
36327
|
+
}
|
|
36025
36328
|
refs.add(ref.id);
|
|
36026
|
-
|
|
36027
|
-
const
|
|
36028
|
-
const annotatedLabel =
|
|
36329
|
+
const creditLabel = productModel.credits?.trim().replace(/^x(\d+(?:\.\d+)?)(?:\s+credits)?$/iu, "$1x");
|
|
36330
|
+
const rateLabel = /^0+(?:\.0+)?x$/iu.test(creditLabel ?? "") ? "Free" : creditLabel;
|
|
36331
|
+
const annotatedLabel = rateLabel ? `${productModel.name} · ${rateLabel}` : productModel.name;
|
|
36029
36332
|
models.push({
|
|
36030
36333
|
ref,
|
|
36031
36334
|
label: annotatedLabel.length <= HARNESS_MODEL_LABEL_MAX_LENGTH ? annotatedLabel : productModel.name
|
|
36032
36335
|
});
|
|
36033
36336
|
}
|
|
36034
|
-
|
|
36337
|
+
if (models.length === 0) {
|
|
36338
|
+
return catalog;
|
|
36339
|
+
}
|
|
36340
|
+
return harnessModelCatalogSchema.parse({
|
|
36341
|
+
...catalog,
|
|
36342
|
+
thinkingOptionsScope: "activeModel",
|
|
36343
|
+
models: [
|
|
36344
|
+
...catalog.models.map((model2) => catalog.thinkingOptionsScope === "activeModel" || model2.supportedThinkingOptionIds !== void 0 ? model2 : { ...model2, supportedThinkingOptionIds: [] }),
|
|
36345
|
+
...models
|
|
36346
|
+
]
|
|
36347
|
+
});
|
|
36035
36348
|
}
|
|
36036
36349
|
|
|
36037
36350
|
// dist/workbuddy-adapter.js
|