@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([
|
|
@@ -17425,17 +17482,69 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17425
17482
|
"reload-plugins"
|
|
17426
17483
|
]);
|
|
17427
17484
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17428
|
-
function isExcludedLiveCommand(name,
|
|
17485
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17429
17486
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17430
17487
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17431
17488
|
return true;
|
|
17432
17489
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17433
17490
|
return true;
|
|
17434
|
-
if (kind === "skill")
|
|
17435
|
-
return false;
|
|
17436
17491
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17437
17492
|
}
|
|
17438
17493
|
|
|
17494
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17495
|
+
function subagentConfiguration(value) {
|
|
17496
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17497
|
+
return {};
|
|
17498
|
+
const row = value;
|
|
17499
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17500
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17501
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17502
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17503
|
+
}
|
|
17504
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17505
|
+
const native = subagentConfiguration(child);
|
|
17506
|
+
const model2 = native.model ?? parent.model;
|
|
17507
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17508
|
+
const next = { ...child };
|
|
17509
|
+
delete next.model;
|
|
17510
|
+
delete next.reasoningEffort;
|
|
17511
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17512
|
+
}
|
|
17513
|
+
function configureSubagentEvent(event, parent) {
|
|
17514
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17515
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17516
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17517
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17518
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17519
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17520
|
+
return {
|
|
17521
|
+
...event,
|
|
17522
|
+
snapshot: {
|
|
17523
|
+
...event.snapshot,
|
|
17524
|
+
item: {
|
|
17525
|
+
...event.snapshot.item,
|
|
17526
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17527
|
+
}
|
|
17528
|
+
}
|
|
17529
|
+
};
|
|
17530
|
+
return event;
|
|
17531
|
+
}
|
|
17532
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17533
|
+
return {
|
|
17534
|
+
...snapshot,
|
|
17535
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17536
|
+
...turn,
|
|
17537
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17538
|
+
...entry,
|
|
17539
|
+
item: {
|
|
17540
|
+
...entry.item,
|
|
17541
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17542
|
+
}
|
|
17543
|
+
} : entry)
|
|
17544
|
+
}))
|
|
17545
|
+
};
|
|
17546
|
+
}
|
|
17547
|
+
|
|
17439
17548
|
// ../../harness-broker/dist/protocol.js
|
|
17440
17549
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
17441
17550
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -19413,8 +19522,7 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
19413
19522
|
return {
|
|
19414
19523
|
commands: rows(value).flatMap((entry) => {
|
|
19415
19524
|
const name = text(entry.name).replace(/^\//u, "");
|
|
19416
|
-
|
|
19417
|
-
if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
|
|
19525
|
+
if (record3(entry._meta).type === "skill" || excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name))
|
|
19418
19526
|
return [];
|
|
19419
19527
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
19420
19528
|
commands: [
|
|
@@ -19422,14 +19530,13 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
19422
19530
|
id: `${profile.harnessId}.${name}`,
|
|
19423
19531
|
invocation: `/${name}`,
|
|
19424
19532
|
label: name,
|
|
19425
|
-
...name === "compact"
|
|
19533
|
+
...name === "compact" ? {
|
|
19426
19534
|
localizations: {
|
|
19427
19535
|
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
19428
19536
|
}
|
|
19429
19537
|
} : {},
|
|
19430
19538
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
19431
|
-
argumentMode: name === "compact" || record3(entry.input).hint
|
|
19432
|
-
...record3(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
19539
|
+
argumentMode: name === "compact" || record3(entry.input).hint ? "text" : "none"
|
|
19433
19540
|
}
|
|
19434
19541
|
]
|
|
19435
19542
|
});
|
|
@@ -19714,7 +19821,7 @@ function codeBuddyDelegation(callId, input, status, childId, displayName = "Code
|
|
|
19714
19821
|
...nativeId ? { nativeSubagentId: nativeId } : {},
|
|
19715
19822
|
description: text(args.description) || `${displayName} Subagent`,
|
|
19716
19823
|
...text(args.subagent_type) ? { role: text(args.subagent_type) } : {},
|
|
19717
|
-
...
|
|
19824
|
+
...subagentConfiguration(args),
|
|
19718
19825
|
background: args.run_in_background === true,
|
|
19719
19826
|
status
|
|
19720
19827
|
}
|
|
@@ -26720,9 +26827,13 @@ var CodeBuddySubagents = class {
|
|
|
26720
26827
|
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"));
|
|
26721
26828
|
if (this.#closed || call.observationDone)
|
|
26722
26829
|
continue;
|
|
26723
|
-
const observedModel = snapshot.turns.at(-1)?.model;
|
|
26724
|
-
|
|
26725
|
-
|
|
26830
|
+
const observedModel = snapshot.turns.at(-1)?.model ?? snapshot.state?.effectiveModel;
|
|
26831
|
+
const reasoningEffort = snapshot.state?.effectiveThinkingOptionId;
|
|
26832
|
+
if (observedModel || reasoningEffort)
|
|
26833
|
+
this.#update(call, {
|
|
26834
|
+
...observedModel ? { model: nativeModel(observedModel) } : {},
|
|
26835
|
+
...reasoningEffort ? { reasoningEffort } : {}
|
|
26836
|
+
});
|
|
26726
26837
|
const signature = JSON.stringify(snapshot);
|
|
26727
26838
|
if (signature !== call.signature) {
|
|
26728
26839
|
call.signature = signature;
|
|
@@ -26865,10 +26976,7 @@ var CodeBuddySession = class {
|
|
|
26865
26976
|
contextWindowTokens: update.size,
|
|
26866
26977
|
contextUsagePercent: update.used / update.size * 100
|
|
26867
26978
|
};
|
|
26868
|
-
this.#
|
|
26869
|
-
type: "session.usage.changed",
|
|
26870
|
-
usage: { ...this.#usage, ...this.#context }
|
|
26871
|
-
});
|
|
26979
|
+
this.#emitUsage();
|
|
26872
26980
|
void this.refreshUsage();
|
|
26873
26981
|
}
|
|
26874
26982
|
this.#active?.output.update(update);
|
|
@@ -26938,8 +27046,16 @@ var CodeBuddySession = class {
|
|
|
26938
27046
|
this.initialUsage = this.#usage;
|
|
26939
27047
|
}
|
|
26940
27048
|
#emit(event) {
|
|
27049
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
26941
27050
|
this.#channel.emit({ kind: "event", event });
|
|
26942
27051
|
}
|
|
27052
|
+
#emitUsage() {
|
|
27053
|
+
const usage = { ...this.#usage, ...this.#context };
|
|
27054
|
+
this.#emit({
|
|
27055
|
+
type: "session.usage.changed",
|
|
27056
|
+
usage: Object.keys(usage).length ? usage : null
|
|
27057
|
+
});
|
|
27058
|
+
}
|
|
26943
27059
|
/** Publishes native requests not yet metered; the first read also declares completeness. */
|
|
26944
27060
|
#meterHistory(history, historical) {
|
|
26945
27061
|
const { requests, complete } = historyUsageRequests(history, historical);
|
|
@@ -26953,6 +27069,10 @@ var CodeBuddySession = class {
|
|
|
26953
27069
|
this.#emit({ type: "usage.history", complete });
|
|
26954
27070
|
}
|
|
26955
27071
|
#apply(config2, emit = true) {
|
|
27072
|
+
if (this.#state.effectiveModel && this.#state.effectiveModel.id !== config2.state.effectiveModel?.id) {
|
|
27073
|
+
this.#context = {};
|
|
27074
|
+
this.#emitUsage();
|
|
27075
|
+
}
|
|
26956
27076
|
this.#config = config2;
|
|
26957
27077
|
if (this.#ref && record3(this.#ref.locator).codebuddyDerived === 1)
|
|
26958
27078
|
this.#ref = nativeSessionRefSchema.parse({
|
|
@@ -27012,13 +27132,25 @@ var CodeBuddySession = class {
|
|
|
27012
27132
|
return;
|
|
27013
27133
|
this.#usage = historyUsage(history);
|
|
27014
27134
|
this.#meterHistory(history, false);
|
|
27015
|
-
this.#
|
|
27135
|
+
this.#emitUsage();
|
|
27016
27136
|
} catch {
|
|
27017
27137
|
} finally {
|
|
27018
27138
|
this.#refreshingUsage = false;
|
|
27019
27139
|
}
|
|
27020
27140
|
}
|
|
27141
|
+
#subagentConfiguration() {
|
|
27142
|
+
const state = this.#state;
|
|
27143
|
+
const model2 = state.effectiveModel ? nativeModel(state.effectiveModel) : void 0;
|
|
27144
|
+
return {
|
|
27145
|
+
...model2 ? { model: model2 } : {},
|
|
27146
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
27147
|
+
};
|
|
27148
|
+
}
|
|
27021
27149
|
async readSnapshot() {
|
|
27150
|
+
const result = await this.#readSnapshot();
|
|
27151
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
27152
|
+
}
|
|
27153
|
+
async #readSnapshot() {
|
|
27022
27154
|
if (this.#closed || this.#fault)
|
|
27023
27155
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
27024
27156
|
if (this.#busy || this.#active)
|
|
@@ -27145,7 +27277,7 @@ var CodeBuddySession = class {
|
|
|
27145
27277
|
...added[0]?.checkpoint ? { checkpoint: added[0].checkpoint } : {}
|
|
27146
27278
|
}, nativeTurnRef);
|
|
27147
27279
|
if (this.#usage)
|
|
27148
|
-
this.#
|
|
27280
|
+
this.#emitUsage();
|
|
27149
27281
|
} catch (error51) {
|
|
27150
27282
|
if (!active.done)
|
|
27151
27283
|
this.#finish(active, { status: "failed", error: nativeError(error51, this.profile) });
|
|
@@ -15708,6 +15708,10 @@ var CLIENT_CHANNEL_VERSION = 1;
|
|
|
15708
15708
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15709
15709
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15710
15710
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15711
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15712
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15713
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15714
|
+
}).strict();
|
|
15711
15715
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15712
15716
|
prompt: external_exports.string().max(16384).optional()
|
|
15713
15717
|
}).strict();
|
|
@@ -15724,6 +15728,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15724
15728
|
sequence: external_exports.number().int().nonnegative()
|
|
15725
15729
|
});
|
|
15726
15730
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15731
|
+
external_exports.object({
|
|
15732
|
+
type: external_exports.literal("skills-changed"),
|
|
15733
|
+
cursor: clientChannelCursorSchema,
|
|
15734
|
+
cwd: external_exports.string().optional()
|
|
15735
|
+
}),
|
|
15727
15736
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15728
15737
|
external_exports.object({
|
|
15729
15738
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15921,6 +15930,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15921
15930
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15922
15931
|
]);
|
|
15923
15932
|
|
|
15933
|
+
// ../../shared-contracts/dist/skills.js
|
|
15934
|
+
var skillsListParamsSchema = external_exports.object({
|
|
15935
|
+
threadId: hostThreadIdSchema.optional(),
|
|
15936
|
+
cwd: external_exports.string().min(1).optional()
|
|
15937
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
15938
|
+
message: "Specify threadId or cwd, not both"
|
|
15939
|
+
});
|
|
15940
|
+
var librarySkillSchema = external_exports.object({
|
|
15941
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
15942
|
+
description: external_exports.string().optional(),
|
|
15943
|
+
path: external_exports.string().min(1),
|
|
15944
|
+
scope: external_exports.enum(["project", "global"]),
|
|
15945
|
+
source: external_exports.string().min(1)
|
|
15946
|
+
}).strict();
|
|
15947
|
+
var skillsListResultSchema = external_exports.object({
|
|
15948
|
+
revision: external_exports.number().int().nonnegative(),
|
|
15949
|
+
complete: external_exports.boolean(),
|
|
15950
|
+
skills: external_exports.array(librarySkillSchema),
|
|
15951
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
15952
|
+
}).strict();
|
|
15953
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
15954
|
+
|
|
15924
15955
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15925
15956
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15926
15957
|
/**
|
|
@@ -16026,8 +16057,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
16026
16057
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
16027
16058
|
threadId: external_exports.string().min(1).max(1024),
|
|
16028
16059
|
view: external_exports.enum(["result", "messages"]),
|
|
16029
|
-
|
|
16030
|
-
|
|
16060
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
16061
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
16031
16062
|
});
|
|
16032
16063
|
|
|
16033
16064
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -17029,6 +17060,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
17029
17060
|
status: updateStatusSchema.nullable()
|
|
17030
17061
|
});
|
|
17031
17062
|
|
|
17063
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
17064
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
17065
|
+
"completed",
|
|
17066
|
+
"failed",
|
|
17067
|
+
"interrupted",
|
|
17068
|
+
"timedOut",
|
|
17069
|
+
"unreadable",
|
|
17070
|
+
"notFound"
|
|
17071
|
+
];
|
|
17072
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
17073
|
+
|
|
17032
17074
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
17033
17075
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
17034
17076
|
"idle",
|
|
@@ -17076,6 +17118,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
17076
17118
|
archived: external_exports.boolean()
|
|
17077
17119
|
}),
|
|
17078
17120
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
17121
|
+
external_exports.strictObject({
|
|
17122
|
+
kind: external_exports.literal("configure"),
|
|
17123
|
+
...thread,
|
|
17124
|
+
epoch: identity,
|
|
17125
|
+
modelId: identity.optional(),
|
|
17126
|
+
thinkingOptionId: identity.optional(),
|
|
17127
|
+
permissionModeId: identity.optional()
|
|
17128
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
17079
17129
|
external_exports.strictObject({
|
|
17080
17130
|
kind: external_exports.literal("prompt"),
|
|
17081
17131
|
...thread,
|
|
@@ -17148,6 +17198,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
17148
17198
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
17149
17199
|
]);
|
|
17150
17200
|
|
|
17201
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
17202
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
17203
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
17204
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
17205
|
+
});
|
|
17206
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
17207
|
+
|
|
17151
17208
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
17152
17209
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
17153
17210
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17529,6 +17586,60 @@ function parseHostUsageRequest(value) {
|
|
|
17529
17586
|
return { ...request };
|
|
17530
17587
|
}
|
|
17531
17588
|
|
|
17589
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17590
|
+
function subagentConfiguration(value) {
|
|
17591
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17592
|
+
return {};
|
|
17593
|
+
const row = value;
|
|
17594
|
+
const text2 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17595
|
+
const model2 = row.model === "inherit" ? void 0 : text2(row.model);
|
|
17596
|
+
const reasoningEffort = text2(row.reasoningEffort) ?? text2(row.reasoning_effort) ?? text2(row.thinking);
|
|
17597
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17598
|
+
}
|
|
17599
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17600
|
+
const native = subagentConfiguration(child);
|
|
17601
|
+
const model2 = native.model ?? parent.model;
|
|
17602
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17603
|
+
const next = { ...child };
|
|
17604
|
+
delete next.model;
|
|
17605
|
+
delete next.reasoningEffort;
|
|
17606
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17607
|
+
}
|
|
17608
|
+
function configureSubagentEvent(event, parent) {
|
|
17609
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17610
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17611
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17612
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17613
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17614
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17615
|
+
return {
|
|
17616
|
+
...event,
|
|
17617
|
+
snapshot: {
|
|
17618
|
+
...event.snapshot,
|
|
17619
|
+
item: {
|
|
17620
|
+
...event.snapshot.item,
|
|
17621
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17622
|
+
}
|
|
17623
|
+
}
|
|
17624
|
+
};
|
|
17625
|
+
return event;
|
|
17626
|
+
}
|
|
17627
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17628
|
+
return {
|
|
17629
|
+
...snapshot,
|
|
17630
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17631
|
+
...turn,
|
|
17632
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17633
|
+
...entry,
|
|
17634
|
+
item: {
|
|
17635
|
+
...entry.item,
|
|
17636
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17637
|
+
}
|
|
17638
|
+
} : entry)
|
|
17639
|
+
}))
|
|
17640
|
+
};
|
|
17641
|
+
}
|
|
17642
|
+
|
|
17532
17643
|
// dist/usage.js
|
|
17533
17644
|
function requestTokens(id, model2, value) {
|
|
17534
17645
|
const tokens = record2(value), cache = record2(tokens.cache);
|
|
@@ -19452,9 +19563,6 @@ function createZcodeVerifier(options) {
|
|
|
19452
19563
|
};
|
|
19453
19564
|
}
|
|
19454
19565
|
|
|
19455
|
-
// dist/session.js
|
|
19456
|
-
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
19457
|
-
|
|
19458
19566
|
// dist/models.js
|
|
19459
19567
|
var ZCODE_ID = harnessIdSchema.parse("zcode");
|
|
19460
19568
|
function encodeModel(model2) {
|
|
@@ -19575,6 +19683,9 @@ function sessionUsage(snapshot, catalog) {
|
|
|
19575
19683
|
return Object.keys(usage).length > 0 ? parseHostUsage(usage) : null;
|
|
19576
19684
|
}
|
|
19577
19685
|
|
|
19686
|
+
// dist/session.js
|
|
19687
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
19688
|
+
|
|
19578
19689
|
// ../../../node_modules/diff/libesm/diff/base.js
|
|
19579
19690
|
var Diff = class {
|
|
19580
19691
|
diff(oldStr, newStr, options = {}) {
|
|
@@ -20050,6 +20161,9 @@ function subagent(value, input, fallback) {
|
|
|
20050
20161
|
nativeSubagentId: id,
|
|
20051
20162
|
description: text(args.description) || text(args.prompt) || fallback,
|
|
20052
20163
|
...text(args.subagent_type) || text(args.agentType) ? { role: text(args.subagent_type) || text(args.agentType) } : {},
|
|
20164
|
+
...subagentConfiguration(args),
|
|
20165
|
+
...subagentConfiguration(data),
|
|
20166
|
+
...subagentConfiguration(result),
|
|
20053
20167
|
background: args.run_in_background === true || result.background === true || data.background === true,
|
|
20054
20168
|
status: ["running", "waiting", "blocked"].includes(status) ? "running" : status === "cancelled" ? "interrupted" : ["failed", "lost"].includes(status) || result.success === false ? "failed" : "completed",
|
|
20055
20169
|
...text(result.output) ? { resultSummary: text(result.output).slice(0, OUTPUT_LIMIT) } : {}
|
|
@@ -20786,6 +20900,7 @@ var ZcodeSession = class {
|
|
|
20786
20900
|
return Boolean(this.#active || this.#configuring || this.#goalControl || this.isLocked());
|
|
20787
20901
|
}
|
|
20788
20902
|
#emit(event) {
|
|
20903
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
20789
20904
|
this.#channel.emit({ kind: "event", event });
|
|
20790
20905
|
}
|
|
20791
20906
|
async subscribe() {
|
|
@@ -20880,7 +20995,19 @@ var ZcodeSession = class {
|
|
|
20880
20995
|
} catch {
|
|
20881
20996
|
}
|
|
20882
20997
|
}
|
|
20998
|
+
#subagentConfiguration() {
|
|
20999
|
+
const state = this.#state;
|
|
21000
|
+
const model2 = state.effectiveModel ? decodeModel(state.effectiveModel).modelId : void 0;
|
|
21001
|
+
return {
|
|
21002
|
+
...model2 ? { model: model2 } : {},
|
|
21003
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
21004
|
+
};
|
|
21005
|
+
}
|
|
20883
21006
|
async readSnapshot() {
|
|
21007
|
+
const result = await this.#readSnapshot();
|
|
21008
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
21009
|
+
}
|
|
21010
|
+
async #readSnapshot() {
|
|
20884
21011
|
if (this.#closed || this.#faulted)
|
|
20885
21012
|
return failure("invalidState", "ZCode session is closed");
|
|
20886
21013
|
if (this.busy)
|