@get-bb/plugin-sdk 0.4.10 → 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/bundled-types/bb-plugin-sdk-app.d.ts +97 -3
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +165 -9
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +3314 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +1114 -371
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +6 -1
- package/bundled-types/bb-plugin-sdk.d.ts +1409 -270
- package/dist/app.js +2 -0
- package/dist/internal/host-policy.js +369 -10
- package/dist/provider-bridge-testing.js +5777 -0
- package/dist/provider-bridge.js +2697 -2083
- package/dist/testing/app.js +9 -1
- package/dist/testing/index.js +384 -27
- package/package.json +7 -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,188 +795,6 @@ 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
|
|
|
688
|
-
/**
|
|
689
|
-
* Order is load-bearing: `reasoningRank` (index) drives model-switch
|
|
690
|
-
* reconciliation. "none" (no extended thinking) sits at the bottom — only
|
|
691
|
-
* providers that expose a thinking-off variant list it (currently Cursor and
|
|
692
|
-
* Pi models whose `thinkingLevelMap` advertises `off`).
|
|
693
|
-
* "ultracode" sits between "xhigh" and "max" because its underlying effort IS
|
|
694
|
-
* xhigh (plus standing workflow orchestration) — a model without ultracode
|
|
695
|
-
* support should reconcile down to xhigh, not up to max.
|
|
696
|
-
* "ultra" is a Codex-native top tier (max effort plus automatic task
|
|
697
|
-
* delegation) exposed only by some models; it ranks above "max".
|
|
698
|
-
*/
|
|
699
|
-
declare const reasoningLevelValues: readonly ["none", "low", "medium", "high", "xhigh", "ultracode", "max", "ultra"];
|
|
700
|
-
declare const reasoningLevelSchema: z.ZodEnum<{
|
|
701
|
-
high: "high";
|
|
702
|
-
low: "low";
|
|
703
|
-
max: "max";
|
|
704
|
-
medium: "medium";
|
|
705
|
-
none: "none";
|
|
706
|
-
ultra: "ultra";
|
|
707
|
-
ultracode: "ultracode";
|
|
708
|
-
xhigh: "xhigh";
|
|
709
|
-
}>;
|
|
710
|
-
type ReasoningLevel = z.infer<typeof reasoningLevelSchema>;
|
|
711
|
-
declare const serviceTierSchema: z.ZodEnum<{
|
|
712
|
-
default: "default";
|
|
713
|
-
fast: "fast";
|
|
714
|
-
}>;
|
|
715
|
-
type ServiceTier = z.infer<typeof serviceTierSchema>;
|
|
716
|
-
/**
|
|
717
|
-
* Controls how a provider should incorporate server-owned instructions into its
|
|
718
|
-
* system prompt.
|
|
719
|
-
*
|
|
720
|
-
* - `append`: keep the provider's preset system prompt and append instructions.
|
|
721
|
-
* - `replace`: use the provided instructions as the full system prompt.
|
|
722
|
-
*/
|
|
723
|
-
declare const instructionModeValues: readonly ["append", "replace"];
|
|
724
|
-
declare const instructionModeSchema: z.ZodEnum<{
|
|
725
|
-
append: "append";
|
|
726
|
-
replace: "replace";
|
|
727
|
-
}>;
|
|
728
|
-
type InstructionMode = z.infer<typeof instructionModeSchema>;
|
|
729
|
-
declare const permissionModeSchema: z.ZodEnum<{
|
|
730
|
-
"accept-edits": "accept-edits";
|
|
731
|
-
auto: "auto";
|
|
732
|
-
full: "full";
|
|
733
|
-
}>;
|
|
734
|
-
type PermissionMode = z.infer<typeof permissionModeSchema>;
|
|
735
|
-
declare const permissionEscalationValues: readonly ["ask", "deny"];
|
|
736
|
-
declare const permissionEscalationSchema: z.ZodEnum<{
|
|
737
|
-
ask: "ask";
|
|
738
|
-
deny: "deny";
|
|
739
|
-
}>;
|
|
740
|
-
type PermissionEscalation = z.infer<typeof permissionEscalationSchema>;
|
|
741
|
-
declare const promptMentionCommandTriggerSchema: z.ZodEnum<{
|
|
742
|
-
"/": "/";
|
|
743
|
-
}>;
|
|
744
|
-
type PromptMentionCommandTrigger = z.infer<typeof promptMentionCommandTriggerSchema>;
|
|
745
|
-
declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
746
|
-
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
747
|
-
end: z.ZodNumber;
|
|
748
|
-
resource: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
749
|
-
kind: z.ZodLiteral<"thread">;
|
|
750
|
-
label: z.ZodString;
|
|
751
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
752
|
-
threadId: z.ZodString;
|
|
753
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
754
|
-
kind: z.ZodLiteral<"project">;
|
|
755
|
-
label: z.ZodString;
|
|
756
|
-
projectId: z.ZodString;
|
|
757
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
758
|
-
kind: z.ZodLiteral<"section">;
|
|
759
|
-
label: z.ZodString;
|
|
760
|
-
sectionId: z.ZodString;
|
|
761
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
762
|
-
entryKind: z.ZodEnum<{
|
|
763
|
-
directory: "directory";
|
|
764
|
-
file: "file";
|
|
765
|
-
}>;
|
|
766
|
-
kind: z.ZodLiteral<"path">;
|
|
767
|
-
label: z.ZodString;
|
|
768
|
-
path: z.ZodString;
|
|
769
|
-
source: z.ZodEnum<{
|
|
770
|
-
"thread-storage": "thread-storage";
|
|
771
|
-
workspace: "workspace";
|
|
772
|
-
}>;
|
|
773
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
774
|
-
argumentHint: z.ZodNullable<z.ZodString>;
|
|
775
|
-
kind: z.ZodLiteral<"command">;
|
|
776
|
-
label: z.ZodString;
|
|
777
|
-
name: z.ZodString;
|
|
778
|
-
origin: z.ZodEnum<{
|
|
779
|
-
builtin: "builtin";
|
|
780
|
-
project: "project";
|
|
781
|
-
user: "user";
|
|
782
|
-
}>;
|
|
783
|
-
source: z.ZodEnum<{
|
|
784
|
-
command: "command";
|
|
785
|
-
skill: "skill";
|
|
786
|
-
}>;
|
|
787
|
-
trigger: z.ZodEnum<{
|
|
788
|
-
"/": "/";
|
|
789
|
-
}>;
|
|
790
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
791
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
792
|
-
itemId: z.ZodString;
|
|
793
|
-
kind: z.ZodLiteral<"plugin">;
|
|
794
|
-
label: z.ZodString;
|
|
795
|
-
pluginId: z.ZodString;
|
|
796
|
-
}, z.core.$strip>], "kind">>;
|
|
797
|
-
start: z.ZodNumber;
|
|
798
|
-
}, z.core.$strip>>>;
|
|
799
|
-
text: z.ZodString;
|
|
800
|
-
type: z.ZodLiteral<"text">;
|
|
801
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
802
|
-
"agent-only": "agent-only";
|
|
803
|
-
}>>;
|
|
804
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
805
|
-
type: z.ZodLiteral<"image">;
|
|
806
|
-
url: z.ZodString;
|
|
807
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
808
|
-
"agent-only": "agent-only";
|
|
809
|
-
}>>;
|
|
810
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
811
|
-
path: z.ZodString;
|
|
812
|
-
type: z.ZodLiteral<"localImage">;
|
|
813
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
814
|
-
"agent-only": "agent-only";
|
|
815
|
-
}>>;
|
|
816
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
817
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
818
|
-
name: z.ZodOptional<z.ZodString>;
|
|
819
|
-
path: z.ZodString;
|
|
820
|
-
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
821
|
-
type: z.ZodLiteral<"localFile">;
|
|
822
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
823
|
-
"agent-only": "agent-only";
|
|
824
|
-
}>>;
|
|
825
|
-
}, z.core.$strip>], "type">;
|
|
826
|
-
type PromptInput = z.infer<typeof promptInputSchema>;
|
|
827
|
-
interface PromptCommandSelector {
|
|
828
|
-
trigger: PromptMentionCommandTrigger;
|
|
829
|
-
name: string;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Whether input consists solely of one selected built-in `/compact` mention.
|
|
833
|
-
* Raw matching text and project/user commands intentionally do not qualify.
|
|
834
|
-
*/
|
|
835
|
-
declare function isStandaloneBuiltinCompactCommand(input: readonly PromptInput[]): boolean;
|
|
836
|
-
declare function removeCommandMentionsFromPromptInput(input: readonly PromptInput[], selector: PromptCommandSelector): PromptInput[];
|
|
837
|
-
declare const runtimePermissionScopeValues: readonly ["workspace", "full"];
|
|
838
|
-
declare const runtimePermissionScopeSchema: z.ZodEnum<{
|
|
839
|
-
full: "full";
|
|
840
|
-
workspace: "workspace";
|
|
841
|
-
}>;
|
|
842
|
-
type RuntimePermissionScope = z.infer<typeof runtimePermissionScopeSchema>;
|
|
843
|
-
declare const runtimePermissionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
844
|
-
approvalReviewer: z.ZodLiteral<"user">;
|
|
845
|
-
permissionEscalation: z.ZodEnum<{
|
|
846
|
-
ask: "ask";
|
|
847
|
-
deny: "deny";
|
|
848
|
-
}>;
|
|
849
|
-
permissionMode: z.ZodLiteral<"accept-edits">;
|
|
850
|
-
permissionScope: z.ZodLiteral<"workspace">;
|
|
851
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
852
|
-
approvalReviewer: z.ZodLiteral<"automatic">;
|
|
853
|
-
permissionEscalation: z.ZodEnum<{
|
|
854
|
-
ask: "ask";
|
|
855
|
-
deny: "deny";
|
|
856
|
-
}>;
|
|
857
|
-
permissionMode: z.ZodLiteral<"auto">;
|
|
858
|
-
permissionScope: z.ZodLiteral<"workspace">;
|
|
859
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
-
approvalReviewer: z.ZodNull;
|
|
861
|
-
permissionEscalation: z.ZodNull;
|
|
862
|
-
permissionMode: z.ZodLiteral<"full">;
|
|
863
|
-
permissionScope: z.ZodLiteral<"full">;
|
|
864
|
-
}, z.core.$strip>], "permissionMode">;
|
|
865
|
-
type RuntimePermissionPolicy = z.infer<typeof runtimePermissionPolicySchema>;
|
|
866
|
-
|
|
867
|
-
declare const clientTurnRequestIdSchema: z.ZodString;
|
|
868
|
-
type ClientTurnRequestId = z.infer<typeof clientTurnRequestIdSchema>;
|
|
869
|
-
|
|
870
798
|
declare const threadEventItemStatusSchema: z.ZodEnum<{
|
|
871
799
|
completed: "completed";
|
|
872
800
|
failed: "failed";
|
|
@@ -992,6 +920,17 @@ declare const threadEventPlanStepSchema: z.ZodObject<{
|
|
|
992
920
|
step: z.ZodString;
|
|
993
921
|
}, z.core.$strip>;
|
|
994
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>;
|
|
995
934
|
declare const threadEventUserContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
996
935
|
text: z.ZodString;
|
|
997
936
|
type: z.ZodLiteral<"text">;
|
|
@@ -1005,28 +944,216 @@ declare const threadEventUserContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1005
944
|
path: z.ZodString;
|
|
1006
945
|
type: z.ZodLiteral<"localFile">;
|
|
1007
946
|
}, 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>;
|
|
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
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Order is load-bearing: `reasoningRank` (index) drives model-switch
|
|
972
|
+
* reconciliation. "none" (no extended thinking) sits at the bottom — only
|
|
973
|
+
* providers that expose a thinking-off variant list it (currently Cursor and
|
|
974
|
+
* Pi models whose `thinkingLevelMap` advertises `off`).
|
|
975
|
+
* "ultracode" sits between "xhigh" and "max" because its underlying effort IS
|
|
976
|
+
* xhigh (plus standing workflow orchestration) — a model without ultracode
|
|
977
|
+
* support should reconcile down to xhigh, not up to max.
|
|
978
|
+
* "ultra" is a Codex-native top tier (max effort plus automatic task
|
|
979
|
+
* delegation) exposed only by some models; it ranks above "max".
|
|
980
|
+
*/
|
|
981
|
+
declare const reasoningLevelValues: readonly ["none", "low", "medium", "high", "xhigh", "ultracode", "max", "ultra"];
|
|
982
|
+
declare const reasoningLevelSchema: z.ZodEnum<{
|
|
983
|
+
high: "high";
|
|
984
|
+
low: "low";
|
|
985
|
+
max: "max";
|
|
986
|
+
medium: "medium";
|
|
987
|
+
none: "none";
|
|
988
|
+
ultra: "ultra";
|
|
989
|
+
ultracode: "ultracode";
|
|
990
|
+
xhigh: "xhigh";
|
|
991
|
+
}>;
|
|
992
|
+
type ReasoningLevel = z.infer<typeof reasoningLevelSchema>;
|
|
993
|
+
declare const serviceTierSchema: z.ZodEnum<{
|
|
994
|
+
default: "default";
|
|
995
|
+
fast: "fast";
|
|
996
|
+
}>;
|
|
997
|
+
type ServiceTier = z.infer<typeof serviceTierSchema>;
|
|
998
|
+
/**
|
|
999
|
+
* Controls how a provider should incorporate server-owned instructions into its
|
|
1000
|
+
* system prompt.
|
|
1001
|
+
*
|
|
1002
|
+
* - `append`: keep the provider's preset system prompt and append instructions.
|
|
1003
|
+
* - `replace`: use the provided instructions as the full system prompt.
|
|
1004
|
+
*/
|
|
1005
|
+
declare const instructionModeValues: readonly ["append", "replace"];
|
|
1006
|
+
declare const instructionModeSchema: z.ZodEnum<{
|
|
1007
|
+
append: "append";
|
|
1008
|
+
replace: "replace";
|
|
1009
|
+
}>;
|
|
1010
|
+
type InstructionMode = z.infer<typeof instructionModeSchema>;
|
|
1011
|
+
declare const permissionModeSchema: z.ZodEnum<{
|
|
1012
|
+
"accept-edits": "accept-edits";
|
|
1013
|
+
auto: "auto";
|
|
1014
|
+
full: "full";
|
|
1015
|
+
}>;
|
|
1016
|
+
type PermissionMode = z.infer<typeof permissionModeSchema>;
|
|
1017
|
+
declare const permissionEscalationValues: readonly ["ask", "deny"];
|
|
1018
|
+
declare const permissionEscalationSchema: z.ZodEnum<{
|
|
1019
|
+
ask: "ask";
|
|
1020
|
+
deny: "deny";
|
|
1021
|
+
}>;
|
|
1022
|
+
type PermissionEscalation = z.infer<typeof permissionEscalationSchema>;
|
|
1023
|
+
declare const promptMentionCommandTriggerSchema: z.ZodEnum<{
|
|
1024
|
+
"/": "/";
|
|
1025
|
+
}>;
|
|
1026
|
+
type PromptMentionCommandTrigger = z.infer<typeof promptMentionCommandTriggerSchema>;
|
|
1027
|
+
declare const promptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1028
|
+
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1029
|
+
end: z.ZodNumber;
|
|
1030
|
+
resource: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1031
|
+
kind: z.ZodLiteral<"thread">;
|
|
1032
|
+
label: z.ZodString;
|
|
1033
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1034
|
+
threadId: z.ZodString;
|
|
1035
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1036
|
+
kind: z.ZodLiteral<"project">;
|
|
1037
|
+
label: z.ZodString;
|
|
1038
|
+
projectId: z.ZodString;
|
|
1039
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1040
|
+
kind: z.ZodLiteral<"section">;
|
|
1041
|
+
label: z.ZodString;
|
|
1042
|
+
sectionId: z.ZodString;
|
|
1043
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1044
|
+
entryKind: z.ZodEnum<{
|
|
1045
|
+
directory: "directory";
|
|
1046
|
+
file: "file";
|
|
1047
|
+
}>;
|
|
1048
|
+
kind: z.ZodLiteral<"path">;
|
|
1049
|
+
label: z.ZodString;
|
|
1050
|
+
path: z.ZodString;
|
|
1051
|
+
source: z.ZodEnum<{
|
|
1052
|
+
"thread-storage": "thread-storage";
|
|
1053
|
+
workspace: "workspace";
|
|
1054
|
+
}>;
|
|
1055
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1056
|
+
argumentHint: z.ZodNullable<z.ZodString>;
|
|
1057
|
+
kind: z.ZodLiteral<"command">;
|
|
1058
|
+
label: z.ZodString;
|
|
1059
|
+
name: z.ZodString;
|
|
1060
|
+
origin: z.ZodEnum<{
|
|
1061
|
+
builtin: "builtin";
|
|
1062
|
+
project: "project";
|
|
1063
|
+
user: "user";
|
|
1064
|
+
}>;
|
|
1065
|
+
source: z.ZodEnum<{
|
|
1066
|
+
command: "command";
|
|
1067
|
+
skill: "skill";
|
|
1068
|
+
}>;
|
|
1069
|
+
trigger: z.ZodEnum<{
|
|
1070
|
+
"/": "/";
|
|
1071
|
+
}>;
|
|
1072
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1073
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1074
|
+
itemId: z.ZodString;
|
|
1075
|
+
kind: z.ZodLiteral<"plugin">;
|
|
1076
|
+
label: z.ZodString;
|
|
1077
|
+
pluginId: z.ZodString;
|
|
1078
|
+
}, z.core.$strip>], "kind">>;
|
|
1079
|
+
start: z.ZodNumber;
|
|
1080
|
+
}, z.core.$strip>>>;
|
|
1081
|
+
text: z.ZodString;
|
|
1082
|
+
type: z.ZodLiteral<"text">;
|
|
1083
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
1084
|
+
"agent-only": "agent-only";
|
|
1085
|
+
}>>;
|
|
1086
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1087
|
+
type: z.ZodLiteral<"image">;
|
|
1088
|
+
url: z.ZodString;
|
|
1089
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
1090
|
+
"agent-only": "agent-only";
|
|
1091
|
+
}>>;
|
|
1092
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1093
|
+
path: z.ZodString;
|
|
1094
|
+
type: z.ZodLiteral<"localImage">;
|
|
1095
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
1096
|
+
"agent-only": "agent-only";
|
|
1097
|
+
}>>;
|
|
1098
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1099
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
path: z.ZodString;
|
|
1102
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
1103
|
+
type: z.ZodLiteral<"localFile">;
|
|
1104
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
1105
|
+
"agent-only": "agent-only";
|
|
1106
|
+
}>>;
|
|
1107
|
+
}, z.core.$strip>], "type">;
|
|
1108
|
+
type PromptInput = z.infer<typeof promptInputSchema>;
|
|
1109
|
+
interface PromptCommandSelector {
|
|
1110
|
+
trigger: PromptMentionCommandTrigger;
|
|
1111
|
+
name: string;
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Whether input consists solely of one selected built-in `/compact` mention.
|
|
1115
|
+
* Raw matching text and project/user commands intentionally do not qualify.
|
|
1116
|
+
*/
|
|
1117
|
+
declare function isStandaloneBuiltinCompactCommand(input: readonly PromptInput[]): boolean;
|
|
1118
|
+
declare function removeCommandMentionsFromPromptInput(input: readonly PromptInput[], selector: PromptCommandSelector): PromptInput[];
|
|
1119
|
+
declare const runtimePermissionScopeValues: readonly ["workspace", "full"];
|
|
1120
|
+
declare const runtimePermissionScopeSchema: z.ZodEnum<{
|
|
1121
|
+
full: "full";
|
|
1122
|
+
workspace: "workspace";
|
|
1123
|
+
}>;
|
|
1124
|
+
type RuntimePermissionScope = z.infer<typeof runtimePermissionScopeSchema>;
|
|
1125
|
+
declare const runtimePermissionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1126
|
+
approvalReviewer: z.ZodLiteral<"user">;
|
|
1127
|
+
permissionEscalation: z.ZodEnum<{
|
|
1128
|
+
ask: "ask";
|
|
1129
|
+
deny: "deny";
|
|
1130
|
+
}>;
|
|
1131
|
+
permissionMode: z.ZodLiteral<"accept-edits">;
|
|
1132
|
+
permissionScope: z.ZodLiteral<"workspace">;
|
|
1133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1134
|
+
approvalReviewer: z.ZodLiteral<"automatic">;
|
|
1135
|
+
permissionEscalation: z.ZodEnum<{
|
|
1136
|
+
ask: "ask";
|
|
1137
|
+
deny: "deny";
|
|
1138
|
+
}>;
|
|
1139
|
+
permissionMode: z.ZodLiteral<"auto">;
|
|
1140
|
+
permissionScope: z.ZodLiteral<"workspace">;
|
|
1141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1142
|
+
approvalReviewer: z.ZodNull;
|
|
1143
|
+
permissionEscalation: z.ZodNull;
|
|
1144
|
+
permissionMode: z.ZodLiteral<"full">;
|
|
1145
|
+
permissionScope: z.ZodLiteral<"full">;
|
|
1146
|
+
}, z.core.$strip>], "permissionMode">;
|
|
1147
|
+
type RuntimePermissionPolicy = z.infer<typeof runtimePermissionPolicySchema>;
|
|
1148
|
+
|
|
1149
|
+
declare const clientTurnRequestIdSchema: z.ZodString;
|
|
1150
|
+
type ClientTurnRequestId = z.infer<typeof clientTurnRequestIdSchema>;
|
|
1151
|
+
|
|
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
|
/**
|
|
@@ -1510,13 +1733,85 @@ declare const textBlockSchema: z.ZodObject<{
|
|
|
1510
1733
|
* `thread/event`.
|
|
1511
1734
|
*/
|
|
1512
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;
|
|
1513
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>;
|
|
1514
1808
|
/** Runtime → bridge `initialize` params. */
|
|
1515
1809
|
declare const initializeParamsSchema: z.ZodObject<{
|
|
1516
1810
|
client: z.ZodObject<{
|
|
1517
1811
|
name: z.ZodString;
|
|
1518
1812
|
version: z.ZodString;
|
|
1519
1813
|
}, z.core.$strip>;
|
|
1814
|
+
grammarVersions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1520
1815
|
protocolVersion: z.ZodNumber;
|
|
1521
1816
|
}, z.core.$loose>;
|
|
1522
1817
|
/** Bridge → runtime `initialize` result. */
|
|
@@ -1531,7 +1826,12 @@ declare const initializeResultSchema: z.ZodObject<{
|
|
|
1531
1826
|
none: "none";
|
|
1532
1827
|
tip: "tip";
|
|
1533
1828
|
}>>;
|
|
1829
|
+
grammarVersions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1534
1830
|
sessionRestore: z.ZodDefault<z.ZodBoolean>;
|
|
1831
|
+
steerMode: z.ZodDefault<z.ZodEnum<{
|
|
1832
|
+
inject: "inject";
|
|
1833
|
+
queue: "queue";
|
|
1834
|
+
}>>;
|
|
1535
1835
|
threadArchive: z.ZodDefault<z.ZodBoolean>;
|
|
1536
1836
|
threadGoalClear: z.ZodDefault<z.ZodBoolean>;
|
|
1537
1837
|
threadRename: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1558,6 +1858,7 @@ declare const bridgeExecutionOptionsSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1558
1858
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1559
1859
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1560
1860
|
model: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1561
1862
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1562
1863
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1563
1864
|
high: "high";
|
|
@@ -1889,6 +2190,22 @@ declare const threadStartParamsSchema: z.ZodObject<{
|
|
|
1889
2190
|
description: z.ZodString;
|
|
1890
2191
|
inputSchema: z.ZodUnknown;
|
|
1891
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>>;
|
|
1892
2209
|
}, z.core.$strip>>>;
|
|
1893
2210
|
input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1894
2211
|
mentions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1979,6 +2296,7 @@ declare const threadStartParamsSchema: z.ZodObject<{
|
|
|
1979
2296
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1980
2297
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1981
2298
|
model: z.ZodOptional<z.ZodString>;
|
|
2299
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
1982
2300
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1983
2301
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
1984
2302
|
high: "high";
|
|
@@ -2025,6 +2343,22 @@ declare const threadResumeParamsSchema: z.ZodObject<{
|
|
|
2025
2343
|
description: z.ZodString;
|
|
2026
2344
|
inputSchema: z.ZodUnknown;
|
|
2027
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>>;
|
|
2028
2362
|
}, z.core.$strip>>>;
|
|
2029
2363
|
instructionMode: z.ZodEnum<{
|
|
2030
2364
|
append: "append";
|
|
@@ -2034,6 +2368,7 @@ declare const threadResumeParamsSchema: z.ZodObject<{
|
|
|
2034
2368
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2035
2369
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2036
2370
|
model: z.ZodOptional<z.ZodString>;
|
|
2371
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
2037
2372
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2038
2373
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
2039
2374
|
high: "high";
|
|
@@ -2081,6 +2416,22 @@ declare const threadForkParamsSchema: z.ZodObject<{
|
|
|
2081
2416
|
description: z.ZodString;
|
|
2082
2417
|
inputSchema: z.ZodUnknown;
|
|
2083
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>>;
|
|
2084
2435
|
}, z.core.$strip>>>;
|
|
2085
2436
|
instructionMode: z.ZodEnum<{
|
|
2086
2437
|
append: "append";
|
|
@@ -2090,6 +2441,7 @@ declare const threadForkParamsSchema: z.ZodObject<{
|
|
|
2090
2441
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2091
2442
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2092
2443
|
model: z.ZodOptional<z.ZodString>;
|
|
2444
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
2093
2445
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2094
2446
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
2095
2447
|
high: "high";
|
|
@@ -2248,6 +2600,7 @@ declare const turnStartParamsSchema: z.ZodObject<{
|
|
|
2248
2600
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2249
2601
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2250
2602
|
model: z.ZodOptional<z.ZodString>;
|
|
2603
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
2251
2604
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2252
2605
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
2253
2606
|
high: "high";
|
|
@@ -2376,6 +2729,7 @@ declare const turnSteerParamsSchema: z.ZodObject<{
|
|
|
2376
2729
|
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2377
2730
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2378
2731
|
model: z.ZodOptional<z.ZodString>;
|
|
2732
|
+
promptMode: z.ZodOptional<z.ZodLiteral<"plan">>;
|
|
2379
2733
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2380
2734
|
reasoningLevel: z.ZodOptional<z.ZodEnum<{
|
|
2381
2735
|
high: "high";
|
|
@@ -2444,10 +2798,42 @@ declare const skillsConfigureParamsSchema: z.ZodObject<{
|
|
|
2444
2798
|
declare const BRIDGE_NOTIFICATION_METHODS: {
|
|
2445
2799
|
readonly threadIdentity: "thread/identity";
|
|
2446
2800
|
readonly sessionReplaced: "session/replaced";
|
|
2447
|
-
readonly threadOpenWork: "thread/openWork";
|
|
2448
2801
|
readonly providerRaw: "provider/raw";
|
|
2802
|
+
readonly providerRecovery: "provider/recovery";
|
|
2449
2803
|
readonly error: "error";
|
|
2450
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>;
|
|
2451
2837
|
|
|
2452
2838
|
/**
|
|
2453
2839
|
* Bridge → runtime requests: the two channels where the provider needs an
|
|
@@ -2484,6 +2870,35 @@ declare const BRIDGE_JSON_RPC_ERRORS: {
|
|
|
2484
2870
|
};
|
|
2485
2871
|
|
|
2486
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>;
|
|
2487
2902
|
/**
|
|
2488
2903
|
* Provider-native join key for an item. `providerItemId` is the provider's
|
|
2489
2904
|
* own id (a tool-call id); `channel` distinguishes provider-anonymous item
|
|
@@ -2599,6 +3014,105 @@ declare const deltaBackgroundTaskShapeSchema: z.ZodObject<{
|
|
|
2599
3014
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
2600
3015
|
}, z.core.$strip>;
|
|
2601
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>;
|
|
2602
3116
|
declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2603
3117
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
2604
3118
|
command: z.ZodString;
|
|
@@ -2638,20 +3152,131 @@ declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2638
3152
|
summary: z.ZodArray<z.ZodString>;
|
|
2639
3153
|
type: z.ZodLiteral<"reasoning">;
|
|
2640
3154
|
}, z.core.$strip>, z.ZodObject<{
|
|
2641
|
-
text: z.ZodString;
|
|
2642
|
-
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">;
|
|
2643
3238
|
}, z.core.$strip>, z.ZodObject<{
|
|
2644
|
-
|
|
2645
|
-
|
|
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">;
|
|
2646
3248
|
}, z.core.$strip>, z.ZodObject<{
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
3249
|
+
background: z.ZodBoolean;
|
|
3250
|
+
childRef: z.ZodString;
|
|
3251
|
+
label: z.ZodString;
|
|
3252
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
3253
|
+
type: z.ZodLiteral<"delegation">;
|
|
2651
3254
|
}, z.core.$strip>, z.ZodObject<{
|
|
2652
|
-
|
|
2653
|
-
|
|
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">;
|
|
2654
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<{
|
|
2655
3280
|
description: z.ZodString;
|
|
2656
3281
|
error: z.ZodOptional<z.ZodString>;
|
|
2657
3282
|
familyId: z.ZodString;
|
|
@@ -2717,16 +3342,20 @@ declare const deltaItemShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2717
3342
|
}, z.core.$strip>>;
|
|
2718
3343
|
}, z.core.$strip>>;
|
|
2719
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">;
|
|
2720
3351
|
}, z.core.$strip>], "type">;
|
|
2721
|
-
type
|
|
2722
|
-
declare const deltaMessageChannelSchema: z.ZodEnum<{
|
|
2723
|
-
assistant: "assistant";
|
|
2724
|
-
reasoning: "reasoning";
|
|
2725
|
-
}>;
|
|
2726
|
-
type DeltaMessageChannel = z.infer<typeof deltaMessageChannelSchema>;
|
|
3352
|
+
type DeltaProgressSnapshot = z.infer<typeof deltaProgressSnapshotSchema>;
|
|
2727
3353
|
/**
|
|
2728
|
-
*
|
|
2729
|
-
* `
|
|
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`.
|
|
2730
3359
|
*/
|
|
2731
3360
|
declare const deltaTextChannelSchema: z.ZodEnum<{
|
|
2732
3361
|
agentMessage: "agentMessage";
|
|
@@ -2909,6 +3538,42 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2909
3538
|
}, z.core.$strip>>;
|
|
2910
3539
|
}, z.core.$strip>>;
|
|
2911
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">;
|
|
2912
3577
|
}, z.core.$strip>], "type">;
|
|
2913
3578
|
key: z.ZodObject<{
|
|
2914
3579
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -2925,6 +3590,22 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2925
3590
|
}, z.core.$strip>;
|
|
2926
3591
|
rawType: z.ZodString;
|
|
2927
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>>;
|
|
2928
3609
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
2929
3610
|
}, z.core.$strip>, z.ZodObject<{
|
|
2930
3611
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
@@ -3048,6 +3729,42 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3048
3729
|
}, z.core.$strip>>;
|
|
3049
3730
|
}, z.core.$strip>>;
|
|
3050
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">;
|
|
3051
3768
|
}, z.core.$strip>], "type">;
|
|
3052
3769
|
key: z.ZodObject<{
|
|
3053
3770
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -3064,6 +3781,22 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3064
3781
|
}, z.core.$strip>;
|
|
3065
3782
|
rawType: z.ZodString;
|
|
3066
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>>;
|
|
3067
3800
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3068
3801
|
resultText: z.ZodOptional<z.ZodString>;
|
|
3069
3802
|
status: z.ZodEnum<{
|
|
@@ -3072,28 +3805,6 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3072
3805
|
interrupted: "interrupted";
|
|
3073
3806
|
pending: "pending";
|
|
3074
3807
|
}>;
|
|
3075
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3076
|
-
explanation: z.ZodOptional<z.ZodString>;
|
|
3077
|
-
kind: z.ZodLiteral<"turn.plan">;
|
|
3078
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3079
|
-
raw: z.ZodObject<{
|
|
3080
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3081
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3082
|
-
method: z.ZodString;
|
|
3083
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3084
|
-
}, z.core.$strip>;
|
|
3085
|
-
rawType: z.ZodString;
|
|
3086
|
-
}, z.core.$strip>>;
|
|
3087
|
-
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3088
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
3089
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
3090
|
-
active: "active";
|
|
3091
|
-
completed: "completed";
|
|
3092
|
-
failed: "failed";
|
|
3093
|
-
pending: "pending";
|
|
3094
|
-
}>>;
|
|
3095
|
-
step: z.ZodString;
|
|
3096
|
-
}, z.core.$strip>>;
|
|
3097
3808
|
}, z.core.$strip>, z.ZodObject<{
|
|
3098
3809
|
flush: z.ZodOptional<z.ZodBoolean>;
|
|
3099
3810
|
key: z.ZodObject<{
|
|
@@ -3113,7 +3824,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3113
3824
|
rawType: z.ZodString;
|
|
3114
3825
|
}, z.core.$strip>>;
|
|
3115
3826
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3116
|
-
snapshot: z.ZodOptional<z.ZodObject<{
|
|
3827
|
+
snapshot: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3117
3828
|
description: z.ZodString;
|
|
3118
3829
|
error: z.ZodOptional<z.ZodString>;
|
|
3119
3830
|
familyId: z.ZodString;
|
|
@@ -3179,13 +3890,26 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3179
3890
|
}, z.core.$strip>>;
|
|
3180
3891
|
}, z.core.$strip>>;
|
|
3181
3892
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3182
|
-
}, 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">>;
|
|
3183
3900
|
}, z.core.$strip>, z.ZodObject<{
|
|
3184
3901
|
channel: z.ZodEnum<{
|
|
3185
|
-
|
|
3186
|
-
|
|
3902
|
+
agentMessage: "agentMessage";
|
|
3903
|
+
plan: "plan";
|
|
3904
|
+
reasoningSummary: "reasoningSummary";
|
|
3905
|
+
reasoningText: "reasoningText";
|
|
3187
3906
|
}>;
|
|
3188
|
-
|
|
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">;
|
|
3189
3913
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3190
3914
|
raw: z.ZodObject<{
|
|
3191
3915
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3195,27 +3919,8 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3195
3919
|
}, z.core.$strip>;
|
|
3196
3920
|
rawType: z.ZodString;
|
|
3197
3921
|
}, z.core.$strip>>;
|
|
3198
|
-
|
|
3199
|
-
streamKey: z.ZodString;
|
|
3922
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3200
3923
|
text: z.ZodString;
|
|
3201
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3202
|
-
channel: z.ZodEnum<{
|
|
3203
|
-
assistant: "assistant";
|
|
3204
|
-
reasoning: "reasoning";
|
|
3205
|
-
}>;
|
|
3206
|
-
kind: z.ZodLiteral<"message.close">;
|
|
3207
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3208
|
-
raw: z.ZodObject<{
|
|
3209
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3210
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3211
|
-
method: z.ZodString;
|
|
3212
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3213
|
-
}, z.core.$strip>;
|
|
3214
|
-
rawType: z.ZodString;
|
|
3215
|
-
}, z.core.$strip>>;
|
|
3216
|
-
parentRef: z.ZodOptional<z.ZodString>;
|
|
3217
|
-
streamKey: z.ZodOptional<z.ZodString>;
|
|
3218
|
-
text: z.ZodOptional<z.ZodString>;
|
|
3219
3924
|
}, z.core.$strip>, z.ZodObject<{
|
|
3220
3925
|
channel: z.ZodEnum<{
|
|
3221
3926
|
agentMessage: "agentMessage";
|
|
@@ -3228,7 +3933,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3228
3933
|
parentRef: z.ZodOptional<z.ZodString>;
|
|
3229
3934
|
providerItemId: z.ZodOptional<z.ZodString>;
|
|
3230
3935
|
}, z.core.$strip>;
|
|
3231
|
-
kind: z.ZodLiteral<"item.
|
|
3936
|
+
kind: z.ZodLiteral<"item.textClose">;
|
|
3232
3937
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3233
3938
|
raw: z.ZodObject<{
|
|
3234
3939
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3239,7 +3944,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3239
3944
|
rawType: z.ZodString;
|
|
3240
3945
|
}, z.core.$strip>>;
|
|
3241
3946
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3242
|
-
text: z.ZodString
|
|
3947
|
+
text: z.ZodOptional<z.ZodString>;
|
|
3243
3948
|
}, z.core.$strip>, z.ZodObject<{
|
|
3244
3949
|
channel: z.ZodEnum<{
|
|
3245
3950
|
command: "command";
|
|
@@ -3280,17 +3985,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3280
3985
|
}, z.core.$strip>>;
|
|
3281
3986
|
text: z.ZodString;
|
|
3282
3987
|
}, z.core.$strip>, z.ZodObject<{
|
|
3283
|
-
kind: z.ZodLiteral<"usage
|
|
3284
|
-
modelContextWindow: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3285
|
-
tokens: z.ZodObject<{
|
|
3286
|
-
cachedInputTokens: z.ZodNumber;
|
|
3287
|
-
inputTokens: z.ZodNumber;
|
|
3288
|
-
outputTokens: z.ZodNumber;
|
|
3289
|
-
reasoningOutputTokens: z.ZodNumber;
|
|
3290
|
-
totalTokens: z.ZodNumber;
|
|
3291
|
-
}, z.core.$strip>;
|
|
3292
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3293
|
-
kind: z.ZodLiteral<"usage.exact">;
|
|
3988
|
+
kind: z.ZodLiteral<"usage">;
|
|
3294
3989
|
last: z.ZodObject<{
|
|
3295
3990
|
cachedInputTokens: z.ZodNumber;
|
|
3296
3991
|
inputTokens: z.ZodNumber;
|
|
@@ -3314,6 +4009,7 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3314
4009
|
}>;
|
|
3315
4010
|
estimated: z.ZodBoolean;
|
|
3316
4011
|
kind: z.ZodLiteral<"contextWindow">;
|
|
4012
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3317
4013
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3318
4014
|
used: z.ZodNullable<z.ZodNumber>;
|
|
3319
4015
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3343,19 +4039,9 @@ declare const threadDeltaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3343
4039
|
kind: z.ZodLiteral<"thread.name">;
|
|
3344
4040
|
name: z.ZodString;
|
|
3345
4041
|
}, z.core.$strip>, z.ZodObject<{
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
active: "active";
|
|
3350
|
-
budgetLimited: "budgetLimited";
|
|
3351
|
-
complete: "complete";
|
|
3352
|
-
paused: "paused";
|
|
3353
|
-
}>;
|
|
3354
|
-
timeUsedSeconds: z.ZodNumber;
|
|
3355
|
-
tokenBudget: z.ZodNullable<z.ZodNumber>;
|
|
3356
|
-
tokensUsed: z.ZodNumber;
|
|
3357
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3358
|
-
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>>;
|
|
3359
4045
|
}, z.core.$strip>, z.ZodObject<{
|
|
3360
4046
|
kind: z.ZodLiteral<"provider.rateLimits">;
|
|
3361
4047
|
rateLimits: z.ZodObject<{
|
|
@@ -3632,6 +4318,42 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3632
4318
|
}, z.core.$strip>>;
|
|
3633
4319
|
}, z.core.$strip>>;
|
|
3634
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">;
|
|
3635
4357
|
}, z.core.$strip>], "type">;
|
|
3636
4358
|
key: z.ZodObject<{
|
|
3637
4359
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -3648,6 +4370,22 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3648
4370
|
}, z.core.$strip>;
|
|
3649
4371
|
rawType: z.ZodString;
|
|
3650
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>>;
|
|
3651
4389
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3652
4390
|
}, z.core.$strip>, z.ZodObject<{
|
|
3653
4391
|
aggregatedOutput: z.ZodOptional<z.ZodString>;
|
|
@@ -3771,6 +4509,42 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3771
4509
|
}, z.core.$strip>>;
|
|
3772
4510
|
}, z.core.$strip>>;
|
|
3773
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">;
|
|
3774
4548
|
}, z.core.$strip>], "type">;
|
|
3775
4549
|
key: z.ZodObject<{
|
|
3776
4550
|
channel: z.ZodOptional<z.ZodString>;
|
|
@@ -3787,6 +4561,22 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3787
4561
|
}, z.core.$strip>;
|
|
3788
4562
|
rawType: z.ZodString;
|
|
3789
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>>;
|
|
3790
4580
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3791
4581
|
resultText: z.ZodOptional<z.ZodString>;
|
|
3792
4582
|
status: z.ZodEnum<{
|
|
@@ -3795,28 +4585,6 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3795
4585
|
interrupted: "interrupted";
|
|
3796
4586
|
pending: "pending";
|
|
3797
4587
|
}>;
|
|
3798
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3799
|
-
explanation: z.ZodOptional<z.ZodString>;
|
|
3800
|
-
kind: z.ZodLiteral<"turn.plan">;
|
|
3801
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3802
|
-
raw: z.ZodObject<{
|
|
3803
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3804
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3805
|
-
method: z.ZodString;
|
|
3806
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3807
|
-
}, z.core.$strip>;
|
|
3808
|
-
rawType: z.ZodString;
|
|
3809
|
-
}, z.core.$strip>>;
|
|
3810
|
-
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3811
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
3812
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
3813
|
-
active: "active";
|
|
3814
|
-
completed: "completed";
|
|
3815
|
-
failed: "failed";
|
|
3816
|
-
pending: "pending";
|
|
3817
|
-
}>>;
|
|
3818
|
-
step: z.ZodString;
|
|
3819
|
-
}, z.core.$strip>>;
|
|
3820
4588
|
}, z.core.$strip>, z.ZodObject<{
|
|
3821
4589
|
flush: z.ZodOptional<z.ZodBoolean>;
|
|
3822
4590
|
key: z.ZodObject<{
|
|
@@ -3836,7 +4604,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3836
4604
|
rawType: z.ZodString;
|
|
3837
4605
|
}, z.core.$strip>>;
|
|
3838
4606
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3839
|
-
snapshot: z.ZodOptional<z.ZodObject<{
|
|
4607
|
+
snapshot: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3840
4608
|
description: z.ZodString;
|
|
3841
4609
|
error: z.ZodOptional<z.ZodString>;
|
|
3842
4610
|
familyId: z.ZodString;
|
|
@@ -3902,13 +4670,26 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3902
4670
|
}, z.core.$strip>>;
|
|
3903
4671
|
}, z.core.$strip>>;
|
|
3904
4672
|
workflowName: z.ZodOptional<z.ZodString>;
|
|
3905
|
-
}, 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">>;
|
|
3906
4680
|
}, z.core.$strip>, z.ZodObject<{
|
|
3907
4681
|
channel: z.ZodEnum<{
|
|
3908
|
-
|
|
3909
|
-
|
|
4682
|
+
agentMessage: "agentMessage";
|
|
4683
|
+
plan: "plan";
|
|
4684
|
+
reasoningSummary: "reasoningSummary";
|
|
4685
|
+
reasoningText: "reasoningText";
|
|
3910
4686
|
}>;
|
|
3911
|
-
|
|
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">;
|
|
3912
4693
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3913
4694
|
raw: z.ZodObject<{
|
|
3914
4695
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3918,27 +4699,8 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3918
4699
|
}, z.core.$strip>;
|
|
3919
4700
|
rawType: z.ZodString;
|
|
3920
4701
|
}, z.core.$strip>>;
|
|
3921
|
-
|
|
3922
|
-
streamKey: z.ZodString;
|
|
4702
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3923
4703
|
text: z.ZodString;
|
|
3924
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
3925
|
-
channel: z.ZodEnum<{
|
|
3926
|
-
assistant: "assistant";
|
|
3927
|
-
reasoning: "reasoning";
|
|
3928
|
-
}>;
|
|
3929
|
-
kind: z.ZodLiteral<"message.close">;
|
|
3930
|
-
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3931
|
-
raw: z.ZodObject<{
|
|
3932
|
-
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
3933
|
-
jsonrpc: z.ZodLiteral<"2.0">;
|
|
3934
|
-
method: z.ZodString;
|
|
3935
|
-
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
3936
|
-
}, z.core.$strip>;
|
|
3937
|
-
rawType: z.ZodString;
|
|
3938
|
-
}, z.core.$strip>>;
|
|
3939
|
-
parentRef: z.ZodOptional<z.ZodString>;
|
|
3940
|
-
streamKey: z.ZodOptional<z.ZodString>;
|
|
3941
|
-
text: z.ZodOptional<z.ZodString>;
|
|
3942
4704
|
}, z.core.$strip>, z.ZodObject<{
|
|
3943
4705
|
channel: z.ZodEnum<{
|
|
3944
4706
|
agentMessage: "agentMessage";
|
|
@@ -3951,7 +4713,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3951
4713
|
parentRef: z.ZodOptional<z.ZodString>;
|
|
3952
4714
|
providerItemId: z.ZodOptional<z.ZodString>;
|
|
3953
4715
|
}, z.core.$strip>;
|
|
3954
|
-
kind: z.ZodLiteral<"item.
|
|
4716
|
+
kind: z.ZodLiteral<"item.textClose">;
|
|
3955
4717
|
noTurnFallback: z.ZodOptional<z.ZodObject<{
|
|
3956
4718
|
raw: z.ZodObject<{
|
|
3957
4719
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
@@ -3962,7 +4724,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
3962
4724
|
rawType: z.ZodString;
|
|
3963
4725
|
}, z.core.$strip>>;
|
|
3964
4726
|
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
3965
|
-
text: z.ZodString
|
|
4727
|
+
text: z.ZodOptional<z.ZodString>;
|
|
3966
4728
|
}, z.core.$strip>, z.ZodObject<{
|
|
3967
4729
|
channel: z.ZodEnum<{
|
|
3968
4730
|
command: "command";
|
|
@@ -4003,17 +4765,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
4003
4765
|
}, z.core.$strip>>;
|
|
4004
4766
|
text: z.ZodString;
|
|
4005
4767
|
}, z.core.$strip>, z.ZodObject<{
|
|
4006
|
-
kind: z.ZodLiteral<"usage
|
|
4007
|
-
modelContextWindow: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4008
|
-
tokens: z.ZodObject<{
|
|
4009
|
-
cachedInputTokens: z.ZodNumber;
|
|
4010
|
-
inputTokens: z.ZodNumber;
|
|
4011
|
-
outputTokens: z.ZodNumber;
|
|
4012
|
-
reasoningOutputTokens: z.ZodNumber;
|
|
4013
|
-
totalTokens: z.ZodNumber;
|
|
4014
|
-
}, z.core.$strip>;
|
|
4015
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4016
|
-
kind: z.ZodLiteral<"usage.exact">;
|
|
4768
|
+
kind: z.ZodLiteral<"usage">;
|
|
4017
4769
|
last: z.ZodObject<{
|
|
4018
4770
|
cachedInputTokens: z.ZodNumber;
|
|
4019
4771
|
inputTokens: z.ZodNumber;
|
|
@@ -4037,6 +4789,7 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
4037
4789
|
}>;
|
|
4038
4790
|
estimated: z.ZodBoolean;
|
|
4039
4791
|
kind: z.ZodLiteral<"contextWindow">;
|
|
4792
|
+
providerTurnId: z.ZodOptional<z.ZodString>;
|
|
4040
4793
|
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4041
4794
|
used: z.ZodNullable<z.ZodNumber>;
|
|
4042
4795
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -4066,19 +4819,9 @@ declare const threadDeltaNotificationParamsSchema: z.ZodObject<{
|
|
|
4066
4819
|
kind: z.ZodLiteral<"thread.name">;
|
|
4067
4820
|
name: z.ZodString;
|
|
4068
4821
|
}, z.core.$strip>, z.ZodObject<{
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
active: "active";
|
|
4073
|
-
budgetLimited: "budgetLimited";
|
|
4074
|
-
complete: "complete";
|
|
4075
|
-
paused: "paused";
|
|
4076
|
-
}>;
|
|
4077
|
-
timeUsedSeconds: z.ZodNumber;
|
|
4078
|
-
tokenBudget: z.ZodNullable<z.ZodNumber>;
|
|
4079
|
-
tokensUsed: z.ZodNumber;
|
|
4080
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4081
|
-
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>>;
|
|
4082
4825
|
}, z.core.$strip>, z.ZodObject<{
|
|
4083
4826
|
kind: z.ZodLiteral<"provider.rateLimits">;
|
|
4084
4827
|
rateLimits: z.ZodObject<{
|
|
@@ -4330,5 +5073,5 @@ declare const hostDaemonAcpLaunchSpecSchema: z.ZodObject<{
|
|
|
4330
5073
|
type HostDaemonAcpLaunchSpec = z.infer<typeof hostDaemonAcpLaunchSpecSchema>;
|
|
4331
5074
|
declare function normalizeHostDaemonAcpLaunchSpec(spec: HostDaemonAcpLaunchSpec): HostDaemonAcpLaunchSpec;
|
|
4332
5075
|
|
|
4333
|
-
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,
|
|
4334
|
-
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 };
|