@kmmao/happy-wire 0.19.1 → 0.20.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/dist/index.cjs +302 -2
- package/dist/index.d.cts +505 -14
- package/dist/index.d.mts +505 -14
- package/dist/index.mjs +267 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -167,6 +167,33 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
|
|
|
167
167
|
toolUses: z.ZodNumber;
|
|
168
168
|
durationMs: z.ZodNumber;
|
|
169
169
|
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
t: z.ZodLiteral<"task-updated">;
|
|
172
|
+
taskId: z.ZodString;
|
|
173
|
+
patch: z.ZodObject<{
|
|
174
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
completed: "completed";
|
|
176
|
+
failed: "failed";
|
|
177
|
+
pending: "pending";
|
|
178
|
+
running: "running";
|
|
179
|
+
killed: "killed";
|
|
180
|
+
paused: "paused";
|
|
181
|
+
}>>;
|
|
182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
183
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
error: z.ZodOptional<z.ZodString>;
|
|
185
|
+
isBackgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
t: z.ZodLiteral<"rate-limit">;
|
|
189
|
+
status: z.ZodEnum<{
|
|
190
|
+
allowed: "allowed";
|
|
191
|
+
allowed_warning: "allowed_warning";
|
|
192
|
+
rejected: "rejected";
|
|
193
|
+
}>;
|
|
194
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
196
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
170
197
|
}, z.core.$strip>, z.ZodObject<{
|
|
171
198
|
t: z.ZodLiteral<"tool-progress">;
|
|
172
199
|
toolUseId: z.ZodString;
|
|
@@ -181,8 +208,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
|
|
|
181
208
|
}, z.core.$strip>, z.ZodObject<{
|
|
182
209
|
t: z.ZodLiteral<"session-state-changed">;
|
|
183
210
|
state: z.ZodEnum<{
|
|
184
|
-
idle: "idle";
|
|
185
211
|
running: "running";
|
|
212
|
+
idle: "idle";
|
|
186
213
|
requires_action: "requires_action";
|
|
187
214
|
}>;
|
|
188
215
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -425,6 +452,33 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
425
452
|
toolUses: z.ZodNumber;
|
|
426
453
|
durationMs: z.ZodNumber;
|
|
427
454
|
}, z.core.$strip>>;
|
|
455
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
456
|
+
t: z.ZodLiteral<"task-updated">;
|
|
457
|
+
taskId: z.ZodString;
|
|
458
|
+
patch: z.ZodObject<{
|
|
459
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
460
|
+
completed: "completed";
|
|
461
|
+
failed: "failed";
|
|
462
|
+
pending: "pending";
|
|
463
|
+
running: "running";
|
|
464
|
+
killed: "killed";
|
|
465
|
+
paused: "paused";
|
|
466
|
+
}>>;
|
|
467
|
+
description: z.ZodOptional<z.ZodString>;
|
|
468
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
error: z.ZodOptional<z.ZodString>;
|
|
470
|
+
isBackgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
471
|
+
}, z.core.$strip>;
|
|
472
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
473
|
+
t: z.ZodLiteral<"rate-limit">;
|
|
474
|
+
status: z.ZodEnum<{
|
|
475
|
+
allowed: "allowed";
|
|
476
|
+
allowed_warning: "allowed_warning";
|
|
477
|
+
rejected: "rejected";
|
|
478
|
+
}>;
|
|
479
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
481
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
428
482
|
}, z.core.$strip>, z.ZodObject<{
|
|
429
483
|
t: z.ZodLiteral<"tool-progress">;
|
|
430
484
|
toolUseId: z.ZodString;
|
|
@@ -439,8 +493,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
439
493
|
}, z.core.$strip>, z.ZodObject<{
|
|
440
494
|
t: z.ZodLiteral<"session-state-changed">;
|
|
441
495
|
state: z.ZodEnum<{
|
|
442
|
-
idle: "idle";
|
|
443
496
|
running: "running";
|
|
497
|
+
idle: "idle";
|
|
444
498
|
requires_action: "requires_action";
|
|
445
499
|
}>;
|
|
446
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1060,6 +1114,35 @@ declare const sessionTaskEndEventSchema: z.ZodObject<{
|
|
|
1060
1114
|
durationMs: z.ZodNumber;
|
|
1061
1115
|
}, z.core.$strip>>;
|
|
1062
1116
|
}, z.core.$strip>;
|
|
1117
|
+
declare const sessionTaskUpdatedEventSchema: z.ZodObject<{
|
|
1118
|
+
t: z.ZodLiteral<"task-updated">;
|
|
1119
|
+
taskId: z.ZodString;
|
|
1120
|
+
patch: z.ZodObject<{
|
|
1121
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1122
|
+
completed: "completed";
|
|
1123
|
+
failed: "failed";
|
|
1124
|
+
pending: "pending";
|
|
1125
|
+
running: "running";
|
|
1126
|
+
killed: "killed";
|
|
1127
|
+
paused: "paused";
|
|
1128
|
+
}>>;
|
|
1129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
1131
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1132
|
+
isBackgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
1133
|
+
}, z.core.$strip>;
|
|
1134
|
+
}, z.core.$strip>;
|
|
1135
|
+
declare const sessionRateLimitEventSchema: z.ZodObject<{
|
|
1136
|
+
t: z.ZodLiteral<"rate-limit">;
|
|
1137
|
+
status: z.ZodEnum<{
|
|
1138
|
+
allowed: "allowed";
|
|
1139
|
+
allowed_warning: "allowed_warning";
|
|
1140
|
+
rejected: "rejected";
|
|
1141
|
+
}>;
|
|
1142
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1143
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
1144
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
1145
|
+
}, z.core.$strip>;
|
|
1063
1146
|
declare const sessionToolProgressEventSchema: z.ZodObject<{
|
|
1064
1147
|
t: z.ZodLiteral<"tool-progress">;
|
|
1065
1148
|
toolUseId: z.ZodString;
|
|
@@ -1077,8 +1160,8 @@ declare const sessionNeedsContinueEventSchema: z.ZodObject<{
|
|
|
1077
1160
|
declare const sessionStateChangedEventSchema: z.ZodObject<{
|
|
1078
1161
|
t: z.ZodLiteral<"session-state-changed">;
|
|
1079
1162
|
state: z.ZodEnum<{
|
|
1080
|
-
idle: "idle";
|
|
1081
1163
|
running: "running";
|
|
1164
|
+
idle: "idle";
|
|
1082
1165
|
requires_action: "requires_action";
|
|
1083
1166
|
}>;
|
|
1084
1167
|
}, z.core.$strip>;
|
|
@@ -1225,6 +1308,33 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1225
1308
|
toolUses: z.ZodNumber;
|
|
1226
1309
|
durationMs: z.ZodNumber;
|
|
1227
1310
|
}, z.core.$strip>>;
|
|
1311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1312
|
+
t: z.ZodLiteral<"task-updated">;
|
|
1313
|
+
taskId: z.ZodString;
|
|
1314
|
+
patch: z.ZodObject<{
|
|
1315
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1316
|
+
completed: "completed";
|
|
1317
|
+
failed: "failed";
|
|
1318
|
+
pending: "pending";
|
|
1319
|
+
running: "running";
|
|
1320
|
+
killed: "killed";
|
|
1321
|
+
paused: "paused";
|
|
1322
|
+
}>>;
|
|
1323
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
1325
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1326
|
+
isBackgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
1327
|
+
}, z.core.$strip>;
|
|
1328
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1329
|
+
t: z.ZodLiteral<"rate-limit">;
|
|
1330
|
+
status: z.ZodEnum<{
|
|
1331
|
+
allowed: "allowed";
|
|
1332
|
+
allowed_warning: "allowed_warning";
|
|
1333
|
+
rejected: "rejected";
|
|
1334
|
+
}>;
|
|
1335
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1336
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
1337
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
1228
1338
|
}, z.core.$strip>, z.ZodObject<{
|
|
1229
1339
|
t: z.ZodLiteral<"tool-progress">;
|
|
1230
1340
|
toolUseId: z.ZodString;
|
|
@@ -1239,8 +1349,8 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1239
1349
|
}, z.core.$strip>, z.ZodObject<{
|
|
1240
1350
|
t: z.ZodLiteral<"session-state-changed">;
|
|
1241
1351
|
state: z.ZodEnum<{
|
|
1242
|
-
idle: "idle";
|
|
1243
1352
|
running: "running";
|
|
1353
|
+
idle: "idle";
|
|
1244
1354
|
requires_action: "requires_action";
|
|
1245
1355
|
}>;
|
|
1246
1356
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1389,6 +1499,33 @@ declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
|
1389
1499
|
toolUses: z.ZodNumber;
|
|
1390
1500
|
durationMs: z.ZodNumber;
|
|
1391
1501
|
}, z.core.$strip>>;
|
|
1502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1503
|
+
t: z.ZodLiteral<"task-updated">;
|
|
1504
|
+
taskId: z.ZodString;
|
|
1505
|
+
patch: z.ZodObject<{
|
|
1506
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1507
|
+
completed: "completed";
|
|
1508
|
+
failed: "failed";
|
|
1509
|
+
pending: "pending";
|
|
1510
|
+
running: "running";
|
|
1511
|
+
killed: "killed";
|
|
1512
|
+
paused: "paused";
|
|
1513
|
+
}>>;
|
|
1514
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1515
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
1516
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
isBackgrounded: z.ZodOptional<z.ZodBoolean>;
|
|
1518
|
+
}, z.core.$strip>;
|
|
1519
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1520
|
+
t: z.ZodLiteral<"rate-limit">;
|
|
1521
|
+
status: z.ZodEnum<{
|
|
1522
|
+
allowed: "allowed";
|
|
1523
|
+
allowed_warning: "allowed_warning";
|
|
1524
|
+
rejected: "rejected";
|
|
1525
|
+
}>;
|
|
1526
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1527
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
1392
1529
|
}, z.core.$strip>, z.ZodObject<{
|
|
1393
1530
|
t: z.ZodLiteral<"tool-progress">;
|
|
1394
1531
|
toolUseId: z.ZodString;
|
|
@@ -1403,8 +1540,8 @@ declare const sessionEnvelopeSchema: z.ZodObject<{
|
|
|
1403
1540
|
}, z.core.$strip>, z.ZodObject<{
|
|
1404
1541
|
t: z.ZodLiteral<"session-state-changed">;
|
|
1405
1542
|
state: z.ZodEnum<{
|
|
1406
|
-
idle: "idle";
|
|
1407
1543
|
running: "running";
|
|
1544
|
+
idle: "idle";
|
|
1408
1545
|
requires_action: "requires_action";
|
|
1409
1546
|
}>;
|
|
1410
1547
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2163,9 +2300,9 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
|
|
|
2163
2300
|
}>;
|
|
2164
2301
|
type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
|
|
2165
2302
|
declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
|
|
2166
|
-
session: "session";
|
|
2167
2303
|
user: "user";
|
|
2168
2304
|
supervisor: "supervisor";
|
|
2305
|
+
session: "session";
|
|
2169
2306
|
}>;
|
|
2170
2307
|
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
2171
2308
|
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
@@ -2198,9 +2335,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
|
2198
2335
|
repo_map: "repo_map";
|
|
2199
2336
|
}>;
|
|
2200
2337
|
contributorType: z.ZodEnum<{
|
|
2201
|
-
session: "session";
|
|
2202
2338
|
user: "user";
|
|
2203
2339
|
supervisor: "supervisor";
|
|
2340
|
+
session: "session";
|
|
2204
2341
|
}>;
|
|
2205
2342
|
action: z.ZodEnum<{
|
|
2206
2343
|
create: "create";
|
|
@@ -2743,10 +2880,10 @@ declare const SkillContentSchema: z.ZodObject<{
|
|
|
2743
2880
|
type SkillContent = z.infer<typeof SkillContentSchema>;
|
|
2744
2881
|
|
|
2745
2882
|
declare const InboxCategorySchema: z.ZodEnum<{
|
|
2746
|
-
session: "session";
|
|
2747
2883
|
supervisor: "supervisor";
|
|
2748
2884
|
task: "task";
|
|
2749
2885
|
trigger: "trigger";
|
|
2886
|
+
session: "session";
|
|
2750
2887
|
knowledge: "knowledge";
|
|
2751
2888
|
system: "system";
|
|
2752
2889
|
}>;
|
|
@@ -2760,10 +2897,10 @@ type InboxSeverity = z.infer<typeof InboxSeveritySchema>;
|
|
|
2760
2897
|
declare const InboxItemSummarySchema: z.ZodObject<{
|
|
2761
2898
|
id: z.ZodString;
|
|
2762
2899
|
category: z.ZodEnum<{
|
|
2763
|
-
session: "session";
|
|
2764
2900
|
supervisor: "supervisor";
|
|
2765
2901
|
task: "task";
|
|
2766
2902
|
trigger: "trigger";
|
|
2903
|
+
session: "session";
|
|
2767
2904
|
knowledge: "knowledge";
|
|
2768
2905
|
system: "system";
|
|
2769
2906
|
}>;
|
|
@@ -2788,10 +2925,10 @@ declare const InboxNewItemSchema: z.ZodObject<{
|
|
|
2788
2925
|
item: z.ZodObject<{
|
|
2789
2926
|
id: z.ZodString;
|
|
2790
2927
|
category: z.ZodEnum<{
|
|
2791
|
-
session: "session";
|
|
2792
2928
|
supervisor: "supervisor";
|
|
2793
2929
|
task: "task";
|
|
2794
2930
|
trigger: "trigger";
|
|
2931
|
+
session: "session";
|
|
2795
2932
|
knowledge: "knowledge";
|
|
2796
2933
|
system: "system";
|
|
2797
2934
|
}>;
|
|
@@ -3240,6 +3377,7 @@ declare const sessionProgressTodoSchema: z.ZodObject<{
|
|
|
3240
3377
|
in_progress: "in_progress";
|
|
3241
3378
|
}>;
|
|
3242
3379
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
3380
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3243
3381
|
stage: z.ZodOptional<z.ZodString>;
|
|
3244
3382
|
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3245
3383
|
}, z.core.$strip>;
|
|
@@ -3273,6 +3411,7 @@ declare const sessionProgressListSchema: z.ZodObject<{
|
|
|
3273
3411
|
in_progress: "in_progress";
|
|
3274
3412
|
}>;
|
|
3275
3413
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
3414
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3276
3415
|
stage: z.ZodOptional<z.ZodString>;
|
|
3277
3416
|
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3278
3417
|
}, z.core.$strip>>;
|
|
@@ -3313,6 +3452,7 @@ declare const sessionProgressStateSchema: z.ZodObject<{
|
|
|
3313
3452
|
in_progress: "in_progress";
|
|
3314
3453
|
}>;
|
|
3315
3454
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
3455
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3316
3456
|
stage: z.ZodOptional<z.ZodString>;
|
|
3317
3457
|
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3318
3458
|
}, z.core.$strip>>;
|
|
@@ -3341,6 +3481,7 @@ declare const sessionProgressStateSchema: z.ZodObject<{
|
|
|
3341
3481
|
in_progress: "in_progress";
|
|
3342
3482
|
}>;
|
|
3343
3483
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
3484
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3344
3485
|
stage: z.ZodOptional<z.ZodString>;
|
|
3345
3486
|
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3346
3487
|
}, z.core.$strip>>>;
|
|
@@ -3636,6 +3777,8 @@ type CodexMetadata = z.infer<typeof CodexMetadataSchema>;
|
|
|
3636
3777
|
* read_file
|
|
3637
3778
|
* - Permission-gated (destructive side effects):
|
|
3638
3779
|
* mcp_call
|
|
3780
|
+
* - MCP management tier (runtime server lifecycle, SDK 0.3.142+):
|
|
3781
|
+
* set_mcp_servers, reconnect_mcp_server, toggle_mcp_server
|
|
3639
3782
|
*/
|
|
3640
3783
|
|
|
3641
3784
|
declare const CLAUDE_CONTROL_SCOPE: "claude-control";
|
|
@@ -3794,8 +3937,8 @@ declare const GetMcpServersResponseSchema: z$1.ZodObject<{
|
|
|
3794
3937
|
name: z$1.ZodString;
|
|
3795
3938
|
status: z$1.ZodEnum<{
|
|
3796
3939
|
failed: "failed";
|
|
3797
|
-
connected: "connected";
|
|
3798
3940
|
pending: "pending";
|
|
3941
|
+
connected: "connected";
|
|
3799
3942
|
"needs-auth": "needs-auth";
|
|
3800
3943
|
disabled: "disabled";
|
|
3801
3944
|
}>;
|
|
@@ -3814,12 +3957,360 @@ declare const GetMcpServersResponseSchema: z$1.ZodObject<{
|
|
|
3814
3957
|
}, z$1.core.$strict>;
|
|
3815
3958
|
type GetMcpServersRequest = z$1.infer<typeof GetMcpServersRequestSchema>;
|
|
3816
3959
|
type GetMcpServersResponse = z$1.infer<typeof GetMcpServersResponseSchema>;
|
|
3960
|
+
/**
|
|
3961
|
+
* Hot-swap the full set of MCP servers on a running session. The SDK diffs
|
|
3962
|
+
* against the current set, connects newly added servers, and disconnects
|
|
3963
|
+
* removed ones. Existing servers whose config hasn't changed keep their
|
|
3964
|
+
* connection alive.
|
|
3965
|
+
*/
|
|
3966
|
+
declare const SetMcpServersRequestSchema: z$1.ZodObject<{
|
|
3967
|
+
servers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
3968
|
+
type: z$1.ZodOptional<z$1.ZodString>;
|
|
3969
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
3970
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
3971
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
3972
|
+
url: z$1.ZodOptional<z$1.ZodString>;
|
|
3973
|
+
}, z$1.core.$strip>>;
|
|
3974
|
+
}, z$1.core.$strict>;
|
|
3975
|
+
declare const SetMcpServersResponseSchema: z$1.ZodObject<{
|
|
3976
|
+
added: z$1.ZodArray<z$1.ZodString>;
|
|
3977
|
+
removed: z$1.ZodArray<z$1.ZodString>;
|
|
3978
|
+
errors: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
3979
|
+
}, z$1.core.$strict>;
|
|
3980
|
+
type SetMcpServersRequest = z$1.infer<typeof SetMcpServersRequestSchema>;
|
|
3981
|
+
type SetMcpServersResponse = z$1.infer<typeof SetMcpServersResponseSchema>;
|
|
3982
|
+
/** Reconnect a single MCP server by name (e.g. after a transient failure). */
|
|
3983
|
+
declare const ReconnectMcpServerRequestSchema: z$1.ZodObject<{
|
|
3984
|
+
serverName: z$1.ZodString;
|
|
3985
|
+
}, z$1.core.$strict>;
|
|
3986
|
+
declare const ReconnectMcpServerResponseSchema: z$1.ZodObject<{
|
|
3987
|
+
success: z$1.ZodLiteral<true>;
|
|
3988
|
+
}, z$1.core.$strict>;
|
|
3989
|
+
type ReconnectMcpServerRequest = z$1.infer<typeof ReconnectMcpServerRequestSchema>;
|
|
3990
|
+
type ReconnectMcpServerResponse = z$1.infer<typeof ReconnectMcpServerResponseSchema>;
|
|
3991
|
+
/** Enable or disable a single MCP server without removing its config. */
|
|
3992
|
+
declare const ToggleMcpServerRequestSchema: z$1.ZodObject<{
|
|
3993
|
+
serverName: z$1.ZodString;
|
|
3994
|
+
enabled: z$1.ZodBoolean;
|
|
3995
|
+
}, z$1.core.$strict>;
|
|
3996
|
+
declare const ToggleMcpServerResponseSchema: z$1.ZodObject<{
|
|
3997
|
+
success: z$1.ZodLiteral<true>;
|
|
3998
|
+
}, z$1.core.$strict>;
|
|
3999
|
+
type ToggleMcpServerRequest = z$1.infer<typeof ToggleMcpServerRequestSchema>;
|
|
4000
|
+
type ToggleMcpServerResponse = z$1.infer<typeof ToggleMcpServerResponseSchema>;
|
|
4001
|
+
/**
|
|
4002
|
+
* Register a single MCP server on a running session. The server is validated,
|
|
4003
|
+
* merged with existing user servers, and connected via `setMcpServers()`.
|
|
4004
|
+
* Protected server names (`happy`, `happy-knowledge`) are rejected.
|
|
4005
|
+
*/
|
|
4006
|
+
declare const AddMcpServerRequestSchema: z$1.ZodObject<{
|
|
4007
|
+
name: z$1.ZodString;
|
|
4008
|
+
config: z$1.ZodObject<{
|
|
4009
|
+
type: z$1.ZodOptional<z$1.ZodString>;
|
|
4010
|
+
command: z$1.ZodOptional<z$1.ZodString>;
|
|
4011
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4012
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
4013
|
+
url: z$1.ZodOptional<z$1.ZodString>;
|
|
4014
|
+
}, z$1.core.$strip>;
|
|
4015
|
+
}, z$1.core.$strict>;
|
|
4016
|
+
declare const AddMcpServerResponseSchema: z$1.ZodObject<{
|
|
4017
|
+
success: z$1.ZodBoolean;
|
|
4018
|
+
added: z$1.ZodArray<z$1.ZodString>;
|
|
4019
|
+
errors: z$1.ZodRecord<z$1.ZodString, z$1.ZodString>;
|
|
4020
|
+
errorMessage: z$1.ZodOptional<z$1.ZodString>;
|
|
4021
|
+
}, z$1.core.$strict>;
|
|
4022
|
+
type AddMcpServerRequest = z$1.infer<typeof AddMcpServerRequestSchema>;
|
|
4023
|
+
type AddMcpServerResponse = z$1.infer<typeof AddMcpServerResponseSchema>;
|
|
4024
|
+
/**
|
|
4025
|
+
* Unregister and disconnect a single MCP server from a running session.
|
|
4026
|
+
* Protected server names are rejected. Removing a non-existent server is
|
|
4027
|
+
* idempotent (returns success).
|
|
4028
|
+
*/
|
|
4029
|
+
declare const RemoveMcpServerRequestSchema: z$1.ZodObject<{
|
|
4030
|
+
name: z$1.ZodString;
|
|
4031
|
+
}, z$1.core.$strict>;
|
|
4032
|
+
declare const RemoveMcpServerResponseSchema: z$1.ZodObject<{
|
|
4033
|
+
success: z$1.ZodBoolean;
|
|
4034
|
+
removed: z$1.ZodArray<z$1.ZodString>;
|
|
4035
|
+
errorMessage: z$1.ZodOptional<z$1.ZodString>;
|
|
4036
|
+
}, z$1.core.$strict>;
|
|
4037
|
+
type RemoveMcpServerRequest = z$1.infer<typeof RemoveMcpServerRequestSchema>;
|
|
4038
|
+
type RemoveMcpServerResponse = z$1.infer<typeof RemoveMcpServerResponseSchema>;
|
|
4039
|
+
/**
|
|
4040
|
+
* Dynamically merge partial settings into the flag settings layer of a running
|
|
4041
|
+
* session via `Query.applyFlagSettings()`. Flag settings sit above
|
|
4042
|
+
* user/project/local settings and below managed policy settings.
|
|
4043
|
+
*
|
|
4044
|
+
* Typical use cases:
|
|
4045
|
+
* - Update permission rules (allow/deny) without cold restart
|
|
4046
|
+
* - Change hooks configuration
|
|
4047
|
+
* - Toggle MCP server approval settings
|
|
4048
|
+
* - Override model at the settings level
|
|
4049
|
+
*
|
|
4050
|
+
* Pass `null` for a top-level key to clear it from the flag layer (falls back
|
|
4051
|
+
* to lower-precedence sources). Successive calls shallow-merge top-level keys.
|
|
4052
|
+
*/
|
|
4053
|
+
declare const ApplySettingsRequestSchema: z$1.ZodObject<{
|
|
4054
|
+
settings: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
4055
|
+
}, z$1.core.$strict>;
|
|
4056
|
+
declare const ApplySettingsResponseSchema: z$1.ZodObject<{
|
|
4057
|
+
success: z$1.ZodLiteral<true>;
|
|
4058
|
+
}, z$1.core.$strict>;
|
|
4059
|
+
type ApplySettingsRequest = z$1.infer<typeof ApplySettingsRequestSchema>;
|
|
4060
|
+
type ApplySettingsResponse = z$1.infer<typeof ApplySettingsResponseSchema>;
|
|
4061
|
+
/** Session info shape returned by SDK's listSessions / getSessionInfo. */
|
|
4062
|
+
declare const SdkSessionInfoSchema: z$1.ZodObject<{
|
|
4063
|
+
sessionId: z$1.ZodString;
|
|
4064
|
+
summary: z$1.ZodString;
|
|
4065
|
+
lastModified: z$1.ZodNumber;
|
|
4066
|
+
fileSize: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4067
|
+
customTitle: z$1.ZodOptional<z$1.ZodString>;
|
|
4068
|
+
firstPrompt: z$1.ZodOptional<z$1.ZodString>;
|
|
4069
|
+
gitBranch: z$1.ZodOptional<z$1.ZodString>;
|
|
4070
|
+
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
4071
|
+
tag: z$1.ZodOptional<z$1.ZodString>;
|
|
4072
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4073
|
+
}, z$1.core.$strip>;
|
|
4074
|
+
type SdkSessionInfo = z$1.infer<typeof SdkSessionInfoSchema>;
|
|
4075
|
+
declare const ListSessionsRequestSchema: z$1.ZodObject<{
|
|
4076
|
+
dir: z$1.ZodOptional<z$1.ZodString>;
|
|
4077
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4078
|
+
offset: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4079
|
+
}, z$1.core.$strict>;
|
|
4080
|
+
declare const ListSessionsResponseSchema: z$1.ZodObject<{
|
|
4081
|
+
sessions: z$1.ZodArray<z$1.ZodObject<{
|
|
4082
|
+
sessionId: z$1.ZodString;
|
|
4083
|
+
summary: z$1.ZodString;
|
|
4084
|
+
lastModified: z$1.ZodNumber;
|
|
4085
|
+
fileSize: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4086
|
+
customTitle: z$1.ZodOptional<z$1.ZodString>;
|
|
4087
|
+
firstPrompt: z$1.ZodOptional<z$1.ZodString>;
|
|
4088
|
+
gitBranch: z$1.ZodOptional<z$1.ZodString>;
|
|
4089
|
+
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
4090
|
+
tag: z$1.ZodOptional<z$1.ZodString>;
|
|
4091
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4092
|
+
}, z$1.core.$strip>>;
|
|
4093
|
+
}, z$1.core.$strict>;
|
|
4094
|
+
type ListSessionsRequest = z$1.infer<typeof ListSessionsRequestSchema>;
|
|
4095
|
+
type ListSessionsResponse = z$1.infer<typeof ListSessionsResponseSchema>;
|
|
4096
|
+
declare const GetSessionInfoRequestSchema: z$1.ZodObject<{
|
|
4097
|
+
targetSessionId: z$1.ZodString;
|
|
4098
|
+
dir: z$1.ZodOptional<z$1.ZodString>;
|
|
4099
|
+
}, z$1.core.$strict>;
|
|
4100
|
+
declare const GetSessionInfoResponseSchema: z$1.ZodObject<{
|
|
4101
|
+
session: z$1.ZodNullable<z$1.ZodObject<{
|
|
4102
|
+
sessionId: z$1.ZodString;
|
|
4103
|
+
summary: z$1.ZodString;
|
|
4104
|
+
lastModified: z$1.ZodNumber;
|
|
4105
|
+
fileSize: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4106
|
+
customTitle: z$1.ZodOptional<z$1.ZodString>;
|
|
4107
|
+
firstPrompt: z$1.ZodOptional<z$1.ZodString>;
|
|
4108
|
+
gitBranch: z$1.ZodOptional<z$1.ZodString>;
|
|
4109
|
+
cwd: z$1.ZodOptional<z$1.ZodString>;
|
|
4110
|
+
tag: z$1.ZodOptional<z$1.ZodString>;
|
|
4111
|
+
createdAt: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4112
|
+
}, z$1.core.$strip>>;
|
|
4113
|
+
}, z$1.core.$strict>;
|
|
4114
|
+
type GetSessionInfoRequest = z$1.infer<typeof GetSessionInfoRequestSchema>;
|
|
4115
|
+
type GetSessionInfoResponse = z$1.infer<typeof GetSessionInfoResponseSchema>;
|
|
4116
|
+
declare const DeleteSessionRequestSchema: z$1.ZodObject<{
|
|
4117
|
+
targetSessionId: z$1.ZodString;
|
|
4118
|
+
dir: z$1.ZodOptional<z$1.ZodString>;
|
|
4119
|
+
}, z$1.core.$strict>;
|
|
4120
|
+
declare const DeleteSessionResponseSchema: z$1.ZodObject<{
|
|
4121
|
+
success: z$1.ZodLiteral<true>;
|
|
4122
|
+
}, z$1.core.$strict>;
|
|
4123
|
+
type DeleteSessionRequest = z$1.infer<typeof DeleteSessionRequestSchema>;
|
|
4124
|
+
type DeleteSessionResponse = z$1.infer<typeof DeleteSessionResponseSchema>;
|
|
4125
|
+
declare const RenameSessionRequestSchema: z$1.ZodObject<{
|
|
4126
|
+
targetSessionId: z$1.ZodString;
|
|
4127
|
+
title: z$1.ZodString;
|
|
4128
|
+
dir: z$1.ZodOptional<z$1.ZodString>;
|
|
4129
|
+
}, z$1.core.$strict>;
|
|
4130
|
+
declare const RenameSessionResponseSchema: z$1.ZodObject<{
|
|
4131
|
+
success: z$1.ZodLiteral<true>;
|
|
4132
|
+
}, z$1.core.$strict>;
|
|
4133
|
+
type RenameSessionRequest = z$1.infer<typeof RenameSessionRequestSchema>;
|
|
4134
|
+
type RenameSessionResponse = z$1.infer<typeof RenameSessionResponseSchema>;
|
|
4135
|
+
declare const GetSessionMessagesRequestSchema: z$1.ZodObject<{
|
|
4136
|
+
targetSessionId: z$1.ZodString;
|
|
4137
|
+
dir: z$1.ZodOptional<z$1.ZodString>;
|
|
4138
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4139
|
+
offset: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4140
|
+
includeSystemMessages: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
4141
|
+
}, z$1.core.$strict>;
|
|
4142
|
+
declare const GetSessionMessagesResponseSchema: z$1.ZodObject<{
|
|
4143
|
+
messages: z$1.ZodArray<z$1.ZodObject<{
|
|
4144
|
+
type: z$1.ZodEnum<{
|
|
4145
|
+
user: "user";
|
|
4146
|
+
system: "system";
|
|
4147
|
+
assistant: "assistant";
|
|
4148
|
+
}>;
|
|
4149
|
+
uuid: z$1.ZodString;
|
|
4150
|
+
sessionId: z$1.ZodString;
|
|
4151
|
+
content: z$1.ZodUnknown;
|
|
4152
|
+
}, z$1.core.$strip>>;
|
|
4153
|
+
totalCount: z$1.ZodNumber;
|
|
4154
|
+
}, z$1.core.$strict>;
|
|
4155
|
+
type GetSessionMessagesRequest = z$1.infer<typeof GetSessionMessagesRequestSchema>;
|
|
4156
|
+
type GetSessionMessagesResponse = z$1.infer<typeof GetSessionMessagesResponseSchema>;
|
|
3817
4157
|
/**
|
|
3818
4158
|
* Method name enum — consumers should derive typed handlers from this.
|
|
3819
4159
|
* When adding a new method, update the CLI handler registration too.
|
|
3820
4160
|
*/
|
|
3821
|
-
declare const CLAUDE_CONTROL_METHODS: readonly ["get_session_cost", "get_binary_version", "set_color", "read_file", "mcp_call", "get_context_usage", "get_mcp_servers", "get_context_detail"];
|
|
4161
|
+
declare const CLAUDE_CONTROL_METHODS: readonly ["get_session_cost", "get_binary_version", "set_color", "read_file", "mcp_call", "get_context_usage", "get_mcp_servers", "get_context_detail", "set_mcp_servers", "reconnect_mcp_server", "toggle_mcp_server", "add_mcp_server", "remove_mcp_server", "apply_settings", "list_sessions", "get_session_info", "delete_session", "rename_session", "get_session_messages"];
|
|
3822
4162
|
type ClaudeControlMethod = typeof CLAUDE_CONTROL_METHODS[number];
|
|
3823
4163
|
|
|
3824
|
-
|
|
3825
|
-
|
|
4164
|
+
/**
|
|
4165
|
+
* MCP Registry — persistent MCP server configuration schemas.
|
|
4166
|
+
*
|
|
4167
|
+
* The registry lives in UserKVStore under the key `mcp:servers`, providing:
|
|
4168
|
+
* - Account-level persistence (survives session restarts)
|
|
4169
|
+
* - Cross-device sync (all machines see the same registry)
|
|
4170
|
+
* - Encrypted at rest (KV values are E2E encrypted)
|
|
4171
|
+
* - Optimistic concurrency control (version-based)
|
|
4172
|
+
* - Real-time updates via eventRouter
|
|
4173
|
+
*
|
|
4174
|
+
* Transport scoping:
|
|
4175
|
+
* - `stdio` servers are machine-specific (binary paths differ per machine),
|
|
4176
|
+
* stored with a `machineId` field so the CLI only loads servers for the
|
|
4177
|
+
* current machine.
|
|
4178
|
+
* - `sse` / `url` servers are account-wide (URLs are the same everywhere).
|
|
4179
|
+
*
|
|
4180
|
+
* Key convention: `mcp:servers` stores the full JSON registry blob.
|
|
4181
|
+
*
|
|
4182
|
+
* CLI reads this on session start and merges with local
|
|
4183
|
+
* `~/.claude/settings.json` mcpServers. Registry entries take precedence over
|
|
4184
|
+
* local entries with the same name (App is authoritative).
|
|
4185
|
+
*/
|
|
4186
|
+
|
|
4187
|
+
declare const McpStdioConfigSchema: z$1.ZodObject<{
|
|
4188
|
+
type: z$1.ZodLiteral<"stdio">;
|
|
4189
|
+
command: z$1.ZodString;
|
|
4190
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4191
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
4192
|
+
}, z$1.core.$strip>;
|
|
4193
|
+
declare const McpSseConfigSchema: z$1.ZodObject<{
|
|
4194
|
+
type: z$1.ZodLiteral<"sse">;
|
|
4195
|
+
url: z$1.ZodString;
|
|
4196
|
+
}, z$1.core.$strip>;
|
|
4197
|
+
declare const McpUrlConfigSchema: z$1.ZodObject<{
|
|
4198
|
+
type: z$1.ZodLiteral<"url">;
|
|
4199
|
+
url: z$1.ZodString;
|
|
4200
|
+
}, z$1.core.$strip>;
|
|
4201
|
+
declare const McpStreamableHttpConfigSchema: z$1.ZodObject<{
|
|
4202
|
+
type: z$1.ZodLiteral<"streamable-http">;
|
|
4203
|
+
url: z$1.ZodString;
|
|
4204
|
+
}, z$1.core.$strip>;
|
|
4205
|
+
declare const McpTransportConfigSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
4206
|
+
type: z$1.ZodLiteral<"stdio">;
|
|
4207
|
+
command: z$1.ZodString;
|
|
4208
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4209
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
4210
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4211
|
+
type: z$1.ZodLiteral<"sse">;
|
|
4212
|
+
url: z$1.ZodString;
|
|
4213
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4214
|
+
type: z$1.ZodLiteral<"url">;
|
|
4215
|
+
url: z$1.ZodString;
|
|
4216
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4217
|
+
type: z$1.ZodLiteral<"streamable-http">;
|
|
4218
|
+
url: z$1.ZodString;
|
|
4219
|
+
}, z$1.core.$strip>], "type">;
|
|
4220
|
+
type McpTransportConfig = z$1.infer<typeof McpTransportConfigSchema>;
|
|
4221
|
+
declare const McpRegistryEntrySchema: z$1.ZodObject<{
|
|
4222
|
+
name: z$1.ZodString;
|
|
4223
|
+
transport: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
4224
|
+
type: z$1.ZodLiteral<"stdio">;
|
|
4225
|
+
command: z$1.ZodString;
|
|
4226
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4227
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
4228
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4229
|
+
type: z$1.ZodLiteral<"sse">;
|
|
4230
|
+
url: z$1.ZodString;
|
|
4231
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4232
|
+
type: z$1.ZodLiteral<"url">;
|
|
4233
|
+
url: z$1.ZodString;
|
|
4234
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4235
|
+
type: z$1.ZodLiteral<"streamable-http">;
|
|
4236
|
+
url: z$1.ZodString;
|
|
4237
|
+
}, z$1.core.$strip>], "type">;
|
|
4238
|
+
enabled: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
4239
|
+
machineId: z$1.ZodOptional<z$1.ZodString>;
|
|
4240
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
4241
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4242
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4243
|
+
category: z$1.ZodOptional<z$1.ZodString>;
|
|
4244
|
+
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
4245
|
+
tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4246
|
+
packageName: z$1.ZodOptional<z$1.ZodString>;
|
|
4247
|
+
version: z$1.ZodOptional<z$1.ZodString>;
|
|
4248
|
+
author: z$1.ZodOptional<z$1.ZodString>;
|
|
4249
|
+
homepage: z$1.ZodOptional<z$1.ZodString>;
|
|
4250
|
+
toolInventory: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4251
|
+
lastConnectedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4252
|
+
connectionCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4253
|
+
}, z$1.core.$strip>;
|
|
4254
|
+
type McpRegistryEntry = z$1.infer<typeof McpRegistryEntrySchema>;
|
|
4255
|
+
/**
|
|
4256
|
+
* The complete MCP registry stored as a single KV blob.
|
|
4257
|
+
* Keyed by server name for O(1) lookup and dedup.
|
|
4258
|
+
*/
|
|
4259
|
+
declare const McpRegistrySchema: z$1.ZodObject<{
|
|
4260
|
+
version: z$1.ZodLiteral<1>;
|
|
4261
|
+
servers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
4262
|
+
name: z$1.ZodString;
|
|
4263
|
+
transport: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
4264
|
+
type: z$1.ZodLiteral<"stdio">;
|
|
4265
|
+
command: z$1.ZodString;
|
|
4266
|
+
args: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4267
|
+
env: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
4268
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4269
|
+
type: z$1.ZodLiteral<"sse">;
|
|
4270
|
+
url: z$1.ZodString;
|
|
4271
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4272
|
+
type: z$1.ZodLiteral<"url">;
|
|
4273
|
+
url: z$1.ZodString;
|
|
4274
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
4275
|
+
type: z$1.ZodLiteral<"streamable-http">;
|
|
4276
|
+
url: z$1.ZodString;
|
|
4277
|
+
}, z$1.core.$strip>], "type">;
|
|
4278
|
+
enabled: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
4279
|
+
machineId: z$1.ZodOptional<z$1.ZodString>;
|
|
4280
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
4281
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4282
|
+
updatedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4283
|
+
category: z$1.ZodOptional<z$1.ZodString>;
|
|
4284
|
+
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
4285
|
+
tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4286
|
+
packageName: z$1.ZodOptional<z$1.ZodString>;
|
|
4287
|
+
version: z$1.ZodOptional<z$1.ZodString>;
|
|
4288
|
+
author: z$1.ZodOptional<z$1.ZodString>;
|
|
4289
|
+
homepage: z$1.ZodOptional<z$1.ZodString>;
|
|
4290
|
+
toolInventory: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
|
|
4291
|
+
lastConnectedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
4292
|
+
connectionCount: z$1.ZodOptional<z$1.ZodNumber>;
|
|
4293
|
+
}, z$1.core.$strip>>;
|
|
4294
|
+
}, z$1.core.$strip>;
|
|
4295
|
+
type McpRegistry = z$1.infer<typeof McpRegistrySchema>;
|
|
4296
|
+
/** KV store key for the MCP registry blob. */
|
|
4297
|
+
declare const MCP_REGISTRY_KV_KEY: "mcp:servers";
|
|
4298
|
+
/** Create an empty registry. */
|
|
4299
|
+
declare function createEmptyMcpRegistry(): McpRegistry;
|
|
4300
|
+
/**
|
|
4301
|
+
* Convert registry entries into the SDK's mcpServers config format.
|
|
4302
|
+
* Filters by machine ID and enabled status.
|
|
4303
|
+
*
|
|
4304
|
+
* @param registry - The full MCP registry
|
|
4305
|
+
* @param machineId - Current machine ID (to filter machine-specific entries)
|
|
4306
|
+
* @returns Record<string, config> suitable for SDK's `Options.mcpServers`
|
|
4307
|
+
*/
|
|
4308
|
+
declare function registryToSdkConfig(registry: McpRegistry, machineId?: string): Record<string, Record<string, unknown>>;
|
|
4309
|
+
/**
|
|
4310
|
+
* Safely parse a KV value string into an McpRegistry.
|
|
4311
|
+
* Returns an empty registry if the value is null, empty, or invalid.
|
|
4312
|
+
*/
|
|
4313
|
+
declare function parseMcpRegistry(raw: string | null | undefined): McpRegistry;
|
|
4314
|
+
|
|
4315
|
+
export { AIBackendProfileSchema, AddMcpServerRequestSchema, AddMcpServerResponseSchema, AgentLoopSummarySchema, AgentMessageSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, ApplySettingsRequestSchema, ApplySettingsResponseSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CLAUDE_CONTROL_METHODS, CLAUDE_CONTROL_SCOPE, CODEX_APP_SERVER_BACKEND, CODEX_MCP_LEGACY_BACKEND, CODEX_REQUESTED_BACKEND_ALIASES, CliInstallInfoSchema, CliInstallSourceSchema, CodexAccountSchema, CodexAgentSummarySchema, CodexBackendModeSchema, CodexConfigModeSchema, CodexConfigSchema, CodexExperimentalFeatureSchema, CodexMcpServerSummarySchema, CodexMetadataSchema, CodexPromptSummarySchema, CodexRateLimitsSchema, CodexRequestedBackendSchema, CodexResolvedBackendSchema, CodexRuntimeConfigSchema, CodexSkillSummarySchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, DeleteSessionRequestSchema, DeleteSessionResponseSchema, EnvironmentVariableSchema, GetBinaryVersionRequestSchema, GetBinaryVersionResponseSchema, GetContextDetailRequestSchema, GetContextDetailResponseSchema, GetContextUsageRequestSchema, GetContextUsageResponseSchema, GetMcpServersRequestSchema, GetMcpServersResponseSchema, GetSessionCostRequestSchema, GetSessionCostResponseSchema, GetSessionInfoRequestSchema, GetSessionInfoResponseSchema, GetSessionMessagesRequestSchema, GetSessionMessagesResponseSchema, HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES, HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES, HAPPY_MCP_TOOL_NAMES, HAPPY_MCP_TOOL_SPECS, HAPPY_PROFILE_ENV_KEYS, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, ListSessionsRequestSchema, ListSessionsResponseSchema, LiveKitTokenResponseSchema, MCP_REGISTRY_KV_KEY, MachineMetadataSchema, McpCallRequestSchema, McpCallResponseSchema, McpRegistryEntrySchema, McpRegistrySchema, McpSseConfigSchema, McpStdioConfigSchema, McpStreamableHttpConfigSchema, McpTransportConfigSchema, McpUrlConfigSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ReadFileRequestSchema, ReadFileResponseSchema, ReconnectMcpServerRequestSchema, ReconnectMcpServerResponseSchema, RemoveMcpServerRequestSchema, RemoveMcpServerResponseSchema, RenameSessionRequestSchema, RenameSessionResponseSchema, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SdkSessionInfoSchema, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SetColorRequestSchema, SetColorResponseSchema, SetMcpServersRequestSchema, SetMcpServersResponseSchema, SkillContentSchema, SkillSummarySchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, ToggleMcpServerRequestSchema, ToggleMcpServerResponseSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, createEmptyMcpRegistry, createEnvelope, createResolvedRuntimeProfile, getBuiltInAIBackendProfile, getHappyMcpToolAction, getHappyMcpToolAliases, getHappyMcpToolTitle, getProfileEnvironmentVariables, isCodexAppServerBackend, isCodexLegacyBackend, isHappyMcpToolAlias, isHappyMcpToolName, isTrustedRuntimeProfile, normalizeHappyMcpToolName, normalizeResolvedRuntimeProfile, parseMcpRegistry, registryToSdkConfig, resolveCodexResolvedBackend, resolveCodexResumableThreadId, resolveRequestedCodexBackend, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRateLimitEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryRefreshActiveRequestSchema, sessionSummaryRefreshRecentEntrySchema, sessionSummaryRefreshStateSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTaskUpdatedEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, shouldAutoApproveHappyMcpReason, shouldAutoApproveHappyMcpToolName, shouldHideSuccessfulHappyMcpTool, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
|
|
4316
|
+
export type { AIBackendProfile, AddMcpServerRequest, AddMcpServerResponse, AgentLoopSummary, AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, ApplySettingsRequest, ApplySettingsResponse, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, BootstrapProfileSummary, BriefMessage, BuiltInAIBackendProfileId, ClaudeControlMethod, CliInstallInfo, CliInstallSource, CodexAccount, CodexAgentSummary, CodexBackendMode, CodexConfigMode, CodexExperimentalFeature, CodexMcpServerSummary, CodexMetadata, CodexPromptSummary, CodexRateLimits, CodexRequestedBackend, CodexResolvedBackend, CodexRuntimeConfig, CodexSkillSummary, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, DeleteSessionRequest, DeleteSessionResponse, GetBinaryVersionRequest, GetBinaryVersionResponse, GetContextDetailRequest, GetContextDetailResponse, GetContextUsageRequest, GetContextUsageResponse, GetMcpServersRequest, GetMcpServersResponse, GetSessionCostRequest, GetSessionCostResponse, GetSessionInfoRequest, GetSessionInfoResponse, GetSessionMessagesRequest, GetSessionMessagesResponse, HappyMcpCanonicalToolName, HappyMcpToolActionMode, HappyProfileEnvKey, InboxCategory, InboxItemSummary, InboxNewItem, InboxSeverity, InboxUnreadCount, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, ListSessionsRequest, ListSessionsResponse, LiveKitTokenResponse, MachineMetadata, McpCallRequest, McpCallResponse, McpRegistry, McpRegistryEntry, McpTransportConfig, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, ReadFileRequest, ReadFileResponse, ReconnectMcpServerRequest, ReconnectMcpServerResponse, RemoveMcpServerRequest, RemoveMcpServerResponse, RenameSessionRequest, RenameSessionResponse, ResolvedRuntimeProfile, RuntimeProfileSource, RuntimeProfileTrust, SdkSessionInfo, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionEventCreated, SessionEventReport, SessionEventSummary, SessionEventType, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProgressList, SessionProgressState, SessionProgressTodo, SessionProgressTodoStatus, SessionProtocolMessage, SessionRole, SessionSummaryRefreshActiveRequest, SessionSummaryRefreshRecentEntry, SessionSummaryRefreshState, SessionSummaryState, SessionTurnEndStatus, SetColorRequest, SetColorResponse, SetMcpServersRequest, SetMcpServersResponse, SkillContent, SkillSummary, TailscaleInfo, TailscaleServeEntry, TaskOutcome, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TerminalCloseRequest, TerminalExitPayload, TerminalInputPayload, TerminalOutputPayload, TerminalResizeRequest, TerminalSpawnRequest, TerminalSpawnResponse, ToggleMcpServerRequest, ToggleMcpServerResponse, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse };
|