@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
|
@@ -347,10 +347,6 @@ function createHarnessInstaller(environment, source) {
|
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
// dist/kiro-adapter.js
|
|
351
|
-
import { randomUUID } from "node:crypto";
|
|
352
|
-
import path8 from "node:path";
|
|
353
|
-
|
|
354
350
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
355
351
|
var external_exports = {};
|
|
356
352
|
__export(external_exports, {
|
|
@@ -14892,7 +14888,7 @@ var harnessGoalSetSchema = external_exports.object({
|
|
|
14892
14888
|
origin: goalOriginSchema
|
|
14893
14889
|
});
|
|
14894
14890
|
|
|
14895
|
-
// ../../shared-contracts/dist/realtime-call.js
|
|
14891
|
+
// ../../shared-contracts/dist/realtime-call-core.js
|
|
14896
14892
|
var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
14897
14893
|
"openai-alpha",
|
|
14898
14894
|
"thread-id",
|
|
@@ -14901,7 +14897,9 @@ var REALTIME_CALL_FORWARDED_HEADERS = [
|
|
|
14901
14897
|
"x-codex-turn-metadata"
|
|
14902
14898
|
];
|
|
14903
14899
|
var FORWARDED_HEADERS = new Set(REALTIME_CALL_FORWARDED_HEADERS);
|
|
14904
|
-
var REALTIME_CALL_ID_PATTERN = /^
|
|
14900
|
+
var REALTIME_CALL_ID_PATTERN = /^[A-Za-z0-9_-]{1,128}$/u;
|
|
14901
|
+
|
|
14902
|
+
// ../../shared-contracts/dist/realtime-call.js
|
|
14905
14903
|
var requestId = external_exports.string().min(1).max(128);
|
|
14906
14904
|
var realtimeCallParamsSchema = external_exports.discriminatedUnion("operation", [
|
|
14907
14905
|
external_exports.object({
|
|
@@ -14956,12 +14954,6 @@ var RELAY_PUBLIC_ORIGIN = "https://codexhost.karldigi.dev";
|
|
|
14956
14954
|
var RELAY_PUBLIC_RESOURCE = `${RELAY_PUBLIC_ORIGIN}/mcp`;
|
|
14957
14955
|
var RELAY_WAIT_TIMEOUT_MAX_MS = 25e3;
|
|
14958
14956
|
var RELAY_MAX_BODY_BYTES = 2 * 1024 * 1024;
|
|
14959
|
-
var RELAY_ALLOWED_ROUTES = [
|
|
14960
|
-
"/v1/enroll/status",
|
|
14961
|
-
"/v1/thread/read",
|
|
14962
|
-
"/v1/thread/wait",
|
|
14963
|
-
"/v1/thread/send"
|
|
14964
|
-
];
|
|
14965
14957
|
var relayLinkHelloSchema = external_exports.strictObject({
|
|
14966
14958
|
v: external_exports.literal(RELAY_LINK_PROTOCOL_VERSION),
|
|
14967
14959
|
secret: external_exports.string().min(1).max(4096)
|
|
@@ -14973,8 +14965,11 @@ var relayLinkHelloAckSchema = external_exports.strictObject({
|
|
|
14973
14965
|
var relayLinkRequestSchema = external_exports.strictObject({
|
|
14974
14966
|
requestId: external_exports.string().min(1).max(128),
|
|
14975
14967
|
deadlineMs: external_exports.number().int().positive(),
|
|
14976
|
-
route: external_exports.
|
|
14977
|
-
body: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
14968
|
+
route: external_exports.string().min(1).max(128),
|
|
14969
|
+
body: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
14970
|
+
operationalClient: external_exports.string().min(1).max(64).optional(),
|
|
14971
|
+
oauthClientId: external_exports.string().min(1).max(128).optional(),
|
|
14972
|
+
dispatchGrant: external_exports.enum(["legacy-four", "full-dispatch"]).optional()
|
|
14978
14973
|
});
|
|
14979
14974
|
var relayLinkErrorSchema = external_exports.strictObject({
|
|
14980
14975
|
code: external_exports.string().min(1).max(64),
|
|
@@ -15018,6 +15013,204 @@ var relayEnrollStatusResultSchema = external_exports.strictObject({
|
|
|
15018
15013
|
runtime: external_exports.enum(["reachable", "unreachable"])
|
|
15019
15014
|
});
|
|
15020
15015
|
|
|
15016
|
+
// ../../shared-contracts/dist/external-clients.js
|
|
15017
|
+
var EXTERNAL_CLIENT_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/u;
|
|
15018
|
+
var externalClientNameSchema = external_exports.string().trim().min(1).max(64).regex(EXTERNAL_CLIENT_NAME_PATTERN);
|
|
15019
|
+
var externalClientAccessSchema = external_exports.enum(["all-threads", "selected-workspaces"]);
|
|
15020
|
+
var externalClientConnectionModeSchema = external_exports.enum(["public-relay", "local", "direct"]);
|
|
15021
|
+
var externalClientDispatchGrantSchema = external_exports.enum(["legacy-four", "full-dispatch"]);
|
|
15022
|
+
var workspacePathSchema = external_exports.string().trim().min(1).max(4096);
|
|
15023
|
+
var directUrlSchema = external_exports.string().trim().max(2048);
|
|
15024
|
+
var externalClientPublicViewSchema = external_exports.strictObject({
|
|
15025
|
+
name: externalClientNameSchema,
|
|
15026
|
+
createdAt: external_exports.string().min(1).max(64),
|
|
15027
|
+
access: externalClientAccessSchema,
|
|
15028
|
+
workspaces: external_exports.array(workspacePathSchema).max(64),
|
|
15029
|
+
connectionMode: externalClientConnectionModeSchema,
|
|
15030
|
+
dispatchGrant: externalClientDispatchGrantSchema,
|
|
15031
|
+
oauthClientId: external_exports.string().trim().min(1).max(128).optional(),
|
|
15032
|
+
directUrl: directUrlSchema.optional(),
|
|
15033
|
+
mcpUrl: external_exports.string().min(1).max(2048).optional(),
|
|
15034
|
+
mcpUrlNote: external_exports.string().min(1).max(512).optional()
|
|
15035
|
+
});
|
|
15036
|
+
var externalClientListParamsSchema = external_exports.strictObject({});
|
|
15037
|
+
var externalClientListResultSchema = external_exports.strictObject({
|
|
15038
|
+
clients: external_exports.array(externalClientPublicViewSchema).max(256)
|
|
15039
|
+
});
|
|
15040
|
+
var externalClientWriteFieldsSchema = external_exports.strictObject({
|
|
15041
|
+
access: externalClientAccessSchema.optional(),
|
|
15042
|
+
workspaces: external_exports.array(workspacePathSchema).max(64).optional(),
|
|
15043
|
+
connectionMode: externalClientConnectionModeSchema.optional(),
|
|
15044
|
+
dispatchGrant: externalClientDispatchGrantSchema.optional(),
|
|
15045
|
+
oauthClientId: external_exports.string().trim().min(1).max(128).optional(),
|
|
15046
|
+
directUrl: directUrlSchema.optional()
|
|
15047
|
+
});
|
|
15048
|
+
var externalClientCreateParamsSchema = externalClientWriteFieldsSchema.extend({
|
|
15049
|
+
name: externalClientNameSchema
|
|
15050
|
+
});
|
|
15051
|
+
var externalClientCreateResultSchema = externalClientPublicViewSchema.extend({
|
|
15052
|
+
token: external_exports.string().min(1).max(256).optional()
|
|
15053
|
+
});
|
|
15054
|
+
var externalClientUpdateParamsSchema = externalClientWriteFieldsSchema.extend({
|
|
15055
|
+
name: externalClientNameSchema,
|
|
15056
|
+
clearOauthClientId: external_exports.literal(true).optional()
|
|
15057
|
+
});
|
|
15058
|
+
var externalClientRevokeParamsSchema = external_exports.strictObject({
|
|
15059
|
+
name: externalClientNameSchema
|
|
15060
|
+
});
|
|
15061
|
+
var externalClientRevokeResultSchema = external_exports.strictObject({
|
|
15062
|
+
name: externalClientNameSchema,
|
|
15063
|
+
revoked: external_exports.literal(true)
|
|
15064
|
+
});
|
|
15065
|
+
var stringProp = (description) => ({ type: "string", description });
|
|
15066
|
+
var integerProp = (description) => ({
|
|
15067
|
+
type: "integer",
|
|
15068
|
+
minimum: 0,
|
|
15069
|
+
description
|
|
15070
|
+
});
|
|
15071
|
+
var threadProp = stringProp("Thread id or codex://threads/<id> link");
|
|
15072
|
+
var EXTERNAL_MCP_TOOL_DESCRIPTORS = [
|
|
15073
|
+
{
|
|
15074
|
+
name: "harness_list",
|
|
15075
|
+
description: "List the Harnesses this codexhost can delegate to.",
|
|
15076
|
+
inputSchema: { type: "object", properties: {} }
|
|
15077
|
+
},
|
|
15078
|
+
{
|
|
15079
|
+
name: "harness_inspect",
|
|
15080
|
+
description: "Read a Harness's Models, Thinking options and defaults; use the returned ids when delegating.",
|
|
15081
|
+
inputSchema: {
|
|
15082
|
+
type: "object",
|
|
15083
|
+
properties: {
|
|
15084
|
+
harnessId: stringProp("Harness id from harness_list"),
|
|
15085
|
+
cwd: stringProp("Absolute workspace path"),
|
|
15086
|
+
refresh: { type: "boolean" }
|
|
15087
|
+
},
|
|
15088
|
+
required: ["harnessId"]
|
|
15089
|
+
}
|
|
15090
|
+
},
|
|
15091
|
+
{
|
|
15092
|
+
name: "delegate_start",
|
|
15093
|
+
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).",
|
|
15094
|
+
inputSchema: {
|
|
15095
|
+
type: "object",
|
|
15096
|
+
properties: {
|
|
15097
|
+
harnessId: stringProp("Harness id from harness_list"),
|
|
15098
|
+
task: stringProp("The full task text"),
|
|
15099
|
+
taskName: stringProp("Short display name"),
|
|
15100
|
+
cwd: stringProp("Absolute workspace path"),
|
|
15101
|
+
model: stringProp("Model id from harness_inspect"),
|
|
15102
|
+
thinking: stringProp("Thinking option id from harness_inspect"),
|
|
15103
|
+
parentThread: stringProp("Optional parent Thread"),
|
|
15104
|
+
requestId: stringProp("Reuse to retry idempotently"),
|
|
15105
|
+
refs: {
|
|
15106
|
+
type: "array",
|
|
15107
|
+
items: { type: "string" },
|
|
15108
|
+
description: "Absolute URIs of where the work came from"
|
|
15109
|
+
},
|
|
15110
|
+
watch: { type: "boolean", description: "Record an event when the Thread stops" },
|
|
15111
|
+
watchTimeoutMs: integerProp("How long to watch; default 29 minutes")
|
|
15112
|
+
},
|
|
15113
|
+
required: ["harnessId", "task"]
|
|
15114
|
+
}
|
|
15115
|
+
},
|
|
15116
|
+
{
|
|
15117
|
+
name: "thread_read",
|
|
15118
|
+
description: "Read a Thread's status and latest result, or page its visible messages (view=messages). Never changes the Thread.",
|
|
15119
|
+
inputSchema: {
|
|
15120
|
+
type: "object",
|
|
15121
|
+
properties: {
|
|
15122
|
+
thread: threadProp,
|
|
15123
|
+
view: { type: "string", enum: ["result", "messages"] },
|
|
15124
|
+
cursor: stringProp("Message cursor"),
|
|
15125
|
+
limit: integerProp("Messages per page, at most 100")
|
|
15126
|
+
},
|
|
15127
|
+
required: ["thread"]
|
|
15128
|
+
}
|
|
15129
|
+
},
|
|
15130
|
+
{
|
|
15131
|
+
name: "thread_wait",
|
|
15132
|
+
description: "Wait up to timeoutMs (at most 60000) for a Thread to stop, then return the same snapshot as thread_read plus timedOut.",
|
|
15133
|
+
inputSchema: {
|
|
15134
|
+
type: "object",
|
|
15135
|
+
properties: {
|
|
15136
|
+
thread: threadProp,
|
|
15137
|
+
timeoutMs: integerProp("At most 60000; default 30000"),
|
|
15138
|
+
view: { type: "string", enum: ["result", "messages"] }
|
|
15139
|
+
},
|
|
15140
|
+
required: ["thread"]
|
|
15141
|
+
}
|
|
15142
|
+
},
|
|
15143
|
+
{
|
|
15144
|
+
name: "thread_list",
|
|
15145
|
+
description: "List Threads: by workspace (cwd), by parent Thread, by the client that started them, or by reference.",
|
|
15146
|
+
inputSchema: {
|
|
15147
|
+
type: "object",
|
|
15148
|
+
properties: {
|
|
15149
|
+
cwd: stringProp("Absolute workspace path"),
|
|
15150
|
+
parent: stringProp("Parent Thread"),
|
|
15151
|
+
client: stringProp("Client name"),
|
|
15152
|
+
ref: stringProp("Reference URI"),
|
|
15153
|
+
limit: integerProp("At most 100; default 25"),
|
|
15154
|
+
cursor: stringProp("Cursor from a previous page"),
|
|
15155
|
+
sort: {
|
|
15156
|
+
type: "string",
|
|
15157
|
+
enum: [
|
|
15158
|
+
"created-asc",
|
|
15159
|
+
"created-desc",
|
|
15160
|
+
"updated-asc",
|
|
15161
|
+
"updated-desc",
|
|
15162
|
+
"recency-asc",
|
|
15163
|
+
"recency-desc"
|
|
15164
|
+
]
|
|
15165
|
+
}
|
|
15166
|
+
}
|
|
15167
|
+
}
|
|
15168
|
+
},
|
|
15169
|
+
{
|
|
15170
|
+
name: "thread_send",
|
|
15171
|
+
description: "Start a new Turn in an idle Thread. THREAD_BUSY means its current Turn is still running; messages are not queued.",
|
|
15172
|
+
inputSchema: {
|
|
15173
|
+
type: "object",
|
|
15174
|
+
properties: { thread: threadProp, message: stringProp("Message text") },
|
|
15175
|
+
required: ["thread", "message"]
|
|
15176
|
+
}
|
|
15177
|
+
},
|
|
15178
|
+
{
|
|
15179
|
+
name: "thread_cancel",
|
|
15180
|
+
description: "Cancel a Thread's active Turn, keeping the Thread and its history.",
|
|
15181
|
+
inputSchema: { type: "object", properties: { thread: threadProp }, required: ["thread"] }
|
|
15182
|
+
},
|
|
15183
|
+
{
|
|
15184
|
+
name: "thread_watch",
|
|
15185
|
+
description: "Record one event for this client when the Thread stops or the watch expires.",
|
|
15186
|
+
inputSchema: {
|
|
15187
|
+
type: "object",
|
|
15188
|
+
properties: { thread: threadProp, timeoutMs: integerProp("Default 29 minutes") },
|
|
15189
|
+
required: ["thread"]
|
|
15190
|
+
}
|
|
15191
|
+
},
|
|
15192
|
+
{
|
|
15193
|
+
name: "thread_watches",
|
|
15194
|
+
description: "List watches that have not been delivered yet.",
|
|
15195
|
+
inputSchema: { type: "object", properties: {} }
|
|
15196
|
+
},
|
|
15197
|
+
{
|
|
15198
|
+
name: "events_poll",
|
|
15199
|
+
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>.",
|
|
15200
|
+
inputSchema: {
|
|
15201
|
+
type: "object",
|
|
15202
|
+
properties: {
|
|
15203
|
+
after: integerProp("Cursor; 0 for all retained"),
|
|
15204
|
+
timeoutMs: integerProp("At most 60000; default 0"),
|
|
15205
|
+
limit: integerProp("At most 100")
|
|
15206
|
+
}
|
|
15207
|
+
}
|
|
15208
|
+
}
|
|
15209
|
+
];
|
|
15210
|
+
|
|
15211
|
+
// ../../shared-contracts/dist/external-mcp-map.js
|
|
15212
|
+
var DEFAULT_WATCH_MS = 29 * 6e4;
|
|
15213
|
+
|
|
15021
15214
|
// ../../shared-contracts/dist/grok-computer-use.js
|
|
15022
15215
|
var grokComputerUseGetSchema = external_exports.object({}).strict();
|
|
15023
15216
|
var grokComputerUseSetSchema = external_exports.object({
|
|
@@ -15614,11 +15807,61 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15614
15807
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15615
15808
|
}).strict();
|
|
15616
15809
|
|
|
15810
|
+
// ../../shared-contracts/dist/voice-settings.js
|
|
15811
|
+
var voiceRoutesSchema = external_exports.strictObject({
|
|
15812
|
+
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
15813
|
+
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
15814
|
+
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
15815
|
+
});
|
|
15816
|
+
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
15817
|
+
chatExperience: "chatgpt",
|
|
15818
|
+
chatConnection: "desktop",
|
|
15819
|
+
workConnection: "gateway"
|
|
15820
|
+
});
|
|
15821
|
+
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
15822
|
+
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
15823
|
+
external_exports.strictObject({
|
|
15824
|
+
operation: external_exports.literal("get"),
|
|
15825
|
+
runtime: external_exports.strictObject({
|
|
15826
|
+
id: external_exports.string().uuid(),
|
|
15827
|
+
revision: external_exports.string().max(64),
|
|
15828
|
+
activeCall: external_exports.boolean()
|
|
15829
|
+
}).optional()
|
|
15830
|
+
}),
|
|
15831
|
+
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
15832
|
+
external_exports.strictObject({
|
|
15833
|
+
operation: external_exports.literal("set"),
|
|
15834
|
+
settings: voiceSettingsSchema,
|
|
15835
|
+
revision: external_exports.string().max(64)
|
|
15836
|
+
}),
|
|
15837
|
+
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
15838
|
+
]);
|
|
15839
|
+
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
15840
|
+
settings: voiceSettingsSchema,
|
|
15841
|
+
initialized: external_exports.boolean(),
|
|
15842
|
+
revision: external_exports.string(),
|
|
15843
|
+
activeInject: external_exports.boolean().nullable(),
|
|
15844
|
+
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15845
|
+
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
15846
|
+
routesActive: external_exports.boolean().nullable(),
|
|
15847
|
+
activeCall: external_exports.boolean().nullable(),
|
|
15848
|
+
gatewayReady: external_exports.boolean().nullable(),
|
|
15849
|
+
restartAvailable: external_exports.boolean(),
|
|
15850
|
+
restart: external_exports.strictObject({
|
|
15851
|
+
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
15852
|
+
error: external_exports.string().nullable()
|
|
15853
|
+
})
|
|
15854
|
+
});
|
|
15855
|
+
|
|
15617
15856
|
// ../../shared-contracts/dist/client-channel.js
|
|
15618
15857
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15619
15858
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
15620
15859
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15621
15860
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15861
|
+
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
15862
|
+
var clientThreadTreeSchema = external_exports.object({
|
|
15863
|
+
parents: external_exports.record(external_exports.string().min(1), external_exports.string().min(1))
|
|
15864
|
+
}).strict();
|
|
15622
15865
|
var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
15623
15866
|
prompt: external_exports.string().max(16384).optional()
|
|
15624
15867
|
}).strict();
|
|
@@ -15635,6 +15878,11 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
15635
15878
|
sequence: external_exports.number().int().nonnegative()
|
|
15636
15879
|
});
|
|
15637
15880
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
15881
|
+
external_exports.object({
|
|
15882
|
+
type: external_exports.literal("skills-changed"),
|
|
15883
|
+
cursor: clientChannelCursorSchema,
|
|
15884
|
+
cwd: external_exports.string().optional()
|
|
15885
|
+
}),
|
|
15638
15886
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15639
15887
|
external_exports.object({
|
|
15640
15888
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15832,6 +16080,28 @@ var voiceTranscribeResultSchema = external_exports.discriminatedUnion("ok", [
|
|
|
15832
16080
|
external_exports.object({ ok: external_exports.literal(false), error: external_exports.object({ code: voiceErrorCodeSchema }).strict() }).strict()
|
|
15833
16081
|
]);
|
|
15834
16082
|
|
|
16083
|
+
// ../../shared-contracts/dist/skills.js
|
|
16084
|
+
var skillsListParamsSchema = external_exports.object({
|
|
16085
|
+
threadId: hostThreadIdSchema.optional(),
|
|
16086
|
+
cwd: external_exports.string().min(1).optional()
|
|
16087
|
+
}).strict().refine((params) => !(params.threadId && params.cwd), {
|
|
16088
|
+
message: "Specify threadId or cwd, not both"
|
|
16089
|
+
});
|
|
16090
|
+
var librarySkillSchema = external_exports.object({
|
|
16091
|
+
name: external_exports.string().min(1).regex(/^[^\s[\]]+$/u),
|
|
16092
|
+
description: external_exports.string().optional(),
|
|
16093
|
+
path: external_exports.string().min(1),
|
|
16094
|
+
scope: external_exports.enum(["project", "global"]),
|
|
16095
|
+
source: external_exports.string().min(1)
|
|
16096
|
+
}).strict();
|
|
16097
|
+
var skillsListResultSchema = external_exports.object({
|
|
16098
|
+
revision: external_exports.number().int().nonnegative(),
|
|
16099
|
+
complete: external_exports.boolean(),
|
|
16100
|
+
skills: external_exports.array(librarySkillSchema),
|
|
16101
|
+
warnings: external_exports.array(external_exports.string()).optional()
|
|
16102
|
+
}).strict();
|
|
16103
|
+
var skillsChangedParamsSchema = external_exports.object({ cwd: external_exports.string().min(1).optional() }).strict();
|
|
16104
|
+
|
|
15835
16105
|
// ../../shared-contracts/dist/web-access-tokens.js
|
|
15836
16106
|
var webNetworkAccessUrlSchema = external_exports.object({
|
|
15837
16107
|
/**
|
|
@@ -15937,8 +16207,8 @@ var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
15937
16207
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
15938
16208
|
threadId: external_exports.string().min(1).max(1024),
|
|
15939
16209
|
view: external_exports.enum(["result", "messages"]),
|
|
15940
|
-
|
|
15941
|
-
|
|
16210
|
+
from: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
16211
|
+
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
15942
16212
|
});
|
|
15943
16213
|
|
|
15944
16214
|
// ../../shared-contracts/dist/credential-imports.js
|
|
@@ -16390,6 +16660,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
16390
16660
|
"codexhost/voice/gateway-status",
|
|
16391
16661
|
"codexhost/enrollment/list",
|
|
16392
16662
|
"codexhost/enrollment/revoke",
|
|
16663
|
+
"codexhost/external-clients/list",
|
|
16664
|
+
"codexhost/external-clients/create",
|
|
16665
|
+
"codexhost/external-clients/update",
|
|
16666
|
+
"codexhost/external-clients/revoke",
|
|
16393
16667
|
"codexhost/console/remote-connections",
|
|
16394
16668
|
"codexhost/runtime/status",
|
|
16395
16669
|
"codexhost/remote/ssh-setup",
|
|
@@ -16936,6 +17210,17 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
16936
17210
|
status: updateStatusSchema.nullable()
|
|
16937
17211
|
});
|
|
16938
17212
|
|
|
17213
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
17214
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
17215
|
+
"completed",
|
|
17216
|
+
"failed",
|
|
17217
|
+
"interrupted",
|
|
17218
|
+
"timedOut",
|
|
17219
|
+
"unreadable",
|
|
17220
|
+
"notFound"
|
|
17221
|
+
];
|
|
17222
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
17223
|
+
|
|
16939
17224
|
// ../../shared-contracts/dist/remote-runtime.js
|
|
16940
17225
|
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
16941
17226
|
"idle",
|
|
@@ -16983,6 +17268,14 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
16983
17268
|
archived: external_exports.boolean()
|
|
16984
17269
|
}),
|
|
16985
17270
|
external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
|
|
17271
|
+
external_exports.strictObject({
|
|
17272
|
+
kind: external_exports.literal("configure"),
|
|
17273
|
+
...thread,
|
|
17274
|
+
epoch: identity,
|
|
17275
|
+
modelId: identity.optional(),
|
|
17276
|
+
thinkingOptionId: identity.optional(),
|
|
17277
|
+
permissionModeId: identity.optional()
|
|
17278
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting"),
|
|
16986
17279
|
external_exports.strictObject({
|
|
16987
17280
|
kind: external_exports.literal("prompt"),
|
|
16988
17281
|
...thread,
|
|
@@ -17055,6 +17348,13 @@ var remoteConnectionsReplySchema = external_exports.union([
|
|
|
17055
17348
|
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
17056
17349
|
]);
|
|
17057
17350
|
|
|
17351
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
17352
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
17353
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
17354
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
17355
|
+
});
|
|
17356
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
17357
|
+
|
|
17058
17358
|
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
17059
17359
|
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
17060
17360
|
var localizedTextSchema2 = external_exports.union([
|
|
@@ -17095,52 +17395,6 @@ var webUiExtensionInstallSchema = external_exports.object({
|
|
|
17095
17395
|
var webUiExtensionEnabledSchema = external_exports.object({ id: webUiExtensionIdSchema, enabled: external_exports.boolean() }).strict();
|
|
17096
17396
|
var webUiExtensionRemoveSchema = external_exports.object({ id: webUiExtensionIdSchema }).strict();
|
|
17097
17397
|
|
|
17098
|
-
// ../../shared-contracts/dist/voice-settings.js
|
|
17099
|
-
var voiceRoutesSchema = external_exports.strictObject({
|
|
17100
|
-
chatExperience: external_exports.enum(["chatgpt", "codex"]),
|
|
17101
|
-
chatConnection: external_exports.enum(["desktop", "gateway"]),
|
|
17102
|
-
workConnection: external_exports.enum(["desktop", "gateway"])
|
|
17103
|
-
});
|
|
17104
|
-
var DEFAULT_VOICE_ROUTES = Object.freeze({
|
|
17105
|
-
chatExperience: "chatgpt",
|
|
17106
|
-
chatConnection: "desktop",
|
|
17107
|
-
workConnection: "gateway"
|
|
17108
|
-
});
|
|
17109
|
-
var voiceSettingsSchema = voiceRoutesSchema.extend({ inject: external_exports.boolean() });
|
|
17110
|
-
var voiceSettingsRequestSchema = external_exports.discriminatedUnion("operation", [
|
|
17111
|
-
external_exports.strictObject({
|
|
17112
|
-
operation: external_exports.literal("get"),
|
|
17113
|
-
runtime: external_exports.strictObject({
|
|
17114
|
-
id: external_exports.string().uuid(),
|
|
17115
|
-
revision: external_exports.string().max(64),
|
|
17116
|
-
activeCall: external_exports.boolean()
|
|
17117
|
-
}).optional()
|
|
17118
|
-
}),
|
|
17119
|
-
external_exports.strictObject({ operation: external_exports.literal("migrate"), routes: voiceRoutesSchema }),
|
|
17120
|
-
external_exports.strictObject({
|
|
17121
|
-
operation: external_exports.literal("set"),
|
|
17122
|
-
settings: voiceSettingsSchema,
|
|
17123
|
-
revision: external_exports.string().max(64)
|
|
17124
|
-
}),
|
|
17125
|
-
external_exports.strictObject({ operation: external_exports.literal("restart"), confirm: external_exports.literal(true) })
|
|
17126
|
-
]);
|
|
17127
|
-
var voiceSettingsStateSchema = external_exports.strictObject({
|
|
17128
|
-
settings: voiceSettingsSchema,
|
|
17129
|
-
initialized: external_exports.boolean(),
|
|
17130
|
-
revision: external_exports.string(),
|
|
17131
|
-
activeInject: external_exports.boolean().nullable(),
|
|
17132
|
-
envOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
17133
|
-
activeEnvOverride: external_exports.enum(["0", "1"]).nullable(),
|
|
17134
|
-
routesActive: external_exports.boolean().nullable(),
|
|
17135
|
-
activeCall: external_exports.boolean().nullable(),
|
|
17136
|
-
gatewayReady: external_exports.boolean().nullable(),
|
|
17137
|
-
restartAvailable: external_exports.boolean(),
|
|
17138
|
-
restart: external_exports.strictObject({
|
|
17139
|
-
phase: external_exports.enum(["idle", "restarting", "succeeded", "failed"]),
|
|
17140
|
-
error: external_exports.string().nullable()
|
|
17141
|
-
})
|
|
17142
|
-
});
|
|
17143
|
-
|
|
17144
17398
|
// ../../shared-contracts/dist/background-activity.js
|
|
17145
17399
|
var backgroundActivitySchema = external_exports.strictObject({
|
|
17146
17400
|
id: external_exports.string().min(1),
|
|
@@ -17175,6 +17429,47 @@ var threadActivityStopResultSchema = external_exports.strictObject({
|
|
|
17175
17429
|
// ../../shared-contracts/dist/index.js
|
|
17176
17430
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
17177
17431
|
|
|
17432
|
+
// dist/subagents.js
|
|
17433
|
+
function kiroChildSnapshot(parentId, item, childId) {
|
|
17434
|
+
const child = item.subagents.find((child2) => child2.nativeSubagentId === childId);
|
|
17435
|
+
if (!child)
|
|
17436
|
+
throw new Error("Kiro task does not belong to this parent");
|
|
17437
|
+
return {
|
|
17438
|
+
turns: [
|
|
17439
|
+
{
|
|
17440
|
+
nativeTurnRef: nativeTurnRefSchema.parse({
|
|
17441
|
+
harnessId: "kiro-cli",
|
|
17442
|
+
nativeSessionId: parentId,
|
|
17443
|
+
nativeTurnKey: childId,
|
|
17444
|
+
formatVersion: 1
|
|
17445
|
+
}),
|
|
17446
|
+
input: item.prompt ? [{ type: "text", text: item.prompt }] : [],
|
|
17447
|
+
items: child.resultSummary ? [
|
|
17448
|
+
{
|
|
17449
|
+
item: {
|
|
17450
|
+
type: "agentMessage",
|
|
17451
|
+
itemId: hostItemIdSchema.parse(`kiro-task-result-${childId}`),
|
|
17452
|
+
text: child.resultSummary
|
|
17453
|
+
},
|
|
17454
|
+
outcome: { status: "succeeded" }
|
|
17455
|
+
}
|
|
17456
|
+
] : [],
|
|
17457
|
+
outcome: child.status === "pending" || child.status === "running" ? {
|
|
17458
|
+
status: "unknown",
|
|
17459
|
+
reason: "Kiro ACP exposes task summaries, not the child's internal step stream"
|
|
17460
|
+
} : child.status === "interrupted" ? { status: "cancelled" } : child.status === "failed" ? {
|
|
17461
|
+
status: "failed",
|
|
17462
|
+
error: {
|
|
17463
|
+
code: "nativeFailure",
|
|
17464
|
+
message: child.resultSummary || "Kiro task failed",
|
|
17465
|
+
retryable: false
|
|
17466
|
+
}
|
|
17467
|
+
} : { status: "succeeded" }
|
|
17468
|
+
}
|
|
17469
|
+
]
|
|
17470
|
+
};
|
|
17471
|
+
}
|
|
17472
|
+
|
|
17178
17473
|
// ../../harness-adapter/dist/approval.js
|
|
17179
17474
|
function invalidRequest(message) {
|
|
17180
17475
|
return { code: "invalidRequest", message, retryable: false };
|
|
@@ -17500,14 +17795,12 @@ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
17500
17795
|
"reload-plugins"
|
|
17501
17796
|
]);
|
|
17502
17797
|
var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
|
|
17503
|
-
function isExcludedLiveCommand(name,
|
|
17798
|
+
function isExcludedLiveCommand(name, extra = {}) {
|
|
17504
17799
|
const normalized = name.trim().replace(/^\//u, "");
|
|
17505
17800
|
if (new Set(extra.names ?? []).has(normalized))
|
|
17506
17801
|
return true;
|
|
17507
17802
|
if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
|
|
17508
17803
|
return true;
|
|
17509
|
-
if (kind === "skill")
|
|
17510
|
-
return false;
|
|
17511
17804
|
return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
17512
17805
|
}
|
|
17513
17806
|
function liveHarnessCommandPrompt(catalog, idPrefix, commandId, argumentText) {
|
|
@@ -17529,7 +17822,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17529
17822
|
const name = command.name.trim().replace(/^\//u, "");
|
|
17530
17823
|
if (!name || /\s/u.test(name))
|
|
17531
17824
|
continue;
|
|
17532
|
-
if (isExcludedLiveCommand(name,
|
|
17825
|
+
if (isExcludedLiveCommand(name, exclusions))
|
|
17533
17826
|
continue;
|
|
17534
17827
|
const invocation = `/${name}`;
|
|
17535
17828
|
const id = `${idPrefix}${name.replace(/[^A-Za-z0-9._:-]/gu, "-")}`.slice(0, 128);
|
|
@@ -17541,8 +17834,7 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17541
17834
|
invocation,
|
|
17542
17835
|
label: name.slice(0, 128),
|
|
17543
17836
|
...description ? { description } : {},
|
|
17544
|
-
argumentMode: "text"
|
|
17545
|
-
kind: command.kind
|
|
17837
|
+
argumentMode: "text"
|
|
17546
17838
|
});
|
|
17547
17839
|
if (!parsed.success)
|
|
17548
17840
|
continue;
|
|
@@ -17553,6 +17845,64 @@ function mergeLiveHarnessCommands(builtIns, idPrefix, live, exclusions = {}) {
|
|
|
17553
17845
|
return harnessCommandCatalogSchema.parse({ commands: [...builtIns.commands, ...dynamic] });
|
|
17554
17846
|
}
|
|
17555
17847
|
|
|
17848
|
+
// ../../harness-adapter/dist/subagent-configuration.js
|
|
17849
|
+
function subagentConfiguration(value) {
|
|
17850
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17851
|
+
return {};
|
|
17852
|
+
const row = value;
|
|
17853
|
+
const text = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17854
|
+
const model2 = row.model === "inherit" ? void 0 : text(row.model);
|
|
17855
|
+
const reasoningEffort = text(row.reasoningEffort) ?? text(row.reasoning_effort) ?? text(row.thinking);
|
|
17856
|
+
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17857
|
+
}
|
|
17858
|
+
function inheritSubagentConfiguration(child, parent) {
|
|
17859
|
+
const native = subagentConfiguration(child);
|
|
17860
|
+
const model2 = native.model ?? parent.model;
|
|
17861
|
+
const reasoningEffort = native.reasoningEffort ?? parent.reasoningEffort;
|
|
17862
|
+
const next = { ...child };
|
|
17863
|
+
delete next.model;
|
|
17864
|
+
delete next.reasoningEffort;
|
|
17865
|
+
return { ...next, ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17866
|
+
}
|
|
17867
|
+
function configureSubagentEvent(event, parent) {
|
|
17868
|
+
const children = (states) => states.map((child) => inheritSubagentConfiguration(child, parent));
|
|
17869
|
+
if (event.type === "item.started" && event.item.type === "subagentDelegation")
|
|
17870
|
+
return { ...event, item: { ...event.item, subagents: children(event.item.subagents) } };
|
|
17871
|
+
if (event.type === "item.updated" && event.update.type === "subagents.replace")
|
|
17872
|
+
return { ...event, update: { ...event.update, subagents: children(event.update.subagents) } };
|
|
17873
|
+
if (event.type === "item.completed" && event.snapshot.item.type === "subagentDelegation")
|
|
17874
|
+
return {
|
|
17875
|
+
...event,
|
|
17876
|
+
snapshot: {
|
|
17877
|
+
...event.snapshot,
|
|
17878
|
+
item: {
|
|
17879
|
+
...event.snapshot.item,
|
|
17880
|
+
subagents: children(event.snapshot.item.subagents)
|
|
17881
|
+
}
|
|
17882
|
+
}
|
|
17883
|
+
};
|
|
17884
|
+
return event;
|
|
17885
|
+
}
|
|
17886
|
+
function configureSubagentSnapshot(snapshot, parent) {
|
|
17887
|
+
return {
|
|
17888
|
+
...snapshot,
|
|
17889
|
+
turns: snapshot.turns.map((turn) => ({
|
|
17890
|
+
...turn,
|
|
17891
|
+
items: turn.items.map((entry) => entry.item.type === "subagentDelegation" ? {
|
|
17892
|
+
...entry,
|
|
17893
|
+
item: {
|
|
17894
|
+
...entry.item,
|
|
17895
|
+
subagents: entry.item.subagents.map((child) => inheritSubagentConfiguration(child, parent))
|
|
17896
|
+
}
|
|
17897
|
+
} : entry)
|
|
17898
|
+
}))
|
|
17899
|
+
};
|
|
17900
|
+
}
|
|
17901
|
+
|
|
17902
|
+
// dist/kiro-adapter.js
|
|
17903
|
+
import { randomUUID } from "node:crypto";
|
|
17904
|
+
import path8 from "node:path";
|
|
17905
|
+
|
|
17556
17906
|
// dist/acp-transport.js
|
|
17557
17907
|
import { spawn, spawnSync } from "node:child_process";
|
|
17558
17908
|
import { Readable, Writable } from "node:stream";
|
|
@@ -21746,10 +22096,9 @@ function parseKiroAvailableCommands(value) {
|
|
|
21746
22096
|
});
|
|
21747
22097
|
}
|
|
21748
22098
|
function kiroLiveCommands(native) {
|
|
21749
|
-
return native.map((command) => ({
|
|
22099
|
+
return native.filter((command) => command.type !== "skill").map((command) => ({
|
|
21750
22100
|
name: command.name,
|
|
21751
|
-
description: command.description
|
|
21752
|
-
kind: command.type === "skill" ? "skill" : "command"
|
|
22101
|
+
description: command.description
|
|
21753
22102
|
}));
|
|
21754
22103
|
}
|
|
21755
22104
|
|
|
@@ -23367,9 +23716,12 @@ function projectKiroToolCall(itemId, toolCall) {
|
|
|
23367
23716
|
const input = isRecord8(toolCall.rawInput) ? toolCall.rawInput : {};
|
|
23368
23717
|
const subagentState = {
|
|
23369
23718
|
subagentId: subtaskId,
|
|
23719
|
+
nativeSubagentId: subtaskId,
|
|
23370
23720
|
description: typeof input.prompt === "string" ? input.prompt : "Subagent task",
|
|
23721
|
+
...subagentConfiguration(input),
|
|
23722
|
+
...subagentConfiguration(kiroMeta),
|
|
23371
23723
|
background: false,
|
|
23372
|
-
status: toolCall.status === "completed" ? "completed" : toolCall.status === "failed" ? "failed" : "running",
|
|
23724
|
+
status: toolCall.status === "pending" ? "pending" : toolCall.status === "completed" ? "completed" : toolCall.status === "failed" ? "failed" : "running",
|
|
23373
23725
|
...typeof input.name === "string" ? { role: input.name } : {},
|
|
23374
23726
|
...typeof toolCall.rawOutput === "string" ? { resultSummary: toolCall.rawOutput } : {}
|
|
23375
23727
|
};
|
|
@@ -23377,6 +23729,7 @@ function projectKiroToolCall(itemId, toolCall) {
|
|
|
23377
23729
|
type: "subagentDelegation",
|
|
23378
23730
|
itemId: hostItemId,
|
|
23379
23731
|
operation: "spawn",
|
|
23732
|
+
...typeof input.prompt === "string" ? { prompt: input.prompt } : {},
|
|
23380
23733
|
subagents: [subagentState]
|
|
23381
23734
|
};
|
|
23382
23735
|
return subagentItem;
|
|
@@ -23500,6 +23853,15 @@ var KiroTurnOutput = class {
|
|
|
23500
23853
|
this.emit({ kind: "event", event: { type: "item.started", turnId: this.turnId, item } });
|
|
23501
23854
|
}
|
|
23502
23855
|
#complete(item, outcome) {
|
|
23856
|
+
if (item.type === "subagentDelegation") {
|
|
23857
|
+
item = {
|
|
23858
|
+
...item,
|
|
23859
|
+
subagents: item.subagents.map((child) => ({
|
|
23860
|
+
...child,
|
|
23861
|
+
status: outcome.status === "cancelled" ? "interrupted" : outcome.status === "failed" ? "failed" : child.status
|
|
23862
|
+
}))
|
|
23863
|
+
};
|
|
23864
|
+
}
|
|
23503
23865
|
this.emit({
|
|
23504
23866
|
kind: "event",
|
|
23505
23867
|
event: {
|
|
@@ -23508,6 +23870,26 @@ var KiroTurnOutput = class {
|
|
|
23508
23870
|
snapshot: { item, outcome }
|
|
23509
23871
|
}
|
|
23510
23872
|
});
|
|
23873
|
+
if (item.type === "subagentDelegation") {
|
|
23874
|
+
for (const child of item.subagents)
|
|
23875
|
+
if (child.nativeSubagentId) {
|
|
23876
|
+
this.emit({
|
|
23877
|
+
kind: "event",
|
|
23878
|
+
event: {
|
|
23879
|
+
type: "subagent.state.changed",
|
|
23880
|
+
nativeSubagentId: child.nativeSubagentId,
|
|
23881
|
+
status: child.status
|
|
23882
|
+
}
|
|
23883
|
+
});
|
|
23884
|
+
this.emit({
|
|
23885
|
+
kind: "event",
|
|
23886
|
+
event: {
|
|
23887
|
+
type: "subagent.transcript.changed",
|
|
23888
|
+
nativeSubagentId: child.nativeSubagentId
|
|
23889
|
+
}
|
|
23890
|
+
});
|
|
23891
|
+
}
|
|
23892
|
+
}
|
|
23511
23893
|
}
|
|
23512
23894
|
#completeMessage(outcome, phase) {
|
|
23513
23895
|
this.#appendText(this.#text.finish());
|
|
@@ -23603,6 +23985,17 @@ var KiroTurnOutput = class {
|
|
|
23603
23985
|
const tool = { ...previous, event: merged, item, done };
|
|
23604
23986
|
this.#tools.set(event.callId, tool);
|
|
23605
23987
|
if (!done) {
|
|
23988
|
+
if (previous?.item.type === "subagentDelegation" && item.type === "subagentDelegation" && JSON.stringify(previous.item.subagents) !== JSON.stringify(item.subagents)) {
|
|
23989
|
+
this.emit({
|
|
23990
|
+
kind: "event",
|
|
23991
|
+
event: {
|
|
23992
|
+
type: "item.updated",
|
|
23993
|
+
turnId: this.turnId,
|
|
23994
|
+
itemId: item.itemId,
|
|
23995
|
+
update: { type: "subagents.replace", subagents: item.subagents }
|
|
23996
|
+
}
|
|
23997
|
+
});
|
|
23998
|
+
}
|
|
23606
23999
|
this.#fileOutput(tool, event.content);
|
|
23607
24000
|
return;
|
|
23608
24001
|
}
|
|
@@ -24298,7 +24691,7 @@ var KIRO_SESSION_CAPABILITIES = {
|
|
|
24298
24691
|
},
|
|
24299
24692
|
subagents: {
|
|
24300
24693
|
observe: true,
|
|
24301
|
-
readTranscript:
|
|
24694
|
+
readTranscript: true
|
|
24302
24695
|
},
|
|
24303
24696
|
autonomousTurns: {
|
|
24304
24697
|
observe: false
|
|
@@ -24306,6 +24699,42 @@ var KIRO_SESSION_CAPABILITIES = {
|
|
|
24306
24699
|
};
|
|
24307
24700
|
var KiroAdapter = class {
|
|
24308
24701
|
harnessId = harnessIdSchema.parse("kiro-cli");
|
|
24702
|
+
subagents = {
|
|
24703
|
+
readSnapshot: async ({ parent, nativeSubagentId }) => {
|
|
24704
|
+
try {
|
|
24705
|
+
if (parent.harnessId !== this.harnessId)
|
|
24706
|
+
throw new Error("Invalid Kiro parent");
|
|
24707
|
+
for (const session of this.#sessions) {
|
|
24708
|
+
if (session.initialState.nativeRef?.nativeSessionId !== parent.nativeSessionId)
|
|
24709
|
+
continue;
|
|
24710
|
+
const live = session.subagentSnapshot(nativeSubagentId);
|
|
24711
|
+
if (live)
|
|
24712
|
+
return { ok: true, value: live };
|
|
24713
|
+
}
|
|
24714
|
+
const locate = this.#deps.locateSession ?? locateKiroNativeSession;
|
|
24715
|
+
const location = await locate({ environment: this.#options.environment }, parent.nativeSessionId);
|
|
24716
|
+
if (!location)
|
|
24717
|
+
throw new Error("Kiro parent history was not found");
|
|
24718
|
+
const snapshot = await (this.#deps.readSnapshot ?? readKiroSnapshot)(location);
|
|
24719
|
+
const item = snapshot.turns.flatMap((turn) => turn.items).map(({ item: item2 }) => item2).find((item2) => item2.type === "subagentDelegation" && item2.subagents.some((child) => child.nativeSubagentId === nativeSubagentId));
|
|
24720
|
+
if (!item || item.type !== "subagentDelegation")
|
|
24721
|
+
throw new Error("Kiro task was not found in this parent");
|
|
24722
|
+
return {
|
|
24723
|
+
ok: true,
|
|
24724
|
+
value: kiroChildSnapshot(parent.nativeSessionId, item, nativeSubagentId)
|
|
24725
|
+
};
|
|
24726
|
+
} catch (error51) {
|
|
24727
|
+
return {
|
|
24728
|
+
ok: false,
|
|
24729
|
+
error: {
|
|
24730
|
+
code: "sessionNotFound",
|
|
24731
|
+
message: error51 instanceof Error ? error51.message : "Kiro task could not be read",
|
|
24732
|
+
retryable: false
|
|
24733
|
+
}
|
|
24734
|
+
};
|
|
24735
|
+
}
|
|
24736
|
+
}
|
|
24737
|
+
};
|
|
24309
24738
|
commandCatalog = KIRO_COMMAND_CATALOG;
|
|
24310
24739
|
liveCommandCatalog = true;
|
|
24311
24740
|
sessionImport;
|
|
@@ -24782,7 +25211,45 @@ var KiroSession = class {
|
|
|
24782
25211
|
});
|
|
24783
25212
|
return this.#usageRefresh;
|
|
24784
25213
|
}
|
|
25214
|
+
#subagentItems = /* @__PURE__ */ new Map();
|
|
25215
|
+
subagentSnapshot(id) {
|
|
25216
|
+
const item = this.#subagentItems.get(id);
|
|
25217
|
+
return item ? kiroChildSnapshot(this.#sessionId, item, id) : void 0;
|
|
25218
|
+
}
|
|
25219
|
+
#subagentEvent(event) {
|
|
25220
|
+
const configured = configureSubagentEvent(event, this.#subagentConfiguration());
|
|
25221
|
+
const item = configured.type === "item.started" ? configured.item : configured.type === "item.completed" ? configured.snapshot.item : void 0;
|
|
25222
|
+
if (configured.type === "item.updated" && configured.update.type === "subagents.replace") {
|
|
25223
|
+
for (const previous of this.#subagentItems.values()) {
|
|
25224
|
+
if (previous.itemId !== configured.itemId)
|
|
25225
|
+
continue;
|
|
25226
|
+
const next = { ...previous, subagents: structuredClone(configured.update.subagents) };
|
|
25227
|
+
for (const child of next.subagents)
|
|
25228
|
+
if (child.nativeSubagentId)
|
|
25229
|
+
this.#subagentItems.set(child.nativeSubagentId, next);
|
|
25230
|
+
break;
|
|
25231
|
+
}
|
|
25232
|
+
}
|
|
25233
|
+
if (item?.type === "subagentDelegation") {
|
|
25234
|
+
for (const child of item.subagents)
|
|
25235
|
+
if (child.nativeSubagentId)
|
|
25236
|
+
this.#subagentItems.set(child.nativeSubagentId, structuredClone(item));
|
|
25237
|
+
}
|
|
25238
|
+
return configured;
|
|
25239
|
+
}
|
|
25240
|
+
#subagentConfiguration() {
|
|
25241
|
+
const state = this.#state();
|
|
25242
|
+
const model2 = state.effectiveModel ? state.effectiveModel.id : void 0;
|
|
25243
|
+
return {
|
|
25244
|
+
...model2 ? { model: model2 } : {},
|
|
25245
|
+
...state.effectiveThinkingOptionId ? { reasoningEffort: state.effectiveThinkingOptionId } : {}
|
|
25246
|
+
};
|
|
25247
|
+
}
|
|
24785
25248
|
async readSnapshot() {
|
|
25249
|
+
const result = await this.#readSnapshot();
|
|
25250
|
+
return result.ok ? { ok: true, value: configureSubagentSnapshot(result.value, this.#subagentConfiguration()) } : result;
|
|
25251
|
+
}
|
|
25252
|
+
async #readSnapshot() {
|
|
24786
25253
|
if (this.#activeTurnId !== null || this.#configBusy) {
|
|
24787
25254
|
return {
|
|
24788
25255
|
ok: false,
|
|
@@ -24877,7 +25344,10 @@ var KiroSession = class {
|
|
|
24877
25344
|
event: { type: "turn.started", turnId }
|
|
24878
25345
|
});
|
|
24879
25346
|
const userText2 = command.input.map((i) => i.text).join("\n");
|
|
24880
|
-
const output = new KiroTurnOutput(turnId, this.#cwd, (
|
|
25347
|
+
const output = new KiroTurnOutput(turnId, this.#cwd, (output2) => this.#channel.emit(output2.kind === "event" ? {
|
|
25348
|
+
...output2,
|
|
25349
|
+
event: this.#subagentEvent(output2.event)
|
|
25350
|
+
} : output2));
|
|
24881
25351
|
let assignedUserMessageId;
|
|
24882
25352
|
const stopped = new Promise((_resolve, reject) => {
|
|
24883
25353
|
this.#stopTurn = () => reject(this.#faultError ?? new Error("Session closed"));
|