@codexhost/cli-linux-arm64 0.18.0-beta.5 → 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 +64 -4
- package/app/console-web.js +193 -73
- 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 +739 -336
- package/app/web/assets/index-BNQIOOHE.css +1 -0
- package/app/web/assets/index-Feo4BkqN.js +199 -0
- package/app/web/codexhost-settings.js +151 -65
- 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 +3 -3
- 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-theme/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/sw.js +40 -0
- 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([
|
|
@@ -16924,17 +16981,69 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
16924
16981
|
"reload-plugins"
|
|
16925
16982
|
]);
|
|
16926
16983
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
16927
|
-
function isExcludedLiveCommand(name,
|
|
16984
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
16928
16985
|
const normalized = name.trim().replace(/^\//u, "");
|
|
16929
16986
|
if (new Set(extra.names ?? []).has(normalized))
|
|
16930
16987
|
return true;
|
|
16931
16988
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
16932
16989
|
return true;
|
|
16933
|
-
if (kind === "skill")
|
|
16934
|
-
return false;
|
|
16935
16990
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
16936
16991
|
}
|
|
16937
16992
|
|
|
16993
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
16994
|
+
function subagentConfiguration(value) {
|
|
16995
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
16996
|
+
return {};
|
|
16997
|
+
const row = value;
|
|
16998
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
16999
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17000
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17001
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17002
|
+
}
|
|
17003
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17004
|
+
const native = subagentConfiguration(child);
|
|
17005
|
+
const model2 = native.model ?? parent.model;
|
|
17006
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17007
|
+
const next = { ...child };
|
|
17008
|
+
delete next.model;
|
|
17009
|
+
delete next.reasoningEffort;
|
|
17010
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17011
|
+
}
|
|
17012
|
+
function configureSubagentEvent(event, parent) {
|
|
17013
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17014
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17015
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17016
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17017
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17018
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17019
|
+
return {
|
|
17020
|
+
...event,
|
|
17021
|
+
snapshot: {
|
|
17022
|
+
...event.snapshot,
|
|
17023
|
+
item: {
|
|
17024
|
+
...event.snapshot.item,
|
|
17025
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17026
|
+
}
|
|
17027
|
+
}
|
|
17028
|
+
};
|
|
17029
|
+
return event;
|
|
17030
|
+
}
|
|
17031
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17032
|
+
return {
|
|
17033
|
+
...snapshot,
|
|
17034
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17035
|
+
...turn,
|
|
17036
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17037
|
+
...entry,
|
|
17038
|
+
item: {
|
|
17039
|
+
...entry.item,
|
|
17040
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17041
|
+
}
|
|
17042
|
+
} : entry)
|
|
17043
|
+
}))
|
|
17044
|
+
};
|
|
17045
|
+
}
|
|
17046
|
+
|
|
16938
17047
|
// ../../harness-broker/dist/protocol.js
|
|
16939
17048
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
16940
17049
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -18912,8 +19021,7 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
18912
19021
|
return {
|
|
18913
19022
|
commands: rows(value).flatMap((entry) => {
|
|
18914
19023
|
const name = text(entry.name).replace(/^\//u, "");
|
|
18915
|
-
|
|
18916
|
-
if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
|
|
19024
|
+
if (record3(entry._meta).type === "skill" || excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name))
|
|
18917
19025
|
return [];
|
|
18918
19026
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
18919
19027
|
commands: [
|
|
@@ -18921,14 +19029,13 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
18921
19029
|
id: `${profile.harnessId}.${name}`,
|
|
18922
19030
|
invocation: `/${name}`,
|
|
18923
19031
|
label: name,
|
|
18924
|
-
...name === "compact"
|
|
19032
|
+
...name === "compact" ? {
|
|
18925
19033
|
localizations: {
|
|
18926
19034
|
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
18927
19035
|
}
|
|
18928
19036
|
} : {},
|
|
18929
19037
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
18930
|
-
argumentMode: name === "compact" || record3(entry.input).hint
|
|
18931
|
-
...record3(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
19038
|
+
argumentMode: name === "compact" || record3(entry.input).hint ? "text" : "none"
|
|
18932
19039
|
}
|
|
18933
19040
|
]
|
|
18934
19041
|
});
|
|
@@ -19213,7 +19320,7 @@ function codeBuddyDelegation(callId, input, status, childId, displayName = "Code
|
|
|
19213
19320
|
...nativeId ? { nativeSubagentId: nativeId } : {},
|
|
19214
19321
|
description: text(args.description) || `${displayName} Subagent`,
|
|
19215
19322
|
...text(args.subagent_type) ? { role: text(args.subagent_type) } : {},
|
|
19216
|
-
...
|
|
19323
|
+
...subagentConfiguration(args),
|
|
19217
19324
|
background: args.run_in_background === true,
|
|
19218
19325
|
status
|
|
19219
19326
|
}
|
|
@@ -26219,9 +26326,13 @@ var CodeBuddySubagents = class {
|
|
|
26219
26326
|
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"));
|
|
26220
26327
|
if (this.#closed || call.observationDone)
|
|
26221
26328
|
continue;
|
|
26222
|
-
const observedModel = snapshot.turns.at(-1)?.model;
|
|
26223
|
-
|
|
26224
|
-
|
|
26329
|
+
const observedModel = snapshot.turns.at(-1)?.model ?? snapshot.state?.effectiveModel;
|
|
26330
|
+
const reasoningEffort = snapshot.state?.effectiveThinkingOptionId;
|
|
26331
|
+
if (observedModel || reasoningEffort)
|
|
26332
|
+
this.#update(call, {
|
|
26333
|
+
...observedModel ? { model: nativeModel(observedModel) } : {},
|
|
26334
|
+
...reasoningEffort ? { reasoningEffort } : {}
|
|
26335
|
+
});
|
|
26225
26336
|
const signature = JSON.stringify(snapshot);
|
|
26226
26337
|
if (signature !== call.signature) {
|
|
26227
26338
|
call.signature = signature;
|
|
@@ -26364,10 +26475,7 @@ var CodeBuddySession = class {
|
|
|
26364
26475
|
contextWindowTokens: update.size,
|
|
26365
26476
|
contextUsagePercent: update.used / update.size * 100
|
|
26366
26477
|
};
|
|
26367
|
-
this.#
|
|
26368
|
-
type: "session.usage.changed",
|
|
26369
|
-
usage: { ...this.#usage, ...this.#context }
|
|
26370
|
-
});
|
|
26478
|
+
this.#emitUsage();
|
|
26371
26479
|
void this.refreshUsage();
|
|
26372
26480
|
}
|
|
26373
26481
|
this.#active?.output.update(update);
|
|
@@ -26437,8 +26545,16 @@ var CodeBuddySession = class {
|
|
|
26437
26545
|
this.initialUsage = this.#usage;
|
|
26438
26546
|
}
|
|
26439
26547
|
#emit(event) {
|
|
26548
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
26440
26549
|
this.#channel.emit({ kind: "event", event });
|
|
26441
26550
|
}
|
|
26551
|
+
#emitUsage() {
|
|
26552
|
+
const usage = { ...this.#usage, ...this.#context };
|
|
26553
|
+
this.#emit({
|
|
26554
|
+
type: "session.usage.changed",
|
|
26555
|
+
usage: Object.keys(usage).length ? usage : null
|
|
26556
|
+
});
|
|
26557
|
+
}
|
|
26442
26558
|
/** Publishes native requests not yet metered; the first read also declares completeness. */
|
|
26443
26559
|
#meterHistory(history, historical) {
|
|
26444
26560
|
const { requests, complete } = historyUsageRequests(history, historical);
|
|
@@ -26452,6 +26568,10 @@ var CodeBuddySession = class {
|
|
|
26452
26568
|
this.#emit({ type: "usage.history", complete });
|
|
26453
26569
|
}
|
|
26454
26570
|
#apply(config2, emit = true) {
|
|
26571
|
+
if (this.#state.effectiveModel && this.#state.effectiveModel.id !== config2.state.effectiveModel?.id) {
|
|
26572
|
+
this.#context = {};
|
|
26573
|
+
this.#emitUsage();
|
|
26574
|
+
}
|
|
26455
26575
|
this.#config = config2;
|
|
26456
26576
|
if (this.#ref && record3(this.#ref.locator).codebuddyDerived === 1)
|
|
26457
26577
|
this.#ref = nativeSessionRefSchema.parse({
|
|
@@ -26511,13 +26631,25 @@ var CodeBuddySession = class {
|
|
|
26511
26631
|
return;
|
|
26512
26632
|
this.#usage = historyUsage(history);
|
|
26513
26633
|
this.#meterHistory(history, false);
|
|
26514
|
-
this.#
|
|
26634
|
+
this.#emitUsage();
|
|
26515
26635
|
} catch {
|
|
26516
26636
|
} finally {
|
|
26517
26637
|
this.#refreshingUsage = false;
|
|
26518
26638
|
}
|
|
26519
26639
|
}
|
|
26640
|
+
#subagentConfiguration() {
|
|
26641
|
+
const state = this.#state;
|
|
26642
|
+
const model2 = state.effectiveModel ? nativeModel(state.effectiveModel) : void 0;
|
|
26643
|
+
return {
|
|
26644
|
+
...model2 ? { model: model2 } : {},
|
|
26645
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
26646
|
+
};
|
|
26647
|
+
}
|
|
26520
26648
|
async readSnapshot() {
|
|
26649
|
+
const result = await this.#readSnapshot();
|
|
26650
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
26651
|
+
}
|
|
26652
|
+
async #readSnapshot() {
|
|
26521
26653
|
if (this.#closed || this.#fault)
|
|
26522
26654
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
26523
26655
|
if (this.#busy || this.#active)
|
|
@@ -26644,7 +26776,7 @@ var CodeBuddySession = class {
|
|
|
26644
26776
|
...added[0]?.checkpoint ? { checkpoint: added[0].checkpoint } : {}
|
|
26645
26777
|
}, nativeTurnRef);
|
|
26646
26778
|
if (this.#usage)
|
|
26647
|
-
this.#
|
|
26779
|
+
this.#emitUsage();
|
|
26648
26780
|
} catch (error51) {
|
|
26649
26781
|
if (!active.done)
|
|
26650
26782
|
this.#finish(active, { status: "failed", error: nativeError(error51, this.profile) });
|
|
@@ -15290,6 +15290,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15290
15290
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15291
15291
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15292
15292
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15293
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15294
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15295
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15296
|
+
}).strict();
|
|
15293
15297
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15294
15298
|
prompt: external_exports.string().max(16384).optional()
|
|
15295
15299
|
}).strict();
|
|
@@ -15306,6 +15310,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15306
15310
|
sequence: external_exports.number().int().nonnegative()
|
|
15307
15311
|
});
|
|
15308
15312
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15313
|
+
external_exports.object({
|
|
15314
|
+
type: external_exports.literal("skills-changed"),
|
|
15315
|
+
cursor: clientChannelCursorSchema,
|
|
15316
|
+
cwd: external_exports.string().optional()
|
|
15317
|
+
}),
|
|
15309
15318
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15310
15319
|
external_exports.object({
|
|
15311
15320
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15503,6 +15512,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15503
15512
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15504
15513
|
]);
|
|
15505
15514
|
|
|
15515
|
+
// ../../shared-contracts/dist/skills.js
|
|
15516
|
+
var skillsListParamsSchema = external_exports.object({
|
|
15517
|
+
threadId: hostThreadIdSchema.optional(),
|
|
15518
|
+
cwd: external_exports.string().min(1).optional()
|
|
15519
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
15520
|
+
message: "Specify threadId or cwd, not both"
|
|
15521
|
+
});
|
|
15522
|
+
var librarySkillSchema = external_exports.object({
|
|
15523
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
15524
|
+
description: external_exports.string().optional(),
|
|
15525
|
+
path: external_exports.string().min(1),
|
|
15526
|
+
scope: external_exports.enum(["project", "global"]),
|
|
15527
|
+
source: external_exports.string().min(1)
|
|
15528
|
+
}).strict();
|
|
15529
|
+
var skillsListResultSchema = external_exports.object({
|
|
15530
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15531
|
+
complete: external_exports.boolean(),
|
|
15532
|
+
skills: external_exports.array(librarySkillSchema),
|
|
15533
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
15534
|
+
}).strict();
|
|
15535
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
15536
|
+
|
|
15506
15537
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15507
15538
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15508
15539
|
/**
|
|
@@ -15608,8 +15639,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15608
15639
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15609
15640
|
threadId: external_exports.string().min(1).max(1024),
|
|
15610
15641
|
view: external_exports.enum(["result", "messages"]),
|
|
15611
|
-
|
|
15612
|
-
|
|
15642
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
15643
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
15613
15644
|
});
|
|
15614
15645
|
|
|
15615
15646
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16562,6 +16593,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16562
16593
|
status: updateStatusSchema.nullable()
|
|
16563
16594
|
});
|
|
16564
16595
|
|
|
16596
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
16597
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
16598
|
+
"completed",
|
|
16599
|
+
"failed",
|
|
16600
|
+
"interrupted",
|
|
16601
|
+
"timedOut",
|
|
16602
|
+
"unreadable",
|
|
16603
|
+
"notFound"
|
|
16604
|
+
];
|
|
16605
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
16606
|
+
|
|
16565
16607
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16566
16608
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16567
16609
|
"idle",
|
|
@@ -16609,6 +16651,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16609
16651
|
archived: external_exports.boolean()
|
|
16610
16652
|
}),
|
|
16611
16653
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
16654
|
+
external_exports.strictObject({
|
|
16655
|
+
kind: external_exports.literal("configure"),
|
|
16656
|
+
...thread,
|
|
16657
|
+
epoch: identity,
|
|
16658
|
+
modelId: identity.optional(),
|
|
16659
|
+
thinkingOptionId: identity.optional(),
|
|
16660
|
+
permissionModeId: identity.optional()
|
|
16661
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
16612
16662
|
external_exports.strictObject({
|
|
16613
16663
|
kind: external_exports.literal("prompt"),
|
|
16614
16664
|
...thread,
|
|
@@ -16681,6 +16731,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16681
16731
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16682
16732
|
]);
|
|
16683
16733
|
|
|
16734
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
16735
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
16736
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
16737
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
16738
|
+
});
|
|
16739
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
16740
|
+
|
|
16684
16741
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
16685
16742
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
16686
16743
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17028,6 +17085,60 @@ function parseHostUsageRequest(value) {
|
|
|
17028
17085
|
return { ...request };
|
|
17029
17086
|
}
|
|
17030
17087
|
|
|
17088
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17089
|
+
function subagentConfiguration(value) {
|
|
17090
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17091
|
+
return {};
|
|
17092
|
+
const row = value;
|
|
17093
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17094
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17095
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17096
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17097
|
+
}
|
|
17098
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17099
|
+
const native = subagentConfiguration(child);
|
|
17100
|
+
const model2 = native.model ?? parent.model;
|
|
17101
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17102
|
+
const next = { ...child };
|
|
17103
|
+
delete next.model;
|
|
17104
|
+
delete next.reasoningEffort;
|
|
17105
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17106
|
+
}
|
|
17107
|
+
function configureSubagentEvent(event, parent) {
|
|
17108
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17109
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17110
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17111
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17112
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17113
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17114
|
+
return {
|
|
17115
|
+
...event,
|
|
17116
|
+
snapshot: {
|
|
17117
|
+
...event.snapshot,
|
|
17118
|
+
item: {
|
|
17119
|
+
...event.snapshot.item,
|
|
17120
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17121
|
+
}
|
|
17122
|
+
}
|
|
17123
|
+
};
|
|
17124
|
+
return event;
|
|
17125
|
+
}
|
|
17126
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17127
|
+
return {
|
|
17128
|
+
...snapshot,
|
|
17129
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17130
|
+
...turn,
|
|
17131
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17132
|
+
...entry,
|
|
17133
|
+
item: {
|
|
17134
|
+
...entry.item,
|
|
17135
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17136
|
+
}
|
|
17137
|
+
} : entry)
|
|
17138
|
+
}))
|
|
17139
|
+
};
|
|
17140
|
+
}
|
|
17141
|
+
|
|
17031
17142
|
// dist/usage.js
|
|
17032
17143
|
function requestTokens(id, model2, value) {
|
|
17033
17144
|
const tokens = record2(value), cache = record2(tokens.cache);
|
|
@@ -18951,9 +19062,6 @@ function createZcodeVerifier(options) {
|
|
|
18951
19062
|
};
|
|
18952
19063
|
}
|
|
18953
19064
|
|
|
18954
|
-
// dist/session.js
|
|
18955
|
-
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
18956
|
-
|
|
18957
19065
|
// dist/models.js
|
|
18958
19066
|
var ZCODE_ID = harnessIdSchema.parse("zcode");
|
|
18959
19067
|
function encodeModel(model2) {
|
|
@@ -19074,6 +19182,9 @@ function sessionUsage(snapshot, catalog) {
|
|
|
19074
19182
|
return Object.keys(usage).length > 0 ? parseHostUsage(usage) : null;
|
|
19075
19183
|
}
|
|
19076
19184
|
|
|
19185
|
+
// dist/session.js
|
|
19186
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
19187
|
+
|
|
19077
19188
|
// ../../../node_modules/diff/libesm/diff/base.js
|
|
19078
19189
|
var Diff = class {
|
|
19079
19190
|
diff(oldStr, newStr, options = {}) {
|
|
@@ -19549,6 +19660,9 @@ function subagent(value, input, fallback) {
|
|
|
19549
19660
|
nativeSubagentId: id,
|
|
19550
19661
|
description: text(args.description) || text(args.prompt) || fallback,
|
|
19551
19662
|
...text(args.subagent_type) || text(args.agentType) ? { role: text(args.subagent_type) || text(args.agentType) } : {},
|
|
19663
|
+
...subagentConfiguration(args),
|
|
19664
|
+
...subagentConfiguration(data),
|
|
19665
|
+
...subagentConfiguration(result),
|
|
19552
19666
|
background: args.run_in_background === true || result.background === true || data.background === true,
|
|
19553
19667
|
status: ["running", "waiting", "blocked"].includes(status) ? "running" : status === "cancelled" ? "interrupted" : ["failed", "lost"].includes(status) || result.success === false ? "failed" : "completed",
|
|
19554
19668
|
...text(result.output) ? { resultSummary: text(result.output).slice(0, OUTPUT_LIMIT) } : {}
|
|
@@ -20280,6 +20394,7 @@ var ZcodeSession = class {
|
|
|
20280
20394
|
return Boolean(this.#active || this.#configuring || this.isLocked());
|
|
20281
20395
|
}
|
|
20282
20396
|
#emit(event) {
|
|
20397
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
20283
20398
|
this.#channel.emit({ kind: "event", event });
|
|
20284
20399
|
}
|
|
20285
20400
|
async subscribe() {
|
|
@@ -20374,7 +20489,19 @@ var ZcodeSession = class {
|
|
|
20374
20489
|
} catch {
|
|
20375
20490
|
}
|
|
20376
20491
|
}
|
|
20492
|
+
#subagentConfiguration() {
|
|
20493
|
+
const state = this.#state;
|
|
20494
|
+
const model2 = state.effectiveModel ? decodeModel(state.effectiveModel).modelId : void 0;
|
|
20495
|
+
return {
|
|
20496
|
+
...model2 ? { model: model2 } : {},
|
|
20497
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
20498
|
+
};
|
|
20499
|
+
}
|
|
20377
20500
|
async readSnapshot() {
|
|
20501
|
+
const result = await this.#readSnapshot();
|
|
20502
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
20503
|
+
}
|
|
20504
|
+
async #readSnapshot() {
|
|
20378
20505
|
if (this.#closed || this.#faulted)
|
|
20379
20506
|
return failure("invalidState", "ZCode session is closed");
|
|
20380
20507
|
if (this.busy)
|