@get-bb/plugin-sdk 0.4.9 → 0.4.10
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 +43 -2
- package/bundled-types/bb-plugin-sdk-app.d.ts +158 -27
- package/bundled-types/bb-plugin-sdk-internal-file-navigation-validation.d.ts +42 -0
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +45 -8
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +294 -2
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +33 -2
- package/bundled-types/bb-plugin-sdk.d.ts +934 -340
- package/dist/app.js +8 -0
- package/dist/internal/file-navigation-validation.js +135 -0
- package/dist/internal/host-policy.js +104 -0
- package/dist/internal/plugin-app-collector.js +22 -1
- package/dist/provider-bridge.js +1122 -966
- package/dist/testing/app.js +325 -1
- package/dist/testing/index.js +103 -0
- package/package.json +7 -1
package/dist/provider-bridge.js
CHANGED
|
@@ -766,17 +766,82 @@ function decodeBridgeJsonRpcResponse(input) {
|
|
|
766
766
|
const success = jsonRpcSuccessResponseSchema.safeParse(input);
|
|
767
767
|
return success.success ? success.data : null;
|
|
768
768
|
}
|
|
769
|
+
var IMAGE_DATA_URL = /^data:(.+);base64,(.+)$/s;
|
|
770
|
+
function decodeImageDataUrl(imageUrl) {
|
|
771
|
+
const match = IMAGE_DATA_URL.exec(imageUrl);
|
|
772
|
+
if (match === null) {
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
const [, mimeType, data] = match;
|
|
776
|
+
if (data.length === 0) {
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
return { data, mimeType };
|
|
780
|
+
}
|
|
769
781
|
function decodeToolCallResponsePayload(result) {
|
|
770
782
|
const parsed = providerToolCallResponseSchema.safeParse(result);
|
|
771
783
|
if (!parsed.success) {
|
|
772
|
-
return {
|
|
784
|
+
return {
|
|
785
|
+
content: "Invalid tool call response",
|
|
786
|
+
contentBlocks: [{ type: "text", text: "Invalid tool call response" }],
|
|
787
|
+
images: [],
|
|
788
|
+
isError: true
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
const texts = [];
|
|
792
|
+
const contentBlocks = [];
|
|
793
|
+
const images = [];
|
|
794
|
+
for (const item of parsed.data.contentItems) {
|
|
795
|
+
if (item.type === "inputText") {
|
|
796
|
+
texts.push(item.text);
|
|
797
|
+
if (item.text !== "") {
|
|
798
|
+
contentBlocks.push({ type: "text", text: item.text });
|
|
799
|
+
}
|
|
800
|
+
continue;
|
|
801
|
+
}
|
|
802
|
+
const image = decodeImageDataUrl(item.imageUrl);
|
|
803
|
+
if (image === null) {
|
|
804
|
+
texts.push(item.imageUrl);
|
|
805
|
+
contentBlocks.push({ type: "text", text: item.imageUrl });
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
images.push(image);
|
|
809
|
+
contentBlocks.push({ type: "image", ...image });
|
|
810
|
+
}
|
|
811
|
+
const text = texts.join("\n");
|
|
812
|
+
const isError = !parsed.data.success;
|
|
813
|
+
if (contentBlocks.length === 0) {
|
|
814
|
+
const fallback = isError ? "Tool call failed" : "OK";
|
|
815
|
+
return {
|
|
816
|
+
content: fallback,
|
|
817
|
+
contentBlocks: [{ type: "text", text: fallback }],
|
|
818
|
+
images,
|
|
819
|
+
isError
|
|
820
|
+
};
|
|
773
821
|
}
|
|
774
|
-
const text = parsed.data.contentItems.filter((item) => item.type === "inputText").map((item) => item.text).join("\n");
|
|
775
822
|
return {
|
|
776
|
-
|
|
777
|
-
|
|
823
|
+
// Keep the legacy aggregate fields for provider bridges that already use
|
|
824
|
+
// this published helper. New consumers use contentBlocks so interleaved
|
|
825
|
+
// text and images retain the plugin result's order.
|
|
826
|
+
content: text,
|
|
827
|
+
contentBlocks,
|
|
828
|
+
images,
|
|
829
|
+
isError
|
|
778
830
|
};
|
|
779
831
|
}
|
|
832
|
+
function buildBridgeToolCallContent(result) {
|
|
833
|
+
if (result.contentBlocks !== void 0) {
|
|
834
|
+
return result.contentBlocks;
|
|
835
|
+
}
|
|
836
|
+
const blocks = [];
|
|
837
|
+
if (result.content !== "") {
|
|
838
|
+
blocks.push({ type: "text", text: result.content });
|
|
839
|
+
}
|
|
840
|
+
for (const image of result.images ?? []) {
|
|
841
|
+
blocks.push({ type: "image", data: image.data, mimeType: image.mimeType });
|
|
842
|
+
}
|
|
843
|
+
return blocks;
|
|
844
|
+
}
|
|
780
845
|
|
|
781
846
|
// ../provider-bridge-protocol/src/bridge-kit/json-rpc-envelope.ts
|
|
782
847
|
import { z as z4 } from "zod";
|
|
@@ -1005,13 +1070,8 @@ var promptInputVisibilitySchema = z7.enum(promptInputVisibilityValues);
|
|
|
1005
1070
|
var promptInputVisibilityFields = {
|
|
1006
1071
|
visibility: promptInputVisibilitySchema.optional()
|
|
1007
1072
|
};
|
|
1008
|
-
var promptMentionPathSourceValues = [
|
|
1009
|
-
|
|
1010
|
-
"thread-storage"
|
|
1011
|
-
];
|
|
1012
|
-
var promptMentionPathSourceSchema = z7.enum(
|
|
1013
|
-
promptMentionPathSourceValues
|
|
1014
|
-
);
|
|
1073
|
+
var promptMentionPathSourceValues = ["workspace", "thread-storage"];
|
|
1074
|
+
var promptMentionPathSourceSchema = z7.enum(promptMentionPathSourceValues);
|
|
1015
1075
|
var promptMentionPathEntryKindValues = ["file", "directory"];
|
|
1016
1076
|
var promptMentionPathEntryKindSchema = z7.enum(
|
|
1017
1077
|
promptMentionPathEntryKindValues
|
|
@@ -1241,11 +1301,7 @@ var recordedThreadExecutionOptionsSchema = resolvedThreadExecutionOptionsSchema.
|
|
|
1241
1301
|
permissionMode: recordedPermissionModeSchema
|
|
1242
1302
|
});
|
|
1243
1303
|
var runtimePermissionScopeValues = ["workspace", "full"];
|
|
1244
|
-
var runtimePermissionScopeSchema = z7.enum(
|
|
1245
|
-
runtimePermissionScopeValues
|
|
1246
|
-
);
|
|
1247
|
-
var approvalReviewerValues = ["user", "automatic"];
|
|
1248
|
-
var approvalReviewerSchema = z7.enum(approvalReviewerValues);
|
|
1304
|
+
var runtimePermissionScopeSchema = z7.enum(runtimePermissionScopeValues);
|
|
1249
1305
|
var runtimePermissionPolicySchema = z7.discriminatedUnion(
|
|
1250
1306
|
"permissionMode",
|
|
1251
1307
|
[
|
|
@@ -1604,15 +1660,12 @@ var pendingInteractionPlanApprovalSubjectSchema = z11.object({
|
|
|
1604
1660
|
/** Where the provider saved the plan, or null when it kept it in memory. */
|
|
1605
1661
|
planFilePath: z11.string().min(1).nullable()
|
|
1606
1662
|
});
|
|
1607
|
-
var pendingInteractionApprovalSubjectSchema = z11.discriminatedUnion(
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
pendingInteractionPlanApprovalSubjectSchema
|
|
1614
|
-
]
|
|
1615
|
-
);
|
|
1663
|
+
var pendingInteractionApprovalSubjectSchema = z11.discriminatedUnion("kind", [
|
|
1664
|
+
pendingInteractionCommandApprovalSubjectSchema,
|
|
1665
|
+
pendingInteractionFileChangeApprovalSubjectSchema,
|
|
1666
|
+
pendingInteractionPermissionGrantApprovalSubjectSchema,
|
|
1667
|
+
pendingInteractionPlanApprovalSubjectSchema
|
|
1668
|
+
]);
|
|
1616
1669
|
var approvalPendingInteractionPayloadSchema = z11.object({
|
|
1617
1670
|
kind: z11.literal("approval"),
|
|
1618
1671
|
subject: pendingInteractionApprovalSubjectSchema,
|
|
@@ -1774,10 +1827,6 @@ var pendingInteractionPluginOriginSchema = z11.object({
|
|
|
1774
1827
|
pluginId: z11.string().min(1),
|
|
1775
1828
|
rendererId: z11.string().min(1)
|
|
1776
1829
|
});
|
|
1777
|
-
var pendingInteractionOriginSchema = z11.discriminatedUnion("kind", [
|
|
1778
|
-
pendingInteractionProviderOriginSchema,
|
|
1779
|
-
pendingInteractionPluginOriginSchema
|
|
1780
|
-
]);
|
|
1781
1830
|
var pendingInteractionCreateSchema = z11.object({
|
|
1782
1831
|
threadId: z11.string().min(1),
|
|
1783
1832
|
turnId: z11.string().min(1),
|
|
@@ -1847,7 +1896,6 @@ var systemEventTypeValues = [
|
|
|
1847
1896
|
// only, with no current producer.
|
|
1848
1897
|
"system/provider-turn-watchdog"
|
|
1849
1898
|
];
|
|
1850
|
-
var systemEventTypeSchema = z13.enum(systemEventTypeValues);
|
|
1851
1899
|
var threadTurnInitiatorValues = ["user", "agent", "system"];
|
|
1852
1900
|
var threadTurnInitiatorSchema = z13.enum(threadTurnInitiatorValues);
|
|
1853
1901
|
var systemMessageKindValues = [
|
|
@@ -1872,21 +1920,6 @@ var systemMessageSubjectSchema = z13.discriminatedUnion("kind", [
|
|
|
1872
1920
|
count: z13.number()
|
|
1873
1921
|
})
|
|
1874
1922
|
]);
|
|
1875
|
-
var threadProvisioningReasonValues = [
|
|
1876
|
-
"thread-created",
|
|
1877
|
-
"boot-created-thread",
|
|
1878
|
-
"tell-after-provisioning-failure",
|
|
1879
|
-
"tell-after-missing-environment-attachment",
|
|
1880
|
-
"resume-missing-provider-thread"
|
|
1881
|
-
];
|
|
1882
|
-
var threadEnvironmentStartReasonValues = [
|
|
1883
|
-
...threadProvisioningReasonValues,
|
|
1884
|
-
"boot-active-resume",
|
|
1885
|
-
"resume-existing-provider-session"
|
|
1886
|
-
];
|
|
1887
|
-
var threadEnvironmentStartReasonSchema = z13.enum(
|
|
1888
|
-
threadEnvironmentStartReasonValues
|
|
1889
|
-
);
|
|
1890
1923
|
var turnRequestOptionsSchema = recordedThreadExecutionOptionsSchema;
|
|
1891
1924
|
var turnRequestTargetSchema = z13.discriminatedUnion("kind", [
|
|
1892
1925
|
z13.object({ kind: z13.literal("thread-start") }),
|
|
@@ -2076,9 +2109,7 @@ var threadEventScopePolicyValues = [
|
|
|
2076
2109
|
"turn",
|
|
2077
2110
|
"thread-or-turn"
|
|
2078
2111
|
];
|
|
2079
|
-
var threadEventScopePolicySchema = z14.enum(
|
|
2080
|
-
threadEventScopePolicyValues
|
|
2081
|
-
);
|
|
2112
|
+
var threadEventScopePolicySchema = z14.enum(threadEventScopePolicyValues);
|
|
2082
2113
|
var threadEventScopeDefinitionByType = {
|
|
2083
2114
|
"thread/started": {
|
|
2084
2115
|
policy: "thread",
|
|
@@ -2319,11 +2350,7 @@ var providerRateLimitStateSchema = z16.object({
|
|
|
2319
2350
|
overageStatus: z16.enum(["allowed", "warning", "rejected", "unavailable"]).nullable(),
|
|
2320
2351
|
overageReason: z16.string().min(1).nullable()
|
|
2321
2352
|
});
|
|
2322
|
-
var threadEventFileChangeKindSchema = z16.enum([
|
|
2323
|
-
"add",
|
|
2324
|
-
"delete",
|
|
2325
|
-
"update"
|
|
2326
|
-
]);
|
|
2353
|
+
var threadEventFileChangeKindSchema = z16.enum(["add", "delete", "update"]);
|
|
2327
2354
|
var threadEventFileChangeSchema = z16.object({
|
|
2328
2355
|
path: z16.string(),
|
|
2329
2356
|
kind: threadEventFileChangeKindSchema,
|
|
@@ -2817,9 +2844,7 @@ var unscopedSystemEventSchema = z16.discriminatedUnion("type", [
|
|
|
2817
2844
|
threadId: z16.string()
|
|
2818
2845
|
}).merge(systemProviderTurnWatchdogEventDataSchema)
|
|
2819
2846
|
]);
|
|
2820
|
-
var systemEventSchema = unscopedSystemEventSchema.and(
|
|
2821
|
-
scopedEventDataSchema
|
|
2822
|
-
);
|
|
2847
|
+
var systemEventSchema = unscopedSystemEventSchema.and(scopedEventDataSchema);
|
|
2823
2848
|
var legacyClientRequestKey = ["clientRequest", "Sequence"].join("");
|
|
2824
2849
|
function isEventPropertyBag(value) {
|
|
2825
2850
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -2879,19 +2904,13 @@ var claudeTaskToolNameValues = [
|
|
|
2879
2904
|
"TaskUpdate"
|
|
2880
2905
|
];
|
|
2881
2906
|
var claudeTaskToolNameSchema = z17.enum(claudeTaskToolNameValues);
|
|
2882
|
-
var claudeTaskStatusValues = [
|
|
2883
|
-
"pending",
|
|
2884
|
-
"in_progress",
|
|
2885
|
-
"completed"
|
|
2886
|
-
];
|
|
2907
|
+
var claudeTaskStatusValues = ["pending", "in_progress", "completed"];
|
|
2887
2908
|
var claudeTaskStatusSchema = z17.enum(claudeTaskStatusValues);
|
|
2888
2909
|
var claudeTaskUpdateStatusValues = [
|
|
2889
2910
|
...claudeTaskStatusValues,
|
|
2890
2911
|
"deleted"
|
|
2891
2912
|
];
|
|
2892
|
-
var claudeTaskUpdateStatusSchema = z17.enum(
|
|
2893
|
-
claudeTaskUpdateStatusValues
|
|
2894
|
-
);
|
|
2913
|
+
var claudeTaskUpdateStatusSchema = z17.enum(claudeTaskUpdateStatusValues);
|
|
2895
2914
|
var claudeTaskListStatusValues = [
|
|
2896
2915
|
...claudeTaskStatusValues,
|
|
2897
2916
|
"deleted"
|
|
@@ -3161,6 +3180,10 @@ var providerInfoSchema = z21.object({
|
|
|
3161
3180
|
id: z21.string(),
|
|
3162
3181
|
displayName: z21.string(),
|
|
3163
3182
|
logoUrl: z21.string().min(1).nullable(),
|
|
3183
|
+
/** Sessionless maintenance methods declared by the provider plugin. */
|
|
3184
|
+
experimental_providerHealth: z21.boolean(),
|
|
3185
|
+
experimental_providerUsage: z21.boolean(),
|
|
3186
|
+
experimental_providerInstallation: z21.boolean(),
|
|
3164
3187
|
capabilities: providerCapabilitiesSchema,
|
|
3165
3188
|
composerActions: z21.array(providerComposerActionSchema),
|
|
3166
3189
|
available: z21.boolean()
|
|
@@ -3462,12 +3485,7 @@ var gitHostPullRequestSchema = z26.object({
|
|
|
3462
3485
|
mergeStateStatus: gitHostPullRequestMergeStateStatusSchema.nullable(),
|
|
3463
3486
|
mergeable: gitHostPullRequestMergeableSchema.nullable()
|
|
3464
3487
|
}).strict();
|
|
3465
|
-
var pullRequestStateSchema = z26.enum([
|
|
3466
|
-
"draft",
|
|
3467
|
-
"open",
|
|
3468
|
-
"merged",
|
|
3469
|
-
"closed"
|
|
3470
|
-
]);
|
|
3488
|
+
var pullRequestStateSchema = z26.enum(["draft", "open", "merged", "closed"]);
|
|
3471
3489
|
var threadPullRequestChecksStateSchema = z26.enum([
|
|
3472
3490
|
"passing",
|
|
3473
3491
|
"failing",
|
|
@@ -3646,11 +3664,151 @@ var bridgeExecutionOptionsSchema = z28.object({
|
|
|
3646
3664
|
providerOptions: z28.record(z28.string(), z28.unknown()).optional()
|
|
3647
3665
|
}).and(runtimePermissionPolicySchema);
|
|
3648
3666
|
|
|
3649
|
-
// ../provider-bridge-protocol/src/
|
|
3667
|
+
// ../provider-bridge-protocol/src/provider-maintenance.ts
|
|
3650
3668
|
import { z as z29 } from "zod";
|
|
3669
|
+
var experimental_providerMaintenanceParamsSchema = z29.object({
|
|
3670
|
+
providerId: z29.string().min(1),
|
|
3671
|
+
cwd: z29.string().min(1).optional(),
|
|
3672
|
+
providerOptions: z29.record(z29.string(), z29.unknown()).optional()
|
|
3673
|
+
}).passthrough();
|
|
3674
|
+
var experimental_providerInstallationRequirementSchema = z29.enum([
|
|
3675
|
+
"thread_rewind"
|
|
3676
|
+
]);
|
|
3677
|
+
var experimental_providerInstallationStatusParamsSchema = experimental_providerMaintenanceParamsSchema.extend({
|
|
3678
|
+
requirement: experimental_providerInstallationRequirementSchema.optional()
|
|
3679
|
+
});
|
|
3680
|
+
var experimental_providerHealthSchema = z29.object({
|
|
3681
|
+
status: z29.enum([
|
|
3682
|
+
"ready",
|
|
3683
|
+
"not_installed",
|
|
3684
|
+
"unauthenticated",
|
|
3685
|
+
"expired",
|
|
3686
|
+
"unsupported_version",
|
|
3687
|
+
"unknown"
|
|
3688
|
+
]),
|
|
3689
|
+
statusMessage: z29.string().min(1).nullable(),
|
|
3690
|
+
accountEmail: z29.string().nullable(),
|
|
3691
|
+
planLabel: z29.string().min(1).nullable(),
|
|
3692
|
+
installedVersion: z29.string().min(1).nullable(),
|
|
3693
|
+
minimumSupportedVersion: z29.string().min(1).nullable(),
|
|
3694
|
+
canInstall: z29.boolean(),
|
|
3695
|
+
canUpdate: z29.boolean(),
|
|
3696
|
+
loginCommand: z29.string().min(1).nullable()
|
|
3697
|
+
}).passthrough();
|
|
3698
|
+
var experimental_providerUsageWindowSchema = z29.object({
|
|
3699
|
+
label: z29.string().min(1),
|
|
3700
|
+
usedPercent: z29.number().min(0).max(100),
|
|
3701
|
+
resetsAt: z29.string().min(1).nullable(),
|
|
3702
|
+
cost: z29.object({
|
|
3703
|
+
usedUsdCents: z29.number().int().nonnegative(),
|
|
3704
|
+
limitUsdCents: z29.number().int().positive()
|
|
3705
|
+
}).optional()
|
|
3706
|
+
}).passthrough();
|
|
3707
|
+
var experimental_providerUsageSchema = z29.discriminatedUnion("status", [
|
|
3708
|
+
z29.object({
|
|
3709
|
+
status: z29.literal("ok"),
|
|
3710
|
+
accountEmail: z29.string().email().nullable(),
|
|
3711
|
+
planLabel: z29.string().min(1).nullable(),
|
|
3712
|
+
windows: z29.array(experimental_providerUsageWindowSchema)
|
|
3713
|
+
}).passthrough(),
|
|
3714
|
+
z29.object({ status: z29.literal("not_installed") }).passthrough(),
|
|
3715
|
+
z29.object({ status: z29.literal("unauthenticated") }).passthrough(),
|
|
3716
|
+
z29.object({ status: z29.literal("expired") }).passthrough(),
|
|
3717
|
+
z29.object({
|
|
3718
|
+
status: z29.literal("error"),
|
|
3719
|
+
message: z29.string().min(1),
|
|
3720
|
+
planLabel: z29.string().min(1).nullable().default(null),
|
|
3721
|
+
accountEmail: z29.string().nullable().default(null)
|
|
3722
|
+
}).passthrough()
|
|
3723
|
+
]);
|
|
3724
|
+
var experimental_providerHealthResultSchema = z29.discriminatedUnion(
|
|
3725
|
+
"supported",
|
|
3726
|
+
[
|
|
3727
|
+
z29.object({ supported: z29.literal(false) }).passthrough(),
|
|
3728
|
+
z29.object({
|
|
3729
|
+
supported: z29.literal(true),
|
|
3730
|
+
health: experimental_providerHealthSchema
|
|
3731
|
+
}).passthrough()
|
|
3732
|
+
]
|
|
3733
|
+
);
|
|
3734
|
+
var experimental_providerUsageResultSchema = z29.discriminatedUnion(
|
|
3735
|
+
"supported",
|
|
3736
|
+
[
|
|
3737
|
+
z29.object({ supported: z29.literal(false) }).passthrough(),
|
|
3738
|
+
z29.object({
|
|
3739
|
+
supported: z29.literal(true),
|
|
3740
|
+
usage: experimental_providerUsageSchema
|
|
3741
|
+
}).passthrough()
|
|
3742
|
+
]
|
|
3743
|
+
);
|
|
3744
|
+
var experimental_providerInstallationActionKindSchema = z29.enum([
|
|
3745
|
+
"install",
|
|
3746
|
+
"update"
|
|
3747
|
+
]);
|
|
3748
|
+
var experimental_providerInstallationActionSchema = z29.object({
|
|
3749
|
+
kind: experimental_providerInstallationActionKindSchema,
|
|
3750
|
+
label: z29.enum(["Install", "Update"]),
|
|
3751
|
+
command: z29.string().min(1)
|
|
3752
|
+
}).passthrough();
|
|
3753
|
+
var experimental_providerInstallationSourceSchema = z29.enum([
|
|
3754
|
+
"notInstalled",
|
|
3755
|
+
"npmGlobal",
|
|
3756
|
+
"external"
|
|
3757
|
+
]);
|
|
3758
|
+
var experimental_providerInstallationStatusSchema = z29.object({
|
|
3759
|
+
executableName: z29.string().min(1),
|
|
3760
|
+
executablePath: z29.string().min(1).nullable(),
|
|
3761
|
+
installed: z29.boolean(),
|
|
3762
|
+
installSource: experimental_providerInstallationSourceSchema,
|
|
3763
|
+
currentVersion: z29.string().min(1).nullable(),
|
|
3764
|
+
latestVersion: z29.string().min(1).nullable(),
|
|
3765
|
+
minimumSupportedVersion: z29.string().min(1).nullable(),
|
|
3766
|
+
npmPackageName: z29.string().min(1).nullable(),
|
|
3767
|
+
npmGlobalPackageVersion: z29.string().min(1).nullable(),
|
|
3768
|
+
installAction: experimental_providerInstallationActionSchema.nullable(),
|
|
3769
|
+
needsUpdate: z29.boolean(),
|
|
3770
|
+
versionUnsupported: z29.boolean()
|
|
3771
|
+
}).passthrough();
|
|
3772
|
+
var experimental_providerInstallationRunParamsSchema = experimental_providerMaintenanceParamsSchema.extend({
|
|
3773
|
+
action: experimental_providerInstallationActionKindSchema
|
|
3774
|
+
});
|
|
3775
|
+
var experimental_providerInstallationCommandSchema = z29.object({
|
|
3776
|
+
command: z29.string().min(1),
|
|
3777
|
+
args: z29.array(z29.string()).max(64),
|
|
3778
|
+
displayCommand: z29.string().min(1)
|
|
3779
|
+
}).passthrough();
|
|
3780
|
+
var experimental_providerInstallationVerificationSchema = z29.discriminatedUnion("kind", [
|
|
3781
|
+
z29.object({ kind: z29.literal("installed") }).passthrough(),
|
|
3782
|
+
z29.object({
|
|
3783
|
+
kind: z29.literal("version_changed"),
|
|
3784
|
+
previousVersion: z29.string().min(1)
|
|
3785
|
+
}).passthrough(),
|
|
3786
|
+
z29.object({
|
|
3787
|
+
kind: z29.literal("version_at_least"),
|
|
3788
|
+
version: z29.string().min(1)
|
|
3789
|
+
}).passthrough()
|
|
3790
|
+
]);
|
|
3791
|
+
var experimental_providerInstallationRunResultSchema = z29.discriminatedUnion("available", [
|
|
3792
|
+
z29.object({
|
|
3793
|
+
available: z29.literal(false),
|
|
3794
|
+
message: z29.string().min(1)
|
|
3795
|
+
}).passthrough(),
|
|
3796
|
+
z29.object({
|
|
3797
|
+
available: z29.literal(true),
|
|
3798
|
+
command: experimental_providerInstallationCommandSchema,
|
|
3799
|
+
verification: experimental_providerInstallationVerificationSchema
|
|
3800
|
+
}).passthrough()
|
|
3801
|
+
]);
|
|
3802
|
+
|
|
3803
|
+
// ../provider-bridge-protocol/src/requests.ts
|
|
3804
|
+
import { z as z30 } from "zod";
|
|
3651
3805
|
var BRIDGE_REQUEST_METHODS = {
|
|
3652
3806
|
initialize: "initialize",
|
|
3653
3807
|
modelList: "model/list",
|
|
3808
|
+
experimentalProviderHealth: "provider/health",
|
|
3809
|
+
experimentalProviderUsage: "provider/usage",
|
|
3810
|
+
experimentalProviderInstallationStatus: "provider/installation/status",
|
|
3811
|
+
experimentalProviderInstallationRun: "provider/installation/run",
|
|
3654
3812
|
threadStart: "thread/start",
|
|
3655
3813
|
threadResume: "thread/resume",
|
|
3656
3814
|
threadFork: "thread/fork",
|
|
@@ -3664,99 +3822,96 @@ var BRIDGE_REQUEST_METHODS = {
|
|
|
3664
3822
|
turnSteer: "turn/steer",
|
|
3665
3823
|
skillsConfigure: "skills/configure"
|
|
3666
3824
|
};
|
|
3667
|
-
var bridgeRequestMethodValues = Object.values(
|
|
3668
|
-
BRIDGE_REQUEST_METHODS
|
|
3669
|
-
);
|
|
3670
3825
|
var sessionConstructionFields = {
|
|
3671
|
-
threadId:
|
|
3672
|
-
cwd:
|
|
3826
|
+
threadId: z30.string().min(1),
|
|
3827
|
+
cwd: z30.string().min(1),
|
|
3673
3828
|
options: bridgeExecutionOptionsSchema,
|
|
3674
|
-
dynamicTools:
|
|
3675
|
-
disallowedTools:
|
|
3829
|
+
dynamicTools: z30.array(dynamicToolSchema).optional(),
|
|
3830
|
+
disallowedTools: z30.array(z30.string().min(1)).optional(),
|
|
3676
3831
|
instructionMode: instructionModeSchema
|
|
3677
3832
|
};
|
|
3678
|
-
var modelListParamsSchema =
|
|
3679
|
-
var threadStartParamsSchema =
|
|
3833
|
+
var modelListParamsSchema = z30.object({ cwd: z30.string().min(1).optional() }).passthrough();
|
|
3834
|
+
var threadStartParamsSchema = z30.object({
|
|
3680
3835
|
...sessionConstructionFields,
|
|
3681
|
-
input:
|
|
3836
|
+
input: z30.array(promptInputSchema).optional()
|
|
3682
3837
|
}).passthrough();
|
|
3683
|
-
var threadResumeParamsSchema =
|
|
3838
|
+
var threadResumeParamsSchema = z30.object({
|
|
3684
3839
|
...sessionConstructionFields,
|
|
3685
|
-
providerThreadId:
|
|
3840
|
+
providerThreadId: z30.string().min(1)
|
|
3686
3841
|
}).passthrough();
|
|
3687
|
-
var threadForkParamsSchema =
|
|
3842
|
+
var threadForkParamsSchema = z30.object({
|
|
3688
3843
|
...sessionConstructionFields,
|
|
3689
|
-
sourceProviderThreadId:
|
|
3844
|
+
sourceProviderThreadId: z30.string().min(1),
|
|
3690
3845
|
/**
|
|
3691
3846
|
* Absent means fork at the tip. Bridges whose handshake advertises
|
|
3692
3847
|
* `fork: "tip"` reject a request carrying a checkpoint instead of
|
|
3693
3848
|
* silently cloning more history than the bb timeline shows.
|
|
3694
3849
|
*/
|
|
3695
|
-
sourceProviderCheckpointId:
|
|
3850
|
+
sourceProviderCheckpointId: z30.string().min(1).optional()
|
|
3696
3851
|
}).passthrough();
|
|
3697
|
-
var threadStopParamsSchema =
|
|
3698
|
-
threadId:
|
|
3699
|
-
providerThreadId:
|
|
3852
|
+
var threadStopParamsSchema = z30.object({
|
|
3853
|
+
threadId: z30.string().min(1),
|
|
3854
|
+
providerThreadId: z30.string().min(1),
|
|
3700
3855
|
/**
|
|
3701
3856
|
* "interrupt" stops an active turn and settles it as interrupted.
|
|
3702
3857
|
* "release" detaches an idle session so its resources can be reclaimed;
|
|
3703
3858
|
* it must never fabricate an interruption. One verb serving both intents
|
|
3704
3859
|
* is the #1584 incident — the field is required.
|
|
3705
3860
|
*/
|
|
3706
|
-
intent:
|
|
3861
|
+
intent: z30.enum(["interrupt", "release"]),
|
|
3707
3862
|
/** Non-null when the stop interrupts an active provider turn. */
|
|
3708
|
-
activeTurnId:
|
|
3863
|
+
activeTurnId: z30.string().min(1).nullable()
|
|
3709
3864
|
}).passthrough();
|
|
3710
|
-
var threadRefParams =
|
|
3711
|
-
threadId:
|
|
3712
|
-
providerThreadId:
|
|
3865
|
+
var threadRefParams = z30.object({
|
|
3866
|
+
threadId: z30.string().min(1),
|
|
3867
|
+
providerThreadId: z30.string().min(1)
|
|
3713
3868
|
}).passthrough();
|
|
3714
3869
|
var threadDiscardParamsSchema = threadRefParams;
|
|
3715
3870
|
var threadArchiveParamsSchema = threadRefParams;
|
|
3716
3871
|
var threadUnarchiveParamsSchema = threadRefParams;
|
|
3717
3872
|
var threadGoalClearParamsSchema = threadRefParams;
|
|
3718
|
-
var threadNameSetParamsSchema =
|
|
3719
|
-
threadId:
|
|
3720
|
-
providerThreadId:
|
|
3721
|
-
title:
|
|
3873
|
+
var threadNameSetParamsSchema = z30.object({
|
|
3874
|
+
threadId: z30.string().min(1),
|
|
3875
|
+
providerThreadId: z30.string().min(1),
|
|
3876
|
+
title: z30.string().min(1)
|
|
3722
3877
|
}).passthrough();
|
|
3723
3878
|
var turnInputFields = {
|
|
3724
|
-
threadId:
|
|
3725
|
-
providerThreadId:
|
|
3726
|
-
input:
|
|
3879
|
+
threadId: z30.string().min(1),
|
|
3880
|
+
providerThreadId: z30.string().min(1),
|
|
3881
|
+
input: z30.array(promptInputSchema),
|
|
3727
3882
|
clientRequestId: clientTurnRequestIdSchema,
|
|
3728
3883
|
options: bridgeExecutionOptionsSchema
|
|
3729
3884
|
};
|
|
3730
|
-
var turnStartParamsSchema =
|
|
3731
|
-
var turnSteerParamsSchema =
|
|
3885
|
+
var turnStartParamsSchema = z30.object(turnInputFields).passthrough();
|
|
3886
|
+
var turnSteerParamsSchema = z30.object({
|
|
3732
3887
|
...turnInputFields,
|
|
3733
|
-
expectedTurnId:
|
|
3888
|
+
expectedTurnId: z30.string().min(1)
|
|
3734
3889
|
}).passthrough();
|
|
3735
|
-
var skillsConfigureRootSchema =
|
|
3736
|
-
id:
|
|
3737
|
-
path:
|
|
3738
|
-
skills:
|
|
3739
|
-
|
|
3740
|
-
name:
|
|
3741
|
-
description:
|
|
3890
|
+
var skillsConfigureRootSchema = z30.object({
|
|
3891
|
+
id: z30.string().min(1),
|
|
3892
|
+
path: z30.string().min(1),
|
|
3893
|
+
skills: z30.array(
|
|
3894
|
+
z30.object({
|
|
3895
|
+
name: z30.string().min(1),
|
|
3896
|
+
description: z30.string()
|
|
3742
3897
|
}).passthrough()
|
|
3743
3898
|
)
|
|
3744
3899
|
}).passthrough();
|
|
3745
|
-
var skillsConfigureParamsSchema =
|
|
3746
|
-
roots:
|
|
3900
|
+
var skillsConfigureParamsSchema = z30.object({
|
|
3901
|
+
roots: z30.array(skillsConfigureRootSchema)
|
|
3747
3902
|
}).passthrough();
|
|
3748
|
-
var threadIdentityResultSchema =
|
|
3749
|
-
providerThreadId:
|
|
3903
|
+
var threadIdentityResultSchema = z30.object({
|
|
3904
|
+
providerThreadId: z30.string().min(1),
|
|
3750
3905
|
/** Refines the handshake's `sessionRestore` for this session. */
|
|
3751
|
-
sessionRestorable:
|
|
3906
|
+
sessionRestorable: z30.boolean().optional()
|
|
3752
3907
|
}).passthrough();
|
|
3753
|
-
var modelListResultSchema =
|
|
3754
|
-
models:
|
|
3755
|
-
selectedOnlyModels:
|
|
3908
|
+
var modelListResultSchema = z30.object({
|
|
3909
|
+
models: z30.array(availableModelSchema),
|
|
3910
|
+
selectedOnlyModels: z30.array(availableModelSchema).default([])
|
|
3756
3911
|
}).passthrough();
|
|
3757
3912
|
|
|
3758
3913
|
// ../provider-bridge-protocol/src/notifications.ts
|
|
3759
|
-
import { z as
|
|
3914
|
+
import { z as z31 } from "zod";
|
|
3760
3915
|
var BRIDGE_NOTIFICATION_METHODS = {
|
|
3761
3916
|
threadIdentity: "thread/identity",
|
|
3762
3917
|
sessionReplaced: "session/replaced",
|
|
@@ -3764,65 +3919,65 @@ var BRIDGE_NOTIFICATION_METHODS = {
|
|
|
3764
3919
|
providerRaw: "provider/raw",
|
|
3765
3920
|
error: "error"
|
|
3766
3921
|
};
|
|
3767
|
-
var threadIdentityNotificationSchema =
|
|
3768
|
-
threadId:
|
|
3769
|
-
providerThreadId:
|
|
3922
|
+
var threadIdentityNotificationSchema = z31.object({
|
|
3923
|
+
threadId: z31.string().min(1),
|
|
3924
|
+
providerThreadId: z31.string().min(1),
|
|
3770
3925
|
/** Refines the handshake's `sessionRestore` for this session. */
|
|
3771
|
-
sessionRestorable:
|
|
3926
|
+
sessionRestorable: z31.boolean().optional()
|
|
3772
3927
|
}).passthrough();
|
|
3773
|
-
var sessionReplacedNotificationSchema =
|
|
3774
|
-
threadId:
|
|
3928
|
+
var sessionReplacedNotificationSchema = z31.object({
|
|
3929
|
+
threadId: z31.string().min(1),
|
|
3775
3930
|
/** Identity of the replacement session (may equal the old identity). */
|
|
3776
|
-
providerThreadId:
|
|
3931
|
+
providerThreadId: z31.string().min(1).nullable(),
|
|
3777
3932
|
/** Human-readable cause, shown in the timeline. */
|
|
3778
|
-
reason:
|
|
3933
|
+
reason: z31.string().min(1),
|
|
3779
3934
|
/** True when provider-side context did not survive the replacement. */
|
|
3780
|
-
contextLost:
|
|
3935
|
+
contextLost: z31.boolean().default(false)
|
|
3781
3936
|
}).passthrough();
|
|
3782
|
-
var threadOpenWorkNotificationSchema =
|
|
3783
|
-
threadId:
|
|
3784
|
-
open:
|
|
3937
|
+
var threadOpenWorkNotificationSchema = z31.object({
|
|
3938
|
+
threadId: z31.string().min(1),
|
|
3939
|
+
open: z31.boolean()
|
|
3785
3940
|
}).passthrough();
|
|
3786
|
-
var providerRawNotificationSchema =
|
|
3787
|
-
threadId:
|
|
3788
|
-
coverage:
|
|
3789
|
-
payload:
|
|
3941
|
+
var providerRawNotificationSchema = z31.object({
|
|
3942
|
+
threadId: z31.string().min(1).optional(),
|
|
3943
|
+
coverage: z31.enum(["noise", "unknown"]),
|
|
3944
|
+
payload: z31.unknown()
|
|
3790
3945
|
}).passthrough();
|
|
3791
|
-
var errorNotificationSchema =
|
|
3792
|
-
threadId:
|
|
3793
|
-
message:
|
|
3946
|
+
var errorNotificationSchema = z31.object({
|
|
3947
|
+
threadId: z31.string().min(1).optional(),
|
|
3948
|
+
message: z31.string().min(1)
|
|
3794
3949
|
}).passthrough();
|
|
3795
3950
|
|
|
3796
3951
|
// ../provider-bridge-protocol/src/bridge-requests.ts
|
|
3797
|
-
import { z as
|
|
3952
|
+
import { z as z32 } from "zod";
|
|
3798
3953
|
var BRIDGE_INBOUND_REQUEST_METHODS = {
|
|
3799
3954
|
toolCall: "item/tool/call",
|
|
3800
3955
|
interactionRequest: "interaction/request"
|
|
3801
3956
|
};
|
|
3802
|
-
var toolCallRequestParamsSchema =
|
|
3803
|
-
providerThreadId:
|
|
3804
|
-
threadId:
|
|
3805
|
-
turnId:
|
|
3806
|
-
callId:
|
|
3807
|
-
tool:
|
|
3808
|
-
arguments:
|
|
3957
|
+
var toolCallRequestParamsSchema = z32.object({
|
|
3958
|
+
providerThreadId: z32.string().min(1),
|
|
3959
|
+
threadId: z32.string().min(1).optional(),
|
|
3960
|
+
turnId: z32.union([z32.string().min(1), z32.null()]),
|
|
3961
|
+
callId: z32.string().min(1),
|
|
3962
|
+
tool: z32.string().min(1),
|
|
3963
|
+
arguments: z32.unknown()
|
|
3809
3964
|
}).passthrough();
|
|
3810
|
-
var toolCallResultSchema =
|
|
3811
|
-
success:
|
|
3812
|
-
contentItems:
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
type:
|
|
3817
|
-
imageUrl:
|
|
3965
|
+
var toolCallResultSchema = z32.object({
|
|
3966
|
+
success: z32.boolean(),
|
|
3967
|
+
contentItems: z32.array(
|
|
3968
|
+
z32.discriminatedUnion("type", [
|
|
3969
|
+
z32.object({ type: z32.literal("inputText"), text: z32.string() }),
|
|
3970
|
+
z32.object({
|
|
3971
|
+
type: z32.literal("inputImage"),
|
|
3972
|
+
imageUrl: z32.string().min(1)
|
|
3818
3973
|
})
|
|
3819
3974
|
])
|
|
3820
3975
|
)
|
|
3821
3976
|
}).passthrough();
|
|
3822
|
-
var interactionRequestParamsSchema =
|
|
3823
|
-
providerThreadId:
|
|
3824
|
-
threadId:
|
|
3825
|
-
turnId:
|
|
3977
|
+
var interactionRequestParamsSchema = z32.object({
|
|
3978
|
+
providerThreadId: z32.string().min(1),
|
|
3979
|
+
threadId: z32.string().min(1).optional(),
|
|
3980
|
+
turnId: z32.union([z32.string().min(1), z32.null()]),
|
|
3826
3981
|
payload: pendingInteractionPayloadSchema,
|
|
3827
3982
|
/**
|
|
3828
3983
|
* The request's turn id and approval-subject item ids are in the
|
|
@@ -3832,7 +3987,7 @@ var interactionRequestParamsSchema = z31.object({
|
|
|
3832
3987
|
* already app-visible (bridges whose approval subjects never referenced
|
|
3833
3988
|
* timeline ids — ACP's approval ids never matched timeline ids).
|
|
3834
3989
|
*/
|
|
3835
|
-
providerNativeIds:
|
|
3990
|
+
providerNativeIds: z32.boolean().optional()
|
|
3836
3991
|
}).passthrough();
|
|
3837
3992
|
|
|
3838
3993
|
// ../provider-bridge-protocol/src/errors.ts
|
|
@@ -3852,31 +4007,31 @@ var BRIDGE_JSON_RPC_ERRORS = {
|
|
|
3852
4007
|
};
|
|
3853
4008
|
|
|
3854
4009
|
// ../provider-bridge-protocol/src/thread-delta.ts
|
|
3855
|
-
import { z as
|
|
4010
|
+
import { z as z33 } from "zod";
|
|
3856
4011
|
var THREAD_DELTA_NOTIFICATION_METHOD = "thread/delta";
|
|
3857
4012
|
var THREAD_DELTA_KEY_SEPARATOR = "";
|
|
3858
|
-
var deltaKeyPartSchema =
|
|
4013
|
+
var deltaKeyPartSchema = z33.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
|
|
3859
4014
|
message: "provider keys must not contain the internal key separator (\\u001f)"
|
|
3860
4015
|
});
|
|
3861
|
-
var deltaItemKeySchema =
|
|
4016
|
+
var deltaItemKeySchema = z33.object({
|
|
3862
4017
|
providerItemId: deltaKeyPartSchema.optional(),
|
|
3863
4018
|
channel: deltaKeyPartSchema.optional(),
|
|
3864
4019
|
parentRef: deltaKeyPartSchema.optional()
|
|
3865
4020
|
});
|
|
3866
4021
|
var providerTurnIdSchema = deltaKeyPartSchema;
|
|
3867
|
-
var deltaFileChangeSchema =
|
|
3868
|
-
path:
|
|
4022
|
+
var deltaFileChangeSchema = z33.object({
|
|
4023
|
+
path: z33.string(),
|
|
3869
4024
|
/** The bridge states the change kind; the assembler never derives it. */
|
|
3870
|
-
kind:
|
|
3871
|
-
movePath:
|
|
4025
|
+
kind: z33.enum(["add", "update", "delete"]),
|
|
4026
|
+
movePath: z33.string().optional(),
|
|
3872
4027
|
/** Provider-supplied unified diff; preferred over old/new text building. */
|
|
3873
|
-
diff:
|
|
3874
|
-
oldText:
|
|
4028
|
+
diff: z33.string().optional(),
|
|
4029
|
+
oldText: z33.string().optional(),
|
|
3875
4030
|
/** When present the assembler builds the unified diff from old/new text. */
|
|
3876
|
-
newText:
|
|
4031
|
+
newText: z33.string().optional()
|
|
3877
4032
|
});
|
|
3878
|
-
var deltaBackgroundTaskShapeSchema =
|
|
3879
|
-
type:
|
|
4033
|
+
var deltaBackgroundTaskShapeSchema = z33.object({
|
|
4034
|
+
type: z33.literal("backgroundTask"),
|
|
3880
4035
|
/**
|
|
3881
4036
|
* The provider's stable task id, shared by every generation (restart) of
|
|
3882
4037
|
* the same task. Rides through to the canonical item so consumers can
|
|
@@ -3884,86 +4039,86 @@ var deltaBackgroundTaskShapeSchema = z32.object({
|
|
|
3884
4039
|
* mints fresh item ids per generation, so identity must travel as data,
|
|
3885
4040
|
* never as id text.
|
|
3886
4041
|
*/
|
|
3887
|
-
familyId:
|
|
3888
|
-
taskType:
|
|
3889
|
-
description:
|
|
4042
|
+
familyId: z33.string().min(1),
|
|
4043
|
+
taskType: z33.string(),
|
|
4044
|
+
description: z33.string(),
|
|
3890
4045
|
status: threadEventItemStatusSchema,
|
|
3891
4046
|
taskStatus: backgroundTaskStatusSchema,
|
|
3892
|
-
skipTranscript:
|
|
3893
|
-
workflowName:
|
|
4047
|
+
skipTranscript: z33.boolean(),
|
|
4048
|
+
workflowName: z33.string().optional(),
|
|
3894
4049
|
workflow: workflowProgressSnapshotSchema.optional(),
|
|
3895
4050
|
usage: backgroundTaskUsageSchema.optional(),
|
|
3896
|
-
summary:
|
|
3897
|
-
error:
|
|
3898
|
-
outputFile:
|
|
3899
|
-
});
|
|
3900
|
-
var deltaItemShapeSchema =
|
|
3901
|
-
|
|
3902
|
-
type:
|
|
3903
|
-
command:
|
|
3904
|
-
cwd:
|
|
3905
|
-
aggregatedOutput:
|
|
3906
|
-
exitCode:
|
|
3907
|
-
durationMs:
|
|
3908
|
-
}),
|
|
3909
|
-
|
|
3910
|
-
type:
|
|
4051
|
+
summary: z33.string().optional(),
|
|
4052
|
+
error: z33.string().optional(),
|
|
4053
|
+
outputFile: z33.string().optional()
|
|
4054
|
+
});
|
|
4055
|
+
var deltaItemShapeSchema = z33.discriminatedUnion("type", [
|
|
4056
|
+
z33.object({
|
|
4057
|
+
type: z33.literal("command"),
|
|
4058
|
+
command: z33.string(),
|
|
4059
|
+
cwd: z33.string(),
|
|
4060
|
+
aggregatedOutput: z33.string().optional(),
|
|
4061
|
+
exitCode: z33.number().optional(),
|
|
4062
|
+
durationMs: z33.number().optional()
|
|
4063
|
+
}),
|
|
4064
|
+
z33.object({
|
|
4065
|
+
type: z33.literal("fileChange"),
|
|
3911
4066
|
/** Empty only on bare close-without-open fallbacks (path unknown). */
|
|
3912
|
-
changes:
|
|
3913
|
-
}),
|
|
3914
|
-
|
|
3915
|
-
type:
|
|
3916
|
-
tool:
|
|
3917
|
-
server:
|
|
3918
|
-
args:
|
|
3919
|
-
result:
|
|
3920
|
-
error:
|
|
3921
|
-
durationMs:
|
|
3922
|
-
}),
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
type:
|
|
3927
|
-
summary:
|
|
3928
|
-
content:
|
|
3929
|
-
}),
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
type:
|
|
3933
|
-
queries:
|
|
3934
|
-
}),
|
|
3935
|
-
|
|
3936
|
-
type:
|
|
3937
|
-
url:
|
|
3938
|
-
prompt:
|
|
3939
|
-
pattern:
|
|
3940
|
-
}),
|
|
3941
|
-
|
|
4067
|
+
changes: z33.array(deltaFileChangeSchema)
|
|
4068
|
+
}),
|
|
4069
|
+
z33.object({
|
|
4070
|
+
type: z33.literal("tool"),
|
|
4071
|
+
tool: z33.string(),
|
|
4072
|
+
server: z33.string().optional(),
|
|
4073
|
+
args: z33.unknown().optional(),
|
|
4074
|
+
result: z33.unknown().optional(),
|
|
4075
|
+
error: z33.string().optional(),
|
|
4076
|
+
durationMs: z33.number().optional()
|
|
4077
|
+
}),
|
|
4078
|
+
z33.object({ type: z33.literal("compaction") }),
|
|
4079
|
+
z33.object({ type: z33.literal("agentMessage"), text: z33.string() }),
|
|
4080
|
+
z33.object({
|
|
4081
|
+
type: z33.literal("reasoning"),
|
|
4082
|
+
summary: z33.array(z33.string()),
|
|
4083
|
+
content: z33.array(z33.string())
|
|
4084
|
+
}),
|
|
4085
|
+
z33.object({ type: z33.literal("plan"), text: z33.string() }),
|
|
4086
|
+
z33.object({
|
|
4087
|
+
type: z33.literal("webSearch"),
|
|
4088
|
+
queries: z33.array(z33.string()).min(1)
|
|
4089
|
+
}),
|
|
4090
|
+
z33.object({
|
|
4091
|
+
type: z33.literal("webFetch"),
|
|
4092
|
+
url: z33.string(),
|
|
4093
|
+
prompt: z33.string().nullable().optional(),
|
|
4094
|
+
pattern: z33.string().nullable()
|
|
4095
|
+
}),
|
|
4096
|
+
z33.object({ type: z33.literal("imageView"), path: z33.string() }),
|
|
3942
4097
|
deltaBackgroundTaskShapeSchema
|
|
3943
4098
|
]);
|
|
3944
|
-
var deltaMessageChannelSchema =
|
|
3945
|
-
var deltaTextChannelSchema =
|
|
4099
|
+
var deltaMessageChannelSchema = z33.enum(["assistant", "reasoning"]);
|
|
4100
|
+
var deltaTextChannelSchema = z33.enum([
|
|
3946
4101
|
"agentMessage",
|
|
3947
4102
|
"reasoningSummary",
|
|
3948
4103
|
"reasoningText",
|
|
3949
4104
|
"plan"
|
|
3950
4105
|
]);
|
|
3951
|
-
var deltaOutputChannelSchema =
|
|
3952
|
-
var deltaErrorSchema =
|
|
3953
|
-
var deltaAttachSchema =
|
|
3954
|
-
var deltaNoTurnFallbackSchema =
|
|
4106
|
+
var deltaOutputChannelSchema = z33.enum(["command", "fileChange"]);
|
|
4107
|
+
var deltaErrorSchema = z33.object({ message: z33.string() });
|
|
4108
|
+
var deltaAttachSchema = z33.enum(["open", "currentOrLast"]);
|
|
4109
|
+
var deltaNoTurnFallbackSchema = z33.object({
|
|
3955
4110
|
raw: providerRawEventSchema,
|
|
3956
|
-
rawType:
|
|
4111
|
+
rawType: z33.string()
|
|
3957
4112
|
});
|
|
3958
|
-
var threadDeltaSchema =
|
|
4113
|
+
var threadDeltaSchema = z33.discriminatedUnion("kind", [
|
|
3959
4114
|
/**
|
|
3960
4115
|
* The provider consumed an input (immediate or steered). The assembler owns
|
|
3961
4116
|
* the queue-until-turn-opens behavior and the terminal-turn invariant.
|
|
3962
4117
|
* With `providerTurnId` the acceptance is emitted against that vouched turn
|
|
3963
4118
|
* directly (codex correlates acceptance to a named native turn).
|
|
3964
4119
|
*/
|
|
3965
|
-
|
|
3966
|
-
kind:
|
|
4120
|
+
z33.object({
|
|
4121
|
+
kind: z33.literal("input.accepted"),
|
|
3967
4122
|
clientRequestId: clientTurnRequestIdSchema,
|
|
3968
4123
|
providerTurnId: providerTurnIdSchema.optional()
|
|
3969
4124
|
}),
|
|
@@ -3974,8 +4129,8 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
3974
4129
|
* subagent child turns onto one thread) and none of the current-turn
|
|
3975
4130
|
* machinery is touched.
|
|
3976
4131
|
*/
|
|
3977
|
-
|
|
3978
|
-
kind:
|
|
4132
|
+
z33.object({
|
|
4133
|
+
kind: z33.literal("turn.open"),
|
|
3979
4134
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
3980
4135
|
/** Provider-native parent tool-call id for delegated child turns. */
|
|
3981
4136
|
parentRef: deltaKeyPartSchema.optional()
|
|
@@ -3987,12 +4142,12 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
3987
4142
|
* always settled. A keyed boundary (`providerTurnId`) always emits — the
|
|
3988
4143
|
* provider named the turn — and settles only that turn.
|
|
3989
4144
|
*/
|
|
3990
|
-
|
|
3991
|
-
kind:
|
|
4145
|
+
z33.object({
|
|
4146
|
+
kind: z33.literal("turn.boundary"),
|
|
3992
4147
|
status: threadEventTurnStatusSchema,
|
|
3993
4148
|
error: deltaErrorSchema.optional(),
|
|
3994
|
-
providerCheckpointId:
|
|
3995
|
-
claimIfIdle:
|
|
4149
|
+
providerCheckpointId: z33.string().min(1).optional(),
|
|
4150
|
+
claimIfIdle: z33.boolean().optional(),
|
|
3996
4151
|
providerTurnId: providerTurnIdSchema.optional()
|
|
3997
4152
|
}),
|
|
3998
4153
|
/**
|
|
@@ -4002,8 +4157,8 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4002
4157
|
* `providerItemId` reuses its minted bb id (an explicit open reopens the
|
|
4003
4158
|
* same item, codex's settle/reopen rule).
|
|
4004
4159
|
*/
|
|
4005
|
-
|
|
4006
|
-
kind:
|
|
4160
|
+
z33.object({
|
|
4161
|
+
kind: z33.literal("item.open"),
|
|
4007
4162
|
key: deltaItemKeySchema,
|
|
4008
4163
|
item: deltaItemShapeSchema,
|
|
4009
4164
|
attach: deltaAttachSchema.optional(),
|
|
@@ -4023,15 +4178,15 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4023
4178
|
* for a settled id is dropped and an explicit `item.open` reopens the id
|
|
4024
4179
|
* (codex retries the terminal notification after approvals).
|
|
4025
4180
|
*/
|
|
4026
|
-
|
|
4027
|
-
kind:
|
|
4181
|
+
z33.object({
|
|
4182
|
+
kind: z33.literal("item.close"),
|
|
4028
4183
|
key: deltaItemKeySchema,
|
|
4029
4184
|
status: threadEventItemStatusSchema,
|
|
4030
|
-
resultText:
|
|
4031
|
-
exitCode:
|
|
4032
|
-
aggregatedOutput:
|
|
4185
|
+
resultText: z33.string().optional(),
|
|
4186
|
+
exitCode: z33.number().optional(),
|
|
4187
|
+
aggregatedOutput: z33.string().optional(),
|
|
4033
4188
|
/** Terminal approval verdict (codex declined → denied). Default null. */
|
|
4034
|
-
approvalStatus:
|
|
4189
|
+
approvalStatus: z33.literal("denied").optional(),
|
|
4035
4190
|
item: deltaItemShapeSchema,
|
|
4036
4191
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4037
4192
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
@@ -4040,10 +4195,10 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4040
4195
|
* The provider's plan for the open turn (ACP `plan` updates, codex
|
|
4041
4196
|
* `turn/plan/updated`). Mirrors `turn/plan/updated`.
|
|
4042
4197
|
*/
|
|
4043
|
-
|
|
4044
|
-
kind:
|
|
4045
|
-
steps:
|
|
4046
|
-
explanation:
|
|
4198
|
+
z33.object({
|
|
4199
|
+
kind: z33.literal("turn.plan"),
|
|
4200
|
+
steps: z33.array(threadEventPlanStepSchema),
|
|
4201
|
+
explanation: z33.string().optional(),
|
|
4047
4202
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4048
4203
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4049
4204
|
}),
|
|
@@ -4058,12 +4213,12 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4058
4213
|
* elapses, and an `item.close` supersedes it). `flush: true` bypasses the
|
|
4059
4214
|
* throttle and resets the window — status transitions must land immediately.
|
|
4060
4215
|
*/
|
|
4061
|
-
|
|
4062
|
-
kind:
|
|
4216
|
+
z33.object({
|
|
4217
|
+
kind: z33.literal("item.progress"),
|
|
4063
4218
|
key: deltaItemKeySchema,
|
|
4064
|
-
message:
|
|
4219
|
+
message: z33.string().optional(),
|
|
4065
4220
|
snapshot: deltaBackgroundTaskShapeSchema.optional(),
|
|
4066
|
-
flush:
|
|
4221
|
+
flush: z33.boolean().optional(),
|
|
4067
4222
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4068
4223
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4069
4224
|
}),
|
|
@@ -4071,11 +4226,11 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4071
4226
|
* Streamed message text. The assembler synthesizes `item/started` on
|
|
4072
4227
|
* delta-first opens and accumulates the stream text.
|
|
4073
4228
|
*/
|
|
4074
|
-
|
|
4075
|
-
kind:
|
|
4229
|
+
z33.object({
|
|
4230
|
+
kind: z33.literal("message.delta"),
|
|
4076
4231
|
channel: deltaMessageChannelSchema,
|
|
4077
4232
|
streamKey: deltaKeyPartSchema,
|
|
4078
|
-
text:
|
|
4233
|
+
text: z33.string(),
|
|
4079
4234
|
parentRef: deltaKeyPartSchema.optional(),
|
|
4080
4235
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4081
4236
|
}),
|
|
@@ -4086,11 +4241,11 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4086
4241
|
* delta: a tool `item.open` in the same scope auto-detaches the open
|
|
4087
4242
|
* assistant stream so later text mints a fresh item.
|
|
4088
4243
|
*/
|
|
4089
|
-
|
|
4090
|
-
kind:
|
|
4244
|
+
z33.object({
|
|
4245
|
+
kind: z33.literal("message.close"),
|
|
4091
4246
|
channel: deltaMessageChannelSchema,
|
|
4092
4247
|
streamKey: deltaKeyPartSchema.optional(),
|
|
4093
|
-
text:
|
|
4248
|
+
text: z33.string().optional(),
|
|
4094
4249
|
parentRef: deltaKeyPartSchema.optional(),
|
|
4095
4250
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4096
4251
|
}),
|
|
@@ -4100,11 +4255,11 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4100
4255
|
* later deltas (and deltas for an id the provider already opened or
|
|
4101
4256
|
* settled) reuse the mapped id.
|
|
4102
4257
|
*/
|
|
4103
|
-
|
|
4104
|
-
kind:
|
|
4258
|
+
z33.object({
|
|
4259
|
+
kind: z33.literal("item.textDelta"),
|
|
4105
4260
|
key: deltaItemKeySchema,
|
|
4106
4261
|
channel: deltaTextChannelSchema,
|
|
4107
|
-
text:
|
|
4262
|
+
text: z33.string(),
|
|
4108
4263
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4109
4264
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4110
4265
|
}),
|
|
@@ -4112,11 +4267,11 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4112
4267
|
* Item-keyed exact output append (codex command/fileChange output deltas).
|
|
4113
4268
|
* Never synthesizes an open and never diffs — the text is already a delta.
|
|
4114
4269
|
*/
|
|
4115
|
-
|
|
4116
|
-
kind:
|
|
4270
|
+
z33.object({
|
|
4271
|
+
kind: z33.literal("item.outputDelta"),
|
|
4117
4272
|
key: deltaItemKeySchema,
|
|
4118
4273
|
channel: deltaOutputChannelSchema,
|
|
4119
|
-
text:
|
|
4274
|
+
text: z33.string(),
|
|
4120
4275
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4121
4276
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4122
4277
|
}),
|
|
@@ -4124,17 +4279,17 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4124
4279
|
* Cumulative command output snapshot (pi bash). The assembler diffs
|
|
4125
4280
|
* consecutive snapshots into `outputDelta`/`reset` events.
|
|
4126
4281
|
*/
|
|
4127
|
-
|
|
4128
|
-
kind:
|
|
4282
|
+
z33.object({
|
|
4283
|
+
kind: z33.literal("command.outputSnapshot"),
|
|
4129
4284
|
key: deltaItemKeySchema,
|
|
4130
|
-
text:
|
|
4285
|
+
text: z33.string(),
|
|
4131
4286
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4132
4287
|
}),
|
|
4133
4288
|
/** Last-turn usage; the assembler accumulates the running thread totals. */
|
|
4134
|
-
|
|
4135
|
-
kind:
|
|
4289
|
+
z33.object({
|
|
4290
|
+
kind: z33.literal("usage.turn"),
|
|
4136
4291
|
tokens: threadEventTokenUsageBreakdownSchema,
|
|
4137
|
-
modelContextWindow:
|
|
4292
|
+
modelContextWindow: z33.number().nullable().optional()
|
|
4138
4293
|
}),
|
|
4139
4294
|
/**
|
|
4140
4295
|
* Exact provider-reported usage (codex): the provider already accumulates,
|
|
@@ -4142,60 +4297,60 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4142
4297
|
* (`thread/tokenUsage/updated` + `thread/contextWindowUsage/updated`, the
|
|
4143
4298
|
* context meter reading `last.totalTokens`).
|
|
4144
4299
|
*/
|
|
4145
|
-
|
|
4146
|
-
kind:
|
|
4300
|
+
z33.object({
|
|
4301
|
+
kind: z33.literal("usage.exact"),
|
|
4147
4302
|
total: threadEventTokenUsageBreakdownSchema,
|
|
4148
4303
|
last: threadEventTokenUsageBreakdownSchema,
|
|
4149
|
-
modelContextWindow:
|
|
4304
|
+
modelContextWindow: z33.number().nullable(),
|
|
4150
4305
|
providerTurnId: providerTurnIdSchema.optional()
|
|
4151
4306
|
}),
|
|
4152
4307
|
/**
|
|
4153
4308
|
* Context-window meter. `attach: "currentOrLast"` legalizes post-turn
|
|
4154
4309
|
* attachment (pi reports after `agent_end` for the turn that just closed).
|
|
4155
4310
|
*/
|
|
4156
|
-
|
|
4157
|
-
kind:
|
|
4158
|
-
used:
|
|
4159
|
-
size:
|
|
4160
|
-
estimated:
|
|
4311
|
+
z33.object({
|
|
4312
|
+
kind: z33.literal("contextWindow"),
|
|
4313
|
+
used: z33.number().nullable(),
|
|
4314
|
+
size: z33.number().nullable().optional(),
|
|
4315
|
+
estimated: z33.boolean(),
|
|
4161
4316
|
attach: deltaAttachSchema
|
|
4162
4317
|
}),
|
|
4163
|
-
|
|
4164
|
-
kind:
|
|
4318
|
+
z33.object({
|
|
4319
|
+
kind: z33.literal("context.compacted"),
|
|
4165
4320
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4166
4321
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
4167
4322
|
}),
|
|
4168
|
-
|
|
4323
|
+
z33.object({ kind: z33.literal("context.cleared") }),
|
|
4169
4324
|
/** The aggregate working-tree diff for a turn (codex turn/diff/updated). */
|
|
4170
|
-
|
|
4171
|
-
kind:
|
|
4172
|
-
diff:
|
|
4325
|
+
z33.object({
|
|
4326
|
+
kind: z33.literal("turn.diff"),
|
|
4327
|
+
diff: z33.string(),
|
|
4173
4328
|
providerTurnId: providerTurnIdSchema.optional()
|
|
4174
4329
|
}),
|
|
4175
4330
|
// Thread metadata (codex thread lifecycle notifications).
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
kind:
|
|
4179
|
-
providerThreadId:
|
|
4180
|
-
}),
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
kind:
|
|
4184
|
-
objective:
|
|
4331
|
+
z33.object({ kind: z33.literal("thread.started") }),
|
|
4332
|
+
z33.object({
|
|
4333
|
+
kind: z33.literal("thread.identity"),
|
|
4334
|
+
providerThreadId: z33.string().min(1)
|
|
4335
|
+
}),
|
|
4336
|
+
z33.object({ kind: z33.literal("thread.name"), name: z33.string().min(1) }),
|
|
4337
|
+
z33.object({
|
|
4338
|
+
kind: z33.literal("thread.goal"),
|
|
4339
|
+
objective: z33.string(),
|
|
4185
4340
|
status: threadTimelineGoalStatusSchema,
|
|
4186
|
-
tokenBudget:
|
|
4187
|
-
tokensUsed:
|
|
4188
|
-
timeUsedSeconds:
|
|
4341
|
+
tokenBudget: z33.number().nullable(),
|
|
4342
|
+
tokensUsed: z33.number(),
|
|
4343
|
+
timeUsedSeconds: z33.number()
|
|
4189
4344
|
}),
|
|
4190
|
-
|
|
4345
|
+
z33.object({ kind: z33.literal("thread.goalCleared") }),
|
|
4191
4346
|
/**
|
|
4192
4347
|
* Normalized rate-limit snapshot. The provider-dialect merge (codex's
|
|
4193
4348
|
* sticky rateLimitReachedType over sparse rolling updates) stays
|
|
4194
4349
|
* bridge-side — it is seeded from a per-child post-initialize read the
|
|
4195
4350
|
* assembler never sees.
|
|
4196
4351
|
*/
|
|
4197
|
-
|
|
4198
|
-
kind:
|
|
4352
|
+
z33.object({
|
|
4353
|
+
kind: z33.literal("provider.rateLimits"),
|
|
4199
4354
|
rateLimits: providerRateLimitStateSchema
|
|
4200
4355
|
}),
|
|
4201
4356
|
/**
|
|
@@ -4205,16 +4360,16 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4205
4360
|
* turn; `threadScoped: true` pins thread scope (codex errors without a
|
|
4206
4361
|
* native turn id never attach to whatever turn happens to be open).
|
|
4207
4362
|
*/
|
|
4208
|
-
|
|
4209
|
-
kind:
|
|
4210
|
-
message:
|
|
4211
|
-
detail:
|
|
4212
|
-
willRetry:
|
|
4363
|
+
z33.object({
|
|
4364
|
+
kind: z33.literal("provider.error"),
|
|
4365
|
+
message: z33.string(),
|
|
4366
|
+
detail: z33.string().optional(),
|
|
4367
|
+
willRetry: z33.boolean().optional(),
|
|
4213
4368
|
category: providerErrorCategorySchema.optional(),
|
|
4214
4369
|
errorInfo: providerErrorInfoSchema.optional(),
|
|
4215
|
-
settlesTurn:
|
|
4370
|
+
settlesTurn: z33.boolean().optional(),
|
|
4216
4371
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
4217
|
-
threadScoped:
|
|
4372
|
+
threadScoped: z33.boolean().optional()
|
|
4218
4373
|
}),
|
|
4219
4374
|
/**
|
|
4220
4375
|
* The provider switched models mid-flight (claude model fallback). Scoped to
|
|
@@ -4223,23 +4378,23 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4223
4378
|
* assistant fallback block against the later system duplicate stays
|
|
4224
4379
|
* bridge-side — it is keyed by the bridge's own segment tracking.
|
|
4225
4380
|
*/
|
|
4226
|
-
|
|
4227
|
-
kind:
|
|
4228
|
-
originalModel:
|
|
4229
|
-
fallbackModel:
|
|
4230
|
-
reason:
|
|
4231
|
-
message:
|
|
4381
|
+
z33.object({
|
|
4382
|
+
kind: z33.literal("provider.modelFallback"),
|
|
4383
|
+
originalModel: z33.string().min(1),
|
|
4384
|
+
fallbackModel: z33.string().min(1),
|
|
4385
|
+
reason: z33.enum(["refusal", "provider"]),
|
|
4386
|
+
message: z33.string()
|
|
4232
4387
|
}),
|
|
4233
4388
|
/**
|
|
4234
4389
|
* `vouchedTurn: true` scopes the warning to the open turn when one exists
|
|
4235
4390
|
* (ACP warnings are turn-scoped mid-turn); default is thread scope.
|
|
4236
4391
|
*/
|
|
4237
|
-
|
|
4238
|
-
kind:
|
|
4239
|
-
summary:
|
|
4240
|
-
details:
|
|
4392
|
+
z33.object({
|
|
4393
|
+
kind: z33.literal("provider.warning"),
|
|
4394
|
+
summary: z33.string().optional(),
|
|
4395
|
+
details: z33.string().optional(),
|
|
4241
4396
|
category: threadEventWarningCategorySchema.optional(),
|
|
4242
|
-
vouchedTurn:
|
|
4397
|
+
vouchedTurn: z33.boolean().optional()
|
|
4243
4398
|
}),
|
|
4244
4399
|
/**
|
|
4245
4400
|
* The bridge's visibility classification decided this raw event is unknown.
|
|
@@ -4250,12 +4405,12 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4250
4405
|
* "known event, no active turn" visibility fallback for events that
|
|
4251
4406
|
* otherwise translate to silence) and is dropped entirely mid-turn.
|
|
4252
4407
|
*/
|
|
4253
|
-
|
|
4254
|
-
kind:
|
|
4408
|
+
z33.object({
|
|
4409
|
+
kind: z33.literal("unhandled"),
|
|
4255
4410
|
raw: providerRawEventSchema,
|
|
4256
|
-
rawType:
|
|
4257
|
-
vouchedTurn:
|
|
4258
|
-
onlyIfNoTurn:
|
|
4411
|
+
rawType: z33.string(),
|
|
4412
|
+
vouchedTurn: z33.boolean(),
|
|
4413
|
+
onlyIfNoTurn: z33.boolean().optional(),
|
|
4259
4414
|
parentRef: deltaKeyPartSchema.optional(),
|
|
4260
4415
|
providerTurnId: providerTurnIdSchema.optional()
|
|
4261
4416
|
}),
|
|
@@ -4263,7 +4418,7 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4263
4418
|
* Lifecycle settlement: the session was interrupted. The assembler closes
|
|
4264
4419
|
* the open turn and open items as interrupted.
|
|
4265
4420
|
*/
|
|
4266
|
-
|
|
4421
|
+
z33.object({ kind: z33.literal("session.ended") }),
|
|
4267
4422
|
/**
|
|
4268
4423
|
* Provider-native id-space boundary: a new provider session was constructed
|
|
4269
4424
|
* for this thread (start/resume/fork/rebuild), so its native turn/item ids
|
|
@@ -4271,11 +4426,11 @@ var threadDeltaSchema = z32.discriminatedUnion("kind", [
|
|
|
4271
4426
|
* sets, open items and streams; the bridge settles any open work first
|
|
4272
4427
|
* (nothing is in flight at any construction site).
|
|
4273
4428
|
*/
|
|
4274
|
-
|
|
4429
|
+
z33.object({ kind: z33.literal("session.reset") })
|
|
4275
4430
|
]);
|
|
4276
|
-
var threadDeltaNotificationParamsSchema =
|
|
4277
|
-
threadId:
|
|
4278
|
-
deltas:
|
|
4431
|
+
var threadDeltaNotificationParamsSchema = z33.object({
|
|
4432
|
+
threadId: z33.string().min(1),
|
|
4433
|
+
deltas: z33.array(threadDeltaSchema)
|
|
4279
4434
|
}).passthrough();
|
|
4280
4435
|
|
|
4281
4436
|
// ../process-utils/src/index.ts
|
|
@@ -4298,16 +4453,16 @@ function sanitizeInheritedChildProcessEnv(args) {
|
|
|
4298
4453
|
}
|
|
4299
4454
|
|
|
4300
4455
|
// ../host-daemon-contract/src/commands.ts
|
|
4301
|
-
import { z as
|
|
4456
|
+
import { z as z36 } from "zod";
|
|
4302
4457
|
|
|
4303
4458
|
// ../host-daemon-contract/src/local.ts
|
|
4304
|
-
import { z as
|
|
4305
|
-
var workspaceOpenTargetIdSchema =
|
|
4306
|
-
var workspaceOpenTargetCapabilitiesSchema =
|
|
4307
|
-
openDirectory:
|
|
4308
|
-
openFile:
|
|
4309
|
-
openFileAtLine:
|
|
4310
|
-
openFileAtColumn:
|
|
4459
|
+
import { z as z34 } from "zod";
|
|
4460
|
+
var workspaceOpenTargetIdSchema = z34.string().trim().min(1).max(200);
|
|
4461
|
+
var workspaceOpenTargetCapabilitiesSchema = z34.object({
|
|
4462
|
+
openDirectory: z34.boolean(),
|
|
4463
|
+
openFile: z34.boolean(),
|
|
4464
|
+
openFileAtLine: z34.boolean(),
|
|
4465
|
+
openFileAtColumn: z34.boolean().optional()
|
|
4311
4466
|
});
|
|
4312
4467
|
var workspaceOpenTargetKindValues = [
|
|
4313
4468
|
"editor",
|
|
@@ -4316,89 +4471,83 @@ var workspaceOpenTargetKindValues = [
|
|
|
4316
4471
|
"default-app",
|
|
4317
4472
|
"native-app"
|
|
4318
4473
|
];
|
|
4319
|
-
var workspaceOpenTargetKindSchema =
|
|
4320
|
-
workspaceOpenTargetKindValues
|
|
4321
|
-
);
|
|
4474
|
+
var workspaceOpenTargetKindSchema = z34.enum(workspaceOpenTargetKindValues);
|
|
4322
4475
|
var WORKSPACE_OPEN_TARGET_ICON_DATA_URL_MAX_LENGTH = 2e5;
|
|
4323
|
-
var workspaceOpenTargetIconSchema =
|
|
4324
|
-
|
|
4325
|
-
kind:
|
|
4326
|
-
name:
|
|
4476
|
+
var workspaceOpenTargetIconSchema = z34.discriminatedUnion("kind", [
|
|
4477
|
+
z34.object({
|
|
4478
|
+
kind: z34.literal("builtin"),
|
|
4479
|
+
name: z34.string().trim().min(1).max(100)
|
|
4327
4480
|
}).strict(),
|
|
4328
|
-
|
|
4329
|
-
kind:
|
|
4330
|
-
dataUrl:
|
|
4481
|
+
z34.object({
|
|
4482
|
+
kind: z34.literal("data-url"),
|
|
4483
|
+
dataUrl: z34.string().trim().startsWith("data:image/").max(WORKSPACE_OPEN_TARGET_ICON_DATA_URL_MAX_LENGTH)
|
|
4331
4484
|
}).strict(),
|
|
4332
|
-
|
|
4333
|
-
kind:
|
|
4334
|
-
name:
|
|
4485
|
+
z34.object({
|
|
4486
|
+
kind: z34.literal("symbol"),
|
|
4487
|
+
name: z34.enum(["default-app", "file-manager", "terminal", "app"])
|
|
4335
4488
|
}).strict()
|
|
4336
4489
|
]);
|
|
4337
|
-
var workspaceOpenTargetSchema =
|
|
4490
|
+
var workspaceOpenTargetSchema = z34.object({
|
|
4338
4491
|
id: workspaceOpenTargetIdSchema,
|
|
4339
|
-
label:
|
|
4492
|
+
label: z34.string().min(1),
|
|
4340
4493
|
kind: workspaceOpenTargetKindSchema.optional(),
|
|
4341
4494
|
icon: workspaceOpenTargetIconSchema.optional(),
|
|
4342
4495
|
capabilities: workspaceOpenTargetCapabilitiesSchema,
|
|
4343
4496
|
remoteSshCapabilities: workspaceOpenTargetCapabilitiesSchema.optional()
|
|
4344
4497
|
});
|
|
4345
|
-
var workspaceOpenTargetsResponseSchema =
|
|
4346
|
-
targets:
|
|
4498
|
+
var workspaceOpenTargetsResponseSchema = z34.object({
|
|
4499
|
+
targets: z34.array(workspaceOpenTargetSchema)
|
|
4347
4500
|
});
|
|
4348
|
-
var workspaceOpenTargetsQuerySchema =
|
|
4349
|
-
path:
|
|
4501
|
+
var workspaceOpenTargetsQuerySchema = z34.object({
|
|
4502
|
+
path: z34.string().min(1).optional()
|
|
4350
4503
|
});
|
|
4351
|
-
var openTargetPathSchema =
|
|
4352
|
-
var openTargetLineNumberSchema =
|
|
4353
|
-
var openTargetColumnNumberSchema =
|
|
4354
|
-
var openInTargetLocalContextSchema =
|
|
4355
|
-
kind:
|
|
4504
|
+
var openTargetPathSchema = z34.string().min(1);
|
|
4505
|
+
var openTargetLineNumberSchema = z34.number().int().positive().nullable();
|
|
4506
|
+
var openTargetColumnNumberSchema = z34.number().int().positive().nullable();
|
|
4507
|
+
var openInTargetLocalContextSchema = z34.object({
|
|
4508
|
+
kind: z34.literal("local")
|
|
4356
4509
|
}).strict();
|
|
4357
|
-
var openInTargetRemoteSshContextSchema =
|
|
4358
|
-
kind:
|
|
4359
|
-
serverOrigin:
|
|
4360
|
-
hostId:
|
|
4510
|
+
var openInTargetRemoteSshContextSchema = z34.object({
|
|
4511
|
+
kind: z34.literal("remote-ssh"),
|
|
4512
|
+
serverOrigin: z34.string().url(),
|
|
4513
|
+
hostId: z34.string().min(1)
|
|
4361
4514
|
}).strict();
|
|
4362
|
-
var openInTargetContextSchema =
|
|
4515
|
+
var openInTargetContextSchema = z34.discriminatedUnion("kind", [
|
|
4363
4516
|
openInTargetLocalContextSchema,
|
|
4364
4517
|
openInTargetRemoteSshContextSchema
|
|
4365
4518
|
]);
|
|
4366
|
-
var openInTargetRequestSchema =
|
|
4519
|
+
var openInTargetRequestSchema = z34.object({
|
|
4367
4520
|
context: openInTargetContextSchema.default({ kind: "local" }),
|
|
4368
4521
|
columnNumber: openTargetColumnNumberSchema.default(null),
|
|
4369
4522
|
lineNumber: openTargetLineNumberSchema,
|
|
4370
4523
|
path: openTargetPathSchema,
|
|
4371
4524
|
targetId: workspaceOpenTargetIdSchema
|
|
4372
4525
|
});
|
|
4373
|
-
var pickFolderResponseSchema =
|
|
4374
|
-
path:
|
|
4526
|
+
var pickFolderResponseSchema = z34.object({
|
|
4527
|
+
path: z34.string().nullable()
|
|
4375
4528
|
});
|
|
4376
4529
|
var PATHS_EXIST_MAX_PATHS = 200;
|
|
4377
|
-
var pathsExistRequestSchema =
|
|
4378
|
-
paths:
|
|
4530
|
+
var pathsExistRequestSchema = z34.object({
|
|
4531
|
+
paths: z34.array(z34.string().min(1)).min(1).max(PATHS_EXIST_MAX_PATHS).transform((paths) => Array.from(new Set(paths)))
|
|
4379
4532
|
});
|
|
4380
|
-
var pathsExistResponseSchema =
|
|
4381
|
-
existence:
|
|
4533
|
+
var pathsExistResponseSchema = z34.object({
|
|
4534
|
+
existence: z34.record(z34.string(), z34.boolean())
|
|
4382
4535
|
});
|
|
4383
|
-
var hostPlatformSchema =
|
|
4384
|
-
var statusResponseSchema =
|
|
4385
|
-
hostId:
|
|
4386
|
-
connected:
|
|
4536
|
+
var hostPlatformSchema = z34.enum(["darwin", "linux", "wsl", "unknown"]);
|
|
4537
|
+
var statusResponseSchema = z34.object({
|
|
4538
|
+
hostId: z34.string().min(1),
|
|
4539
|
+
connected: z34.boolean(),
|
|
4387
4540
|
// Informational local-daemon protocol marker. Dev restart tooling uses it
|
|
4388
4541
|
// to detect stale host-daemons; product UI must not gate behavior on it.
|
|
4389
|
-
protocolVersion:
|
|
4390
|
-
serverUrl:
|
|
4391
|
-
supportsNativeFolderPicker:
|
|
4542
|
+
protocolVersion: z34.number().int().positive(),
|
|
4543
|
+
serverUrl: z34.string(),
|
|
4544
|
+
supportsNativeFolderPicker: z34.boolean(),
|
|
4392
4545
|
platform: hostPlatformSchema
|
|
4393
4546
|
});
|
|
4394
|
-
var healthResponseSchema =
|
|
4395
|
-
var
|
|
4396
|
-
var
|
|
4397
|
-
var
|
|
4398
|
-
"stdout",
|
|
4399
|
-
"stderr"
|
|
4400
|
-
];
|
|
4401
|
-
var providerCliInstallOutputStreamSchema = z33.enum(
|
|
4547
|
+
var healthResponseSchema = z34.string().min(1);
|
|
4548
|
+
var providerCliKeySchema = z34.string().min(1);
|
|
4549
|
+
var providerCliInstallOutputStreamValues = ["stdout", "stderr"];
|
|
4550
|
+
var providerCliInstallOutputStreamSchema = z34.enum(
|
|
4402
4551
|
providerCliInstallOutputStreamValues
|
|
4403
4552
|
);
|
|
4404
4553
|
var providerCliInstallSourceValues = [
|
|
@@ -4406,73 +4555,63 @@ var providerCliInstallSourceValues = [
|
|
|
4406
4555
|
"npmGlobal",
|
|
4407
4556
|
"external"
|
|
4408
4557
|
];
|
|
4409
|
-
var providerCliInstallSourceSchema =
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
var providerCliInstallActionKindValues = [
|
|
4413
|
-
"install",
|
|
4414
|
-
"update"
|
|
4415
|
-
];
|
|
4416
|
-
var providerCliInstallActionKindSchema = z33.enum(
|
|
4558
|
+
var providerCliInstallSourceSchema = z34.enum(providerCliInstallSourceValues);
|
|
4559
|
+
var providerCliInstallActionKindValues = ["install", "update"];
|
|
4560
|
+
var providerCliInstallActionKindSchema = z34.enum(
|
|
4417
4561
|
providerCliInstallActionKindValues
|
|
4418
4562
|
);
|
|
4419
|
-
var
|
|
4420
|
-
var providerCliInstallCommandKindSchema = z33.enum(
|
|
4421
|
-
providerCliInstallCommandKindValues
|
|
4422
|
-
);
|
|
4423
|
-
var providerCliInstallActionSchema = z33.object({
|
|
4563
|
+
var providerCliInstallActionSchema = z34.object({
|
|
4424
4564
|
kind: providerCliInstallActionKindSchema,
|
|
4425
|
-
label:
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
installed: z33.boolean(),
|
|
4565
|
+
label: z34.enum(["Install", "Update"]),
|
|
4566
|
+
command: z34.string().min(1)
|
|
4567
|
+
});
|
|
4568
|
+
var providerCliStatusSchema = z34.object({
|
|
4569
|
+
displayName: z34.string().min(1),
|
|
4570
|
+
executableName: z34.string().min(1),
|
|
4571
|
+
executablePath: z34.string().min(1).nullable(),
|
|
4572
|
+
installed: z34.boolean(),
|
|
4434
4573
|
installSource: providerCliInstallSourceSchema,
|
|
4435
|
-
currentVersion:
|
|
4436
|
-
latestVersion:
|
|
4437
|
-
minimumSupportedVersion:
|
|
4438
|
-
npmPackageName:
|
|
4439
|
-
npmGlobalPackageVersion:
|
|
4574
|
+
currentVersion: z34.string().min(1).nullable(),
|
|
4575
|
+
latestVersion: z34.string().min(1).nullable(),
|
|
4576
|
+
minimumSupportedVersion: z34.string().min(1).nullable(),
|
|
4577
|
+
npmPackageName: z34.string().min(1).nullable(),
|
|
4578
|
+
npmGlobalPackageVersion: z34.string().min(1).nullable(),
|
|
4440
4579
|
installAction: providerCliInstallActionSchema.nullable(),
|
|
4441
|
-
needsUpdate:
|
|
4442
|
-
versionUnsupported:
|
|
4580
|
+
needsUpdate: z34.boolean(),
|
|
4581
|
+
versionUnsupported: z34.boolean()
|
|
4443
4582
|
});
|
|
4444
|
-
var providerCliStatusResponseSchema =
|
|
4445
|
-
|
|
4583
|
+
var providerCliStatusResponseSchema = z34.record(
|
|
4584
|
+
z34.string().min(1),
|
|
4446
4585
|
providerCliStatusSchema
|
|
4447
4586
|
);
|
|
4448
|
-
var providerCliInstallRequestSchema =
|
|
4587
|
+
var providerCliInstallRequestSchema = z34.object({
|
|
4449
4588
|
provider: providerCliKeySchema,
|
|
4450
4589
|
actionKind: providerCliInstallActionKindSchema
|
|
4451
4590
|
});
|
|
4452
|
-
var providerCliInstallStartedEventSchema =
|
|
4453
|
-
type:
|
|
4591
|
+
var providerCliInstallStartedEventSchema = z34.object({
|
|
4592
|
+
type: z34.literal("started"),
|
|
4454
4593
|
provider: providerCliKeySchema,
|
|
4455
|
-
command:
|
|
4594
|
+
command: z34.string().min(1)
|
|
4456
4595
|
});
|
|
4457
|
-
var providerCliInstallOutputEventSchema =
|
|
4458
|
-
type:
|
|
4596
|
+
var providerCliInstallOutputEventSchema = z34.object({
|
|
4597
|
+
type: z34.literal("output"),
|
|
4459
4598
|
provider: providerCliKeySchema,
|
|
4460
4599
|
stream: providerCliInstallOutputStreamSchema,
|
|
4461
|
-
text:
|
|
4600
|
+
text: z34.string()
|
|
4462
4601
|
});
|
|
4463
|
-
var providerCliInstallCompletedEventSchema =
|
|
4464
|
-
type:
|
|
4602
|
+
var providerCliInstallCompletedEventSchema = z34.object({
|
|
4603
|
+
type: z34.literal("completed"),
|
|
4465
4604
|
provider: providerCliKeySchema,
|
|
4466
|
-
exitCode:
|
|
4467
|
-
signal:
|
|
4468
|
-
success:
|
|
4605
|
+
exitCode: z34.number().int().nullable(),
|
|
4606
|
+
signal: z34.string().min(1).nullable(),
|
|
4607
|
+
success: z34.boolean()
|
|
4469
4608
|
});
|
|
4470
|
-
var providerCliInstallErrorEventSchema =
|
|
4471
|
-
type:
|
|
4609
|
+
var providerCliInstallErrorEventSchema = z34.object({
|
|
4610
|
+
type: z34.literal("error"),
|
|
4472
4611
|
provider: providerCliKeySchema,
|
|
4473
|
-
message:
|
|
4612
|
+
message: z34.string().min(1)
|
|
4474
4613
|
});
|
|
4475
|
-
var providerCliInstallEventSchema =
|
|
4614
|
+
var providerCliInstallEventSchema = z34.discriminatedUnion("type", [
|
|
4476
4615
|
providerCliInstallStartedEventSchema,
|
|
4477
4616
|
providerCliInstallOutputEventSchema,
|
|
4478
4617
|
providerCliInstallCompletedEventSchema,
|
|
@@ -4480,8 +4619,8 @@ var providerCliInstallEventSchema = z33.discriminatedUnion("type", [
|
|
|
4480
4619
|
]);
|
|
4481
4620
|
|
|
4482
4621
|
// ../host-daemon-contract/src/workspace.ts
|
|
4483
|
-
import { z as
|
|
4484
|
-
var workspaceResolutionFailureCodeSchema =
|
|
4622
|
+
import { z as z35 } from "zod";
|
|
4623
|
+
var workspaceResolutionFailureCodeSchema = z35.enum([
|
|
4485
4624
|
"path_not_found",
|
|
4486
4625
|
"not_git_repo",
|
|
4487
4626
|
"not_worktree",
|
|
@@ -4490,10 +4629,10 @@ var workspaceResolutionFailureCodeSchema = z34.enum([
|
|
|
4490
4629
|
"unknown_environment",
|
|
4491
4630
|
"unknown"
|
|
4492
4631
|
]);
|
|
4493
|
-
var workspaceResolutionFailureSchema =
|
|
4632
|
+
var workspaceResolutionFailureSchema = z35.object({
|
|
4494
4633
|
code: workspaceResolutionFailureCodeSchema,
|
|
4495
|
-
workspacePath:
|
|
4496
|
-
message:
|
|
4634
|
+
workspacePath: z35.string().min(1),
|
|
4635
|
+
message: z35.string().min(1)
|
|
4497
4636
|
}).strict();
|
|
4498
4637
|
|
|
4499
4638
|
// ../host-daemon-contract/src/protocol.ts
|
|
@@ -4501,8 +4640,8 @@ var HOST_ARTIFACT_MAX_BYTES = 256 * 1024 * 1024;
|
|
|
4501
4640
|
|
|
4502
4641
|
// ../host-daemon-contract/src/commands.ts
|
|
4503
4642
|
var INJECTED_SKILL_NAME_PATTERN = /^(?!.*--)[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/u;
|
|
4504
|
-
var workspaceContextSchema =
|
|
4505
|
-
workspacePath:
|
|
4643
|
+
var workspaceContextSchema = z36.object({
|
|
4644
|
+
workspacePath: z36.string().min(1),
|
|
4506
4645
|
workspaceProvisionType: workspaceProvisionTypeSchema
|
|
4507
4646
|
});
|
|
4508
4647
|
function isConnectBaseDomain(value) {
|
|
@@ -4513,51 +4652,51 @@ function isConnectBaseDomain(value) {
|
|
|
4513
4652
|
return false;
|
|
4514
4653
|
}
|
|
4515
4654
|
}
|
|
4516
|
-
var hostDaemonConnectTunnelIdentitySchema =
|
|
4517
|
-
label:
|
|
4518
|
-
baseDomain:
|
|
4655
|
+
var hostDaemonConnectTunnelIdentitySchema = z36.object({
|
|
4656
|
+
label: z36.string().min(1).max(63).regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/).refine((label) => !label.includes("--")),
|
|
4657
|
+
baseDomain: z36.string().min(1).refine(isConnectBaseDomain)
|
|
4519
4658
|
}).strict();
|
|
4520
|
-
var hostDaemonThreadTargetSchema =
|
|
4521
|
-
environmentId:
|
|
4522
|
-
threadId:
|
|
4659
|
+
var hostDaemonThreadTargetSchema = z36.object({
|
|
4660
|
+
environmentId: z36.string().min(1),
|
|
4661
|
+
threadId: z36.string().min(1)
|
|
4523
4662
|
}).strict();
|
|
4524
|
-
var hostDaemonInjectedSkillSourceBaseSchema =
|
|
4525
|
-
name:
|
|
4526
|
-
description:
|
|
4663
|
+
var hostDaemonInjectedSkillSourceBaseSchema = z36.object({
|
|
4664
|
+
name: z36.string().max(64).regex(INJECTED_SKILL_NAME_PATTERN),
|
|
4665
|
+
description: z36.string().min(1).max(1024)
|
|
4527
4666
|
}).strict();
|
|
4528
|
-
var hostDaemonInjectedSkillSourceSchema =
|
|
4667
|
+
var hostDaemonInjectedSkillSourceSchema = z36.discriminatedUnion(
|
|
4529
4668
|
"kind",
|
|
4530
4669
|
[
|
|
4531
4670
|
hostDaemonInjectedSkillSourceBaseSchema.extend({
|
|
4532
|
-
kind:
|
|
4533
|
-
treeHash:
|
|
4534
|
-
entryPath:
|
|
4535
|
-
sourceType:
|
|
4671
|
+
kind: z36.literal("tree"),
|
|
4672
|
+
treeHash: z36.string().regex(/^[a-f0-9]{64}$/u),
|
|
4673
|
+
entryPath: z36.string().min(1),
|
|
4674
|
+
sourceType: z36.enum(["builtin", "data-dir"])
|
|
4536
4675
|
}).strict(),
|
|
4537
4676
|
hostDaemonInjectedSkillSourceBaseSchema.extend({
|
|
4538
|
-
kind:
|
|
4539
|
-
sourceType:
|
|
4540
|
-
sourceRootPath:
|
|
4541
|
-
skillFilePath:
|
|
4677
|
+
kind: z36.literal("workspace-path"),
|
|
4678
|
+
sourceType: z36.literal("project"),
|
|
4679
|
+
sourceRootPath: z36.string().min(1),
|
|
4680
|
+
skillFilePath: z36.string().min(1)
|
|
4542
4681
|
}).strict(),
|
|
4543
4682
|
hostDaemonInjectedSkillSourceBaseSchema.extend({
|
|
4544
|
-
kind:
|
|
4545
|
-
sourceType:
|
|
4546
|
-
sourceRootPath:
|
|
4547
|
-
skillFilePath:
|
|
4683
|
+
kind: z36.literal("host-path"),
|
|
4684
|
+
sourceType: z36.enum(["shared-user", "shared-project"]),
|
|
4685
|
+
sourceRootPath: z36.string().min(1),
|
|
4686
|
+
skillFilePath: z36.string().min(1)
|
|
4548
4687
|
}).strict()
|
|
4549
4688
|
]
|
|
4550
4689
|
);
|
|
4551
|
-
var hostDaemonAcpLaunchSpecSchema =
|
|
4552
|
-
displayName:
|
|
4553
|
-
command:
|
|
4554
|
-
args:
|
|
4555
|
-
env:
|
|
4556
|
-
cwd:
|
|
4557
|
-
modelCli:
|
|
4558
|
-
listArgs:
|
|
4559
|
-
selectFlag:
|
|
4560
|
-
primaryModels:
|
|
4690
|
+
var hostDaemonAcpLaunchSpecSchema = z36.object({
|
|
4691
|
+
displayName: z36.string().min(1),
|
|
4692
|
+
command: z36.string().min(1),
|
|
4693
|
+
args: z36.array(z36.string()),
|
|
4694
|
+
env: z36.record(z36.string().min(1), z36.string()),
|
|
4695
|
+
cwd: z36.string().min(1).optional(),
|
|
4696
|
+
modelCli: z36.object({
|
|
4697
|
+
listArgs: z36.array(z36.string()),
|
|
4698
|
+
selectFlag: z36.string().min(1).optional(),
|
|
4699
|
+
primaryModels: z36.array(z36.string())
|
|
4561
4700
|
}).strict().transform(
|
|
4562
4701
|
(modelCli) => modelCli.listArgs.length > 0 ? modelCli : void 0
|
|
4563
4702
|
).optional(),
|
|
@@ -4593,21 +4732,21 @@ function normalizeHostDaemonAcpLaunchSpec(spec) {
|
|
|
4593
4732
|
...permissionCli !== void 0 && permissionCliHasMode ? { permissionCli } : {}
|
|
4594
4733
|
};
|
|
4595
4734
|
}
|
|
4596
|
-
var hostDaemonBridgeLaunchSchema =
|
|
4735
|
+
var hostDaemonBridgeLaunchSchema = z36.object({
|
|
4597
4736
|
// The plugin that ships this bridge. It names the artifact to fetch, and
|
|
4598
4737
|
// it scopes the bridge process's own directories on the host — a bridge is
|
|
4599
4738
|
// a `bb.host` artifact like any other, so it gets the same plugin-scoped
|
|
4600
4739
|
// data directory a host worker does.
|
|
4601
|
-
pluginId:
|
|
4602
|
-
source:
|
|
4603
|
-
|
|
4604
|
-
kind:
|
|
4605
|
-
digest:
|
|
4606
|
-
byteLength:
|
|
4740
|
+
pluginId: z36.string().min(1),
|
|
4741
|
+
source: z36.discriminatedUnion("kind", [
|
|
4742
|
+
z36.object({
|
|
4743
|
+
kind: z36.literal("artifact"),
|
|
4744
|
+
digest: z36.string().regex(/^[a-f0-9]{64}$/u),
|
|
4745
|
+
byteLength: z36.number().int().positive().max(HOST_ARTIFACT_MAX_BYTES)
|
|
4607
4746
|
}).strict(),
|
|
4608
|
-
|
|
4609
|
-
kind:
|
|
4610
|
-
id:
|
|
4747
|
+
z36.object({
|
|
4748
|
+
kind: z36.literal("daemon-bundled"),
|
|
4749
|
+
id: z36.string().min(1)
|
|
4611
4750
|
}).strict()
|
|
4612
4751
|
]),
|
|
4613
4752
|
// The provider's server-validated capabilities, exactly the facts the
|
|
@@ -4616,35 +4755,37 @@ var hostDaemonBridgeLaunchSchema = z35.object({
|
|
|
4616
4755
|
// operations it offers (archive, rename, fork). The daemon has no
|
|
4617
4756
|
// registry, so without these it would have to guess a baseline and reject
|
|
4618
4757
|
// work the server already accepted.
|
|
4619
|
-
capabilities:
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4758
|
+
capabilities: z36.object({
|
|
4759
|
+
experimental_providerInstallation: z36.boolean(),
|
|
4760
|
+
supportsServiceTier: z36.boolean(),
|
|
4761
|
+
permissionModes: z36.array(permissionModeSchema).min(1),
|
|
4762
|
+
supportsThreadArchive: z36.boolean(),
|
|
4763
|
+
supportsThreadRename: z36.boolean(),
|
|
4624
4764
|
fork: providerForkSchema
|
|
4625
|
-
}).strict()
|
|
4765
|
+
}).strict(),
|
|
4766
|
+
providerOptions: jsonObjectSchema
|
|
4626
4767
|
}).strict();
|
|
4627
|
-
var hostDaemonThreadRuntimeContextSchema =
|
|
4768
|
+
var hostDaemonThreadRuntimeContextSchema = z36.object({
|
|
4628
4769
|
workspaceContext: workspaceContextSchema,
|
|
4629
|
-
projectId:
|
|
4630
|
-
providerId:
|
|
4770
|
+
projectId: z36.string().min(1),
|
|
4771
|
+
providerId: z36.string().min(1),
|
|
4631
4772
|
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
4632
4773
|
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
4633
4774
|
options: runtimeThreadExecutionOptionsSchema,
|
|
4634
|
-
instructions:
|
|
4635
|
-
dynamicTools:
|
|
4636
|
-
injectedSkillSources:
|
|
4637
|
-
disallowedTools:
|
|
4775
|
+
instructions: z36.string().min(1),
|
|
4776
|
+
dynamicTools: z36.array(dynamicToolSchema),
|
|
4777
|
+
injectedSkillSources: z36.array(hostDaemonInjectedSkillSourceSchema),
|
|
4778
|
+
disallowedTools: z36.array(z36.string()).optional(),
|
|
4638
4779
|
instructionMode: instructionModeSchema
|
|
4639
4780
|
}).strict();
|
|
4640
4781
|
var hostDaemonExistingThreadRuntimeContextSchema = hostDaemonThreadRuntimeContextSchema.extend({
|
|
4641
|
-
providerThreadId:
|
|
4782
|
+
providerThreadId: z36.string().min(1)
|
|
4642
4783
|
});
|
|
4643
4784
|
var turnResumeContextSchema = hostDaemonExistingThreadRuntimeContextSchema.omit({
|
|
4644
4785
|
options: true
|
|
4645
4786
|
});
|
|
4646
|
-
var hostDaemonEnvironmentTargetSchema =
|
|
4647
|
-
environmentId:
|
|
4787
|
+
var hostDaemonEnvironmentTargetSchema = z36.object({
|
|
4788
|
+
environmentId: z36.string().min(1)
|
|
4648
4789
|
}).strict();
|
|
4649
4790
|
var hostDaemonWorkspaceTargetSchema = hostDaemonEnvironmentTargetSchema.extend({
|
|
4650
4791
|
workspaceContext: workspaceContextSchema
|
|
@@ -4669,18 +4810,18 @@ function refineGroupedInputMatchesFlatInput(value, ctx) {
|
|
|
4669
4810
|
});
|
|
4670
4811
|
}
|
|
4671
4812
|
var threadStartCommandSchema = hostDaemonThreadTargetSchema.merge(hostDaemonThreadRuntimeContextSchema).extend({
|
|
4672
|
-
type:
|
|
4813
|
+
type: z36.literal("thread.start"),
|
|
4673
4814
|
requestId: clientTurnRequestIdSchema,
|
|
4674
4815
|
// A fork start establishes the cloned provider session with an empty
|
|
4675
4816
|
// timeline (the runtime's no-input-no-turn guard leaves it idle), so it
|
|
4676
4817
|
// carries no input. A non-fork start always runs a first turn and requires
|
|
4677
4818
|
// at least one input, enforced by the refinement below.
|
|
4678
|
-
input:
|
|
4679
|
-
inputGroups:
|
|
4680
|
-
threadStoragePath:
|
|
4819
|
+
input: z36.array(promptInputSchema),
|
|
4820
|
+
inputGroups: z36.array(z36.array(promptInputSchema).min(1)).min(1).optional(),
|
|
4821
|
+
threadStoragePath: z36.string().min(1).optional(),
|
|
4681
4822
|
/** Present means fork the new thread from this source provider session
|
|
4682
4823
|
* instead of starting fresh; absent means a normal start. */
|
|
4683
|
-
fork:
|
|
4824
|
+
fork: z36.object({ sourceProviderThreadId: z36.string().min(1) }).optional()
|
|
4684
4825
|
}).strict().superRefine((value, ctx) => {
|
|
4685
4826
|
if (value.fork === void 0 && value.input.length === 0) {
|
|
4686
4827
|
ctx.addIssue({
|
|
@@ -4692,102 +4833,102 @@ var threadStartCommandSchema = hostDaemonThreadTargetSchema.merge(hostDaemonThre
|
|
|
4692
4833
|
refineGroupedInputMatchesFlatInput(value, ctx);
|
|
4693
4834
|
});
|
|
4694
4835
|
var threadRewindPrepareCommandSchema = hostDaemonThreadTargetSchema.merge(hostDaemonThreadRuntimeContextSchema).extend({
|
|
4695
|
-
type:
|
|
4836
|
+
type: z36.literal("thread.rewind.prepare"),
|
|
4696
4837
|
/** Server-minted per-attempt staging id; each lease owns one staged fork. */
|
|
4697
|
-
leaseId:
|
|
4698
|
-
sourceProviderThreadId:
|
|
4699
|
-
retainThroughProviderCheckpoint:
|
|
4838
|
+
leaseId: z36.string().min(1),
|
|
4839
|
+
sourceProviderThreadId: z36.string().min(1),
|
|
4840
|
+
retainThroughProviderCheckpoint: z36.string().min(1)
|
|
4700
4841
|
}).strict();
|
|
4701
4842
|
var threadRewindDiscardCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4702
|
-
type:
|
|
4703
|
-
leaseId:
|
|
4843
|
+
type: z36.literal("thread.rewind.discard"),
|
|
4844
|
+
leaseId: z36.string().min(1)
|
|
4704
4845
|
}).strict();
|
|
4705
|
-
var turnSubmitTargetSchema =
|
|
4706
|
-
|
|
4707
|
-
mode:
|
|
4846
|
+
var turnSubmitTargetSchema = z36.discriminatedUnion("mode", [
|
|
4847
|
+
z36.object({
|
|
4848
|
+
mode: z36.literal("start")
|
|
4708
4849
|
}),
|
|
4709
|
-
|
|
4710
|
-
mode:
|
|
4711
|
-
expectedTurnId:
|
|
4850
|
+
z36.object({
|
|
4851
|
+
mode: z36.literal("auto"),
|
|
4852
|
+
expectedTurnId: z36.string().min(1).nullable()
|
|
4712
4853
|
}),
|
|
4713
|
-
|
|
4714
|
-
mode:
|
|
4715
|
-
expectedTurnId:
|
|
4854
|
+
z36.object({
|
|
4855
|
+
mode: z36.literal("steer"),
|
|
4856
|
+
expectedTurnId: z36.string().min(1).nullable()
|
|
4716
4857
|
})
|
|
4717
4858
|
]);
|
|
4718
4859
|
var turnSubmitCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4719
|
-
type:
|
|
4860
|
+
type: z36.literal("turn.submit"),
|
|
4720
4861
|
requestId: clientTurnRequestIdSchema,
|
|
4721
|
-
input:
|
|
4722
|
-
inputGroups:
|
|
4862
|
+
input: z36.array(promptInputSchema).min(1),
|
|
4863
|
+
inputGroups: z36.array(z36.array(promptInputSchema).min(1)).min(1).optional(),
|
|
4723
4864
|
options: runtimeThreadExecutionOptionsSchema,
|
|
4724
4865
|
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
4725
4866
|
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
4726
4867
|
resumeContext: turnResumeContextSchema,
|
|
4727
4868
|
target: turnSubmitTargetSchema
|
|
4728
4869
|
}).strict().superRefine(refineGroupedInputMatchesFlatInput);
|
|
4729
|
-
var threadStopIntentSchema =
|
|
4870
|
+
var threadStopIntentSchema = z36.enum(["interrupt", "release"]);
|
|
4730
4871
|
var threadStopCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4731
|
-
type:
|
|
4872
|
+
type: z36.literal("thread.stop"),
|
|
4732
4873
|
intent: threadStopIntentSchema
|
|
4733
4874
|
}).strict();
|
|
4734
4875
|
var threadGoalClearCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4735
|
-
type:
|
|
4876
|
+
type: z36.literal("thread.goal.clear"),
|
|
4736
4877
|
options: runtimeThreadExecutionOptionsSchema,
|
|
4737
4878
|
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
4738
4879
|
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
4739
4880
|
resumeContext: turnResumeContextSchema
|
|
4740
4881
|
}).strict();
|
|
4741
4882
|
var threadPlanCancelCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4742
|
-
type:
|
|
4743
|
-
expectedTurnId:
|
|
4883
|
+
type: z36.literal("thread.plan.cancel"),
|
|
4884
|
+
expectedTurnId: z36.string().min(1)
|
|
4744
4885
|
}).strict();
|
|
4745
4886
|
var threadRenameCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4746
|
-
type:
|
|
4747
|
-
title:
|
|
4887
|
+
type: z36.literal("thread.rename"),
|
|
4888
|
+
title: z36.string().min(1)
|
|
4748
4889
|
}).strict();
|
|
4749
4890
|
var threadArchiveCommandSchema = hostDaemonThreadWorkspaceTargetSchema.extend({
|
|
4750
|
-
type:
|
|
4751
|
-
providerId:
|
|
4752
|
-
providerThreadId:
|
|
4891
|
+
type: z36.literal("thread.archive"),
|
|
4892
|
+
providerId: z36.string().min(1),
|
|
4893
|
+
providerThreadId: z36.string().min(1),
|
|
4753
4894
|
bridgeLaunch: hostDaemonBridgeLaunchSchema
|
|
4754
4895
|
}).strict();
|
|
4755
4896
|
var threadUnarchiveCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4756
|
-
type:
|
|
4757
|
-
providerId:
|
|
4758
|
-
providerThreadId:
|
|
4897
|
+
type: z36.literal("thread.unarchive"),
|
|
4898
|
+
providerId: z36.string().min(1),
|
|
4899
|
+
providerThreadId: z36.string().min(1),
|
|
4759
4900
|
bridgeLaunch: hostDaemonBridgeLaunchSchema
|
|
4760
4901
|
}).strict();
|
|
4761
4902
|
var interactiveResolveCommandSchema = hostDaemonThreadTargetSchema.extend({
|
|
4762
|
-
type:
|
|
4763
|
-
interactionId:
|
|
4764
|
-
providerId:
|
|
4765
|
-
providerThreadId:
|
|
4766
|
-
providerRequestId:
|
|
4903
|
+
type: z36.literal("interactive.resolve"),
|
|
4904
|
+
interactionId: z36.string().min(1),
|
|
4905
|
+
providerId: z36.string().min(1),
|
|
4906
|
+
providerThreadId: z36.string().min(1),
|
|
4907
|
+
providerRequestId: z36.string().min(1),
|
|
4767
4908
|
resolution: pendingInteractionResolutionSchema
|
|
4768
4909
|
}).strict();
|
|
4769
|
-
var codexInferenceCompleteCommandSchema =
|
|
4770
|
-
type:
|
|
4771
|
-
model:
|
|
4772
|
-
reasoningEffort:
|
|
4773
|
-
prompt:
|
|
4910
|
+
var codexInferenceCompleteCommandSchema = z36.object({
|
|
4911
|
+
type: z36.literal("codex.inference.complete"),
|
|
4912
|
+
model: z36.string().min(1),
|
|
4913
|
+
reasoningEffort: z36.literal("none"),
|
|
4914
|
+
prompt: z36.string().min(1),
|
|
4774
4915
|
outputSchema: jsonObjectSchema,
|
|
4775
|
-
timeoutMs:
|
|
4916
|
+
timeoutMs: z36.number().int().positive()
|
|
4776
4917
|
}).strict();
|
|
4777
|
-
var codexVoiceTranscribeCommandSchema =
|
|
4778
|
-
type:
|
|
4779
|
-
model:
|
|
4780
|
-
audioBase64:
|
|
4781
|
-
mimeType:
|
|
4782
|
-
filename:
|
|
4783
|
-
prompt:
|
|
4784
|
-
timeoutMs:
|
|
4918
|
+
var codexVoiceTranscribeCommandSchema = z36.object({
|
|
4919
|
+
type: z36.literal("codex.voice.transcribe"),
|
|
4920
|
+
model: z36.string().min(1),
|
|
4921
|
+
audioBase64: z36.string().min(1),
|
|
4922
|
+
mimeType: z36.string().min(1),
|
|
4923
|
+
filename: z36.string().min(1),
|
|
4924
|
+
prompt: z36.string().nullable(),
|
|
4925
|
+
timeoutMs: z36.number().int().positive()
|
|
4785
4926
|
}).strict();
|
|
4786
|
-
var hostReadFileCommandSchema =
|
|
4787
|
-
type:
|
|
4788
|
-
path:
|
|
4789
|
-
rootPath:
|
|
4790
|
-
ref:
|
|
4927
|
+
var hostReadFileCommandSchema = z36.object({
|
|
4928
|
+
type: z36.literal("host.read_file"),
|
|
4929
|
+
path: z36.string().min(1),
|
|
4930
|
+
rootPath: z36.string().min(1).optional(),
|
|
4931
|
+
ref: z36.string().min(1).optional()
|
|
4791
4932
|
}).superRefine((command, context) => {
|
|
4792
4933
|
if (command.ref !== void 0 && command.rootPath === void 0) {
|
|
4793
4934
|
context.addIssue({
|
|
@@ -4797,156 +4938,153 @@ var hostReadFileCommandSchema = z35.object({
|
|
|
4797
4938
|
});
|
|
4798
4939
|
}
|
|
4799
4940
|
});
|
|
4800
|
-
var hostReadFileRelativeDotfilePolicySchema =
|
|
4801
|
-
|
|
4802
|
-
"
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
type: z35.literal("host.read_file_relative"),
|
|
4806
|
-
rootPath: z35.string().min(1),
|
|
4807
|
-
path: z35.string().min(1),
|
|
4941
|
+
var hostReadFileRelativeDotfilePolicySchema = z36.enum(["allow", "deny"]);
|
|
4942
|
+
var hostReadFileRelativeCommandSchema = z36.object({
|
|
4943
|
+
type: z36.literal("host.read_file_relative"),
|
|
4944
|
+
rootPath: z36.string().min(1),
|
|
4945
|
+
path: z36.string().min(1),
|
|
4808
4946
|
dotfiles: hostReadFileRelativeDotfilePolicySchema
|
|
4809
4947
|
}).strict();
|
|
4810
|
-
var hostFileMetadataCommandSchema =
|
|
4811
|
-
type:
|
|
4812
|
-
path:
|
|
4813
|
-
rootPath:
|
|
4948
|
+
var hostFileMetadataCommandSchema = z36.object({
|
|
4949
|
+
type: z36.literal("host.file_metadata"),
|
|
4950
|
+
path: z36.string().min(1),
|
|
4951
|
+
rootPath: z36.string().min(1).optional()
|
|
4814
4952
|
}).strict();
|
|
4815
|
-
var hostWriteFileCommandSchema =
|
|
4816
|
-
type:
|
|
4817
|
-
path:
|
|
4818
|
-
rootPath:
|
|
4819
|
-
content:
|
|
4820
|
-
contentEncoding:
|
|
4821
|
-
createParents:
|
|
4822
|
-
expectedSha256:
|
|
4823
|
-
mode:
|
|
4953
|
+
var hostWriteFileCommandSchema = z36.object({
|
|
4954
|
+
type: z36.literal("host.write_file"),
|
|
4955
|
+
path: z36.string().min(1),
|
|
4956
|
+
rootPath: z36.string().min(1).optional(),
|
|
4957
|
+
content: z36.string(),
|
|
4958
|
+
contentEncoding: z36.enum(["utf8", "base64"]),
|
|
4959
|
+
createParents: z36.boolean(),
|
|
4960
|
+
expectedSha256: z36.string().nullable().optional(),
|
|
4961
|
+
mode: z36.number().int().min(0).max(511).optional()
|
|
4824
4962
|
}).strict();
|
|
4825
|
-
var hostListFilesCommandSchema =
|
|
4826
|
-
type:
|
|
4827
|
-
path:
|
|
4828
|
-
query:
|
|
4829
|
-
limit:
|
|
4830
|
-
});
|
|
4831
|
-
var hostPathEntryKindSchema =
|
|
4832
|
-
var hostPathEntrySchema =
|
|
4963
|
+
var hostListFilesCommandSchema = z36.object({
|
|
4964
|
+
type: z36.literal("host.list_files"),
|
|
4965
|
+
path: z36.string().min(1),
|
|
4966
|
+
query: z36.string().max(FILE_LIST_QUERY_MAX_LENGTH).optional(),
|
|
4967
|
+
limit: z36.number().int().positive().max(FILE_LIST_LIMIT_MAX)
|
|
4968
|
+
});
|
|
4969
|
+
var hostPathEntryKindSchema = z36.enum(["file", "directory"]);
|
|
4970
|
+
var hostPathEntrySchema = z36.object({
|
|
4833
4971
|
kind: hostPathEntryKindSchema,
|
|
4834
|
-
path:
|
|
4835
|
-
name:
|
|
4836
|
-
score:
|
|
4837
|
-
positions:
|
|
4838
|
-
});
|
|
4839
|
-
var hostListPathsCommandSchema =
|
|
4840
|
-
type:
|
|
4841
|
-
path:
|
|
4842
|
-
query:
|
|
4843
|
-
limit:
|
|
4844
|
-
includeFiles:
|
|
4845
|
-
includeDirectories:
|
|
4972
|
+
path: z36.string(),
|
|
4973
|
+
name: z36.string(),
|
|
4974
|
+
score: z36.number(),
|
|
4975
|
+
positions: z36.array(z36.number().int().nonnegative())
|
|
4976
|
+
});
|
|
4977
|
+
var hostListPathsCommandSchema = z36.object({
|
|
4978
|
+
type: z36.literal("host.list_paths"),
|
|
4979
|
+
path: z36.string().min(1),
|
|
4980
|
+
query: z36.string().max(FILE_LIST_QUERY_MAX_LENGTH).optional(),
|
|
4981
|
+
limit: z36.number().int().positive().max(FILE_LIST_LIMIT_MAX),
|
|
4982
|
+
includeFiles: z36.boolean(),
|
|
4983
|
+
includeDirectories: z36.boolean()
|
|
4846
4984
|
}).refine((command) => command.includeFiles || command.includeDirectories, {
|
|
4847
4985
|
message: "At least one path kind must be included"
|
|
4848
4986
|
});
|
|
4849
|
-
var hostMkdirCommandSchema =
|
|
4850
|
-
type:
|
|
4851
|
-
path:
|
|
4852
|
-
rootPath:
|
|
4853
|
-
recursive:
|
|
4987
|
+
var hostMkdirCommandSchema = z36.object({
|
|
4988
|
+
type: z36.literal("host.mkdir"),
|
|
4989
|
+
path: z36.string().min(1),
|
|
4990
|
+
rootPath: z36.string().min(1).optional(),
|
|
4991
|
+
recursive: z36.boolean()
|
|
4854
4992
|
}).strict();
|
|
4855
|
-
var hostMovePathCommandSchema =
|
|
4856
|
-
type:
|
|
4857
|
-
sourcePath:
|
|
4858
|
-
destinationPath:
|
|
4859
|
-
rootPath:
|
|
4993
|
+
var hostMovePathCommandSchema = z36.object({
|
|
4994
|
+
type: z36.literal("host.move_path"),
|
|
4995
|
+
sourcePath: z36.string().min(1),
|
|
4996
|
+
destinationPath: z36.string().min(1),
|
|
4997
|
+
rootPath: z36.string().min(1).optional()
|
|
4860
4998
|
}).strict();
|
|
4861
|
-
var hostRemovePathCommandSchema =
|
|
4862
|
-
type:
|
|
4863
|
-
path:
|
|
4864
|
-
rootPath:
|
|
4865
|
-
recursive:
|
|
4999
|
+
var hostRemovePathCommandSchema = z36.object({
|
|
5000
|
+
type: z36.literal("host.remove_path"),
|
|
5001
|
+
path: z36.string().min(1),
|
|
5002
|
+
rootPath: z36.string().min(1).optional(),
|
|
5003
|
+
recursive: z36.boolean()
|
|
4866
5004
|
}).strict();
|
|
4867
|
-
var hostBrowseDirectoryCommandSchema =
|
|
4868
|
-
type:
|
|
5005
|
+
var hostBrowseDirectoryCommandSchema = z36.object({
|
|
5006
|
+
type: z36.literal("host.browse_directory"),
|
|
4869
5007
|
// Absolute directory to list. Omitted means the host's home directory, which
|
|
4870
5008
|
// the daemon resolves — a remote caller has no way to know the host's home.
|
|
4871
|
-
path:
|
|
5009
|
+
path: z36.string().min(1).optional()
|
|
4872
5010
|
});
|
|
4873
5011
|
var hostPathsExistCommandSchema = pathsExistRequestSchema.extend({
|
|
4874
|
-
type:
|
|
5012
|
+
type: z36.literal("host.paths_exist")
|
|
4875
5013
|
}).strict();
|
|
4876
|
-
var projectInspectCommandSchema =
|
|
4877
|
-
type:
|
|
4878
|
-
path:
|
|
5014
|
+
var projectInspectCommandSchema = z36.object({
|
|
5015
|
+
type: z36.literal("project.inspect"),
|
|
5016
|
+
path: z36.string().min(1)
|
|
4879
5017
|
}).strict();
|
|
4880
|
-
var projectCloneDefaultPathCommandSchema =
|
|
4881
|
-
type:
|
|
4882
|
-
projectSlug:
|
|
5018
|
+
var projectCloneDefaultPathCommandSchema = z36.object({
|
|
5019
|
+
type: z36.literal("project.clone_default_path"),
|
|
5020
|
+
projectSlug: z36.string().min(1)
|
|
4883
5021
|
}).strict();
|
|
4884
|
-
var projectCloneCommandSchema =
|
|
4885
|
-
type:
|
|
4886
|
-
remoteUrl:
|
|
4887
|
-
projectSlug:
|
|
4888
|
-
targetPath:
|
|
5022
|
+
var projectCloneCommandSchema = z36.object({
|
|
5023
|
+
type: z36.literal("project.clone"),
|
|
5024
|
+
remoteUrl: z36.string().min(1),
|
|
5025
|
+
projectSlug: z36.string().min(1),
|
|
5026
|
+
targetPath: z36.string().min(1).optional()
|
|
4889
5027
|
}).strict();
|
|
4890
|
-
var hostPickFolderCommandSchema =
|
|
4891
|
-
type:
|
|
5028
|
+
var hostPickFolderCommandSchema = z36.object({
|
|
5029
|
+
type: z36.literal("host.pick_folder")
|
|
4892
5030
|
}).strict();
|
|
4893
|
-
var pluginHostArtifactSchema =
|
|
4894
|
-
digest:
|
|
4895
|
-
byteLength:
|
|
5031
|
+
var pluginHostArtifactSchema = z36.object({
|
|
5032
|
+
digest: z36.string().regex(/^[a-f0-9]{64}$/u),
|
|
5033
|
+
byteLength: z36.number().int().positive().max(HOST_ARTIFACT_MAX_BYTES)
|
|
4896
5034
|
}).strict();
|
|
4897
5035
|
var MAX_NODE_TIMER_DELAY_MS = 2147483647;
|
|
4898
|
-
var pluginHostCallCommandSchema =
|
|
4899
|
-
type:
|
|
4900
|
-
pluginId:
|
|
4901
|
-
generation:
|
|
5036
|
+
var pluginHostCallCommandSchema = z36.object({
|
|
5037
|
+
type: z36.literal("plugin.host.call"),
|
|
5038
|
+
pluginId: z36.string().min(1),
|
|
5039
|
+
generation: z36.string().min(1),
|
|
4902
5040
|
artifact: pluginHostArtifactSchema,
|
|
4903
|
-
callId:
|
|
4904
|
-
method:
|
|
5041
|
+
callId: z36.string().min(1),
|
|
5042
|
+
method: z36.string().min(1),
|
|
4905
5043
|
input: jsonValueSchema,
|
|
4906
|
-
timeoutMs:
|
|
5044
|
+
timeoutMs: z36.number().int().positive().max(MAX_NODE_TIMER_DELAY_MS)
|
|
4907
5045
|
}).strict();
|
|
4908
|
-
var pluginHostCancelCommandSchema =
|
|
4909
|
-
type:
|
|
4910
|
-
pluginId:
|
|
4911
|
-
generation:
|
|
4912
|
-
callId:
|
|
5046
|
+
var pluginHostCancelCommandSchema = z36.object({
|
|
5047
|
+
type: z36.literal("plugin.host.cancel"),
|
|
5048
|
+
pluginId: z36.string().min(1),
|
|
5049
|
+
generation: z36.string().min(1),
|
|
5050
|
+
callId: z36.string().min(1)
|
|
4913
5051
|
}).strict();
|
|
4914
|
-
var pluginHostDisposeCommandSchema =
|
|
4915
|
-
type:
|
|
4916
|
-
pluginId:
|
|
4917
|
-
generation:
|
|
5052
|
+
var pluginHostDisposeCommandSchema = z36.object({
|
|
5053
|
+
type: z36.literal("plugin.host.dispose"),
|
|
5054
|
+
pluginId: z36.string().min(1),
|
|
5055
|
+
generation: z36.string().min(1)
|
|
4918
5056
|
}).strict();
|
|
4919
|
-
var connectTunnelEnsureIdentityCommandSchema =
|
|
4920
|
-
type:
|
|
5057
|
+
var connectTunnelEnsureIdentityCommandSchema = z36.object({
|
|
5058
|
+
type: z36.literal("connect-tunnel.ensure-identity")
|
|
4921
5059
|
}).strict();
|
|
4922
|
-
var directoryEntrySchema =
|
|
5060
|
+
var directoryEntrySchema = z36.object({
|
|
4923
5061
|
kind: hostPathEntryKindSchema,
|
|
4924
|
-
name:
|
|
4925
|
-
path:
|
|
5062
|
+
name: z36.string(),
|
|
5063
|
+
path: z36.string()
|
|
4926
5064
|
});
|
|
4927
|
-
var directoryListingSchema =
|
|
5065
|
+
var directoryListingSchema = z36.object({
|
|
4928
5066
|
// Resolved absolute directory that was listed (symlinks already followed).
|
|
4929
|
-
directory:
|
|
5067
|
+
directory: z36.string(),
|
|
4930
5068
|
// Absolute parent directory, or null at the filesystem root.
|
|
4931
|
-
parent:
|
|
4932
|
-
entries:
|
|
5069
|
+
parent: z36.string().nullable(),
|
|
5070
|
+
entries: z36.array(directoryEntrySchema)
|
|
4933
5071
|
});
|
|
4934
|
-
var hostCommandSourceSchema =
|
|
4935
|
-
var hostCommandOriginSchema =
|
|
4936
|
-
var hostProviderCommandSchema =
|
|
4937
|
-
name:
|
|
5072
|
+
var hostCommandSourceSchema = z36.enum(["skill", "command"]);
|
|
5073
|
+
var hostCommandOriginSchema = z36.enum(["project", "user"]);
|
|
5074
|
+
var hostProviderCommandSchema = z36.object({
|
|
5075
|
+
name: z36.string(),
|
|
4938
5076
|
source: hostCommandSourceSchema,
|
|
4939
5077
|
origin: hostCommandOriginSchema,
|
|
4940
|
-
description:
|
|
4941
|
-
argumentHint:
|
|
5078
|
+
description: z36.string().nullable(),
|
|
5079
|
+
argumentHint: z36.string().nullable()
|
|
4942
5080
|
});
|
|
4943
|
-
var hostListCommandsCommandSchema =
|
|
4944
|
-
type:
|
|
4945
|
-
providerId:
|
|
4946
|
-
cwd:
|
|
5081
|
+
var hostListCommandsCommandSchema = z36.object({
|
|
5082
|
+
type: z36.literal("host.list_commands"),
|
|
5083
|
+
providerId: z36.string().min(1),
|
|
5084
|
+
cwd: z36.string().min(1).nullable(),
|
|
4947
5085
|
nativeSkillRoots: providerNativeSkillRootsSchema.optional()
|
|
4948
5086
|
}).strict();
|
|
4949
|
-
var skillRootKindSchema =
|
|
5087
|
+
var skillRootKindSchema = z36.enum([
|
|
4950
5088
|
"bb-project",
|
|
4951
5089
|
"bb-data-dir",
|
|
4952
5090
|
"bb-builtin",
|
|
@@ -4956,22 +5094,22 @@ var skillRootKindSchema = z35.enum([
|
|
|
4956
5094
|
"shared-user",
|
|
4957
5095
|
"plugin"
|
|
4958
5096
|
]);
|
|
4959
|
-
var discoveredSkillSchema =
|
|
4960
|
-
id:
|
|
4961
|
-
name:
|
|
4962
|
-
description:
|
|
4963
|
-
filePath:
|
|
5097
|
+
var discoveredSkillSchema = z36.object({
|
|
5098
|
+
id: z36.string().regex(/^skill_[a-f0-9]{64}$/u),
|
|
5099
|
+
name: z36.string(),
|
|
5100
|
+
description: z36.string().nullable(),
|
|
5101
|
+
filePath: z36.string(),
|
|
4964
5102
|
rootKind: skillRootKindSchema,
|
|
4965
5103
|
/** True when discovery followed either the skill directory or SKILL.md symlink. */
|
|
4966
|
-
linked:
|
|
5104
|
+
linked: z36.boolean()
|
|
4967
5105
|
});
|
|
4968
|
-
var hostListSkillsCommandSchema =
|
|
4969
|
-
type:
|
|
4970
|
-
providerId:
|
|
4971
|
-
cwd:
|
|
5106
|
+
var hostListSkillsCommandSchema = z36.object({
|
|
5107
|
+
type: z36.literal("host.list_skills"),
|
|
5108
|
+
providerId: z36.string().min(1),
|
|
5109
|
+
cwd: z36.string().min(1).nullable(),
|
|
4972
5110
|
nativeSkillRoots: providerNativeSkillRootsSchema.optional()
|
|
4973
5111
|
}).strict();
|
|
4974
|
-
var deletableSkillScopeSchema =
|
|
5112
|
+
var deletableSkillScopeSchema = z36.enum([
|
|
4975
5113
|
"bb-user",
|
|
4976
5114
|
"bb-project",
|
|
4977
5115
|
// The daemon only distinguishes bb roots (derived locally) from provider
|
|
@@ -4980,12 +5118,12 @@ var deletableSkillScopeSchema = z35.enum([
|
|
|
4980
5118
|
"provider-user",
|
|
4981
5119
|
"provider-project"
|
|
4982
5120
|
]);
|
|
4983
|
-
var hostDeleteSkillCommandSchema =
|
|
4984
|
-
type:
|
|
5121
|
+
var hostDeleteSkillCommandSchema = z36.object({
|
|
5122
|
+
type: z36.literal("host.delete_skill"),
|
|
4985
5123
|
scope: deletableSkillScopeSchema,
|
|
4986
|
-
name:
|
|
4987
|
-
cwd:
|
|
4988
|
-
rootPath:
|
|
5124
|
+
name: z36.string().min(1),
|
|
5125
|
+
cwd: z36.string().min(1).nullable(),
|
|
5126
|
+
rootPath: z36.string().min(1).nullable()
|
|
4989
5127
|
}).strict().superRefine((command, context) => {
|
|
4990
5128
|
if (command.scope === "bb-project" && command.cwd === null) {
|
|
4991
5129
|
context.addIssue({
|
|
@@ -5010,14 +5148,14 @@ var hostDeleteSkillCommandSchema = z35.object({
|
|
|
5010
5148
|
});
|
|
5011
5149
|
}
|
|
5012
5150
|
});
|
|
5013
|
-
var writableBbSkillScopeSchema =
|
|
5014
|
-
var hostWriteSkillCommandSchema =
|
|
5015
|
-
type:
|
|
5151
|
+
var writableBbSkillScopeSchema = z36.enum(["bb-user", "bb-project"]);
|
|
5152
|
+
var hostWriteSkillCommandSchema = z36.object({
|
|
5153
|
+
type: z36.literal("host.write_skill"),
|
|
5016
5154
|
scope: writableBbSkillScopeSchema,
|
|
5017
|
-
name:
|
|
5018
|
-
cwd:
|
|
5019
|
-
content:
|
|
5020
|
-
expectedSha256:
|
|
5155
|
+
name: z36.string().min(1),
|
|
5156
|
+
cwd: z36.string().min(1).nullable(),
|
|
5157
|
+
content: z36.string().min(1).max(1e6),
|
|
5158
|
+
expectedSha256: z36.string().regex(/^[a-f0-9]{64}$/u)
|
|
5021
5159
|
}).strict().superRefine((command, context) => {
|
|
5022
5160
|
if (command.scope === "bb-project" && command.cwd === null) {
|
|
5023
5161
|
context.addIssue({
|
|
@@ -5027,75 +5165,105 @@ var hostWriteSkillCommandSchema = z35.object({
|
|
|
5027
5165
|
});
|
|
5028
5166
|
}
|
|
5029
5167
|
});
|
|
5030
|
-
var hostInstallGlobalSkillSchema =
|
|
5031
|
-
name:
|
|
5032
|
-
treeHash:
|
|
5033
|
-
entryPath:
|
|
5168
|
+
var hostInstallGlobalSkillSchema = z36.object({
|
|
5169
|
+
name: z36.string().max(64).regex(INJECTED_SKILL_NAME_PATTERN),
|
|
5170
|
+
treeHash: z36.string().regex(/^[a-f0-9]{64}$/u),
|
|
5171
|
+
entryPath: z36.string().min(1)
|
|
5034
5172
|
}).strict();
|
|
5035
|
-
var hostInstallGlobalSkillsCommandSchema =
|
|
5036
|
-
type:
|
|
5037
|
-
skills:
|
|
5173
|
+
var hostInstallGlobalSkillsCommandSchema = z36.object({
|
|
5174
|
+
type: z36.literal("host.install_global_skills"),
|
|
5175
|
+
skills: z36.array(hostInstallGlobalSkillSchema).min(1).max(64)
|
|
5038
5176
|
}).strict();
|
|
5039
|
-
var hostGlobalSkillsStatusCommandSchema =
|
|
5040
|
-
type:
|
|
5041
|
-
names:
|
|
5177
|
+
var hostGlobalSkillsStatusCommandSchema = z36.object({
|
|
5178
|
+
type: z36.literal("host.global_skills_status"),
|
|
5179
|
+
names: z36.array(z36.string().max(64).regex(INJECTED_SKILL_NAME_PATTERN)).min(1).max(64)
|
|
5042
5180
|
}).strict();
|
|
5043
|
-
var hostListBranchesCommandSchema =
|
|
5044
|
-
type:
|
|
5045
|
-
path:
|
|
5046
|
-
query:
|
|
5181
|
+
var hostListBranchesCommandSchema = z36.object({
|
|
5182
|
+
type: z36.literal("host.list_branches"),
|
|
5183
|
+
path: z36.string().min(1),
|
|
5184
|
+
query: z36.string().max(BRANCH_LIST_QUERY_MAX_LENGTH).optional(),
|
|
5047
5185
|
selectedBranch: gitBranchNameSchema.optional(),
|
|
5048
|
-
limit:
|
|
5186
|
+
limit: z36.number().int().positive().max(BRANCH_LIST_LIMIT_MAX)
|
|
5049
5187
|
});
|
|
5050
|
-
var
|
|
5051
|
-
type:
|
|
5052
|
-
|
|
5188
|
+
var hostListBranchOptionsCommandSchema = z36.object({
|
|
5189
|
+
type: z36.literal("host.list_branch_options"),
|
|
5190
|
+
path: z36.string().min(1),
|
|
5191
|
+
query: z36.string().max(BRANCH_LIST_QUERY_MAX_LENGTH).optional(),
|
|
5192
|
+
selectedBranch: gitBranchNameSchema.optional(),
|
|
5193
|
+
limit: z36.number().int().positive().max(BRANCH_LIST_LIMIT_MAX),
|
|
5194
|
+
remoteRefresh: z36.enum(["background", "none"])
|
|
5195
|
+
}).strict();
|
|
5196
|
+
var hostBranchOptionsResultSchema = projectSourceCheckoutSchema.pick({
|
|
5197
|
+
branches: true,
|
|
5198
|
+
branchesTruncated: true,
|
|
5199
|
+
remoteBranches: true,
|
|
5200
|
+
remoteBranchesTruncated: true,
|
|
5201
|
+
selectedBranch: true
|
|
5202
|
+
});
|
|
5203
|
+
var providerListModelsCommandSchema = z36.object({
|
|
5204
|
+
type: z36.literal("provider.list_models"),
|
|
5205
|
+
providerId: z36.string().min(1),
|
|
5053
5206
|
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
5054
5207
|
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
5055
|
-
cwd:
|
|
5208
|
+
cwd: z36.string().min(1).optional()
|
|
5056
5209
|
});
|
|
5057
|
-
var
|
|
5058
|
-
|
|
5059
|
-
|
|
5210
|
+
var providerHealthCommandSchema = z36.object({
|
|
5211
|
+
type: z36.literal("provider.health"),
|
|
5212
|
+
providerId: z36.string().min(1),
|
|
5213
|
+
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
5214
|
+
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
5215
|
+
cwd: z36.string().min(1).optional()
|
|
5060
5216
|
}).strict();
|
|
5061
|
-
var
|
|
5062
|
-
type:
|
|
5063
|
-
|
|
5217
|
+
var providerInstallationStatusCommandSchema = z36.object({
|
|
5218
|
+
type: z36.literal("provider.installation.status"),
|
|
5219
|
+
providerId: z36.string().min(1),
|
|
5220
|
+
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
5221
|
+
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
5222
|
+
cwd: z36.string().min(1).optional(),
|
|
5223
|
+
requirement: z36.literal("thread_rewind").optional()
|
|
5064
5224
|
}).strict();
|
|
5065
|
-
var
|
|
5225
|
+
var providerInstallationRunCommandSchema = z36.object({
|
|
5226
|
+
type: z36.literal("provider.installation.run"),
|
|
5227
|
+
providerId: z36.string().min(1),
|
|
5228
|
+
action: providerCliInstallActionKindSchema,
|
|
5229
|
+
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
5230
|
+
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
5231
|
+
cwd: z36.string().min(1).optional()
|
|
5232
|
+
}).strict();
|
|
5233
|
+
var provisionInitiatorSchema = z36.object({
|
|
5066
5234
|
/** Thread that initiated provisioning. Used to stream progress events. */
|
|
5067
|
-
threadId:
|
|
5235
|
+
threadId: z36.string().min(1),
|
|
5068
5236
|
/** Stable provisioning lifecycle rendered by streamed progress events. */
|
|
5069
|
-
provisioningId:
|
|
5237
|
+
provisioningId: z36.string().min(1)
|
|
5070
5238
|
}).strict();
|
|
5071
5239
|
var environmentProvisionCommandBaseSchema = hostDaemonEnvironmentTargetSchema.extend({
|
|
5072
|
-
type:
|
|
5240
|
+
type: z36.literal("environment.provision"),
|
|
5073
5241
|
/** Initiating thread for live progress streaming. Null when no thread is associated (e.g., project source provisioning). */
|
|
5074
5242
|
initiator: provisionInitiatorSchema.nullable()
|
|
5075
5243
|
});
|
|
5076
|
-
var unmanagedCheckoutSchema =
|
|
5077
|
-
|
|
5078
|
-
kind:
|
|
5244
|
+
var unmanagedCheckoutSchema = z36.discriminatedUnion("kind", [
|
|
5245
|
+
z36.object({
|
|
5246
|
+
kind: z36.literal("existing"),
|
|
5079
5247
|
name: gitBranchNameSchema
|
|
5080
5248
|
}).strict(),
|
|
5081
|
-
|
|
5082
|
-
kind:
|
|
5249
|
+
z36.object({
|
|
5250
|
+
kind: z36.literal("new"),
|
|
5083
5251
|
name: gitBranchNameSchema,
|
|
5084
5252
|
baseBranch: gitBranchNameSchema
|
|
5085
5253
|
}).strict()
|
|
5086
5254
|
]);
|
|
5087
5255
|
var unmanagedEnvironmentProvisionCommandSchema = environmentProvisionCommandBaseSchema.extend({
|
|
5088
|
-
workspaceProvisionType:
|
|
5256
|
+
workspaceProvisionType: z36.literal("unmanaged"),
|
|
5089
5257
|
/** Path to validate */
|
|
5090
|
-
path:
|
|
5258
|
+
path: z36.string().min(1),
|
|
5091
5259
|
/** When set, the daemon checks out this branch before opening the workspace. */
|
|
5092
5260
|
checkout: unmanagedCheckoutSchema.optional()
|
|
5093
5261
|
}).strict();
|
|
5094
|
-
var managedEnvironmentProvisionFieldsSchema =
|
|
5262
|
+
var managedEnvironmentProvisionFieldsSchema = z36.object({
|
|
5095
5263
|
/** Source repo path */
|
|
5096
|
-
sourcePath:
|
|
5264
|
+
sourcePath: z36.string().min(1),
|
|
5097
5265
|
/** Target path for worktree/clone creation */
|
|
5098
|
-
targetPath:
|
|
5266
|
+
targetPath: z36.string().min(1),
|
|
5099
5267
|
/** Name of the new branch the daemon should create for this environment. */
|
|
5100
5268
|
branchName: gitBranchNameSchema,
|
|
5101
5269
|
/**
|
|
@@ -5104,15 +5272,15 @@ var managedEnvironmentProvisionFieldsSchema = z35.object({
|
|
|
5104
5272
|
*/
|
|
5105
5273
|
baseBranch: gitBranchNameSchema.nullable(),
|
|
5106
5274
|
/** Maximum time in ms to wait for the setup script */
|
|
5107
|
-
setupTimeoutMs:
|
|
5275
|
+
setupTimeoutMs: z36.number().int().positive()
|
|
5108
5276
|
});
|
|
5109
|
-
var managedWorktreeEnvironmentProvisionCommandSchema = environmentProvisionCommandBaseSchema.merge(managedEnvironmentProvisionFieldsSchema).extend({ workspaceProvisionType:
|
|
5277
|
+
var managedWorktreeEnvironmentProvisionCommandSchema = environmentProvisionCommandBaseSchema.merge(managedEnvironmentProvisionFieldsSchema).extend({ workspaceProvisionType: z36.literal("managed-worktree") }).strict();
|
|
5110
5278
|
var personalEnvironmentProvisionCommandSchema = environmentProvisionCommandBaseSchema.extend({
|
|
5111
|
-
workspaceProvisionType:
|
|
5279
|
+
workspaceProvisionType: z36.literal("personal"),
|
|
5112
5280
|
/** Target directory under the host data dir for the personal workspace. */
|
|
5113
|
-
targetPath:
|
|
5281
|
+
targetPath: z36.string().min(1)
|
|
5114
5282
|
}).strict();
|
|
5115
|
-
var environmentProvisionCommandSchema =
|
|
5283
|
+
var environmentProvisionCommandSchema = z36.discriminatedUnion(
|
|
5116
5284
|
"workspaceProvisionType",
|
|
5117
5285
|
[
|
|
5118
5286
|
unmanagedEnvironmentProvisionCommandSchema,
|
|
@@ -5121,53 +5289,53 @@ var environmentProvisionCommandSchema = z35.discriminatedUnion(
|
|
|
5121
5289
|
]
|
|
5122
5290
|
);
|
|
5123
5291
|
var environmentProvisionCancelCommandSchema = hostDaemonEnvironmentTargetSchema.extend({
|
|
5124
|
-
type:
|
|
5292
|
+
type: z36.literal("environment.provision.cancel")
|
|
5125
5293
|
}).strict();
|
|
5126
5294
|
var environmentDestroyCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5127
|
-
type:
|
|
5295
|
+
type: z36.literal("environment.destroy")
|
|
5128
5296
|
}).strict();
|
|
5129
5297
|
var workspaceStatusCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5130
|
-
type:
|
|
5298
|
+
type: z36.literal("workspace.status"),
|
|
5131
5299
|
mergeBaseBranch: gitBranchNameSchema.optional(),
|
|
5132
|
-
maxUntrackedLineStatFiles:
|
|
5133
|
-
maxUntrackedLineStatBytes:
|
|
5300
|
+
maxUntrackedLineStatFiles: z36.number().int().positive(),
|
|
5301
|
+
maxUntrackedLineStatBytes: z36.number().int().positive()
|
|
5134
5302
|
});
|
|
5135
5303
|
var workspaceDiffCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5136
|
-
type:
|
|
5304
|
+
type: z36.literal("workspace.diff"),
|
|
5137
5305
|
target: workspaceDiffTargetSchema,
|
|
5138
|
-
maxDiffBytes:
|
|
5139
|
-
maxFileListBytes:
|
|
5140
|
-
maxUntrackedFiles:
|
|
5306
|
+
maxDiffBytes: z36.number().int().positive(),
|
|
5307
|
+
maxFileListBytes: z36.number().int().positive(),
|
|
5308
|
+
maxUntrackedFiles: z36.number().int().positive()
|
|
5141
5309
|
});
|
|
5142
5310
|
var workspaceDiffFilesCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5143
|
-
type:
|
|
5311
|
+
type: z36.literal("workspace.diffFiles"),
|
|
5144
5312
|
target: workspaceDiffTargetSchema,
|
|
5145
|
-
maxFiles:
|
|
5313
|
+
maxFiles: z36.number().int().positive()
|
|
5146
5314
|
});
|
|
5147
5315
|
var workspaceDiffPatchCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5148
|
-
type:
|
|
5316
|
+
type: z36.literal("workspace.diffPatch"),
|
|
5149
5317
|
target: workspaceDiffTargetSchema,
|
|
5150
|
-
paths:
|
|
5151
|
-
maxBytesPerFile:
|
|
5318
|
+
paths: z36.array(z36.string()),
|
|
5319
|
+
maxBytesPerFile: z36.number().int().positive()
|
|
5152
5320
|
});
|
|
5153
5321
|
var workspacePullRequestCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5154
|
-
type:
|
|
5322
|
+
type: z36.literal("workspace.pull_request")
|
|
5155
5323
|
});
|
|
5156
|
-
var pullRequestMergeMethodSchema =
|
|
5324
|
+
var pullRequestMergeMethodSchema = z36.enum(["merge", "squash", "rebase"]);
|
|
5157
5325
|
var workspacePullRequestReadyCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5158
|
-
type:
|
|
5159
|
-
operation:
|
|
5326
|
+
type: z36.literal("workspace.pull_request_action"),
|
|
5327
|
+
operation: z36.literal("ready")
|
|
5160
5328
|
}).strict();
|
|
5161
5329
|
var workspacePullRequestDraftCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5162
|
-
type:
|
|
5163
|
-
operation:
|
|
5330
|
+
type: z36.literal("workspace.pull_request_action"),
|
|
5331
|
+
operation: z36.literal("draft")
|
|
5164
5332
|
}).strict();
|
|
5165
5333
|
var workspacePullRequestMergeCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5166
|
-
type:
|
|
5167
|
-
operation:
|
|
5334
|
+
type: z36.literal("workspace.pull_request_action"),
|
|
5335
|
+
operation: z36.literal("merge"),
|
|
5168
5336
|
method: pullRequestMergeMethodSchema
|
|
5169
5337
|
}).strict();
|
|
5170
|
-
var workspacePullRequestActionCommandSchema =
|
|
5338
|
+
var workspacePullRequestActionCommandSchema = z36.discriminatedUnion(
|
|
5171
5339
|
"operation",
|
|
5172
5340
|
[
|
|
5173
5341
|
workspacePullRequestReadyCommandSchema,
|
|
@@ -5176,245 +5344,207 @@ var workspacePullRequestActionCommandSchema = z35.discriminatedUnion(
|
|
|
5176
5344
|
]
|
|
5177
5345
|
);
|
|
5178
5346
|
var workspaceCommitCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5179
|
-
type:
|
|
5180
|
-
message:
|
|
5347
|
+
type: z36.literal("workspace.commit"),
|
|
5348
|
+
message: z36.string().min(1)
|
|
5181
5349
|
}).strict();
|
|
5182
5350
|
var workspaceSquashMergeCommandSchema = hostDaemonWorkspaceTargetSchema.extend({
|
|
5183
|
-
type:
|
|
5351
|
+
type: z36.literal("workspace.squash_merge"),
|
|
5184
5352
|
targetBranch: gitBranchNameSchema,
|
|
5185
|
-
commitMessage:
|
|
5353
|
+
commitMessage: z36.string().min(1)
|
|
5186
5354
|
}).strict();
|
|
5187
|
-
var fileReadResultSchema =
|
|
5188
|
-
path:
|
|
5189
|
-
content:
|
|
5190
|
-
contentEncoding:
|
|
5191
|
-
mimeType:
|
|
5192
|
-
sizeBytes:
|
|
5193
|
-
modifiedAtMs:
|
|
5355
|
+
var fileReadResultSchema = z36.object({
|
|
5356
|
+
path: z36.string(),
|
|
5357
|
+
content: z36.string(),
|
|
5358
|
+
contentEncoding: z36.enum(["base64", "utf8"]),
|
|
5359
|
+
mimeType: z36.string().optional(),
|
|
5360
|
+
sizeBytes: z36.number().int().nonnegative(),
|
|
5361
|
+
modifiedAtMs: z36.number().nonnegative().optional(),
|
|
5194
5362
|
// Hash of the returned bytes, so editors can do compare-and-swap saves via
|
|
5195
5363
|
// `host.write_file`'s `expectedSha256`.
|
|
5196
|
-
sha256:
|
|
5364
|
+
sha256: z36.string()
|
|
5197
5365
|
});
|
|
5198
|
-
var fileWriteResultSchema =
|
|
5199
|
-
|
|
5200
|
-
outcome:
|
|
5201
|
-
sha256:
|
|
5202
|
-
sizeBytes:
|
|
5366
|
+
var fileWriteResultSchema = z36.discriminatedUnion("outcome", [
|
|
5367
|
+
z36.object({
|
|
5368
|
+
outcome: z36.literal("written"),
|
|
5369
|
+
sha256: z36.string(),
|
|
5370
|
+
sizeBytes: z36.number().int().nonnegative()
|
|
5203
5371
|
}).strict(),
|
|
5204
|
-
|
|
5205
|
-
outcome:
|
|
5372
|
+
z36.object({
|
|
5373
|
+
outcome: z36.literal("conflict"),
|
|
5206
5374
|
// Hash of the content currently on disk; null when the file does not
|
|
5207
5375
|
// exist (the caller expected it to).
|
|
5208
|
-
currentSha256:
|
|
5376
|
+
currentSha256: z36.string().nullable()
|
|
5209
5377
|
}).strict()
|
|
5210
5378
|
]);
|
|
5211
|
-
var fileMetadataResultSchema =
|
|
5212
|
-
path:
|
|
5213
|
-
modifiedAtMs:
|
|
5214
|
-
sizeBytes:
|
|
5215
|
-
});
|
|
5216
|
-
var workspaceStatusResultSchema =
|
|
5217
|
-
|
|
5218
|
-
outcome:
|
|
5379
|
+
var fileMetadataResultSchema = z36.object({
|
|
5380
|
+
path: z36.string(),
|
|
5381
|
+
modifiedAtMs: z36.number().nonnegative(),
|
|
5382
|
+
sizeBytes: z36.number().int().nonnegative()
|
|
5383
|
+
});
|
|
5384
|
+
var workspaceStatusResultSchema = z36.discriminatedUnion("outcome", [
|
|
5385
|
+
z36.object({
|
|
5386
|
+
outcome: z36.literal("available"),
|
|
5219
5387
|
workspaceStatus: workspaceStatusSchema
|
|
5220
5388
|
}).strict(),
|
|
5221
|
-
|
|
5222
|
-
outcome:
|
|
5389
|
+
z36.object({
|
|
5390
|
+
outcome: z36.literal("unavailable"),
|
|
5223
5391
|
failure: workspaceResolutionFailureSchema
|
|
5224
5392
|
}).strict()
|
|
5225
5393
|
]);
|
|
5226
|
-
var workspaceDiffResultSchema =
|
|
5227
|
-
|
|
5228
|
-
outcome:
|
|
5394
|
+
var workspaceDiffResultSchema = z36.discriminatedUnion("outcome", [
|
|
5395
|
+
z36.object({
|
|
5396
|
+
outcome: z36.literal("available"),
|
|
5229
5397
|
diff: threadGitDiffResponseSchema
|
|
5230
5398
|
}).strict(),
|
|
5231
|
-
|
|
5232
|
-
outcome:
|
|
5399
|
+
z36.object({
|
|
5400
|
+
outcome: z36.literal("unavailable"),
|
|
5233
5401
|
failure: workspaceResolutionFailureSchema
|
|
5234
5402
|
}).strict()
|
|
5235
5403
|
]);
|
|
5236
|
-
var workspaceDiffFilesResultSchema =
|
|
5237
|
-
|
|
5238
|
-
outcome:
|
|
5239
|
-
files:
|
|
5240
|
-
shortstat:
|
|
5241
|
-
mergeBaseRef:
|
|
5242
|
-
truncated:
|
|
5404
|
+
var workspaceDiffFilesResultSchema = z36.discriminatedUnion("outcome", [
|
|
5405
|
+
z36.object({
|
|
5406
|
+
outcome: z36.literal("available"),
|
|
5407
|
+
files: z36.array(rawDiffFileStatSchema),
|
|
5408
|
+
shortstat: z36.string(),
|
|
5409
|
+
mergeBaseRef: z36.string().nullable(),
|
|
5410
|
+
truncated: z36.boolean()
|
|
5243
5411
|
}).strict(),
|
|
5244
|
-
|
|
5245
|
-
outcome:
|
|
5412
|
+
z36.object({
|
|
5413
|
+
outcome: z36.literal("unavailable"),
|
|
5246
5414
|
failure: workspaceResolutionFailureSchema
|
|
5247
5415
|
}).strict()
|
|
5248
5416
|
]);
|
|
5249
|
-
var workspaceDiffPatchResultSchema =
|
|
5250
|
-
|
|
5251
|
-
outcome:
|
|
5252
|
-
patches:
|
|
5253
|
-
|
|
5254
|
-
path:
|
|
5255
|
-
patch:
|
|
5256
|
-
truncated:
|
|
5417
|
+
var workspaceDiffPatchResultSchema = z36.discriminatedUnion("outcome", [
|
|
5418
|
+
z36.object({
|
|
5419
|
+
outcome: z36.literal("available"),
|
|
5420
|
+
patches: z36.array(
|
|
5421
|
+
z36.object({
|
|
5422
|
+
path: z36.string(),
|
|
5423
|
+
patch: z36.string(),
|
|
5424
|
+
truncated: z36.boolean()
|
|
5257
5425
|
}).strict()
|
|
5258
5426
|
)
|
|
5259
5427
|
}).strict(),
|
|
5260
|
-
|
|
5261
|
-
outcome:
|
|
5428
|
+
z36.object({
|
|
5429
|
+
outcome: z36.literal("unavailable"),
|
|
5262
5430
|
failure: workspaceResolutionFailureSchema
|
|
5263
5431
|
}).strict()
|
|
5264
5432
|
]);
|
|
5265
|
-
var workspacePullRequestResultSchema =
|
|
5266
|
-
|
|
5267
|
-
outcome:
|
|
5433
|
+
var workspacePullRequestResultSchema = z36.discriminatedUnion("outcome", [
|
|
5434
|
+
z36.object({
|
|
5435
|
+
outcome: z36.literal("available"),
|
|
5268
5436
|
pullRequest: gitHostPullRequestSchema
|
|
5269
5437
|
}).strict(),
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
outcome:
|
|
5273
|
-
message:
|
|
5438
|
+
z36.object({ outcome: z36.literal("absent") }).strict(),
|
|
5439
|
+
z36.object({
|
|
5440
|
+
outcome: z36.literal("unavailable"),
|
|
5441
|
+
message: z36.string().min(1)
|
|
5274
5442
|
}).strict()
|
|
5275
5443
|
]);
|
|
5276
|
-
var fileListResultSchema =
|
|
5277
|
-
files:
|
|
5278
|
-
truncated:
|
|
5279
|
-
});
|
|
5280
|
-
var pathListResultSchema =
|
|
5281
|
-
paths:
|
|
5282
|
-
truncated:
|
|
5283
|
-
});
|
|
5284
|
-
var hostPathMutationResultSchema =
|
|
5285
|
-
var pluginHostCallResultSchema =
|
|
5286
|
-
var pluginHostCancelResultSchema =
|
|
5287
|
-
var pluginHostDisposeResultSchema =
|
|
5288
|
-
var commandListResultSchema =
|
|
5289
|
-
commands:
|
|
5290
|
-
});
|
|
5291
|
-
var skillListResultSchema =
|
|
5292
|
-
skills:
|
|
5293
|
-
});
|
|
5294
|
-
var deleteSkillResultSchema =
|
|
5295
|
-
deletedPath:
|
|
5296
|
-
});
|
|
5297
|
-
var installGlobalSkillsResultSchema =
|
|
5298
|
-
installations:
|
|
5299
|
-
|
|
5300
|
-
name:
|
|
5301
|
-
path:
|
|
5444
|
+
var fileListResultSchema = z36.object({
|
|
5445
|
+
files: z36.array(z36.object({ path: z36.string(), name: z36.string() })),
|
|
5446
|
+
truncated: z36.boolean()
|
|
5447
|
+
});
|
|
5448
|
+
var pathListResultSchema = z36.object({
|
|
5449
|
+
paths: z36.array(hostPathEntrySchema),
|
|
5450
|
+
truncated: z36.boolean()
|
|
5451
|
+
});
|
|
5452
|
+
var hostPathMutationResultSchema = z36.object({ ok: z36.literal(true) }).strict();
|
|
5453
|
+
var pluginHostCallResultSchema = z36.object({ output: jsonValueSchema }).strict();
|
|
5454
|
+
var pluginHostCancelResultSchema = z36.object({ cancelled: z36.boolean() }).strict();
|
|
5455
|
+
var pluginHostDisposeResultSchema = z36.object({ disposed: z36.boolean() }).strict();
|
|
5456
|
+
var commandListResultSchema = z36.object({
|
|
5457
|
+
commands: z36.array(hostProviderCommandSchema)
|
|
5458
|
+
});
|
|
5459
|
+
var skillListResultSchema = z36.object({
|
|
5460
|
+
skills: z36.array(discoveredSkillSchema)
|
|
5461
|
+
});
|
|
5462
|
+
var deleteSkillResultSchema = z36.object({
|
|
5463
|
+
deletedPath: z36.string()
|
|
5464
|
+
});
|
|
5465
|
+
var installGlobalSkillsResultSchema = z36.object({
|
|
5466
|
+
installations: z36.array(
|
|
5467
|
+
z36.object({
|
|
5468
|
+
name: z36.string(),
|
|
5469
|
+
path: z36.string()
|
|
5302
5470
|
}).strict()
|
|
5303
5471
|
)
|
|
5304
5472
|
}).strict();
|
|
5305
|
-
var globalSkillsStatusResultSchema =
|
|
5473
|
+
var globalSkillsStatusResultSchema = z36.object({
|
|
5306
5474
|
/** One entry per (skill name, global skill root) pair on this host. */
|
|
5307
|
-
entries:
|
|
5308
|
-
|
|
5309
|
-
name:
|
|
5310
|
-
path:
|
|
5475
|
+
entries: z36.array(
|
|
5476
|
+
z36.object({
|
|
5477
|
+
name: z36.string(),
|
|
5478
|
+
path: z36.string(),
|
|
5311
5479
|
/** Tree hash of the installed copy, or null when nothing is there. */
|
|
5312
|
-
treeHash:
|
|
5480
|
+
treeHash: z36.string().regex(/^[a-f0-9]{64}$/u).nullable()
|
|
5313
5481
|
}).strict()
|
|
5314
5482
|
)
|
|
5315
5483
|
}).strict();
|
|
5316
|
-
var writeSkillResultSchema =
|
|
5317
|
-
|
|
5318
|
-
outcome:
|
|
5319
|
-
filePath:
|
|
5320
|
-
sha256:
|
|
5321
|
-
}),
|
|
5322
|
-
|
|
5323
|
-
outcome:
|
|
5324
|
-
currentSha256:
|
|
5484
|
+
var writeSkillResultSchema = z36.discriminatedUnion("outcome", [
|
|
5485
|
+
z36.object({
|
|
5486
|
+
outcome: z36.literal("written"),
|
|
5487
|
+
filePath: z36.string(),
|
|
5488
|
+
sha256: z36.string().regex(/^[a-f0-9]{64}$/u)
|
|
5489
|
+
}),
|
|
5490
|
+
z36.object({
|
|
5491
|
+
outcome: z36.literal("conflict"),
|
|
5492
|
+
currentSha256: z36.string().regex(/^[a-f0-9]{64}$/u).nullable()
|
|
5325
5493
|
})
|
|
5326
5494
|
]);
|
|
5327
|
-
var providerListModelsResultSchema =
|
|
5328
|
-
models:
|
|
5329
|
-
selectedOnlyModels:
|
|
5330
|
-
});
|
|
5331
|
-
var knownAcpAgentExecutableStatusSchema = z35.object({
|
|
5332
|
-
id: z35.string().min(1),
|
|
5333
|
-
executableName: z35.string().min(1),
|
|
5334
|
-
installed: z35.boolean(),
|
|
5335
|
-
executablePath: z35.string().min(1).nullable()
|
|
5336
|
-
}).strict();
|
|
5337
|
-
var knownAcpAgentsStatusResultSchema = z35.object({
|
|
5338
|
-
agents: z35.array(knownAcpAgentExecutableStatusSchema)
|
|
5339
|
-
}).strict();
|
|
5340
|
-
var threadStartResultSchema = z35.object({
|
|
5341
|
-
providerThreadId: z35.string().min(1)
|
|
5495
|
+
var providerListModelsResultSchema = z36.object({
|
|
5496
|
+
models: z36.array(availableModelSchema),
|
|
5497
|
+
selectedOnlyModels: z36.array(availableModelSchema)
|
|
5342
5498
|
});
|
|
5343
|
-
var
|
|
5344
|
-
|
|
5499
|
+
var threadStartResultSchema = z36.object({
|
|
5500
|
+
providerThreadId: z36.string().min(1)
|
|
5345
5501
|
});
|
|
5346
|
-
var
|
|
5347
|
-
|
|
5502
|
+
var turnSubmitResultSchema = z36.object({
|
|
5503
|
+
appliedAs: z36.enum(["new-turn", "steer"])
|
|
5504
|
+
});
|
|
5505
|
+
var threadStopResultSchema = z36.object({
|
|
5506
|
+
providerCheckpointId: z36.string().min(1).nullable()
|
|
5348
5507
|
}).strict();
|
|
5349
|
-
var emptyCommandResultSchema =
|
|
5350
|
-
var projectPathResultSchema =
|
|
5351
|
-
var projectInspectResultSchema = projectPathResultSchema.extend({ gitRemoteUrl:
|
|
5508
|
+
var emptyCommandResultSchema = z36.object({});
|
|
5509
|
+
var projectPathResultSchema = z36.object({ path: z36.string().min(1) }).strict();
|
|
5510
|
+
var projectInspectResultSchema = projectPathResultSchema.extend({ gitRemoteUrl: z36.string().min(1).nullable() }).strict();
|
|
5352
5511
|
var projectCloneResultSchema = projectInspectResultSchema;
|
|
5353
|
-
var codexInferenceCompleteResultSchema =
|
|
5354
|
-
model:
|
|
5512
|
+
var codexInferenceCompleteResultSchema = z36.object({
|
|
5513
|
+
model: z36.string().min(1),
|
|
5355
5514
|
value: jsonObjectSchema
|
|
5356
5515
|
});
|
|
5357
|
-
var codexVoiceTranscribeResultSchema =
|
|
5358
|
-
model:
|
|
5359
|
-
text:
|
|
5516
|
+
var codexVoiceTranscribeResultSchema = z36.object({
|
|
5517
|
+
model: z36.string().min(1),
|
|
5518
|
+
text: z36.string()
|
|
5360
5519
|
});
|
|
5361
5520
|
var environmentProvisionResultSchema = discoveredWorkspacePropertiesSchema.extend({
|
|
5362
|
-
transcript:
|
|
5521
|
+
transcript: z36.array(provisioningTranscriptEntrySchema)
|
|
5363
5522
|
});
|
|
5364
|
-
var environmentProvisionCancelResultSchema =
|
|
5365
|
-
aborted:
|
|
5523
|
+
var environmentProvisionCancelResultSchema = z36.object({
|
|
5524
|
+
aborted: z36.boolean()
|
|
5366
5525
|
});
|
|
5367
|
-
var workspaceCommitResultSchema =
|
|
5368
|
-
commitSha:
|
|
5369
|
-
commitSubject:
|
|
5526
|
+
var workspaceCommitResultSchema = z36.object({
|
|
5527
|
+
commitSha: z36.string().min(1),
|
|
5528
|
+
commitSubject: z36.string().min(1)
|
|
5370
5529
|
});
|
|
5371
5530
|
var workspaceSquashMergeResultSchema = workspaceCommitResultSchema.extend({
|
|
5372
|
-
merged:
|
|
5373
|
-
});
|
|
5374
|
-
var workspacePullRequestActionResultSchema = z35.object({}).strict();
|
|
5375
|
-
var providerUsageWindowSchema = z35.object({
|
|
5376
|
-
label: z35.string().min(1),
|
|
5377
|
-
usedPercent: z35.number().min(0).max(100),
|
|
5378
|
-
resetsAt: z35.string().min(1).nullable(),
|
|
5379
|
-
cost: z35.object({
|
|
5380
|
-
usedUsdCents: z35.number().int().nonnegative(),
|
|
5381
|
-
limitUsdCents: z35.number().int().positive()
|
|
5382
|
-
}).optional()
|
|
5531
|
+
merged: z36.boolean()
|
|
5383
5532
|
});
|
|
5384
|
-
var
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
message: z35.string().min(1),
|
|
5397
|
-
/**
|
|
5398
|
-
* Plan and account are read from local credentials *before* the usage HTTP
|
|
5399
|
-
* call, so a rate limit or outage does not have to erase them. Null when the
|
|
5400
|
-
* provider only learns them from the response body.
|
|
5401
|
-
*/
|
|
5402
|
-
planLabel: z35.string().min(1).nullable().default(null),
|
|
5403
|
-
accountEmail: z35.string().nullable().default(null)
|
|
5404
|
-
})
|
|
5405
|
-
]);
|
|
5406
|
-
var providerUsageResponseSchema = z35.object({
|
|
5407
|
-
codex: providerUsageSchema,
|
|
5408
|
-
claudeCode: providerUsageSchema,
|
|
5409
|
-
cursor: providerUsageSchema
|
|
5410
|
-
});
|
|
5411
|
-
var providerUsageCommandSchema = z35.object({ type: z35.literal("provider.usage") }).strict();
|
|
5412
|
-
var providerCliStatusCommandSchema = z35.object({ type: z35.literal("provider_cli.status") }).strict();
|
|
5413
|
-
var providerCliInstallCommandSchema = providerCliInstallRequestSchema.extend({
|
|
5414
|
-
type: z35.literal("provider_cli.install")
|
|
5533
|
+
var workspacePullRequestActionResultSchema = z36.object({}).strict();
|
|
5534
|
+
var providerUsageSchema = experimental_providerUsageSchema;
|
|
5535
|
+
var providerUsageResponseSchema = z36.record(
|
|
5536
|
+
z36.string().min(1),
|
|
5537
|
+
providerUsageSchema
|
|
5538
|
+
);
|
|
5539
|
+
var providerUsageCommandSchema = z36.object({
|
|
5540
|
+
type: z36.literal("provider.usage"),
|
|
5541
|
+
providerId: z36.string().min(1),
|
|
5542
|
+
acpLaunchSpec: hostDaemonAcpLaunchSpecSchema.optional(),
|
|
5543
|
+
bridgeLaunch: hostDaemonBridgeLaunchSchema,
|
|
5544
|
+
cwd: z36.string().min(1).optional()
|
|
5415
5545
|
}).strict();
|
|
5416
|
-
var providerCliInstallResultSchema =
|
|
5417
|
-
events:
|
|
5546
|
+
var providerCliInstallResultSchema = z36.object({
|
|
5547
|
+
events: z36.array(providerCliInstallEventSchema)
|
|
5418
5548
|
}).strict();
|
|
5419
5549
|
function defineHostDaemonCommandDescriptor(descriptor) {
|
|
5420
5550
|
return descriptor;
|
|
@@ -5468,7 +5598,7 @@ var hostDaemonCommandRegistry = {
|
|
|
5468
5598
|
"thread.goal.clear": defineHostDaemonCommandDescriptor({
|
|
5469
5599
|
type: "thread.goal.clear",
|
|
5470
5600
|
schema: threadGoalClearCommandSchema,
|
|
5471
|
-
resultSchema:
|
|
5601
|
+
resultSchema: z36.object({ cleared: z36.boolean() }).strict(),
|
|
5472
5602
|
transport: "settled",
|
|
5473
5603
|
retryable: false,
|
|
5474
5604
|
flushEventsBeforeResult: true,
|
|
@@ -5477,7 +5607,7 @@ var hostDaemonCommandRegistry = {
|
|
|
5477
5607
|
"thread.plan.cancel": defineHostDaemonCommandDescriptor({
|
|
5478
5608
|
type: "thread.plan.cancel",
|
|
5479
5609
|
schema: threadPlanCancelCommandSchema,
|
|
5480
|
-
resultSchema:
|
|
5610
|
+
resultSchema: z36.object({ cancelled: z36.boolean() }).strict(),
|
|
5481
5611
|
transport: "settled",
|
|
5482
5612
|
retryable: false,
|
|
5483
5613
|
flushEventsBeforeResult: true,
|
|
@@ -5798,6 +5928,15 @@ var hostDaemonCommandRegistry = {
|
|
|
5798
5928
|
flushEventsBeforeResult: false,
|
|
5799
5929
|
envLane: null
|
|
5800
5930
|
}),
|
|
5931
|
+
"host.list_branch_options": defineHostDaemonCommandDescriptor({
|
|
5932
|
+
type: "host.list_branch_options",
|
|
5933
|
+
schema: hostListBranchOptionsCommandSchema,
|
|
5934
|
+
resultSchema: hostBranchOptionsResultSchema,
|
|
5935
|
+
transport: "onlineRpc",
|
|
5936
|
+
retryable: true,
|
|
5937
|
+
flushEventsBeforeResult: false,
|
|
5938
|
+
envLane: null
|
|
5939
|
+
}),
|
|
5801
5940
|
"host.file_metadata": defineHostDaemonCommandDescriptor({
|
|
5802
5941
|
type: "host.file_metadata",
|
|
5803
5942
|
schema: hostFileMetadataCommandSchema,
|
|
@@ -5843,39 +5982,39 @@ var hostDaemonCommandRegistry = {
|
|
|
5843
5982
|
flushEventsBeforeResult: false,
|
|
5844
5983
|
envLane: null
|
|
5845
5984
|
}),
|
|
5846
|
-
"
|
|
5847
|
-
type: "
|
|
5848
|
-
schema:
|
|
5849
|
-
resultSchema:
|
|
5985
|
+
"provider.health": defineHostDaemonCommandDescriptor({
|
|
5986
|
+
type: "provider.health",
|
|
5987
|
+
schema: providerHealthCommandSchema,
|
|
5988
|
+
resultSchema: experimental_providerHealthResultSchema,
|
|
5850
5989
|
transport: "onlineRpc",
|
|
5851
5990
|
retryable: true,
|
|
5852
5991
|
flushEventsBeforeResult: false,
|
|
5853
5992
|
envLane: null
|
|
5854
5993
|
}),
|
|
5855
|
-
"provider.
|
|
5856
|
-
type: "provider.
|
|
5857
|
-
schema:
|
|
5858
|
-
resultSchema:
|
|
5994
|
+
"provider.installation.status": defineHostDaemonCommandDescriptor({
|
|
5995
|
+
type: "provider.installation.status",
|
|
5996
|
+
schema: providerInstallationStatusCommandSchema,
|
|
5997
|
+
resultSchema: experimental_providerInstallationStatusSchema,
|
|
5859
5998
|
transport: "onlineRpc",
|
|
5860
5999
|
retryable: true,
|
|
5861
6000
|
flushEventsBeforeResult: false,
|
|
5862
6001
|
envLane: null
|
|
5863
6002
|
}),
|
|
5864
|
-
"
|
|
5865
|
-
type: "
|
|
5866
|
-
schema:
|
|
5867
|
-
resultSchema:
|
|
6003
|
+
"provider.installation.run": defineHostDaemonCommandDescriptor({
|
|
6004
|
+
type: "provider.installation.run",
|
|
6005
|
+
schema: providerInstallationRunCommandSchema,
|
|
6006
|
+
resultSchema: providerCliInstallResultSchema,
|
|
5868
6007
|
transport: "onlineRpc",
|
|
5869
|
-
retryable:
|
|
6008
|
+
retryable: false,
|
|
5870
6009
|
flushEventsBeforeResult: false,
|
|
5871
6010
|
envLane: null
|
|
5872
6011
|
}),
|
|
5873
|
-
"
|
|
5874
|
-
type: "
|
|
5875
|
-
schema:
|
|
5876
|
-
resultSchema:
|
|
6012
|
+
"provider.usage": defineHostDaemonCommandDescriptor({
|
|
6013
|
+
type: "provider.usage",
|
|
6014
|
+
schema: providerUsageCommandSchema,
|
|
6015
|
+
resultSchema: experimental_providerUsageResultSchema,
|
|
5877
6016
|
transport: "onlineRpc",
|
|
5878
|
-
retryable:
|
|
6017
|
+
retryable: true,
|
|
5879
6018
|
flushEventsBeforeResult: false,
|
|
5880
6019
|
envLane: null
|
|
5881
6020
|
}),
|
|
@@ -5939,7 +6078,7 @@ function hostDaemonCommandSchemaForTransport(transport) {
|
|
|
5939
6078
|
const schemas = hostDaemonCommandDescriptorsForTransport(transport).map(
|
|
5940
6079
|
(descriptor) => descriptor.schema
|
|
5941
6080
|
);
|
|
5942
|
-
return
|
|
6081
|
+
return z36.union(
|
|
5943
6082
|
schemas
|
|
5944
6083
|
);
|
|
5945
6084
|
}
|
|
@@ -5971,17 +6110,17 @@ function isHostDaemonSettledCommandTypeValue(value) {
|
|
|
5971
6110
|
function isHostDaemonOnlineRpcCommandTypeValue(value) {
|
|
5972
6111
|
return typeof value === "string" && isHostDaemonOnlineRpcCommandType(value);
|
|
5973
6112
|
}
|
|
5974
|
-
var hostDaemonSettledCommandTypeSchema =
|
|
5975
|
-
var hostDaemonOnlineRpcCommandTypeSchema =
|
|
6113
|
+
var hostDaemonSettledCommandTypeSchema = z36.custom(isHostDaemonSettledCommandTypeValue);
|
|
6114
|
+
var hostDaemonOnlineRpcCommandTypeSchema = z36.custom(
|
|
5976
6115
|
isHostDaemonOnlineRpcCommandTypeValue
|
|
5977
6116
|
);
|
|
5978
6117
|
var hostDaemonCommandSchema = hostDaemonCommandSchemaForTransport("settled");
|
|
5979
6118
|
var hostDaemonOnlineRpcCommandSchema = hostDaemonCommandSchemaForTransport("onlineRpc");
|
|
5980
|
-
var hostDaemonRpcCommandSchema =
|
|
6119
|
+
var hostDaemonRpcCommandSchema = z36.union([
|
|
5981
6120
|
hostDaemonOnlineRpcCommandSchema,
|
|
5982
6121
|
hostDaemonCommandSchema
|
|
5983
6122
|
]);
|
|
5984
|
-
var hostDaemonRpcCommandTypeSchema =
|
|
6123
|
+
var hostDaemonRpcCommandTypeSchema = z36.union([
|
|
5985
6124
|
hostDaemonOnlineRpcCommandTypeSchema,
|
|
5986
6125
|
hostDaemonSettledCommandTypeSchema
|
|
5987
6126
|
]);
|
|
@@ -6032,7 +6171,24 @@ export {
|
|
|
6032
6171
|
deltaTextChannelSchema,
|
|
6033
6172
|
dynamicToolSchema,
|
|
6034
6173
|
errorEnvelopeSchema,
|
|
6174
|
+
buildBridgeToolCallContent as experimental_buildBridgeToolCallContent,
|
|
6035
6175
|
experimental_defineProviderBridge,
|
|
6176
|
+
experimental_providerHealthResultSchema,
|
|
6177
|
+
experimental_providerHealthSchema,
|
|
6178
|
+
experimental_providerInstallationActionKindSchema,
|
|
6179
|
+
experimental_providerInstallationActionSchema,
|
|
6180
|
+
experimental_providerInstallationCommandSchema,
|
|
6181
|
+
experimental_providerInstallationRequirementSchema,
|
|
6182
|
+
experimental_providerInstallationRunParamsSchema,
|
|
6183
|
+
experimental_providerInstallationRunResultSchema,
|
|
6184
|
+
experimental_providerInstallationSourceSchema,
|
|
6185
|
+
experimental_providerInstallationStatusParamsSchema,
|
|
6186
|
+
experimental_providerInstallationStatusSchema,
|
|
6187
|
+
experimental_providerInstallationVerificationSchema,
|
|
6188
|
+
experimental_providerMaintenanceParamsSchema,
|
|
6189
|
+
experimental_providerUsageResultSchema,
|
|
6190
|
+
experimental_providerUsageSchema,
|
|
6191
|
+
experimental_providerUsageWindowSchema,
|
|
6036
6192
|
extractResultText,
|
|
6037
6193
|
getRawSdkMessage,
|
|
6038
6194
|
getRecordProperty,
|