@codexhost/cli-darwin-x64 0.12.2 → 0.13.1
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 +9 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +319 -64
- package/app/console-web.js +5089 -1367
- package/app/desktop-controller.mjs +259 -41
- package/app/host-runtime.mjs +5735 -1564
- package/app/plugins/antigravity/manifest.json +18 -1
- package/app/plugins/antigravity/plugin.mjs +282 -41
- package/app/plugins/claude-code/manifest.json +28 -0
- package/app/plugins/claude-code/plugin.mjs +35300 -23918
- package/app/plugins/codebuddy/manifest.json +17 -0
- package/app/plugins/codebuddy/plugin.mjs +5971 -5355
- package/app/plugins/codex-usage/manifest.json +9 -0
- package/app/plugins/codex-usage/plugin.mjs +17324 -0
- package/app/plugins/cursor-cli/manifest.json +17 -0
- package/app/plugins/cursor-cli/plugin.mjs +357 -76
- 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 +822 -241
- package/app/plugins/enabled.json +2 -1
- package/app/plugins/grok/manifest.json +21 -1
- package/app/plugins/grok/plugin.mjs +918 -258
- package/app/plugins/hermes/assets/icon.png +0 -0
- package/app/plugins/hermes/manifest.json +30 -2
- package/app/plugins/hermes/plugin.mjs +284 -32
- 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 +561 -35
- 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 +290 -21
- package/app/plugins/omp/manifest.json +21 -1
- package/app/plugins/omp/plugin.mjs +2765 -1960
- package/app/plugins/opencode/manifest.json +18 -1
- package/app/plugins/opencode/plugin.mjs +723 -146
- package/app/plugins/pi/manifest.json +32 -0
- package/app/plugins/pi/plugin.mjs +2908 -2312
- package/app/plugins/qoder/manifest.json +18 -1
- package/app/plugins/qoder/plugin.mjs +634 -80
- package/app/plugins/qoder-cn/manifest.json +18 -1
- package/app/plugins/qoder-cn/plugin.mjs +634 -80
- package/app/plugins/workbuddy/manifest.json +18 -0
- package/app/plugins/workbuddy/plugin.mjs +6361 -5747
- package/app/plugins/zcode/manifest.json +19 -1
- package/app/plugins/zcode/plugin.mjs +1098 -259
- package/app/renderer-extension.js +13080 -8884
- 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,160 @@ 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
|
+
/** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
|
|
14955
|
+
title: external_exports.string().min(1).max(200).optional(),
|
|
14956
|
+
/** Models the session used, most requests first. */
|
|
14957
|
+
models: external_exports.array(model).max(16),
|
|
14958
|
+
firstAtMs: count,
|
|
14959
|
+
lastAtMs: count,
|
|
14960
|
+
...totals
|
|
14961
|
+
});
|
|
14962
|
+
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
14963
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
14964
|
+
/** First local date of the range; null for all time. */
|
|
14965
|
+
from: localDate.nullable(),
|
|
14966
|
+
to: localDate,
|
|
14967
|
+
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
14968
|
+
filters: external_exports.strictObject({
|
|
14969
|
+
harness: harness.nullable(),
|
|
14970
|
+
model: model.nullable(),
|
|
14971
|
+
unknownModel: external_exports.boolean(),
|
|
14972
|
+
project: project.nullable(),
|
|
14973
|
+
unknownProject: external_exports.boolean(),
|
|
14974
|
+
date: localDate.nullable()
|
|
14975
|
+
}),
|
|
14976
|
+
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
14977
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
|
|
14978
|
+
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
14979
|
+
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
14980
|
+
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
14981
|
+
options: external_exports.strictObject({
|
|
14982
|
+
harnesses: external_exports.array(harness).max(256),
|
|
14983
|
+
models: external_exports.array(model.nullable()).max(4096),
|
|
14984
|
+
projects: external_exports.array(project.nullable()).max(4096)
|
|
14985
|
+
}),
|
|
14986
|
+
/** Current display metadata, scoped by Harness. Never a pricing or filter identity.
|
|
14987
|
+
* Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
|
|
14988
|
+
*/
|
|
14989
|
+
modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
|
|
14990
|
+
/** Native credits, all filters applied, never combined across Harnesses or treated as USD.
|
|
14991
|
+
* Only groups with at least one reported value appear; reportedRequests exposes partial data.
|
|
14992
|
+
*/
|
|
14993
|
+
credits: external_exports.array(external_exports.strictObject({
|
|
14994
|
+
harness,
|
|
14995
|
+
model: model.nullable(),
|
|
14996
|
+
credits: external_exports.number().finite().min(0),
|
|
14997
|
+
reportedRequests: count,
|
|
14998
|
+
requests: count
|
|
14999
|
+
})).max(4096).optional(),
|
|
15000
|
+
/** All filters applied. */
|
|
15001
|
+
totals: usageStatisticsTotalsSchema,
|
|
15002
|
+
/** Each date and Harness of the range: every filter except the day. */
|
|
15003
|
+
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15004
|
+
/** Local weekday (0 = Sunday) and hour, all filters applied. */
|
|
15005
|
+
hourly: external_exports.array(external_exports.strictObject({
|
|
15006
|
+
weekday: external_exports.number().int().min(0).max(6),
|
|
15007
|
+
hour: external_exports.number().int().min(0).max(23),
|
|
15008
|
+
...totals
|
|
15009
|
+
})).max(168),
|
|
15010
|
+
byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
|
|
15011
|
+
byModel: external_exports.array(external_exports.strictObject({
|
|
15012
|
+
model: model.nullable(),
|
|
15013
|
+
...totals,
|
|
15014
|
+
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
15015
|
+
harnessPricedRequests: count
|
|
15016
|
+
})).max(4096),
|
|
15017
|
+
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
15018
|
+
/**
|
|
15019
|
+
* The sessions that spent the most, by cost and by tokens without cache, all filters applied;
|
|
15020
|
+
* requests without a native session are not listed here but count everywhere else.
|
|
15021
|
+
*/
|
|
15022
|
+
sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
|
|
15023
|
+
/**
|
|
15024
|
+
* The sessions last active in the range, newest first, all filters applied. Optional for older
|
|
15025
|
+
* Hosts; missing is treated as no list rather than no sessions.
|
|
15026
|
+
*/
|
|
15027
|
+
recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
|
|
15028
|
+
});
|
|
15029
|
+
|
|
14866
15030
|
// packages/shared-contracts/dist/ids.js
|
|
14867
15031
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14868
15032
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -14910,6 +15074,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
14910
15074
|
"codexhost/account/list",
|
|
14911
15075
|
"codexhost/account/refresh",
|
|
14912
15076
|
"codexhost/account/usage/inspect",
|
|
15077
|
+
"codexhost/usage/model-prices/get",
|
|
15078
|
+
"codexhost/usage/model-prices/set",
|
|
15079
|
+
"codexhost/usage/model-prices/default",
|
|
15080
|
+
"codexhost/usage/statistics/get",
|
|
14913
15081
|
"codexhost/update/check",
|
|
14914
15082
|
"codexhost/update/start",
|
|
14915
15083
|
"codexhost/update/status"
|
|
@@ -14974,6 +15142,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14974
15142
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14975
15143
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14976
15144
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15145
|
+
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14977
15146
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14978
15147
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14979
15148
|
totalCostUsd: finiteNonNegativeNumberSchema.optional(),
|
|
@@ -14985,7 +15154,11 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14985
15154
|
planFiveHourUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14986
15155
|
planFiveHourResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
14987
15156
|
planSevenDayUsedPercent: cacheHitRatePercentSchema.optional(),
|
|
14988
|
-
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional()
|
|
15157
|
+
planSevenDayResetsAtUnix: nonNegativeSafeIntegerSchema.optional(),
|
|
15158
|
+
sessionCacheHitRatePercent: cacheHitRatePercentSchema.optional(),
|
|
15159
|
+
timeToFirstOutputMs: nonNegativeSafeIntegerSchema.optional(),
|
|
15160
|
+
costSource: external_exports.enum(["publicPrice", "native"]).optional(),
|
|
15161
|
+
unpricedModels: external_exports.array(external_exports.string().min(1)).min(1).optional()
|
|
14989
15162
|
}).strict().superRefine((usage, context) => {
|
|
14990
15163
|
if (Object.keys(usage).length === 0) {
|
|
14991
15164
|
context.addIssue({ code: "custom", message: "Thread Usage must contain a reliable field" });
|
|
@@ -15006,6 +15179,20 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15006
15179
|
path: ["contextWindowTokens"]
|
|
15007
15180
|
});
|
|
15008
15181
|
}
|
|
15182
|
+
if (usage.costSource !== void 0 && usage.totalCostUsd === void 0) {
|
|
15183
|
+
context.addIssue({
|
|
15184
|
+
code: "custom",
|
|
15185
|
+
message: "Thread Usage costSource must be provided with totalCostUsd",
|
|
15186
|
+
path: ["costSource"]
|
|
15187
|
+
});
|
|
15188
|
+
}
|
|
15189
|
+
if (usage.unpricedModels !== void 0 && usage.costSource !== "publicPrice") {
|
|
15190
|
+
context.addIssue({
|
|
15191
|
+
code: "custom",
|
|
15192
|
+
message: "Thread Usage unpricedModels must be provided with a publicPrice cost",
|
|
15193
|
+
path: ["unpricedModels"]
|
|
15194
|
+
});
|
|
15195
|
+
}
|
|
15009
15196
|
if (usage.planFiveHourResetsAtUnix !== void 0 && usage.planFiveHourUsedPercent === void 0) {
|
|
15010
15197
|
context.addIssue({
|
|
15011
15198
|
code: "custom",
|
|
@@ -15260,27 +15447,27 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15260
15447
|
}).strict().superRefine((catalog, context) => {
|
|
15261
15448
|
const refs = /* @__PURE__ */ new Set();
|
|
15262
15449
|
const thinkingIds = new Set(catalog.thinkingOptions.map(({ id }) => id));
|
|
15263
|
-
for (const [index,
|
|
15264
|
-
if (refs.has(
|
|
15450
|
+
for (const [index, model2] of catalog.models.entries()) {
|
|
15451
|
+
if (refs.has(model2.ref.id)) {
|
|
15265
15452
|
context.addIssue({
|
|
15266
15453
|
code: "custom",
|
|
15267
15454
|
message: "Model Catalog refs must be unique",
|
|
15268
15455
|
path: ["models", index, "ref", "id"]
|
|
15269
15456
|
});
|
|
15270
15457
|
}
|
|
15271
|
-
refs.add(
|
|
15272
|
-
if (
|
|
15273
|
-
if (refs.has(
|
|
15458
|
+
refs.add(model2.ref.id);
|
|
15459
|
+
if (model2.fastModel) {
|
|
15460
|
+
if (refs.has(model2.fastModel.id) || catalog.models.some((entry) => entry.ref.id === model2.fastModel?.id)) {
|
|
15274
15461
|
context.addIssue({
|
|
15275
15462
|
code: "custom",
|
|
15276
15463
|
message: "Fast Model refs must be distinct and unique",
|
|
15277
15464
|
path: ["models", index, "fastModel"]
|
|
15278
15465
|
});
|
|
15279
15466
|
}
|
|
15280
|
-
refs.add(
|
|
15467
|
+
refs.add(model2.fastModel.id);
|
|
15281
15468
|
}
|
|
15282
15469
|
const supportedThinkingIds = /* @__PURE__ */ new Set();
|
|
15283
|
-
for (const [optionIndex, optionId] of (
|
|
15470
|
+
for (const [optionIndex, optionId] of (model2.supportedThinkingOptionIds ?? []).entries()) {
|
|
15284
15471
|
if (supportedThinkingIds.has(optionId)) {
|
|
15285
15472
|
context.addIssue({
|
|
15286
15473
|
code: "custom",
|
|
@@ -15474,13 +15661,40 @@ var HARNESS_PLUGIN_LIMIT = 128;
|
|
|
15474
15661
|
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
15662
|
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
15663
|
var documentationUrlSchema = external_exports.url().refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Plugin documentation links must be credential-free HTTPS URLs");
|
|
15664
|
+
var localizedTextSchema = external_exports.object({ en: external_exports.string().max(4096), "zh-CN": external_exports.string().max(4096).optional() }).strict();
|
|
15665
|
+
var harnessInstallationGuideSchema = external_exports.object({
|
|
15666
|
+
commands: external_exports.array(external_exports.object({ terminal: external_exports.string().max(256), command: external_exports.string().max(4096) }).strict()).max(8),
|
|
15667
|
+
before: localizedTextSchema.optional(),
|
|
15668
|
+
after: localizedTextSchema.optional(),
|
|
15669
|
+
downloads: external_exports.array(external_exports.object({ label: external_exports.string().max(128), url: documentationUrlSchema }).strict()).max(8).optional()
|
|
15670
|
+
}).strict();
|
|
15477
15671
|
var pluginPresentationShape = {
|
|
15478
15672
|
id: harnessPluginIdSchema,
|
|
15479
15673
|
name: external_exports.string().trim().min(1).max(128),
|
|
15480
15674
|
version: external_exports.string().min(1).max(128),
|
|
15675
|
+
/** Capability-only plugin; omitted for existing session-capable plugins. */
|
|
15676
|
+
kind: external_exports.literal("usage").optional(),
|
|
15677
|
+
/** Original image styling or bounded vector paths; never arbitrary CSS/SVG markup. */
|
|
15678
|
+
iconStyle: external_exports.object({
|
|
15679
|
+
vector: external_exports.object({
|
|
15680
|
+
viewBox: external_exports.string().max(128).regex(/^-?\d+(?:\.\d+)?(?: +-?\d+(?:\.\d+)?){3}$/u),
|
|
15681
|
+
color: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu),
|
|
15682
|
+
paths: external_exports.array(external_exports.object({
|
|
15683
|
+
d: external_exports.string().min(1).max(32768).regex(/^[MmLlHhVvCcSsQqTtAaZz\d.,+eE\s-]+$/u),
|
|
15684
|
+
fillRule: external_exports.enum(["evenodd", "nonzero"]).optional(),
|
|
15685
|
+
fill: external_exports.string().regex(/^(?:currentColor|#[a-f0-9]{6})$/iu).optional()
|
|
15686
|
+
}).strict()).min(1).max(32)
|
|
15687
|
+
}).strict().optional(),
|
|
15688
|
+
background: external_exports.string().regex(/^#[a-f0-9]{6}$/iu).optional(),
|
|
15689
|
+
borderRadius: external_exports.number().min(0).max(50).optional(),
|
|
15690
|
+
paddingRatio: external_exports.number().min(0).max(0.25).optional()
|
|
15691
|
+
}).strict().optional(),
|
|
15692
|
+
installation: harnessInstallationGuideSchema.optional(),
|
|
15693
|
+
notice: localizedTextSchema.optional(),
|
|
15481
15694
|
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
15482
15695
|
launchCommand: external_exports.literal(true).optional(),
|
|
15483
15696
|
links: external_exports.object({
|
|
15697
|
+
website: documentationUrlSchema.optional(),
|
|
15484
15698
|
documentation: documentationUrlSchema.optional(),
|
|
15485
15699
|
installation: documentationUrlSchema.optional()
|
|
15486
15700
|
}).strict().optional()
|
|
@@ -15894,6 +16108,11 @@ var codexSshDraftSchema = external_exports.strictObject({
|
|
|
15894
16108
|
});
|
|
15895
16109
|
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
15896
16110
|
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
16111
|
+
external_exports.strictObject({
|
|
16112
|
+
action: external_exports.literal("read-thread"),
|
|
16113
|
+
hostId: hostId.refine((id) => id !== "local"),
|
|
16114
|
+
input: delegationReadParamsSchema
|
|
16115
|
+
}),
|
|
15897
16116
|
external_exports.strictObject({
|
|
15898
16117
|
action: external_exports.literal("save"),
|
|
15899
16118
|
draft: codexSshDraftSchema,
|
|
@@ -16051,10 +16270,25 @@ async function startControllerAttachmentServer(options) {
|
|
|
16051
16270
|
respond(socket, "rejected");
|
|
16052
16271
|
return;
|
|
16053
16272
|
}
|
|
16054
|
-
socket.setTimeout(
|
|
16273
|
+
socket.setTimeout(
|
|
16274
|
+
input.action === "read-thread" ? REMOTE_THREAD_CONTROL_TIMEOUT_MS : 3e4,
|
|
16275
|
+
() => socket.destroy()
|
|
16276
|
+
);
|
|
16055
16277
|
const operation = options.remoteConnections;
|
|
16056
16278
|
void Promise.resolve().then(() => operation(input)).then(
|
|
16057
|
-
(reply) =>
|
|
16279
|
+
(reply) => {
|
|
16280
|
+
const serialized = JSON.stringify(reply) + "\n";
|
|
16281
|
+
if (input.action === "read-thread" && Buffer.byteLength(serialized) > REMOTE_THREAD_REPLY_MAX_BYTES) {
|
|
16282
|
+
socket.end(
|
|
16283
|
+
JSON.stringify({
|
|
16284
|
+
error: {
|
|
16285
|
+
code: -32094,
|
|
16286
|
+
message: "Thread snapshot exceeds the 16 MiB response limit; reduce the message page size. Oversized individual results are not supported."
|
|
16287
|
+
}
|
|
16288
|
+
}) + "\n"
|
|
16289
|
+
);
|
|
16290
|
+
} else socket.end(serialized);
|
|
16291
|
+
},
|
|
16058
16292
|
() => socket.end(
|
|
16059
16293
|
JSON.stringify({
|
|
16060
16294
|
error: {
|
|
@@ -16848,14 +17082,14 @@ function createDraftPrewarmPolicyBridge(manager, bridge, hostId2, target, prewar
|
|
|
16848
17082
|
throw new Error("Renderer request manager is retired");
|
|
16849
17083
|
return manager;
|
|
16850
17084
|
},
|
|
16851
|
-
select(
|
|
17085
|
+
select(model2) {
|
|
16852
17086
|
if (disposed || isCurrentManager && !isCurrentManager())
|
|
16853
17087
|
throw new Error("Renderer request manager is retired");
|
|
16854
|
-
if (
|
|
17088
|
+
if (model2 !== null && (typeof model2 !== "string" || !model2.startsWith("codexhost/"))) {
|
|
16855
17089
|
throw new Error("Draft route Model must be a codexhost transport carrier");
|
|
16856
17090
|
}
|
|
16857
|
-
if (selectedModel ===
|
|
16858
|
-
selectedModel =
|
|
17091
|
+
if (selectedModel === model2) return false;
|
|
17092
|
+
selectedModel = model2;
|
|
16859
17093
|
prewarmGeneration += 1;
|
|
16860
17094
|
discardExternalPrewarms();
|
|
16861
17095
|
return true;
|
|
@@ -17207,8 +17441,10 @@ function awaitWithSignal(promise2, signal, timeoutMessage) {
|
|
|
17207
17441
|
});
|
|
17208
17442
|
}
|
|
17209
17443
|
function sameAgents(actual, expected) {
|
|
17444
|
+
if (!actual.includes("codex") || new Set(actual).size !== actual.length) return false;
|
|
17445
|
+
if (!expected) return true;
|
|
17210
17446
|
const expectedSet = new Set(expected);
|
|
17211
|
-
return actual.length === expected.length &&
|
|
17447
|
+
return actual.length === expected.length && actual.every((agent) => expectedSet.has(agent));
|
|
17212
17448
|
}
|
|
17213
17449
|
function isPrimaryRendererUrl(value) {
|
|
17214
17450
|
try {
|
|
@@ -17421,7 +17657,7 @@ var defaultOperations = {
|
|
|
17421
17657
|
installDraftPrewarmPolicy: installRendererDraftPrewarmPolicyDirect
|
|
17422
17658
|
};
|
|
17423
17659
|
async function createRendererCdpControlSession(options) {
|
|
17424
|
-
const enabledAgents = options.enabledAgents
|
|
17660
|
+
const enabledAgents = options.enabledAgents;
|
|
17425
17661
|
const timeoutMs = options.timeoutMs ?? 3e4;
|
|
17426
17662
|
const pollIntervalMs = options.pollIntervalMs ?? 250;
|
|
17427
17663
|
const operations = options.operations ?? defaultOperations;
|
|
@@ -17617,25 +17853,7 @@ async function runDesktopController(options, signal, dependencies = defaultDepen
|
|
|
17617
17853
|
rendererCdpEndpoint: options.rendererCdpEndpoint,
|
|
17618
17854
|
rendererSource: `${RENDERER_CSP_BOOTSTRAP}
|
|
17619
17855
|
${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
|
-
],
|
|
17856
|
+
// External Agents are discovered from each target Host after installation.
|
|
17639
17857
|
timeoutMs: PRODUCTION_INSTALL_TIMEOUT_MS,
|
|
17640
17858
|
signal
|
|
17641
17859
|
},
|