@karlorz/codexhost-cli-win32-x64 0.18.0-0 → 0.19.0-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 +317 -59
- package/app/console-web.js +1889 -141
- package/app/cpa-live-voice-hook.js +1938 -428
- package/app/desktop-controller.mjs +2081 -212
- package/app/host-runtime.mjs +14818 -3381
- package/app/overlay-voice-bootstrap.js +1616 -0
- package/app/plugins/antigravity/plugin.mjs +963 -324
- package/app/plugins/claude-code/plugin.mjs +395 -67
- package/app/plugins/codebuddy/plugin.mjs +409 -76
- package/app/plugins/codex-usage/plugin.mjs +316 -58
- package/app/plugins/copilot/plugin.mjs +316 -58
- package/app/plugins/cursor-cli/plugin.mjs +391 -68
- package/app/plugins/deepseek-harness/manifest.json +2 -2
- package/app/plugins/deepseek-harness/plugin.mjs +343 -63
- package/app/plugins/devin/plugin.mjs +316 -58
- package/app/plugins/grok/plugin.mjs +1350 -1026
- package/app/plugins/hermes/plugin.mjs +395 -70
- package/app/plugins/kimi-code/plugin.mjs +316 -58
- package/app/plugins/kiro-cli/plugin.mjs +544 -74
- package/app/plugins/omp/plugin.mjs +1264 -902
- package/app/plugins/opencode/plugin.mjs +316 -58
- package/app/plugins/pi/plugin.mjs +1189 -862
- package/app/plugins/qoder/plugin.mjs +318 -62
- package/app/plugins/qoder-cn/plugin.mjs +318 -62
- package/app/plugins/qwen-code/plugin.mjs +425 -150
- package/app/plugins/workbuddy/plugin.mjs +409 -76
- package/app/plugins/zcode/plugin.mjs +389 -61
- package/app/renderer-extension.js +11830 -8531
- package/app/voice-profile-pins.json +25 -0
- package/app/voice-qualification.json +4 -0
- package/app/web/assets/index-BCyiiDDL.js +199 -0
- package/app/web/assets/index-BNQIOOHE.css +1 -0
- package/app/web/codexhost-settings.js +1895 -190
- 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 +69 -69
- package/app/web/plugins/deepseek-ai__dsh-client-file-upload/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +129 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +65 -63
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +95 -93
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.excel.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +79 -79
- 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 +3279 -1676
- 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-Bs17Kuah.js +0 -199
- package/app/web/assets/index-C3lniEH1.css +0 -1
|
@@ -14552,7 +14552,7 @@ var harnessGoalSetSchema = external_exports.object({
|
|
|
14552
14552
|
origin: goalOriginSchema
|
|
14553
14553
|
});
|
|
14554
14554
|
|
|
14555
|
-
// ../../shared-contracts/dist/realtime-call.js
|
|
14555
|
+
// ../../shared-contracts/dist/realtime-call-core.js
|
|
14556
14556
|
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
14557
14557
|
"openai-alpha",
|
|
14558
14558
|
"thread-id",
|
|
@@ -14561,7 +14561,9 @@ var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
|
14561
14561
|
"x-codex-turn-metadata"
|
|
14562
14562
|
];
|
|
14563
14563
|
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
14564
|
-
var REALTIME_CALL_ID_PATTERN = /^
|
|
14564
|
+
var REALTIME_CALL_ID_PATTERN = /^[A-Za-z0-9_-]{1,128}$/u;
|
|
14565
|
+
|
|
14566
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
14565
14567
|
var requestId = external_exports.string().min(1).max(128);
|
|
14566
14568
|
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
14567
14569
|
external_exports.object({
|
|
@@ -14616,12 +14618,6 @@ var RELAY_PUBLIC_ORIGIN = "https://codexhost.karldigi.dev";
|
|
|
14616
14618
|
var RELAY_PUBLIC_RESOURCE = `${RELAY_PUBLIC_ORIGIN}/mcp`;
|
|
14617
14619
|
var RELAY_WAIT_TIMEOUT_MAX_MS = 25e3;
|
|
14618
14620
|
var RELAY_MAX_BODY_BYTES = 2 * 1024 * 1024;
|
|
14619
|
-
var RELAY_ALLOWED_ROUTES = [
|
|
14620
|
-
"/v1/enroll/status",
|
|
14621
|
-
"/v1/thread/read",
|
|
14622
|
-
"/v1/thread/wait",
|
|
14623
|
-
"/v1/thread/send"
|
|
14624
|
-
];
|
|
14625
14621
|
var relayLinkHelloSchema = external_exports.strictObject({
|
|
14626
14622
|
v: external_exports.literal(RELAY_LINK_PROTOCOL_VERSION),
|
|
14627
14623
|
secret: external_exports.string().min(1).max(4096)
|
|
@@ -14633,8 +14629,11 @@ var relayLinkHelloAckSchema = external_exports.strictObject({
|
|
|
14633
14629
|
var relayLinkRequestSchema = external_exports.strictObject({
|
|
14634
14630
|
requestId: external_exports.string().min(1).max(128),
|
|
14635
14631
|
deadlineMs: external_exports.number().int().positive(),
|
|
14636
|
-
route: external_exports.
|
|
14637
|
-
body: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
14632
|
+
route: external_exports.string().min(1).max(128),
|
|
14633
|
+
body: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
14634
|
+
operationalClient: external_exports.string().min(1).max(64).optional(),
|
|
14635
|
+
oauthClientId: external_exports.string().min(1).max(128).optional(),
|
|
14636
|
+
dispatchGrant: external_exports.enum(["legacy-four", "full-dispatch"]).optional()
|
|
14638
14637
|
});
|
|
14639
14638
|
var relayLinkErrorSchema = external_exports.strictObject({
|
|
14640
14639
|
code: external_exports.string().min(1).max(64),
|
|
@@ -14678,6 +14677,204 @@ var relayEnrollStatusResultSchema = external_exports.strictObject({
|
|
|
14678
14677
|
runtime: external_exports.enum(["reachable", "unreachable"])
|
|
14679
14678
|
});
|
|
14680
14679
|
|
|
14680
|
+
// ../../shared-contracts/dist/external-clients.js
|
|
14681
|
+
var EXTERNAL_CLIENT_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/u;
|
|
14682
|
+
var externalClientNameSchema = external_exports.string().trim().min(1).max(64).regex(EXTERNAL_CLIENT_NAME_PATTERN);
|
|
14683
|
+
var externalClientAccessSchema = external_exports.enum(["all-threads", "selected-workspaces"]);
|
|
14684
|
+
var externalClientConnectionModeSchema = external_exports.enum(["public-relay", "local", "direct"]);
|
|
14685
|
+
var externalClientDispatchGrantSchema = external_exports.enum(["legacy-four", "full-dispatch"]);
|
|
14686
|
+
var workspacePathSchema = external_exports.string().trim().min(1).max(4096);
|
|
14687
|
+
var directUrlSchema = external_exports.string().trim().max(2048);
|
|
14688
|
+
var externalClientPublicViewSchema = external_exports.strictObject({
|
|
14689
|
+
name: externalClientNameSchema,
|
|
14690
|
+
createdAt: external_exports.string().min(1).max(64),
|
|
14691
|
+
access: externalClientAccessSchema,
|
|
14692
|
+
workspaces: external_exports.array(workspacePathSchema).max(64),
|
|
14693
|
+
connectionMode: externalClientConnectionModeSchema,
|
|
14694
|
+
dispatchGrant: externalClientDispatchGrantSchema,
|
|
14695
|
+
oauthClientId: external_exports.string().trim().min(1).max(128).optional(),
|
|
14696
|
+
directUrl: directUrlSchema.optional(),
|
|
14697
|
+
mcpUrl: external_exports.string().min(1).max(2048).optional(),
|
|
14698
|
+
mcpUrlNote: external_exports.string().min(1).max(512).optional()
|
|
14699
|
+
});
|
|
14700
|
+
var externalClientListParamsSchema = external_exports.strictObject({});
|
|
14701
|
+
var externalClientListResultSchema = external_exports.strictObject({
|
|
14702
|
+
clients: external_exports.array(externalClientPublicViewSchema).max(256)
|
|
14703
|
+
});
|
|
14704
|
+
var externalClientWriteFieldsSchema = external_exports.strictObject({
|
|
14705
|
+
access: externalClientAccessSchema.optional(),
|
|
14706
|
+
workspaces: external_exports.array(workspacePathSchema).max(64).optional(),
|
|
14707
|
+
connectionMode: externalClientConnectionModeSchema.optional(),
|
|
14708
|
+
dispatchGrant: externalClientDispatchGrantSchema.optional(),
|
|
14709
|
+
oauthClientId: external_exports.string().trim().min(1).max(128).optional(),
|
|
14710
|
+
directUrl: directUrlSchema.optional()
|
|
14711
|
+
});
|
|
14712
|
+
var externalClientCreateParamsSchema = externalClientWriteFieldsSchema.extend({
|
|
14713
|
+
name: externalClientNameSchema
|
|
14714
|
+
});
|
|
14715
|
+
var externalClientCreateResultSchema = externalClientPublicViewSchema.extend({
|
|
14716
|
+
token: external_exports.string().min(1).max(256).optional()
|
|
14717
|
+
});
|
|
14718
|
+
var externalClientUpdateParamsSchema = externalClientWriteFieldsSchema.extend({
|
|
14719
|
+
name: externalClientNameSchema,
|
|
14720
|
+
clearOauthClientId: external_exports.literal(true).optional()
|
|
14721
|
+
});
|
|
14722
|
+
var externalClientRevokeParamsSchema = external_exports.strictObject({
|
|
14723
|
+
name: externalClientNameSchema
|
|
14724
|
+
});
|
|
14725
|
+
var externalClientRevokeResultSchema = external_exports.strictObject({
|
|
14726
|
+
name: externalClientNameSchema,
|
|
14727
|
+
revoked: external_exports.literal(true)
|
|
14728
|
+
});
|
|
14729
|
+
var stringProp = (description) => ({ type: "string", description });
|
|
14730
|
+
var integerProp = (description) => ({
|
|
14731
|
+
type: "integer",
|
|
14732
|
+
minimum: 0,
|
|
14733
|
+
description
|
|
14734
|
+
});
|
|
14735
|
+
var threadProp = stringProp("Thread id or codex://threads/<id> link");
|
|
14736
|
+
var EXTERNAL_MCP_TOOL_DESCRIPTORS = [
|
|
14737
|
+
{
|
|
14738
|
+
name: "harness_list",
|
|
14739
|
+
description: "List the Harnesses this codexhost can delegate to.",
|
|
14740
|
+
inputSchema: { type: "object", properties: {} }
|
|
14741
|
+
},
|
|
14742
|
+
{
|
|
14743
|
+
name: "harness_inspect",
|
|
14744
|
+
description: "Read a Harness's Models, Thinking options and defaults; use the returned ids when delegating.",
|
|
14745
|
+
inputSchema: {
|
|
14746
|
+
type: "object",
|
|
14747
|
+
properties: {
|
|
14748
|
+
harnessId: stringProp("Harness id from harness_list"),
|
|
14749
|
+
cwd: stringProp("Absolute workspace path"),
|
|
14750
|
+
refresh: { type: "boolean" }
|
|
14751
|
+
},
|
|
14752
|
+
required: ["harnessId"]
|
|
14753
|
+
}
|
|
14754
|
+
},
|
|
14755
|
+
{
|
|
14756
|
+
name: "delegate_start",
|
|
14757
|
+
description: "Start a task in a new Thread and return at once. Without parentThread the work belongs to this client and cwd is required. watch=true records an event for this client when the Thread stops (read it with events_poll or the SSE stream).",
|
|
14758
|
+
inputSchema: {
|
|
14759
|
+
type: "object",
|
|
14760
|
+
properties: {
|
|
14761
|
+
harnessId: stringProp("Harness id from harness_list"),
|
|
14762
|
+
task: stringProp("The full task text"),
|
|
14763
|
+
taskName: stringProp("Short display name"),
|
|
14764
|
+
cwd: stringProp("Absolute workspace path"),
|
|
14765
|
+
model: stringProp("Model id from harness_inspect"),
|
|
14766
|
+
thinking: stringProp("Thinking option id from harness_inspect"),
|
|
14767
|
+
parentThread: stringProp("Optional parent Thread"),
|
|
14768
|
+
requestId: stringProp("Reuse to retry idempotently"),
|
|
14769
|
+
refs: {
|
|
14770
|
+
type: "array",
|
|
14771
|
+
items: { type: "string" },
|
|
14772
|
+
description: "Absolute URIs of where the work came from"
|
|
14773
|
+
},
|
|
14774
|
+
watch: { type: "boolean", description: "Record an event when the Thread stops" },
|
|
14775
|
+
watchTimeoutMs: integerProp("How long to watch; default 29 minutes")
|
|
14776
|
+
},
|
|
14777
|
+
required: ["harnessId", "task"]
|
|
14778
|
+
}
|
|
14779
|
+
},
|
|
14780
|
+
{
|
|
14781
|
+
name: "thread_read",
|
|
14782
|
+
description: "Read a Thread's status and latest result, or page its visible messages (view=messages). Never changes the Thread.",
|
|
14783
|
+
inputSchema: {
|
|
14784
|
+
type: "object",
|
|
14785
|
+
properties: {
|
|
14786
|
+
thread: threadProp,
|
|
14787
|
+
view: { type: "string", enum: ["result", "messages"] },
|
|
14788
|
+
cursor: stringProp("Message cursor"),
|
|
14789
|
+
limit: integerProp("Messages per page, at most 100")
|
|
14790
|
+
},
|
|
14791
|
+
required: ["thread"]
|
|
14792
|
+
}
|
|
14793
|
+
},
|
|
14794
|
+
{
|
|
14795
|
+
name: "thread_wait",
|
|
14796
|
+
description: "Wait up to timeoutMs (at most 60000) for a Thread to stop, then return the same snapshot as thread_read plus timedOut.",
|
|
14797
|
+
inputSchema: {
|
|
14798
|
+
type: "object",
|
|
14799
|
+
properties: {
|
|
14800
|
+
thread: threadProp,
|
|
14801
|
+
timeoutMs: integerProp("At most 60000; default 30000"),
|
|
14802
|
+
view: { type: "string", enum: ["result", "messages"] }
|
|
14803
|
+
},
|
|
14804
|
+
required: ["thread"]
|
|
14805
|
+
}
|
|
14806
|
+
},
|
|
14807
|
+
{
|
|
14808
|
+
name: "thread_list",
|
|
14809
|
+
description: "List Threads: by workspace (cwd), by parent Thread, by the client that started them, or by reference.",
|
|
14810
|
+
inputSchema: {
|
|
14811
|
+
type: "object",
|
|
14812
|
+
properties: {
|
|
14813
|
+
cwd: stringProp("Absolute workspace path"),
|
|
14814
|
+
parent: stringProp("Parent Thread"),
|
|
14815
|
+
client: stringProp("Client name"),
|
|
14816
|
+
ref: stringProp("Reference URI"),
|
|
14817
|
+
limit: integerProp("At most 100; default 25"),
|
|
14818
|
+
cursor: stringProp("Cursor from a previous page"),
|
|
14819
|
+
sort: {
|
|
14820
|
+
type: "string",
|
|
14821
|
+
enum: [
|
|
14822
|
+
"created-asc",
|
|
14823
|
+
"created-desc",
|
|
14824
|
+
"updated-asc",
|
|
14825
|
+
"updated-desc",
|
|
14826
|
+
"recency-asc",
|
|
14827
|
+
"recency-desc"
|
|
14828
|
+
]
|
|
14829
|
+
}
|
|
14830
|
+
}
|
|
14831
|
+
}
|
|
14832
|
+
},
|
|
14833
|
+
{
|
|
14834
|
+
name: "thread_send",
|
|
14835
|
+
description: "Start a new Turn in an idle Thread. THREAD_BUSY means its current Turn is still running; messages are not queued.",
|
|
14836
|
+
inputSchema: {
|
|
14837
|
+
type: "object",
|
|
14838
|
+
properties: { thread: threadProp, message: stringProp("Message text") },
|
|
14839
|
+
required: ["thread", "message"]
|
|
14840
|
+
}
|
|
14841
|
+
},
|
|
14842
|
+
{
|
|
14843
|
+
name: "thread_cancel",
|
|
14844
|
+
description: "Cancel a Thread's active Turn, keeping the Thread and its history.",
|
|
14845
|
+
inputSchema: { type: "object", properties: { thread: threadProp }, required: ["thread"] }
|
|
14846
|
+
},
|
|
14847
|
+
{
|
|
14848
|
+
name: "thread_watch",
|
|
14849
|
+
description: "Record one event for this client when the Thread stops or the watch expires.",
|
|
14850
|
+
inputSchema: {
|
|
14851
|
+
type: "object",
|
|
14852
|
+
properties: { thread: threadProp, timeoutMs: integerProp("Default 29 minutes") },
|
|
14853
|
+
required: ["thread"]
|
|
14854
|
+
}
|
|
14855
|
+
},
|
|
14856
|
+
{
|
|
14857
|
+
name: "thread_watches",
|
|
14858
|
+
description: "List watches that have not been delivered yet.",
|
|
14859
|
+
inputSchema: { type: "object", properties: {} }
|
|
14860
|
+
},
|
|
14861
|
+
{
|
|
14862
|
+
name: "events_poll",
|
|
14863
|
+
description: "Read this client's events after a cursor (0 for all retained). Waits up to timeoutMs (at most 60000) for the first one. Pass the returned cursor back next time. CURSOR_EXPIRED: reconcile with thread_list client=<this client>.",
|
|
14864
|
+
inputSchema: {
|
|
14865
|
+
type: "object",
|
|
14866
|
+
properties: {
|
|
14867
|
+
after: integerProp("Cursor; 0 for all retained"),
|
|
14868
|
+
timeoutMs: integerProp("At most 60000; default 0"),
|
|
14869
|
+
limit: integerProp("At most 100")
|
|
14870
|
+
}
|
|
14871
|
+
}
|
|
14872
|
+
}
|
|
14873
|
+
];
|
|
14874
|
+
|
|
14875
|
+
// ../../shared-contracts/dist/external-mcp-map.js
|
|
14876
|
+
var DEFAULT_WATCH_MS = 29 * 6e4;
|
|
14877
|
+
|
|
14681
14878
|
// ../../shared-contracts/dist/grok-computer-use.js
|
|
14682
14879
|
var grokComputerUseGetSchema = external_exports.object({}).strict();
|
|
14683
14880
|
var grokComputerUseSetSchema = external_exports.object({
|
|
@@ -15274,11 +15471,61 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15274
15471
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15275
15472
|
}).strict();
|
|
15276
15473
|
|
|
15474
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
15475
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
15476
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
15477
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
15478
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
15479
|
+
});
|
|
15480
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
15481
|
+
chatExperience: "chatgpt",
|
|
15482
|
+
chatConnection: "desktop",
|
|
15483
|
+
workConnection: "gateway"
|
|
15484
|
+
});
|
|
15485
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
15486
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
15487
|
+
external_exports.strictObject({
|
|
15488
|
+
operation: external_exports.literal("get"),
|
|
15489
|
+
runtime: external_exports.strictObject({
|
|
15490
|
+
id: external_exports.string().uuid(),
|
|
15491
|
+
revision: external_exports.string().max(64),
|
|
15492
|
+
activeCall: external_exports.boolean()
|
|
15493
|
+
}).optional()
|
|
15494
|
+
}),
|
|
15495
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
15496
|
+
external_exports.strictObject({
|
|
15497
|
+
operation: external_exports.literal("set"),
|
|
15498
|
+
settings: voiceSettingsSchema,
|
|
15499
|
+
revision: external_exports.string().max(64)
|
|
15500
|
+
}),
|
|
15501
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
15502
|
+
]);
|
|
15503
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
15504
|
+
settings: voiceSettingsSchema,
|
|
15505
|
+
initialized: external_exports.boolean(),
|
|
15506
|
+
revision: external_exports.string(),
|
|
15507
|
+
activeInject: external_exports.boolean().nullable(),
|
|
15508
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15509
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15510
|
+
routesActive: external_exports.boolean().nullable(),
|
|
15511
|
+
activeCall: external_exports.boolean().nullable(),
|
|
15512
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
15513
|
+
restartAvailable: external_exports.boolean(),
|
|
15514
|
+
restart: external_exports.strictObject({
|
|
15515
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
15516
|
+
error: external_exports.string().nullable()
|
|
15517
|
+
})
|
|
15518
|
+
});
|
|
15519
|
+
|
|
15277
15520
|
// ../../shared-contracts/dist/client-channel.js
|
|
15278
15521
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15279
15522
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15280
15523
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15281
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();
|
|
15282
15529
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15283
15530
|
prompt: external_exports.string().max(16384).optional()
|
|
15284
15531
|
}).strict();
|
|
@@ -15295,6 +15542,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15295
15542
|
sequence: external_exports.number().int().nonnegative()
|
|
15296
15543
|
});
|
|
15297
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
|
+
}),
|
|
15298
15550
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15299
15551
|
external_exports.object({
|
|
15300
15552
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15492,6 +15744,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15492
15744
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15493
15745
|
]);
|
|
15494
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
|
+
|
|
15495
15769
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15496
15770
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15497
15771
|
/**
|
|
@@ -15597,8 +15871,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15597
15871
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15598
15872
|
threadId: external_exports.string().min(1).max(1024),
|
|
15599
15873
|
view: external_exports.enum(["result", "messages"]),
|
|
15600
|
-
|
|
15601
|
-
|
|
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()
|
|
15602
15876
|
});
|
|
15603
15877
|
|
|
15604
15878
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16050,6 +16324,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
16050
16324
|
"codexhost/voice/gateway-status",
|
|
16051
16325
|
"codexhost/enrollment/list",
|
|
16052
16326
|
"codexhost/enrollment/revoke",
|
|
16327
|
+
"codexhost/external-clients/list",
|
|
16328
|
+
"codexhost/external-clients/create",
|
|
16329
|
+
"codexhost/external-clients/update",
|
|
16330
|
+
"codexhost/external-clients/revoke",
|
|
16053
16331
|
"codexhost/console/remote-connections",
|
|
16054
16332
|
"codexhost/runtime/status",
|
|
16055
16333
|
"codexhost/remote/ssh-setup",
|
|
@@ -16596,6 +16874,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16596
16874
|
status: updateStatusSchema.nullable()
|
|
16597
16875
|
});
|
|
16598
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
|
+
|
|
16599
16888
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16600
16889
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16601
16890
|
"idle",
|
|
@@ -16643,6 +16932,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16643
16932
|
archived: external_exports.boolean()
|
|
16644
16933
|
}),
|
|
16645
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"),
|
|
16646
16943
|
external_exports.strictObject({
|
|
16647
16944
|
kind: external_exports.literal("prompt"),
|
|
16648
16945
|
...thread,
|
|
@@ -16715,6 +17012,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
16715
17012
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
16716
17013
|
]);
|
|
16717
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
|
+
|
|
16718
17022
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
16719
17023
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
16720
17024
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -16755,52 +17059,6 @@ var webUiExtensionInstallSchema = external_exports.object({
|
|
|
16755
17059
|
var webUiExtensionEnabledSchema = external_exports.object({ id: webUiExtensionIdSchema, enabled: external_exports.boolean() }).strict();
|
|
16756
17060
|
var webUiExtensionRemoveSchema = external_exports.object({ id: webUiExtensionIdSchema }).strict();
|
|
16757
17061
|
|
|
16758
|
-
// ../../shared-contracts/dist/voice-settings.js
|
|
16759
|
-
var voiceRoutesSchema = external_exports.strictObject({
|
|
16760
|
-
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
16761
|
-
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
16762
|
-
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
16763
|
-
});
|
|
16764
|
-
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
16765
|
-
chatExperience: "chatgpt",
|
|
16766
|
-
chatConnection: "desktop",
|
|
16767
|
-
workConnection: "gateway"
|
|
16768
|
-
});
|
|
16769
|
-
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
16770
|
-
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
16771
|
-
external_exports.strictObject({
|
|
16772
|
-
operation: external_exports.literal("get"),
|
|
16773
|
-
runtime: external_exports.strictObject({
|
|
16774
|
-
id: external_exports.string().uuid(),
|
|
16775
|
-
revision: external_exports.string().max(64),
|
|
16776
|
-
activeCall: external_exports.boolean()
|
|
16777
|
-
}).optional()
|
|
16778
|
-
}),
|
|
16779
|
-
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
16780
|
-
external_exports.strictObject({
|
|
16781
|
-
operation: external_exports.literal("set"),
|
|
16782
|
-
settings: voiceSettingsSchema,
|
|
16783
|
-
revision: external_exports.string().max(64)
|
|
16784
|
-
}),
|
|
16785
|
-
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
16786
|
-
]);
|
|
16787
|
-
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
16788
|
-
settings: voiceSettingsSchema,
|
|
16789
|
-
initialized: external_exports.boolean(),
|
|
16790
|
-
revision: external_exports.string(),
|
|
16791
|
-
activeInject: external_exports.boolean().nullable(),
|
|
16792
|
-
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16793
|
-
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
16794
|
-
routesActive: external_exports.boolean().nullable(),
|
|
16795
|
-
activeCall: external_exports.boolean().nullable(),
|
|
16796
|
-
gatewayReady: external_exports.boolean().nullable(),
|
|
16797
|
-
restartAvailable: external_exports.boolean(),
|
|
16798
|
-
restart: external_exports.strictObject({
|
|
16799
|
-
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
16800
|
-
error: external_exports.string().nullable()
|
|
16801
|
-
})
|
|
16802
|
-
});
|
|
16803
|
-
|
|
16804
17062
|
// ../../shared-contracts/dist/background-activity.js
|
|
16805
17063
|
var backgroundActivitySchema = external_exports.strictObject({
|
|
16806
17064
|
id: external_exports.string().min(1),
|
|
@@ -17224,17 +17482,69 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17224
17482
|
"reload-plugins"
|
|
17225
17483
|
]);
|
|
17226
17484
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17227
|
-
function isExcludedLiveCommand(name,
|
|
17485
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17228
17486
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17229
17487
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17230
17488
|
return true;
|
|
17231
17489
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17232
17490
|
return true;
|
|
17233
|
-
if (kind === "skill")
|
|
17234
|
-
return false;
|
|
17235
17491
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17236
17492
|
}
|
|
17237
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
|
+
|
|
17238
17548
|
// ../../harness-broker/dist/protocol.js
|
|
17239
17549
|
var HARNESS_BROKER_PROTOCOL_VERSION = 1;
|
|
17240
17550
|
var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
|
|
@@ -19212,8 +19522,7 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
19212
19522
|
return {
|
|
19213
19523
|
commands: rows(value).flatMap((entry) => {
|
|
19214
19524
|
const name = text(entry.name).replace(/^\//u, "");
|
|
19215
|
-
|
|
19216
|
-
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))
|
|
19217
19526
|
return [];
|
|
19218
19527
|
const parsed = harnessCommandCatalogSchema.safeParse({
|
|
19219
19528
|
commands: [
|
|
@@ -19221,14 +19530,13 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
19221
19530
|
id: `${profile.harnessId}.${name}`,
|
|
19222
19531
|
invocation: `/${name}`,
|
|
19223
19532
|
label: name,
|
|
19224
|
-
...name === "compact"
|
|
19533
|
+
...name === "compact" ? {
|
|
19225
19534
|
localizations: {
|
|
19226
19535
|
"zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" }
|
|
19227
19536
|
}
|
|
19228
19537
|
} : {},
|
|
19229
19538
|
...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
|
|
19230
|
-
argumentMode: name === "compact" || record3(entry.input).hint
|
|
19231
|
-
...record3(entry._meta).type === "skill" ? { kind: "skill" } : {}
|
|
19539
|
+
argumentMode: name === "compact" || record3(entry.input).hint ? "text" : "none"
|
|
19232
19540
|
}
|
|
19233
19541
|
]
|
|
19234
19542
|
});
|
|
@@ -19513,7 +19821,7 @@ function codeBuddyDelegation(callId, input, status, childId, displayName = "Code
|
|
|
19513
19821
|
...nativeId ? { nativeSubagentId: nativeId } : {},
|
|
19514
19822
|
description: text(args.description) || `${displayName} Subagent`,
|
|
19515
19823
|
...text(args.subagent_type) ? { role: text(args.subagent_type) } : {},
|
|
19516
|
-
...
|
|
19824
|
+
...subagentConfiguration(args),
|
|
19517
19825
|
background: args.run_in_background === true,
|
|
19518
19826
|
status
|
|
19519
19827
|
}
|
|
@@ -26519,9 +26827,13 @@ var CodeBuddySubagents = class {
|
|
|
26519
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"));
|
|
26520
26828
|
if (this.#closed || call.observationDone)
|
|
26521
26829
|
continue;
|
|
26522
|
-
const observedModel = snapshot.turns.at(-1)?.model;
|
|
26523
|
-
|
|
26524
|
-
|
|
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
|
+
});
|
|
26525
26837
|
const signature = JSON.stringify(snapshot);
|
|
26526
26838
|
if (signature !== call.signature) {
|
|
26527
26839
|
call.signature = signature;
|
|
@@ -26664,10 +26976,7 @@ var CodeBuddySession = class {
|
|
|
26664
26976
|
contextWindowTokens: update.size,
|
|
26665
26977
|
contextUsagePercent: update.used / update.size * 100
|
|
26666
26978
|
};
|
|
26667
|
-
this.#
|
|
26668
|
-
type: "session.usage.changed",
|
|
26669
|
-
usage: { ...this.#usage, ...this.#context }
|
|
26670
|
-
});
|
|
26979
|
+
this.#emitUsage();
|
|
26671
26980
|
void this.refreshUsage();
|
|
26672
26981
|
}
|
|
26673
26982
|
this.#active?.output.update(update);
|
|
@@ -26737,8 +27046,16 @@ var CodeBuddySession = class {
|
|
|
26737
27046
|
this.initialUsage = this.#usage;
|
|
26738
27047
|
}
|
|
26739
27048
|
#emit(event) {
|
|
27049
|
+
event = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
26740
27050
|
this.#channel.emit({ kind: "event", event });
|
|
26741
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
|
+
}
|
|
26742
27059
|
/** Publishes native requests not yet metered; the first read also declares completeness. */
|
|
26743
27060
|
#meterHistory(history, historical) {
|
|
26744
27061
|
const { requests, complete } = historyUsageRequests(history, historical);
|
|
@@ -26752,6 +27069,10 @@ var CodeBuddySession = class {
|
|
|
26752
27069
|
this.#emit({ type: "usage.history", complete });
|
|
26753
27070
|
}
|
|
26754
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
|
+
}
|
|
26755
27076
|
this.#config = config2;
|
|
26756
27077
|
if (this.#ref && record3(this.#ref.locator).codebuddyDerived === 1)
|
|
26757
27078
|
this.#ref = nativeSessionRefSchema.parse({
|
|
@@ -26811,13 +27132,25 @@ var CodeBuddySession = class {
|
|
|
26811
27132
|
return;
|
|
26812
27133
|
this.#usage = historyUsage(history);
|
|
26813
27134
|
this.#meterHistory(history, false);
|
|
26814
|
-
this.#
|
|
27135
|
+
this.#emitUsage();
|
|
26815
27136
|
} catch {
|
|
26816
27137
|
} finally {
|
|
26817
27138
|
this.#refreshingUsage = false;
|
|
26818
27139
|
}
|
|
26819
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
|
+
}
|
|
26820
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() {
|
|
26821
27154
|
if (this.#closed || this.#fault)
|
|
26822
27155
|
return failure("invalidState", "Session is closed or faulted", this.profile);
|
|
26823
27156
|
if (this.#busy || this.#active)
|
|
@@ -26944,7 +27277,7 @@ var CodeBuddySession = class {
|
|
|
26944
27277
|
...added[0]?.checkpoint ? { checkpoint: added[0].checkpoint } : {}
|
|
26945
27278
|
}, nativeTurnRef);
|
|
26946
27279
|
if (this.#usage)
|
|
26947
|
-
this.#
|
|
27280
|
+
this.#emitUsage();
|
|
26948
27281
|
} catch (error51) {
|
|
26949
27282
|
if (!active.done)
|
|
26950
27283
|
this.#finish(active, { status: "failed", error: nativeError(error51, this.profile) });
|