@get-bb/plugin-sdk 0.4.9 → 0.4.11
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 +253 -28
- 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 +209 -16
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +3314 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +1362 -327
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +38 -2
- package/bundled-types/bb-plugin-sdk.d.ts +2259 -526
- package/dist/app.js +10 -0
- package/dist/internal/file-navigation-validation.js +135 -0
- package/dist/internal/host-policy.js +467 -4
- package/dist/internal/plugin-app-collector.js +22 -1
- package/dist/provider-bridge-testing.js +5777 -0
- package/dist/provider-bridge.js +2906 -2136
- package/dist/testing/app.js +334 -2
- package/dist/testing/index.js +481 -21
- package/package.json +13 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// and read the real source: https://github.com/get-bb/bb
|
|
7
7
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
+
import { Writable, Readable } from 'node:stream';
|
|
9
10
|
|
|
10
11
|
declare const acpReasoningCliSchema: z.ZodObject<{
|
|
11
12
|
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
@@ -243,6 +244,24 @@ declare const claudeTaskToolOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
243
244
|
}, z.core.$loose>]>;
|
|
244
245
|
type ClaudeTaskToolOutput = z.infer<typeof claudeTaskToolOutputSchema>;
|
|
245
246
|
|
|
247
|
+
declare const threadEventItemPresentationSchema: z.ZodObject<{
|
|
248
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
249
|
+
icon: z.ZodObject<{
|
|
250
|
+
glyph: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
label: z.ZodObject<{
|
|
253
|
+
completed: z.ZodString;
|
|
254
|
+
pending: z.ZodString;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
dark: z.ZodString;
|
|
259
|
+
light: z.ZodString;
|
|
260
|
+
}, z.core.$strip>>;
|
|
261
|
+
title: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
type ThreadEventItemPresentation = z.infer<typeof threadEventItemPresentationSchema>;
|
|
264
|
+
|
|
246
265
|
declare function toPositiveNumber(value: unknown): number | undefined;
|
|
247
266
|
|
|
248
267
|
declare const pendingInteractionCommandActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -410,6 +429,26 @@ declare const pendingInteractionApprovalSubjectSchema: z.ZodDiscriminatedUnion<[
|
|
|
410
429
|
kind: z.ZodLiteral<"plan">;
|
|
411
430
|
plan: z.ZodString;
|
|
412
431
|
planFilePath: z.ZodNullable<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
433
|
+
itemId: z.ZodString;
|
|
434
|
+
kind: z.ZodLiteral<"tool_use">;
|
|
435
|
+
presentation: z.ZodObject<{
|
|
436
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
437
|
+
icon: z.ZodObject<{
|
|
438
|
+
glyph: z.ZodString;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
label: z.ZodObject<{
|
|
441
|
+
completed: z.ZodString;
|
|
442
|
+
pending: z.ZodString;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
445
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
446
|
+
dark: z.ZodString;
|
|
447
|
+
light: z.ZodString;
|
|
448
|
+
}, z.core.$strip>>;
|
|
449
|
+
title: z.ZodOptional<z.ZodString>;
|
|
450
|
+
}, z.core.$strip>;
|
|
451
|
+
tool: z.ZodString;
|
|
413
452
|
}, z.core.$strip>], "kind">;
|
|
414
453
|
type PendingInteractionApprovalSubject = z.infer<typeof pendingInteractionApprovalSubjectSchema>;
|
|
415
454
|
declare const approvalPendingInteractionPayloadSchema: z.ZodObject<{
|
|
@@ -483,6 +522,26 @@ declare const approvalPendingInteractionPayloadSchema: z.ZodObject<{
|
|
|
483
522
|
kind: z.ZodLiteral<"plan">;
|
|
484
523
|
plan: z.ZodString;
|
|
485
524
|
planFilePath: z.ZodNullable<z.ZodString>;
|
|
525
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
526
|
+
itemId: z.ZodString;
|
|
527
|
+
kind: z.ZodLiteral<"tool_use">;
|
|
528
|
+
presentation: z.ZodObject<{
|
|
529
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
530
|
+
icon: z.ZodObject<{
|
|
531
|
+
glyph: z.ZodString;
|
|
532
|
+
}, z.core.$strip>;
|
|
533
|
+
label: z.ZodObject<{
|
|
534
|
+
completed: z.ZodString;
|
|
535
|
+
pending: z.ZodString;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
538
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
539
|
+
dark: z.ZodString;
|
|
540
|
+
light: z.ZodString;
|
|
541
|
+
}, z.core.$strip>>;
|
|
542
|
+
title: z.ZodOptional<z.ZodString>;
|
|
543
|
+
}, z.core.$strip>;
|
|
544
|
+
tool: z.ZodString;
|
|
486
545
|
}, z.core.$strip>], "kind">;
|
|
487
546
|
}, z.core.$strip>;
|
|
488
547
|
type ApprovalPendingInteractionPayload = z.infer<typeof approvalPendingInteractionPayloadSchema>;
|
|
@@ -594,6 +653,26 @@ declare const pendingInteractionPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
594
653
|
kind: z.ZodLiteral<"plan">;
|
|
595
654
|
plan: z.ZodString;
|
|
596
655
|
planFilePath: z.ZodNullable<z.ZodString>;
|
|
656
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
657
|
+
itemId: z.ZodString;
|
|
658
|
+
kind: z.ZodLiteral<"tool_use">;
|
|
659
|
+
presentation: z.ZodObject<{
|
|
660
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
661
|
+
icon: z.ZodObject<{
|
|
662
|
+
glyph: z.ZodString;
|
|
663
|
+
}, z.core.$strip>;
|
|
664
|
+
label: z.ZodObject<{
|
|
665
|
+
completed: z.ZodString;
|
|
666
|
+
pending: z.ZodString;
|
|
667
|
+
}, z.core.$strip>;
|
|
668
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
669
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
670
|
+
dark: z.ZodString;
|
|
671
|
+
light: z.ZodString;
|
|
672
|
+
}, z.core.$strip>>;
|
|
673
|
+
title: z.ZodOptional<z.ZodString>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
tool: z.ZodString;
|
|
597
676
|
}, z.core.$strip>], "kind">;
|
|
598
677
|
}, z.core.$strip>, z.ZodObject<{
|
|
599
678
|
kind: z.ZodLiteral<"user_question">;
|
|
@@ -611,6 +690,37 @@ declare const pendingInteractionPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
611
690
|
}, z.core.$strip>>;
|
|
612
691
|
}, z.core.$strip>], "kind">;
|
|
613
692
|
type PendingInteractionPayload = z.infer<typeof pendingInteractionPayloadSchema>;
|
|
693
|
+
/**
|
|
694
|
+
* The open request family. A plain union rather than a discriminated one
|
|
695
|
+
* because the plugin member's `kind` is a namespace pattern, not a literal;
|
|
696
|
+
* the core literals (`user_question`, `plan_review`) contain no "/" so the
|
|
697
|
+
* members never overlap.
|
|
698
|
+
*/
|
|
699
|
+
declare const interactionRequestPayloadSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
700
|
+
kind: z.ZodLiteral<"user_question">;
|
|
701
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
702
|
+
allowFreeText: z.ZodBoolean;
|
|
703
|
+
id: z.ZodString;
|
|
704
|
+
multiSelect: z.ZodBoolean;
|
|
705
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
706
|
+
description: z.ZodOptional<z.ZodString>;
|
|
707
|
+
label: z.ZodString;
|
|
708
|
+
value: z.ZodString;
|
|
709
|
+
}, z.core.$strip>>>;
|
|
710
|
+
prompt: z.ZodString;
|
|
711
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
712
|
+
}, z.core.$strip>>;
|
|
713
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
714
|
+
itemId: z.ZodString;
|
|
715
|
+
kind: z.ZodLiteral<"plan_review">;
|
|
716
|
+
plan: z.ZodString;
|
|
717
|
+
planFilePath: z.ZodNullable<z.ZodString>;
|
|
718
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
719
|
+
data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
720
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
721
|
+
title: z.ZodString;
|
|
722
|
+
}, z.core.$strip>]>;
|
|
723
|
+
type InteractionRequestPayload = z.infer<typeof interactionRequestPayloadSchema>;
|
|
614
724
|
type AnyPendingInteractionPayload = PendingInteractionPayload | PluginPendingInteractionPayload;
|
|
615
725
|
declare function isApprovalPendingInteractionPayload(payload: AnyPendingInteractionPayload): payload is ApprovalPendingInteractionPayload;
|
|
616
726
|
declare function isUserQuestionPendingInteractionPayload(payload: AnyPendingInteractionPayload): payload is UserQuestionPendingInteractionPayload;
|
|
@@ -685,6 +795,178 @@ type PendingInteractionResolution = z.infer<typeof pendingInteractionResolutionS
|
|
|
685
795
|
declare function isApprovalPendingInteractionResolution(resolution: PendingInteractionResolution): resolution is ApprovalPendingInteractionResolution;
|
|
686
796
|
declare function isUserQuestionPendingInteractionResolution(resolution: PendingInteractionResolution): resolution is UserQuestionPendingInteractionResolution;
|
|
687
797
|
|
|
798
|
+
declare const threadEventItemStatusSchema: z.ZodEnum<{
|
|
799
|
+
completed: "completed";
|
|
800
|
+
failed: "failed";
|
|
801
|
+
interrupted: "interrupted";
|
|
802
|
+
pending: "pending";
|
|
803
|
+
}>;
|
|
804
|
+
type ThreadEventItemStatus = z.infer<typeof threadEventItemStatusSchema>;
|
|
805
|
+
declare const threadEventTurnStatusSchema: z.ZodEnum<{
|
|
806
|
+
completed: "completed";
|
|
807
|
+
failed: "failed";
|
|
808
|
+
interrupted: "interrupted";
|
|
809
|
+
}>;
|
|
810
|
+
type ThreadEventTurnStatus = z.infer<typeof threadEventTurnStatusSchema>;
|
|
811
|
+
declare const providerErrorCategorySchema: z.ZodEnum<{
|
|
812
|
+
"active-turn-not-steerable": "active-turn-not-steerable";
|
|
813
|
+
"bad-request": "bad-request";
|
|
814
|
+
"budget-exceeded": "budget-exceeded";
|
|
815
|
+
"connection-failed": "connection-failed";
|
|
816
|
+
"context-window-exceeded": "context-window-exceeded";
|
|
817
|
+
"max-output-tokens": "max-output-tokens";
|
|
818
|
+
"max-turns": "max-turns";
|
|
819
|
+
"rate-limit": "rate-limit";
|
|
820
|
+
"stream-disconnected": "stream-disconnected";
|
|
821
|
+
"structured-output-retries": "structured-output-retries";
|
|
822
|
+
"thread-rollback-failed": "thread-rollback-failed";
|
|
823
|
+
"too-many-failed-attempts": "too-many-failed-attempts";
|
|
824
|
+
billing: "billing";
|
|
825
|
+
internal: "internal";
|
|
826
|
+
overloaded: "overloaded";
|
|
827
|
+
policy: "policy";
|
|
828
|
+
sandbox: "sandbox";
|
|
829
|
+
unauthorized: "unauthorized";
|
|
830
|
+
unknown: "unknown";
|
|
831
|
+
}>;
|
|
832
|
+
type ProviderErrorCategory = z.infer<typeof providerErrorCategorySchema>;
|
|
833
|
+
declare const providerErrorInfoSchema: z.ZodObject<{
|
|
834
|
+
category: z.ZodEnum<{
|
|
835
|
+
"active-turn-not-steerable": "active-turn-not-steerable";
|
|
836
|
+
"bad-request": "bad-request";
|
|
837
|
+
"budget-exceeded": "budget-exceeded";
|
|
838
|
+
"connection-failed": "connection-failed";
|
|
839
|
+
"context-window-exceeded": "context-window-exceeded";
|
|
840
|
+
"max-output-tokens": "max-output-tokens";
|
|
841
|
+
"max-turns": "max-turns";
|
|
842
|
+
"rate-limit": "rate-limit";
|
|
843
|
+
"stream-disconnected": "stream-disconnected";
|
|
844
|
+
"structured-output-retries": "structured-output-retries";
|
|
845
|
+
"thread-rollback-failed": "thread-rollback-failed";
|
|
846
|
+
"too-many-failed-attempts": "too-many-failed-attempts";
|
|
847
|
+
billing: "billing";
|
|
848
|
+
internal: "internal";
|
|
849
|
+
overloaded: "overloaded";
|
|
850
|
+
policy: "policy";
|
|
851
|
+
sandbox: "sandbox";
|
|
852
|
+
unauthorized: "unauthorized";
|
|
853
|
+
unknown: "unknown";
|
|
854
|
+
}>;
|
|
855
|
+
httpStatusCode: z.ZodNullable<z.ZodNumber>;
|
|
856
|
+
providerCode: z.ZodNullable<z.ZodString>;
|
|
857
|
+
}, z.core.$strip>;
|
|
858
|
+
type ProviderErrorInfo = z.infer<typeof providerErrorInfoSchema>;
|
|
859
|
+
declare const providerRateLimitStatusSchema: z.ZodEnum<{
|
|
860
|
+
allowed: "allowed";
|
|
861
|
+
blocked: "blocked";
|
|
862
|
+
unknown: "unknown";
|
|
863
|
+
warning: "warning";
|
|
864
|
+
}>;
|
|
865
|
+
type ProviderRateLimitStatus = z.infer<typeof providerRateLimitStatusSchema>;
|
|
866
|
+
declare const providerRateLimitWindowSchema: z.ZodObject<{
|
|
867
|
+
label: z.ZodNullable<z.ZodString>;
|
|
868
|
+
providerKey: z.ZodNullable<z.ZodString>;
|
|
869
|
+
resetsAtMs: z.ZodNullable<z.ZodNumber>;
|
|
870
|
+
status: z.ZodEnum<{
|
|
871
|
+
allowed: "allowed";
|
|
872
|
+
blocked: "blocked";
|
|
873
|
+
unknown: "unknown";
|
|
874
|
+
warning: "warning";
|
|
875
|
+
}>;
|
|
876
|
+
}, z.core.$strip>;
|
|
877
|
+
type ProviderRateLimitWindow = z.infer<typeof providerRateLimitWindowSchema>;
|
|
878
|
+
declare const providerRateLimitStateSchema: z.ZodObject<{
|
|
879
|
+
kind: z.ZodEnum<{
|
|
880
|
+
"spend-control": "spend-control";
|
|
881
|
+
"subscription-window": "subscription-window";
|
|
882
|
+
credits: "credits";
|
|
883
|
+
unknown: "unknown";
|
|
884
|
+
}>;
|
|
885
|
+
overageReason: z.ZodNullable<z.ZodString>;
|
|
886
|
+
overageStatus: z.ZodNullable<z.ZodEnum<{
|
|
887
|
+
allowed: "allowed";
|
|
888
|
+
rejected: "rejected";
|
|
889
|
+
unavailable: "unavailable";
|
|
890
|
+
warning: "warning";
|
|
891
|
+
}>>;
|
|
892
|
+
providerId: z.ZodString;
|
|
893
|
+
reachedReason: z.ZodNullable<z.ZodString>;
|
|
894
|
+
status: z.ZodEnum<{
|
|
895
|
+
allowed: "allowed";
|
|
896
|
+
blocked: "blocked";
|
|
897
|
+
unknown: "unknown";
|
|
898
|
+
warning: "warning";
|
|
899
|
+
}>;
|
|
900
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
901
|
+
label: z.ZodNullable<z.ZodString>;
|
|
902
|
+
providerKey: z.ZodNullable<z.ZodString>;
|
|
903
|
+
resetsAtMs: z.ZodNullable<z.ZodNumber>;
|
|
904
|
+
status: z.ZodEnum<{
|
|
905
|
+
allowed: "allowed";
|
|
906
|
+
blocked: "blocked";
|
|
907
|
+
unknown: "unknown";
|
|
908
|
+
warning: "warning";
|
|
909
|
+
}>;
|
|
910
|
+
}, z.core.$strip>>;
|
|
911
|
+
}, z.core.$strip>;
|
|
912
|
+
type ProviderRateLimitState = z.infer<typeof providerRateLimitStateSchema>;
|
|
913
|
+
declare const threadEventPlanStepSchema: z.ZodObject<{
|
|
914
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
915
|
+
active: "active";
|
|
916
|
+
completed: "completed";
|
|
917
|
+
failed: "failed";
|
|
918
|
+
pending: "pending";
|
|
919
|
+
}>>;
|
|
920
|
+
step: z.ZodString;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
type ThreadEventPlanStep = z.infer<typeof threadEventPlanStepSchema>;
|
|
923
|
+
/**
|
|
924
|
+
* How a `search` item looked for things: `content` searches inside files
|
|
925
|
+
* (grep, Claude `Grep`), `path` matches file names (Claude `Glob`, `fd`),
|
|
926
|
+
* `list` enumerates a directory (`ls`, codex `list_dir`).
|
|
927
|
+
*/
|
|
928
|
+
declare const threadEventSearchModeSchema: z.ZodEnum<{
|
|
929
|
+
content: "content";
|
|
930
|
+
list: "list";
|
|
931
|
+
path: "path";
|
|
932
|
+
}>;
|
|
933
|
+
type ThreadEventSearchMode = z.infer<typeof threadEventSearchModeSchema>;
|
|
934
|
+
declare const threadEventUserContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
935
|
+
text: z.ZodString;
|
|
936
|
+
type: z.ZodLiteral<"text">;
|
|
937
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
938
|
+
type: z.ZodLiteral<"image">;
|
|
939
|
+
url: z.ZodString;
|
|
940
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
941
|
+
path: z.ZodString;
|
|
942
|
+
type: z.ZodLiteral<"localImage">;
|
|
943
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
944
|
+
path: z.ZodString;
|
|
945
|
+
type: z.ZodLiteral<"localFile">;
|
|
946
|
+
}, z.core.$strip>], "type">;
|
|
947
|
+
type ThreadEventUserContent = z.infer<typeof threadEventUserContentSchema>;
|
|
948
|
+
declare const threadEventTokenUsageBreakdownSchema: z.ZodObject<{
|
|
949
|
+
cachedInputTokens: z.ZodNumber;
|
|
950
|
+
inputTokens: z.ZodNumber;
|
|
951
|
+
outputTokens: z.ZodNumber;
|
|
952
|
+
reasoningOutputTokens: z.ZodNumber;
|
|
953
|
+
totalTokens: z.ZodNumber;
|
|
954
|
+
}, z.core.$strip>;
|
|
955
|
+
type ThreadEventTokenUsageBreakdown = z.infer<typeof threadEventTokenUsageBreakdownSchema>;
|
|
956
|
+
declare const threadEventContextWindowUsageSchema: z.ZodObject<{
|
|
957
|
+
estimated: z.ZodBoolean;
|
|
958
|
+
modelContextWindow: z.ZodNullable<z.ZodNumber>;
|
|
959
|
+
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
960
|
+
}, z.core.$strip>;
|
|
961
|
+
type ThreadEventContextWindowUsage = z.infer<typeof threadEventContextWindowUsageSchema>;
|
|
962
|
+
declare const providerRawEventSchema: z.ZodObject<{
|
|
963
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
964
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
965
|
+
method: z.ZodString;
|
|
966
|
+
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
967
|
+
}, z.core.$strip>;
|
|
968
|
+
type ProviderRawEvent = z.infer<typeof providerRawEventSchema>;
|
|
969
|
+
|
|
688
970
|
/**
|
|
689
971
|
* Order is load-bearing: `reasoningRank` (index) drives model-switch
|
|
690
972
|
* reconciliation. "none" (no extended thinking) sits at the bottom — only
|
|
@@ -867,166 +1149,11 @@ type RuntimePermissionPolicy = z.infer<typeof runtimePermissionPolicySchema>;
|
|
|
867
1149
|
declare const clientTurnRequestIdSchema: z.ZodString;
|
|
868
1150
|
type ClientTurnRequestId = z.infer<typeof clientTurnRequestIdSchema>;
|
|
869
1151
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}>;
|
|
876
|
-
type ThreadEventItemStatus = z.infer<typeof threadEventItemStatusSchema>;
|
|
877
|
-
declare const threadEventTurnStatusSchema: z.ZodEnum<{
|
|
878
|
-
completed: "completed";
|
|
879
|
-
failed: "failed";
|
|
880
|
-
interrupted: "interrupted";
|
|
881
|
-
}>;
|
|
882
|
-
type ThreadEventTurnStatus = z.infer<typeof threadEventTurnStatusSchema>;
|
|
883
|
-
declare const providerErrorCategorySchema: z.ZodEnum<{
|
|
884
|
-
"active-turn-not-steerable": "active-turn-not-steerable";
|
|
885
|
-
"bad-request": "bad-request";
|
|
886
|
-
"budget-exceeded": "budget-exceeded";
|
|
887
|
-
"connection-failed": "connection-failed";
|
|
888
|
-
"context-window-exceeded": "context-window-exceeded";
|
|
889
|
-
"max-output-tokens": "max-output-tokens";
|
|
890
|
-
"max-turns": "max-turns";
|
|
891
|
-
"rate-limit": "rate-limit";
|
|
892
|
-
"stream-disconnected": "stream-disconnected";
|
|
893
|
-
"structured-output-retries": "structured-output-retries";
|
|
894
|
-
"thread-rollback-failed": "thread-rollback-failed";
|
|
895
|
-
"too-many-failed-attempts": "too-many-failed-attempts";
|
|
896
|
-
billing: "billing";
|
|
897
|
-
internal: "internal";
|
|
898
|
-
overloaded: "overloaded";
|
|
899
|
-
policy: "policy";
|
|
900
|
-
sandbox: "sandbox";
|
|
901
|
-
unauthorized: "unauthorized";
|
|
902
|
-
unknown: "unknown";
|
|
903
|
-
}>;
|
|
904
|
-
type ProviderErrorCategory = z.infer<typeof providerErrorCategorySchema>;
|
|
905
|
-
declare const providerErrorInfoSchema: z.ZodObject<{
|
|
906
|
-
category: z.ZodEnum<{
|
|
907
|
-
"active-turn-not-steerable": "active-turn-not-steerable";
|
|
908
|
-
"bad-request": "bad-request";
|
|
909
|
-
"budget-exceeded": "budget-exceeded";
|
|
910
|
-
"connection-failed": "connection-failed";
|
|
911
|
-
"context-window-exceeded": "context-window-exceeded";
|
|
912
|
-
"max-output-tokens": "max-output-tokens";
|
|
913
|
-
"max-turns": "max-turns";
|
|
914
|
-
"rate-limit": "rate-limit";
|
|
915
|
-
"stream-disconnected": "stream-disconnected";
|
|
916
|
-
"structured-output-retries": "structured-output-retries";
|
|
917
|
-
"thread-rollback-failed": "thread-rollback-failed";
|
|
918
|
-
"too-many-failed-attempts": "too-many-failed-attempts";
|
|
919
|
-
billing: "billing";
|
|
920
|
-
internal: "internal";
|
|
921
|
-
overloaded: "overloaded";
|
|
922
|
-
policy: "policy";
|
|
923
|
-
sandbox: "sandbox";
|
|
924
|
-
unauthorized: "unauthorized";
|
|
925
|
-
unknown: "unknown";
|
|
926
|
-
}>;
|
|
927
|
-
httpStatusCode: z.ZodNullable<z.ZodNumber>;
|
|
928
|
-
providerCode: z.ZodNullable<z.ZodString>;
|
|
929
|
-
}, z.core.$strip>;
|
|
930
|
-
type ProviderErrorInfo = z.infer<typeof providerErrorInfoSchema>;
|
|
931
|
-
declare const providerRateLimitStatusSchema: z.ZodEnum<{
|
|
932
|
-
allowed: "allowed";
|
|
933
|
-
blocked: "blocked";
|
|
934
|
-
unknown: "unknown";
|
|
935
|
-
warning: "warning";
|
|
936
|
-
}>;
|
|
937
|
-
type ProviderRateLimitStatus = z.infer<typeof providerRateLimitStatusSchema>;
|
|
938
|
-
declare const providerRateLimitWindowSchema: z.ZodObject<{
|
|
939
|
-
label: z.ZodNullable<z.ZodString>;
|
|
940
|
-
providerKey: z.ZodNullable<z.ZodString>;
|
|
941
|
-
resetsAtMs: z.ZodNullable<z.ZodNumber>;
|
|
942
|
-
status: z.ZodEnum<{
|
|
943
|
-
allowed: "allowed";
|
|
944
|
-
blocked: "blocked";
|
|
945
|
-
unknown: "unknown";
|
|
946
|
-
warning: "warning";
|
|
947
|
-
}>;
|
|
948
|
-
}, z.core.$strip>;
|
|
949
|
-
type ProviderRateLimitWindow = z.infer<typeof providerRateLimitWindowSchema>;
|
|
950
|
-
declare const providerRateLimitStateSchema: z.ZodObject<{
|
|
951
|
-
kind: z.ZodEnum<{
|
|
952
|
-
"spend-control": "spend-control";
|
|
953
|
-
"subscription-window": "subscription-window";
|
|
954
|
-
credits: "credits";
|
|
955
|
-
unknown: "unknown";
|
|
956
|
-
}>;
|
|
957
|
-
overageReason: z.ZodNullable<z.ZodString>;
|
|
958
|
-
overageStatus: z.ZodNullable<z.ZodEnum<{
|
|
959
|
-
allowed: "allowed";
|
|
960
|
-
rejected: "rejected";
|
|
961
|
-
unavailable: "unavailable";
|
|
962
|
-
warning: "warning";
|
|
963
|
-
}>>;
|
|
964
|
-
providerId: z.ZodString;
|
|
965
|
-
reachedReason: z.ZodNullable<z.ZodString>;
|
|
966
|
-
status: z.ZodEnum<{
|
|
967
|
-
allowed: "allowed";
|
|
968
|
-
blocked: "blocked";
|
|
969
|
-
unknown: "unknown";
|
|
970
|
-
warning: "warning";
|
|
971
|
-
}>;
|
|
972
|
-
windows: z.ZodArray<z.ZodObject<{
|
|
973
|
-
label: z.ZodNullable<z.ZodString>;
|
|
974
|
-
providerKey: z.ZodNullable<z.ZodString>;
|
|
975
|
-
resetsAtMs: z.ZodNullable<z.ZodNumber>;
|
|
976
|
-
status: z.ZodEnum<{
|
|
977
|
-
allowed: "allowed";
|
|
978
|
-
blocked: "blocked";
|
|
979
|
-
unknown: "unknown";
|
|
980
|
-
warning: "warning";
|
|
981
|
-
}>;
|
|
982
|
-
}, z.core.$strip>>;
|
|
983
|
-
}, z.core.$strip>;
|
|
984
|
-
type ProviderRateLimitState = z.infer<typeof providerRateLimitStateSchema>;
|
|
985
|
-
declare const threadEventPlanStepSchema: z.ZodObject<{
|
|
986
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
987
|
-
active: "active";
|
|
988
|
-
completed: "completed";
|
|
989
|
-
failed: "failed";
|
|
990
|
-
pending: "pending";
|
|
991
|
-
}>>;
|
|
992
|
-
step: z.ZodString;
|
|
993
|
-
}, z.core.$strip>;
|
|
994
|
-
type ThreadEventPlanStep = z.infer<typeof threadEventPlanStepSchema>;
|
|
995
|
-
declare const threadEventUserContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
996
|
-
text: z.ZodString;
|
|
997
|
-
type: z.ZodLiteral<"text">;
|
|
998
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
999
|
-
type: z.ZodLiteral<"image">;
|
|
1000
|
-
url: z.ZodString;
|
|
1001
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1002
|
-
path: z.ZodString;
|
|
1003
|
-
type: z.ZodLiteral<"localImage">;
|
|
1004
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1005
|
-
path: z.ZodString;
|
|
1006
|
-
type: z.ZodLiteral<"localFile">;
|
|
1007
|
-
}, z.core.$strip>], "type">;
|
|
1008
|
-
type ThreadEventUserContent = z.infer<typeof threadEventUserContentSchema>;
|
|
1009
|
-
declare const threadEventTokenUsageBreakdownSchema: z.ZodObject<{
|
|
1010
|
-
cachedInputTokens: z.ZodNumber;
|
|
1011
|
-
inputTokens: z.ZodNumber;
|
|
1012
|
-
outputTokens: z.ZodNumber;
|
|
1013
|
-
reasoningOutputTokens: z.ZodNumber;
|
|
1014
|
-
totalTokens: z.ZodNumber;
|
|
1015
|
-
}, z.core.$strip>;
|
|
1016
|
-
type ThreadEventTokenUsageBreakdown = z.infer<typeof threadEventTokenUsageBreakdownSchema>;
|
|
1017
|
-
declare const threadEventContextWindowUsageSchema: z.ZodObject<{
|
|
1018
|
-
estimated: z.ZodBoolean;
|
|
1019
|
-
modelContextWindow: z.ZodNullable<z.ZodNumber>;
|
|
1020
|
-
usedTokens: z.ZodNullable<z.ZodNumber>;
|
|
1021
|
-
}, z.core.$strip>;
|
|
1022
|
-
type ThreadEventContextWindowUsage = z.infer<typeof threadEventContextWindowUsageSchema>;
|
|
1023
|
-
declare const providerRawEventSchema: z.ZodObject<{
|
|
1024
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1025
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
1026
|
-
method: z.ZodString;
|
|
1027
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
1028
|
-
}, z.core.$strip>;
|
|
1029
|
-
type ProviderRawEvent = z.infer<typeof providerRawEventSchema>;
|
|
1152
|
+
/** A namespaced extension kind, `"<pluginId>/<name>"`. */
|
|
1153
|
+
type ExtensionKind = `${string}/${string}`;
|
|
1154
|
+
declare function isExtensionKind(value: string): value is ExtensionKind;
|
|
1155
|
+
/** Parses to the {@link ExtensionKind} type, so consumers can split it. */
|
|
1156
|
+
declare const extensionKindSchema: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
1030
1157
|
|
|
1031
1158
|
declare const modelReasoningEffortSchema: z.ZodObject<{
|
|
1032
1159
|
description: z.ZodString;
|
|
@@ -1074,10 +1201,67 @@ declare const availableModelSchema: z.ZodObject<{
|
|
|
1074
1201
|
}, z.core.$strip>>;
|
|
1075
1202
|
}, z.core.$strip>;
|
|
1076
1203
|
type AvailableModel = z.infer<typeof availableModelSchema>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Typed recovery hints a provider bridge raises instead of error text the
|
|
1206
|
+
* runtime would otherwise have to pattern-match (`provider/recovery`, see
|
|
1207
|
+
* `providerRecoveryNotificationSchema` in @bb/provider-bridge-protocol).
|
|
1208
|
+
*
|
|
1209
|
+
* - `sessionArchived`: the provider refused because its session is archived;
|
|
1210
|
+
* the runtime unarchives and retries.
|
|
1211
|
+
* - `authRequired`: credentials are missing or expired; typed error plus a
|
|
1212
|
+
* health refresh.
|
|
1213
|
+
* - `restartRecommended`: the bridge wants a fresh process; the runtime
|
|
1214
|
+
* restarts it and resumes the session.
|
|
1215
|
+
* - `staleTurn`: the steer or stop named a turn that is no longer live; the
|
|
1216
|
+
* runtime drops it.
|
|
1217
|
+
* - `rateLimited`: the provider throttled the request; the runtime schedules
|
|
1218
|
+
* a retry.
|
|
1219
|
+
*
|
|
1220
|
+
* No consumer yet: WS4 (runtime cleanup) acts on these.
|
|
1221
|
+
*/
|
|
1222
|
+
declare const providerRecoveryKindValues: readonly ["sessionArchived", "authRequired", "restartRecommended", "staleTurn", "rateLimited"];
|
|
1223
|
+
declare const providerRecoveryKindSchema: z.ZodEnum<{
|
|
1224
|
+
authRequired: "authRequired";
|
|
1225
|
+
rateLimited: "rateLimited";
|
|
1226
|
+
restartRecommended: "restartRecommended";
|
|
1227
|
+
sessionArchived: "sessionArchived";
|
|
1228
|
+
staleTurn: "staleTurn";
|
|
1229
|
+
}>;
|
|
1230
|
+
type ProviderRecoveryKind = z.infer<typeof providerRecoveryKindSchema>;
|
|
1231
|
+
/**
|
|
1232
|
+
* A bb-injected tool handed to a provider bridge at session construction.
|
|
1233
|
+
*
|
|
1234
|
+
* `presentation` is how a call to this tool reads as a timeline row (grammar
|
|
1235
|
+
* v3, docs/provider-plugin-api.md §3): the bridge stamps it on the
|
|
1236
|
+
* `item.open`/`item.close` for the call beside `server: "bb"`, so no core
|
|
1237
|
+
* table of bb tool names is needed to label the row. The server resolves it
|
|
1238
|
+
* once, at its boundary, for every tool it injects — from the owning
|
|
1239
|
+
* plugin's declaration, falling back to a generic label and the plugin's
|
|
1240
|
+
* glyph. Optional on the wire while the grammar migrates (A1, additive then
|
|
1241
|
+
* delete): a definition recorded before the field existed carries none, and
|
|
1242
|
+
* a bridge then presents the call generically; the stabilization pass makes
|
|
1243
|
+
* it required.
|
|
1244
|
+
*/
|
|
1077
1245
|
declare const dynamicToolSchema: z.ZodObject<{
|
|
1078
1246
|
description: z.ZodString;
|
|
1079
1247
|
inputSchema: z.ZodUnknown;
|
|
1080
1248
|
name: z.ZodString;
|
|
1249
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
1250
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
icon: z.ZodObject<{
|
|
1252
|
+
glyph: z.ZodString;
|
|
1253
|
+
}, z.core.$strip>;
|
|
1254
|
+
label: z.ZodObject<{
|
|
1255
|
+
completed: z.ZodString;
|
|
1256
|
+
pending: z.ZodString;
|
|
1257
|
+
}, z.core.$strip>;
|
|
1258
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
1259
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
1260
|
+
dark: z.ZodString;
|
|
1261
|
+
light: z.ZodString;
|
|
1262
|
+
}, z.core.$strip>>;
|
|
1263
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1264
|
+
}, z.core.$strip>>;
|
|
1081
1265
|
}, z.core.$strip>;
|
|
1082
1266
|
type DynamicTool = z.infer<typeof dynamicToolSchema>;
|
|
1083
1267
|
|
|
@@ -1115,6 +1299,16 @@ declare function normalizeProviderCommandOutput(args: {
|
|
|
1115
1299
|
* Handles strings, arrays of text blocks, and `{ content: [...] }` wrappers.
|
|
1116
1300
|
*/
|
|
1117
1301
|
declare function extractResultText(content: unknown): string;
|
|
1302
|
+
/** The empty breakdown a bridge's per-session usage accumulator starts from. */
|
|
1303
|
+
declare const ZERO_TOKEN_USAGE: ThreadEventTokenUsageBreakdown;
|
|
1304
|
+
/**
|
|
1305
|
+
* Sum a turn's usage into a running total, field by field. The `usage` delta
|
|
1306
|
+
* carries both the turn's usage and the session total; a provider that only
|
|
1307
|
+
* reports per-turn usage keeps the total itself with this, starting from
|
|
1308
|
+
* {@link ZERO_TOKEN_USAGE} at every session construction (the same boundary
|
|
1309
|
+
* as the `session.reset` delta).
|
|
1310
|
+
*/
|
|
1311
|
+
declare function addTokenUsage(total: ThreadEventTokenUsageBreakdown, last: ThreadEventTokenUsageBreakdown): ThreadEventTokenUsageBreakdown;
|
|
1118
1312
|
|
|
1119
1313
|
type BridgeJsonRpcId = string | number;
|
|
1120
1314
|
type BridgeJsonRpcResponse$1 = {
|
|
@@ -1148,6 +1342,35 @@ declare function runBridgeRequest<TRequest extends {
|
|
|
1148
1342
|
sendError: (id: BridgeJsonRpcId, code: number, message: string) => void;
|
|
1149
1343
|
}): void;
|
|
1150
1344
|
|
|
1345
|
+
interface BridgeRecorderChildStreams {
|
|
1346
|
+
stdin?: Writable | null;
|
|
1347
|
+
stdout?: Readable | null;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Whether this process records. A bridge whose provider pipe is owned by an
|
|
1351
|
+
* SDK (Claude's Agent SDK) checks this to decide whether to take the spawn
|
|
1352
|
+
* over; bridges that spawn their child themselves just call
|
|
1353
|
+
* `experimental_recordProviderChildIo`.
|
|
1354
|
+
*/
|
|
1355
|
+
declare function experimental_isProviderBridgeRecording(): boolean;
|
|
1356
|
+
/**
|
|
1357
|
+
* Tee the provider child a bridge just spawned into the recording, scoped to
|
|
1358
|
+
* the bb thread it serves (null for process-level children such as a
|
|
1359
|
+
* model-list probe). A no-op unless record mode is on, so bridges call it
|
|
1360
|
+
* unconditionally right after `spawn()`.
|
|
1361
|
+
*/
|
|
1362
|
+
declare function experimental_recordProviderChildIo(child: BridgeRecorderChildStreams, scope: {
|
|
1363
|
+
threadId: string | null;
|
|
1364
|
+
}): void;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* The environment a bridge hands its provider child when it wants the child
|
|
1368
|
+
* to see the bridge's own environment (ACP agents and the Claude CLI need
|
|
1369
|
+
* `BB_CLI` and friends so `bb` works inside their shells). Two variables are
|
|
1370
|
+
* bridge-process facts that must never leak downward: the Electron node flag,
|
|
1371
|
+
* and the record-mode directory — a recorded provider child that happened to
|
|
1372
|
+
* be a bb bridge itself would otherwise start recording too.
|
|
1373
|
+
*/
|
|
1151
1374
|
declare function withoutBridgeRuntimeEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
1152
1375
|
|
|
1153
1376
|
/**
|
|
@@ -1195,10 +1418,39 @@ declare const jsonRpcErrorResponseSchema: z.ZodObject<{
|
|
|
1195
1418
|
}, z.core.$strip>;
|
|
1196
1419
|
type BridgeJsonRpcResponse = z.infer<typeof jsonRpcSuccessResponseSchema> | z.infer<typeof jsonRpcErrorResponseSchema>;
|
|
1197
1420
|
declare function decodeBridgeJsonRpcResponse(input: unknown): BridgeJsonRpcResponse | null;
|
|
1421
|
+
/** An image on a tool call result, split out of an `inputImage` data URL. */
|
|
1422
|
+
interface BridgeToolCallImage {
|
|
1423
|
+
data: string;
|
|
1424
|
+
mimeType: string;
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* A tool result block in the one shape every consumer already accepts: MCP's
|
|
1428
|
+
* `CallToolResult.content` (claude-code and acp) and pi's `AgentToolResult.content`
|
|
1429
|
+
* declare the same two members with the same field names.
|
|
1430
|
+
*/
|
|
1431
|
+
type BridgeToolCallContent = {
|
|
1432
|
+
type: "text";
|
|
1433
|
+
text: string;
|
|
1434
|
+
} | {
|
|
1435
|
+
type: "image";
|
|
1436
|
+
data: string;
|
|
1437
|
+
mimeType: string;
|
|
1438
|
+
};
|
|
1198
1439
|
declare function decodeToolCallResponsePayload(result: unknown): {
|
|
1199
1440
|
content: string;
|
|
1441
|
+
contentBlocks: BridgeToolCallContent[];
|
|
1442
|
+
images: BridgeToolCallImage[];
|
|
1200
1443
|
isError: boolean;
|
|
1201
1444
|
};
|
|
1445
|
+
/**
|
|
1446
|
+
* Renders a decoded payload as tool result blocks, dropping empty text so an
|
|
1447
|
+
* image-only result carries the image alone.
|
|
1448
|
+
*/
|
|
1449
|
+
declare function buildBridgeToolCallContent(result: {
|
|
1450
|
+
content: string;
|
|
1451
|
+
contentBlocks?: BridgeToolCallContent[];
|
|
1452
|
+
images?: BridgeToolCallImage[];
|
|
1453
|
+
}): BridgeToolCallContent[];
|
|
1202
1454
|
|
|
1203
1455
|
/**
|
|
1204
1456
|
* Structural contracts shared by the runtime's generic adapter and the bridge
|
|
@@ -1296,6 +1548,10 @@ declare function mimeTypeFromExtension(filePath: string): string;
|
|
|
1296
1548
|
|
|
1297
1549
|
interface BridgeToolCallResult {
|
|
1298
1550
|
content: string;
|
|
1551
|
+
/** Ordered provider result blocks; absent on local transport failures. */
|
|
1552
|
+
contentBlocks?: BridgeToolCallContent[];
|
|
1553
|
+
/** Absent on the failure paths below, which have no image to report. */
|
|
1554
|
+
images?: BridgeToolCallImage[];
|
|
1299
1555
|
isError?: boolean;
|
|
1300
1556
|
}
|
|
1301
1557
|
interface ForwardBridgeToolCallArgs {
|
|
@@ -1477,13 +1733,85 @@ declare const textBlockSchema: z.ZodObject<{
|
|
|
1477
1733
|
* `thread/event`.
|
|
1478
1734
|
*/
|
|
1479
1735
|
declare const PROVIDER_BRIDGE_PROTOCOL_VERSION: 2;
|
|
1736
|
+
/**
|
|
1737
|
+
* The `thread/delta` grammar versions. The grammar is versioned separately
|
|
1738
|
+
* from the JSON-RPC envelope (see `grammarVersions` in handshake.ts): v2 was
|
|
1739
|
+
* the narrow grammar that shipped with protocol version 2; v3 adds the core
|
|
1740
|
+
* item kinds `fileRead`, `search`, `delegation` and `planSteps`, declarative
|
|
1741
|
+
* `presentation` on `item.open`/`item.close`, plugin extension kinds
|
|
1742
|
+
* (`extension` items, `extension.state`), and replaces v2's two streaming
|
|
1743
|
+
* dialects and two usage dialects with one of each (`item.textDelta`/
|
|
1744
|
+
* `item.textClose`, `usage` + `contextWindow`). A bridge reports the range
|
|
1745
|
+
* it speaks; the runtime reports the range its assembler accepts; both emit
|
|
1746
|
+
* the highest common version. The runtime's assembler speaks v3 only; a
|
|
1747
|
+
* bridge that predates `grammarVersions` reads as `[2, 2]` and is refused at
|
|
1748
|
+
* the handshake.
|
|
1749
|
+
*/
|
|
1750
|
+
declare const THREAD_DELTA_GRAMMAR_V2: 2;
|
|
1751
|
+
declare const THREAD_DELTA_GRAMMAR_V3: 3;
|
|
1480
1752
|
|
|
1753
|
+
/**
|
|
1754
|
+
* The inclusive `[min, max]` range of `thread/delta` grammar versions a bridge
|
|
1755
|
+
* speaks. Distinct from the JSON-RPC `protocolVersion`: the envelope can stay
|
|
1756
|
+
* put while the delta vocabulary grows, and a bridge that speaks both v2 and
|
|
1757
|
+
* v3 says so here instead of forcing a daemon bump.
|
|
1758
|
+
*/
|
|
1759
|
+
declare const bridgeGrammarVersionsSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
1760
|
+
type BridgeGrammarVersions = z.infer<typeof bridgeGrammarVersionsSchema>;
|
|
1761
|
+
/**
|
|
1762
|
+
* How the bridge delivers `turn/steer` while a turn is live. `inject` feeds
|
|
1763
|
+
* the steer text into the running model loop (claude, codex); `queue` holds
|
|
1764
|
+
* it for the next prompt boundary (ACP v1 cancels the live prompt and
|
|
1765
|
+
* re-prompts with the queued text). The runtime sends `turn/steer` either
|
|
1766
|
+
* way; the mode is what the composer tells the user and what WS4's recovery
|
|
1767
|
+
* logic keys `staleTurn` on.
|
|
1768
|
+
*/
|
|
1769
|
+
declare const bridgeSteerModeSchema: z.ZodEnum<{
|
|
1770
|
+
inject: "inject";
|
|
1771
|
+
queue: "queue";
|
|
1772
|
+
}>;
|
|
1773
|
+
type BridgeSteerMode = z.infer<typeof bridgeSteerModeSchema>;
|
|
1774
|
+
/**
|
|
1775
|
+
* Session-behavior facts the bridge reports at `initialize`. These are
|
|
1776
|
+
* deliberately NOT provider declarations: the code that implements a feature
|
|
1777
|
+
* is the code that reports it, so a handshake fact cannot drift from behavior
|
|
1778
|
+
* the way a declared boolean can.
|
|
1779
|
+
*
|
|
1780
|
+
* Every field defaults on parse so an older bridge that omits a capability is
|
|
1781
|
+
* read as not having it — absence is a definite "no", never an error, and the
|
|
1782
|
+
* parsed object always carries explicit values internally.
|
|
1783
|
+
*
|
|
1784
|
+
* The schema is loose: unknown capability fields from a newer bridge pass
|
|
1785
|
+
* through untouched so a newer plugin works against an older runtime.
|
|
1786
|
+
*/
|
|
1787
|
+
declare const bridgeCapabilitiesSchema: z.ZodObject<{
|
|
1788
|
+
approvalEnforcedBy: z.ZodDefault<z.ZodEnum<{
|
|
1789
|
+
provider: "provider";
|
|
1790
|
+
runtime: "runtime";
|
|
1791
|
+
}>>;
|
|
1792
|
+
fork: z.ZodDefault<z.ZodEnum<{
|
|
1793
|
+
checkpoint: "checkpoint";
|
|
1794
|
+
none: "none";
|
|
1795
|
+
tip: "tip";
|
|
1796
|
+
}>>;
|
|
1797
|
+
grammarVersions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1798
|
+
sessionRestore: z.ZodDefault<z.ZodBoolean>;
|
|
1799
|
+
steerMode: z.ZodDefault<z.ZodEnum<{
|
|
1800
|
+
inject: "inject";
|
|
1801
|
+
queue: "queue";
|
|
1802
|
+
}>>;
|
|
1803
|
+
threadArchive: z.ZodDefault<z.ZodBoolean>;
|
|
1804
|
+
threadGoalClear: z.ZodDefault<z.ZodBoolean>;
|
|
1805
|
+
threadRename: z.ZodDefault<z.ZodBoolean>;
|
|
1806
|
+
}, z.core.$loose>;
|
|
1807
|
+
type BridgeCapabilities = z.infer<typeof bridgeCapabilitiesSchema>;
|
|
1481
1808
|
/** Runtime → bridge `initialize` params. */
|
|
1482
1809
|
declare const initializeParamsSchema: z.ZodObject<{
|
|
1483
1810
|
client: z.ZodObject<{
|
|
1484
1811
|
name: z.ZodString;
|
|
1485
1812
|
version: z.ZodString;
|
|
1486
1813
|
}, z.core.$strip>;
|
|
1814
|
+
grammarVersions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1487
1815
|
protocolVersion: z.ZodNumber;
|
|
1488
1816
|
}, z.core.$loose>;
|
|
1489
1817
|
/** Bridge → runtime `initialize` result. */
|
|
@@ -1498,7 +1826,12 @@ declare const initializeResultSchema: z.ZodObject<{
|
|
|
1498
1826
|
none: "none";
|
|
1499
1827
|
tip: "tip";
|
|
1500
1828
|
}>>;
|
|
1829
|
+
grammarVersions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1501
1830
|
sessionRestore: z.ZodDefault<z.ZodBoolean>;
|
|
1831
|
+
steerMode: z.ZodDefault<z.ZodEnum<{
|
|
1832
|
+
inject: "inject";
|
|
1833
|
+
queue: "queue";
|
|
1834
|
+
}>>;
|
|
1502
1835
|
threadArchive: z.ZodDefault<z.ZodBoolean>;
|
|
1503
1836
|
threadGoalClear: z.ZodDefault<z.ZodBoolean>;
|
|
1504
1837
|
threadRename: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1525,6 +1858,7 @@ declare const bridgeExecutionOptionsSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1525
1858
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1526
1859
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1527
1860
|
model: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1528
1862
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1529
1863
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1530
1864
|
high: "high";
|
|
@@ -1564,6 +1898,261 @@ declare const bridgeExecutionOptionsSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1564
1898
|
}, z.core.$strip>], "permissionMode">>;
|
|
1565
1899
|
type BridgeExecutionOptions = z.infer<typeof bridgeExecutionOptionsSchema>;
|
|
1566
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* Sessionless provider maintenance query. `providerOptions` carries the same
|
|
1903
|
+
* provider-scoped statics as model/list (notably an ACP launch spec), while
|
|
1904
|
+
* `providerId` lets one bridge implementation serve several provider ids.
|
|
1905
|
+
*/
|
|
1906
|
+
declare const experimental_providerMaintenanceParamsSchema: z.ZodObject<{
|
|
1907
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1908
|
+
providerId: z.ZodString;
|
|
1909
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1910
|
+
}, z.core.$loose>;
|
|
1911
|
+
type ExperimentalProviderMaintenanceParams = z.infer<typeof experimental_providerMaintenanceParamsSchema>;
|
|
1912
|
+
declare const experimental_providerInstallationRequirementSchema: z.ZodEnum<{
|
|
1913
|
+
thread_rewind: "thread_rewind";
|
|
1914
|
+
}>;
|
|
1915
|
+
type ExperimentalProviderInstallationRequirement = z.infer<typeof experimental_providerInstallationRequirementSchema>;
|
|
1916
|
+
declare const experimental_providerInstallationStatusParamsSchema: z.ZodObject<{
|
|
1917
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1918
|
+
providerId: z.ZodString;
|
|
1919
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1920
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
1921
|
+
thread_rewind: "thread_rewind";
|
|
1922
|
+
}>>;
|
|
1923
|
+
}, z.core.$loose>;
|
|
1924
|
+
type ExperimentalProviderInstallationStatusParams = z.infer<typeof experimental_providerInstallationStatusParamsSchema>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Cheap, host-local readiness reported by a provider implementation. Network
|
|
1927
|
+
* usage and update checks deliberately live outside this result so choosing a
|
|
1928
|
+
* provider for the composer never waits on them.
|
|
1929
|
+
*/
|
|
1930
|
+
declare const experimental_providerHealthSchema: z.ZodObject<{
|
|
1931
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1932
|
+
canInstall: z.ZodBoolean;
|
|
1933
|
+
canUpdate: z.ZodBoolean;
|
|
1934
|
+
installedVersion: z.ZodNullable<z.ZodString>;
|
|
1935
|
+
loginCommand: z.ZodNullable<z.ZodString>;
|
|
1936
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
1937
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1938
|
+
status: z.ZodEnum<{
|
|
1939
|
+
expired: "expired";
|
|
1940
|
+
not_installed: "not_installed";
|
|
1941
|
+
ready: "ready";
|
|
1942
|
+
unauthenticated: "unauthenticated";
|
|
1943
|
+
unknown: "unknown";
|
|
1944
|
+
unsupported_version: "unsupported_version";
|
|
1945
|
+
}>;
|
|
1946
|
+
statusMessage: z.ZodNullable<z.ZodString>;
|
|
1947
|
+
}, z.core.$loose>;
|
|
1948
|
+
type ExperimentalProviderHealth = z.infer<typeof experimental_providerHealthSchema>;
|
|
1949
|
+
/** One usage window reported by a provider subscription. */
|
|
1950
|
+
declare const experimental_providerUsageWindowSchema: z.ZodObject<{
|
|
1951
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
1952
|
+
limitUsdCents: z.ZodNumber;
|
|
1953
|
+
usedUsdCents: z.ZodNumber;
|
|
1954
|
+
}, z.core.$strip>>;
|
|
1955
|
+
label: z.ZodString;
|
|
1956
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
1957
|
+
usedPercent: z.ZodNumber;
|
|
1958
|
+
}, z.core.$loose>;
|
|
1959
|
+
type ExperimentalProviderUsageWindow = z.infer<typeof experimental_providerUsageWindowSchema>;
|
|
1960
|
+
/** Live usage for one provider, normalized by that provider's bridge. */
|
|
1961
|
+
declare const experimental_providerUsageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1962
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1963
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1964
|
+
status: z.ZodLiteral<"ok">;
|
|
1965
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
1966
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
1967
|
+
limitUsdCents: z.ZodNumber;
|
|
1968
|
+
usedUsdCents: z.ZodNumber;
|
|
1969
|
+
}, z.core.$strip>>;
|
|
1970
|
+
label: z.ZodString;
|
|
1971
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
1972
|
+
usedPercent: z.ZodNumber;
|
|
1973
|
+
}, z.core.$loose>>;
|
|
1974
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1975
|
+
status: z.ZodLiteral<"not_installed">;
|
|
1976
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1977
|
+
status: z.ZodLiteral<"unauthenticated">;
|
|
1978
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1979
|
+
status: z.ZodLiteral<"expired">;
|
|
1980
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1981
|
+
accountEmail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1982
|
+
message: z.ZodString;
|
|
1983
|
+
planLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1984
|
+
status: z.ZodLiteral<"error">;
|
|
1985
|
+
}, z.core.$loose>], "status">;
|
|
1986
|
+
type ExperimentalProviderUsage = z.infer<typeof experimental_providerUsageSchema>;
|
|
1987
|
+
declare const experimental_providerHealthResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1988
|
+
supported: z.ZodLiteral<false>;
|
|
1989
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1990
|
+
health: z.ZodObject<{
|
|
1991
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1992
|
+
canInstall: z.ZodBoolean;
|
|
1993
|
+
canUpdate: z.ZodBoolean;
|
|
1994
|
+
installedVersion: z.ZodNullable<z.ZodString>;
|
|
1995
|
+
loginCommand: z.ZodNullable<z.ZodString>;
|
|
1996
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
1997
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1998
|
+
status: z.ZodEnum<{
|
|
1999
|
+
expired: "expired";
|
|
2000
|
+
not_installed: "not_installed";
|
|
2001
|
+
ready: "ready";
|
|
2002
|
+
unauthenticated: "unauthenticated";
|
|
2003
|
+
unknown: "unknown";
|
|
2004
|
+
unsupported_version: "unsupported_version";
|
|
2005
|
+
}>;
|
|
2006
|
+
statusMessage: z.ZodNullable<z.ZodString>;
|
|
2007
|
+
}, z.core.$loose>;
|
|
2008
|
+
supported: z.ZodLiteral<true>;
|
|
2009
|
+
}, z.core.$loose>], "supported">;
|
|
2010
|
+
type ExperimentalProviderHealthResult = z.infer<typeof experimental_providerHealthResultSchema>;
|
|
2011
|
+
declare const experimental_providerUsageResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2012
|
+
supported: z.ZodLiteral<false>;
|
|
2013
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2014
|
+
supported: z.ZodLiteral<true>;
|
|
2015
|
+
usage: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2016
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
2017
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
2018
|
+
status: z.ZodLiteral<"ok">;
|
|
2019
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
2020
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
2021
|
+
limitUsdCents: z.ZodNumber;
|
|
2022
|
+
usedUsdCents: z.ZodNumber;
|
|
2023
|
+
}, z.core.$strip>>;
|
|
2024
|
+
label: z.ZodString;
|
|
2025
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
2026
|
+
usedPercent: z.ZodNumber;
|
|
2027
|
+
}, z.core.$loose>>;
|
|
2028
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2029
|
+
status: z.ZodLiteral<"not_installed">;
|
|
2030
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2031
|
+
status: z.ZodLiteral<"unauthenticated">;
|
|
2032
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2033
|
+
status: z.ZodLiteral<"expired">;
|
|
2034
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2035
|
+
accountEmail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2036
|
+
message: z.ZodString;
|
|
2037
|
+
planLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2038
|
+
status: z.ZodLiteral<"error">;
|
|
2039
|
+
}, z.core.$loose>], "status">;
|
|
2040
|
+
}, z.core.$loose>], "supported">;
|
|
2041
|
+
type ExperimentalProviderUsageResult = z.infer<typeof experimental_providerUsageResultSchema>;
|
|
2042
|
+
declare const experimental_providerInstallationActionKindSchema: z.ZodEnum<{
|
|
2043
|
+
install: "install";
|
|
2044
|
+
update: "update";
|
|
2045
|
+
}>;
|
|
2046
|
+
type ExperimentalProviderInstallationActionKind = z.infer<typeof experimental_providerInstallationActionKindSchema>;
|
|
2047
|
+
/**
|
|
2048
|
+
* An installation action that a provider currently knows how to perform.
|
|
2049
|
+
* Only the display command crosses the product boundary; the executable plan
|
|
2050
|
+
* is resolved afresh by `provider/installation/run` on the host.
|
|
2051
|
+
*/
|
|
2052
|
+
declare const experimental_providerInstallationActionSchema: z.ZodObject<{
|
|
2053
|
+
command: z.ZodString;
|
|
2054
|
+
kind: z.ZodEnum<{
|
|
2055
|
+
install: "install";
|
|
2056
|
+
update: "update";
|
|
2057
|
+
}>;
|
|
2058
|
+
label: z.ZodEnum<{
|
|
2059
|
+
Install: "Install";
|
|
2060
|
+
Update: "Update";
|
|
2061
|
+
}>;
|
|
2062
|
+
}, z.core.$loose>;
|
|
2063
|
+
type ExperimentalProviderInstallationAction = z.infer<typeof experimental_providerInstallationActionSchema>;
|
|
2064
|
+
declare const experimental_providerInstallationSourceSchema: z.ZodEnum<{
|
|
2065
|
+
external: "external";
|
|
2066
|
+
notInstalled: "notInstalled";
|
|
2067
|
+
npmGlobal: "npmGlobal";
|
|
2068
|
+
}>;
|
|
2069
|
+
type ExperimentalProviderInstallationSource = z.infer<typeof experimental_providerInstallationSourceSchema>;
|
|
2070
|
+
/** Provider-owned installation and update state for one host. */
|
|
2071
|
+
declare const experimental_providerInstallationStatusSchema: z.ZodObject<{
|
|
2072
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
2073
|
+
executableName: z.ZodString;
|
|
2074
|
+
executablePath: z.ZodNullable<z.ZodString>;
|
|
2075
|
+
installAction: z.ZodNullable<z.ZodObject<{
|
|
2076
|
+
command: z.ZodString;
|
|
2077
|
+
kind: z.ZodEnum<{
|
|
2078
|
+
install: "install";
|
|
2079
|
+
update: "update";
|
|
2080
|
+
}>;
|
|
2081
|
+
label: z.ZodEnum<{
|
|
2082
|
+
Install: "Install";
|
|
2083
|
+
Update: "Update";
|
|
2084
|
+
}>;
|
|
2085
|
+
}, z.core.$loose>>;
|
|
2086
|
+
installSource: z.ZodEnum<{
|
|
2087
|
+
external: "external";
|
|
2088
|
+
notInstalled: "notInstalled";
|
|
2089
|
+
npmGlobal: "npmGlobal";
|
|
2090
|
+
}>;
|
|
2091
|
+
installed: z.ZodBoolean;
|
|
2092
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
2093
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
2094
|
+
needsUpdate: z.ZodBoolean;
|
|
2095
|
+
npmGlobalPackageVersion: z.ZodNullable<z.ZodString>;
|
|
2096
|
+
npmPackageName: z.ZodNullable<z.ZodString>;
|
|
2097
|
+
versionUnsupported: z.ZodBoolean;
|
|
2098
|
+
}, z.core.$loose>;
|
|
2099
|
+
type ExperimentalProviderInstallationStatus = z.infer<typeof experimental_providerInstallationStatusSchema>;
|
|
2100
|
+
declare const experimental_providerInstallationRunParamsSchema: z.ZodObject<{
|
|
2101
|
+
action: z.ZodEnum<{
|
|
2102
|
+
install: "install";
|
|
2103
|
+
update: "update";
|
|
2104
|
+
}>;
|
|
2105
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
providerId: z.ZodString;
|
|
2107
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2108
|
+
}, z.core.$loose>;
|
|
2109
|
+
type ExperimentalProviderInstallationRunParams = z.infer<typeof experimental_providerInstallationRunParamsSchema>;
|
|
2110
|
+
/**
|
|
2111
|
+
* A typed process plan. The provider chooses the executable and arguments;
|
|
2112
|
+
* the daemon chooses the environment and cwd and owns process supervision.
|
|
2113
|
+
*/
|
|
2114
|
+
declare const experimental_providerInstallationCommandSchema: z.ZodObject<{
|
|
2115
|
+
args: z.ZodArray<z.ZodString>;
|
|
2116
|
+
command: z.ZodString;
|
|
2117
|
+
displayCommand: z.ZodString;
|
|
2118
|
+
}, z.core.$loose>;
|
|
2119
|
+
type ExperimentalProviderInstallationCommand = z.infer<typeof experimental_providerInstallationCommandSchema>;
|
|
2120
|
+
declare const experimental_providerInstallationVerificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2121
|
+
kind: z.ZodLiteral<"installed">;
|
|
2122
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2123
|
+
kind: z.ZodLiteral<"version_changed">;
|
|
2124
|
+
previousVersion: z.ZodString;
|
|
2125
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2126
|
+
kind: z.ZodLiteral<"version_at_least">;
|
|
2127
|
+
version: z.ZodString;
|
|
2128
|
+
}, z.core.$loose>], "kind">;
|
|
2129
|
+
type ExperimentalProviderInstallationVerification = z.infer<typeof experimental_providerInstallationVerificationSchema>;
|
|
2130
|
+
/**
|
|
2131
|
+
* `available: false` handles a stale action safely: status may have changed
|
|
2132
|
+
* between rendering a button and the daemon resolving the execution plan.
|
|
2133
|
+
*/
|
|
2134
|
+
declare const experimental_providerInstallationRunResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2135
|
+
available: z.ZodLiteral<false>;
|
|
2136
|
+
message: z.ZodString;
|
|
2137
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2138
|
+
available: z.ZodLiteral<true>;
|
|
2139
|
+
command: z.ZodObject<{
|
|
2140
|
+
args: z.ZodArray<z.ZodString>;
|
|
2141
|
+
command: z.ZodString;
|
|
2142
|
+
displayCommand: z.ZodString;
|
|
2143
|
+
}, z.core.$loose>;
|
|
2144
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2145
|
+
kind: z.ZodLiteral<"installed">;
|
|
2146
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2147
|
+
kind: z.ZodLiteral<"version_changed">;
|
|
2148
|
+
previousVersion: z.ZodString;
|
|
2149
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
2150
|
+
kind: z.ZodLiteral<"version_at_least">;
|
|
2151
|
+
version: z.ZodString;
|
|
2152
|
+
}, z.core.$loose>], "kind">;
|
|
2153
|
+
}, z.core.$loose>], "available">;
|
|
2154
|
+
type ExperimentalProviderInstallationRunResult = z.infer<typeof experimental_providerInstallationRunResultSchema>;
|
|
2155
|
+
|
|
1567
2156
|
/**
|
|
1568
2157
|
* Canonical runtime → bridge request methods. One vocabulary for every
|
|
1569
2158
|
* provider: a bridge maps these to its provider's native dialect internally
|
|
@@ -1574,6 +2163,10 @@ type BridgeExecutionOptions = z.infer<typeof bridgeExecutionOptionsSchema>;
|
|
|
1574
2163
|
declare const BRIDGE_REQUEST_METHODS: {
|
|
1575
2164
|
readonly initialize: "initialize";
|
|
1576
2165
|
readonly modelList: "model/list";
|
|
2166
|
+
readonly experimentalProviderHealth: "provider/health";
|
|
2167
|
+
readonly experimentalProviderUsage: "provider/usage";
|
|
2168
|
+
readonly experimentalProviderInstallationStatus: "provider/installation/status";
|
|
2169
|
+
readonly experimentalProviderInstallationRun: "provider/installation/run";
|
|
1577
2170
|
readonly threadStart: "thread/start";
|
|
1578
2171
|
readonly threadResume: "thread/resume";
|
|
1579
2172
|
readonly threadFork: "thread/fork";
|
|
@@ -1597,6 +2190,22 @@ declare const threadStartParamsSchema: z.ZodObject<{
|
|
|
1597
2190
|
description: z.ZodString;
|
|
1598
2191
|
inputSchema: z.ZodUnknown;
|
|
1599
2192
|
name: z.ZodString;
|
|
2193
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
2194
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2195
|
+
icon: z.ZodObject<{
|
|
2196
|
+
glyph: z.ZodString;
|
|
2197
|
+
}, z.core.$strip>;
|
|
2198
|
+
label: z.ZodObject<{
|
|
2199
|
+
completed: z.ZodString;
|
|
2200
|
+
pending: z.ZodString;
|
|
2201
|
+
}, z.core.$strip>;
|
|
2202
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
2203
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
2204
|
+
dark: z.ZodString;
|
|
2205
|
+
light: z.ZodString;
|
|
2206
|
+
}, z.core.$strip>>;
|
|
2207
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2208
|
+
}, z.core.$strip>>;
|
|
1600
2209
|
}, z.core.$strip>>>;
|
|
1601
2210
|
input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1602
2211
|
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1687,6 +2296,7 @@ declare const threadStartParamsSchema: z.ZodObject<{
|
|
|
1687
2296
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1688
2297
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1689
2298
|
model: z.ZodOptional<z.ZodString>;
|
|
2299
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1690
2300
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1691
2301
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1692
2302
|
high: "high";
|
|
@@ -1733,6 +2343,22 @@ declare const threadResumeParamsSchema: z.ZodObject<{
|
|
|
1733
2343
|
description: z.ZodString;
|
|
1734
2344
|
inputSchema: z.ZodUnknown;
|
|
1735
2345
|
name: z.ZodString;
|
|
2346
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
2347
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2348
|
+
icon: z.ZodObject<{
|
|
2349
|
+
glyph: z.ZodString;
|
|
2350
|
+
}, z.core.$strip>;
|
|
2351
|
+
label: z.ZodObject<{
|
|
2352
|
+
completed: z.ZodString;
|
|
2353
|
+
pending: z.ZodString;
|
|
2354
|
+
}, z.core.$strip>;
|
|
2355
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
2356
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
2357
|
+
dark: z.ZodString;
|
|
2358
|
+
light: z.ZodString;
|
|
2359
|
+
}, z.core.$strip>>;
|
|
2360
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2361
|
+
}, z.core.$strip>>;
|
|
1736
2362
|
}, z.core.$strip>>>;
|
|
1737
2363
|
instructionMode: z.ZodEnum<{
|
|
1738
2364
|
append: "append";
|
|
@@ -1742,6 +2368,7 @@ declare const threadResumeParamsSchema: z.ZodObject<{
|
|
|
1742
2368
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1743
2369
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1744
2370
|
model: z.ZodOptional<z.ZodString>;
|
|
2371
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1745
2372
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1746
2373
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1747
2374
|
high: "high";
|
|
@@ -1789,6 +2416,22 @@ declare const threadForkParamsSchema: z.ZodObject<{
|
|
|
1789
2416
|
description: z.ZodString;
|
|
1790
2417
|
inputSchema: z.ZodUnknown;
|
|
1791
2418
|
name: z.ZodString;
|
|
2419
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
2420
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2421
|
+
icon: z.ZodObject<{
|
|
2422
|
+
glyph: z.ZodString;
|
|
2423
|
+
}, z.core.$strip>;
|
|
2424
|
+
label: z.ZodObject<{
|
|
2425
|
+
completed: z.ZodString;
|
|
2426
|
+
pending: z.ZodString;
|
|
2427
|
+
}, z.core.$strip>;
|
|
2428
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
2429
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
2430
|
+
dark: z.ZodString;
|
|
2431
|
+
light: z.ZodString;
|
|
2432
|
+
}, z.core.$strip>>;
|
|
2433
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2434
|
+
}, z.core.$strip>>;
|
|
1792
2435
|
}, z.core.$strip>>>;
|
|
1793
2436
|
instructionMode: z.ZodEnum<{
|
|
1794
2437
|
append: "append";
|
|
@@ -1798,6 +2441,7 @@ declare const threadForkParamsSchema: z.ZodObject<{
|
|
|
1798
2441
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1799
2442
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1800
2443
|
model: z.ZodOptional<z.ZodString>;
|
|
2444
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1801
2445
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1802
2446
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1803
2447
|
high: "high";
|
|
@@ -1956,6 +2600,7 @@ declare const turnStartParamsSchema: z.ZodObject<{
|
|
|
1956
2600
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1957
2601
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1958
2602
|
model: z.ZodOptional<z.ZodString>;
|
|
2603
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1959
2604
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1960
2605
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1961
2606
|
high: "high";
|
|
@@ -2084,6 +2729,7 @@ declare const turnSteerParamsSchema: z.ZodObject<{
|
|
|
2084
2729
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2085
2730
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2086
2731
|
model: z.ZodOptional<z.ZodString>;
|
|
2732
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
2087
2733
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2088
2734
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
2089
2735
|
high: "high";
|
|
@@ -2152,10 +2798,42 @@ declare const skillsConfigureParamsSchema: z.ZodObject<{
|
|
|
2152
2798
|
declare const BRIDGE_NOTIFICATION_METHODS: {
|
|
2153
2799
|
readonly threadIdentity: "thread/identity";
|
|
2154
2800
|
readonly sessionReplaced: "session/replaced";
|
|
2155
|
-
readonly threadOpenWork: "thread/openWork";
|
|
2156
2801
|
readonly providerRaw: "provider/raw";
|
|
2802
|
+
readonly providerRecovery: "provider/recovery";
|
|
2157
2803
|
readonly error: "error";
|
|
2158
2804
|
};
|
|
2805
|
+
/**
|
|
2806
|
+
* A typed recovery hint: the bridge tells the runtime WHAT went wrong in the
|
|
2807
|
+
* runtime's own vocabulary, so the runtime never matches provider error text
|
|
2808
|
+
* (the codex regex set, the account-restart list, the archive idempotency
|
|
2809
|
+
* string match all go away in WS4). A runtime signal, not a timeline item —
|
|
2810
|
+
* the user-visible consequence, when there is one, is the `provider/error`
|
|
2811
|
+
* delta the bridge emits alongside, and the timeline stays free of
|
|
2812
|
+
* "restarting the bridge" noise. Lives here with `session/replaced` rather
|
|
2813
|
+
* than in `thread/delta` for the same reason `provider/raw` does: it is
|
|
2814
|
+
* consumed by the runtime's recovery logic, never persisted.
|
|
2815
|
+
*
|
|
2816
|
+
* `threadId` is absent for provider-wide conditions (`authRequired`,
|
|
2817
|
+
* `rateLimited` at the account level) and present when the hint is about one
|
|
2818
|
+
* session (`sessionArchived`, `staleTurn`). `retryable` says whether the
|
|
2819
|
+
* runtime may retry the failed command after acting on the hint.
|
|
2820
|
+
*
|
|
2821
|
+
* Additive: no consumer yet. WS4 (runtime cleanup) acts on each kind; until
|
|
2822
|
+
* then the runtime ignores the method like any unknown notification.
|
|
2823
|
+
*/
|
|
2824
|
+
declare const providerRecoveryNotificationSchema: z.ZodObject<{
|
|
2825
|
+
kind: z.ZodEnum<{
|
|
2826
|
+
authRequired: "authRequired";
|
|
2827
|
+
rateLimited: "rateLimited";
|
|
2828
|
+
restartRecommended: "restartRecommended";
|
|
2829
|
+
sessionArchived: "sessionArchived";
|
|
2830
|
+
staleTurn: "staleTurn";
|
|
2831
|
+
}>;
|
|
2832
|
+
message: z.ZodString;
|
|
2833
|
+
retryable: z.ZodBoolean;
|
|
2834
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
2835
|
+
}, z.core.$loose>;
|
|
2836
|
+
type ProviderRecoveryNotification = z.infer<typeof providerRecoveryNotificationSchema>;
|
|
2159
2837
|
|
|
2160
2838
|
/**
|
|
2161
2839
|
* Bridge → runtime requests: the two channels where the provider needs an
|
|
@@ -2192,6 +2870,35 @@ declare const BRIDGE_JSON_RPC_ERRORS: {
|
|
|
2192
2870
|
};
|
|
2193
2871
|
|
|
2194
2872
|
declare const THREAD_DELTA_NOTIFICATION_METHOD = "thread/delta";
|
|
2873
|
+
/**
|
|
2874
|
+
* Declarative presentation a bridge attaches to an item at `item.open` (and
|
|
2875
|
+
* re-states on `item.close`, whose item is the full terminal shape). The
|
|
2876
|
+
* assembler persists it on the canonical item so the row renders after the
|
|
2877
|
+
* plugin is uninstalled or upgraded, and so mobile renders every kind without
|
|
2878
|
+
* plugin code. The same schema as the persisted field
|
|
2879
|
+
* (`threadEventItemPresentationSchema` in @bb/domain) — one vocabulary, no
|
|
2880
|
+
* translation.
|
|
2881
|
+
*
|
|
2882
|
+
* Optional in grammar v3 so v2 bridges still validate; a later workstream
|
|
2883
|
+
* makes it required once every first-party bridge attaches it.
|
|
2884
|
+
*/
|
|
2885
|
+
declare const deltaPresentationSchema: z.ZodObject<{
|
|
2886
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2887
|
+
icon: z.ZodObject<{
|
|
2888
|
+
glyph: z.ZodString;
|
|
2889
|
+
}, z.core.$strip>;
|
|
2890
|
+
label: z.ZodObject<{
|
|
2891
|
+
completed: z.ZodString;
|
|
2892
|
+
pending: z.ZodString;
|
|
2893
|
+
}, z.core.$strip>;
|
|
2894
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
2895
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
2896
|
+
dark: z.ZodString;
|
|
2897
|
+
light: z.ZodString;
|
|
2898
|
+
}, z.core.$strip>>;
|
|
2899
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2900
|
+
}, z.core.$strip>;
|
|
2901
|
+
type DeltaPresentation = z.infer<typeof deltaPresentationSchema>;
|
|
2195
2902
|
/**
|
|
2196
2903
|
* Provider-native join key for an item. `providerItemId` is the provider's
|
|
2197
2904
|
* own id (a tool-call id); `channel` distinguishes provider-anonymous item
|
|
@@ -2307,6 +3014,105 @@ declare const deltaBackgroundTaskShapeSchema: z.ZodObject<{
|
|
|
2307
3014
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
2308
3015
|
}, z.core.$strip>;
|
|
2309
3016
|
type DeltaBackgroundTaskShape = z.infer<typeof deltaBackgroundTaskShapeSchema>;
|
|
3017
|
+
/**
|
|
3018
|
+
* A file the agent read (grammar v3). Claude `Read` is the top generic tool in
|
|
3019
|
+
* the production corpus — 7,568 calls rendered as opaque `tool` rows — and
|
|
3020
|
+
* codex reads files through `cat`/`sed -n` commands the bridge already
|
|
3021
|
+
* classifies as read intents. `cmd` carries that native shell form when the
|
|
3022
|
+
* read ran through a command rather than a structured tool.
|
|
3023
|
+
*/
|
|
3024
|
+
declare const deltaFileReadShapeSchema: z.ZodObject<{
|
|
3025
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3026
|
+
path: z.ZodString;
|
|
3027
|
+
type: z.ZodLiteral<"fileRead">;
|
|
3028
|
+
}, z.core.$strip>;
|
|
3029
|
+
type DeltaFileReadShape = z.infer<typeof deltaFileReadShapeSchema>;
|
|
3030
|
+
/**
|
|
3031
|
+
* Grep, glob and directory listing as one shape (grammar v3), discriminated
|
|
3032
|
+
* by `mode`: `content` searches inside files (Claude `Grep`, `rg`), `path`
|
|
3033
|
+
* matches file names (Claude `Glob`, `fd`), `list` enumerates a directory
|
|
3034
|
+
* (`ls`, codex `list_dir`). `query` is the pattern — text or a regex for
|
|
3035
|
+
* `content`, a glob for `path`, an optional filter for `list` (empty when the
|
|
3036
|
+
* whole directory is listed); `path` is the root the search ran under when
|
|
3037
|
+
* the provider named one; `cmd` is the native shell form when it ran through
|
|
3038
|
+
* a command.
|
|
3039
|
+
*/
|
|
3040
|
+
declare const deltaSearchShapeSchema: z.ZodObject<{
|
|
3041
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3042
|
+
mode: z.ZodEnum<{
|
|
3043
|
+
content: "content";
|
|
3044
|
+
list: "list";
|
|
3045
|
+
path: "path";
|
|
3046
|
+
}>;
|
|
3047
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3048
|
+
query: z.ZodString;
|
|
3049
|
+
type: z.ZodLiteral<"search">;
|
|
3050
|
+
}, z.core.$strip>;
|
|
3051
|
+
type DeltaSearchShape = z.infer<typeof deltaSearchShapeSchema>;
|
|
3052
|
+
/**
|
|
3053
|
+
* Delegated work (grammar v3): one shape for the three encodings in the
|
|
3054
|
+
* production data — codex `spawnAgent`/`wait` tool calls, the Claude `Agent`
|
|
3055
|
+
* tool with nested child turns, and backgrounded `local_agent` background
|
|
3056
|
+
* tasks — and for what the `thread/openWork` notification used to report,
|
|
3057
|
+
* since an open delegation IS open work. `childRef` is the provider-native child id; the
|
|
3058
|
+
* child's own deltas link back through `parentRef`. `background: true` marks
|
|
3059
|
+
* a delegation that outlives its turn: the assembler routes its progress and
|
|
3060
|
+
* close to the thread-scoped `item/delegation/*` events exactly as it does
|
|
3061
|
+
* for `backgroundTask`. The terminal `status` rides `item.close`, as
|
|
3062
|
+
* for `command` and `tool`; `summary` is the child's terminal summary.
|
|
3063
|
+
*/
|
|
3064
|
+
declare const deltaDelegationShapeSchema: z.ZodObject<{
|
|
3065
|
+
background: z.ZodBoolean;
|
|
3066
|
+
childRef: z.ZodString;
|
|
3067
|
+
label: z.ZodString;
|
|
3068
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3069
|
+
type: z.ZodLiteral<"delegation">;
|
|
3070
|
+
}, z.core.$strip>;
|
|
3071
|
+
type DeltaDelegationShape = z.infer<typeof deltaDelegationShapeSchema>;
|
|
3072
|
+
/**
|
|
3073
|
+
* A structured plan snapshot as an item (grammar v3): codex `update_plan`
|
|
3074
|
+
* (295 production threads, discarded by the UI while it only rode the
|
|
3075
|
+
* turn-level `turn.plan`), ACP `plan` updates, and Claude
|
|
3076
|
+
* `TaskCreate`/`TaskUpdate`/`TodoWrite`. Each snapshot carries the full step
|
|
3077
|
+
* list and supersedes the previous one. The turn-level `turn.plan` delta is
|
|
3078
|
+
* gone: every in-repo bridge speaks this form, and the persisted
|
|
3079
|
+
* `turn/plan/updated` event type stays as read-only history.
|
|
3080
|
+
*/
|
|
3081
|
+
declare const deltaPlanStepsShapeSchema: z.ZodObject<{
|
|
3082
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
3083
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3084
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
3085
|
+
active: "active";
|
|
3086
|
+
completed: "completed";
|
|
3087
|
+
failed: "failed";
|
|
3088
|
+
pending: "pending";
|
|
3089
|
+
}>>;
|
|
3090
|
+
step: z.ZodString;
|
|
3091
|
+
}, z.core.$strip>>;
|
|
3092
|
+
type: z.ZodLiteral<"planSteps">;
|
|
3093
|
+
}, z.core.$strip>;
|
|
3094
|
+
type DeltaPlanStepsShape = z.infer<typeof deltaPlanStepsShapeSchema>;
|
|
3095
|
+
/**
|
|
3096
|
+
* A plugin-defined item kind outside the core vocabulary (grammar v3).
|
|
3097
|
+
* `kind` is the namespaced `"<pluginId>/<name>"` the plugin declared in its
|
|
3098
|
+
* provider registration (`extensionKinds`); only the namespace shape is
|
|
3099
|
+
* validated here. The payload is opaque JSON at this layer: the assembler
|
|
3100
|
+
* copies it onto the canonical item, and the server validates it against the
|
|
3101
|
+
* plugin's declared item schema for `kind` at ingest, persisting a
|
|
3102
|
+
* `provider/unhandled` in its place on a miss.
|
|
3103
|
+
*
|
|
3104
|
+
* The shape carries no presentation of its own: presentation lives in ONE
|
|
3105
|
+
* place, the `item.open`/`item.close` delta's `presentation` field, and for
|
|
3106
|
+
* an extension shape that field is REQUIRED (enforced by the delta schema
|
|
3107
|
+
* below) — an extension item has no core renderer, so the declarative base
|
|
3108
|
+
* is the only thing every client can show.
|
|
3109
|
+
*/
|
|
3110
|
+
declare const deltaExtensionShapeSchema: z.ZodObject<{
|
|
3111
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
3112
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3113
|
+
type: z.ZodLiteral<"extension">;
|
|
3114
|
+
}, z.core.$strip>;
|
|
3115
|
+
type DeltaExtensionShape = z.infer<typeof deltaExtensionShapeSchema>;
|
|
2310
3116
|
declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2311
3117
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
2312
3118
|
command: z.ZodString;
|
|
@@ -2346,20 +3152,131 @@ declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2346
3152
|
summary: z.ZodArray<z.ZodString>;
|
|
2347
3153
|
type: z.ZodLiteral<"reasoning">;
|
|
2348
3154
|
}, z.core.$strip>, z.ZodObject<{
|
|
2349
|
-
text: z.ZodString;
|
|
2350
|
-
type: z.ZodLiteral<"plan">;
|
|
3155
|
+
text: z.ZodString;
|
|
3156
|
+
type: z.ZodLiteral<"plan">;
|
|
3157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3158
|
+
queries: z.ZodArray<z.ZodString>;
|
|
3159
|
+
type: z.ZodLiteral<"webSearch">;
|
|
3160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3161
|
+
pattern: z.ZodNullable<z.ZodString>;
|
|
3162
|
+
prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3163
|
+
type: z.ZodLiteral<"webFetch">;
|
|
3164
|
+
url: z.ZodString;
|
|
3165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3166
|
+
path: z.ZodString;
|
|
3167
|
+
type: z.ZodLiteral<"imageView">;
|
|
3168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3169
|
+
description: z.ZodString;
|
|
3170
|
+
error: z.ZodOptional<z.ZodString>;
|
|
3171
|
+
familyId: z.ZodString;
|
|
3172
|
+
outputFile: z.ZodOptional<z.ZodString>;
|
|
3173
|
+
skipTranscript: z.ZodBoolean;
|
|
3174
|
+
status: z.ZodEnum<{
|
|
3175
|
+
completed: "completed";
|
|
3176
|
+
failed: "failed";
|
|
3177
|
+
interrupted: "interrupted";
|
|
3178
|
+
pending: "pending";
|
|
3179
|
+
}>;
|
|
3180
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3181
|
+
taskStatus: z.ZodEnum<{
|
|
3182
|
+
completed: "completed";
|
|
3183
|
+
failed: "failed";
|
|
3184
|
+
killed: "killed";
|
|
3185
|
+
paused: "paused";
|
|
3186
|
+
pending: "pending";
|
|
3187
|
+
running: "running";
|
|
3188
|
+
stopped: "stopped";
|
|
3189
|
+
}>;
|
|
3190
|
+
taskType: z.ZodString;
|
|
3191
|
+
type: z.ZodLiteral<"backgroundTask">;
|
|
3192
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
3193
|
+
durationMs: z.ZodNumber;
|
|
3194
|
+
toolUses: z.ZodNumber;
|
|
3195
|
+
totalTokens: z.ZodNumber;
|
|
3196
|
+
}, z.core.$strip>>;
|
|
3197
|
+
workflow: z.ZodOptional<z.ZodObject<{
|
|
3198
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
3199
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
3200
|
+
attempt: z.ZodNumber;
|
|
3201
|
+
cached: z.ZodBoolean;
|
|
3202
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
3203
|
+
error: z.ZodOptional<z.ZodString>;
|
|
3204
|
+
index: z.ZodNumber;
|
|
3205
|
+
isolation: z.ZodOptional<z.ZodString>;
|
|
3206
|
+
label: z.ZodString;
|
|
3207
|
+
lastProgressAt: z.ZodNumber;
|
|
3208
|
+
lastToolName: z.ZodOptional<z.ZodString>;
|
|
3209
|
+
lastToolSummary: z.ZodOptional<z.ZodString>;
|
|
3210
|
+
model: z.ZodString;
|
|
3211
|
+
phaseIndex: z.ZodOptional<z.ZodNumber>;
|
|
3212
|
+
phaseTitle: z.ZodOptional<z.ZodString>;
|
|
3213
|
+
promptPreview: z.ZodOptional<z.ZodString>;
|
|
3214
|
+
queuedAt: z.ZodOptional<z.ZodNumber>;
|
|
3215
|
+
resultPreview: z.ZodOptional<z.ZodString>;
|
|
3216
|
+
startedAt: z.ZodOptional<z.ZodNumber>;
|
|
3217
|
+
state: z.ZodEnum<{
|
|
3218
|
+
done: "done";
|
|
3219
|
+
failed: "failed";
|
|
3220
|
+
queued: "queued";
|
|
3221
|
+
running: "running";
|
|
3222
|
+
skipped: "skipped";
|
|
3223
|
+
}>;
|
|
3224
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
3225
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
3226
|
+
}, z.core.$strip>>;
|
|
3227
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
3228
|
+
index: z.ZodNumber;
|
|
3229
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
3230
|
+
title: z.ZodString;
|
|
3231
|
+
}, z.core.$strip>>;
|
|
3232
|
+
}, z.core.$strip>>;
|
|
3233
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
3234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3235
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3236
|
+
path: z.ZodString;
|
|
3237
|
+
type: z.ZodLiteral<"fileRead">;
|
|
2351
3238
|
}, z.core.$strip>, z.ZodObject<{
|
|
2352
|
-
|
|
2353
|
-
|
|
3239
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3240
|
+
mode: z.ZodEnum<{
|
|
3241
|
+
content: "content";
|
|
3242
|
+
list: "list";
|
|
3243
|
+
path: "path";
|
|
3244
|
+
}>;
|
|
3245
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3246
|
+
query: z.ZodString;
|
|
3247
|
+
type: z.ZodLiteral<"search">;
|
|
2354
3248
|
}, z.core.$strip>, z.ZodObject<{
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
3249
|
+
background: z.ZodBoolean;
|
|
3250
|
+
childRef: z.ZodString;
|
|
3251
|
+
label: z.ZodString;
|
|
3252
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3253
|
+
type: z.ZodLiteral<"delegation">;
|
|
2359
3254
|
}, z.core.$strip>, z.ZodObject<{
|
|
2360
|
-
|
|
2361
|
-
|
|
3255
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
3256
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3257
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
3258
|
+
active: "active";
|
|
3259
|
+
completed: "completed";
|
|
3260
|
+
failed: "failed";
|
|
3261
|
+
pending: "pending";
|
|
3262
|
+
}>>;
|
|
3263
|
+
step: z.ZodString;
|
|
3264
|
+
}, z.core.$strip>>;
|
|
3265
|
+
type: z.ZodLiteral<"planSteps">;
|
|
2362
3266
|
}, z.core.$strip>, z.ZodObject<{
|
|
3267
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
3268
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3269
|
+
type: z.ZodLiteral<"extension">;
|
|
3270
|
+
}, z.core.$strip>], "type">;
|
|
3271
|
+
type DeltaItemShape = z.infer<typeof deltaItemShapeSchema>;
|
|
3272
|
+
type DeltaItemShapeType = DeltaItemShape["type"];
|
|
3273
|
+
/**
|
|
3274
|
+
* The re-embedded snapshot an `item.progress` may carry for work that
|
|
3275
|
+
* outlives its turn. `backgroundTask` is the v2 form; `delegation` joins it in
|
|
3276
|
+
* v3 for background delegations (the assembler routes it to
|
|
3277
|
+
* `item/delegation/progress`).
|
|
3278
|
+
*/
|
|
3279
|
+
declare const deltaProgressSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2363
3280
|
description: z.ZodString;
|
|
2364
3281
|
error: z.ZodOptional<z.ZodString>;
|
|
2365
3282
|
familyId: z.ZodString;
|
|
@@ -2425,16 +3342,20 @@ declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2425
3342
|
}, z.core.$strip>>;
|
|
2426
3343
|
}, z.core.$strip>>;
|
|
2427
3344
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3345
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3346
|
+
background: z.ZodBoolean;
|
|
3347
|
+
childRef: z.ZodString;
|
|
3348
|
+
label: z.ZodString;
|
|
3349
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3350
|
+
type: z.ZodLiteral<"delegation">;
|
|
2428
3351
|
}, z.core.$strip>], "type">;
|
|
2429
|
-
type
|
|
2430
|
-
declare const deltaMessageChannelSchema: z.ZodEnum<{
|
|
2431
|
-
assistant: "assistant";
|
|
2432
|
-
reasoning: "reasoning";
|
|
2433
|
-
}>;
|
|
2434
|
-
type DeltaMessageChannel = z.infer<typeof deltaMessageChannelSchema>;
|
|
3352
|
+
type DeltaProgressSnapshot = z.infer<typeof deltaProgressSnapshotSchema>;
|
|
2435
3353
|
/**
|
|
2436
|
-
*
|
|
2437
|
-
* `
|
|
3354
|
+
* The streamed-text channels: which text item a stream feeds and which of its
|
|
3355
|
+
* fields the text lands in. `agentMessage` and `plan` items have one text;
|
|
3356
|
+
* a `reasoning` item has `summary` (`reasoningSummary`) and `content`
|
|
3357
|
+
* (`reasoningText`). A delta for an unknown item key synthesizes the
|
|
3358
|
+
* channel's `item/started`.
|
|
2438
3359
|
*/
|
|
2439
3360
|
declare const deltaTextChannelSchema: z.ZodEnum<{
|
|
2440
3361
|
agentMessage: "agentMessage";
|
|
@@ -2617,6 +3538,42 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2617
3538
|
}, z.core.$strip>>;
|
|
2618
3539
|
}, z.core.$strip>>;
|
|
2619
3540
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3542
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3543
|
+
path: z.ZodString;
|
|
3544
|
+
type: z.ZodLiteral<"fileRead">;
|
|
3545
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3546
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3547
|
+
mode: z.ZodEnum<{
|
|
3548
|
+
content: "content";
|
|
3549
|
+
list: "list";
|
|
3550
|
+
path: "path";
|
|
3551
|
+
}>;
|
|
3552
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3553
|
+
query: z.ZodString;
|
|
3554
|
+
type: z.ZodLiteral<"search">;
|
|
3555
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3556
|
+
background: z.ZodBoolean;
|
|
3557
|
+
childRef: z.ZodString;
|
|
3558
|
+
label: z.ZodString;
|
|
3559
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3560
|
+
type: z.ZodLiteral<"delegation">;
|
|
3561
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3562
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
3563
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3564
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
3565
|
+
active: "active";
|
|
3566
|
+
completed: "completed";
|
|
3567
|
+
failed: "failed";
|
|
3568
|
+
pending: "pending";
|
|
3569
|
+
}>>;
|
|
3570
|
+
step: z.ZodString;
|
|
3571
|
+
}, z.core.$strip>>;
|
|
3572
|
+
type: z.ZodLiteral<"planSteps">;
|
|
3573
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3574
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
3575
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3576
|
+
type: z.ZodLiteral<"extension">;
|
|
2620
3577
|
}, z.core.$strip>], "type">;
|
|
2621
3578
|
key: z.ZodObject<{
|
|
2622
3579
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -2633,6 +3590,22 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2633
3590
|
}, z.core.$strip>;
|
|
2634
3591
|
rawType: z.ZodString;
|
|
2635
3592
|
}, z.core.$strip>>;
|
|
3593
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
3594
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3595
|
+
icon: z.ZodObject<{
|
|
3596
|
+
glyph: z.ZodString;
|
|
3597
|
+
}, z.core.$strip>;
|
|
3598
|
+
label: z.ZodObject<{
|
|
3599
|
+
completed: z.ZodString;
|
|
3600
|
+
pending: z.ZodString;
|
|
3601
|
+
}, z.core.$strip>;
|
|
3602
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
3603
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
3604
|
+
dark: z.ZodString;
|
|
3605
|
+
light: z.ZodString;
|
|
3606
|
+
}, z.core.$strip>>;
|
|
3607
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3608
|
+
}, z.core.$strip>>;
|
|
2636
3609
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2637
3610
|
}, z.core.$strip>, z.ZodObject<{
|
|
2638
3611
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
@@ -2756,6 +3729,42 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2756
3729
|
}, z.core.$strip>>;
|
|
2757
3730
|
}, z.core.$strip>>;
|
|
2758
3731
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3732
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3733
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3734
|
+
path: z.ZodString;
|
|
3735
|
+
type: z.ZodLiteral<"fileRead">;
|
|
3736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3737
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
3738
|
+
mode: z.ZodEnum<{
|
|
3739
|
+
content: "content";
|
|
3740
|
+
list: "list";
|
|
3741
|
+
path: "path";
|
|
3742
|
+
}>;
|
|
3743
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3744
|
+
query: z.ZodString;
|
|
3745
|
+
type: z.ZodLiteral<"search">;
|
|
3746
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3747
|
+
background: z.ZodBoolean;
|
|
3748
|
+
childRef: z.ZodString;
|
|
3749
|
+
label: z.ZodString;
|
|
3750
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3751
|
+
type: z.ZodLiteral<"delegation">;
|
|
3752
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3753
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
3754
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
3755
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
3756
|
+
active: "active";
|
|
3757
|
+
completed: "completed";
|
|
3758
|
+
failed: "failed";
|
|
3759
|
+
pending: "pending";
|
|
3760
|
+
}>>;
|
|
3761
|
+
step: z.ZodString;
|
|
3762
|
+
}, z.core.$strip>>;
|
|
3763
|
+
type: z.ZodLiteral<"planSteps">;
|
|
3764
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3765
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
3766
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3767
|
+
type: z.ZodLiteral<"extension">;
|
|
2759
3768
|
}, z.core.$strip>], "type">;
|
|
2760
3769
|
key: z.ZodObject<{
|
|
2761
3770
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -2772,6 +3781,22 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2772
3781
|
}, z.core.$strip>;
|
|
2773
3782
|
rawType: z.ZodString;
|
|
2774
3783
|
}, z.core.$strip>>;
|
|
3784
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
3785
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3786
|
+
icon: z.ZodObject<{
|
|
3787
|
+
glyph: z.ZodString;
|
|
3788
|
+
}, z.core.$strip>;
|
|
3789
|
+
label: z.ZodObject<{
|
|
3790
|
+
completed: z.ZodString;
|
|
3791
|
+
pending: z.ZodString;
|
|
3792
|
+
}, z.core.$strip>;
|
|
3793
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
3794
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
3795
|
+
dark: z.ZodString;
|
|
3796
|
+
light: z.ZodString;
|
|
3797
|
+
}, z.core.$strip>>;
|
|
3798
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3799
|
+
}, z.core.$strip>>;
|
|
2775
3800
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2776
3801
|
resultText: z.ZodOptional<z.ZodString>;
|
|
2777
3802
|
status: z.ZodEnum<{
|
|
@@ -2780,28 +3805,6 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2780
3805
|
interrupted: "interrupted";
|
|
2781
3806
|
pending: "pending";
|
|
2782
3807
|
}>;
|
|
2783
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2784
|
-
explanation: z.ZodOptional<z.ZodString>;
|
|
2785
|
-
kind: z.ZodLiteral<"turn.plan">;
|
|
2786
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
2787
|
-
raw: z.ZodObject<{
|
|
2788
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
2789
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
2790
|
-
method: z.ZodString;
|
|
2791
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
2792
|
-
}, z.core.$strip>;
|
|
2793
|
-
rawType: z.ZodString;
|
|
2794
|
-
}, z.core.$strip>>;
|
|
2795
|
-
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2796
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
2797
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
2798
|
-
active: "active";
|
|
2799
|
-
completed: "completed";
|
|
2800
|
-
failed: "failed";
|
|
2801
|
-
pending: "pending";
|
|
2802
|
-
}>>;
|
|
2803
|
-
step: z.ZodString;
|
|
2804
|
-
}, z.core.$strip>>;
|
|
2805
3808
|
}, z.core.$strip>, z.ZodObject<{
|
|
2806
3809
|
flush: z.ZodOptional<z.ZodBoolean>;
|
|
2807
3810
|
key: z.ZodObject<{
|
|
@@ -2821,7 +3824,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2821
3824
|
rawType: z.ZodString;
|
|
2822
3825
|
}, z.core.$strip>>;
|
|
2823
3826
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2824
|
-
snapshot: z.ZodOptional<z.ZodObject<{
|
|
3827
|
+
snapshot: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2825
3828
|
description: z.ZodString;
|
|
2826
3829
|
error: z.ZodOptional<z.ZodString>;
|
|
2827
3830
|
familyId: z.ZodString;
|
|
@@ -2887,13 +3890,26 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2887
3890
|
}, z.core.$strip>>;
|
|
2888
3891
|
}, z.core.$strip>>;
|
|
2889
3892
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
2890
|
-
}, z.core.$strip
|
|
3893
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3894
|
+
background: z.ZodBoolean;
|
|
3895
|
+
childRef: z.ZodString;
|
|
3896
|
+
label: z.ZodString;
|
|
3897
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3898
|
+
type: z.ZodLiteral<"delegation">;
|
|
3899
|
+
}, z.core.$strip>], "type">>;
|
|
2891
3900
|
}, z.core.$strip>, z.ZodObject<{
|
|
2892
3901
|
channel: z.ZodEnum<{
|
|
2893
|
-
|
|
2894
|
-
|
|
3902
|
+
agentMessage: "agentMessage";
|
|
3903
|
+
plan: "plan";
|
|
3904
|
+
reasoningSummary: "reasoningSummary";
|
|
3905
|
+
reasoningText: "reasoningText";
|
|
2895
3906
|
}>;
|
|
2896
|
-
|
|
3907
|
+
key: z.ZodObject<{
|
|
3908
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
3909
|
+
parentRef: z.ZodOptional<z.ZodString>;
|
|
3910
|
+
providerItemId: z.ZodOptional<z.ZodString>;
|
|
3911
|
+
}, z.core.$strip>;
|
|
3912
|
+
kind: z.ZodLiteral<"item.textDelta">;
|
|
2897
3913
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
2898
3914
|
raw: z.ZodObject<{
|
|
2899
3915
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -2903,27 +3919,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2903
3919
|
}, z.core.$strip>;
|
|
2904
3920
|
rawType: z.ZodString;
|
|
2905
3921
|
}, z.core.$strip>>;
|
|
2906
|
-
|
|
2907
|
-
streamKey: z.ZodString;
|
|
3922
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2908
3923
|
text: z.ZodString;
|
|
2909
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2910
|
-
channel: z.ZodEnum<{
|
|
2911
|
-
assistant: "assistant";
|
|
2912
|
-
reasoning: "reasoning";
|
|
2913
|
-
}>;
|
|
2914
|
-
kind: z.ZodLiteral<"message.close">;
|
|
2915
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
2916
|
-
raw: z.ZodObject<{
|
|
2917
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
2918
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
2919
|
-
method: z.ZodString;
|
|
2920
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
2921
|
-
}, z.core.$strip>;
|
|
2922
|
-
rawType: z.ZodString;
|
|
2923
|
-
}, z.core.$strip>>;
|
|
2924
|
-
parentRef: z.ZodOptional<z.ZodString>;
|
|
2925
|
-
streamKey: z.ZodOptional<z.ZodString>;
|
|
2926
|
-
text: z.ZodOptional<z.ZodString>;
|
|
2927
3924
|
}, z.core.$strip>, z.ZodObject<{
|
|
2928
3925
|
channel: z.ZodEnum<{
|
|
2929
3926
|
agentMessage: "agentMessage";
|
|
@@ -2936,7 +3933,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2936
3933
|
parentRef: z.ZodOptional<z.ZodString>;
|
|
2937
3934
|
providerItemId: z.ZodOptional<z.ZodString>;
|
|
2938
3935
|
}, z.core.$strip>;
|
|
2939
|
-
kind: z.ZodLiteral<"item.
|
|
3936
|
+
kind: z.ZodLiteral<"item.textClose">;
|
|
2940
3937
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
2941
3938
|
raw: z.ZodObject<{
|
|
2942
3939
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -2947,7 +3944,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2947
3944
|
rawType: z.ZodString;
|
|
2948
3945
|
}, z.core.$strip>>;
|
|
2949
3946
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2950
|
-
text: z.ZodString
|
|
3947
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2951
3948
|
}, z.core.$strip>, z.ZodObject<{
|
|
2952
3949
|
channel: z.ZodEnum<{
|
|
2953
3950
|
command: "command";
|
|
@@ -2988,17 +3985,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2988
3985
|
}, z.core.$strip>>;
|
|
2989
3986
|
text: z.ZodString;
|
|
2990
3987
|
}, z.core.$strip>, z.ZodObject<{
|
|
2991
|
-
kind: z.ZodLiteral<"usage
|
|
2992
|
-
modelContextWindow: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2993
|
-
tokens: z.ZodObject<{
|
|
2994
|
-
cachedInputTokens: z.ZodNumber;
|
|
2995
|
-
inputTokens: z.ZodNumber;
|
|
2996
|
-
outputTokens: z.ZodNumber;
|
|
2997
|
-
reasoningOutputTokens: z.ZodNumber;
|
|
2998
|
-
totalTokens: z.ZodNumber;
|
|
2999
|
-
}, z.core.$strip>;
|
|
3000
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3001
|
-
kind: z.ZodLiteral<"usage.exact">;
|
|
3988
|
+
kind: z.ZodLiteral<"usage">;
|
|
3002
3989
|
last: z.ZodObject<{
|
|
3003
3990
|
cachedInputTokens: z.ZodNumber;
|
|
3004
3991
|
inputTokens: z.ZodNumber;
|
|
@@ -3022,6 +4009,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3022
4009
|
}>;
|
|
3023
4010
|
estimated: z.ZodBoolean;
|
|
3024
4011
|
kind: z.ZodLiteral<"contextWindow">;
|
|
4012
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3025
4013
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3026
4014
|
used: z.ZodNullable<z.ZodNumber>;
|
|
3027
4015
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3051,19 +4039,9 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3051
4039
|
kind: z.ZodLiteral<"thread.name">;
|
|
3052
4040
|
name: z.ZodString;
|
|
3053
4041
|
}, z.core.$strip>, z.ZodObject<{
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
active: "active";
|
|
3058
|
-
budgetLimited: "budgetLimited";
|
|
3059
|
-
complete: "complete";
|
|
3060
|
-
paused: "paused";
|
|
3061
|
-
}>;
|
|
3062
|
-
timeUsedSeconds: z.ZodNumber;
|
|
3063
|
-
tokenBudget: z.ZodNullable<z.ZodNumber>;
|
|
3064
|
-
tokensUsed: z.ZodNumber;
|
|
3065
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3066
|
-
kind: z.ZodLiteral<"thread.goalCleared">;
|
|
4042
|
+
extensionKind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
4043
|
+
kind: z.ZodLiteral<"extension.state">;
|
|
4044
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3067
4045
|
}, z.core.$strip>, z.ZodObject<{
|
|
3068
4046
|
kind: z.ZodLiteral<"provider.rateLimits">;
|
|
3069
4047
|
rateLimits: z.ZodObject<{
|
|
@@ -3340,6 +4318,42 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3340
4318
|
}, z.core.$strip>>;
|
|
3341
4319
|
}, z.core.$strip>>;
|
|
3342
4320
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
4321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4322
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
4323
|
+
path: z.ZodString;
|
|
4324
|
+
type: z.ZodLiteral<"fileRead">;
|
|
4325
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4326
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
4327
|
+
mode: z.ZodEnum<{
|
|
4328
|
+
content: "content";
|
|
4329
|
+
list: "list";
|
|
4330
|
+
path: "path";
|
|
4331
|
+
}>;
|
|
4332
|
+
path: z.ZodOptional<z.ZodString>;
|
|
4333
|
+
query: z.ZodString;
|
|
4334
|
+
type: z.ZodLiteral<"search">;
|
|
4335
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4336
|
+
background: z.ZodBoolean;
|
|
4337
|
+
childRef: z.ZodString;
|
|
4338
|
+
label: z.ZodString;
|
|
4339
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
4340
|
+
type: z.ZodLiteral<"delegation">;
|
|
4341
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4342
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
4343
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
4344
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
4345
|
+
active: "active";
|
|
4346
|
+
completed: "completed";
|
|
4347
|
+
failed: "failed";
|
|
4348
|
+
pending: "pending";
|
|
4349
|
+
}>>;
|
|
4350
|
+
step: z.ZodString;
|
|
4351
|
+
}, z.core.$strip>>;
|
|
4352
|
+
type: z.ZodLiteral<"planSteps">;
|
|
4353
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4354
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
4355
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
4356
|
+
type: z.ZodLiteral<"extension">;
|
|
3343
4357
|
}, z.core.$strip>], "type">;
|
|
3344
4358
|
key: z.ZodObject<{
|
|
3345
4359
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -3356,6 +4370,22 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3356
4370
|
}, z.core.$strip>;
|
|
3357
4371
|
rawType: z.ZodString;
|
|
3358
4372
|
}, z.core.$strip>>;
|
|
4373
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
4374
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4375
|
+
icon: z.ZodObject<{
|
|
4376
|
+
glyph: z.ZodString;
|
|
4377
|
+
}, z.core.$strip>;
|
|
4378
|
+
label: z.ZodObject<{
|
|
4379
|
+
completed: z.ZodString;
|
|
4380
|
+
pending: z.ZodString;
|
|
4381
|
+
}, z.core.$strip>;
|
|
4382
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
4383
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
4384
|
+
dark: z.ZodString;
|
|
4385
|
+
light: z.ZodString;
|
|
4386
|
+
}, z.core.$strip>>;
|
|
4387
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4388
|
+
}, z.core.$strip>>;
|
|
3359
4389
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3360
4390
|
}, z.core.$strip>, z.ZodObject<{
|
|
3361
4391
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
@@ -3479,6 +4509,42 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3479
4509
|
}, z.core.$strip>>;
|
|
3480
4510
|
}, z.core.$strip>>;
|
|
3481
4511
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
4512
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4513
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
4514
|
+
path: z.ZodString;
|
|
4515
|
+
type: z.ZodLiteral<"fileRead">;
|
|
4516
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4517
|
+
cmd: z.ZodOptional<z.ZodString>;
|
|
4518
|
+
mode: z.ZodEnum<{
|
|
4519
|
+
content: "content";
|
|
4520
|
+
list: "list";
|
|
4521
|
+
path: "path";
|
|
4522
|
+
}>;
|
|
4523
|
+
path: z.ZodOptional<z.ZodString>;
|
|
4524
|
+
query: z.ZodString;
|
|
4525
|
+
type: z.ZodLiteral<"search">;
|
|
4526
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4527
|
+
background: z.ZodBoolean;
|
|
4528
|
+
childRef: z.ZodString;
|
|
4529
|
+
label: z.ZodString;
|
|
4530
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
4531
|
+
type: z.ZodLiteral<"delegation">;
|
|
4532
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4533
|
+
explanation: z.ZodOptional<z.ZodString>;
|
|
4534
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
4535
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
4536
|
+
active: "active";
|
|
4537
|
+
completed: "completed";
|
|
4538
|
+
failed: "failed";
|
|
4539
|
+
pending: "pending";
|
|
4540
|
+
}>>;
|
|
4541
|
+
step: z.ZodString;
|
|
4542
|
+
}, z.core.$strip>>;
|
|
4543
|
+
type: z.ZodLiteral<"planSteps">;
|
|
4544
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4545
|
+
kind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
4546
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
4547
|
+
type: z.ZodLiteral<"extension">;
|
|
3482
4548
|
}, z.core.$strip>], "type">;
|
|
3483
4549
|
key: z.ZodObject<{
|
|
3484
4550
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -3495,6 +4561,22 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3495
4561
|
}, z.core.$strip>;
|
|
3496
4562
|
rawType: z.ZodString;
|
|
3497
4563
|
}, z.core.$strip>>;
|
|
4564
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
4565
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4566
|
+
icon: z.ZodObject<{
|
|
4567
|
+
glyph: z.ZodString;
|
|
4568
|
+
}, z.core.$strip>;
|
|
4569
|
+
label: z.ZodObject<{
|
|
4570
|
+
completed: z.ZodString;
|
|
4571
|
+
pending: z.ZodString;
|
|
4572
|
+
}, z.core.$strip>;
|
|
4573
|
+
suppress: z.ZodOptional<z.ZodBoolean>;
|
|
4574
|
+
tint: z.ZodOptional<z.ZodObject<{
|
|
4575
|
+
dark: z.ZodString;
|
|
4576
|
+
light: z.ZodString;
|
|
4577
|
+
}, z.core.$strip>>;
|
|
4578
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4579
|
+
}, z.core.$strip>>;
|
|
3498
4580
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3499
4581
|
resultText: z.ZodOptional<z.ZodString>;
|
|
3500
4582
|
status: z.ZodEnum<{
|
|
@@ -3503,28 +4585,6 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3503
4585
|
interrupted: "interrupted";
|
|
3504
4586
|
pending: "pending";
|
|
3505
4587
|
}>;
|
|
3506
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3507
|
-
explanation: z.ZodOptional<z.ZodString>;
|
|
3508
|
-
kind: z.ZodLiteral<"turn.plan">;
|
|
3509
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3510
|
-
raw: z.ZodObject<{
|
|
3511
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3512
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3513
|
-
method: z.ZodString;
|
|
3514
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3515
|
-
}, z.core.$strip>;
|
|
3516
|
-
rawType: z.ZodString;
|
|
3517
|
-
}, z.core.$strip>>;
|
|
3518
|
-
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3519
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
3520
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
3521
|
-
active: "active";
|
|
3522
|
-
completed: "completed";
|
|
3523
|
-
failed: "failed";
|
|
3524
|
-
pending: "pending";
|
|
3525
|
-
}>>;
|
|
3526
|
-
step: z.ZodString;
|
|
3527
|
-
}, z.core.$strip>>;
|
|
3528
4588
|
}, z.core.$strip>, z.ZodObject<{
|
|
3529
4589
|
flush: z.ZodOptional<z.ZodBoolean>;
|
|
3530
4590
|
key: z.ZodObject<{
|
|
@@ -3544,7 +4604,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3544
4604
|
rawType: z.ZodString;
|
|
3545
4605
|
}, z.core.$strip>>;
|
|
3546
4606
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3547
|
-
snapshot: z.ZodOptional<z.ZodObject<{
|
|
4607
|
+
snapshot: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3548
4608
|
description: z.ZodString;
|
|
3549
4609
|
error: z.ZodOptional<z.ZodString>;
|
|
3550
4610
|
familyId: z.ZodString;
|
|
@@ -3610,13 +4670,26 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3610
4670
|
}, z.core.$strip>>;
|
|
3611
4671
|
}, z.core.$strip>>;
|
|
3612
4672
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3613
|
-
}, z.core.$strip
|
|
4673
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4674
|
+
background: z.ZodBoolean;
|
|
4675
|
+
childRef: z.ZodString;
|
|
4676
|
+
label: z.ZodString;
|
|
4677
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
4678
|
+
type: z.ZodLiteral<"delegation">;
|
|
4679
|
+
}, z.core.$strip>], "type">>;
|
|
3614
4680
|
}, z.core.$strip>, z.ZodObject<{
|
|
3615
4681
|
channel: z.ZodEnum<{
|
|
3616
|
-
|
|
3617
|
-
|
|
4682
|
+
agentMessage: "agentMessage";
|
|
4683
|
+
plan: "plan";
|
|
4684
|
+
reasoningSummary: "reasoningSummary";
|
|
4685
|
+
reasoningText: "reasoningText";
|
|
3618
4686
|
}>;
|
|
3619
|
-
|
|
4687
|
+
key: z.ZodObject<{
|
|
4688
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
4689
|
+
parentRef: z.ZodOptional<z.ZodString>;
|
|
4690
|
+
providerItemId: z.ZodOptional<z.ZodString>;
|
|
4691
|
+
}, z.core.$strip>;
|
|
4692
|
+
kind: z.ZodLiteral<"item.textDelta">;
|
|
3620
4693
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3621
4694
|
raw: z.ZodObject<{
|
|
3622
4695
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3626,27 +4699,8 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3626
4699
|
}, z.core.$strip>;
|
|
3627
4700
|
rawType: z.ZodString;
|
|
3628
4701
|
}, z.core.$strip>>;
|
|
3629
|
-
|
|
3630
|
-
streamKey: z.ZodString;
|
|
4702
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3631
4703
|
text: z.ZodString;
|
|
3632
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3633
|
-
channel: z.ZodEnum<{
|
|
3634
|
-
assistant: "assistant";
|
|
3635
|
-
reasoning: "reasoning";
|
|
3636
|
-
}>;
|
|
3637
|
-
kind: z.ZodLiteral<"message.close">;
|
|
3638
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3639
|
-
raw: z.ZodObject<{
|
|
3640
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3641
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3642
|
-
method: z.ZodString;
|
|
3643
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3644
|
-
}, z.core.$strip>;
|
|
3645
|
-
rawType: z.ZodString;
|
|
3646
|
-
}, z.core.$strip>>;
|
|
3647
|
-
parentRef: z.ZodOptional<z.ZodString>;
|
|
3648
|
-
streamKey: z.ZodOptional<z.ZodString>;
|
|
3649
|
-
text: z.ZodOptional<z.ZodString>;
|
|
3650
4704
|
}, z.core.$strip>, z.ZodObject<{
|
|
3651
4705
|
channel: z.ZodEnum<{
|
|
3652
4706
|
agentMessage: "agentMessage";
|
|
@@ -3659,7 +4713,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3659
4713
|
parentRef: z.ZodOptional<z.ZodString>;
|
|
3660
4714
|
providerItemId: z.ZodOptional<z.ZodString>;
|
|
3661
4715
|
}, z.core.$strip>;
|
|
3662
|
-
kind: z.ZodLiteral<"item.
|
|
4716
|
+
kind: z.ZodLiteral<"item.textClose">;
|
|
3663
4717
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3664
4718
|
raw: z.ZodObject<{
|
|
3665
4719
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3670,7 +4724,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3670
4724
|
rawType: z.ZodString;
|
|
3671
4725
|
}, z.core.$strip>>;
|
|
3672
4726
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3673
|
-
text: z.ZodString
|
|
4727
|
+
text: z.ZodOptional<z.ZodString>;
|
|
3674
4728
|
}, z.core.$strip>, z.ZodObject<{
|
|
3675
4729
|
channel: z.ZodEnum<{
|
|
3676
4730
|
command: "command";
|
|
@@ -3711,17 +4765,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3711
4765
|
}, z.core.$strip>>;
|
|
3712
4766
|
text: z.ZodString;
|
|
3713
4767
|
}, z.core.$strip>, z.ZodObject<{
|
|
3714
|
-
kind: z.ZodLiteral<"usage
|
|
3715
|
-
modelContextWindow: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3716
|
-
tokens: z.ZodObject<{
|
|
3717
|
-
cachedInputTokens: z.ZodNumber;
|
|
3718
|
-
inputTokens: z.ZodNumber;
|
|
3719
|
-
outputTokens: z.ZodNumber;
|
|
3720
|
-
reasoningOutputTokens: z.ZodNumber;
|
|
3721
|
-
totalTokens: z.ZodNumber;
|
|
3722
|
-
}, z.core.$strip>;
|
|
3723
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3724
|
-
kind: z.ZodLiteral<"usage.exact">;
|
|
4768
|
+
kind: z.ZodLiteral<"usage">;
|
|
3725
4769
|
last: z.ZodObject<{
|
|
3726
4770
|
cachedInputTokens: z.ZodNumber;
|
|
3727
4771
|
inputTokens: z.ZodNumber;
|
|
@@ -3745,6 +4789,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3745
4789
|
}>;
|
|
3746
4790
|
estimated: z.ZodBoolean;
|
|
3747
4791
|
kind: z.ZodLiteral<"contextWindow">;
|
|
4792
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3748
4793
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3749
4794
|
used: z.ZodNullable<z.ZodNumber>;
|
|
3750
4795
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3774,19 +4819,9 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3774
4819
|
kind: z.ZodLiteral<"thread.name">;
|
|
3775
4820
|
name: z.ZodString;
|
|
3776
4821
|
}, z.core.$strip>, z.ZodObject<{
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
active: "active";
|
|
3781
|
-
budgetLimited: "budgetLimited";
|
|
3782
|
-
complete: "complete";
|
|
3783
|
-
paused: "paused";
|
|
3784
|
-
}>;
|
|
3785
|
-
timeUsedSeconds: z.ZodNumber;
|
|
3786
|
-
tokenBudget: z.ZodNullable<z.ZodNumber>;
|
|
3787
|
-
tokensUsed: z.ZodNumber;
|
|
3788
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3789
|
-
kind: z.ZodLiteral<"thread.goalCleared">;
|
|
4822
|
+
extensionKind: z.ZodString & z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>;
|
|
4823
|
+
kind: z.ZodLiteral<"extension.state">;
|
|
4824
|
+
payload: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
3790
4825
|
}, z.core.$strip>, z.ZodObject<{
|
|
3791
4826
|
kind: z.ZodLiteral<"provider.rateLimits">;
|
|
3792
4827
|
rateLimits: z.ZodObject<{
|
|
@@ -4038,5 +5073,5 @@ declare const hostDaemonAcpLaunchSpecSchema: z.ZodObject<{
|
|
|
4038
5073
|
type HostDaemonAcpLaunchSpec = z.infer<typeof hostDaemonAcpLaunchSpecSchema>;
|
|
4039
5074
|
declare function normalizeHostDaemonAcpLaunchSpec(spec: HostDaemonAcpLaunchSpec): HostDaemonAcpLaunchSpec;
|
|
4040
5075
|
|
|
4041
|
-
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, backgroundTaskItemStatus, bashArgsSchema, bridgeRequestEnvelopeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaFileChangeSchema, deltaItemKeySchema, deltaItemShapeSchema,
|
|
4042
|
-
export type { ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BridgeExecutionOptions, BridgeJsonRpcResponse, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaFileChange, DeltaItemKey, DeltaItemShape,
|
|
5076
|
+
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_GRAMMAR_V2, THREAD_DELTA_GRAMMAR_V3, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, ZERO_TOKEN_USAGE, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, addTokenUsage, backgroundTaskItemStatus, bashArgsSchema, bridgeCapabilitiesSchema, bridgeGrammarVersionsSchema, bridgeRequestEnvelopeSchema, bridgeSteerModeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaDelegationShapeSchema, deltaExtensionShapeSchema, deltaFileChangeSchema, deltaFileReadShapeSchema, deltaItemKeySchema, deltaItemShapeSchema, deltaNoTurnFallbackSchema, deltaOutputChannelSchema, deltaPlanStepsShapeSchema, deltaPresentationSchema, deltaProgressSnapshotSchema, deltaSearchShapeSchema, deltaTextChannelSchema, dynamicToolSchema, errorEnvelopeSchema, buildBridgeToolCallContent as experimental_buildBridgeToolCallContent, experimental_defineProviderBridge, experimental_isProviderBridgeRecording, experimental_providerHealthResultSchema, experimental_providerHealthSchema, experimental_providerInstallationActionKindSchema, experimental_providerInstallationActionSchema, experimental_providerInstallationCommandSchema, experimental_providerInstallationRequirementSchema, experimental_providerInstallationRunParamsSchema, experimental_providerInstallationRunResultSchema, experimental_providerInstallationSourceSchema, experimental_providerInstallationStatusParamsSchema, experimental_providerInstallationStatusSchema, experimental_providerInstallationVerificationSchema, experimental_providerMaintenanceParamsSchema, experimental_providerUsageResultSchema, experimental_providerUsageSchema, experimental_providerUsageWindowSchema, experimental_recordProviderChildIo, extensionKindSchema, extractResultText, getRawSdkMessage, getRecordProperty, getStringProperty, hostDaemonAcpLaunchSpecSchema, initializeParamsSchema, instructionModeValues, interactionRequestPayloadSchema, isApprovalPendingInteractionPayload, isApprovalPendingInteractionResolution, isBackgroundAgentTaskType, isExtensionKind, isRecord, isSettledBackgroundTaskStatus, isStandaloneBuiltinCompactCommand, isUserQuestionPendingInteractionPayload, isUserQuestionPendingInteractionResolution, jsonRpcEnvelopeSchema, jsonValueSchema, mimeTypeFromExtension, modelListParamsSchema, normalizeHostDaemonAcpLaunchSpec, normalizeProviderCommandOutput, pendingInteractionCommandActionSchema, pendingInteractionFileSystemPermissionsSchema, pendingInteractionMacOsPermissionsSchema, pendingInteractionNetworkPermissionsSchema, pendingInteractionRequestedPermissionProfileSchema, pendingInteractionResolutionSchema, permissionEscalationValues, providerRawEventSchema, providerRecoveryKindSchema, providerRecoveryKindValues, providerRecoveryNotificationSchema, reasoningEffortsForLevels, reasoningLevelSchema, reasoningLevelValues, removeCommandMentionsFromPromptInput, runBridgeRequest, runtimePermissionScopeValues, sanitizeInheritedChildProcessEnv, sdkMessageEnvelopeSchema, shouldAutoDenyInteractiveRequest, skillsConfigureParamsSchema, textBlockSchema, threadArchiveParamsSchema, threadContextWindowUsageEnvelopeSchema, threadDeltaNotificationParamsSchema, threadDeltaSchema, threadDiscardParamsSchema, threadEventItemPresentationSchema, threadEventSearchModeSchema, threadForkParamsSchema, threadGoalClearParamsSchema, threadIdentityEnvelopeSchema, threadNameSetParamsSchema, threadResumeParamsSchema, threadStartParamsSchema, threadStopParamsSchema, threadUnarchiveParamsSchema, toNonNegativeNumber, toOptionalRecord, toOptionalString, toPositiveNumber, turnStartParamsSchema, turnSteerParamsSchema, withoutBridgeRuntimeEnv };
|
|
5077
|
+
export type { ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BridgeCapabilities, BridgeExecutionOptions, BridgeGrammarVersions, BridgeJsonRpcResponse, BridgeSteerMode, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaDelegationShape, DeltaExtensionShape, DeltaFileChange, DeltaFileReadShape, DeltaItemKey, DeltaItemShape, DeltaItemShapeType, DeltaNoTurnFallback, DeltaOutputChannel, DeltaPlanStepsShape, DeltaPresentation, DeltaProgressSnapshot, DeltaSearchShape, DeltaTextChannel, DynamicTool, ExperimentalProviderHealth, ExperimentalProviderHealthResult, ExperimentalProviderInstallationAction, ExperimentalProviderInstallationActionKind, ExperimentalProviderInstallationCommand, ExperimentalProviderInstallationRequirement, ExperimentalProviderInstallationRunParams, ExperimentalProviderInstallationRunResult, ExperimentalProviderInstallationSource, ExperimentalProviderInstallationStatus, ExperimentalProviderInstallationStatusParams, ExperimentalProviderInstallationVerification, ExperimentalProviderMaintenanceParams, ExperimentalProviderUsage, ExperimentalProviderUsageResult, ExperimentalProviderUsageWindow, ExtensionKind, HostDaemonAcpLaunchSpec, InitializeResult, InstructionMode, InteractionRequestPayload, JsonObject, JsonRpcMessage, JsonValue, ModelReasoningEffort, PendingInteractionApprovalDecision, PendingInteractionApprovalSubject, PendingInteractionCommandAction, PendingInteractionGrantablePermissionProfile, PendingInteractionGrantedPermissionProfile, PendingInteractionPayload, PendingInteractionRequestedPermissionProfile, PendingInteractionResolution, PendingInteractionUserQuestionQuestion, PermissionEscalation, PermissionMode, PreparedProviderCommandDispatch, PromptInput, ProviderBridgeContext, ProviderBridgeDefinition, ProviderBridgeEntry, ProviderErrorCategory, ProviderErrorInfo, ProviderInboundRequest, ProviderPostInitializeRequest, ProviderRateLimitState, ProviderRateLimitStatus, ProviderRateLimitWindow, ProviderRawEvent, ProviderRawEventCoverage, ProviderRawEventDescription, ProviderRecoveryKind, ProviderRecoveryNotification, ProviderRuntimeEvent, ProviderVisibilityMetadata, ReasoningLevel, RuntimePermissionPolicy, RuntimePermissionScope, ServiceTier, ThreadDelta, ThreadDeltaKind, ThreadDeltaNotificationParams, ThreadEventContextWindowUsage, ThreadEventItemPresentation, ThreadEventItemStatus, ThreadEventPlanStep, ThreadEventSearchMode, ThreadEventTokenUsageBreakdown, ThreadEventTurnStatus, ThreadEventUserContent, UserQuestionPendingInteractionPayload, UserQuestionPendingInteractionResolution, WorkflowAgentSnapshot, WorkflowAgentState, WorkflowPhaseSnapshot, WorkflowProgressSnapshot };
|