@codexhost/cli-darwin-x64 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +94 -8
- package/app/console-web.js +537 -146
- package/app/desktop-controller.mjs +108 -12
- package/app/host-runtime.mjs +847 -235
- package/app/plugins/antigravity/plugin.mjs +143 -20
- package/app/plugins/claude-code/plugin.mjs +601 -71
- package/app/plugins/codebuddy/plugin.mjs +227 -30
- package/app/plugins/codex-usage/plugin.mjs +212 -77
- package/app/plugins/copilot/assets/icon.png +0 -0
- package/app/plugins/copilot/manifest.json +26 -0
- package/app/plugins/copilot/plugin.mjs +34546 -0
- package/app/plugins/cursor-cli/plugin.mjs +20805 -44862
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +202 -21
- package/app/plugins/enabled.json +1 -0
- package/app/plugins/grok/plugin.mjs +278 -29
- package/app/plugins/hermes/plugin.mjs +143 -12
- package/app/plugins/kimi-code/plugin.mjs +140 -16
- package/app/plugins/kiro-cli/plugin.mjs +121 -10
- package/app/plugins/omp/plugin.mjs +2200 -2002
- package/app/plugins/opencode/plugin.mjs +137 -16
- package/app/plugins/pi/plugin.mjs +2563 -2282
- package/app/plugins/qoder/plugin.mjs +133 -14
- package/app/plugins/qoder-cn/plugin.mjs +133 -14
- package/app/plugins/workbuddy/plugin.mjs +603 -56
- package/app/plugins/zcode/plugin.mjs +133 -14
- package/app/renderer-extension.js +1171 -529
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"notice": {
|
|
34
|
-
"en": "Requires DSH 0.1.7-rc.1 or later and the V4 protocol. Verified with 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1 and 0.2.
|
|
35
|
-
"zh-CN": "需要 DSH 0.1.7-rc.1 或更高版本及 V4 协议。已验证 0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1 和 0.2.
|
|
34
|
+
"en": "Requires DSH 0.1.7-rc.1 or later and the V4 protocol. Verified with 0.1.7-rc.1, 0.1.7-rc.2, 0.2.0-rc.1, 0.2.0-rc.2, 0.2.1-rc.1 and 0.2.1-rc.2; other versions require native protocol validation.",
|
|
35
|
+
"zh-CN": "需要 DSH 0.1.7-rc.1 或更高版本及 V4 协议。已验证 0.1.7-rc.1、0.1.7-rc.2、0.2.0-rc.1、0.2.0-rc.2、0.2.1-rc.1 和 0.2.1-rc.2;其他版本仍需通过原生协议校验。"
|
|
36
36
|
},
|
|
37
37
|
"links": {
|
|
38
38
|
"website": "https://github.com/deepseek-ai/deepseek-harness",
|
|
@@ -4209,10 +4209,13 @@ function usageSessionTitle(value) {
|
|
|
4209
4209
|
return void 0;
|
|
4210
4210
|
if (normalized.length <= MAX_SESSION_TITLE_LENGTH)
|
|
4211
4211
|
return normalized;
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4212
|
+
let title = "";
|
|
4213
|
+
for (const character of normalized) {
|
|
4214
|
+
if (title.length + character.length >= MAX_SESSION_TITLE_LENGTH)
|
|
4215
|
+
break;
|
|
4216
|
+
title += character;
|
|
4217
|
+
}
|
|
4218
|
+
return `${title.trimEnd()}…`;
|
|
4216
4219
|
}
|
|
4217
4220
|
function sessionIdOk(value) {
|
|
4218
4221
|
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
@@ -18842,6 +18845,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
|
|
|
18842
18845
|
initializeOnly: external_exports.boolean().optional()
|
|
18843
18846
|
});
|
|
18844
18847
|
|
|
18848
|
+
// ../../shared-contracts/dist/harness-presentation.js
|
|
18849
|
+
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
18850
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
|
|
18851
|
+
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
18852
|
+
label: displayText(256).optional(),
|
|
18853
|
+
description: displayText(1024).optional()
|
|
18854
|
+
}).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
|
|
18855
|
+
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");
|
|
18856
|
+
|
|
18845
18857
|
// ../../shared-contracts/dist/model-price-overrides.js
|
|
18846
18858
|
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
18847
18859
|
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
@@ -18891,10 +18903,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
18891
18903
|
var project = external_exports.string().min(1).max(4096);
|
|
18892
18904
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
18893
18905
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
18906
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
18907
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
18908
|
+
try {
|
|
18909
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
18910
|
+
return true;
|
|
18911
|
+
} catch {
|
|
18912
|
+
return false;
|
|
18913
|
+
}
|
|
18914
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
18894
18915
|
harness: harness.optional(),
|
|
18895
18916
|
model: model.nullable().optional(),
|
|
18896
18917
|
project: project.nullable().optional(),
|
|
18897
|
-
/** One
|
|
18918
|
+
/** One date in the query timezone inside the range. */
|
|
18898
18919
|
date: localDate.optional()
|
|
18899
18920
|
});
|
|
18900
18921
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -18930,7 +18951,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
18930
18951
|
});
|
|
18931
18952
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
18932
18953
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
18933
|
-
/** First
|
|
18954
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
18934
18955
|
from: localDate.nullable(),
|
|
18935
18956
|
to: localDate,
|
|
18936
18957
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -18970,7 +18991,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
18970
18991
|
totals: usageStatisticsTotalsSchema,
|
|
18971
18992
|
/** Each date and Harness of the range: every filter except the day. */
|
|
18972
18993
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
18973
|
-
/**
|
|
18994
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
18974
18995
|
hourly: external_exports.array(external_exports.strictObject({
|
|
18975
18996
|
weekday: external_exports.number().int().min(0).max(6),
|
|
18976
18997
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -19030,6 +19051,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
19030
19051
|
"codexhost/harness/display-settings/set",
|
|
19031
19052
|
"codexhost/harness/inspect",
|
|
19032
19053
|
"codexhost/harness/installation",
|
|
19054
|
+
"codexhost/harness/installation/start",
|
|
19055
|
+
"codexhost/harness/installation/status",
|
|
19033
19056
|
"codexhost/harness/launch-settings/get",
|
|
19034
19057
|
"codexhost/harness/launch-settings/set",
|
|
19035
19058
|
"codexhost/harness/web-ui/open",
|
|
@@ -19105,7 +19128,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
19105
19128
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
19106
19129
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
19107
19130
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
19131
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
19132
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
19133
|
+
kind: external_exports.literal("countdown"),
|
|
19134
|
+
id: external_exports.string().min(1).max(64),
|
|
19135
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
19136
|
+
label: indicatorTextSchema(256).optional(),
|
|
19137
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
19138
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
19139
|
+
message: "Composer indicator IDs must be unique"
|
|
19140
|
+
});
|
|
19108
19141
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
19142
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
19109
19143
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
19110
19144
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
19111
19145
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -19178,8 +19212,24 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
19178
19212
|
}
|
|
19179
19213
|
});
|
|
19180
19214
|
var usagePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
19215
|
+
var accountCreditsPeriodSchema = external_exports.enum([
|
|
19216
|
+
"weekly",
|
|
19217
|
+
"monthly",
|
|
19218
|
+
"five_hour",
|
|
19219
|
+
"seven_day",
|
|
19220
|
+
"unknown"
|
|
19221
|
+
]);
|
|
19222
|
+
var accountCreditsScopeSchema = external_exports.object({
|
|
19223
|
+
id: external_exports.string().min(1).max(256),
|
|
19224
|
+
label: external_exports.string().min(1).max(256),
|
|
19225
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
19226
|
+
}).strict();
|
|
19181
19227
|
var accountCreditsProductUsageSchema = external_exports.object({
|
|
19182
19228
|
product: external_exports.string().min(1),
|
|
19229
|
+
/** Native period and scope, never inferred from the display name. */
|
|
19230
|
+
periodType: accountCreditsPeriodSchema.optional(),
|
|
19231
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
19232
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19183
19233
|
used: external_exports.number().finite().nonnegative().optional(),
|
|
19184
19234
|
// Zero is a real empty cap, not an absent field.
|
|
19185
19235
|
limit: external_exports.number().finite().nonnegative().optional(),
|
|
@@ -19199,9 +19249,11 @@ var accountCreditsSnapshotSchema = external_exports.object({
|
|
|
19199
19249
|
unit: external_exports.string().min(1).max(32).optional(),
|
|
19200
19250
|
/** Native label when the primary limit is scoped to a model or product group. */
|
|
19201
19251
|
label: external_exports.string().min(1).optional(),
|
|
19252
|
+
scope: accountCreditsScopeSchema.optional(),
|
|
19253
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19202
19254
|
usedPercent: usagePercentSchema,
|
|
19203
19255
|
resetsAt: external_exports.string().min(1).optional(),
|
|
19204
|
-
periodType:
|
|
19256
|
+
periodType: accountCreditsPeriodSchema,
|
|
19205
19257
|
productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
|
|
19206
19258
|
resetCredits: accountResetCreditsSchema.optional()
|
|
19207
19259
|
}).strict();
|
|
@@ -19212,7 +19264,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
|
|
|
19212
19264
|
var threadUsageInspectionSchema = external_exports.object({
|
|
19213
19265
|
threadId: hostThreadIdSchema,
|
|
19214
19266
|
usage: threadUsageSnapshotSchema.nullable(),
|
|
19215
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
19267
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
19268
|
+
/** Whether this source can provide cached account quota independently of usage. */
|
|
19269
|
+
accountCreditsSupported: external_exports.boolean().optional()
|
|
19216
19270
|
}).strict();
|
|
19217
19271
|
|
|
19218
19272
|
// ../../shared-contracts/dist/harness-accounts.js
|
|
@@ -19339,7 +19393,8 @@ var harnessPermissionModeSchema = external_exports.object({
|
|
|
19339
19393
|
id: harnessPermissionModeIdSchema,
|
|
19340
19394
|
label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
|
|
19341
19395
|
description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
|
|
19342
|
-
dangerous: external_exports.boolean().optional()
|
|
19396
|
+
dangerous: external_exports.boolean().optional(),
|
|
19397
|
+
localizations: harnessLocalizationsSchema.optional()
|
|
19343
19398
|
}).strict();
|
|
19344
19399
|
var harnessPermissionModeCatalogSchema = external_exports.object({
|
|
19345
19400
|
modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
|
|
@@ -19492,7 +19547,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
19492
19547
|
}).strict().optional(),
|
|
19493
19548
|
autonomousTurns: external_exports.object({
|
|
19494
19549
|
observe: external_exports.boolean()
|
|
19495
|
-
}).strict().optional()
|
|
19550
|
+
}).strict().optional(),
|
|
19551
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
19552
|
+
steer: external_exports.boolean().optional()
|
|
19496
19553
|
}).strict();
|
|
19497
19554
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
19498
19555
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -19539,7 +19596,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
19539
19596
|
var harnessInspectParamsSchema = external_exports.object({
|
|
19540
19597
|
harnessId: harnessIdSchema,
|
|
19541
19598
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
19542
|
-
refresh: external_exports.boolean().optional()
|
|
19599
|
+
refresh: external_exports.boolean().optional(),
|
|
19600
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
19601
|
+
purpose: external_exports.literal("availability").optional()
|
|
19543
19602
|
}).strict();
|
|
19544
19603
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
19545
19604
|
harnessId: harnessIdSchema
|
|
@@ -19622,6 +19681,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
19622
19681
|
seen.add(thread.threadId);
|
|
19623
19682
|
}
|
|
19624
19683
|
});
|
|
19684
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
19685
|
+
threadId: hostThreadIdSchema,
|
|
19686
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
19687
|
+
text: external_exports.string().optional()
|
|
19688
|
+
}).strict();
|
|
19689
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
19690
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
19691
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
19692
|
+
}).strict();
|
|
19625
19693
|
|
|
19626
19694
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
19627
19695
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -19723,11 +19791,31 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
19723
19791
|
latestVersion: external_exports.string().min(1).max(128),
|
|
19724
19792
|
updateAvailable: external_exports.boolean(),
|
|
19725
19793
|
canUpdate: external_exports.boolean(),
|
|
19794
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
19795
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
19796
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
19797
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
19726
19798
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
19727
19799
|
message: external_exports.string().max(2048).optional(),
|
|
19728
19800
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
19801
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
19802
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
19729
19803
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
19730
19804
|
}).strict();
|
|
19805
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
19806
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
19807
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
19808
|
+
external_exports.object({
|
|
19809
|
+
taskId: external_exports.string().uuid(),
|
|
19810
|
+
status: external_exports.literal("succeeded"),
|
|
19811
|
+
result: harnessInstallationStateSchema
|
|
19812
|
+
}).strict(),
|
|
19813
|
+
external_exports.object({
|
|
19814
|
+
taskId: external_exports.string().uuid(),
|
|
19815
|
+
status: external_exports.literal("failed"),
|
|
19816
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
19817
|
+
}).strict()
|
|
19818
|
+
]);
|
|
19731
19819
|
|
|
19732
19820
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
19733
19821
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -19856,6 +19944,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
|
|
|
19856
19944
|
invocation: commandInvocationSchema,
|
|
19857
19945
|
label: commandLabelSchema,
|
|
19858
19946
|
description: commandDescriptionSchema.optional(),
|
|
19947
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
19859
19948
|
argumentMode: external_exports.enum(["none", "text"]),
|
|
19860
19949
|
/**
|
|
19861
19950
|
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
@@ -20238,6 +20327,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
20238
20327
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
20239
20328
|
}
|
|
20240
20329
|
|
|
20330
|
+
// ../../harness-adapter/dist/steer.js
|
|
20331
|
+
function unsupportedSteer(harnessLabel) {
|
|
20332
|
+
return {
|
|
20333
|
+
ok: false,
|
|
20334
|
+
error: {
|
|
20335
|
+
code: "unsupported",
|
|
20336
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
20337
|
+
retryable: false
|
|
20338
|
+
}
|
|
20339
|
+
};
|
|
20340
|
+
}
|
|
20341
|
+
|
|
20241
20342
|
// ../../harness-adapter/dist/usage.js
|
|
20242
20343
|
var tokenFields = [
|
|
20243
20344
|
"inputTokens",
|
|
@@ -20265,6 +20366,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
20265
20366
|
...safeIntegerFields,
|
|
20266
20367
|
...percentFields,
|
|
20267
20368
|
"sessionCacheUsage",
|
|
20369
|
+
"composerIndicators",
|
|
20268
20370
|
"totalCostUsd",
|
|
20269
20371
|
"totalCredits",
|
|
20270
20372
|
"contextUsagePercent",
|
|
@@ -20287,6 +20389,7 @@ function parseHostUsage(value) {
|
|
|
20287
20389
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
20288
20390
|
}
|
|
20289
20391
|
}
|
|
20392
|
+
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
20290
20393
|
for (const field of [
|
|
20291
20394
|
"totalCredits",
|
|
20292
20395
|
"contextUsagePercent",
|
|
@@ -20357,9 +20460,9 @@ function parseHostUsage(value) {
|
|
|
20357
20460
|
if (value.costSource !== "publicPrice") {
|
|
20358
20461
|
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
20359
20462
|
}
|
|
20360
|
-
return { ...value, unpricedModels: [...models] };
|
|
20463
|
+
return { ...value, ...indicators, unpricedModels: [...models] };
|
|
20361
20464
|
}
|
|
20362
|
-
return { ...value };
|
|
20465
|
+
return { ...value, ...indicators };
|
|
20363
20466
|
}
|
|
20364
20467
|
var requestTokenFields = [
|
|
20365
20468
|
"inputTokens",
|
|
@@ -21890,7 +21993,7 @@ function validateV4Event(event) {
|
|
|
21890
21993
|
break;
|
|
21891
21994
|
case "subagent/catalog":
|
|
21892
21995
|
requiredOptionalKeys(data, ["version", "childId", "childCreatedAt", "mode"], ["label"]);
|
|
21893
|
-
if (data.version
|
|
21996
|
+
if (!(data.version === 0 && (data.mode === "one-shot" || data.mode === "continuable") || data.version === 2 && data.mode === "external"))
|
|
21894
21997
|
throw invalid("subagent catalog");
|
|
21895
21998
|
identifier(data.childId, "subagent catalog childId");
|
|
21896
21999
|
nonNegativeInteger2(data.childCreatedAt, "subagent catalog childCreatedAt");
|
|
@@ -22195,6 +22298,7 @@ var commandDefinitions = [
|
|
|
22195
22298
|
{
|
|
22196
22299
|
id: "dsh.compact",
|
|
22197
22300
|
invocation: "/compact",
|
|
22301
|
+
localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
|
|
22198
22302
|
label: "Compact context",
|
|
22199
22303
|
description: "Compact the current conversation context",
|
|
22200
22304
|
argumentMode: "none"
|
|
@@ -22423,14 +22527,16 @@ var MAX_TIMER_MILLISECONDS = 2147483647;
|
|
|
22423
22527
|
var NUMERIC_IDENTIFIER = String.raw`(?:0|[1-9]\d*)`;
|
|
22424
22528
|
var PRERELEASE_IDENTIFIER = String.raw`(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)`;
|
|
22425
22529
|
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.
|
|
22530
|
+
var DEEPSEEK_NEWEST_VERIFIED_VERSION = "0.2.1-rc.2";
|
|
22427
22531
|
var DEEPSEEK_VERIFIED_VERSIONS = [
|
|
22428
22532
|
"0.1.7-rc.1",
|
|
22429
22533
|
"0.1.7-rc.2",
|
|
22430
22534
|
"0.2.0-rc.1",
|
|
22535
|
+
"0.2.0-rc.2",
|
|
22536
|
+
"0.2.1-rc.1",
|
|
22431
22537
|
DEEPSEEK_NEWEST_VERIFIED_VERSION
|
|
22432
22538
|
];
|
|
22433
|
-
var DEEPSEEK_UPGRADE_COMMAND =
|
|
22539
|
+
var DEEPSEEK_UPGRADE_COMMAND = "npm install -g @deepseek-ai/dsh@latest";
|
|
22434
22540
|
var DEFAULT_DEEPSEEK_ENDPOINT = "http://127.0.0.1:3080/";
|
|
22435
22541
|
var MODERN_AUTHENTICATION_FINGERPRINT = Buffer.from("dsh web authentication required; reopen the URL printed by dsh web.\n");
|
|
22436
22542
|
var MODERN_AUTHENTICATION_PROBE_TIMEOUT_MS = 1e3;
|
|
@@ -24917,6 +25023,15 @@ var AUTO_PERMISSION_MODE_ID = "auto";
|
|
|
24917
25023
|
var MAX_CATALOG_BYTES2 = 16 * 1024 * 1024;
|
|
24918
25024
|
var MAX_CATALOG_DEPTH2 = 64;
|
|
24919
25025
|
var MAX_CATALOG_NODES2 = 2e5;
|
|
25026
|
+
var presetLabels = /* @__PURE__ */ new Map([
|
|
25027
|
+
["Auto", { en: "Auto", zh: "自动" }],
|
|
25028
|
+
["read-only", { en: "Read only", zh: "只读" }],
|
|
25029
|
+
["workspace-write", { en: "Workspace write", zh: "工作区写入" }],
|
|
25030
|
+
["danger-full-access", { en: "Full access (dangerous)", zh: "完全访问(危险)" }],
|
|
25031
|
+
["Read only", { en: "Read only", zh: "只读" }],
|
|
25032
|
+
["Workspace write", { en: "Workspace write", zh: "工作区写入" }],
|
|
25033
|
+
["Full access (dangerous)", { en: "Full access (dangerous)", zh: "完全访问(危险)" }]
|
|
25034
|
+
]);
|
|
24920
25035
|
var ModernPermissionModeError = class extends Error {
|
|
24921
25036
|
code;
|
|
24922
25037
|
nativeCode;
|
|
@@ -25018,9 +25133,11 @@ function presetOptions(value, area) {
|
|
|
25018
25133
|
if (description !== void 0 && (typeof description !== "string" || description.length > HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH)) {
|
|
25019
25134
|
throw permissionError("protocolError", "DeepSeek Harness returned an invalid permission option description");
|
|
25020
25135
|
}
|
|
25136
|
+
const presentation = presetLabels.get(label);
|
|
25021
25137
|
return {
|
|
25022
25138
|
id: id.data,
|
|
25023
25139
|
label,
|
|
25140
|
+
...presentation ? { localizations: { en: { label: presentation.en }, "zh-CN": { label: presentation.zh } } } : {},
|
|
25024
25141
|
...description?.trim() ? { description } : {}
|
|
25025
25142
|
};
|
|
25026
25143
|
});
|
|
@@ -27011,6 +27128,8 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
27011
27128
|
"hook/invoked",
|
|
27012
27129
|
"hook/result",
|
|
27013
27130
|
"image/offload",
|
|
27131
|
+
"job/registered",
|
|
27132
|
+
"job/settled",
|
|
27014
27133
|
"llm/retry",
|
|
27015
27134
|
"llm/retry-started",
|
|
27016
27135
|
"model/selection",
|
|
@@ -27047,6 +27166,7 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
27047
27166
|
"turn/start",
|
|
27048
27167
|
"user/message",
|
|
27049
27168
|
"web/deepseek-search-llm-request",
|
|
27169
|
+
"working-directory/change",
|
|
27050
27170
|
"workspace/changes"
|
|
27051
27171
|
]);
|
|
27052
27172
|
var SURFACE_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -27220,6 +27340,14 @@ var ModernEventValidator = class {
|
|
|
27220
27340
|
return;
|
|
27221
27341
|
case "workspace/changes":
|
|
27222
27342
|
return;
|
|
27343
|
+
case "working-directory/change":
|
|
27344
|
+
exactKeys(data, ["cwd"]);
|
|
27345
|
+
requiredString(data.cwd, "working-directory/change cwd");
|
|
27346
|
+
return;
|
|
27347
|
+
case "job/registered":
|
|
27348
|
+
case "job/settled":
|
|
27349
|
+
validateJobLifecycle(event.type, data);
|
|
27350
|
+
return;
|
|
27223
27351
|
case "agent-preset/selected":
|
|
27224
27352
|
exactKeys(data, ["agentPreset"]);
|
|
27225
27353
|
requiredString(data.agentPreset, "agent-preset/selected agentPreset");
|
|
@@ -28203,7 +28331,7 @@ function validateSessionTitle(data) {
|
|
|
28203
28331
|
}
|
|
28204
28332
|
}
|
|
28205
28333
|
function validateSessionTitleRequest(data) {
|
|
28206
|
-
|
|
28334
|
+
requiredOptionalKeys(data, ["titleProvider", "messageSeqs", "route", "system", "messages", "maxTokens"], ["reasoningEffort"]);
|
|
28207
28335
|
requiredString(data.titleProvider, "session/title request provider");
|
|
28208
28336
|
validateSeqArray(data.messageSeqs, "session/title request messageSeqs");
|
|
28209
28337
|
validateModelRoute(data.route, "session/title request route");
|
|
@@ -28217,6 +28345,9 @@ function validateSessionTitleRequest(data) {
|
|
|
28217
28345
|
}
|
|
28218
28346
|
}
|
|
28219
28347
|
positiveInteger(data.maxTokens, "session/title request maxTokens");
|
|
28348
|
+
if (data.reasoningEffort !== void 0 && !nonBlankString(data.reasoningEffort)) {
|
|
28349
|
+
fail("Modern history session/title request reasoningEffort is invalid");
|
|
28350
|
+
}
|
|
28220
28351
|
}
|
|
28221
28352
|
function validateTodoWrite(data) {
|
|
28222
28353
|
exactKeys(data, ["todos"]);
|
|
@@ -28260,12 +28391,47 @@ function validateWorkflow(type, data) {
|
|
|
28260
28391
|
requiredString(data.runId, "workflow runId");
|
|
28261
28392
|
enumValue(data.stopReason, ["completed", "cancelled", "error"], "workflow stopReason");
|
|
28262
28393
|
}
|
|
28394
|
+
function validateJobLifecycle(type, data) {
|
|
28395
|
+
const settled = type === "job/settled";
|
|
28396
|
+
requiredOptionalKeys(data, [
|
|
28397
|
+
"jobId",
|
|
28398
|
+
"owner",
|
|
28399
|
+
"kind",
|
|
28400
|
+
"label",
|
|
28401
|
+
"startedAt",
|
|
28402
|
+
...settled ? ["finishedAt", "status", "cause", "producerReported"] : []
|
|
28403
|
+
], settled ? ["toolCall", "detail"] : ["toolCall"]);
|
|
28404
|
+
requiredString(data.jobId, `${type} jobId`);
|
|
28405
|
+
requiredString(data.owner, `${type} owner`);
|
|
28406
|
+
requiredString(data.kind, `${type} kind`);
|
|
28407
|
+
if (typeof data.label !== "string")
|
|
28408
|
+
fail(`Modern history ${type} label is invalid`);
|
|
28409
|
+
nonNegativeInteger(data.startedAt, `${type} startedAt`);
|
|
28410
|
+
if (data.toolCall !== void 0) {
|
|
28411
|
+
if (!isRecord4(data.toolCall))
|
|
28412
|
+
fail(`Modern history ${type} toolCall is malformed`);
|
|
28413
|
+
exactKeys(data.toolCall, ["callId", "rootCallId"]);
|
|
28414
|
+
requiredString(data.toolCall.callId, `${type} toolCall callId`);
|
|
28415
|
+
requiredString(data.toolCall.rootCallId, `${type} toolCall rootCallId`);
|
|
28416
|
+
}
|
|
28417
|
+
if (!settled)
|
|
28418
|
+
return;
|
|
28419
|
+
nonNegativeInteger(data.finishedAt, "job/settled finishedAt");
|
|
28420
|
+
enumValue(data.status, ["completed", "killed", "failed"], "job/settled status");
|
|
28421
|
+
enumValue(data.cause, ["producer", "kill", "teardown"], "job/settled cause");
|
|
28422
|
+
if (typeof data.producerReported !== "boolean") {
|
|
28423
|
+
fail("Modern history job/settled producerReported is invalid");
|
|
28424
|
+
}
|
|
28425
|
+
if (data.detail !== void 0 && typeof data.detail !== "string") {
|
|
28426
|
+
fail("Modern history job/settled detail is invalid");
|
|
28427
|
+
}
|
|
28428
|
+
}
|
|
28263
28429
|
function validatePtcDispatch(type, data, profile) {
|
|
28264
28430
|
const settle = type === "tool/ptc-dispatch";
|
|
28265
28431
|
const required2 = ["rootCallId", "parentCallId", "subCallId", "name", "arguments"];
|
|
28266
28432
|
if (settle)
|
|
28267
28433
|
required2.push("isError", "content");
|
|
28268
|
-
requiredOptionalKeys(data, required2, settle ? ["error"] : []);
|
|
28434
|
+
requiredOptionalKeys(data, required2, settle ? ["error", "meta"] : []);
|
|
28269
28435
|
for (const key of ["rootCallId", "parentCallId", "subCallId", "name"]) {
|
|
28270
28436
|
requiredString(data[key], `tool/ptc-dispatch ${key}`);
|
|
28271
28437
|
}
|
|
@@ -28414,12 +28580,20 @@ function validateSearchRequest(data) {
|
|
|
28414
28580
|
requiredString(data.apiVersion, "search request apiVersion");
|
|
28415
28581
|
if (!isRecord4(data.body))
|
|
28416
28582
|
fail("Modern history search request body is malformed");
|
|
28417
|
-
requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], []);
|
|
28583
|
+
requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], ["thinking"]);
|
|
28418
28584
|
requiredString(data.body.model, "search request model");
|
|
28419
28585
|
positiveInteger(data.body.max_tokens, "search request max_tokens");
|
|
28420
28586
|
if (!Array.isArray(data.body.messages) || !Array.isArray(data.body.tools)) {
|
|
28421
28587
|
fail("Modern history search request arrays are malformed");
|
|
28422
28588
|
}
|
|
28589
|
+
if (data.body.thinking !== void 0) {
|
|
28590
|
+
const { thinking } = data.body;
|
|
28591
|
+
if (!isRecord4(thinking))
|
|
28592
|
+
fail("Modern history search request thinking is malformed");
|
|
28593
|
+
exactKeys(thinking, ["type"]);
|
|
28594
|
+
if (thinking.type !== "disabled")
|
|
28595
|
+
fail("Modern history search request thinking is invalid");
|
|
28596
|
+
}
|
|
28423
28597
|
}
|
|
28424
28598
|
function validateModelRoute(value, label) {
|
|
28425
28599
|
if (!isRecord4(value))
|
|
@@ -28670,6 +28844,8 @@ var ModernHarnessSession = class {
|
|
|
28670
28844
|
switch (command.type) {
|
|
28671
28845
|
case "turn.start":
|
|
28672
28846
|
return this.#start(command);
|
|
28847
|
+
case "turn.steer":
|
|
28848
|
+
return Promise.resolve(unsupportedSteer("DeepSeek Harness"));
|
|
28673
28849
|
case "turn.cancel":
|
|
28674
28850
|
return this.#cancel(command);
|
|
28675
28851
|
case "interaction.respond":
|
|
@@ -31055,7 +31231,8 @@ function titleFromProjections(value) {
|
|
|
31055
31231
|
return typeof title === "string" && title.trim().length > 0 && title.length <= DEEPSEEK_MODERN_SESSION_TITLE_MAX_LENGTH && !title.includes("\0") ? title : null;
|
|
31056
31232
|
}
|
|
31057
31233
|
function parseSummary(value) {
|
|
31058
|
-
if (!isPlainRecord7(value) || !exactKeys5(value, ["sessionId", "updatedAt", "agentAvailable", "running", "blank"], ["parentSessionId", "origin", "cwd", "projections"]) ||
|
|
31234
|
+
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.
|
|
31235
|
+
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
31236
|
throw sessionListError("protocolError", "DeepSeek Harness returned an invalid Session row");
|
|
31060
31237
|
}
|
|
31061
31238
|
const sessionId = boundedId(value.sessionId, "Session id");
|
|
@@ -32480,6 +32657,10 @@ function createDeepSeekInstallation(environment, command) {
|
|
|
32480
32657
|
canUpdate,
|
|
32481
32658
|
...!canUpdate ? {
|
|
32482
32659
|
messageCode: "deepseek-original-installer",
|
|
32660
|
+
notice: {
|
|
32661
|
+
en: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm.",
|
|
32662
|
+
"zh-CN": "请使用原安装方式更新。Python、桌面应用及项目内安装不会通过全局 npm 更新。"
|
|
32663
|
+
},
|
|
32483
32664
|
message: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm."
|
|
32484
32665
|
} : {}
|
|
32485
32666
|
};
|