@karlorz/codexhost-cli-win32-x64 0.18.0-1 → 0.19.0-1
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 +98 -8
- package/app/cpa-live-voice-hook.js +59 -2
- package/app/desktop-controller.mjs +290 -12
- package/app/host-runtime.mjs +12896 -2966
- 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 +1093 -970
- 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 +789 -628
- package/app/plugins/opencode/plugin.mjs +59 -2
- package/app/plugins/pi/plugin.mjs +786 -660
- 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 +434 -39
- package/app/web/assets/{index-py6Ho-Dy.js → index-BCyiiDDL.js} +62 -62
- package/app/web/assets/index-BNQIOOHE.css +1 -0
- package/app/web/codexhost-settings.js +84 -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 +8 -6
- 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 +2345 -1518
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-C3lniEH1.css +0 -1
|
@@ -15522,6 +15522,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15522
15522
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15523
15523
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15524
15524
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15525
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15526
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15527
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15528
|
+
}).strict();
|
|
15525
15529
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15526
15530
|
prompt: external_exports.string().max(16384).optional()
|
|
15527
15531
|
}).strict();
|
|
@@ -15538,6 +15542,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15538
15542
|
sequence: external_exports.number().int().nonnegative()
|
|
15539
15543
|
});
|
|
15540
15544
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15545
|
+
external_exports.object({
|
|
15546
|
+
type: external_exports.literal("skills-changed"),
|
|
15547
|
+
cursor: clientChannelCursorSchema,
|
|
15548
|
+
cwd: external_exports.string().optional()
|
|
15549
|
+
}),
|
|
15541
15550
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15542
15551
|
external_exports.object({
|
|
15543
15552
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15735,6 +15744,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15735
15744
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15736
15745
|
]);
|
|
15737
15746
|
|
|
15747
|
+
// ../../shared-contracts/dist/skills.js
|
|
15748
|
+
var skillsListParamsSchema = external_exports.object({
|
|
15749
|
+
threadId: hostThreadIdSchema.optional(),
|
|
15750
|
+
cwd: external_exports.string().min(1).optional()
|
|
15751
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
15752
|
+
message: "Specify threadId or cwd, not both"
|
|
15753
|
+
});
|
|
15754
|
+
var librarySkillSchema = external_exports.object({
|
|
15755
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
15756
|
+
description: external_exports.string().optional(),
|
|
15757
|
+
path: external_exports.string().min(1),
|
|
15758
|
+
scope: external_exports.enum(["project", "global"]),
|
|
15759
|
+
source: external_exports.string().min(1)
|
|
15760
|
+
}).strict();
|
|
15761
|
+
var skillsListResultSchema = external_exports.object({
|
|
15762
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15763
|
+
complete: external_exports.boolean(),
|
|
15764
|
+
skills: external_exports.array(librarySkillSchema),
|
|
15765
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
15766
|
+
}).strict();
|
|
15767
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
15768
|
+
|
|
15738
15769
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15739
15770
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15740
15771
|
/**
|
|
@@ -15840,8 +15871,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15840
15871
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15841
15872
|
threadId: external_exports.string().min(1).max(1024),
|
|
15842
15873
|
view: external_exports.enum(["result", "messages"]),
|
|
15843
|
-
|
|
15844
|
-
|
|
15874
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
15875
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
15845
15876
|
});
|
|
15846
15877
|
|
|
15847
15878
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16843,6 +16874,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16843
16874
|
status: updateStatusSchema.nullable()
|
|
16844
16875
|
});
|
|
16845
16876
|
|
|
16877
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
16878
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
16879
|
+
"completed",
|
|
16880
|
+
"failed",
|
|
16881
|
+
"interrupted",
|
|
16882
|
+
"timedOut",
|
|
16883
|
+
"unreadable",
|
|
16884
|
+
"notFound"
|
|
16885
|
+
];
|
|
16886
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
16887
|
+
|
|
16846
16888
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16847
16889
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16848
16890
|
"idle",
|
|
@@ -16890,6 +16932,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16890
16932
|
archived: external_exports.boolean()
|
|
16891
16933
|
}),
|
|
16892
16934
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16935
|
+
external_exports.strictObject({
|
|
16936
|
+
kind: external_exports.literal("configure"),
|
|
16937
|
+
...thread,
|
|
16938
|
+
epoch: identity,
|
|
16939
|
+
modelId: identity.optional(),
|
|
16940
|
+
thinkingOptionId: identity.optional(),
|
|
16941
|
+
permissionModeId: identity.optional()
|
|
16942
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
16893
16943
|
external_exports.strictObject({
|
|
16894
16944
|
kind: external_exports.literal("prompt"),
|
|
16895
16945
|
...thread,
|
|
@@ -16962,6 +17012,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16962
17012
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16963
17013
|
]);
|
|
16964
17014
|
|
|
17015
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
17016
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
17017
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
17018
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
17019
|
+
});
|
|
17020
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
17021
|
+
|
|
16965
17022
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
16966
17023
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
16967
17024
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17396,14 +17453,12 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17396
17453
|
"reload-plugins"
|
|
17397
17454
|
]);
|
|
17398
17455
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17399
|
-
function isExcludedLiveCommand(name,
|
|
17456
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17400
17457
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17401
17458
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17402
17459
|
return true;
|
|
17403
17460
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17404
17461
|
return true;
|
|
17405
|
-
if (kind === "skill")
|
|
17406
|
-
return false;
|
|
17407
17462
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17408
17463
|
}
|
|
17409
17464
|
function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
@@ -17425,7 +17480,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17425
17480
|
const name = command.name.trim().replace(/^\//u, "");
|
|
17426
17481
|
if (!name || /\s/u.test(name))
|
|
17427
17482
|
continue;
|
|
17428
|
-
if (isExcludedLiveCommand(name,
|
|
17483
|
+
if (isExcludedLiveCommand(name, exclusions))
|
|
17429
17484
|
continue;
|
|
17430
17485
|
const invocation = `/${name}`;
|
|
17431
17486
|
const id2 = `${idPrefix}${name.replace(/[^A-Za-z0-9._:-]/gu, "-")}`.slice(0, 128);
|
|
@@ -17437,8 +17492,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17437
17492
|
invocation,
|
|
17438
17493
|
label: name.slice(0, 128),
|
|
17439
17494
|
...description ? { description } : {},
|
|
17440
|
-
argumentMode: "text"
|
|
17441
|
-
kind: command.kind
|
|
17495
|
+
argumentMode: "text"
|
|
17442
17496
|
});
|
|
17443
17497
|
if (!parsed.success)
|
|
17444
17498
|
continue;
|
|
@@ -17449,6 +17503,60 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17449
17503
|
return harnessCommandCatalogSchema.parse({ commands: [...builtIns.commands, ...dynamic] });
|
|
17450
17504
|
}
|
|
17451
17505
|
|
|
17506
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17507
|
+
function subagentConfiguration(value) {
|
|
17508
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17509
|
+
return {};
|
|
17510
|
+
const row = value;
|
|
17511
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17512
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17513
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17514
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17515
|
+
}
|
|
17516
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17517
|
+
const native = subagentConfiguration(child);
|
|
17518
|
+
const model2 = native.model ?? parent.model;
|
|
17519
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17520
|
+
const next = { ...child };
|
|
17521
|
+
delete next.model;
|
|
17522
|
+
delete next.reasoningEffort;
|
|
17523
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17524
|
+
}
|
|
17525
|
+
function configureSubagentEvent(event, parent) {
|
|
17526
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17527
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17528
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17529
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17530
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17531
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17532
|
+
return {
|
|
17533
|
+
...event,
|
|
17534
|
+
snapshot: {
|
|
17535
|
+
...event.snapshot,
|
|
17536
|
+
item: {
|
|
17537
|
+
...event.snapshot.item,
|
|
17538
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17539
|
+
}
|
|
17540
|
+
}
|
|
17541
|
+
};
|
|
17542
|
+
return event;
|
|
17543
|
+
}
|
|
17544
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17545
|
+
return {
|
|
17546
|
+
...snapshot,
|
|
17547
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17548
|
+
...turn,
|
|
17549
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17550
|
+
...entry,
|
|
17551
|
+
item: {
|
|
17552
|
+
...entry.item,
|
|
17553
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17554
|
+
}
|
|
17555
|
+
} : entry)
|
|
17556
|
+
}))
|
|
17557
|
+
};
|
|
17558
|
+
}
|
|
17559
|
+
|
|
17452
17560
|
// ../../harness-broker/dist/protocol.js
|
|
17453
17561
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
17454
17562
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -56206,6 +56314,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
56206
56314
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
56207
56315
|
events.push({
|
|
56208
56316
|
type: "subagent.updated",
|
|
56317
|
+
...subagentConfiguration(message),
|
|
56209
56318
|
callId,
|
|
56210
56319
|
status: "running",
|
|
56211
56320
|
...description ? { description } : {},
|
|
@@ -56221,6 +56330,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
56221
56330
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
56222
56331
|
events.push({
|
|
56223
56332
|
type: "subagent.updated",
|
|
56333
|
+
...subagentConfiguration(message),
|
|
56224
56334
|
callId,
|
|
56225
56335
|
status: "running",
|
|
56226
56336
|
...description ? { description } : {},
|
|
@@ -56239,8 +56349,10 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
56239
56349
|
const agentId = boundedString(message.task_id, SUBAGENT_DESCRIPTION_LIMIT);
|
|
56240
56350
|
events.push({
|
|
56241
56351
|
type: "subagent.updated",
|
|
56352
|
+
...subagentConfiguration(message),
|
|
56242
56353
|
callId,
|
|
56243
56354
|
status,
|
|
56355
|
+
...subagentConfiguration(message.patch),
|
|
56244
56356
|
...description ? { description } : {},
|
|
56245
56357
|
...agentId ? { nativeSubagentId: agentId } : {},
|
|
56246
56358
|
...resultSummary ? { resultSummary } : {}
|
|
@@ -56407,6 +56519,7 @@ var ClaudeNativeTurnAccumulator = class {
|
|
|
56407
56519
|
const agentId = targetedSubagentId(argumentsResult.data);
|
|
56408
56520
|
events.push({
|
|
56409
56521
|
type: "subagent.started",
|
|
56522
|
+
...block.name === "SendMessage" ? {} : subagentConfiguration(argumentsResult.data),
|
|
56410
56523
|
callId: block.id,
|
|
56411
56524
|
operation: block.name === "SendMessage" ? "send" : "spawn",
|
|
56412
56525
|
description: subagentDescription(argumentsResult.data, block.name),
|
|
@@ -57989,10 +58102,9 @@ function parseClaudeSlashCommands(value) {
|
|
|
57989
58102
|
});
|
|
57990
58103
|
}
|
|
57991
58104
|
function claudeLiveCommandCatalog(builtIns, snapshot) {
|
|
57992
|
-
return mergeLiveHarnessCommands(builtIns, DYNAMIC_ID_PREFIX, snapshot?.commands.map((command) => ({
|
|
58105
|
+
return mergeLiveHarnessCommands(builtIns, DYNAMIC_ID_PREFIX, snapshot?.commands.filter((command) => !snapshot.skillNames.has(command.name)).map((command) => ({
|
|
57993
58106
|
name: command.name,
|
|
57994
|
-
description: command.description
|
|
57995
|
-
kind: snapshot.skillNames.has(command.name) ? "skill" : "command"
|
|
58107
|
+
description: command.description
|
|
57996
58108
|
})) ?? null, { names: CLAUDE_EXCLUDED_COMMANDS });
|
|
57997
58109
|
}
|
|
57998
58110
|
function claudeDynamicCommandPrompt(catalog, commandId, argumentText) {
|
|
@@ -59400,6 +59512,7 @@ var ClaudeSubagentLifecycle = class {
|
|
|
59400
59512
|
subagentId: event.nativeSubagentId ?? event.callId,
|
|
59401
59513
|
...event.nativeSubagentId ? { nativeSubagentId: event.nativeSubagentId } : {},
|
|
59402
59514
|
description: event.description,
|
|
59515
|
+
...subagentConfiguration(event),
|
|
59403
59516
|
...event.role ? { role: event.role } : {},
|
|
59404
59517
|
...event.model ? { model: event.model } : {},
|
|
59405
59518
|
background: event.background,
|
|
@@ -59424,6 +59537,7 @@ var ClaudeSubagentLifecycle = class {
|
|
|
59424
59537
|
throw new Error("Claude Code Subagent delegation has no Agent state");
|
|
59425
59538
|
const subagent = {
|
|
59426
59539
|
...current,
|
|
59540
|
+
...subagentConfiguration(event),
|
|
59427
59541
|
status: event.status,
|
|
59428
59542
|
...event.nativeSubagentId ? { nativeSubagentId: event.nativeSubagentId } : {},
|
|
59429
59543
|
...event.description ? { description: event.description } : {},
|
|
@@ -60483,7 +60597,19 @@ var ClaudeHarnessSession = class {
|
|
|
60483
60597
|
get nativeWriterRef() {
|
|
60484
60598
|
return this.#nativeRef;
|
|
60485
60599
|
}
|
|
60600
|
+
#subagentConfiguration() {
|
|
60601
|
+
const state = this.#state;
|
|
60602
|
+
const model2 = state.effectiveModel ? decodeClaudeModelRef(state.effectiveModel) : void 0;
|
|
60603
|
+
return {
|
|
60604
|
+
...model2 ? { model: model2 } : {},
|
|
60605
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
60606
|
+
};
|
|
60607
|
+
}
|
|
60486
60608
|
async readSnapshot() {
|
|
60609
|
+
const result = await this.#readSnapshot();
|
|
60610
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
60611
|
+
}
|
|
60612
|
+
async #readSnapshot() {
|
|
60487
60613
|
if (this.#phase !== "open") {
|
|
60488
60614
|
return { ok: false, error: invalidState("Claude Code Session is not open") };
|
|
60489
60615
|
}
|
|
@@ -62473,6 +62599,7 @@ var ClaudeHarnessSession = class {
|
|
|
62473
62599
|
void this.#transport?.close().catch(() => void 0);
|
|
62474
62600
|
}
|
|
62475
62601
|
#event(event) {
|
|
62602
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
62476
62603
|
this.#channel.emit({ kind: "event", event });
|
|
62477
62604
|
}
|
|
62478
62605
|
};
|
|
@@ -15998,6 +15998,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15998
15998
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15999
15999
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
16000
16000
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
16001
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
16002
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
16003
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
16004
|
+
}).strict();
|
|
16001
16005
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
16002
16006
|
prompt: external_exports.string().max(16384).optional()
|
|
16003
16007
|
}).strict();
|
|
@@ -16014,6 +16018,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
16014
16018
|
sequence: external_exports.number().int().nonnegative()
|
|
16015
16019
|
});
|
|
16016
16020
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
16021
|
+
external_exports.object({
|
|
16022
|
+
type: external_exports.literal("skills-changed"),
|
|
16023
|
+
cursor: clientChannelCursorSchema,
|
|
16024
|
+
cwd: external_exports.string().optional()
|
|
16025
|
+
}),
|
|
16017
16026
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
16018
16027
|
external_exports.object({
|
|
16019
16028
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -16211,6 +16220,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
16211
16220
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
16212
16221
|
]);
|
|
16213
16222
|
|
|
16223
|
+
// ../../shared-contracts/dist/skills.js
|
|
16224
|
+
var skillsListParamsSchema = external_exports.object({
|
|
16225
|
+
threadId: hostThreadIdSchema.optional(),
|
|
16226
|
+
cwd: external_exports.string().min(1).optional()
|
|
16227
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
16228
|
+
message: "Specify threadId or cwd, not both"
|
|
16229
|
+
});
|
|
16230
|
+
var librarySkillSchema = external_exports.object({
|
|
16231
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
16232
|
+
description: external_exports.string().optional(),
|
|
16233
|
+
path: external_exports.string().min(1),
|
|
16234
|
+
scope: external_exports.enum(["project", "global"]),
|
|
16235
|
+
source: external_exports.string().min(1)
|
|
16236
|
+
}).strict();
|
|
16237
|
+
var skillsListResultSchema = external_exports.object({
|
|
16238
|
+
revision: external_exports.number().int().nonnegative(),
|
|
16239
|
+
complete: external_exports.boolean(),
|
|
16240
|
+
skills: external_exports.array(librarySkillSchema),
|
|
16241
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
16242
|
+
}).strict();
|
|
16243
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
16244
|
+
|
|
16214
16245
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
16215
16246
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
16216
16247
|
/**
|
|
@@ -16316,8 +16347,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
16316
16347
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
16317
16348
|
threadId: external_exports.string().min(1).max(1024),
|
|
16318
16349
|
view: external_exports.enum(["result", "messages"]),
|
|
16319
|
-
|
|
16320
|
-
|
|
16350
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
16351
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
16321
16352
|
});
|
|
16322
16353
|
|
|
16323
16354
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -17319,6 +17350,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
17319
17350
|
status: updateStatusSchema.nullable()
|
|
17320
17351
|
});
|
|
17321
17352
|
|
|
17353
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
17354
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
17355
|
+
"completed",
|
|
17356
|
+
"failed",
|
|
17357
|
+
"interrupted",
|
|
17358
|
+
"timedOut",
|
|
17359
|
+
"unreadable",
|
|
17360
|
+
"notFound"
|
|
17361
|
+
];
|
|
17362
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
17363
|
+
|
|
17322
17364
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
17323
17365
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
17324
17366
|
"idle",
|
|
@@ -17366,6 +17408,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
17366
17408
|
archived: external_exports.boolean()
|
|
17367
17409
|
}),
|
|
17368
17410
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
17411
|
+
external_exports.strictObject({
|
|
17412
|
+
kind: external_exports.literal("configure"),
|
|
17413
|
+
...thread,
|
|
17414
|
+
epoch: identity,
|
|
17415
|
+
modelId: identity.optional(),
|
|
17416
|
+
thinkingOptionId: identity.optional(),
|
|
17417
|
+
permissionModeId: identity.optional()
|
|
17418
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
17369
17419
|
external_exports.strictObject({
|
|
17370
17420
|
kind: external_exports.literal("prompt"),
|
|
17371
17421
|
...thread,
|
|
@@ -17438,6 +17488,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
17438
17488
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
17439
17489
|
]);
|
|
17440
17490
|
|
|
17491
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
17492
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
17493
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
17494
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
17495
|
+
});
|
|
17496
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
17497
|
+
|
|
17441
17498
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
17442
17499
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
17443
17500
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17901,17 +17958,69 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17901
17958
|
"reload-plugins"
|
|
17902
17959
|
]);
|
|
17903
17960
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17904
|
-
function isExcludedLiveCommand(name,
|
|
17961
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17905
17962
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17906
17963
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17907
17964
|
return true;
|
|
17908
17965
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17909
17966
|
return true;
|
|
17910
|
-
if (kind === "skill")
|
|
17911
|
-
return false;
|
|
17912
17967
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17913
17968
|
}
|
|
17914
17969
|
|
|
17970
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17971
|
+
function subagentConfiguration(value) {
|
|
17972
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17973
|
+
return {};
|
|
17974
|
+
const row = value;
|
|
17975
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17976
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17977
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17978
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17979
|
+
}
|
|
17980
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17981
|
+
const native = subagentConfiguration(child);
|
|
17982
|
+
const model2 = native.model ?? parent.model;
|
|
17983
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17984
|
+
const next = { ...child };
|
|
17985
|
+
delete next.model;
|
|
17986
|
+
delete next.reasoningEffort;
|
|
17987
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17988
|
+
}
|
|
17989
|
+
function configureSubagentEvent(event, parent) {
|
|
17990
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17991
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17992
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17993
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17994
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17995
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17996
|
+
return {
|
|
17997
|
+
...event,
|
|
17998
|
+
snapshot: {
|
|
17999
|
+
...event.snapshot,
|
|
18000
|
+
item: {
|
|
18001
|
+
...event.snapshot.item,
|
|
18002
|
+
subagents: children(event.snapshot.item.subagents)
|
|
18003
|
+
}
|
|
18004
|
+
}
|
|
18005
|
+
};
|
|
18006
|
+
return event;
|
|
18007
|
+
}
|
|
18008
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
18009
|
+
return {
|
|
18010
|
+
...snapshot,
|
|
18011
|
+
turns: snapshot.turns.map((turn) => ({
|
|
18012
|
+
...turn,
|
|
18013
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
18014
|
+
...entry,
|
|
18015
|
+
item: {
|
|
18016
|
+
...entry.item,
|
|
18017
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
18018
|
+
}
|
|
18019
|
+
} : entry)
|
|
18020
|
+
}))
|
|
18021
|
+
};
|
|
18022
|
+
}
|
|
18023
|
+
|
|
17915
18024
|
// dist/common.js
|
|
17916
18025
|
var CODEBUDDY_ID = harnessIdSchema.parse("codebuddy");
|
|
17917
18026
|
var CODEBUDDY_RUNTIME_PROFILE = {
|
|
@@ -18062,8 +18171,7 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
18062
18171
|
return {
|
|
18063
18172
|
commands: rows(value).flatMap((entry) => {
|
|
18064
18173
|
const name = text(entry.name).replace(/^\//u, "");
|
|
18065
|
-
|
|
18066
|
-
if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
|
|
18174
|
+
if (record3(entry._meta).type === "skill" || excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name))
|
|
18067
18175
|
return [];
|
|
18068
18176
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
18069
18177
|
commands: [
|
|
@@ -18071,14 +18179,13 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
18071
18179
|
id: `${profile.harnessId}.${name}`,
|
|
18072
18180
|
invocation: `/${name}`,
|
|
18073
18181
|
label: name,
|
|
18074
|
-
...name === "compact"
|
|
18182
|
+
...name === "compact" ? {
|
|
18075
18183
|
localizations: {
|
|
18076
18184
|
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
18077
18185
|
}
|
|
18078
18186
|
} : {},
|
|
18079
18187
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
18080
|
-
argumentMode: name === "compact" || record3(entry.input).hint
|
|
18081
|
-
...record3(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
18188
|
+
argumentMode: name === "compact" || record3(entry.input).hint ? "text" : "none"
|
|
18082
18189
|
}
|
|
18083
18190
|
]
|
|
18084
18191
|
});
|
|
@@ -19016,7 +19123,7 @@ function codeBuddyDelegation(callId, input, status, childId, displayName = "Code
|
|
|
19016
19123
|
...nativeId ? { nativeSubagentId: nativeId } : {},
|
|
19017
19124
|
description: text(args.description) || `${displayName} Subagent`,
|
|
19018
19125
|
...text(args.subagent_type) ? { role: text(args.subagent_type) } : {},
|
|
19019
|
-
...
|
|
19126
|
+
...subagentConfiguration(args),
|
|
19020
19127
|
background: args.run_in_background === true,
|
|
19021
19128
|
status
|
|
19022
19129
|
}
|
|
@@ -25656,9 +25763,13 @@ var CodeBuddySubagents = class {
|
|
|
25656
25763
|
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"));
|
|
25657
25764
|
if (this.#closed || call.observationDone)
|
|
25658
25765
|
continue;
|
|
25659
|
-
const observedModel = snapshot.turns.at(-1)?.model;
|
|
25660
|
-
|
|
25661
|
-
|
|
25766
|
+
const observedModel = snapshot.turns.at(-1)?.model ?? snapshot.state?.effectiveModel;
|
|
25767
|
+
const reasoningEffort = snapshot.state?.effectiveThinkingOptionId;
|
|
25768
|
+
if (observedModel || reasoningEffort)
|
|
25769
|
+
this.#update(call, {
|
|
25770
|
+
...observedModel ? { model: nativeModel(observedModel) } : {},
|
|
25771
|
+
...reasoningEffort ? { reasoningEffort } : {}
|
|
25772
|
+
});
|
|
25662
25773
|
const signature = JSON.stringify(snapshot);
|
|
25663
25774
|
if (signature !== call.signature) {
|
|
25664
25775
|
call.signature = signature;
|
|
@@ -25801,10 +25912,7 @@ var CodeBuddySession = class {
|
|
|
25801
25912
|
contextWindowTokens: update.size,
|
|
25802
25913
|
contextUsagePercent: update.used / update.size * 100
|
|
25803
25914
|
};
|
|
25804
|
-
this.#
|
|
25805
|
-
type: "session.usage.changed",
|
|
25806
|
-
usage: { ...this.#usage, ...this.#context }
|
|
25807
|
-
});
|
|
25915
|
+
this.#emitUsage();
|
|
25808
25916
|
void this.refreshUsage();
|
|
25809
25917
|
}
|
|
25810
25918
|
this.#active?.output.update(update);
|
|
@@ -25874,8 +25982,16 @@ var CodeBuddySession = class {
|
|
|
25874
25982
|
this.initialUsage = this.#usage;
|
|
25875
25983
|
}
|
|
25876
25984
|
#emit(event) {
|
|
25985
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
25877
25986
|
this.#channel.emit({ kind: "event", event });
|
|
25878
25987
|
}
|
|
25988
|
+
#emitUsage() {
|
|
25989
|
+
const usage = { ...this.#usage, ...this.#context };
|
|
25990
|
+
this.#emit({
|
|
25991
|
+
type: "session.usage.changed",
|
|
25992
|
+
usage: Object.keys(usage).length ? usage : null
|
|
25993
|
+
});
|
|
25994
|
+
}
|
|
25879
25995
|
/** Publishes native requests not yet metered; the first read also declares completeness. */
|
|
25880
25996
|
#meterHistory(history, historical) {
|
|
25881
25997
|
const { requests, complete } = historyUsageRequests(history, historical);
|
|
@@ -25889,6 +26005,10 @@ var CodeBuddySession = class {
|
|
|
25889
26005
|
this.#emit({ type: "usage.history", complete });
|
|
25890
26006
|
}
|
|
25891
26007
|
#apply(config2, emit = true) {
|
|
26008
|
+
if (this.#state.effectiveModel && this.#state.effectiveModel.id !== config2.state.effectiveModel?.id) {
|
|
26009
|
+
this.#context = {};
|
|
26010
|
+
this.#emitUsage();
|
|
26011
|
+
}
|
|
25892
26012
|
this.#config = config2;
|
|
25893
26013
|
if (this.#ref && record3(this.#ref.locator).codebuddyDerived === 1)
|
|
25894
26014
|
this.#ref = nativeSessionRefSchema.parse({
|
|
@@ -25948,13 +26068,25 @@ var CodeBuddySession = class {
|
|
|
25948
26068
|
return;
|
|
25949
26069
|
this.#usage = historyUsage(history);
|
|
25950
26070
|
this.#meterHistory(history, false);
|
|
25951
|
-
this.#
|
|
26071
|
+
this.#emitUsage();
|
|
25952
26072
|
} catch {
|
|
25953
26073
|
} finally {
|
|
25954
26074
|
this.#refreshingUsage = false;
|
|
25955
26075
|
}
|
|
25956
26076
|
}
|
|
26077
|
+
#subagentConfiguration() {
|
|
26078
|
+
const state = this.#state;
|
|
26079
|
+
const model2 = state.effectiveModel ? nativeModel(state.effectiveModel) : void 0;
|
|
26080
|
+
return {
|
|
26081
|
+
...model2 ? { model: model2 } : {},
|
|
26082
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
26083
|
+
};
|
|
26084
|
+
}
|
|
25957
26085
|
async readSnapshot() {
|
|
26086
|
+
const result = await this.#readSnapshot();
|
|
26087
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
26088
|
+
}
|
|
26089
|
+
async #readSnapshot() {
|
|
25958
26090
|
if (this.#closed || this.#fault)
|
|
25959
26091
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
25960
26092
|
if (this.#busy || this.#active)
|
|
@@ -26081,7 +26213,7 @@ var CodeBuddySession = class {
|
|
|
26081
26213
|
...added[0]?.checkpoint ? { checkpoint: added[0].checkpoint } : {}
|
|
26082
26214
|
}, nativeTurnRef);
|
|
26083
26215
|
if (this.#usage)
|
|
26084
|
-
this.#
|
|
26216
|
+
this.#emitUsage();
|
|
26085
26217
|
} catch (error51) {
|
|
26086
26218
|
if (!active.done)
|
|
26087
26219
|
this.#finish(active, { status: "failed", error: nativeError(error51, this.profile) });
|