@codexhost/cli-darwin-x64 0.12.1 → 0.13.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/THIRD_PARTY_NOTICES.txt +8 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +232 -21
- package/app/console-web.js +5434 -1092
- package/app/desktop-controller.mjs +252 -41
- package/app/host-runtime.mjs +5318 -1448
- package/app/plugins/antigravity/manifest.json +18 -1
- package/app/plugins/antigravity/plugin.mjs +276 -42
- package/app/plugins/claude-code/manifest.json +28 -0
- package/app/plugins/claude-code/plugin.mjs +1049 -359
- package/app/plugins/codebuddy/manifest.json +17 -0
- package/app/plugins/codebuddy/plugin.mjs +5931 -5358
- package/app/plugins/codex-usage/manifest.json +9 -0
- package/app/plugins/codex-usage/plugin.mjs +16703 -0
- package/app/plugins/cursor-cli/manifest.json +17 -0
- package/app/plugins/cursor-cli/plugin.mjs +351 -77
- package/app/plugins/deepseek-harness/assets/icon.svg +1 -0
- package/app/plugins/deepseek-harness/manifest.json +35 -2
- package/app/plugins/deepseek-harness/plugin.mjs +798 -242
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/manifest.json +21 -1
- package/app/plugins/grok/plugin.mjs +884 -259
- package/app/plugins/hermes/assets/icon.png +0 -0
- package/app/plugins/hermes/manifest.json +30 -2
- package/app/plugins/hermes/plugin.mjs +278 -33
- package/app/plugins/kimi-code/assets/icon.svg +5 -0
- package/app/plugins/kimi-code/manifest.json +25 -2
- package/app/plugins/kimi-code/plugin.mjs +555 -36
- package/app/plugins/kiro-cli/assets/kiro-agent.svg +11 -0
- package/app/plugins/kiro-cli/manifest.json +18 -1
- package/app/plugins/kiro-cli/plugin.mjs +284 -22
- package/app/plugins/omp/manifest.json +21 -1
- package/app/plugins/omp/plugin.mjs +2737 -1956
- package/app/plugins/opencode/manifest.json +18 -1
- package/app/plugins/opencode/plugin.mjs +694 -147
- package/app/plugins/pi/manifest.json +32 -0
- package/app/plugins/pi/plugin.mjs +2809 -2254
- package/app/plugins/qoder/manifest.json +18 -1
- package/app/plugins/qoder/plugin.mjs +585 -81
- package/app/plugins/qoder-cn/manifest.json +18 -1
- package/app/plugins/qoder-cn/plugin.mjs +585 -81
- package/app/plugins/workbuddy/manifest.json +18 -0
- package/app/plugins/workbuddy/plugin.mjs +6317 -5746
- package/app/plugins/zcode/manifest.json +19 -1
- package/app/plugins/zcode/plugin.mjs +1066 -260
- package/app/renderer-extension.js +1999 -1686
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/licenses/Cordis-LICENSE.txt +21 -0
- package/licenses/Cosmokit-LICENSE.txt +21 -0
- package/package.json +1 -1
- package/app/plugins/kiro-cli/assets/icon.svg +0 -5
|
@@ -4915,8 +4915,8 @@ function az_default() {
|
|
|
4915
4915
|
}
|
|
4916
4916
|
|
|
4917
4917
|
// node_modules/zod/v4/locales/be.js
|
|
4918
|
-
function getBelarusianPlural(
|
|
4919
|
-
const absCount = Math.abs(
|
|
4918
|
+
function getBelarusianPlural(count2, one, few, many) {
|
|
4919
|
+
const absCount = Math.abs(count2);
|
|
4920
4920
|
const lastDigit = absCount % 10;
|
|
4921
4921
|
const lastTwoDigits = absCount % 100;
|
|
4922
4922
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -6994,8 +6994,8 @@ function hu_default() {
|
|
|
6994
6994
|
}
|
|
6995
6995
|
|
|
6996
6996
|
// node_modules/zod/v4/locales/hy.js
|
|
6997
|
-
function getArmenianPlural(
|
|
6998
|
-
return Math.abs(
|
|
6997
|
+
function getArmenianPlural(count2, one, many) {
|
|
6998
|
+
return Math.abs(count2) === 1 ? one : many;
|
|
6999
6999
|
}
|
|
7000
7000
|
function withDefiniteArticle(word) {
|
|
7001
7001
|
if (!word)
|
|
@@ -9123,8 +9123,8 @@ function ro_default() {
|
|
|
9123
9123
|
}
|
|
9124
9124
|
|
|
9125
9125
|
// node_modules/zod/v4/locales/ru.js
|
|
9126
|
-
function getRussianPlural(
|
|
9127
|
-
const absCount = Math.abs(
|
|
9126
|
+
function getRussianPlural(count2, one, few, many) {
|
|
9127
|
+
const absCount = Math.abs(count2);
|
|
9128
9128
|
const lastDigit = absCount % 10;
|
|
9129
9129
|
const lastTwoDigits = absCount % 100;
|
|
9130
9130
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -14793,6 +14793,16 @@ function date4(params) {
|
|
|
14793
14793
|
// node_modules/zod/v4/classic/external.js
|
|
14794
14794
|
config(en_default());
|
|
14795
14795
|
|
|
14796
|
+
// packages/shared-contracts/dist/delegation-read.js
|
|
14797
|
+
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
14798
|
+
var REMOTE_THREAD_CONTROL_TIMEOUT_MS = 4e4;
|
|
14799
|
+
var delegationReadParamsSchema = external_exports.strictObject({
|
|
14800
|
+
threadId: external_exports.string().min(1).max(1024),
|
|
14801
|
+
view: external_exports.enum(["result", "messages"]),
|
|
14802
|
+
cursor: external_exports.string().min(1).max(8192).optional(),
|
|
14803
|
+
limit: external_exports.number().int().min(1).max(100).optional()
|
|
14804
|
+
});
|
|
14805
|
+
|
|
14796
14806
|
// packages/shared-contracts/dist/credential-imports.js
|
|
14797
14807
|
var credentialSourceSchema = external_exports.object({
|
|
14798
14808
|
id: external_exports.string().min(1).max(256),
|
|
@@ -14863,6 +14873,153 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
14863
14873
|
initializeOnly: external_exports.boolean().optional()
|
|
14864
14874
|
});
|
|
14865
14875
|
|
|
14876
|
+
// packages/shared-contracts/dist/model-price-overrides.js
|
|
14877
|
+
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
14878
|
+
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
14879
|
+
input: usdPerMillionTokens,
|
|
14880
|
+
output: usdPerMillionTokens,
|
|
14881
|
+
cacheRead: usdPerMillionTokens.optional(),
|
|
14882
|
+
cacheWrite: usdPerMillionTokens.optional(),
|
|
14883
|
+
cacheWrite1h: usdPerMillionTokens.optional()
|
|
14884
|
+
});
|
|
14885
|
+
var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
|
|
14886
|
+
var modelPriceOverridesSchema = external_exports.strictObject({
|
|
14887
|
+
/** Absolute path of the Host's `pricing.json`. */
|
|
14888
|
+
path: external_exports.string(),
|
|
14889
|
+
entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
|
|
14890
|
+
/** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
|
|
14891
|
+
error: external_exports.string().nullable()
|
|
14892
|
+
});
|
|
14893
|
+
var modelPriceOverridesGetSchema = external_exports.strictObject({});
|
|
14894
|
+
var modelPriceOverridesSetSchema = external_exports.strictObject({
|
|
14895
|
+
key: modelPriceKeySchema,
|
|
14896
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
14897
|
+
previousKey: modelPriceKeySchema.optional()
|
|
14898
|
+
});
|
|
14899
|
+
var modelPriceDefaultParamsSchema = external_exports.strictObject({
|
|
14900
|
+
model: modelPriceKeySchema
|
|
14901
|
+
});
|
|
14902
|
+
var modelPriceSuggestionSchema = external_exports.strictObject({
|
|
14903
|
+
/** Verified from catalog canonical links, not inferred from names or equal prices. */
|
|
14904
|
+
official: external_exports.boolean().optional(),
|
|
14905
|
+
canonicalModelId: external_exports.string().min(1).optional(),
|
|
14906
|
+
provider: external_exports.string().min(1).max(512),
|
|
14907
|
+
model: external_exports.string().min(1).max(512),
|
|
14908
|
+
price: modelPriceOverrideSchema
|
|
14909
|
+
});
|
|
14910
|
+
var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
14911
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
14912
|
+
/** Local catalog suggestions only; never used automatically for pricing. */
|
|
14913
|
+
suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
|
|
14914
|
+
});
|
|
14915
|
+
|
|
14916
|
+
// packages/shared-contracts/dist/usage-statistics.js
|
|
14917
|
+
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
14918
|
+
var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
14919
|
+
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
14920
|
+
var harness = external_exports.string().min(1).max(128);
|
|
14921
|
+
var model = external_exports.string().min(1).max(512);
|
|
14922
|
+
var project = external_exports.string().min(1).max(4096);
|
|
14923
|
+
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
14924
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
14925
|
+
harness: harness.optional(),
|
|
14926
|
+
model: model.nullable().optional(),
|
|
14927
|
+
project: project.nullable().optional(),
|
|
14928
|
+
/** One local date inside the range. */
|
|
14929
|
+
date: localDate.optional()
|
|
14930
|
+
});
|
|
14931
|
+
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
14932
|
+
requests: count,
|
|
14933
|
+
inputTokens: count,
|
|
14934
|
+
cachedInputTokens: count,
|
|
14935
|
+
cacheWriteInputTokens: count,
|
|
14936
|
+
cacheKnownInputTokens: count,
|
|
14937
|
+
outputTokens: count,
|
|
14938
|
+
reasoningOutputTokens: count,
|
|
14939
|
+
/** USD at the public price, summed over the priced requests only. */
|
|
14940
|
+
costUsd: external_exports.number().finite().min(0),
|
|
14941
|
+
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
14942
|
+
unpricedRequests: count,
|
|
14943
|
+
/**
|
|
14944
|
+
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
14945
|
+
* cost, and not as unpriced.
|
|
14946
|
+
*/
|
|
14947
|
+
unmeteredRequests: count
|
|
14948
|
+
});
|
|
14949
|
+
var totals = usageStatisticsTotalsSchema.shape;
|
|
14950
|
+
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
14951
|
+
harness,
|
|
14952
|
+
sessionId: external_exports.string().min(1).max(512),
|
|
14953
|
+
project: project.nullable(),
|
|
14954
|
+
/** Models the session used, most requests first. */
|
|
14955
|
+
models: external_exports.array(model).max(16),
|
|
14956
|
+
firstAtMs: count,
|
|
14957
|
+
lastAtMs: count,
|
|
14958
|
+
...totals
|
|
14959
|
+
});
|
|
14960
|
+
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
14961
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
14962
|
+
/** First local date of the range; null for all time. */
|
|
14963
|
+
from: localDate.nullable(),
|
|
14964
|
+
to: localDate,
|
|
14965
|
+
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
14966
|
+
filters: external_exports.strictObject({
|
|
14967
|
+
harness: harness.nullable(),
|
|
14968
|
+
model: model.nullable(),
|
|
14969
|
+
unknownModel: external_exports.boolean(),
|
|
14970
|
+
project: project.nullable(),
|
|
14971
|
+
unknownProject: external_exports.boolean(),
|
|
14972
|
+
date: localDate.nullable()
|
|
14973
|
+
}),
|
|
14974
|
+
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
14975
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
|
|
14976
|
+
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
14977
|
+
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
14978
|
+
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
14979
|
+
options: external_exports.strictObject({
|
|
14980
|
+
harnesses: external_exports.array(harness).max(256),
|
|
14981
|
+
models: external_exports.array(model.nullable()).max(4096),
|
|
14982
|
+
projects: external_exports.array(project.nullable()).max(4096)
|
|
14983
|
+
}),
|
|
14984
|
+
/** Current display metadata, scoped by Harness. Never a pricing or filter identity.
|
|
14985
|
+
* Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
|
|
14986
|
+
*/
|
|
14987
|
+
modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
|
|
14988
|
+
/** Native credits, all filters applied, never combined across Harnesses or treated as USD.
|
|
14989
|
+
* Only groups with at least one reported value appear; reportedRequests exposes partial data.
|
|
14990
|
+
*/
|
|
14991
|
+
credits: external_exports.array(external_exports.strictObject({
|
|
14992
|
+
harness,
|
|
14993
|
+
model: model.nullable(),
|
|
14994
|
+
credits: external_exports.number().finite().min(0),
|
|
14995
|
+
reportedRequests: count,
|
|
14996
|
+
requests: count
|
|
14997
|
+
})).max(4096).optional(),
|
|
14998
|
+
/** All filters applied. */
|
|
14999
|
+
totals: usageStatisticsTotalsSchema,
|
|
15000
|
+
/** Each date and Harness of the range: every filter except the day. */
|
|
15001
|
+
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15002
|
+
/** Local weekday (0 = Sunday) and hour, all filters applied. */
|
|
15003
|
+
hourly: external_exports.array(external_exports.strictObject({
|
|
15004
|
+
weekday: external_exports.number().int().min(0).max(6),
|
|
15005
|
+
hour: external_exports.number().int().min(0).max(23),
|
|
15006
|
+
...totals
|
|
15007
|
+
})).max(168),
|
|
15008
|
+
byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
|
|
15009
|
+
byModel: external_exports.array(external_exports.strictObject({
|
|
15010
|
+
model: model.nullable(),
|
|
15011
|
+
...totals,
|
|
15012
|
+
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
15013
|
+
harnessPricedRequests: count
|
|
15014
|
+
})).max(4096),
|
|
15015
|
+
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
15016
|
+
/**
|
|
15017
|
+
* The sessions that spent the most, by cost and by tokens without cache, all filters applied;
|
|
15018
|
+
* requests without a native session are not listed here but count everywhere else.
|
|
15019
|
+
*/
|
|
15020
|
+
sessions: external_exports.array(usageStatisticsSessionSchema).max(100)
|
|
15021
|
+
});
|
|
15022
|
+
|
|
14866
15023
|
// packages/shared-contracts/dist/ids.js
|
|
14867
15024
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14868
15025
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -14910,6 +15067,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
14910
15067
|
"codexhost/account/list",
|
|
14911
15068
|
"codexhost/account/refresh",
|
|
14912
15069
|
"codexhost/account/usage/inspect",
|
|
15070
|
+
"codexhost/usage/model-prices/get",
|
|
15071
|
+
"codexhost/usage/model-prices/set",
|
|
15072
|
+
"codexhost/usage/model-prices/default",
|
|
15073
|
+
"codexhost/usage/statistics/get",
|
|
14913
15074
|
"codexhost/update/check",
|
|
14914
15075
|
"codexhost/update/start",
|
|
14915
15076
|
"codexhost/update/status"
|
|
@@ -14974,6 +15135,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14974
15135
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14975
15136
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14976
15137
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15138
|
+
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14977
15139
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14978
15140
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14979
15141
|
totalCostUsd: finiteNonNegativeNumberSchema.optional(),
|
|
@@ -14985,7 +15147,11 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14985
15147
|
planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14986
15148
|
planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14987
15149
|
planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14988
|
-
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
|
|
15150
|
+
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
15151
|
+
sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
|
|
15152
|
+
timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
|
|
15153
|
+
costSource: external_exports.enum(["publicPrice", "native"]).optional(),
|
|
15154
|
+
unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
|
|
14989
15155
|
}).strict().superRefine((usage, context) => {
|
|
14990
15156
|
if (Object.keys(usage).length === 0) {
|
|
14991
15157
|
context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
|
|
@@ -15006,6 +15172,20 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15006
15172
|
path: ["contextWindowTokens"]
|
|
15007
15173
|
});
|
|
15008
15174
|
}
|
|
15175
|
+
if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
|
|
15176
|
+
context.addIssue({
|
|
15177
|
+
code: "custom",
|
|
15178
|
+
message: "Thread Usage costSource must be provided with totalCostUsd",
|
|
15179
|
+
path: ["costSource"]
|
|
15180
|
+
});
|
|
15181
|
+
}
|
|
15182
|
+
if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
|
|
15183
|
+
context.addIssue({
|
|
15184
|
+
code: "custom",
|
|
15185
|
+
message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
|
|
15186
|
+
path: ["unpricedModels"]
|
|
15187
|
+
});
|
|
15188
|
+
}
|
|
15009
15189
|
if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
|
|
15010
15190
|
context.addIssue({
|
|
15011
15191
|
code: "custom",
|
|
@@ -15260,27 +15440,27 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15260
15440
|
}).strict().superRefine((catalog, context) => {
|
|
15261
15441
|
const refs = /* @__PURE__ */ new Set();
|
|
15262
15442
|
const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
|
|
15263
|
-
for (const [index,
|
|
15264
|
-
if (refs.has(
|
|
15443
|
+
for (const [index, model2] of catalog.models.entries()) {
|
|
15444
|
+
if (refs.has(model2.ref.id)) {
|
|
15265
15445
|
context.addIssue({
|
|
15266
15446
|
code: "custom",
|
|
15267
15447
|
message: "Model Catalog refs must be unique",
|
|
15268
15448
|
path: ["models", index, "ref", "id"]
|
|
15269
15449
|
});
|
|
15270
15450
|
}
|
|
15271
|
-
refs.add(
|
|
15272
|
-
if (
|
|
15273
|
-
if (refs.has(
|
|
15451
|
+
refs.add(model2.ref.id);
|
|
15452
|
+
if (model2.fastModel) {
|
|
15453
|
+
if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
|
|
15274
15454
|
context.addIssue({
|
|
15275
15455
|
code: "custom",
|
|
15276
15456
|
message: "Fast Model refs must be distinct and unique",
|
|
15277
15457
|
path: ["models", index, "fastModel"]
|
|
15278
15458
|
});
|
|
15279
15459
|
}
|
|
15280
|
-
refs.add(
|
|
15460
|
+
refs.add(model2.fastModel.id);
|
|
15281
15461
|
}
|
|
15282
15462
|
const supportedThinkingIds = /* @__PURE__ */ new Set();
|
|
15283
|
-
for (const [optionIndex, optionId] of (
|
|
15463
|
+
for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
|
|
15284
15464
|
if (supportedThinkingIds.has(optionId)) {
|
|
15285
15465
|
context.addIssue({
|
|
15286
15466
|
code: "custom",
|
|
@@ -15474,13 +15654,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
|
|
|
15474
15654
|
var harnessPluginIdSchema = external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/u).refine((id) => id !== "codex", "The official Codex identity is reserved").pipe(harnessIdSchema);
|
|
15475
15655
|
var relativeResourceSchema = external_exports.string().min(1).max(512).refine((value) => !/[\\\u0000:#?]/u.test(value) && !value.startsWith("/") && !value.split("/").some((part) => part === ".." || part === ""), "Plugin resources must be relative paths inside the plugin");
|
|
15476
15656
|
var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
|
|
15657
|
+
var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
|
|
15658
|
+
var harnessInstallationGuideSchema = external_exports.object({
|
|
15659
|
+
commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
|
|
15660
|
+
before: localizedTextSchema.optional(),
|
|
15661
|
+
after: localizedTextSchema.optional(),
|
|
15662
|
+
downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
|
|
15663
|
+
}).strict();
|
|
15477
15664
|
var pluginPresentationShape = {
|
|
15478
15665
|
id: harnessPluginIdSchema,
|
|
15479
15666
|
name: external_exports.string().trim().min(1).max(128),
|
|
15480
15667
|
version: external_exports.string().min(1).max(128),
|
|
15668
|
+
/** Capability-only plugin; omitted for existing session-capable plugins. */
|
|
15669
|
+
kind: external_exports.literal("usage").optional(),
|
|
15670
|
+
/** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
|
|
15671
|
+
iconStyle: external_exports.object({
|
|
15672
|
+
vector: external_exports.object({
|
|
15673
|
+
viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
|
|
15674
|
+
color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
|
|
15675
|
+
paths: external_exports.array(external_exports.object({
|
|
15676
|
+
d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
|
|
15677
|
+
fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
|
|
15678
|
+
fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
|
|
15679
|
+
}).strict()).min(1).max(32)
|
|
15680
|
+
}).strict().optional(),
|
|
15681
|
+
background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
|
|
15682
|
+
borderRadius: external_exports.number().min(0).max(50).optional(),
|
|
15683
|
+
paddingRatio: external_exports.number().min(0).max(0.25).optional()
|
|
15684
|
+
}).strict().optional(),
|
|
15685
|
+
installation: harnessInstallationGuideSchema.optional(),
|
|
15686
|
+
notice: localizedTextSchema.optional(),
|
|
15481
15687
|
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
15482
15688
|
launchCommand: external_exports.literal(true).optional(),
|
|
15483
15689
|
links: external_exports.object({
|
|
15690
|
+
website: documentationUrlSchema.optional(),
|
|
15484
15691
|
documentation: documentationUrlSchema.optional(),
|
|
15485
15692
|
installation: documentationUrlSchema.optional()
|
|
15486
15693
|
}).strict().optional()
|
|
@@ -15894,6 +16101,11 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
15894
16101
|
});
|
|
15895
16102
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
15896
16103
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16104
|
+
external_exports.strictObject({
|
|
16105
|
+
action: external_exports.literal("read-thread"),
|
|
16106
|
+
hostId: hostId.refine((id) => id !== "local"),
|
|
16107
|
+
input: delegationReadParamsSchema
|
|
16108
|
+
}),
|
|
15897
16109
|
external_exports.strictObject({
|
|
15898
16110
|
action: external_exports.literal("save"),
|
|
15899
16111
|
draft: codexSshDraftSchema,
|
|
@@ -16051,10 +16263,25 @@ async function startControllerAttachmentServer(options) {
|
|
|
16051
16263
|
respond(socket, "rejected");
|
|
16052
16264
|
return;
|
|
16053
16265
|
}
|
|
16054
|
-
socket.setTimeout(
|
|
16266
|
+
socket.setTimeout(
|
|
16267
|
+
input.action === "read-thread" ? REMOTE_THREAD_CONTROL_TIMEOUT_MS : 3e4,
|
|
16268
|
+
() => socket.destroy()
|
|
16269
|
+
);
|
|
16055
16270
|
const operation = options.remoteConnections;
|
|
16056
16271
|
void Promise.resolve().then(() => operation(input)).then(
|
|
16057
|
-
(reply) =>
|
|
16272
|
+
(reply) => {
|
|
16273
|
+
const serialized = JSON.stringify(reply) + "\n";
|
|
16274
|
+
if (input.action === "read-thread" && Buffer.byteLength(serialized) > REMOTE_THREAD_REPLY_MAX_BYTES) {
|
|
16275
|
+
socket.end(
|
|
16276
|
+
JSON.stringify({
|
|
16277
|
+
error: {
|
|
16278
|
+
code: -32094,
|
|
16279
|
+
message: "Thread snapshot exceeds the 16 MiB response limit; reduce the message page size. Oversized individual results are not supported."
|
|
16280
|
+
}
|
|
16281
|
+
}) + "\n"
|
|
16282
|
+
);
|
|
16283
|
+
} else socket.end(serialized);
|
|
16284
|
+
},
|
|
16058
16285
|
() => socket.end(
|
|
16059
16286
|
JSON.stringify({
|
|
16060
16287
|
error: {
|
|
@@ -16848,14 +17075,14 @@ function createDraftPrewarmPolicyBridge(manager, bridge, hostId2, target, prewar
|
|
|
16848
17075
|
throw new Error("Renderer request manager is retired");
|
|
16849
17076
|
return manager;
|
|
16850
17077
|
},
|
|
16851
|
-
select(
|
|
17078
|
+
select(model2) {
|
|
16852
17079
|
if (disposed || isCurrentManager && !isCurrentManager())
|
|
16853
17080
|
throw new Error("Renderer request manager is retired");
|
|
16854
|
-
if (
|
|
17081
|
+
if (model2 !== null && (typeof model2 !== "string" || !model2.startsWith("codexhost/"))) {
|
|
16855
17082
|
throw new Error("Draft route Model must be a codexhost transport carrier");
|
|
16856
17083
|
}
|
|
16857
|
-
if (selectedModel ===
|
|
16858
|
-
selectedModel =
|
|
17084
|
+
if (selectedModel === model2) return false;
|
|
17085
|
+
selectedModel = model2;
|
|
16859
17086
|
prewarmGeneration += 1;
|
|
16860
17087
|
discardExternalPrewarms();
|
|
16861
17088
|
return true;
|
|
@@ -17207,8 +17434,10 @@ function awaitWithSignal(promise2, signal, timeoutMessage) {
|
|
|
17207
17434
|
});
|
|
17208
17435
|
}
|
|
17209
17436
|
function sameAgents(actual, expected) {
|
|
17437
|
+
if (!actual.includes("codex") || new Set(actual).size !== actual.length) return false;
|
|
17438
|
+
if (!expected) return true;
|
|
17210
17439
|
const expectedSet = new Set(expected);
|
|
17211
|
-
return actual.length === expected.length &&
|
|
17440
|
+
return actual.length === expected.length && actual.every((agent) => expectedSet.has(agent));
|
|
17212
17441
|
}
|
|
17213
17442
|
function isPrimaryRendererUrl(value) {
|
|
17214
17443
|
try {
|
|
@@ -17421,7 +17650,7 @@ var defaultOperations = {
|
|
|
17421
17650
|
installDraftPrewarmPolicy: installRendererDraftPrewarmPolicyDirect
|
|
17422
17651
|
};
|
|
17423
17652
|
async function createRendererCdpControlSession(options) {
|
|
17424
|
-
const enabledAgents = options.enabledAgents
|
|
17653
|
+
const enabledAgents = options.enabledAgents;
|
|
17425
17654
|
const timeoutMs = options.timeoutMs ?? 3e4;
|
|
17426
17655
|
const pollIntervalMs = options.pollIntervalMs ?? 250;
|
|
17427
17656
|
const operations = options.operations ?? defaultOperations;
|
|
@@ -17617,25 +17846,7 @@ async function runDesktopController(options, signal, dependencies = defaultDepen
|
|
|
17617
17846
|
rendererCdpEndpoint: options.rendererCdpEndpoint,
|
|
17618
17847
|
rendererSource: `${RENDERER_CSP_BOOTSTRAP}
|
|
17619
17848
|
${rendererSource}`,
|
|
17620
|
-
|
|
17621
|
-
"codex",
|
|
17622
|
-
"pi",
|
|
17623
|
-
"claude-code",
|
|
17624
|
-
"deepseek-harness",
|
|
17625
|
-
"opencode",
|
|
17626
|
-
"grok",
|
|
17627
|
-
"omp",
|
|
17628
|
-
"antigravity",
|
|
17629
|
-
"kiro-cli",
|
|
17630
|
-
"codebuddy",
|
|
17631
|
-
"workbuddy",
|
|
17632
|
-
"cursor-cli",
|
|
17633
|
-
"hermes",
|
|
17634
|
-
"qoder",
|
|
17635
|
-
"qoder-cn",
|
|
17636
|
-
"kimi-code",
|
|
17637
|
-
"zcode"
|
|
17638
|
-
],
|
|
17849
|
+
// External Agents are discovered from each target Host after installation.
|
|
17639
17850
|
timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS,
|
|
17640
17851
|
signal
|
|
17641
17852
|
},
|