@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
|
@@ -18842,6 +18842,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
18842
18842
|
initializeOnly: external_exports.boolean().optional()
|
|
18843
18843
|
});
|
|
18844
18844
|
|
|
18845
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
18846
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
18847
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
18848
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
18849
|
+
label: displayText(256).optional(),
|
|
18850
|
+
description: displayText(1024).optional()
|
|
18851
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
18852
|
+
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");
|
|
18853
|
+
|
|
18845
18854
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
18846
18855
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
18847
18856
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -19178,8 +19187,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
19178
19187
|
}
|
|
19179
19188
|
});
|
|
19180
19189
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
19190
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
19191
|
+
"weekly",
|
|
19192
|
+
"monthly",
|
|
19193
|
+
"five_hour",
|
|
19194
|
+
"seven_day",
|
|
19195
|
+
"unknown"
|
|
19196
|
+
]);
|
|
19197
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
19198
|
+
id: external_exports.string().min(1).max(256),
|
|
19199
|
+
label: external_exports.string().min(1).max(256),
|
|
19200
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
19201
|
+
}).strict();
|
|
19181
19202
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
19182
19203
|
product: external_exports.string().min(1),
|
|
19204
|
+
/** Native period and scope, never inferred from the display name. */
|
|
19205
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
19206
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
19207
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19183
19208
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
19184
19209
|
// Zero is a real empty cap, not an absent field.
|
|
19185
19210
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -19199,9 +19224,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
19199
19224
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
19200
19225
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
19201
19226
|
label: external_exports.string().min(1).optional(),
|
|
19227
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
19228
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19202
19229
|
usedPercent: usagePercentSchema,
|
|
19203
19230
|
resetsAt: external_exports.string().min(1).optional(),
|
|
19204
|
-
periodType:
|
|
19231
|
+
periodType: accountCreditsPeriodSchema,
|
|
19205
19232
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
19206
19233
|
resetCredits: accountResetCreditsSchema.optional()
|
|
19207
19234
|
}).strict();
|
|
@@ -19212,7 +19239,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
19212
19239
|
var threadUsageInspectionSchema = external_exports.object({
|
|
19213
19240
|
threadId: hostThreadIdSchema,
|
|
19214
19241
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
19215
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
19242
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
19243
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
19244
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
19216
19245
|
}).strict();
|
|
19217
19246
|
|
|
19218
19247
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -19339,7 +19368,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
19339
19368
|
id: harnessPermissionModeIdSchema,
|
|
19340
19369
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
19341
19370
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
19342
|
-
dangerous: external_exports.boolean().optional()
|
|
19371
|
+
dangerous: external_exports.boolean().optional(),
|
|
19372
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
19343
19373
|
}).strict();
|
|
19344
19374
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
19345
19375
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -19726,6 +19756,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
19726
19756
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
19727
19757
|
message: external_exports.string().max(2048).optional(),
|
|
19728
19758
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
19759
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
19760
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
19729
19761
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
19730
19762
|
}).strict();
|
|
19731
19763
|
|
|
@@ -19856,6 +19888,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
19856
19888
|
invocation: commandInvocationSchema,
|
|
19857
19889
|
label: commandLabelSchema,
|
|
19858
19890
|
description: commandDescriptionSchema.optional(),
|
|
19891
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19859
19892
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
19860
19893
|
/**
|
|
19861
19894
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -21890,7 +21923,7 @@ function validateV4Event(event) {
|
|
|
21890
21923
|
break;
|
|
21891
21924
|
case "subagent/catalog":
|
|
21892
21925
|
requiredOptionalKeys(data, ["version", "childId", "childCreatedAt", "mode"], ["label"]);
|
|
21893
|
-
if (data.version
|
|
21926
|
+
if (!(data.version === 0 && (data.mode === "one-shot" || data.mode === "continuable") || data.version === 2 && data.mode === "external"))
|
|
21894
21927
|
throw invalid("subagent catalog");
|
|
21895
21928
|
identifier(data.childId, "subagent catalog childId");
|
|
21896
21929
|
nonNegativeInteger2(data.childCreatedAt, "subagent catalog childCreatedAt");
|
|
@@ -22195,6 +22228,7 @@ var commandDefinitions = [
|
|
|
22195
22228
|
{
|
|
22196
22229
|
id: "dsh.compact",
|
|
22197
22230
|
invocation: "/compact",
|
|
22231
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
22198
22232
|
label: "Compact context",
|
|
22199
22233
|
description: "Compact the current conversation context",
|
|
22200
22234
|
argumentMode: "none"
|
|
@@ -22423,14 +22457,16 @@ var MAX_TIMER_MILLISECONDS = 2147483647;
|
|
|
22423
22457
|
var NUMERIC_IDENTIFIER = String.raw`(?:0|[1-9]\d*)`;
|
|
22424
22458
|
var PRERELEASE_IDENTIFIER = String.raw`(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)`;
|
|
22425
22459
|
var SEMVER_PATTERN = new RegExp(String.raw`^${NUMERIC_IDENTIFIER}\.${NUMERIC_IDENTIFIER}\.${NUMERIC_IDENTIFIER}` + String.raw`(?:-${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*)?` + String.raw`(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$`, "u");
|
|
22426
|
-
var DEEPSEEK_NEWEST_VERIFIED_VERSION = "0.2.
|
|
22460
|
+
var DEEPSEEK_NEWEST_VERIFIED_VERSION = "0.2.1-rc.2";
|
|
22427
22461
|
var DEEPSEEK_VERIFIED_VERSIONS = [
|
|
22428
22462
|
"0.1.7-rc.1",
|
|
22429
22463
|
"0.1.7-rc.2",
|
|
22430
22464
|
"0.2.0-rc.1",
|
|
22465
|
+
"0.2.0-rc.2",
|
|
22466
|
+
"0.2.1-rc.1",
|
|
22431
22467
|
DEEPSEEK_NEWEST_VERIFIED_VERSION
|
|
22432
22468
|
];
|
|
22433
|
-
var DEEPSEEK_UPGRADE_COMMAND =
|
|
22469
|
+
var DEEPSEEK_UPGRADE_COMMAND = "npm install -g @deepseek-ai/dsh@latest";
|
|
22434
22470
|
var DEFAULT_DEEPSEEK_ENDPOINT = "http://127.0.0.1:3080/";
|
|
22435
22471
|
var MODERN_AUTHENTICATION_FINGERPRINT = Buffer.from("dsh web authentication required; reopen the URL printed by dsh web.\n");
|
|
22436
22472
|
var MODERN_AUTHENTICATION_PROBE_TIMEOUT_MS = 1e3;
|
|
@@ -24917,6 +24953,15 @@ var AUTO_PERMISSION_MODE_ID = "auto";
|
|
|
24917
24953
|
var MAX_CATALOG_BYTES2 = 16 * 1024 * 1024;
|
|
24918
24954
|
var MAX_CATALOG_DEPTH2 = 64;
|
|
24919
24955
|
var MAX_CATALOG_NODES2 = 2e5;
|
|
24956
|
+
var presetLabels = /* @__PURE__ */ new Map([
|
|
24957
|
+
["Auto", { en: "Auto", zh: "自动" }],
|
|
24958
|
+
["read-only", { en: "Read only", zh: "只读" }],
|
|
24959
|
+
["workspace-write", { en: "Workspace write", zh: "工作区写入" }],
|
|
24960
|
+
["danger-full-access", { en: "Full access (dangerous)", zh: "完全访问(危险)" }],
|
|
24961
|
+
["Read only", { en: "Read only", zh: "只读" }],
|
|
24962
|
+
["Workspace write", { en: "Workspace write", zh: "工作区写入" }],
|
|
24963
|
+
["Full access (dangerous)", { en: "Full access (dangerous)", zh: "完全访问(危险)" }]
|
|
24964
|
+
]);
|
|
24920
24965
|
var ModernPermissionModeError = class extends Error {
|
|
24921
24966
|
code;
|
|
24922
24967
|
nativeCode;
|
|
@@ -25018,9 +25063,11 @@ function presetOptions(value, area) {
|
|
|
25018
25063
|
if (description !== void 0 && (typeof description !== "string" || description.length > HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH)) {
|
|
25019
25064
|
throw permissionError("protocolError", "DeepSeek Harness returned an invalid permission option description");
|
|
25020
25065
|
}
|
|
25066
|
+
const presentation = presetLabels.get(label);
|
|
25021
25067
|
return {
|
|
25022
25068
|
id: id.data,
|
|
25023
25069
|
label,
|
|
25070
|
+
...presentation ? { localizations: { en: { label: presentation.en }, "zh-CN": { label: presentation.zh } } } : {},
|
|
25024
25071
|
...description?.trim() ? { description } : {}
|
|
25025
25072
|
};
|
|
25026
25073
|
});
|
|
@@ -27011,6 +27058,8 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
27011
27058
|
"hook/invoked",
|
|
27012
27059
|
"hook/result",
|
|
27013
27060
|
"image/offload",
|
|
27061
|
+
"job/registered",
|
|
27062
|
+
"job/settled",
|
|
27014
27063
|
"llm/retry",
|
|
27015
27064
|
"llm/retry-started",
|
|
27016
27065
|
"model/selection",
|
|
@@ -27047,6 +27096,7 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
27047
27096
|
"turn/start",
|
|
27048
27097
|
"user/message",
|
|
27049
27098
|
"web/deepseek-search-llm-request",
|
|
27099
|
+
"working-directory/change",
|
|
27050
27100
|
"workspace/changes"
|
|
27051
27101
|
]);
|
|
27052
27102
|
var SURFACE_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -27220,6 +27270,14 @@ var ModernEventValidator = class {
|
|
|
27220
27270
|
return;
|
|
27221
27271
|
case "workspace/changes":
|
|
27222
27272
|
return;
|
|
27273
|
+
case "working-directory/change":
|
|
27274
|
+
exactKeys(data, ["cwd"]);
|
|
27275
|
+
requiredString(data.cwd, "working-directory/change cwd");
|
|
27276
|
+
return;
|
|
27277
|
+
case "job/registered":
|
|
27278
|
+
case "job/settled":
|
|
27279
|
+
validateJobLifecycle(event.type, data);
|
|
27280
|
+
return;
|
|
27223
27281
|
case "agent-preset/selected":
|
|
27224
27282
|
exactKeys(data, ["agentPreset"]);
|
|
27225
27283
|
requiredString(data.agentPreset, "agent-preset/selected agentPreset");
|
|
@@ -28203,7 +28261,7 @@ function validateSessionTitle(data) {
|
|
|
28203
28261
|
}
|
|
28204
28262
|
}
|
|
28205
28263
|
function validateSessionTitleRequest(data) {
|
|
28206
|
-
|
|
28264
|
+
requiredOptionalKeys(data, ["titleProvider", "messageSeqs", "route", "system", "messages", "maxTokens"], ["reasoningEffort"]);
|
|
28207
28265
|
requiredString(data.titleProvider, "session/title request provider");
|
|
28208
28266
|
validateSeqArray(data.messageSeqs, "session/title request messageSeqs");
|
|
28209
28267
|
validateModelRoute(data.route, "session/title request route");
|
|
@@ -28217,6 +28275,9 @@ function validateSessionTitleRequest(data) {
|
|
|
28217
28275
|
}
|
|
28218
28276
|
}
|
|
28219
28277
|
positiveInteger(data.maxTokens, "session/title request maxTokens");
|
|
28278
|
+
if (data.reasoningEffort !== void 0 && !nonBlankString(data.reasoningEffort)) {
|
|
28279
|
+
fail("Modern history session/title request reasoningEffort is invalid");
|
|
28280
|
+
}
|
|
28220
28281
|
}
|
|
28221
28282
|
function validateTodoWrite(data) {
|
|
28222
28283
|
exactKeys(data, ["todos"]);
|
|
@@ -28260,12 +28321,47 @@ function validateWorkflow(type, data) {
|
|
|
28260
28321
|
requiredString(data.runId, "workflow runId");
|
|
28261
28322
|
enumValue(data.stopReason, ["completed", "cancelled", "error"], "workflow stopReason");
|
|
28262
28323
|
}
|
|
28324
|
+
function validateJobLifecycle(type, data) {
|
|
28325
|
+
const settled = type === "job/settled";
|
|
28326
|
+
requiredOptionalKeys(data, [
|
|
28327
|
+
"jobId",
|
|
28328
|
+
"owner",
|
|
28329
|
+
"kind",
|
|
28330
|
+
"label",
|
|
28331
|
+
"startedAt",
|
|
28332
|
+
...settled ? ["finishedAt", "status", "cause", "producerReported"] : []
|
|
28333
|
+
], settled ? ["toolCall", "detail"] : ["toolCall"]);
|
|
28334
|
+
requiredString(data.jobId, `${type} jobId`);
|
|
28335
|
+
requiredString(data.owner, `${type} owner`);
|
|
28336
|
+
requiredString(data.kind, `${type} kind`);
|
|
28337
|
+
if (typeof data.label !== "string")
|
|
28338
|
+
fail(`Modern history ${type} label is invalid`);
|
|
28339
|
+
nonNegativeInteger(data.startedAt, `${type} startedAt`);
|
|
28340
|
+
if (data.toolCall !== void 0) {
|
|
28341
|
+
if (!isRecord4(data.toolCall))
|
|
28342
|
+
fail(`Modern history ${type} toolCall is malformed`);
|
|
28343
|
+
exactKeys(data.toolCall, ["callId", "rootCallId"]);
|
|
28344
|
+
requiredString(data.toolCall.callId, `${type} toolCall callId`);
|
|
28345
|
+
requiredString(data.toolCall.rootCallId, `${type} toolCall rootCallId`);
|
|
28346
|
+
}
|
|
28347
|
+
if (!settled)
|
|
28348
|
+
return;
|
|
28349
|
+
nonNegativeInteger(data.finishedAt, "job/settled finishedAt");
|
|
28350
|
+
enumValue(data.status, ["completed", "killed", "failed"], "job/settled status");
|
|
28351
|
+
enumValue(data.cause, ["producer", "kill", "teardown"], "job/settled cause");
|
|
28352
|
+
if (typeof data.producerReported !== "boolean") {
|
|
28353
|
+
fail("Modern history job/settled producerReported is invalid");
|
|
28354
|
+
}
|
|
28355
|
+
if (data.detail !== void 0 && typeof data.detail !== "string") {
|
|
28356
|
+
fail("Modern history job/settled detail is invalid");
|
|
28357
|
+
}
|
|
28358
|
+
}
|
|
28263
28359
|
function validatePtcDispatch(type, data, profile) {
|
|
28264
28360
|
const settle = type === "tool/ptc-dispatch";
|
|
28265
28361
|
const required2 = ["rootCallId", "parentCallId", "subCallId", "name", "arguments"];
|
|
28266
28362
|
if (settle)
|
|
28267
28363
|
required2.push("isError", "content");
|
|
28268
|
-
requiredOptionalKeys(data, required2, settle ? ["error"] : []);
|
|
28364
|
+
requiredOptionalKeys(data, required2, settle ? ["error", "meta"] : []);
|
|
28269
28365
|
for (const key of ["rootCallId", "parentCallId", "subCallId", "name"]) {
|
|
28270
28366
|
requiredString(data[key], `tool/ptc-dispatch ${key}`);
|
|
28271
28367
|
}
|
|
@@ -28414,12 +28510,20 @@ function validateSearchRequest(data) {
|
|
|
28414
28510
|
requiredString(data.apiVersion, "search request apiVersion");
|
|
28415
28511
|
if (!isRecord4(data.body))
|
|
28416
28512
|
fail("Modern history search request body is malformed");
|
|
28417
|
-
requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], []);
|
|
28513
|
+
requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], ["thinking"]);
|
|
28418
28514
|
requiredString(data.body.model, "search request model");
|
|
28419
28515
|
positiveInteger(data.body.max_tokens, "search request max_tokens");
|
|
28420
28516
|
if (!Array.isArray(data.body.messages) || !Array.isArray(data.body.tools)) {
|
|
28421
28517
|
fail("Modern history search request arrays are malformed");
|
|
28422
28518
|
}
|
|
28519
|
+
if (data.body.thinking !== void 0) {
|
|
28520
|
+
const { thinking } = data.body;
|
|
28521
|
+
if (!isRecord4(thinking))
|
|
28522
|
+
fail("Modern history search request thinking is malformed");
|
|
28523
|
+
exactKeys(thinking, ["type"]);
|
|
28524
|
+
if (thinking.type !== "disabled")
|
|
28525
|
+
fail("Modern history search request thinking is invalid");
|
|
28526
|
+
}
|
|
28423
28527
|
}
|
|
28424
28528
|
function validateModelRoute(value, label) {
|
|
28425
28529
|
if (!isRecord4(value))
|
|
@@ -31055,7 +31159,8 @@ function titleFromProjections(value) {
|
|
|
31055
31159
|
return typeof title === "string" && title.trim().length > 0 && title.length <= DEEPSEEK_MODERN_SESSION_TITLE_MAX_LENGTH && !title.includes("\0") ? title : null;
|
|
31056
31160
|
}
|
|
31057
31161
|
function parseSummary(value) {
|
|
31058
|
-
if (!isPlainRecord7(value) || !exactKeys5(value, ["sessionId", "updatedAt", "agentAvailable", "running", "blank"], ["parentSessionId", "origin", "cwd", "projections"]) ||
|
|
31162
|
+
if (!isPlainRecord7(value) || !exactKeys5(value, ["sessionId", "updatedAt", "agentAvailable", "running", "blank"], ["parentSessionId", "origin", "cwd", "projections", "formatStatus"]) || // DSH 0.2.1 marks rows whose stored log still awaits migration on open.
|
|
31163
|
+
value.formatStatus !== void 0 && value.formatStatus !== "current" && value.formatStatus !== "migration-required" || typeof value.running !== "boolean" || typeof value.blank !== "boolean" || typeof value.agentAvailable !== "boolean" || !validUpdatedAt(value.updatedAt)) {
|
|
31059
31164
|
throw sessionListError("protocolError", "DeepSeek Harness returned an invalid Session row");
|
|
31060
31165
|
}
|
|
31061
31166
|
const sessionId = boundedId(value.sessionId, "Session id");
|
|
@@ -32480,6 +32585,10 @@ function createDeepSeekInstallation(environment, command) {
|
|
|
32480
32585
|
canUpdate,
|
|
32481
32586
|
...!canUpdate ? {
|
|
32482
32587
|
messageCode: "deepseek-original-installer",
|
|
32588
|
+
notice: {
|
|
32589
|
+
en: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm.",
|
|
32590
|
+
"zh-CN": "请使用原安装方式更新。Python、桌面应用及项目内安装不会通过全局 npm 更新。"
|
|
32591
|
+
},
|
|
32483
32592
|
message: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm."
|
|
32484
32593
|
} : {}
|
|
32485
32594
|
};
|
|
@@ -15195,6 +15195,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
15195
15195
|
initializeOnly: external_exports.boolean().optional()
|
|
15196
15196
|
});
|
|
15197
15197
|
|
|
15198
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
15199
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
15200
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
15201
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
15202
|
+
label: displayText(256).optional(),
|
|
15203
|
+
description: displayText(1024).optional()
|
|
15204
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
15205
|
+
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");
|
|
15206
|
+
|
|
15198
15207
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
15199
15208
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
15200
15209
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -15531,8 +15540,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15531
15540
|
}
|
|
15532
15541
|
});
|
|
15533
15542
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15543
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
15544
|
+
"weekly",
|
|
15545
|
+
"monthly",
|
|
15546
|
+
"five_hour",
|
|
15547
|
+
"seven_day",
|
|
15548
|
+
"unknown"
|
|
15549
|
+
]);
|
|
15550
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
15551
|
+
id: external_exports.string().min(1).max(256),
|
|
15552
|
+
label: external_exports.string().min(1).max(256),
|
|
15553
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15554
|
+
}).strict();
|
|
15534
15555
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
15535
15556
|
product: external_exports.string().min(1),
|
|
15557
|
+
/** Native period and scope, never inferred from the display name. */
|
|
15558
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
15559
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15560
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15536
15561
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
15537
15562
|
// Zero is a real empty cap, not an absent field.
|
|
15538
15563
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -15552,9 +15577,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
15552
15577
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
15553
15578
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
15554
15579
|
label: external_exports.string().min(1).optional(),
|
|
15580
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
15581
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
15555
15582
|
usedPercent: usagePercentSchema,
|
|
15556
15583
|
resetsAt: external_exports.string().min(1).optional(),
|
|
15557
|
-
periodType:
|
|
15584
|
+
periodType: accountCreditsPeriodSchema,
|
|
15558
15585
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
15559
15586
|
resetCredits: accountResetCreditsSchema.optional()
|
|
15560
15587
|
}).strict();
|
|
@@ -15565,7 +15592,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
15565
15592
|
var threadUsageInspectionSchema = external_exports.object({
|
|
15566
15593
|
threadId: hostThreadIdSchema,
|
|
15567
15594
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
15568
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15595
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
15596
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
15597
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
15569
15598
|
}).strict();
|
|
15570
15599
|
|
|
15571
15600
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -15692,7 +15721,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
15692
15721
|
id: harnessPermissionModeIdSchema,
|
|
15693
15722
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
15694
15723
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
15695
|
-
dangerous: external_exports.boolean().optional()
|
|
15724
|
+
dangerous: external_exports.boolean().optional(),
|
|
15725
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
15696
15726
|
}).strict();
|
|
15697
15727
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
15698
15728
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -16079,6 +16109,8 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16079
16109
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16080
16110
|
message: external_exports.string().max(2048).optional(),
|
|
16081
16111
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
16112
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
16113
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
16082
16114
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16083
16115
|
}).strict();
|
|
16084
16116
|
|
|
@@ -16205,6 +16237,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
16205
16237
|
invocation: commandInvocationSchema,
|
|
16206
16238
|
label: commandLabelSchema,
|
|
16207
16239
|
description: commandDescriptionSchema.optional(),
|
|
16240
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
16208
16241
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
16209
16242
|
/**
|
|
16210
16243
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -23211,16 +23244,23 @@ var GROK_PERMISSION_MODE_CATALOG = harnessPermissionModeCatalogSchema.parse({
|
|
|
23211
23244
|
{
|
|
23212
23245
|
id: "ask",
|
|
23213
23246
|
label: "Ask",
|
|
23247
|
+
localizations: { "zh-CN": { label: "询问", description: "执行受保护的工具操作前询问。" } },
|
|
23214
23248
|
description: "Ask before protected tool actions."
|
|
23215
23249
|
},
|
|
23216
23250
|
{
|
|
23217
23251
|
id: "auto",
|
|
23218
23252
|
label: "Auto",
|
|
23253
|
+
localizations: {
|
|
23254
|
+
"zh-CN": { label: "自动", description: "由 Grok Build 决定哪些工具操作可自动运行。" }
|
|
23255
|
+
},
|
|
23219
23256
|
description: "Let Grok Build decide which tool actions may run automatically."
|
|
23220
23257
|
},
|
|
23221
23258
|
{
|
|
23222
23259
|
id: "always-approve",
|
|
23223
23260
|
label: "Always approve",
|
|
23261
|
+
localizations: {
|
|
23262
|
+
"zh-CN": { label: "始终批准", description: "无需提示即可批准所有工具操作。" }
|
|
23263
|
+
},
|
|
23224
23264
|
description: "Approve all tool actions without prompting.",
|
|
23225
23265
|
dangerous: true
|
|
23226
23266
|
}
|
|
@@ -24554,7 +24594,20 @@ function productUsageFrom(value) {
|
|
|
24554
24594
|
if (!isRecord15(entry) || typeof entry.product !== "string")
|
|
24555
24595
|
return [];
|
|
24556
24596
|
const usagePercent = finitePercent(entry.usagePercent);
|
|
24557
|
-
|
|
24597
|
+
const labels = {
|
|
24598
|
+
GrokBuild: "Build",
|
|
24599
|
+
GrokChat: "Chat",
|
|
24600
|
+
GrokImagine: "Imagine",
|
|
24601
|
+
GrokVoice: "Voice"
|
|
24602
|
+
};
|
|
24603
|
+
const label = Object.hasOwn(labels, entry.product) ? labels[entry.product] : void 0;
|
|
24604
|
+
return usagePercent === void 0 ? [] : [
|
|
24605
|
+
{
|
|
24606
|
+
product: entry.product,
|
|
24607
|
+
...label ? { localizations: { en: { label }, "zh-CN": { label } } } : {},
|
|
24608
|
+
usagePercent
|
|
24609
|
+
}
|
|
24610
|
+
];
|
|
24558
24611
|
});
|
|
24559
24612
|
return products.length > 0 ? products : void 0;
|
|
24560
24613
|
}
|
|
@@ -24943,6 +24996,7 @@ var grokCommandCatalog = harnessCommandCatalogSchema.parse({
|
|
|
24943
24996
|
{
|
|
24944
24997
|
id: "grok.compact",
|
|
24945
24998
|
invocation: "/compact",
|
|
24999
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
24946
25000
|
label: "Compact context",
|
|
24947
25001
|
description: "Compact the current conversation context",
|
|
24948
25002
|
argumentMode: "text"
|
|
@@ -26036,10 +26090,15 @@ var GrokAdapter = class {
|
|
|
26036
26090
|
async inspectAccount() {
|
|
26037
26091
|
if (this.#closePromise)
|
|
26038
26092
|
return null;
|
|
26039
|
-
|
|
26093
|
+
const account = await (this.#dependencies.fetchAccount ?? fetchGrokAccount)({
|
|
26040
26094
|
...this.#environment ? { environment: this.#environment } : {},
|
|
26041
26095
|
signal: this.#accountAbort.signal
|
|
26042
26096
|
});
|
|
26097
|
+
if (!account?.credits)
|
|
26098
|
+
return account;
|
|
26099
|
+
const credits = { ...account.credits };
|
|
26100
|
+
delete credits.productUsage;
|
|
26101
|
+
return { ...account, credits };
|
|
26043
26102
|
}
|
|
26044
26103
|
credits() {
|
|
26045
26104
|
return this.#credits;
|