@liberseek/boft-cli-win32-arm64 0.8.1 → 0.8.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 -75
- package/app/desktop-controller.mjs +36 -3
- package/app/host-runtime.mjs +81 -21
- package/app/plugins/antigravity/plugin.mjs +52 -7
- package/app/plugins/claude-code/plugin.mjs +206 -54
- package/app/plugins/codebuddy/plugin.mjs +110 -8
- package/app/plugins/codex-usage/plugin.mjs +36 -3
- 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 +198 -26
- package/app/plugins/grok/plugin.mjs +100 -21
- package/app/plugins/hermes/plugin.mjs +63 -3
- package/app/plugins/kimi-code/plugin.mjs +64 -9
- package/app/plugins/kiro-cli/plugin.mjs +45 -3
- package/app/plugins/muse/plugin.mjs +36 -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 +369 -281
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/package.json +1 -1
|
@@ -27590,6 +27590,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
27590
27590
|
initializeOnly: external_exports.boolean().optional()
|
|
27591
27591
|
});
|
|
27592
27592
|
|
|
27593
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
27594
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
27595
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
27596
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
27597
|
+
label: displayText(256).optional(),
|
|
27598
|
+
description: displayText(1024).optional()
|
|
27599
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
27600
|
+
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");
|
|
27601
|
+
|
|
27593
27602
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
27594
27603
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
27595
27604
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -28010,8 +28019,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
28010
28019
|
}
|
|
28011
28020
|
});
|
|
28012
28021
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
28022
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
28023
|
+
"weekly",
|
|
28024
|
+
"monthly",
|
|
28025
|
+
"five_hour",
|
|
28026
|
+
"seven_day",
|
|
28027
|
+
"unknown"
|
|
28028
|
+
]);
|
|
28029
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
28030
|
+
id: external_exports.string().min(1).max(256),
|
|
28031
|
+
label: external_exports.string().min(1).max(256),
|
|
28032
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
28033
|
+
}).strict();
|
|
28013
28034
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
28014
28035
|
product: external_exports.string().min(1),
|
|
28036
|
+
/** Native period and scope, never inferred from the display name. */
|
|
28037
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
28038
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
28039
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
28015
28040
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
28016
28041
|
// Zero is a real empty cap, not an absent field.
|
|
28017
28042
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -28033,8 +28058,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
28033
28058
|
label: external_exports.string().min(1).optional(),
|
|
28034
28059
|
usedPercent: usagePercentSchema.optional(),
|
|
28035
28060
|
remaining: external_exports.number().finite().optional(),
|
|
28061
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
28062
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
28036
28063
|
resetsAt: external_exports.string().min(1).optional(),
|
|
28037
|
-
periodType:
|
|
28064
|
+
periodType: accountCreditsPeriodSchema,
|
|
28038
28065
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
28039
28066
|
resetCredits: accountResetCreditsSchema.optional()
|
|
28040
28067
|
}).strict().superRefine((credits, context) => {
|
|
@@ -28059,7 +28086,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
28059
28086
|
var threadUsageInspectionSchema = external_exports.object({
|
|
28060
28087
|
threadId: hostThreadIdSchema,
|
|
28061
28088
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
28062
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
28089
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
28090
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
28091
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
28063
28092
|
}).strict();
|
|
28064
28093
|
|
|
28065
28094
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -28186,7 +28215,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
28186
28215
|
id: harnessPermissionModeIdSchema,
|
|
28187
28216
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
28188
28217
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
28189
|
-
dangerous: external_exports.boolean().optional()
|
|
28218
|
+
dangerous: external_exports.boolean().optional(),
|
|
28219
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
28190
28220
|
}).strict();
|
|
28191
28221
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
28192
28222
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -28509,6 +28539,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
28509
28539
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
28510
28540
|
message: external_exports.string().max(2048).optional(),
|
|
28511
28541
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
28542
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
28543
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
28512
28544
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
28513
28545
|
}).strict();
|
|
28514
28546
|
|
|
@@ -28647,6 +28679,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
28647
28679
|
invocation: commandInvocationSchema,
|
|
28648
28680
|
label: commandLabelSchema,
|
|
28649
28681
|
description: commandDescriptionSchema.optional(),
|
|
28682
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
28650
28683
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
28651
28684
|
/**
|
|
28652
28685
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -29504,6 +29537,7 @@ var QODER_FALLBACK_COMMAND_CATALOG = harnessCommandCatalogSchema.parse({
|
|
|
29504
29537
|
{
|
|
29505
29538
|
id: "qoder.compact",
|
|
29506
29539
|
invocation: "/compact",
|
|
29540
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
29507
29541
|
label: "Compact",
|
|
29508
29542
|
description: "Compresses the context by replacing it with a summary",
|
|
29509
29543
|
argumentMode: "text"
|
|
@@ -30095,26 +30129,35 @@ var QODER_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
|
30095
30129
|
{
|
|
30096
30130
|
id: "default",
|
|
30097
30131
|
label: "Default",
|
|
30132
|
+
localizations: { "zh-CN": { label: "默认", description: "执行受保护的工具操作前询问。" } },
|
|
30098
30133
|
description: "Ask before protected tool actions."
|
|
30099
30134
|
},
|
|
30100
30135
|
{
|
|
30101
30136
|
id: "acceptEdits",
|
|
30102
30137
|
label: "Accept Edits",
|
|
30138
|
+
localizations: { "zh-CN": { label: "接受编辑", description: "自动接受文件变更。" } },
|
|
30103
30139
|
description: "Automatically accept file changes."
|
|
30104
30140
|
},
|
|
30105
30141
|
{
|
|
30106
30142
|
id: "auto",
|
|
30107
30143
|
label: "Auto",
|
|
30144
|
+
localizations: { "zh-CN": { label: "自动", description: "自动允许安全的工具操作。" } },
|
|
30108
30145
|
description: "Automatically allow safe tool actions."
|
|
30109
30146
|
},
|
|
30110
30147
|
{
|
|
30111
30148
|
id: "plan",
|
|
30112
30149
|
label: "Plan",
|
|
30150
|
+
localizations: {
|
|
30151
|
+
"zh-CN": { label: "规划模式", description: "仅执行只读操作的规划模式。" }
|
|
30152
|
+
},
|
|
30113
30153
|
description: "Plan mode with read-only operations."
|
|
30114
30154
|
},
|
|
30115
30155
|
{
|
|
30116
30156
|
id: "bypassPermissions",
|
|
30117
30157
|
label: "Bypass Permissions",
|
|
30158
|
+
localizations: {
|
|
30159
|
+
"zh-CN": { label: "绕过权限", description: "无需提示即可批准所有工具操作。" }
|
|
30160
|
+
},
|
|
30118
30161
|
description: "Approve all tool actions without prompting.",
|
|
30119
30162
|
dangerous: true
|
|
30120
30163
|
}
|
|
@@ -53676,6 +53719,10 @@ function createQoderInstallation(environment, command, variant = "global") {
|
|
|
53676
53719
|
updateAvailable: false,
|
|
53677
53720
|
canUpdate: false,
|
|
53678
53721
|
messageCode: "qoder-check-unavailable",
|
|
53722
|
+
notice: {
|
|
53723
|
+
en: "This Qoder China release does not expose a non-installing update check. Use its original installer.",
|
|
53724
|
+
"zh-CN": "此 Qoder 中国版尚不支持只检查、不安装的更新查询,请使用原安装方式更新。"
|
|
53725
|
+
},
|
|
53679
53726
|
message: "This Qoder China release does not expose a non-installing update check. Use its original installer."
|
|
53680
53727
|
};
|
|
53681
53728
|
const output = await run(["update", "--check"]);
|
|
@@ -27187,6 +27187,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
27187
27187
|
initializeOnly: external_exports.boolean().optional()
|
|
27188
27188
|
});
|
|
27189
27189
|
|
|
27190
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
27191
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
27192
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
27193
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
27194
|
+
label: displayText(256).optional(),
|
|
27195
|
+
description: displayText(1024).optional()
|
|
27196
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
27197
|
+
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");
|
|
27198
|
+
|
|
27190
27199
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
27191
27200
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
27192
27201
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -27607,8 +27616,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
27607
27616
|
}
|
|
27608
27617
|
});
|
|
27609
27618
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
27619
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
27620
|
+
"weekly",
|
|
27621
|
+
"monthly",
|
|
27622
|
+
"five_hour",
|
|
27623
|
+
"seven_day",
|
|
27624
|
+
"unknown"
|
|
27625
|
+
]);
|
|
27626
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
27627
|
+
id: external_exports.string().min(1).max(256),
|
|
27628
|
+
label: external_exports.string().min(1).max(256),
|
|
27629
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
27630
|
+
}).strict();
|
|
27610
27631
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
27611
27632
|
product: external_exports.string().min(1),
|
|
27633
|
+
/** Native period and scope, never inferred from the display name. */
|
|
27634
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
27635
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
27636
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
27612
27637
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
27613
27638
|
// Zero is a real empty cap, not an absent field.
|
|
27614
27639
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -27630,8 +27655,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
27630
27655
|
label: external_exports.string().min(1).optional(),
|
|
27631
27656
|
usedPercent: usagePercentSchema.optional(),
|
|
27632
27657
|
remaining: external_exports.number().finite().optional(),
|
|
27658
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
27659
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
27633
27660
|
resetsAt: external_exports.string().min(1).optional(),
|
|
27634
|
-
periodType:
|
|
27661
|
+
periodType: accountCreditsPeriodSchema,
|
|
27635
27662
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
27636
27663
|
resetCredits: accountResetCreditsSchema.optional()
|
|
27637
27664
|
}).strict().superRefine((credits, context) => {
|
|
@@ -27656,7 +27683,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
27656
27683
|
var threadUsageInspectionSchema = external_exports.object({
|
|
27657
27684
|
threadId: hostThreadIdSchema,
|
|
27658
27685
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
27659
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
27686
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
27687
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
27688
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
27660
27689
|
}).strict();
|
|
27661
27690
|
|
|
27662
27691
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -27783,7 +27812,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
27783
27812
|
id: harnessPermissionModeIdSchema,
|
|
27784
27813
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
27785
27814
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
27786
|
-
dangerous: external_exports.boolean().optional()
|
|
27815
|
+
dangerous: external_exports.boolean().optional(),
|
|
27816
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
27787
27817
|
}).strict();
|
|
27788
27818
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
27789
27819
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -28106,6 +28136,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
28106
28136
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
28107
28137
|
message: external_exports.string().max(2048).optional(),
|
|
28108
28138
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
28139
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
28140
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
28109
28141
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
28110
28142
|
}).strict();
|
|
28111
28143
|
|
|
@@ -28244,6 +28276,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
28244
28276
|
invocation: commandInvocationSchema,
|
|
28245
28277
|
label: commandLabelSchema,
|
|
28246
28278
|
description: commandDescriptionSchema.optional(),
|
|
28279
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
28247
28280
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
28248
28281
|
/**
|
|
28249
28282
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -29506,6 +29539,7 @@ var QODER_FALLBACK_COMMAND_CATALOG = harnessCommandCatalogSchema.parse({
|
|
|
29506
29539
|
{
|
|
29507
29540
|
id: "qoder.compact",
|
|
29508
29541
|
invocation: "/compact",
|
|
29542
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
29509
29543
|
label: "Compact",
|
|
29510
29544
|
description: "Compresses the context by replacing it with a summary",
|
|
29511
29545
|
argumentMode: "text"
|
|
@@ -30097,26 +30131,35 @@ var QODER_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
|
30097
30131
|
{
|
|
30098
30132
|
id: "default",
|
|
30099
30133
|
label: "Default",
|
|
30134
|
+
localizations: { "zh-CN": { label: "默认", description: "执行受保护的工具操作前询问。" } },
|
|
30100
30135
|
description: "Ask before protected tool actions."
|
|
30101
30136
|
},
|
|
30102
30137
|
{
|
|
30103
30138
|
id: "acceptEdits",
|
|
30104
30139
|
label: "Accept Edits",
|
|
30140
|
+
localizations: { "zh-CN": { label: "接受编辑", description: "自动接受文件变更。" } },
|
|
30105
30141
|
description: "Automatically accept file changes."
|
|
30106
30142
|
},
|
|
30107
30143
|
{
|
|
30108
30144
|
id: "auto",
|
|
30109
30145
|
label: "Auto",
|
|
30146
|
+
localizations: { "zh-CN": { label: "自动", description: "自动允许安全的工具操作。" } },
|
|
30110
30147
|
description: "Automatically allow safe tool actions."
|
|
30111
30148
|
},
|
|
30112
30149
|
{
|
|
30113
30150
|
id: "plan",
|
|
30114
30151
|
label: "Plan",
|
|
30152
|
+
localizations: {
|
|
30153
|
+
"zh-CN": { label: "规划模式", description: "仅执行只读操作的规划模式。" }
|
|
30154
|
+
},
|
|
30115
30155
|
description: "Plan mode with read-only operations."
|
|
30116
30156
|
},
|
|
30117
30157
|
{
|
|
30118
30158
|
id: "bypassPermissions",
|
|
30119
30159
|
label: "Bypass Permissions",
|
|
30160
|
+
localizations: {
|
|
30161
|
+
"zh-CN": { label: "绕过权限", description: "无需提示即可批准所有工具操作。" }
|
|
30162
|
+
},
|
|
30120
30163
|
description: "Approve all tool actions without prompting.",
|
|
30121
30164
|
dangerous: true
|
|
30122
30165
|
}
|
|
@@ -53678,6 +53721,10 @@ function createQoderInstallation(environment, command, variant = "global") {
|
|
|
53678
53721
|
updateAvailable: false,
|
|
53679
53722
|
canUpdate: false,
|
|
53680
53723
|
messageCode: "qoder-check-unavailable",
|
|
53724
|
+
notice: {
|
|
53725
|
+
en: "This Qoder China release does not expose a non-installing update check. Use its original installer.",
|
|
53726
|
+
"zh-CN": "此 Qoder 中国版尚不支持只检查、不安装的更新查询,请使用原安装方式更新。"
|
|
53727
|
+
},
|
|
53681
53728
|
message: "This Qoder China release does not expose a non-installing update check. Use its original installer."
|
|
53682
53729
|
};
|
|
53683
53730
|
const output = await run(["update", "--check"]);
|
|
@@ -14604,6 +14604,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
14604
14604
|
initializeOnly: external_exports.boolean().optional()
|
|
14605
14605
|
});
|
|
14606
14606
|
|
|
14607
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
14608
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
14609
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
|
|
14610
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
14611
|
+
label: displayText(256).optional(),
|
|
14612
|
+
description: displayText(1024).optional()
|
|
14613
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
14614
|
+
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");
|
|
14615
|
+
|
|
14607
14616
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
14608
14617
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
14609
14618
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15024,8 +15033,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15024
15033
|
}
|
|
15025
15034
|
});
|
|
15026
15035
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15036
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15037
|
+
"weekly",
|
|
15038
|
+
"monthly",
|
|
15039
|
+
"five_hour",
|
|
15040
|
+
"seven_day",
|
|
15041
|
+
"unknown"
|
|
15042
|
+
]);
|
|
15043
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15044
|
+
id: external_exports.string().min(1).max(256),
|
|
15045
|
+
label: external_exports.string().min(1).max(256),
|
|
15046
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15047
|
+
}).strict();
|
|
15027
15048
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15028
15049
|
product: external_exports.string().min(1),
|
|
15050
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15051
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15052
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15053
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15029
15054
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15030
15055
|
// Zero is a real empty cap, not an absent field.
|
|
15031
15056
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15047,8 +15072,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15047
15072
|
label: external_exports.string().min(1).optional(),
|
|
15048
15073
|
usedPercent: usagePercentSchema.optional(),
|
|
15049
15074
|
remaining: external_exports.number().finite().optional(),
|
|
15075
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15076
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15050
15077
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15051
|
-
periodType:
|
|
15078
|
+
periodType: accountCreditsPeriodSchema,
|
|
15052
15079
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15053
15080
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15054
15081
|
}).strict().superRefine((credits, context) => {
|
|
@@ -15073,7 +15100,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15073
15100
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15074
15101
|
threadId: hostThreadIdSchema,
|
|
15075
15102
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15076
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15103
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15104
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15105
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15077
15106
|
}).strict();
|
|
15078
15107
|
|
|
15079
15108
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15200,7 +15229,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15200
15229
|
id: harnessPermissionModeIdSchema,
|
|
15201
15230
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15202
15231
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15203
|
-
dangerous: external_exports.boolean().optional()
|
|
15232
|
+
dangerous: external_exports.boolean().optional(),
|
|
15233
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15204
15234
|
}).strict();
|
|
15205
15235
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15206
15236
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -15523,6 +15553,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15523
15553
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
15524
15554
|
message: external_exports.string().max(2048).optional(),
|
|
15525
15555
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
15556
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
15557
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
15526
15558
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
15527
15559
|
}).strict();
|
|
15528
15560
|
|
|
@@ -15661,6 +15693,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
15661
15693
|
invocation: commandInvocationSchema,
|
|
15662
15694
|
label: commandLabelSchema,
|
|
15663
15695
|
description: commandDescriptionSchema.optional(),
|
|
15696
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15664
15697
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
15665
15698
|
/**
|
|
15666
15699
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -17212,6 +17245,8 @@ var BrokeredHarnessAdapter = class {
|
|
|
17212
17245
|
commandCatalog;
|
|
17213
17246
|
liveCommandCatalog;
|
|
17214
17247
|
harnessId;
|
|
17248
|
+
credits;
|
|
17249
|
+
refreshCredits;
|
|
17215
17250
|
#descriptorPath;
|
|
17216
17251
|
#forwardEnvironment;
|
|
17217
17252
|
#isInstalled;
|
|
@@ -17311,6 +17346,10 @@ var BrokeredHarnessAdapter = class {
|
|
|
17311
17346
|
}
|
|
17312
17347
|
constructor(input = {}) {
|
|
17313
17348
|
this.harnessId = harnessPluginIdSchema.parse(input.harnessId ?? "claude-code");
|
|
17349
|
+
if (input.accountCredits !== false) {
|
|
17350
|
+
this.credits = () => this.#credits;
|
|
17351
|
+
this.refreshCredits = () => this.#refreshAccountCredits();
|
|
17352
|
+
}
|
|
17314
17353
|
this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
|
|
17315
17354
|
if (input.commandCatalog)
|
|
17316
17355
|
this.commandCatalog = input.commandCatalog;
|
|
@@ -17322,10 +17361,7 @@ var BrokeredHarnessAdapter = class {
|
|
|
17322
17361
|
this.#startBroker = input.startBroker === false ? void 0 : input.startBroker ?? (process.platform === "darwin" && !input.descriptorPath ? () => startBrokerLaunchAgent(this.harnessId, environment) : void 0);
|
|
17323
17362
|
this.#startTimeoutMs = input.startTimeoutMs ?? BROKER_START_TIMEOUT_MS;
|
|
17324
17363
|
}
|
|
17325
|
-
|
|
17326
|
-
return this.#credits;
|
|
17327
|
-
}
|
|
17328
|
-
refreshCredits() {
|
|
17364
|
+
#refreshAccountCredits() {
|
|
17329
17365
|
if (this.#closed)
|
|
17330
17366
|
return Promise.resolve(null);
|
|
17331
17367
|
if (this.#creditsRefresh)
|
|
@@ -17643,6 +17679,27 @@ function nativeError(error51, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
17643
17679
|
function failure(code, message, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
17644
17680
|
return { ok: false, error: nativeError(new CodeBuddyError(code, message), profile) };
|
|
17645
17681
|
}
|
|
17682
|
+
function nativeTurnError(stopReason, meta3, profile) {
|
|
17683
|
+
const fallback = `Native Turn stopped: ${text(stopReason) || "unknown"} (${text(meta3["codebuddy.ai/outcome"]) || "no native outcome"})`;
|
|
17684
|
+
const raw = text(meta3["codebuddy.ai/errorMessage"]).trim();
|
|
17685
|
+
let diagnostic = "";
|
|
17686
|
+
let category;
|
|
17687
|
+
if (raw) {
|
|
17688
|
+
try {
|
|
17689
|
+
const error51 = record2(JSON.parse(raw));
|
|
17690
|
+
const data = record2(error51.data);
|
|
17691
|
+
diagnostic = text(data.details).trim() || text(error51.message).trim();
|
|
17692
|
+
category = data.category;
|
|
17693
|
+
} catch {
|
|
17694
|
+
diagnostic = raw;
|
|
17695
|
+
}
|
|
17696
|
+
}
|
|
17697
|
+
return nativeError(new CodeBuddyError(
|
|
17698
|
+
// -32000 is shared by native refusals; the category identifies authentication failures.
|
|
17699
|
+
category === "auth" ? "authenticationRequired" : "nativeFailure",
|
|
17700
|
+
diagnostic ? `${fallback}: ${diagnostic}` : fallback
|
|
17701
|
+
), profile);
|
|
17702
|
+
}
|
|
17646
17703
|
async function bounded(operation, milliseconds, label, onTimeout) {
|
|
17647
17704
|
let timer;
|
|
17648
17705
|
try {
|
|
@@ -17664,6 +17721,40 @@ async function bounded(operation, milliseconds, label, onTimeout) {
|
|
|
17664
17721
|
}
|
|
17665
17722
|
}
|
|
17666
17723
|
|
|
17724
|
+
// ../codebuddy/dist/permission-presentation.js
|
|
17725
|
+
var labels = {
|
|
17726
|
+
"Always Ask": "始终询问",
|
|
17727
|
+
"Accept Edits": "接受编辑",
|
|
17728
|
+
Plan: "规划模式",
|
|
17729
|
+
Auto: "自动",
|
|
17730
|
+
"Auto mode": "自动模式",
|
|
17731
|
+
"Don't Ask": "不询问",
|
|
17732
|
+
"Bypass Permissions": "绕过权限",
|
|
17733
|
+
"Full Access": "完全访问",
|
|
17734
|
+
Delegate: "由父会话管理",
|
|
17735
|
+
Default: "默认"
|
|
17736
|
+
};
|
|
17737
|
+
var descriptions = {
|
|
17738
|
+
"Prompts for permission on first use of each tool": "首次使用每种工具时请求权限。",
|
|
17739
|
+
"Automatically accepts file edit permissions for the session": "自动接受本会话中的文件编辑权限。",
|
|
17740
|
+
"Agent can analyze but not modify files or execute commands": "Agent 可以分析,但不能修改文件或执行命令。",
|
|
17741
|
+
"An AI classifier reviews actions that would normally prompt: safe ones are auto-approved, risky ones are denied. If the classifier is unavailable, the action falls back to a prompt (or is denied when prompts cannot be shown)": "由 AI 分类器评估原本需要询问的操作:安全操作自动批准,风险操作拒绝。分类器不可用时改为询问;无法显示询问时拒绝。",
|
|
17742
|
+
"Does not show permission prompts; pre-approved and safe read-only actions run, everything else that would prompt is denied": "不显示权限询问;已获批准和安全的只读操作可以执行,其余原本需要询问的操作会被拒绝。",
|
|
17743
|
+
"Skips all permission prompts": "跳过常规权限询问。",
|
|
17744
|
+
"Skips ALL permission checks including dangerous commands for all agents": "为所有 Agent 跳过全部权限检查,包括危险命令。",
|
|
17745
|
+
"Permissions managed by parent session": "由父会话管理权限。"
|
|
17746
|
+
};
|
|
17747
|
+
function permissionLocalizations(label, description) {
|
|
17748
|
+
const localizedLabel = Object.hasOwn(labels, label) ? labels[label] : void 0;
|
|
17749
|
+
const localizedDescription = Object.hasOwn(descriptions, description) ? descriptions[description] : void 0;
|
|
17750
|
+
return {
|
|
17751
|
+
"zh-CN": {
|
|
17752
|
+
...localizedLabel ? { label: localizedLabel } : {},
|
|
17753
|
+
...localizedDescription ? { description: localizedDescription } : {}
|
|
17754
|
+
}
|
|
17755
|
+
};
|
|
17756
|
+
}
|
|
17757
|
+
|
|
17667
17758
|
// ../codebuddy/dist/configuration.js
|
|
17668
17759
|
var CODEBUDDY_CAPABILITIES = {
|
|
17669
17760
|
configuration: {
|
|
@@ -17721,6 +17812,7 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
17721
17812
|
modes: rows(mode.options).map((option) => ({
|
|
17722
17813
|
id: option.value,
|
|
17723
17814
|
label: option.name,
|
|
17815
|
+
localizations: permissionLocalizations(text(option.name), text(option.description)),
|
|
17724
17816
|
...option.description ? { description: option.description } : {},
|
|
17725
17817
|
...["bypassPermissions", "fullAccess"].includes(text(option.value)) ? { dangerous: true } : {}
|
|
17726
17818
|
})),
|
|
@@ -18207,6 +18299,11 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
18207
18299
|
id: `${profile.harnessId}.${name}`,
|
|
18208
18300
|
invocation: `/${name}`,
|
|
18209
18301
|
label: name,
|
|
18302
|
+
...name === "compact" && !skill ? {
|
|
18303
|
+
localizations: {
|
|
18304
|
+
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
18305
|
+
}
|
|
18306
|
+
} : {},
|
|
18210
18307
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
18211
18308
|
argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none",
|
|
18212
18309
|
...record2(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
@@ -25763,7 +25860,7 @@ var CodeBuddySession = class {
|
|
|
25763
25860
|
// Those remain visible on individual Items; they do not fail the completed Turn.
|
|
25764
25861
|
(!meta3["codebuddy.ai/outcome"] || meta3["codebuddy.ai/outcome"] === "SUCCESS" || meta3["codebuddy.ai/outcome"] === "PARTIAL_SUCCESS") ? { status: "succeeded" } : {
|
|
25765
25862
|
status: "failed",
|
|
25766
|
-
error:
|
|
25863
|
+
error: nativeTurnError(stop, meta3, this.profile)
|
|
25767
25864
|
};
|
|
25768
25865
|
const snapshot = await this.#snapshot();
|
|
25769
25866
|
const added = snapshot.turns.filter((turn) => !active.before.has(turn.nativeTurnRef.nativeTurnKey));
|
|
@@ -26070,6 +26167,121 @@ function workBuddyDelegationArguments(environment, ephemeral) {
|
|
|
26070
26167
|
return ["--append-system-prompt", WORKBUDDY_DELEGATION_INSTRUCTIONS];
|
|
26071
26168
|
}
|
|
26072
26169
|
|
|
26170
|
+
// dist/credential-bootstrap.js
|
|
26171
|
+
var WORKBUDDY_CREDENTIAL_PRELOAD = String.raw`
|
|
26172
|
+
(() => {
|
|
26173
|
+
const env = process.env;
|
|
26174
|
+
const bootstrapEnvironment = [
|
|
26175
|
+
"CODEBUDDY_SIDECAR_CREDENTIAL_BOOTSTRAP_SOCKET",
|
|
26176
|
+
"CODEBUDDY_SIDECAR_READY_SOCKET",
|
|
26177
|
+
"CODEBUDDY_SIDECAR_READY_TOKEN",
|
|
26178
|
+
"CODEBUDDY_SIDECAR_READY_SESSION_ID",
|
|
26179
|
+
];
|
|
26180
|
+
if (bootstrapEnvironment.some(name => env[name] !== undefined)) {
|
|
26181
|
+
if (!["WORKBUDDY_AT_REST_ENCRYPTION", ...bootstrapEnvironment].every(name => env[name]?.trim())) {
|
|
26182
|
+
throw Error("WorkBuddy credential bootstrap environment is incomplete");
|
|
26183
|
+
}
|
|
26184
|
+
return;
|
|
26185
|
+
}
|
|
26186
|
+
const policy = env.WORKBUDDY_AT_REST_ENCRYPTION?.trim();
|
|
26187
|
+
// Other explicit policies remain owned by the native CLI.
|
|
26188
|
+
if (policy && policy !== "fields") return;
|
|
26189
|
+
|
|
26190
|
+
let provider;
|
|
26191
|
+
try {
|
|
26192
|
+
provider = process._linkedBinding("electron_browser_workbuddy_storage");
|
|
26193
|
+
} catch {
|
|
26194
|
+
// Older app runtimes predate encrypted credential fields.
|
|
26195
|
+
return;
|
|
26196
|
+
}
|
|
26197
|
+
const crypto = require("node:crypto");
|
|
26198
|
+
const net = require("node:net");
|
|
26199
|
+
const fs = require("node:fs");
|
|
26200
|
+
const path = require("node:path");
|
|
26201
|
+
let payload;
|
|
26202
|
+
try { payload = JSON.parse(provider.loggerGet()); }
|
|
26203
|
+
catch { throw Error("WorkBuddy credential key provider is unavailable"); }
|
|
26204
|
+
let secret = payload && payload.atRestSecretKey;
|
|
26205
|
+
const decoded = typeof secret === "string" ? Buffer.from(secret, "base64") : Buffer.alloc(0);
|
|
26206
|
+
const valid = payload && payload.version === 1 && decoded.length === 32 &&
|
|
26207
|
+
decoded.toString("base64") === secret && !decoded.every(byte => byte === 0);
|
|
26208
|
+
decoded.fill(0);
|
|
26209
|
+
if (!valid) throw Error("WorkBuddy credential key payload is unsupported");
|
|
26210
|
+
// Match the native normalizeAtRestKeyPayload; the base64 text is hashed, not its decoded bytes.
|
|
26211
|
+
const key = crypto.createHash("sha256").update(secret, "utf8").digest();
|
|
26212
|
+
secret = undefined;
|
|
26213
|
+
payload = undefined;
|
|
26214
|
+
const token = crypto.randomBytes(24).toString("hex");
|
|
26215
|
+
const sessionId = crypto.randomUUID();
|
|
26216
|
+
let directory;
|
|
26217
|
+
let socketPath;
|
|
26218
|
+
if (process.platform === "win32") {
|
|
26219
|
+
socketPath = "\\\\.\\pipe\\codexhost-wb-" + process.pid + "-" + token;
|
|
26220
|
+
} else {
|
|
26221
|
+
let root = require("node:os").tmpdir();
|
|
26222
|
+
if (Buffer.byteLength(root) > 65) root = "/tmp";
|
|
26223
|
+
directory = fs.mkdtempSync(path.join(root, "ch-wb-"));
|
|
26224
|
+
fs.chmodSync(directory, 0o700);
|
|
26225
|
+
socketPath = path.join(directory, "c");
|
|
26226
|
+
}
|
|
26227
|
+
const cleanup = () => {
|
|
26228
|
+
if (directory) try { fs.rmSync(directory, {recursive:true,force:true}); } catch {}
|
|
26229
|
+
};
|
|
26230
|
+
process.once("exit", cleanup);
|
|
26231
|
+
Object.assign(env, {
|
|
26232
|
+
WORKBUDDY_AT_REST_ENCRYPTION: "fields",
|
|
26233
|
+
CODEBUDDY_SIDECAR_CREDENTIAL_BOOTSTRAP_SOCKET: socketPath,
|
|
26234
|
+
CODEBUDDY_SIDECAR_READY_SOCKET: socketPath + "-ready",
|
|
26235
|
+
CODEBUDDY_SIDECAR_READY_TOKEN: token,
|
|
26236
|
+
CODEBUDDY_SIDECAR_READY_SESSION_ID: sessionId,
|
|
26237
|
+
});
|
|
26238
|
+
let message = JSON.stringify({version:1,sessionId,token,pid:process.pid,bootstrap:{
|
|
26239
|
+
version:1,policy:"fields",
|
|
26240
|
+
symmetricKey:{keyId:crypto.createHash("sha256").update(key).digest("hex").slice(0,16),keyBase64:key.toString("base64")},
|
|
26241
|
+
asymmetricUnavailable:"missing-key",
|
|
26242
|
+
}}) + "\n";
|
|
26243
|
+
key.fill(0);
|
|
26244
|
+
let done = false;
|
|
26245
|
+
let socket;
|
|
26246
|
+
const finish = success => {
|
|
26247
|
+
if (done) return;
|
|
26248
|
+
done = true;
|
|
26249
|
+
clearTimeout(timer);
|
|
26250
|
+
socket && socket.destroy();
|
|
26251
|
+
message = "";
|
|
26252
|
+
cleanup();
|
|
26253
|
+
process.removeListener("exit", cleanup);
|
|
26254
|
+
if (!success) {
|
|
26255
|
+
process.stderr.write("WorkBuddy credential bootstrap failed\n");
|
|
26256
|
+
process.exit(1);
|
|
26257
|
+
}
|
|
26258
|
+
};
|
|
26259
|
+
const timer = setTimeout(() => finish(false), 4500);
|
|
26260
|
+
const connect = () => {
|
|
26261
|
+
if (done) return;
|
|
26262
|
+
socket = net.createConnection(socketPath);
|
|
26263
|
+
let reply = "";
|
|
26264
|
+
socket.once("connect", () => socket.end(message, () => { message = ""; }));
|
|
26265
|
+
socket.on("data", chunk => {
|
|
26266
|
+
reply += chunk;
|
|
26267
|
+
if (reply.length > 1024) return finish(false);
|
|
26268
|
+
if (!reply.includes("\n")) return;
|
|
26269
|
+
try {
|
|
26270
|
+
const result = JSON.parse(reply.slice(0, reply.indexOf("\n")));
|
|
26271
|
+
finish(result.ok === true && result.policy === "fields");
|
|
26272
|
+
} catch { finish(false); }
|
|
26273
|
+
});
|
|
26274
|
+
socket.once("end", () => { if (!done) finish(false); });
|
|
26275
|
+
socket.once("error", error => {
|
|
26276
|
+
socket.destroy();
|
|
26277
|
+
if (error.code === "ENOENT" || error.code === "ECONNREFUSED") setTimeout(connect, 20);
|
|
26278
|
+
else finish(false);
|
|
26279
|
+
});
|
|
26280
|
+
};
|
|
26281
|
+
setImmediate(connect);
|
|
26282
|
+
})();
|
|
26283
|
+
`;
|
|
26284
|
+
|
|
26073
26285
|
// dist/discovery.js
|
|
26074
26286
|
var WORKBUDDY_MACOS_ELECTRON = "/Applications/WorkBuddy AI.app/Contents/MacOS/Electron";
|
|
26075
26287
|
var windowsRoots = [
|
|
@@ -26214,7 +26426,8 @@ function workBuddyInvocation(environment, ephemeral, dependenciesOrArguments = {
|
|
|
26214
26426
|
} : configuredEnvironment;
|
|
26215
26427
|
return {
|
|
26216
26428
|
...commandInvocation(executable, [
|
|
26217
|
-
...bundle ? [
|
|
26429
|
+
...bundle ? ["--eval", `${WORKBUDDY_CREDENTIAL_PRELOAD}
|
|
26430
|
+
require(process.argv[1]);`, bundle.cli] : [],
|
|
26218
26431
|
...nativeArguments ?? [
|
|
26219
26432
|
"--acp",
|
|
26220
26433
|
...ephemeral ? ["--no-session-persistence"] : [],
|
|
@@ -26232,6 +26445,7 @@ var WORKBUDDY_COMMAND_CATALOG = harnessCommandCatalogSchema.parse({
|
|
|
26232
26445
|
{
|
|
26233
26446
|
id: "workbuddy.compact",
|
|
26234
26447
|
invocation: "/compact",
|
|
26448
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
26235
26449
|
label: "Compact context",
|
|
26236
26450
|
description: "Compact the current WorkBuddy Session context",
|
|
26237
26451
|
argumentMode: "text"
|
|
@@ -26359,15 +26573,15 @@ function normalizedLabel(value) {
|
|
|
26359
26573
|
}
|
|
26360
26574
|
function mergeWorkBuddyProductModels(catalog, productModels) {
|
|
26361
26575
|
const refs = new Set(catalog.models.map((model2) => model2.ref.id));
|
|
26362
|
-
const
|
|
26576
|
+
const labels2 = new Set(catalog.models.map((model2) => normalizedLabel(model2.label)));
|
|
26363
26577
|
const models = [...catalog.models];
|
|
26364
26578
|
for (const productModel of productModels) {
|
|
26365
26579
|
const ref = modelRef(productModel.id);
|
|
26366
26580
|
const labelKey = normalizedLabel(productModel.name);
|
|
26367
|
-
if (refs.has(ref.id) ||
|
|
26581
|
+
if (refs.has(ref.id) || labels2.has(labelKey))
|
|
26368
26582
|
continue;
|
|
26369
26583
|
refs.add(ref.id);
|
|
26370
|
-
|
|
26584
|
+
labels2.add(labelKey);
|
|
26371
26585
|
const creditLabel = productModel.credits?.replace(/^x/iu, "").replace(/\s*credits$/iu, "x");
|
|
26372
26586
|
const annotatedLabel = creditLabel ? `${productModel.name} · ${creditLabel}` : productModel.name;
|
|
26373
26587
|
models.push({
|
|
@@ -26431,6 +26645,7 @@ function createHarnessAdapter(context) {
|
|
|
26431
26645
|
...context.launchCommand ? { CODEXHOST_WORKBUDDY_COMMAND: context.launchCommand } : {}
|
|
26432
26646
|
};
|
|
26433
26647
|
return new BrokeredHarnessAdapter({
|
|
26648
|
+
accountCredits: false,
|
|
26434
26649
|
harnessId: "workbuddy",
|
|
26435
26650
|
commandCatalog: WORKBUDDY_COMMAND_CATALOG,
|
|
26436
26651
|
forwardDelegationEnvironment: true,
|