@codexhost/cli-darwin-x64 0.13.1 → 0.13.3
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 +36 -3
- package/app/console-web.js +100 -78
- package/app/desktop-controller.mjs +36 -3
- package/app/host-runtime.mjs +551 -101
- package/app/plugins/antigravity/plugin.mjs +52 -7
- package/app/plugins/claude-code/plugin.mjs +219 -59
- package/app/plugins/codebuddy/plugin.mjs +110 -8
- package/app/plugins/codex-usage/plugin.mjs +54 -12
- package/app/plugins/cursor-cli/plugin.mjs +71 -10
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +119 -10
- package/app/plugins/grok/plugin.mjs +64 -5
- package/app/plugins/hermes/plugin.mjs +247 -43
- package/app/plugins/kimi-code/plugin.mjs +64 -9
- package/app/plugins/kiro-cli/plugin.mjs +45 -3
- package/app/plugins/omp/plugin.mjs +46 -3
- package/app/plugins/opencode/plugin.mjs +52 -5
- package/app/plugins/pi/plugin.mjs +37 -3
- package/app/plugins/qoder/plugin.mjs +50 -3
- package/app/plugins/qoder-cn/plugin.mjs +50 -3
- package/app/plugins/workbuddy/plugin.mjs +227 -12
- package/app/plugins/zcode/plugin.mjs +49 -3
- package/app/renderer-extension.js +401 -401
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -15085,6 +15085,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
15085
15085
|
initializeOnly: external_exports.boolean().optional()
|
|
15086
15086
|
});
|
|
15087
15087
|
|
|
15088
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
15089
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
15090
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
15091
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
15092
|
+
label: displayText(256).optional(),
|
|
15093
|
+
description: displayText(1024).optional()
|
|
15094
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15095
|
+
var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15096
|
+
|
|
15088
15097
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
15089
15098
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
15090
15099
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15421,8 +15430,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15421
15430
|
}
|
|
15422
15431
|
});
|
|
15423
15432
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15433
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15434
|
+
"weekly",
|
|
15435
|
+
"monthly",
|
|
15436
|
+
"five_hour",
|
|
15437
|
+
"seven_day",
|
|
15438
|
+
"unknown"
|
|
15439
|
+
]);
|
|
15440
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15441
|
+
id: external_exports.string().min(1).max(256),
|
|
15442
|
+
label: external_exports.string().min(1).max(256),
|
|
15443
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15444
|
+
}).strict();
|
|
15424
15445
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15425
15446
|
product: external_exports.string().min(1),
|
|
15447
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15448
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15449
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15450
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15426
15451
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15427
15452
|
// Zero is a real empty cap, not an absent field.
|
|
15428
15453
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15442,9 +15467,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15442
15467
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15443
15468
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15444
15469
|
label: external_exports.string().min(1).optional(),
|
|
15470
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15471
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15445
15472
|
usedPercent: usagePercentSchema,
|
|
15446
15473
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15447
|
-
periodType:
|
|
15474
|
+
periodType: accountCreditsPeriodSchema,
|
|
15448
15475
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15449
15476
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15450
15477
|
}).strict();
|
|
@@ -15455,7 +15482,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15455
15482
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15456
15483
|
threadId: hostThreadIdSchema,
|
|
15457
15484
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15458
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15485
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15486
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15487
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15459
15488
|
}).strict();
|
|
15460
15489
|
|
|
15461
15490
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15582,7 +15611,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15582
15611
|
id: harnessPermissionModeIdSchema,
|
|
15583
15612
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15584
15613
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15585
|
-
dangerous: external_exports.boolean().optional()
|
|
15614
|
+
dangerous: external_exports.boolean().optional(),
|
|
15615
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15586
15616
|
}).strict();
|
|
15587
15617
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15588
15618
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -15969,6 +15999,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15969
15999
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
15970
16000
|
message: external_exports.string().max(2048).optional(),
|
|
15971
16001
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
16002
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
16003
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
15972
16004
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
15973
16005
|
}).strict();
|
|
15974
16006
|
|
|
@@ -16095,6 +16127,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
16095
16127
|
invocation: commandInvocationSchema,
|
|
16096
16128
|
label: commandLabelSchema,
|
|
16097
16129
|
description: commandDescriptionSchema.optional(),
|
|
16130
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
16098
16131
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
16099
16132
|
/**
|
|
16100
16133
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -21329,6 +21362,8 @@ function projectKimiUsages(payload) {
|
|
|
21329
21362
|
return [
|
|
21330
21363
|
{
|
|
21331
21364
|
product: "Kimi Code · 5-hour window",
|
|
21365
|
+
periodType: "five_hour",
|
|
21366
|
+
scope: { id: "kimi-code", label: "Kimi Code" },
|
|
21332
21367
|
usagePercent: share.usedPercent,
|
|
21333
21368
|
...share.resetsAt ? { resetsAt: share.resetsAt } : {}
|
|
21334
21369
|
}
|
|
@@ -22785,21 +22820,37 @@ var kimiPermissionModeCatalog = harnessPermissionModeCatalogSchema.parse({
|
|
|
22785
22820
|
{
|
|
22786
22821
|
id: harnessPermissionModeIdSchema.parse("default"),
|
|
22787
22822
|
label: "询问确认",
|
|
22823
|
+
localizations: {
|
|
22824
|
+
en: { label: "Ask for approval" },
|
|
22825
|
+
"zh-CN": { description: "工具正常执行,需要时手动审批。" }
|
|
22826
|
+
},
|
|
22788
22827
|
description: "Manual approvals; tools execute normally."
|
|
22789
22828
|
},
|
|
22790
22829
|
{
|
|
22791
22830
|
id: harnessPermissionModeIdSchema.parse("plan"),
|
|
22792
22831
|
label: "计划模式",
|
|
22832
|
+
localizations: {
|
|
22833
|
+
en: { label: "Plan mode" },
|
|
22834
|
+
"zh-CN": { description: "只读规划,不执行工具。" }
|
|
22835
|
+
},
|
|
22793
22836
|
description: "Read-only planning; no tool execution."
|
|
22794
22837
|
},
|
|
22795
22838
|
{
|
|
22796
22839
|
id: harnessPermissionModeIdSchema.parse("auto"),
|
|
22797
22840
|
label: "按需询问",
|
|
22841
|
+
localizations: {
|
|
22842
|
+
en: { label: "Ask as needed" },
|
|
22843
|
+
"zh-CN": { description: "自动批准安全操作。" }
|
|
22844
|
+
},
|
|
22798
22845
|
description: "Auto-approve safe operations."
|
|
22799
22846
|
},
|
|
22800
22847
|
{
|
|
22801
22848
|
id: harnessPermissionModeIdSchema.parse("yolo"),
|
|
22802
22849
|
label: "无需询问",
|
|
22850
|
+
localizations: {
|
|
22851
|
+
en: { label: "No approval prompts" },
|
|
22852
|
+
"zh-CN": { description: "自动批准所有操作。" }
|
|
22853
|
+
},
|
|
22803
22854
|
description: "Auto-approve everything.",
|
|
22804
22855
|
dangerous: true
|
|
22805
22856
|
}
|
|
@@ -24064,6 +24115,11 @@ async function copyKimiCommandHistory(turns, sessionId, options) {
|
|
|
24064
24115
|
}
|
|
24065
24116
|
|
|
24066
24117
|
// dist/slash-commands.js
|
|
24118
|
+
var KIMI_COMPACT_COMMAND = {
|
|
24119
|
+
name: "compact",
|
|
24120
|
+
description: "Compact the conversation context",
|
|
24121
|
+
input: { hint: "prompt" }
|
|
24122
|
+
};
|
|
24067
24123
|
function buildKimiCommandCatalog(availableCommands) {
|
|
24068
24124
|
const seenIds = /* @__PURE__ */ new Set();
|
|
24069
24125
|
const descriptors = [];
|
|
@@ -24083,17 +24139,16 @@ function buildKimiCommandCatalog(availableCommands) {
|
|
|
24083
24139
|
invocation: `/${cleanId}`,
|
|
24084
24140
|
label: cleanId,
|
|
24085
24141
|
argumentMode,
|
|
24086
|
-
...description ? { description } : {}
|
|
24142
|
+
...description ? { description } : {},
|
|
24143
|
+
// Only the known native built-in gets plugin copy. A live command with
|
|
24144
|
+
// the same name but different wording/input retains its own semantics.
|
|
24145
|
+
...cleanId === KIMI_COMPACT_COMMAND.name && rawDesc === KIMI_COMPACT_COMMAND.description && command.input?.hint === KIMI_COMPACT_COMMAND.input?.hint ? { localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } } } : {}
|
|
24087
24146
|
});
|
|
24088
24147
|
}
|
|
24089
24148
|
return harnessCommandCatalogSchema.parse({ commands: descriptors });
|
|
24090
24149
|
}
|
|
24091
24150
|
var KIMI_DEFAULT_COMMANDS = [
|
|
24092
|
-
|
|
24093
|
-
name: "compact",
|
|
24094
|
-
description: "Compact the conversation context",
|
|
24095
|
-
input: { hint: "prompt" }
|
|
24096
|
-
},
|
|
24151
|
+
KIMI_COMPACT_COMMAND,
|
|
24097
24152
|
{
|
|
24098
24153
|
name: "status",
|
|
24099
24154
|
description: "Show current session status"
|
|
@@ -14944,6 +14944,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
14944
14944
|
initializeOnly: external_exports.boolean().optional()
|
|
14945
14945
|
});
|
|
14946
14946
|
|
|
14947
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
14948
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
14949
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
14950
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
14951
|
+
label: displayText(256).optional(),
|
|
14952
|
+
description: displayText(1024).optional()
|
|
14953
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
14954
|
+
var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
14955
|
+
|
|
14947
14956
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
14948
14957
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
14949
14958
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15280,8 +15289,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15280
15289
|
}
|
|
15281
15290
|
});
|
|
15282
15291
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15292
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15293
|
+
"weekly",
|
|
15294
|
+
"monthly",
|
|
15295
|
+
"five_hour",
|
|
15296
|
+
"seven_day",
|
|
15297
|
+
"unknown"
|
|
15298
|
+
]);
|
|
15299
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15300
|
+
id: external_exports.string().min(1).max(256),
|
|
15301
|
+
label: external_exports.string().min(1).max(256),
|
|
15302
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15303
|
+
}).strict();
|
|
15283
15304
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15284
15305
|
product: external_exports.string().min(1),
|
|
15306
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15307
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15308
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15309
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15285
15310
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15286
15311
|
// Zero is a real empty cap, not an absent field.
|
|
15287
15312
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15301,9 +15326,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15301
15326
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15302
15327
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15303
15328
|
label: external_exports.string().min(1).optional(),
|
|
15329
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15330
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15304
15331
|
usedPercent: usagePercentSchema,
|
|
15305
15332
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15306
|
-
periodType:
|
|
15333
|
+
periodType: accountCreditsPeriodSchema,
|
|
15307
15334
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15308
15335
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15309
15336
|
}).strict();
|
|
@@ -15314,7 +15341,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15314
15341
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15315
15342
|
threadId: hostThreadIdSchema,
|
|
15316
15343
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15317
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15344
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15345
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15346
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15318
15347
|
}).strict();
|
|
15319
15348
|
|
|
15320
15349
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15441,7 +15470,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15441
15470
|
id: harnessPermissionModeIdSchema,
|
|
15442
15471
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15443
15472
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15444
|
-
dangerous: external_exports.boolean().optional()
|
|
15473
|
+
dangerous: external_exports.boolean().optional(),
|
|
15474
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15445
15475
|
}).strict();
|
|
15446
15476
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15447
15477
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -15828,6 +15858,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15828
15858
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
15829
15859
|
message: external_exports.string().max(2048).optional(),
|
|
15830
15860
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
15861
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
15862
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
15831
15863
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
15832
15864
|
}).strict();
|
|
15833
15865
|
|
|
@@ -15954,6 +15986,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
15954
15986
|
invocation: commandInvocationSchema,
|
|
15955
15987
|
label: commandLabelSchema,
|
|
15956
15988
|
description: commandDescriptionSchema.optional(),
|
|
15989
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15957
15990
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
15958
15991
|
/**
|
|
15959
15992
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -21500,6 +21533,7 @@ var KIRO_COMMANDS = [
|
|
|
21500
21533
|
{
|
|
21501
21534
|
id: "kiro.compact",
|
|
21502
21535
|
invocation: "/compact",
|
|
21536
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
21503
21537
|
label: "Compact Conversation",
|
|
21504
21538
|
description: "Summarize conversation history to free context window",
|
|
21505
21539
|
argumentMode: "none"
|
|
@@ -22710,11 +22744,15 @@ var KIRO_PERMISSION_MODES = [
|
|
|
22710
22744
|
{
|
|
22711
22745
|
id: KIRO_DEFAULT_PERMISSION_MODE_ID,
|
|
22712
22746
|
label: "Autopilot",
|
|
22747
|
+
localizations: {
|
|
22748
|
+
"zh-CN": { label: "自动执行", description: "在原生策略范围内自动执行工具。" }
|
|
22749
|
+
},
|
|
22713
22750
|
description: "Automatic tool execution within native policy bounds"
|
|
22714
22751
|
},
|
|
22715
22752
|
{
|
|
22716
22753
|
id: harnessPermissionModeIdSchema.parse("supervised"),
|
|
22717
22754
|
label: "Supervised",
|
|
22755
|
+
localizations: { "zh-CN": { label: "人工监督", description: "人工审核工具审批与文件修改。" } },
|
|
22718
22756
|
description: "Manual review of tool approvals and file modifications"
|
|
22719
22757
|
}
|
|
22720
22758
|
];
|
|
@@ -24461,6 +24499,10 @@ function createKiroInstallation(environment, command) {
|
|
|
24461
24499
|
updateAvailable: false,
|
|
24462
24500
|
canUpdate: false,
|
|
24463
24501
|
messageCode: "kiro-native-updater",
|
|
24502
|
+
notice: {
|
|
24503
|
+
en: "Use Kiro CLI's original installer or native updater to check for and install updates.",
|
|
24504
|
+
"zh-CN": "请使用 Kiro CLI 原安装程序或原生更新器检查并安装更新。"
|
|
24505
|
+
},
|
|
24464
24506
|
message: "Use Kiro CLI's original installer or native updater to check for and install updates."
|
|
24465
24507
|
};
|
|
24466
24508
|
};
|
|
@@ -15144,6 +15144,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
15144
15144
|
initializeOnly: external_exports.boolean().optional()
|
|
15145
15145
|
});
|
|
15146
15146
|
|
|
15147
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
15148
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
15149
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
15150
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
15151
|
+
label: displayText(256).optional(),
|
|
15152
|
+
description: displayText(1024).optional()
|
|
15153
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15154
|
+
var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15155
|
+
|
|
15147
15156
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
15148
15157
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
15149
15158
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15480,8 +15489,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15480
15489
|
}
|
|
15481
15490
|
});
|
|
15482
15491
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15492
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15493
|
+
"weekly",
|
|
15494
|
+
"monthly",
|
|
15495
|
+
"five_hour",
|
|
15496
|
+
"seven_day",
|
|
15497
|
+
"unknown"
|
|
15498
|
+
]);
|
|
15499
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15500
|
+
id: external_exports.string().min(1).max(256),
|
|
15501
|
+
label: external_exports.string().min(1).max(256),
|
|
15502
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15503
|
+
}).strict();
|
|
15483
15504
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15484
15505
|
product: external_exports.string().min(1),
|
|
15506
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15507
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15508
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15509
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15485
15510
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15486
15511
|
// Zero is a real empty cap, not an absent field.
|
|
15487
15512
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15501,9 +15526,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15501
15526
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15502
15527
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15503
15528
|
label: external_exports.string().min(1).optional(),
|
|
15529
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15530
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15504
15531
|
usedPercent: usagePercentSchema,
|
|
15505
15532
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15506
|
-
periodType:
|
|
15533
|
+
periodType: accountCreditsPeriodSchema,
|
|
15507
15534
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15508
15535
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15509
15536
|
}).strict();
|
|
@@ -15514,7 +15541,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15514
15541
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15515
15542
|
threadId: hostThreadIdSchema,
|
|
15516
15543
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15517
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15544
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15545
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15546
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15518
15547
|
}).strict();
|
|
15519
15548
|
|
|
15520
15549
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15641,7 +15670,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15641
15670
|
id: harnessPermissionModeIdSchema,
|
|
15642
15671
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15643
15672
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15644
|
-
dangerous: external_exports.boolean().optional()
|
|
15673
|
+
dangerous: external_exports.boolean().optional(),
|
|
15674
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15645
15675
|
}).strict();
|
|
15646
15676
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15647
15677
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -16028,6 +16058,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16028
16058
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16029
16059
|
message: external_exports.string().max(2048).optional(),
|
|
16030
16060
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
16061
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
16062
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
16031
16063
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16032
16064
|
}).strict();
|
|
16033
16065
|
|
|
@@ -16154,6 +16186,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
16154
16186
|
invocation: commandInvocationSchema,
|
|
16155
16187
|
label: commandLabelSchema,
|
|
16156
16188
|
description: commandDescriptionSchema.optional(),
|
|
16189
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
16157
16190
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
16158
16191
|
/**
|
|
16159
16192
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -19937,16 +19970,25 @@ var OMP_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
|
19937
19970
|
{
|
|
19938
19971
|
id: "always-ask",
|
|
19939
19972
|
label: "Always ask",
|
|
19973
|
+
localizations: {
|
|
19974
|
+
"zh-CN": { label: "始终询问", description: "自动允许读取;写入或执行操作前询问。" }
|
|
19975
|
+
},
|
|
19940
19976
|
description: "Automatically allow reads and ask before write or execution actions."
|
|
19941
19977
|
},
|
|
19942
19978
|
{
|
|
19943
19979
|
id: "write",
|
|
19944
19980
|
label: "Write",
|
|
19981
|
+
localizations: {
|
|
19982
|
+
"zh-CN": { label: "写入", description: "自动允许读取和写入;执行操作前询问。" }
|
|
19983
|
+
},
|
|
19945
19984
|
description: "Automatically allow reads and writes; ask before execution actions."
|
|
19946
19985
|
},
|
|
19947
19986
|
{
|
|
19948
19987
|
id: "yolo",
|
|
19949
19988
|
label: "Full access",
|
|
19989
|
+
localizations: {
|
|
19990
|
+
"zh-CN": { label: "完全访问", description: "无需批准提示即可运行所有工具操作。" }
|
|
19991
|
+
},
|
|
19950
19992
|
description: "Run all tool actions without approval prompts.",
|
|
19951
19993
|
dangerous: true
|
|
19952
19994
|
}
|
|
@@ -20077,6 +20119,7 @@ var ompCommandCatalog = harnessCommandCatalogSchema.parse({
|
|
|
20077
20119
|
{
|
|
20078
20120
|
id: "omp.compact",
|
|
20079
20121
|
invocation: "/compact",
|
|
20122
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
20080
20123
|
label: "Compact context",
|
|
20081
20124
|
description: "Compact the current conversation context",
|
|
20082
20125
|
argumentMode: "text"
|
|
@@ -15141,6 +15141,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
15141
15141
|
initializeOnly: external_exports.boolean().optional()
|
|
15142
15142
|
});
|
|
15143
15143
|
|
|
15144
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
15145
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
15146
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
15147
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
15148
|
+
label: displayText(256).optional(),
|
|
15149
|
+
description: displayText(1024).optional()
|
|
15150
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15151
|
+
var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15152
|
+
|
|
15144
15153
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
15145
15154
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
15146
15155
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15477,8 +15486,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15477
15486
|
}
|
|
15478
15487
|
});
|
|
15479
15488
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15489
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15490
|
+
"weekly",
|
|
15491
|
+
"monthly",
|
|
15492
|
+
"five_hour",
|
|
15493
|
+
"seven_day",
|
|
15494
|
+
"unknown"
|
|
15495
|
+
]);
|
|
15496
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15497
|
+
id: external_exports.string().min(1).max(256),
|
|
15498
|
+
label: external_exports.string().min(1).max(256),
|
|
15499
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15500
|
+
}).strict();
|
|
15480
15501
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15481
15502
|
product: external_exports.string().min(1),
|
|
15503
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15504
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15505
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15506
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15482
15507
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15483
15508
|
// Zero is a real empty cap, not an absent field.
|
|
15484
15509
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15498,9 +15523,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15498
15523
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15499
15524
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15500
15525
|
label: external_exports.string().min(1).optional(),
|
|
15526
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15527
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15501
15528
|
usedPercent: usagePercentSchema,
|
|
15502
15529
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15503
|
-
periodType:
|
|
15530
|
+
periodType: accountCreditsPeriodSchema,
|
|
15504
15531
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15505
15532
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15506
15533
|
}).strict();
|
|
@@ -15511,7 +15538,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15511
15538
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15512
15539
|
threadId: hostThreadIdSchema,
|
|
15513
15540
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15514
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15541
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15542
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15543
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15515
15544
|
}).strict();
|
|
15516
15545
|
|
|
15517
15546
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15638,7 +15667,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15638
15667
|
id: harnessPermissionModeIdSchema,
|
|
15639
15668
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15640
15669
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15641
|
-
dangerous: external_exports.boolean().optional()
|
|
15670
|
+
dangerous: external_exports.boolean().optional(),
|
|
15671
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15642
15672
|
}).strict();
|
|
15643
15673
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15644
15674
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -16025,6 +16055,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16025
16055
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16026
16056
|
message: external_exports.string().max(2048).optional(),
|
|
16027
16057
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
16058
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
16059
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
16028
16060
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16029
16061
|
}).strict();
|
|
16030
16062
|
|
|
@@ -16151,6 +16183,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
16151
16183
|
invocation: commandInvocationSchema,
|
|
16152
16184
|
label: commandLabelSchema,
|
|
16153
16185
|
description: commandDescriptionSchema.optional(),
|
|
16186
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
16154
16187
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
16155
16188
|
/**
|
|
16156
16189
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -17197,16 +17230,25 @@ var OPENCODE_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse(
|
|
|
17197
17230
|
{
|
|
17198
17231
|
id: "default",
|
|
17199
17232
|
label: "Default",
|
|
17233
|
+
localizations: {
|
|
17234
|
+
"zh-CN": { label: "默认", description: "使用 OpenCode 已配置的权限规则。" }
|
|
17235
|
+
},
|
|
17200
17236
|
description: "Use OpenCode's configured permission rules."
|
|
17201
17237
|
},
|
|
17202
17238
|
{
|
|
17203
17239
|
id: "ask",
|
|
17204
17240
|
label: "Ask",
|
|
17241
|
+
localizations: {
|
|
17242
|
+
"zh-CN": { label: "询问", description: "执行受保护的 OpenCode 操作前询问。" }
|
|
17243
|
+
},
|
|
17205
17244
|
description: "Ask before protected OpenCode actions."
|
|
17206
17245
|
},
|
|
17207
17246
|
{
|
|
17208
17247
|
id: "allow",
|
|
17209
17248
|
label: "Allow all",
|
|
17249
|
+
localizations: {
|
|
17250
|
+
"zh-CN": { label: "全部允许", description: "允许 OpenCode 操作,无需批准提示。" }
|
|
17251
|
+
},
|
|
17210
17252
|
description: "Allow OpenCode actions without approval prompts.",
|
|
17211
17253
|
dangerous: true
|
|
17212
17254
|
}
|
|
@@ -23613,6 +23655,7 @@ var openCodeCommandCatalog = harnessCommandCatalogSchema.parse({
|
|
|
23613
23655
|
{
|
|
23614
23656
|
id: COMPACT_COMMAND_ID,
|
|
23615
23657
|
invocation: "/compact",
|
|
23658
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
23616
23659
|
label: "Compact context",
|
|
23617
23660
|
description: "Compact the current OpenCode Session context",
|
|
23618
23661
|
argumentMode: "none"
|
|
@@ -24175,7 +24218,7 @@ var OpenCodeHarnessSession = class {
|
|
|
24175
24218
|
}
|
|
24176
24219
|
#projectPart(active, part) {
|
|
24177
24220
|
if (part.type === "text" || part.type === "reasoning") {
|
|
24178
|
-
if (part.type === "text" && part.ignored
|
|
24221
|
+
if (part.type === "text" && part.ignored)
|
|
24179
24222
|
return;
|
|
24180
24223
|
const existing = active.items.get(part.id);
|
|
24181
24224
|
if (!existing) {
|
|
@@ -25049,11 +25092,15 @@ function v2State(session, catalog, policy) {
|
|
|
25049
25092
|
...entry ? {
|
|
25050
25093
|
resolvedModelLabel: entry.resolvedModelLabel ?? entry.label,
|
|
25051
25094
|
availableThinkingOptions: catalog.thinkingOptions.filter((v) => entry.supportedThinkingOptionIds?.includes(v.id)),
|
|
25052
|
-
effectiveThinkingOptionId:
|
|
25095
|
+
effectiveThinkingOptionId: effectiveVariant(session.model?.variant, entry)
|
|
25053
25096
|
} : {},
|
|
25054
25097
|
effectivePermissionModeId: decodeMode(mode?.effect)
|
|
25055
25098
|
};
|
|
25056
25099
|
}
|
|
25100
|
+
function effectiveVariant(variant, entry) {
|
|
25101
|
+
const id = encodeOpenCodeVariant(variant);
|
|
25102
|
+
return variant === "default" && !entry.supportedThinkingOptionIds?.includes(id) ? encodeOpenCodeVariant(void 0) : id;
|
|
25103
|
+
}
|
|
25057
25104
|
function decodeMode(effect) {
|
|
25058
25105
|
return effect === "allow" || effect === "ask" ? harnessPermissionModeIdSchema.parse(effect) : harnessPermissionModeIdSchema.parse("default");
|
|
25059
25106
|
}
|