@codexhost/cli-linux-arm64 0.18.0 → 0.19.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 +59 -2
- package/app/console-web.js +76 -4
- package/app/desktop-controller.mjs +274 -11
- package/app/host-runtime.mjs +12322 -2469
- package/app/plugins/antigravity/plugin.mjs +654 -216
- package/app/plugins/claude-code/plugin.mjs +138 -11
- package/app/plugins/codebuddy/plugin.mjs +152 -20
- package/app/plugins/codex-usage/plugin.mjs +59 -2
- package/app/plugins/copilot/plugin.mjs +59 -2
- package/app/plugins/cursor-cli/plugin.mjs +134 -12
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +86 -7
- package/app/plugins/devin/plugin.mjs +59 -2
- package/app/plugins/grok/plugin.mjs +392 -269
- package/app/plugins/hermes/plugin.mjs +138 -14
- package/app/plugins/kimi-code/plugin.mjs +59 -2
- package/app/plugins/kiro-cli/plugin.mjs +287 -18
- package/app/plugins/omp/plugin.mjs +788 -627
- package/app/plugins/opencode/plugin.mjs +59 -2
- package/app/plugins/pi/plugin.mjs +899 -773
- package/app/plugins/qoder/plugin.mjs +61 -6
- package/app/plugins/qoder-cn/plugin.mjs +61 -6
- package/app/plugins/qwen-code/plugin.mjs +168 -94
- package/app/plugins/workbuddy/plugin.mjs +152 -20
- package/app/plugins/zcode/plugin.mjs +132 -5
- package/app/renderer-extension.js +657 -270
- package/app/web/assets/index-BNQIOOHE.css +1 -0
- package/app/web/assets/index-Feo4BkqN.js +199 -0
- package/app/web/codexhost-settings.js +76 -4
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-file-upload/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +129 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +65 -63
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +95 -93
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.excel.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +16 -16
- package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +11 -11
- package/app/web-modules/server.mjs +2339 -1514
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-C0aXz2jD.js +0 -199
- package/app/web/assets/index-C3lniEH1.css +0 -1
|
@@ -15104,6 +15104,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15104
15104
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15105
15105
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15106
15106
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15107
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15108
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15109
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15110
|
+
}).strict();
|
|
15107
15111
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15108
15112
|
prompt: external_exports.string().max(16384).optional()
|
|
15109
15113
|
}).strict();
|
|
@@ -15120,6 +15124,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15120
15124
|
sequence: external_exports.number().int().nonnegative()
|
|
15121
15125
|
});
|
|
15122
15126
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15127
|
+
external_exports.object({
|
|
15128
|
+
type: external_exports.literal("skills-changed"),
|
|
15129
|
+
cursor: clientChannelCursorSchema,
|
|
15130
|
+
cwd: external_exports.string().optional()
|
|
15131
|
+
}),
|
|
15123
15132
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15124
15133
|
external_exports.object({
|
|
15125
15134
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15317,6 +15326,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15317
15326
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15318
15327
|
]);
|
|
15319
15328
|
|
|
15329
|
+
// ../../shared-contracts/dist/skills.js
|
|
15330
|
+
var skillsListParamsSchema = external_exports.object({
|
|
15331
|
+
threadId: hostThreadIdSchema.optional(),
|
|
15332
|
+
cwd: external_exports.string().min(1).optional()
|
|
15333
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
15334
|
+
message: "Specify threadId or cwd, not both"
|
|
15335
|
+
});
|
|
15336
|
+
var librarySkillSchema = external_exports.object({
|
|
15337
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
15338
|
+
description: external_exports.string().optional(),
|
|
15339
|
+
path: external_exports.string().min(1),
|
|
15340
|
+
scope: external_exports.enum(["project", "global"]),
|
|
15341
|
+
source: external_exports.string().min(1)
|
|
15342
|
+
}).strict();
|
|
15343
|
+
var skillsListResultSchema = external_exports.object({
|
|
15344
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15345
|
+
complete: external_exports.boolean(),
|
|
15346
|
+
skills: external_exports.array(librarySkillSchema),
|
|
15347
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
15348
|
+
}).strict();
|
|
15349
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
15350
|
+
|
|
15320
15351
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15321
15352
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15322
15353
|
/**
|
|
@@ -15422,8 +15453,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15422
15453
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15423
15454
|
threadId: external_exports.string().min(1).max(1024),
|
|
15424
15455
|
view: external_exports.enum(["result", "messages"]),
|
|
15425
|
-
|
|
15426
|
-
|
|
15456
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
15457
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
15427
15458
|
});
|
|
15428
15459
|
|
|
15429
15460
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16376,6 +16407,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16376
16407
|
status: updateStatusSchema.nullable()
|
|
16377
16408
|
});
|
|
16378
16409
|
|
|
16410
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
16411
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
16412
|
+
"completed",
|
|
16413
|
+
"failed",
|
|
16414
|
+
"interrupted",
|
|
16415
|
+
"timedOut",
|
|
16416
|
+
"unreadable",
|
|
16417
|
+
"notFound"
|
|
16418
|
+
];
|
|
16419
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
16420
|
+
|
|
16379
16421
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16380
16422
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16381
16423
|
"idle",
|
|
@@ -16423,6 +16465,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16423
16465
|
archived: external_exports.boolean()
|
|
16424
16466
|
}),
|
|
16425
16467
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16468
|
+
external_exports.strictObject({
|
|
16469
|
+
kind: external_exports.literal("configure"),
|
|
16470
|
+
...thread,
|
|
16471
|
+
epoch: identity,
|
|
16472
|
+
modelId: identity.optional(),
|
|
16473
|
+
thinkingOptionId: identity.optional(),
|
|
16474
|
+
permissionModeId: identity.optional()
|
|
16475
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
16426
16476
|
external_exports.strictObject({
|
|
16427
16477
|
kind: external_exports.literal("prompt"),
|
|
16428
16478
|
...thread,
|
|
@@ -16495,6 +16545,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16495
16545
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16496
16546
|
]);
|
|
16497
16547
|
|
|
16548
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
16549
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
16550
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
16551
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
16552
|
+
});
|
|
16553
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
16554
|
+
|
|
16498
16555
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
16499
16556
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
16500
16557
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -16895,14 +16952,12 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
16895
16952
|
"reload-plugins"
|
|
16896
16953
|
]);
|
|
16897
16954
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
16898
|
-
function isExcludedLiveCommand(name,
|
|
16955
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
16899
16956
|
const normalized = name.trim().replace(/^\//u, "");
|
|
16900
16957
|
if (new Set(extra.names ?? []).has(normalized))
|
|
16901
16958
|
return true;
|
|
16902
16959
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
16903
16960
|
return true;
|
|
16904
|
-
if (kind === "skill")
|
|
16905
|
-
return false;
|
|
16906
16961
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
16907
16962
|
}
|
|
16908
16963
|
function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
@@ -16924,7 +16979,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
16924
16979
|
const name = command.name.trim().replace(/^\//u, "");
|
|
16925
16980
|
if (!name || /\s/u.test(name))
|
|
16926
16981
|
continue;
|
|
16927
|
-
if (isExcludedLiveCommand(name,
|
|
16982
|
+
if (isExcludedLiveCommand(name, exclusions))
|
|
16928
16983
|
continue;
|
|
16929
16984
|
const invocation = `/${name}`;
|
|
16930
16985
|
const id2 = `${idPrefix}${name.replace(/[^A-Za-z0-9._:-]/gu, "-")}`.slice(0, 128);
|
|
@@ -16936,8 +16991,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
16936
16991
|
invocation,
|
|
16937
16992
|
label: name.slice(0, 128),
|
|
16938
16993
|
...description ? { description } : {},
|
|
16939
|
-
argumentMode: "text"
|
|
16940
|
-
kind: command.kind
|
|
16994
|
+
argumentMode: "text"
|
|
16941
16995
|
});
|
|
16942
16996
|
if (!parsed.success)
|
|
16943
16997
|
continue;
|
|
@@ -16948,6 +17002,60 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
16948
17002
|
return harnessCommandCatalogSchema.parse({ commands: [...builtIns.commands, ...dynamic] });
|
|
16949
17003
|
}
|
|
16950
17004
|
|
|
17005
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17006
|
+
function subagentConfiguration(value) {
|
|
17007
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17008
|
+
return {};
|
|
17009
|
+
const row = value;
|
|
17010
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17011
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17012
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17013
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17014
|
+
}
|
|
17015
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17016
|
+
const native = subagentConfiguration(child);
|
|
17017
|
+
const model2 = native.model ?? parent.model;
|
|
17018
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17019
|
+
const next = { ...child };
|
|
17020
|
+
delete next.model;
|
|
17021
|
+
delete next.reasoningEffort;
|
|
17022
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17023
|
+
}
|
|
17024
|
+
function configureSubagentEvent(event, parent) {
|
|
17025
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17026
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17027
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17028
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17029
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17030
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17031
|
+
return {
|
|
17032
|
+
...event,
|
|
17033
|
+
snapshot: {
|
|
17034
|
+
...event.snapshot,
|
|
17035
|
+
item: {
|
|
17036
|
+
...event.snapshot.item,
|
|
17037
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17038
|
+
}
|
|
17039
|
+
}
|
|
17040
|
+
};
|
|
17041
|
+
return event;
|
|
17042
|
+
}
|
|
17043
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17044
|
+
return {
|
|
17045
|
+
...snapshot,
|
|
17046
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17047
|
+
...turn,
|
|
17048
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17049
|
+
...entry,
|
|
17050
|
+
item: {
|
|
17051
|
+
...entry.item,
|
|
17052
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17053
|
+
}
|
|
17054
|
+
} : entry)
|
|
17055
|
+
}))
|
|
17056
|
+
};
|
|
17057
|
+
}
|
|
17058
|
+
|
|
16951
17059
|
// ../../harness-broker/dist/protocol.js
|
|
16952
17060
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
16953
17061
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -55681,6 +55789,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
55681
55789
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
55682
55790
|
events.push({
|
|
55683
55791
|
type: "subagent.updated",
|
|
55792
|
+
...subagentConfiguration(message),
|
|
55684
55793
|
callId,
|
|
55685
55794
|
status: "running",
|
|
55686
55795
|
...description ? { description } : {},
|
|
@@ -55696,6 +55805,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
55696
55805
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
55697
55806
|
events.push({
|
|
55698
55807
|
type: "subagent.updated",
|
|
55808
|
+
...subagentConfiguration(message),
|
|
55699
55809
|
callId,
|
|
55700
55810
|
status: "running",
|
|
55701
55811
|
...description ? { description } : {},
|
|
@@ -55714,8 +55824,10 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
55714
55824
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
55715
55825
|
events.push({
|
|
55716
55826
|
type: "subagent.updated",
|
|
55827
|
+
...subagentConfiguration(message),
|
|
55717
55828
|
callId,
|
|
55718
55829
|
status,
|
|
55830
|
+
...subagentConfiguration(message.patch),
|
|
55719
55831
|
...description ? { description } : {},
|
|
55720
55832
|
...agentId ? { nativeSubagentId: agentId } : {},
|
|
55721
55833
|
...resultSummary ? { resultSummary } : {}
|
|
@@ -55881,6 +55993,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
55881
55993
|
const agentId = targetedSubagentId(argumentsResult.data);
|
|
55882
55994
|
events.push({
|
|
55883
55995
|
type: "subagent.started",
|
|
55996
|
+
...subagentConfiguration(argumentsResult.data),
|
|
55884
55997
|
callId: block.id,
|
|
55885
55998
|
operation: block.name === "SendMessage" ? "send" : "spawn",
|
|
55886
55999
|
description: subagentDescription(argumentsResult.data, block.name),
|
|
@@ -57338,10 +57451,9 @@ function parseClaudeSlashCommands(value) {
|
|
|
57338
57451
|
});
|
|
57339
57452
|
}
|
|
57340
57453
|
function claudeLiveCommandCatalog(builtIns, snapshot) {
|
|
57341
|
-
return mergeLiveHarnessCommands(builtIns, DYNAMIC_ID_PREFIX, snapshot?.commands.map((command) => ({
|
|
57454
|
+
return mergeLiveHarnessCommands(builtIns, DYNAMIC_ID_PREFIX, snapshot?.commands.filter((command) => !snapshot.skillNames.has(command.name)).map((command) => ({
|
|
57342
57455
|
name: command.name,
|
|
57343
|
-
description: command.description
|
|
57344
|
-
kind: snapshot.skillNames.has(command.name) ? "skill" : "command"
|
|
57456
|
+
description: command.description
|
|
57345
57457
|
})) ?? null, { names: CLAUDE_EXCLUDED_COMMANDS });
|
|
57346
57458
|
}
|
|
57347
57459
|
function claudeDynamicCommandPrompt(catalog, commandId, argumentText) {
|
|
@@ -58749,6 +58861,7 @@ var ClaudeSubagentLifecycle = class {
|
|
|
58749
58861
|
subagentId: event.nativeSubagentId ?? event.callId,
|
|
58750
58862
|
...event.nativeSubagentId ? { nativeSubagentId: event.nativeSubagentId } : {},
|
|
58751
58863
|
description: event.description,
|
|
58864
|
+
...subagentConfiguration(event),
|
|
58752
58865
|
...event.role ? { role: event.role } : {},
|
|
58753
58866
|
background: event.background,
|
|
58754
58867
|
status: "running"
|
|
@@ -58772,6 +58885,7 @@ var ClaudeSubagentLifecycle = class {
|
|
|
58772
58885
|
throw new Error("Claude Code Subagent delegation has no Agent state");
|
|
58773
58886
|
const subagent = {
|
|
58774
58887
|
...current,
|
|
58888
|
+
...subagentConfiguration(event),
|
|
58775
58889
|
status: event.status,
|
|
58776
58890
|
...event.nativeSubagentId ? { nativeSubagentId: event.nativeSubagentId } : {},
|
|
58777
58891
|
...event.description ? { description: event.description } : {},
|
|
@@ -59830,7 +59944,19 @@ var ClaudeHarnessSession = class {
|
|
|
59830
59944
|
get nativeWriterRef() {
|
|
59831
59945
|
return this.#nativeRef;
|
|
59832
59946
|
}
|
|
59947
|
+
#subagentConfiguration() {
|
|
59948
|
+
const state = this.#state;
|
|
59949
|
+
const model2 = state.effectiveModel ? decodeClaudeModelRef(state.effectiveModel) : void 0;
|
|
59950
|
+
return {
|
|
59951
|
+
...model2 ? { model: model2 } : {},
|
|
59952
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
59953
|
+
};
|
|
59954
|
+
}
|
|
59833
59955
|
async readSnapshot() {
|
|
59956
|
+
const result = await this.#readSnapshot();
|
|
59957
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
59958
|
+
}
|
|
59959
|
+
async #readSnapshot() {
|
|
59834
59960
|
if (this.#phase !== "open") {
|
|
59835
59961
|
return { ok: false, error: invalidState("Claude Code Session is not open") };
|
|
59836
59962
|
}
|
|
@@ -61820,6 +61946,7 @@ var ClaudeHarnessSession = class {
|
|
|
61820
61946
|
void this.#transport?.close().catch(() => void 0);
|
|
61821
61947
|
}
|
|
61822
61948
|
#event(event) {
|
|
61949
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
61823
61950
|
this.#channel.emit({ kind: "event", event });
|
|
61824
61951
|
}
|
|
61825
61952
|
};
|
|
@@ -15580,6 +15580,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15580
15580
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15581
15581
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15582
15582
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15583
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15584
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15585
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15586
|
+
}).strict();
|
|
15583
15587
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15584
15588
|
prompt: external_exports.string().max(16384).optional()
|
|
15585
15589
|
}).strict();
|
|
@@ -15596,6 +15600,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15596
15600
|
sequence: external_exports.number().int().nonnegative()
|
|
15597
15601
|
});
|
|
15598
15602
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15603
|
+
external_exports.object({
|
|
15604
|
+
type: external_exports.literal("skills-changed"),
|
|
15605
|
+
cursor: clientChannelCursorSchema,
|
|
15606
|
+
cwd: external_exports.string().optional()
|
|
15607
|
+
}),
|
|
15599
15608
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15600
15609
|
external_exports.object({
|
|
15601
15610
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15793,6 +15802,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15793
15802
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15794
15803
|
]);
|
|
15795
15804
|
|
|
15805
|
+
// ../../shared-contracts/dist/skills.js
|
|
15806
|
+
var skillsListParamsSchema = external_exports.object({
|
|
15807
|
+
threadId: hostThreadIdSchema.optional(),
|
|
15808
|
+
cwd: external_exports.string().min(1).optional()
|
|
15809
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
15810
|
+
message: "Specify threadId or cwd, not both"
|
|
15811
|
+
});
|
|
15812
|
+
var librarySkillSchema = external_exports.object({
|
|
15813
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
15814
|
+
description: external_exports.string().optional(),
|
|
15815
|
+
path: external_exports.string().min(1),
|
|
15816
|
+
scope: external_exports.enum(["project", "global"]),
|
|
15817
|
+
source: external_exports.string().min(1)
|
|
15818
|
+
}).strict();
|
|
15819
|
+
var skillsListResultSchema = external_exports.object({
|
|
15820
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15821
|
+
complete: external_exports.boolean(),
|
|
15822
|
+
skills: external_exports.array(librarySkillSchema),
|
|
15823
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
15824
|
+
}).strict();
|
|
15825
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
15826
|
+
|
|
15796
15827
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15797
15828
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15798
15829
|
/**
|
|
@@ -15898,8 +15929,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15898
15929
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15899
15930
|
threadId: external_exports.string().min(1).max(1024),
|
|
15900
15931
|
view: external_exports.enum(["result", "messages"]),
|
|
15901
|
-
|
|
15902
|
-
|
|
15932
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
15933
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
15903
15934
|
});
|
|
15904
15935
|
|
|
15905
15936
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16852,6 +16883,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16852
16883
|
status: updateStatusSchema.nullable()
|
|
16853
16884
|
});
|
|
16854
16885
|
|
|
16886
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
16887
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
16888
|
+
"completed",
|
|
16889
|
+
"failed",
|
|
16890
|
+
"interrupted",
|
|
16891
|
+
"timedOut",
|
|
16892
|
+
"unreadable",
|
|
16893
|
+
"notFound"
|
|
16894
|
+
];
|
|
16895
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
16896
|
+
|
|
16855
16897
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16856
16898
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16857
16899
|
"idle",
|
|
@@ -16899,6 +16941,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16899
16941
|
archived: external_exports.boolean()
|
|
16900
16942
|
}),
|
|
16901
16943
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16944
|
+
external_exports.strictObject({
|
|
16945
|
+
kind: external_exports.literal("configure"),
|
|
16946
|
+
...thread,
|
|
16947
|
+
epoch: identity,
|
|
16948
|
+
modelId: identity.optional(),
|
|
16949
|
+
thinkingOptionId: identity.optional(),
|
|
16950
|
+
permissionModeId: identity.optional()
|
|
16951
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
16902
16952
|
external_exports.strictObject({
|
|
16903
16953
|
kind: external_exports.literal("prompt"),
|
|
16904
16954
|
...thread,
|
|
@@ -16971,6 +17021,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16971
17021
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16972
17022
|
]);
|
|
16973
17023
|
|
|
17024
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
17025
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
17026
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
17027
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
17028
|
+
});
|
|
17029
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
17030
|
+
|
|
16974
17031
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
16975
17032
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
16976
17033
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17400,17 +17457,69 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17400
17457
|
"reload-plugins"
|
|
17401
17458
|
]);
|
|
17402
17459
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17403
|
-
function isExcludedLiveCommand(name,
|
|
17460
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17404
17461
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17405
17462
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17406
17463
|
return true;
|
|
17407
17464
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17408
17465
|
return true;
|
|
17409
|
-
if (kind === "skill")
|
|
17410
|
-
return false;
|
|
17411
17466
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17412
17467
|
}
|
|
17413
17468
|
|
|
17469
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17470
|
+
function subagentConfiguration(value) {
|
|
17471
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17472
|
+
return {};
|
|
17473
|
+
const row = value;
|
|
17474
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17475
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17476
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17477
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17478
|
+
}
|
|
17479
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17480
|
+
const native = subagentConfiguration(child);
|
|
17481
|
+
const model2 = native.model ?? parent.model;
|
|
17482
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17483
|
+
const next = { ...child };
|
|
17484
|
+
delete next.model;
|
|
17485
|
+
delete next.reasoningEffort;
|
|
17486
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17487
|
+
}
|
|
17488
|
+
function configureSubagentEvent(event, parent) {
|
|
17489
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17490
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17491
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17492
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17493
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17494
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17495
|
+
return {
|
|
17496
|
+
...event,
|
|
17497
|
+
snapshot: {
|
|
17498
|
+
...event.snapshot,
|
|
17499
|
+
item: {
|
|
17500
|
+
...event.snapshot.item,
|
|
17501
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17502
|
+
}
|
|
17503
|
+
}
|
|
17504
|
+
};
|
|
17505
|
+
return event;
|
|
17506
|
+
}
|
|
17507
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17508
|
+
return {
|
|
17509
|
+
...snapshot,
|
|
17510
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17511
|
+
...turn,
|
|
17512
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17513
|
+
...entry,
|
|
17514
|
+
item: {
|
|
17515
|
+
...entry.item,
|
|
17516
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17517
|
+
}
|
|
17518
|
+
} : entry)
|
|
17519
|
+
}))
|
|
17520
|
+
};
|
|
17521
|
+
}
|
|
17522
|
+
|
|
17414
17523
|
// dist/common.js
|
|
17415
17524
|
var CODEBUDDY_ID = harnessIdSchema.parse("codebuddy");
|
|
17416
17525
|
var CODEBUDDY_RUNTIME_PROFILE = {
|
|
@@ -17561,8 +17670,7 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
17561
17670
|
return {
|
|
17562
17671
|
commands: rows(value).flatMap((entry) => {
|
|
17563
17672
|
const name = text(entry.name).replace(/^\//u, "");
|
|
17564
|
-
|
|
17565
|
-
if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
|
|
17673
|
+
if (record3(entry._meta).type === "skill" || excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name))
|
|
17566
17674
|
return [];
|
|
17567
17675
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
17568
17676
|
commands: [
|
|
@@ -17570,14 +17678,13 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
17570
17678
|
id: `${profile.harnessId}.${name}`,
|
|
17571
17679
|
invocation: `/${name}`,
|
|
17572
17680
|
label: name,
|
|
17573
|
-
...name === "compact"
|
|
17681
|
+
...name === "compact" ? {
|
|
17574
17682
|
localizations: {
|
|
17575
17683
|
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
17576
17684
|
}
|
|
17577
17685
|
} : {},
|
|
17578
17686
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
17579
|
-
argumentMode: name === "compact" || record3(entry.input).hint
|
|
17580
|
-
...record3(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
17687
|
+
argumentMode: name === "compact" || record3(entry.input).hint ? "text" : "none"
|
|
17581
17688
|
}
|
|
17582
17689
|
]
|
|
17583
17690
|
});
|
|
@@ -18515,7 +18622,7 @@ function codeBuddyDelegation(callId, input, status, childId, displayName = "Code
|
|
|
18515
18622
|
...nativeId ? { nativeSubagentId: nativeId } : {},
|
|
18516
18623
|
description: text(args.description) || `${displayName} Subagent`,
|
|
18517
18624
|
...text(args.subagent_type) ? { role: text(args.subagent_type) } : {},
|
|
18518
|
-
...
|
|
18625
|
+
...subagentConfiguration(args),
|
|
18519
18626
|
background: args.run_in_background === true,
|
|
18520
18627
|
status
|
|
18521
18628
|
}
|
|
@@ -25155,9 +25262,13 @@ var CodeBuddySubagents = class {
|
|
|
25155
25262
|
const snapshot = await (this.options.read ? this.options.read(parent, id, this.options.cwd, this.options.environment, "running", this.profile) : this.#observer.read(id, "running"));
|
|
25156
25263
|
if (this.#closed || call.observationDone)
|
|
25157
25264
|
continue;
|
|
25158
|
-
const observedModel = snapshot.turns.at(-1)?.model;
|
|
25159
|
-
|
|
25160
|
-
|
|
25265
|
+
const observedModel = snapshot.turns.at(-1)?.model ?? snapshot.state?.effectiveModel;
|
|
25266
|
+
const reasoningEffort = snapshot.state?.effectiveThinkingOptionId;
|
|
25267
|
+
if (observedModel || reasoningEffort)
|
|
25268
|
+
this.#update(call, {
|
|
25269
|
+
...observedModel ? { model: nativeModel(observedModel) } : {},
|
|
25270
|
+
...reasoningEffort ? { reasoningEffort } : {}
|
|
25271
|
+
});
|
|
25161
25272
|
const signature = JSON.stringify(snapshot);
|
|
25162
25273
|
if (signature !== call.signature) {
|
|
25163
25274
|
call.signature = signature;
|
|
@@ -25300,10 +25411,7 @@ var CodeBuddySession = class {
|
|
|
25300
25411
|
contextWindowTokens: update.size,
|
|
25301
25412
|
contextUsagePercent: update.used / update.size * 100
|
|
25302
25413
|
};
|
|
25303
|
-
this.#
|
|
25304
|
-
type: "session.usage.changed",
|
|
25305
|
-
usage: { ...this.#usage, ...this.#context }
|
|
25306
|
-
});
|
|
25414
|
+
this.#emitUsage();
|
|
25307
25415
|
void this.refreshUsage();
|
|
25308
25416
|
}
|
|
25309
25417
|
this.#active?.output.update(update);
|
|
@@ -25373,8 +25481,16 @@ var CodeBuddySession = class {
|
|
|
25373
25481
|
this.initialUsage = this.#usage;
|
|
25374
25482
|
}
|
|
25375
25483
|
#emit(event) {
|
|
25484
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
25376
25485
|
this.#channel.emit({ kind: "event", event });
|
|
25377
25486
|
}
|
|
25487
|
+
#emitUsage() {
|
|
25488
|
+
const usage = { ...this.#usage, ...this.#context };
|
|
25489
|
+
this.#emit({
|
|
25490
|
+
type: "session.usage.changed",
|
|
25491
|
+
usage: Object.keys(usage).length ? usage : null
|
|
25492
|
+
});
|
|
25493
|
+
}
|
|
25378
25494
|
/** Publishes native requests not yet metered; the first read also declares completeness. */
|
|
25379
25495
|
#meterHistory(history, historical) {
|
|
25380
25496
|
const { requests, complete } = historyUsageRequests(history, historical);
|
|
@@ -25388,6 +25504,10 @@ var CodeBuddySession = class {
|
|
|
25388
25504
|
this.#emit({ type: "usage.history", complete });
|
|
25389
25505
|
}
|
|
25390
25506
|
#apply(config2, emit = true) {
|
|
25507
|
+
if (this.#state.effectiveModel && this.#state.effectiveModel.id !== config2.state.effectiveModel?.id) {
|
|
25508
|
+
this.#context = {};
|
|
25509
|
+
this.#emitUsage();
|
|
25510
|
+
}
|
|
25391
25511
|
this.#config = config2;
|
|
25392
25512
|
if (this.#ref && record3(this.#ref.locator).codebuddyDerived === 1)
|
|
25393
25513
|
this.#ref = nativeSessionRefSchema.parse({
|
|
@@ -25447,13 +25567,25 @@ var CodeBuddySession = class {
|
|
|
25447
25567
|
return;
|
|
25448
25568
|
this.#usage = historyUsage(history);
|
|
25449
25569
|
this.#meterHistory(history, false);
|
|
25450
|
-
this.#
|
|
25570
|
+
this.#emitUsage();
|
|
25451
25571
|
} catch {
|
|
25452
25572
|
} finally {
|
|
25453
25573
|
this.#refreshingUsage = false;
|
|
25454
25574
|
}
|
|
25455
25575
|
}
|
|
25576
|
+
#subagentConfiguration() {
|
|
25577
|
+
const state = this.#state;
|
|
25578
|
+
const model2 = state.effectiveModel ? nativeModel(state.effectiveModel) : void 0;
|
|
25579
|
+
return {
|
|
25580
|
+
...model2 ? { model: model2 } : {},
|
|
25581
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
25582
|
+
};
|
|
25583
|
+
}
|
|
25456
25584
|
async readSnapshot() {
|
|
25585
|
+
const result = await this.#readSnapshot();
|
|
25586
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
25587
|
+
}
|
|
25588
|
+
async #readSnapshot() {
|
|
25457
25589
|
if (this.#closed || this.#fault)
|
|
25458
25590
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
25459
25591
|
if (this.#busy || this.#active)
|
|
@@ -25580,7 +25712,7 @@ var CodeBuddySession = class {
|
|
|
25580
25712
|
...added[0]?.checkpoint ? { checkpoint: added[0].checkpoint } : {}
|
|
25581
25713
|
}, nativeTurnRef);
|
|
25582
25714
|
if (this.#usage)
|
|
25583
|
-
this.#
|
|
25715
|
+
this.#emitUsage();
|
|
25584
25716
|
} catch (error51) {
|
|
25585
25717
|
if (!active.done)
|
|
25586
25718
|
this.#finish(active, { status: "failed", error: nativeError(error51, this.profile) });
|