@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
|
@@ -19742,26 +19742,51 @@ var jsonPrimitiveSchema = external_exports.union([
|
|
|
19742
19742
|
external_exports.boolean(),
|
|
19743
19743
|
external_exports.null()
|
|
19744
19744
|
]);
|
|
19745
|
-
function
|
|
19746
|
-
const
|
|
19747
|
-
|
|
19745
|
+
function isPlainObject2(value) {
|
|
19746
|
+
const prototype = Object.getPrototypeOf(value);
|
|
19747
|
+
return prototype === Object.prototype || prototype === null;
|
|
19748
|
+
}
|
|
19749
|
+
var JSON_VALIDATION_LEAVE = /* @__PURE__ */ Symbol("json-validation-leave");
|
|
19750
|
+
function isValidJsonValue(value) {
|
|
19751
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value)) {
|
|
19752
|
+
return true;
|
|
19753
|
+
}
|
|
19754
|
+
if (typeof value !== "object")
|
|
19755
|
+
return false;
|
|
19756
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
19757
|
+
const stack = [value];
|
|
19748
19758
|
try {
|
|
19749
19759
|
while (stack.length > 0) {
|
|
19750
|
-
const
|
|
19751
|
-
if (
|
|
19752
|
-
|
|
19753
|
-
if (frame.leaving) {
|
|
19754
|
-
ancestors.delete(frame.value);
|
|
19760
|
+
const current = stack.pop();
|
|
19761
|
+
if (current === JSON_VALIDATION_LEAVE) {
|
|
19762
|
+
ancestors.delete(stack.pop());
|
|
19755
19763
|
continue;
|
|
19756
19764
|
}
|
|
19757
|
-
if (typeof
|
|
19765
|
+
if (current === null || typeof current === "string" || typeof current === "boolean" || typeof current === "number" && Number.isFinite(current)) {
|
|
19758
19766
|
continue;
|
|
19759
|
-
|
|
19767
|
+
}
|
|
19768
|
+
if (typeof current !== "object")
|
|
19760
19769
|
return false;
|
|
19761
|
-
ancestors.
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19770
|
+
if (ancestors.has(current))
|
|
19771
|
+
return false;
|
|
19772
|
+
if (Array.isArray(current)) {
|
|
19773
|
+
ancestors.add(current);
|
|
19774
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
19775
|
+
for (let index = current.length - 1; index >= 0; index -= 1) {
|
|
19776
|
+
stack.push(current[index]);
|
|
19777
|
+
}
|
|
19778
|
+
continue;
|
|
19779
|
+
}
|
|
19780
|
+
if (!isPlainObject2(current))
|
|
19781
|
+
return false;
|
|
19782
|
+
ancestors.add(current);
|
|
19783
|
+
stack.push(current, JSON_VALIDATION_LEAVE);
|
|
19784
|
+
for (const key2 in current) {
|
|
19785
|
+
if (Object.hasOwn(current, key2)) {
|
|
19786
|
+
if (key2 === "__proto__")
|
|
19787
|
+
return false;
|
|
19788
|
+
stack.push(current[key2]);
|
|
19789
|
+
}
|
|
19765
19790
|
}
|
|
19766
19791
|
}
|
|
19767
19792
|
} catch {
|
|
@@ -19769,17 +19794,11 @@ function hasNoCircularReferences(value) {
|
|
|
19769
19794
|
}
|
|
19770
19795
|
return true;
|
|
19771
19796
|
}
|
|
19772
|
-
var
|
|
19773
|
-
message: "JSON value
|
|
19774
|
-
});
|
|
19775
|
-
var
|
|
19776
|
-
|
|
19777
|
-
external_exports.array(recursiveJsonValueSchema),
|
|
19778
|
-
external_exports.record(external_exports.string(), recursiveJsonValueSchema)
|
|
19779
|
-
]));
|
|
19780
|
-
var jsonValueSchema = nonCircularSchema.pipe(recursiveJsonValueSchema);
|
|
19781
|
-
var jsonArraySchema = nonCircularSchema.pipe(external_exports.array(recursiveJsonValueSchema));
|
|
19782
|
-
var jsonObjectSchema = nonCircularSchema.pipe(external_exports.record(external_exports.string(), recursiveJsonValueSchema));
|
|
19797
|
+
var jsonValueSchema = external_exports.custom(isValidJsonValue, {
|
|
19798
|
+
message: "Invalid JSON value"
|
|
19799
|
+
});
|
|
19800
|
+
var jsonArraySchema = external_exports.custom((value) => Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON array" });
|
|
19801
|
+
var jsonObjectSchema = external_exports.custom((value) => typeof value === "object" && value !== null && !Array.isArray(value) && isValidJsonValue(value), { message: "Invalid JSON object" });
|
|
19783
19802
|
|
|
19784
19803
|
// ../../shared-contracts/dist/errors.js
|
|
19785
19804
|
var codexhostErrorSchema = external_exports.strictObject({
|
|
@@ -20903,6 +20922,7 @@ var hostExtensionCatalogEntrySchema = external_exports.object({
|
|
|
20903
20922
|
backend: external_exports.int().positive().optional()
|
|
20904
20923
|
}),
|
|
20905
20924
|
downloadUrl: downloadUrl.refine((url2) => url2.startsWith("https://"), "Expected HTTPS"),
|
|
20925
|
+
downloads7d: external_exports.number().int().min(0).optional(),
|
|
20906
20926
|
featured: external_exports.boolean().optional(),
|
|
20907
20927
|
featuredOrder: external_exports.int().nonnegative().optional(),
|
|
20908
20928
|
changelog: external_exports.array(hostExtensionChangelogEntrySchema).max(20).optional()
|
|
@@ -20972,24 +20992,42 @@ var hostExtensionInstallationSchema = external_exports.strictObject({
|
|
|
20972
20992
|
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);
|
|
20973
20993
|
var desktopConflict = { desktopConflictWith: hostExtensionIdSchema.optional() };
|
|
20974
20994
|
var backendState = external_exports.enum(["none", "inactive", "starting", "running", "failed"]);
|
|
20995
|
+
var HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH = 512;
|
|
20996
|
+
var hostExtensionOperationStatusSchema = external_exports.discriminatedUnion("state", [
|
|
20997
|
+
external_exports.object({
|
|
20998
|
+
state: external_exports.literal("updating"),
|
|
20999
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21000
|
+
startedAt: external_exports.iso.datetime()
|
|
21001
|
+
}),
|
|
21002
|
+
external_exports.object({
|
|
21003
|
+
state: external_exports.literal("failed"),
|
|
21004
|
+
targetVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21005
|
+
startedAt: external_exports.iso.datetime(),
|
|
21006
|
+
updatedAt: external_exports.iso.datetime(),
|
|
21007
|
+
error: external_exports.string().min(1).max(HOST_EXTENSION_OPERATION_ERROR_MAX_LENGTH),
|
|
21008
|
+
interruptedByShutdown: external_exports.boolean().optional()
|
|
21009
|
+
})
|
|
21010
|
+
]);
|
|
20975
21011
|
var hostExtensionListItemSchema = external_exports.discriminatedUnion("state", [
|
|
20976
|
-
|
|
21012
|
+
external_exports.object({
|
|
21013
|
+
...hostExtensionInstallationSchema.shape,
|
|
20977
21014
|
state: external_exports.literal("valid"),
|
|
20978
21015
|
enabled: external_exports.boolean(),
|
|
20979
21016
|
...desktopConflict,
|
|
20980
21017
|
iconDataUrl: rasterDataUrlSchema(DESKTOP_EXTENSION_ICON_MAX_BYTES).optional(),
|
|
20981
21018
|
screenshotDataUrls: external_exports.array(rasterDataUrlSchema(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT).optional(),
|
|
20982
21019
|
backendState: backendState.optional(),
|
|
20983
|
-
backendError: external_exports.string().optional()
|
|
21020
|
+
backendError: external_exports.string().optional(),
|
|
21021
|
+
operation: hostExtensionOperationStatusSchema.optional()
|
|
20984
21022
|
}),
|
|
20985
|
-
external_exports.
|
|
21023
|
+
external_exports.object({
|
|
20986
21024
|
state: external_exports.enum(["invalid", "incompatible"]),
|
|
20987
21025
|
id: external_exports.string().min(1),
|
|
20988
21026
|
enabled: external_exports.boolean(),
|
|
20989
21027
|
error: external_exports.string()
|
|
20990
21028
|
})
|
|
20991
21029
|
]);
|
|
20992
|
-
var hostExtensionsListResultSchema = external_exports.
|
|
21030
|
+
var hostExtensionsListResultSchema = external_exports.object({
|
|
20993
21031
|
revision: hostExtensionRevisionSchema,
|
|
20994
21032
|
configuration: hostExtensionConfigurationSchema,
|
|
20995
21033
|
diagnostics: external_exports.array(external_exports.string()),
|
|
@@ -21028,7 +21066,10 @@ var methods = new Set(HOST_EXTENSION_MANAGEMENT_METHODS);
|
|
|
21028
21066
|
var noParams = external_exports.strictObject({});
|
|
21029
21067
|
var expectedRevision = { expectedRevision: hostExtensionRevisionSchema };
|
|
21030
21068
|
var selection = external_exports.strictObject({ ...id, ...expectedRevision });
|
|
21031
|
-
var installationResult =
|
|
21069
|
+
var installationResult = external_exports.object({
|
|
21070
|
+
...hostExtensionInstallationSchema.shape,
|
|
21071
|
+
replaced: external_exports.boolean()
|
|
21072
|
+
});
|
|
21032
21073
|
var mutationResult = external_exports.discriminatedUnion("state", [
|
|
21033
21074
|
external_exports.strictObject({ state: external_exports.literal("saved"), configuration: hostExtensionConfigurationSchema }),
|
|
21034
21075
|
external_exports.strictObject({ state: external_exports.literal("revision-conflict"), revision: hostExtensionRevisionSchema })
|
|
@@ -21057,7 +21098,12 @@ var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
|
21057
21098
|
values: jsonObjectSchema
|
|
21058
21099
|
});
|
|
21059
21100
|
var hostExtensionsRpcSchemas = {
|
|
21060
|
-
[HOST_EXTENSIONS_RPC.list]: {
|
|
21101
|
+
[HOST_EXTENSIONS_RPC.list]: {
|
|
21102
|
+
params: external_exports.object({
|
|
21103
|
+
includeOperations: external_exports.boolean().optional()
|
|
21104
|
+
}),
|
|
21105
|
+
result: hostExtensionsListResultSchema
|
|
21106
|
+
},
|
|
21061
21107
|
[HOST_EXTENSIONS_RPC.snapshot]: { params: noParams, result: hostExtensionsSnapshotResultSchema },
|
|
21062
21108
|
[HOST_EXTENSIONS_RPC.catalog]: {
|
|
21063
21109
|
params: external_exports.strictObject({
|
|
@@ -21083,6 +21129,7 @@ var hostExtensionsRpcSchemas = {
|
|
|
21083
21129
|
...id,
|
|
21084
21130
|
expectedDigest: active.digest,
|
|
21085
21131
|
expectedActivationId: active.activationId.optional(),
|
|
21132
|
+
expectedVersion: external_exports.string().trim().min(1).max(128).optional(),
|
|
21086
21133
|
source: hostExtensionInstallSourceSchema.optional()
|
|
21087
21134
|
}),
|
|
21088
21135
|
result: installationResult
|
|
@@ -21132,9 +21179,39 @@ var hostExtensionsRpcSchemas = {
|
|
|
21132
21179
|
};
|
|
21133
21180
|
|
|
21134
21181
|
// ../../shared-contracts/dist/group-chat.js
|
|
21135
|
-
var
|
|
21136
|
-
var
|
|
21182
|
+
var GROUP_MEMORY_MAX_BYTES = 4096;
|
|
21183
|
+
var DEFAULT_GROUP_MAX_AGENT_HOPS = 10;
|
|
21184
|
+
var MAX_GROUP_AGENT_HOPS = 200;
|
|
21137
21185
|
var GROUP_NOTICE_MAX_LENGTH = 2e3;
|
|
21186
|
+
var cachedUtf8Encoder;
|
|
21187
|
+
function groupUtf8ByteLength(text3) {
|
|
21188
|
+
if (cachedUtf8Encoder === void 0) {
|
|
21189
|
+
cachedUtf8Encoder = typeof TextEncoder === "function" ? new TextEncoder() : null;
|
|
21190
|
+
}
|
|
21191
|
+
if (cachedUtf8Encoder !== null) {
|
|
21192
|
+
return cachedUtf8Encoder.encode(text3).length;
|
|
21193
|
+
}
|
|
21194
|
+
let bytes = 0;
|
|
21195
|
+
for (let i = 0; i < text3.length; i += 1) {
|
|
21196
|
+
const code = text3.charCodeAt(i);
|
|
21197
|
+
if (code <= 127) {
|
|
21198
|
+
bytes += 1;
|
|
21199
|
+
} else if (code <= 2047) {
|
|
21200
|
+
bytes += 2;
|
|
21201
|
+
} else if (code >= 55296 && code <= 56319 && i + 1 < text3.length) {
|
|
21202
|
+
const next = text3.charCodeAt(i + 1);
|
|
21203
|
+
if (next >= 56320 && next <= 57343) {
|
|
21204
|
+
bytes += 4;
|
|
21205
|
+
i += 1;
|
|
21206
|
+
} else {
|
|
21207
|
+
bytes += 3;
|
|
21208
|
+
}
|
|
21209
|
+
} else {
|
|
21210
|
+
bytes += 3;
|
|
21211
|
+
}
|
|
21212
|
+
}
|
|
21213
|
+
return bytes;
|
|
21214
|
+
}
|
|
21138
21215
|
var remoteGroupRoomIdSchema = external_exports.string().regex(/^remote:[A-Za-z0-9_-]{8,512}$/u);
|
|
21139
21216
|
var groupRoomIdSchema = external_exports.union([external_exports.uuidv4(), remoteGroupRoomIdSchema]);
|
|
21140
21217
|
var groupMemberIdSchema = external_exports.uuidv4();
|
|
@@ -21143,7 +21220,7 @@ var groupUnmentionedPolicySchema = external_exports.enum(["none", "last_speaker"
|
|
|
21143
21220
|
var groupMemberStatusSchema = external_exports.enum(["active", "muted", "removed"]);
|
|
21144
21221
|
var nonnegativeInteger = external_exports.int().nonnegative();
|
|
21145
21222
|
var positiveInteger = external_exports.int().positive();
|
|
21146
|
-
var maxAgentHopsSchema =
|
|
21223
|
+
var maxAgentHopsSchema = nonnegativeInteger.max(MAX_GROUP_AGENT_HOPS);
|
|
21147
21224
|
var nonblankString = external_exports.string().refine((value) => value.trim().length > 0);
|
|
21148
21225
|
var timestamp = external_exports.iso.datetime();
|
|
21149
21226
|
var optionalMemberEdits = {
|
|
@@ -21162,9 +21239,11 @@ var groupMemberSchema = external_exports.object({
|
|
|
21162
21239
|
harnessId: harnessIdSchema,
|
|
21163
21240
|
status: groupMemberStatusSchema,
|
|
21164
21241
|
projectless: external_exports.boolean().optional(),
|
|
21242
|
+
showInSidebar: external_exports.boolean().optional(),
|
|
21165
21243
|
joinedAtSeq: nonnegativeInteger,
|
|
21166
21244
|
lastDeliveredSeq: nonnegativeInteger,
|
|
21167
21245
|
lastRosterVersion: nonnegativeInteger,
|
|
21246
|
+
lastMemoryVersion: nonnegativeInteger.default(0),
|
|
21168
21247
|
createdAt: timestamp
|
|
21169
21248
|
});
|
|
21170
21249
|
var groupProjectlessWorkspaceSchema = external_exports.object({
|
|
@@ -21176,19 +21255,25 @@ var groupRoomRemoteHostSchema = external_exports.object({
|
|
|
21176
21255
|
displayName: nonblankString,
|
|
21177
21256
|
state: nonblankString.optional(),
|
|
21178
21257
|
color: external_exports.string().optional(),
|
|
21179
|
-
filePreview: external_exports.boolean().optional()
|
|
21258
|
+
filePreview: external_exports.boolean().optional(),
|
|
21259
|
+
memberSidebarVisibility: external_exports.boolean().optional(),
|
|
21260
|
+
sharedMemory: external_exports.boolean().optional()
|
|
21180
21261
|
});
|
|
21181
|
-
var
|
|
21262
|
+
var groupRoomObjectSchema = external_exports.object({
|
|
21182
21263
|
roomId: groupRoomIdSchema,
|
|
21183
21264
|
title: nonblankString,
|
|
21184
21265
|
defaultCwd: nonblankString,
|
|
21185
21266
|
projectlessWorkspace: groupProjectlessWorkspaceSchema.optional(),
|
|
21186
21267
|
unmentionedPolicy: groupUnmentionedPolicySchema.default("none"),
|
|
21268
|
+
unmentionedMemberId: groupMemberIdSchema.optional(),
|
|
21187
21269
|
allowAgentMentions: external_exports.boolean().default(true),
|
|
21188
21270
|
maxAgentHops: maxAgentHopsSchema.default(DEFAULT_GROUP_MAX_AGENT_HOPS),
|
|
21271
|
+
relayHopLimit: maxAgentHopsSchema.optional(),
|
|
21189
21272
|
lastSeq: nonnegativeInteger,
|
|
21190
21273
|
lastSpeakerMemberId: groupMemberIdSchema.optional(),
|
|
21191
21274
|
rosterVersion: nonnegativeInteger,
|
|
21275
|
+
memoryVersion: nonnegativeInteger.default(0),
|
|
21276
|
+
memorySha256: external_exports.string().regex(/^[0-9a-f]{64}$/u).optional(),
|
|
21192
21277
|
humanEpoch: nonnegativeInteger,
|
|
21193
21278
|
relayPaused: external_exports.boolean(),
|
|
21194
21279
|
pinned: external_exports.boolean(),
|
|
@@ -21196,7 +21281,14 @@ var groupRoomSchema = external_exports.object({
|
|
|
21196
21281
|
updatedAt: timestamp,
|
|
21197
21282
|
members: external_exports.array(groupMemberSchema),
|
|
21198
21283
|
remote: groupRoomRemoteHostSchema.optional()
|
|
21199
|
-
}).superRefine(({ members: members2 }, context) => {
|
|
21284
|
+
}).superRefine(({ members: members2, unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21285
|
+
if (unmentionedMemberId !== void 0 && unmentionedPolicy !== "none") {
|
|
21286
|
+
context.addIssue({
|
|
21287
|
+
code: "custom",
|
|
21288
|
+
path: ["unmentionedMemberId"],
|
|
21289
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21290
|
+
});
|
|
21291
|
+
}
|
|
21200
21292
|
const handles = /* @__PURE__ */ new Set();
|
|
21201
21293
|
for (const [index, { handle, status }] of members2.entries()) {
|
|
21202
21294
|
if (status === "removed")
|
|
@@ -21211,6 +21303,15 @@ var groupRoomSchema = external_exports.object({
|
|
|
21211
21303
|
handles.add(handle);
|
|
21212
21304
|
}
|
|
21213
21305
|
});
|
|
21306
|
+
var groupRoomSchema = external_exports.preprocess((value) => {
|
|
21307
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
21308
|
+
const record3 = value;
|
|
21309
|
+
if (record3.unmentionedPolicy === "member" && record3.unmentionedMemberId !== void 0) {
|
|
21310
|
+
return { ...record3, unmentionedPolicy: "none" };
|
|
21311
|
+
}
|
|
21312
|
+
}
|
|
21313
|
+
return value;
|
|
21314
|
+
}, groupRoomObjectSchema);
|
|
21214
21315
|
var groupAttachmentSchema = external_exports.object({
|
|
21215
21316
|
kind: external_exports.enum(["image", "file"]),
|
|
21216
21317
|
attachmentId: nonblankString.max(256),
|
|
@@ -21237,6 +21338,7 @@ var groupMessageSchema = external_exports.object({
|
|
|
21237
21338
|
mentionedMemberIds: external_exports.array(groupMemberIdSchema),
|
|
21238
21339
|
mentionAll: external_exports.boolean().optional(),
|
|
21239
21340
|
hopCount: nonnegativeInteger,
|
|
21341
|
+
durationMs: nonnegativeInteger.optional(),
|
|
21240
21342
|
createdAt: timestamp
|
|
21241
21343
|
});
|
|
21242
21344
|
var newThreadOptions = {
|
|
@@ -21266,6 +21368,8 @@ var GROUPS_REMOVE_MEMBER_METHOD = "codexhost/groups/member/remove";
|
|
|
21266
21368
|
var GROUPS_REBIND_MEMBER_METHOD = "codexhost/groups/member/rebind";
|
|
21267
21369
|
var GROUPS_POST_MESSAGE_METHOD = "codexhost/groups/message/post";
|
|
21268
21370
|
var GROUPS_READ_MESSAGES_METHOD = "codexhost/groups/messages/read";
|
|
21371
|
+
var GROUPS_READ_MEMORY_METHOD = "codexhost/groups/memory/read";
|
|
21372
|
+
var GROUPS_UPDATE_MEMORY_METHOD = "codexhost/groups/memory/update";
|
|
21269
21373
|
var GROUPS_INSPECT_CWD_METHOD = "codexhost/groups/cwd/inspect";
|
|
21270
21374
|
var roomIdentity = { roomId: groupRoomIdSchema };
|
|
21271
21375
|
var memberIdentity = { ...roomIdentity, memberId: groupMemberIdSchema };
|
|
@@ -21296,8 +21400,17 @@ var groupsCreateResultSchema = external_exports.object({ room: groupRoomSchema }
|
|
|
21296
21400
|
var groupsUpdateParamsSchema = external_exports.strictObject({
|
|
21297
21401
|
...roomIdentity,
|
|
21298
21402
|
...roomEdits,
|
|
21403
|
+
unmentionedMemberId: groupMemberIdSchema.nullable().optional(),
|
|
21299
21404
|
pinned: external_exports.boolean().optional(),
|
|
21300
21405
|
relayPaused: external_exports.boolean().optional()
|
|
21406
|
+
}).superRefine(({ unmentionedPolicy, unmentionedMemberId }, context) => {
|
|
21407
|
+
if (unmentionedMemberId !== void 0 && unmentionedMemberId !== null && unmentionedPolicy !== void 0 && unmentionedPolicy !== "none") {
|
|
21408
|
+
context.addIssue({
|
|
21409
|
+
code: "custom",
|
|
21410
|
+
path: ["unmentionedMemberId"],
|
|
21411
|
+
message: 'A default member can only be set when unmentionedPolicy is "none"'
|
|
21412
|
+
});
|
|
21413
|
+
}
|
|
21301
21414
|
});
|
|
21302
21415
|
var groupsDeleteParamsSchema = external_exports.strictObject(roomIdentity);
|
|
21303
21416
|
var groupsDeleteResultSchema = external_exports.object({ deleted: external_exports.boolean() });
|
|
@@ -21312,7 +21425,8 @@ var groupsAddMemberResultSchema = external_exports.object({
|
|
|
21312
21425
|
var groupsUpdateMemberParamsSchema = external_exports.strictObject({
|
|
21313
21426
|
...memberIdentity,
|
|
21314
21427
|
...optionalMemberEdits,
|
|
21315
|
-
status: groupMemberStatusSchema.optional()
|
|
21428
|
+
status: groupMemberStatusSchema.optional(),
|
|
21429
|
+
showInSidebar: external_exports.boolean().optional()
|
|
21316
21430
|
});
|
|
21317
21431
|
var groupsRemoveMemberParamsSchema = external_exports.strictObject(memberIdentity);
|
|
21318
21432
|
var groupsRebindMemberParamsSchema = external_exports.strictObject({
|
|
@@ -21415,6 +21529,24 @@ var groupsReadMessagesResultSchema = external_exports.object({
|
|
|
21415
21529
|
messages: external_exports.array(groupMessageSchema),
|
|
21416
21530
|
totalSeq: nonnegativeInteger
|
|
21417
21531
|
});
|
|
21532
|
+
var groupsReadMemoryParamsSchema = external_exports.strictObject(roomIdentity);
|
|
21533
|
+
var groupsReadMemoryResultSchema = external_exports.object({
|
|
21534
|
+
...roomIdentity,
|
|
21535
|
+
memoryVersion: nonnegativeInteger,
|
|
21536
|
+
content: external_exports.string(),
|
|
21537
|
+
updatedAt: timestamp
|
|
21538
|
+
});
|
|
21539
|
+
var groupsUpdateMemoryParamsSchema = external_exports.strictObject({
|
|
21540
|
+
...roomIdentity,
|
|
21541
|
+
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`),
|
|
21542
|
+
expectedVersion: nonnegativeInteger.optional()
|
|
21543
|
+
});
|
|
21544
|
+
var groupsUpdateMemoryResultSchema = external_exports.object({
|
|
21545
|
+
room: groupRoomSchema,
|
|
21546
|
+
memoryVersion: nonnegativeInteger,
|
|
21547
|
+
content: external_exports.string(),
|
|
21548
|
+
updatedAt: timestamp
|
|
21549
|
+
});
|
|
21418
21550
|
var groupsInspectCwdParamsSchema = external_exports.strictObject({
|
|
21419
21551
|
cwd: nonblankString,
|
|
21420
21552
|
roomId: groupRoomIdSchema.optional()
|
|
@@ -21550,6 +21682,149 @@ var nativeCodexGoalResultSchema = external_exports.object({
|
|
|
21550
21682
|
}).nullable()
|
|
21551
21683
|
});
|
|
21552
21684
|
|
|
21685
|
+
// ../../shared-contracts/dist/voice.js
|
|
21686
|
+
var VOICE_AUDIO_MAX_BYTES = 10 * 1024 * 1024;
|
|
21687
|
+
var VOICE_CONFIG_GET_METHOD = "codexhost/voice/config/get";
|
|
21688
|
+
var VOICE_CONFIG_SET_METHOD = "codexhost/voice/config/set";
|
|
21689
|
+
var voiceProviderModeSchema = external_exports.enum([
|
|
21690
|
+
"codex",
|
|
21691
|
+
"openai-compatible",
|
|
21692
|
+
"deepseek-asr",
|
|
21693
|
+
"openai-chat-audio"
|
|
21694
|
+
]);
|
|
21695
|
+
var voiceAudioFormatSchema = external_exports.enum(["native", "wav"]);
|
|
21696
|
+
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;
|
|
21697
|
+
function isLoopbackVoiceHost(hostname3) {
|
|
21698
|
+
const bare = hostname3.trim().toLowerCase().replace(/^\[|\]$/g, "");
|
|
21699
|
+
if (bare === "localhost" || bare.endsWith(".localhost") || bare === "::1")
|
|
21700
|
+
return true;
|
|
21701
|
+
return /^127(?:\.(?:25[0-5]|2[0-4]\d|1?\d?\d)){3}$/.test(bare);
|
|
21702
|
+
}
|
|
21703
|
+
function isValidVoiceBaseUrl(value) {
|
|
21704
|
+
const trimmed = value.trim();
|
|
21705
|
+
if (!trimmed)
|
|
21706
|
+
return false;
|
|
21707
|
+
try {
|
|
21708
|
+
const parsed = new URL(trimmed);
|
|
21709
|
+
if (!parsed.hostname)
|
|
21710
|
+
return false;
|
|
21711
|
+
if (parsed.username !== "" || parsed.password !== "" || parsed.hash !== "")
|
|
21712
|
+
return false;
|
|
21713
|
+
if (parsed.protocol === "https:") {
|
|
21714
|
+
} else if (parsed.protocol === "http:") {
|
|
21715
|
+
if (!isLoopbackVoiceHost(parsed.hostname))
|
|
21716
|
+
return false;
|
|
21717
|
+
} else {
|
|
21718
|
+
return false;
|
|
21719
|
+
}
|
|
21720
|
+
for (const key2 of parsed.searchParams.keys()) {
|
|
21721
|
+
if (SENSITIVE_VOICE_QUERY_PARAM.test(key2))
|
|
21722
|
+
return false;
|
|
21723
|
+
}
|
|
21724
|
+
return true;
|
|
21725
|
+
} catch {
|
|
21726
|
+
return false;
|
|
21727
|
+
}
|
|
21728
|
+
}
|
|
21729
|
+
var voiceBaseUrlSchema = external_exports.string().max(2048).refine((value) => value === "" || isValidVoiceBaseUrl(value), {
|
|
21730
|
+
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"
|
|
21731
|
+
});
|
|
21732
|
+
var voiceProviderConfigSnapshotSchema = external_exports.object({
|
|
21733
|
+
baseUrl: voiceBaseUrlSchema,
|
|
21734
|
+
model: external_exports.string().max(256),
|
|
21735
|
+
hasApiKey: external_exports.boolean(),
|
|
21736
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
21737
|
+
apiKey: external_exports.never().optional()
|
|
21738
|
+
});
|
|
21739
|
+
var voiceConfigSnapshotSchema = external_exports.object({
|
|
21740
|
+
mode: voiceProviderModeSchema,
|
|
21741
|
+
baseUrl: voiceBaseUrlSchema,
|
|
21742
|
+
model: external_exports.string().max(256),
|
|
21743
|
+
hasApiKey: external_exports.boolean(),
|
|
21744
|
+
apiKeyHint: external_exports.string().max(64).optional(),
|
|
21745
|
+
apiKey: external_exports.never().optional(),
|
|
21746
|
+
audioFormat: voiceAudioFormatSchema.optional(),
|
|
21747
|
+
providers: external_exports.object({
|
|
21748
|
+
"openai-compatible": voiceProviderConfigSnapshotSchema,
|
|
21749
|
+
"deepseek-asr": voiceProviderConfigSnapshotSchema,
|
|
21750
|
+
"openai-chat-audio": voiceProviderConfigSnapshotSchema
|
|
21751
|
+
}).optional(),
|
|
21752
|
+
codexAvailable: external_exports.boolean(),
|
|
21753
|
+
available: external_exports.boolean()
|
|
21754
|
+
});
|
|
21755
|
+
var voiceConfigUpdateParamsSchema = external_exports.object({
|
|
21756
|
+
mode: voiceProviderModeSchema,
|
|
21757
|
+
baseUrl: external_exports.string().max(2048).optional(),
|
|
21758
|
+
model: external_exports.string().max(256).optional(),
|
|
21759
|
+
apiKey: external_exports.string().max(4096).nullable().optional()
|
|
21760
|
+
}).strict().superRefine((value, ctx) => {
|
|
21761
|
+
const trimmedBaseUrl = value.baseUrl?.trim() ?? "";
|
|
21762
|
+
const trimmedModel = value.model?.trim() ?? "";
|
|
21763
|
+
if (value.mode === "openai-compatible") {
|
|
21764
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21765
|
+
ctx.addIssue({
|
|
21766
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21767
|
+
path: ["baseUrl"],
|
|
21768
|
+
message: "OpenAI-compatible mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
21769
|
+
});
|
|
21770
|
+
}
|
|
21771
|
+
return;
|
|
21772
|
+
}
|
|
21773
|
+
if (value.mode === "openai-chat-audio") {
|
|
21774
|
+
if (!isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21775
|
+
ctx.addIssue({
|
|
21776
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21777
|
+
path: ["baseUrl"],
|
|
21778
|
+
message: "Multimodal Chat Audio mode requires a valid https:// base URL (http:// is allowed only for loopback hosts)"
|
|
21779
|
+
});
|
|
21780
|
+
}
|
|
21781
|
+
if (!trimmedModel) {
|
|
21782
|
+
ctx.addIssue({
|
|
21783
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21784
|
+
path: ["model"],
|
|
21785
|
+
message: "Multimodal Chat Audio mode requires a model name"
|
|
21786
|
+
});
|
|
21787
|
+
}
|
|
21788
|
+
return;
|
|
21789
|
+
}
|
|
21790
|
+
if (trimmedBaseUrl !== "" && !isValidVoiceBaseUrl(trimmedBaseUrl)) {
|
|
21791
|
+
ctx.addIssue({
|
|
21792
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21793
|
+
path: ["baseUrl"],
|
|
21794
|
+
message: "Base URL must be empty or a valid https:// URL (http:// is allowed only for loopback hosts)"
|
|
21795
|
+
});
|
|
21796
|
+
}
|
|
21797
|
+
});
|
|
21798
|
+
var voiceAudioMimeTypeSchema = external_exports.string().regex(/^audio\/[a-z0-9.+-]+(?:\s*;[^\r\n]*)?$/i);
|
|
21799
|
+
var voiceStatusResultSchema = external_exports.object({
|
|
21800
|
+
available: external_exports.boolean(),
|
|
21801
|
+
audioFormat: voiceAudioFormatSchema.optional()
|
|
21802
|
+
});
|
|
21803
|
+
var voiceTranscribeParamsSchema = external_exports.object({ path: external_exports.string().min(1), mimeType: voiceAudioMimeTypeSchema }).strict();
|
|
21804
|
+
var voiceErrorCodeSchema = external_exports.enum([
|
|
21805
|
+
"credentials-unavailable",
|
|
21806
|
+
"login-expired",
|
|
21807
|
+
"rate-limited",
|
|
21808
|
+
"service-rejected",
|
|
21809
|
+
"host-incompatible",
|
|
21810
|
+
"network",
|
|
21811
|
+
"timeout",
|
|
21812
|
+
"audio-empty",
|
|
21813
|
+
"audio-too-large",
|
|
21814
|
+
"audio-format",
|
|
21815
|
+
"audio-invalid"
|
|
21816
|
+
]);
|
|
21817
|
+
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
21818
|
+
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
21819
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
21820
|
+
]);
|
|
21821
|
+
|
|
21822
|
+
// ../../shared-contracts/dist/github-star.js
|
|
21823
|
+
var GITHUB_STAR_STATUS_METHOD = "codexhost/githubStar/status";
|
|
21824
|
+
var GITHUB_STAR_ADD_METHOD = "codexhost/githubStar/star";
|
|
21825
|
+
var githubStarParamsSchema = external_exports.object({}).strict();
|
|
21826
|
+
var githubStarStateSchema = external_exports.object({ ghAvailable: external_exports.boolean(), starred: external_exports.boolean() });
|
|
21827
|
+
|
|
21553
21828
|
// ../../shared-contracts/dist/client-channel.js
|
|
21554
21829
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
21555
21830
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -21611,9 +21886,13 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21611
21886
|
GROUPS_REBIND_MEMBER_METHOD,
|
|
21612
21887
|
GROUPS_POST_MESSAGE_METHOD,
|
|
21613
21888
|
GROUPS_READ_MESSAGES_METHOD,
|
|
21889
|
+
GROUPS_READ_MEMORY_METHOD,
|
|
21890
|
+
GROUPS_UPDATE_MEMORY_METHOD,
|
|
21614
21891
|
GROUPS_INSPECT_CWD_METHOD,
|
|
21615
21892
|
"codexhost/voice/status",
|
|
21616
21893
|
"codexhost/voice/transcribe",
|
|
21894
|
+
VOICE_CONFIG_GET_METHOD,
|
|
21895
|
+
VOICE_CONFIG_SET_METHOD,
|
|
21617
21896
|
"codexhost/harness/display-settings/get",
|
|
21618
21897
|
"codexhost/harness/display-settings/set",
|
|
21619
21898
|
"codexhost/harness/display-settings/capabilities",
|
|
@@ -21679,6 +21958,8 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21679
21958
|
"codexhost/harness/session-import/list",
|
|
21680
21959
|
"codexhost/harness/session-import/import",
|
|
21681
21960
|
// Host settings shared across Desktop and Web.
|
|
21961
|
+
GITHUB_STAR_STATUS_METHOD,
|
|
21962
|
+
GITHUB_STAR_ADD_METHOD,
|
|
21682
21963
|
...HOST_EXTENSION_MANAGEMENT_METHODS,
|
|
21683
21964
|
"codexhost/harness/installation",
|
|
21684
21965
|
"codexhost/harness/installation/start",
|
|
@@ -22018,28 +22299,16 @@ var extensionActivitySchema = external_exports.strictObject({
|
|
|
22018
22299
|
})).max(256)
|
|
22019
22300
|
});
|
|
22020
22301
|
|
|
22021
|
-
// ../../shared-contracts/dist/
|
|
22022
|
-
var
|
|
22023
|
-
var
|
|
22024
|
-
|
|
22025
|
-
|
|
22026
|
-
|
|
22027
|
-
"
|
|
22028
|
-
"
|
|
22029
|
-
"
|
|
22030
|
-
|
|
22031
|
-
"host-incompatible",
|
|
22032
|
-
"network",
|
|
22033
|
-
"timeout",
|
|
22034
|
-
"audio-empty",
|
|
22035
|
-
"audio-too-large",
|
|
22036
|
-
"audio-format",
|
|
22037
|
-
"audio-invalid"
|
|
22038
|
-
]);
|
|
22039
|
-
var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
22040
|
-
external_exports.object({ ok: external_exports.literal(true), text: external_exports.string() }).strict(),
|
|
22041
|
-
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
22042
|
-
]);
|
|
22302
|
+
// ../../shared-contracts/dist/host-extension-ranking.js
|
|
22303
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
22304
|
+
var CATEGORY_SEARCH_LABELS = Object.freeze({
|
|
22305
|
+
appearance: ["appearance", "外观主题"],
|
|
22306
|
+
interface: ["interface", "界面增强"],
|
|
22307
|
+
workflow: ["workflow", "效率与协作"],
|
|
22308
|
+
analytics: ["analytics", "数据与统计"],
|
|
22309
|
+
integrations: ["integrations", "外部集成"],
|
|
22310
|
+
tools: ["tools", "实用工具"]
|
|
22311
|
+
});
|
|
22043
22312
|
|
|
22044
22313
|
// ../../shared-contracts/dist/skills.js
|
|
22045
22314
|
var skillsListParamsSchema = external_exports.object({
|
|
@@ -22348,7 +22617,13 @@ var remotePeerCapabilitiesSchema = external_exports.object({
|
|
|
22348
22617
|
/** /api/peer/v1/delegation is available for fixed-whitelist cross-host delegation. */
|
|
22349
22618
|
delegation: external_exports.literal(1).optional(),
|
|
22350
22619
|
/** POST /api/peer/v1/peers is available. */
|
|
22351
|
-
peerPairing: external_exports.literal(1).optional()
|
|
22620
|
+
peerPairing: external_exports.literal(1).optional(),
|
|
22621
|
+
/** Host supports includeOperations on extensions/list and expectedVersion on extensions/update. */
|
|
22622
|
+
extensionUpdateTracking: external_exports.literal(1).optional(),
|
|
22623
|
+
/** Peer supports per-member `showInSidebar` in `codexhost/groups/member/update`. */
|
|
22624
|
+
groupMemberSidebarVisibility: external_exports.literal(1).optional(),
|
|
22625
|
+
/** Peer supports `codexhost/groups/memory/read` and `codexhost/groups/memory/update`. */
|
|
22626
|
+
groupSharedMemory: external_exports.literal(1).optional()
|
|
22352
22627
|
});
|
|
22353
22628
|
var remotePeerManifestSchema = external_exports.object({
|
|
22354
22629
|
version: external_exports.string().max(128),
|
|
@@ -24776,9 +25051,120 @@ async function stamp(file2) {
|
|
|
24776
25051
|
throw new Error("Codex rollout is not a regular file");
|
|
24777
25052
|
return `${s.dev}:${s.ino}:${s.size}:${s.mtimeNs}:${s.ctimeNs}`;
|
|
24778
25053
|
}
|
|
25054
|
+
async function dirStamp(directory) {
|
|
25055
|
+
try {
|
|
25056
|
+
const s = await lstat(directory, { bigint: true });
|
|
25057
|
+
if (!s.isDirectory())
|
|
25058
|
+
return "NOTDIR";
|
|
25059
|
+
return `${s.dev}:${s.ino}:${s.mtimeNs}:${s.ctimeNs}`;
|
|
25060
|
+
} catch (error62) {
|
|
25061
|
+
if (error62.code === "ENOENT")
|
|
25062
|
+
return "ENOENT";
|
|
25063
|
+
throw error62;
|
|
25064
|
+
}
|
|
25065
|
+
}
|
|
24779
25066
|
function fingerprint(files, extra = "") {
|
|
24780
25067
|
return createHash("sha256").update(JSON.stringify(files)).update(extra).digest("hex");
|
|
24781
25068
|
}
|
|
25069
|
+
var DATE_BUCKET_DIR = /^\d{2,4}$/u;
|
|
25070
|
+
function codexHome(environment) {
|
|
25071
|
+
return path.resolve(environment.CODEX_HOME || path.join(environment.HOME || environment.USERPROFILE || os.homedir(), ".codex"));
|
|
25072
|
+
}
|
|
25073
|
+
async function captureCodexSourceDirectories(environment, files, signal) {
|
|
25074
|
+
const home = codexHome(environment);
|
|
25075
|
+
const roots = [path.join(home, "sessions"), path.join(home, "archived_sessions")];
|
|
25076
|
+
const dirs = new Set(roots);
|
|
25077
|
+
for (const file2 of files) {
|
|
25078
|
+
let current = path.dirname(path.resolve(file2));
|
|
25079
|
+
for (let depth = 0; depth <= 4; depth++) {
|
|
25080
|
+
dirs.add(current);
|
|
25081
|
+
if (roots.includes(current))
|
|
25082
|
+
break;
|
|
25083
|
+
const parent = path.dirname(current);
|
|
25084
|
+
if (parent === current)
|
|
25085
|
+
break;
|
|
25086
|
+
current = parent;
|
|
25087
|
+
}
|
|
25088
|
+
}
|
|
25089
|
+
const watches = [];
|
|
25090
|
+
for (const dir of [...dirs].sort((a, b) => a.localeCompare(b))) {
|
|
25091
|
+
signal.throwIfAborted();
|
|
25092
|
+
const currentStamp = await dirStamp(dir);
|
|
25093
|
+
const knownDateSubdirs = /* @__PURE__ */ new Set();
|
|
25094
|
+
if (currentStamp !== "ENOENT" && currentStamp !== "NOTDIR") {
|
|
25095
|
+
const entries = await readdir(dir, { withFileTypes: true }).catch((error62) => {
|
|
25096
|
+
const code = error62.code;
|
|
25097
|
+
if (code === "ENOENT" || code === "EACCES" || code === "EPERM")
|
|
25098
|
+
return [];
|
|
25099
|
+
throw error62;
|
|
25100
|
+
});
|
|
25101
|
+
for (const entry of entries) {
|
|
25102
|
+
if (entry.isDirectory() && DATE_BUCKET_DIR.test(entry.name)) {
|
|
25103
|
+
knownDateSubdirs.add(entry.name);
|
|
25104
|
+
}
|
|
25105
|
+
}
|
|
25106
|
+
}
|
|
25107
|
+
watches.push({ dir, stamp: currentStamp, knownDateSubdirs });
|
|
25108
|
+
}
|
|
25109
|
+
return watches;
|
|
25110
|
+
}
|
|
25111
|
+
async function codexSourceDirectoriesChangedForSession(sessionId, knownFiles, watches, signal) {
|
|
25112
|
+
const known = new Set(knownFiles.map((file2) => path.resolve(file2)));
|
|
25113
|
+
for (const watch of watches) {
|
|
25114
|
+
signal.throwIfAborted();
|
|
25115
|
+
let currentStamp;
|
|
25116
|
+
try {
|
|
25117
|
+
currentStamp = await dirStamp(watch.dir);
|
|
25118
|
+
} catch (error62) {
|
|
25119
|
+
if (signal.aborted)
|
|
25120
|
+
throw error62;
|
|
25121
|
+
return true;
|
|
25122
|
+
}
|
|
25123
|
+
if (currentStamp === watch.stamp)
|
|
25124
|
+
continue;
|
|
25125
|
+
if (currentStamp === "ENOENT" || currentStamp === "NOTDIR") {
|
|
25126
|
+
if (watch.stamp !== "ENOENT")
|
|
25127
|
+
return true;
|
|
25128
|
+
continue;
|
|
25129
|
+
}
|
|
25130
|
+
let entries;
|
|
25131
|
+
try {
|
|
25132
|
+
entries = await readdir(watch.dir, { withFileTypes: true });
|
|
25133
|
+
} catch (error62) {
|
|
25134
|
+
if (signal.aborted)
|
|
25135
|
+
throw error62;
|
|
25136
|
+
return true;
|
|
25137
|
+
}
|
|
25138
|
+
for (const entry of entries) {
|
|
25139
|
+
if (entry.isFile()) {
|
|
25140
|
+
const thread3 = ROLLOUT.exec(entry.name)?.[1];
|
|
25141
|
+
if (thread3 === sessionId && !known.has(path.resolve(watch.dir, entry.name))) {
|
|
25142
|
+
return true;
|
|
25143
|
+
}
|
|
25144
|
+
} else if (entry.isDirectory() && DATE_BUCKET_DIR.test(entry.name) && !watch.knownDateSubdirs.has(entry.name)) {
|
|
25145
|
+
return true;
|
|
25146
|
+
}
|
|
25147
|
+
}
|
|
25148
|
+
watch.stamp = currentStamp;
|
|
25149
|
+
}
|
|
25150
|
+
return false;
|
|
25151
|
+
}
|
|
25152
|
+
async function fingerprintCodexSourceFiles(files, signal) {
|
|
25153
|
+
if (files.length === 0)
|
|
25154
|
+
return void 0;
|
|
25155
|
+
try {
|
|
25156
|
+
const stamped = await Promise.all(files.map(async (file2) => {
|
|
25157
|
+
signal.throwIfAborted();
|
|
25158
|
+
return { file: file2, fingerprint: await stamp(file2) };
|
|
25159
|
+
}));
|
|
25160
|
+
signal.throwIfAborted();
|
|
25161
|
+
return fingerprint(stamped, "");
|
|
25162
|
+
} catch (error62) {
|
|
25163
|
+
if (signal.aborted)
|
|
25164
|
+
throw error62;
|
|
25165
|
+
return void 0;
|
|
25166
|
+
}
|
|
25167
|
+
}
|
|
24782
25168
|
function typedPrompt(value) {
|
|
24783
25169
|
if (typeof value !== "string")
|
|
24784
25170
|
return void 0;
|
|
@@ -25049,6 +25435,9 @@ function createCodexUsageStatistics(environment, options = {}) {
|
|
|
25049
25435
|
}
|
|
25050
25436
|
return result;
|
|
25051
25437
|
},
|
|
25438
|
+
sourceFiles(id2) {
|
|
25439
|
+
return groups.get(id2)?.files.map((entry) => entry.file);
|
|
25440
|
+
},
|
|
25052
25441
|
async readSource(id2, signal) {
|
|
25053
25442
|
signal.throwIfAborted();
|
|
25054
25443
|
const group = groups.get(id2);
|
|
@@ -25400,14 +25789,20 @@ function rolloutTokenSnapshot(info) {
|
|
|
25400
25789
|
// dist/session-history.js
|
|
25401
25790
|
function createCodexSessionHistoryReader(environment) {
|
|
25402
25791
|
const cache = /* @__PURE__ */ new Map();
|
|
25403
|
-
const
|
|
25792
|
+
const dependencyMatches = async (dependency, signal) => {
|
|
25793
|
+
const fast = await fingerprintCodexSourceFiles(dependency.files, signal);
|
|
25794
|
+
if (fast !== dependency.fingerprint)
|
|
25795
|
+
return false;
|
|
25796
|
+
const dirsChanged = await codexSourceDirectoriesChangedForSession(dependency.sessionId, dependency.files, dependency.directories, signal);
|
|
25797
|
+
return !dirsChanged;
|
|
25798
|
+
};
|
|
25404
25799
|
const read = async (sessionId, signal, limit, ancestors = []) => {
|
|
25405
25800
|
if (ancestors.includes(sessionId) || ancestors.length >= 16)
|
|
25406
25801
|
throw new Error("Invalid Codex history ancestry");
|
|
25407
25802
|
const key2 = JSON.stringify([sessionId, limit]);
|
|
25408
25803
|
const cached2 = cache.get(key2);
|
|
25409
25804
|
if (cached2) {
|
|
25410
|
-
const matches2 = await Promise.all(cached2.dependencies.map(
|
|
25805
|
+
const matches2 = await Promise.all(cached2.dependencies.map((d) => dependencyMatches(d, signal)));
|
|
25411
25806
|
if (matches2.every(Boolean))
|
|
25412
25807
|
return cached2;
|
|
25413
25808
|
}
|
|
@@ -25439,8 +25834,16 @@ function createCodexSessionHistoryReader(environment) {
|
|
|
25439
25834
|
const source = (await reader.listSources(signal))[0];
|
|
25440
25835
|
if (!source)
|
|
25441
25836
|
return null;
|
|
25837
|
+
const sourceFiles = reader.sourceFiles(source.id) ?? [];
|
|
25838
|
+
const sourceDirectories = await captureCodexSourceDirectories(environment, sourceFiles, signal);
|
|
25442
25839
|
let entries = await reader.readSource(source.id, signal);
|
|
25443
|
-
const
|
|
25840
|
+
const selfDependency = {
|
|
25841
|
+
sessionId,
|
|
25842
|
+
files: sourceFiles,
|
|
25843
|
+
directories: sourceDirectories,
|
|
25844
|
+
fingerprint: source.fingerprint
|
|
25845
|
+
};
|
|
25846
|
+
const dependencies = [selfDependency];
|
|
25444
25847
|
if (inherited) {
|
|
25445
25848
|
const base = object2(inherited.history_base);
|
|
25446
25849
|
const parentId = base?.thread_id;
|
|
@@ -25476,7 +25879,7 @@ function createCodexSessionHistoryReader(environment) {
|
|
|
25476
25879
|
}
|
|
25477
25880
|
}
|
|
25478
25881
|
}
|
|
25479
|
-
if (await
|
|
25882
|
+
if (!await dependencyMatches(selfDependency, signal))
|
|
25480
25883
|
throw new Error("Codex rollout changed while restoring history");
|
|
25481
25884
|
const inputTokens = entries.reduce((sum, r) => sum + r.inputTokens, 0);
|
|
25482
25885
|
const outputTokens = entries.reduce((sum, r) => sum + r.outputTokens, 0);
|