@roll-agent/relay-protocol 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +4 -0
  2. package/dist/control.d.ts +31 -0
  3. package/dist/control.js +6 -0
  4. package/dist/index.d.ts +1893 -2
  5. package/dist/index.js +92 -2
  6. package/dist/schema/roll-relay-protocol-v1.3.schema.json +4606 -0
  7. package/fixtures/v1.3/invalid-approval-projection-raw-input-leak.json +19 -0
  8. package/fixtures/v1.3/invalid-authentication-local-only.json +12 -0
  9. package/fixtures/v1.3/invalid-context-recovery-notes.json +22 -0
  10. package/fixtures/v1.3/invalid-file-picker-local-only.json +12 -0
  11. package/fixtures/v1.3/invalid-interaction-cancelled-reason-leak.json +10 -0
  12. package/fixtures/v1.3/invalid-interaction-resolved-result-leak.json +18 -0
  13. package/fixtures/v1.3/invalid-legacy-approval-candidate.json +7 -0
  14. package/fixtures/v1.3/invalid-legacy-approval-respond.json +7 -0
  15. package/fixtures/v1.3/invalid-n-minus-one-device-connect.json +6 -0
  16. package/fixtures/v1.3/invalid-non-normal-sensitivity.json +21 -0
  17. package/fixtures/v1.3/invalid-runtime-event-tool-input-leak.json +22 -0
  18. package/fixtures/v1.3/invalid-runtime-event-tool-output-leak.json +21 -0
  19. package/fixtures/v1.3/invalid-user-input-projection-secret-leak.json +22 -0
  20. package/fixtures/v1.3/manifest.json +489 -0
  21. package/fixtures/v1.3/valid-context-recovery.json +21 -0
  22. package/fixtures/v1.3/valid-device-connect.json +6 -0
  23. package/fixtures/v1.3/valid-interaction-cancelled.json +9 -0
  24. package/fixtures/v1.3/valid-interaction-candidate-user-input.json +25 -0
  25. package/fixtures/v1.3/valid-interaction-request-approval.json +17 -0
  26. package/fixtures/v1.3/valid-interaction-request-user-input.json +40 -0
  27. package/fixtures/v1.3/valid-interaction-resolved.json +9 -0
  28. package/fixtures/v1.3/valid-runtime-ack.json +5 -0
  29. package/fixtures/v1.3/valid-runtime-encrypted-interaction.json +10 -0
  30. package/fixtures/v1.3/valid-runtime-event-runtime-n-minus-one.json +16 -0
  31. package/fixtures/v1.3/valid-runtime-event.json +16 -0
  32. package/fixtures/v1.3/valid-runtime-gap.json +7 -0
  33. package/fixtures/v1.3/valid-runtime-request.json +10 -0
  34. package/fixtures/v1.3/valid-runtime-response.json +8 -0
  35. package/package.json +4 -3
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { operationGetResultSchema, type JsonValue, type ThreadSnapshotV11 } from "@roll-agent/protocol";
2
2
  import { z } from "zod/v4";
3
- export declare const SUPPORTED_RELAY_PROTOCOL_VERSIONS: readonly ["1.2", "1.1", "1.0"];
3
+ export declare const SUPPORTED_RELAY_PROTOCOL_VERSIONS: readonly ["1.3", "1.2", "1.1", "1.0"];
4
4
  export type RelayProtocolVersion = (typeof SUPPORTED_RELAY_PROTOCOL_VERSIONS)[number];
5
- export declare const LATEST_RELAY_PROTOCOL_VERSION: "1.2";
5
+ export declare const LATEST_RELAY_PROTOCOL_VERSION: "1.3";
6
6
  /** @deprecated Legacy generic Relay exports remain pinned to Wire 1.0. */
7
7
  export declare const RELAY_PROTOCOL_VERSION: "1.0";
8
8
  /** @deprecated The one-argument Companion connection API remains pinned to Wire 1.0. */
@@ -215,6 +215,7 @@ export declare const relayProtocolVersionSchema: z.ZodEnum<{
215
215
  1.1: "1.1";
216
216
  "1.0": "1.0";
217
217
  1.2: "1.2";
218
+ 1.3: "1.3";
218
219
  }>;
219
220
  export declare const deviceIdSchema: z.core.$ZodBranded<z.ZodString, "DeviceId">;
220
221
  export declare const workspaceIdSchema: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
@@ -4718,7 +4719,1897 @@ export declare function projectRelayOperationGetResultV12(value: unknown): z.out
4718
4719
  export declare function projectRuntimeEventEnvelopeForRelayV12(value: unknown): RelayRuntimeEventEnvelopeV12 | undefined;
4719
4720
  /** Downgrade before delivery to a 1.1 browser; never leaks new descriptor fields. */
4720
4721
  export declare function projectRelayMessageV12ToV11(message: RelayMessageV12): RelayMessageV11;
4722
+ /** Wire 1.3 carries bounded context recovery state; older wire contracts stay frozen. */
4723
+ export declare const relayThreadSnapshotSchemaV13: z.ZodReadonly<z.ZodObject<{
4724
+ thread: z.ZodReadonly<z.ZodObject<{
4725
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
4726
+ title: z.ZodOptional<z.ZodString>;
4727
+ model: z.ZodOptional<z.ZodString>;
4728
+ createdAt: z.ZodString;
4729
+ updatedAt: z.ZodString;
4730
+ messageCount: z.ZodNumber;
4731
+ }, z.core.$strict>>;
4732
+ messages: z.ZodReadonly<z.ZodObject<{
4733
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4734
+ sequence: z.ZodNumber;
4735
+ role: z.ZodEnum<{
4736
+ user: "user";
4737
+ assistant: "assistant";
4738
+ }>;
4739
+ createdAt: z.ZodString;
4740
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4741
+ type: z.ZodLiteral<"text">;
4742
+ text: z.ZodString;
4743
+ }, z.core.$strict>>>;
4744
+ }, z.core.$strict>>>;
4745
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
4746
+ }, z.core.$strict>>;
4747
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
4748
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
4749
+ status: z.ZodEnum<{
4750
+ running: "running";
4751
+ cancelling: "cancelling";
4752
+ }>;
4753
+ startedAt: z.ZodString;
4754
+ }, z.core.$strict>>>;
4755
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4756
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
4757
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
4758
+ agentName: z.ZodString;
4759
+ toolName: z.ZodString;
4760
+ preview: z.ZodJSONSchema;
4761
+ reason: z.ZodOptional<z.ZodString>;
4762
+ }, z.core.$strict>>>;
4763
+ transcriptCompleteness: z.ZodEnum<{
4764
+ complete: "complete";
4765
+ legacy_snapshot: "legacy_snapshot";
4766
+ }>;
4767
+ operations: z.ZodReadonly<z.ZodObject<{
4768
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4769
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
4770
+ sequence: z.ZodNumber;
4771
+ toolCallId: z.ZodString;
4772
+ agentName: z.ZodString;
4773
+ toolName: z.ZodString;
4774
+ createdAt: z.ZodString;
4775
+ outcome: z.ZodReadonly<z.ZodObject<{
4776
+ kind: z.ZodEnum<{
4777
+ success: "success";
4778
+ user_rejected: "user_rejected";
4779
+ policy_denied: "policy_denied";
4780
+ invalid_input: "invalid_input";
4781
+ cancelled: "cancelled";
4782
+ tool_failed: "tool_failed";
4783
+ }>;
4784
+ reason: z.ZodOptional<z.ZodString>;
4785
+ }, z.core.$strict>>;
4786
+ display: z.ZodJSONSchema;
4787
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
4788
+ status: z.ZodLiteral<"rejected">;
4789
+ reason: z.ZodEnum<{
4790
+ credential_field: "credential_field";
4791
+ credential_value: "credential_value";
4792
+ }>;
4793
+ field: z.ZodOptional<z.ZodString>;
4794
+ }, z.core.$strict>>, z.ZodObject<{
4795
+ status: z.ZodLiteral<"available">;
4796
+ schemaId: z.ZodString;
4797
+ schemaVersion: z.ZodNumber;
4798
+ }, z.core.$strict>, z.ZodObject<{
4799
+ status: z.ZodEnum<{
4800
+ not_provided: "not_provided";
4801
+ invalid: "invalid";
4802
+ too_large: "too_large";
4803
+ expired: "expired";
4804
+ denied: "denied";
4805
+ }>;
4806
+ }, z.core.$strict>]>>>;
4807
+ }, z.core.$strict>>>;
4808
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
4809
+ }, z.core.$strict>>;
4810
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
4811
+ checkpointId: z.ZodString;
4812
+ required: z.ZodBoolean;
4813
+ unextracted: z.ZodBoolean;
4814
+ requiredItemCount: z.ZodNumber;
4815
+ }, z.core.$strict>>>;
4816
+ }, z.core.$strict>>;
4817
+ export declare const relayRequestMethodSchemasV13: {
4818
+ readonly "thread.open": {
4819
+ readonly result: z.ZodReadonly<z.ZodObject<{
4820
+ thread: z.ZodReadonly<z.ZodObject<{
4821
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
4822
+ title: z.ZodOptional<z.ZodString>;
4823
+ model: z.ZodOptional<z.ZodString>;
4824
+ createdAt: z.ZodString;
4825
+ updatedAt: z.ZodString;
4826
+ messageCount: z.ZodNumber;
4827
+ }, z.core.$strict>>;
4828
+ messages: z.ZodReadonly<z.ZodObject<{
4829
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4830
+ sequence: z.ZodNumber;
4831
+ role: z.ZodEnum<{
4832
+ user: "user";
4833
+ assistant: "assistant";
4834
+ }>;
4835
+ createdAt: z.ZodString;
4836
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4837
+ type: z.ZodLiteral<"text">;
4838
+ text: z.ZodString;
4839
+ }, z.core.$strict>>>;
4840
+ }, z.core.$strict>>>;
4841
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
4842
+ }, z.core.$strict>>;
4843
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
4844
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
4845
+ status: z.ZodEnum<{
4846
+ running: "running";
4847
+ cancelling: "cancelling";
4848
+ }>;
4849
+ startedAt: z.ZodString;
4850
+ }, z.core.$strict>>>;
4851
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4852
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
4853
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
4854
+ agentName: z.ZodString;
4855
+ toolName: z.ZodString;
4856
+ preview: z.ZodJSONSchema;
4857
+ reason: z.ZodOptional<z.ZodString>;
4858
+ }, z.core.$strict>>>;
4859
+ transcriptCompleteness: z.ZodEnum<{
4860
+ complete: "complete";
4861
+ legacy_snapshot: "legacy_snapshot";
4862
+ }>;
4863
+ operations: z.ZodReadonly<z.ZodObject<{
4864
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4865
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
4866
+ sequence: z.ZodNumber;
4867
+ toolCallId: z.ZodString;
4868
+ agentName: z.ZodString;
4869
+ toolName: z.ZodString;
4870
+ createdAt: z.ZodString;
4871
+ outcome: z.ZodReadonly<z.ZodObject<{
4872
+ kind: z.ZodEnum<{
4873
+ success: "success";
4874
+ user_rejected: "user_rejected";
4875
+ policy_denied: "policy_denied";
4876
+ invalid_input: "invalid_input";
4877
+ cancelled: "cancelled";
4878
+ tool_failed: "tool_failed";
4879
+ }>;
4880
+ reason: z.ZodOptional<z.ZodString>;
4881
+ }, z.core.$strict>>;
4882
+ display: z.ZodJSONSchema;
4883
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
4884
+ status: z.ZodLiteral<"rejected">;
4885
+ reason: z.ZodEnum<{
4886
+ credential_field: "credential_field";
4887
+ credential_value: "credential_value";
4888
+ }>;
4889
+ field: z.ZodOptional<z.ZodString>;
4890
+ }, z.core.$strict>>, z.ZodObject<{
4891
+ status: z.ZodLiteral<"available">;
4892
+ schemaId: z.ZodString;
4893
+ schemaVersion: z.ZodNumber;
4894
+ }, z.core.$strict>, z.ZodObject<{
4895
+ status: z.ZodEnum<{
4896
+ not_provided: "not_provided";
4897
+ invalid: "invalid";
4898
+ too_large: "too_large";
4899
+ expired: "expired";
4900
+ denied: "denied";
4901
+ }>;
4902
+ }, z.core.$strict>]>>>;
4903
+ }, z.core.$strict>>>;
4904
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
4905
+ }, z.core.$strict>>;
4906
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
4907
+ checkpointId: z.ZodString;
4908
+ required: z.ZodBoolean;
4909
+ unextracted: z.ZodBoolean;
4910
+ requiredItemCount: z.ZodNumber;
4911
+ }, z.core.$strict>>>;
4912
+ }, z.core.$strict>>;
4913
+ readonly params: z.ZodReadonly<z.ZodObject<{
4914
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
4915
+ }, z.core.$strict>>;
4916
+ };
4917
+ readonly "thread.snapshot": {
4918
+ readonly result: z.ZodReadonly<z.ZodObject<{
4919
+ thread: z.ZodReadonly<z.ZodObject<{
4920
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
4921
+ title: z.ZodOptional<z.ZodString>;
4922
+ model: z.ZodOptional<z.ZodString>;
4923
+ createdAt: z.ZodString;
4924
+ updatedAt: z.ZodString;
4925
+ messageCount: z.ZodNumber;
4926
+ }, z.core.$strict>>;
4927
+ messages: z.ZodReadonly<z.ZodObject<{
4928
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4929
+ sequence: z.ZodNumber;
4930
+ role: z.ZodEnum<{
4931
+ user: "user";
4932
+ assistant: "assistant";
4933
+ }>;
4934
+ createdAt: z.ZodString;
4935
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4936
+ type: z.ZodLiteral<"text">;
4937
+ text: z.ZodString;
4938
+ }, z.core.$strict>>>;
4939
+ }, z.core.$strict>>>;
4940
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
4941
+ }, z.core.$strict>>;
4942
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
4943
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
4944
+ status: z.ZodEnum<{
4945
+ running: "running";
4946
+ cancelling: "cancelling";
4947
+ }>;
4948
+ startedAt: z.ZodString;
4949
+ }, z.core.$strict>>>;
4950
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4951
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
4952
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
4953
+ agentName: z.ZodString;
4954
+ toolName: z.ZodString;
4955
+ preview: z.ZodJSONSchema;
4956
+ reason: z.ZodOptional<z.ZodString>;
4957
+ }, z.core.$strict>>>;
4958
+ transcriptCompleteness: z.ZodEnum<{
4959
+ complete: "complete";
4960
+ legacy_snapshot: "legacy_snapshot";
4961
+ }>;
4962
+ operations: z.ZodReadonly<z.ZodObject<{
4963
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
4964
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
4965
+ sequence: z.ZodNumber;
4966
+ toolCallId: z.ZodString;
4967
+ agentName: z.ZodString;
4968
+ toolName: z.ZodString;
4969
+ createdAt: z.ZodString;
4970
+ outcome: z.ZodReadonly<z.ZodObject<{
4971
+ kind: z.ZodEnum<{
4972
+ success: "success";
4973
+ user_rejected: "user_rejected";
4974
+ policy_denied: "policy_denied";
4975
+ invalid_input: "invalid_input";
4976
+ cancelled: "cancelled";
4977
+ tool_failed: "tool_failed";
4978
+ }>;
4979
+ reason: z.ZodOptional<z.ZodString>;
4980
+ }, z.core.$strict>>;
4981
+ display: z.ZodJSONSchema;
4982
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
4983
+ status: z.ZodLiteral<"rejected">;
4984
+ reason: z.ZodEnum<{
4985
+ credential_field: "credential_field";
4986
+ credential_value: "credential_value";
4987
+ }>;
4988
+ field: z.ZodOptional<z.ZodString>;
4989
+ }, z.core.$strict>>, z.ZodObject<{
4990
+ status: z.ZodLiteral<"available">;
4991
+ schemaId: z.ZodString;
4992
+ schemaVersion: z.ZodNumber;
4993
+ }, z.core.$strict>, z.ZodObject<{
4994
+ status: z.ZodEnum<{
4995
+ not_provided: "not_provided";
4996
+ invalid: "invalid";
4997
+ too_large: "too_large";
4998
+ expired: "expired";
4999
+ denied: "denied";
5000
+ }>;
5001
+ }, z.core.$strict>]>>>;
5002
+ }, z.core.$strict>>>;
5003
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
5004
+ }, z.core.$strict>>;
5005
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5006
+ checkpointId: z.ZodString;
5007
+ required: z.ZodBoolean;
5008
+ unextracted: z.ZodBoolean;
5009
+ requiredItemCount: z.ZodNumber;
5010
+ }, z.core.$strict>>>;
5011
+ }, z.core.$strict>>;
5012
+ readonly params: z.ZodReadonly<z.ZodObject<{
5013
+ messageBeforeSequence: z.ZodOptional<z.ZodNumber>;
5014
+ operationBeforeSequence: z.ZodOptional<z.ZodNumber>;
5015
+ limit: z.ZodDefault<z.ZodNumber>;
5016
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5017
+ }, z.core.$strict>>;
5018
+ };
5019
+ readonly "thread.capabilities": {
5020
+ readonly params: z.ZodReadonly<z.ZodObject<{
5021
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5022
+ }, z.core.$strict>>;
5023
+ readonly result: z.ZodReadonly<z.ZodObject<{
5024
+ manifest: z.ZodJSONSchema;
5025
+ }, z.core.$strict>>;
5026
+ };
5027
+ readonly "operation.get": {
5028
+ readonly result: z.ZodReadonly<z.ZodObject<{
5029
+ operation: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5030
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
5031
+ sequence: z.ZodNumber;
5032
+ toolCallId: z.ZodString;
5033
+ agentName: z.ZodString;
5034
+ toolName: z.ZodString;
5035
+ createdAt: z.ZodString;
5036
+ outcome: z.ZodReadonly<z.ZodObject<{
5037
+ kind: z.ZodEnum<{
5038
+ success: "success";
5039
+ user_rejected: "user_rejected";
5040
+ policy_denied: "policy_denied";
5041
+ invalid_input: "invalid_input";
5042
+ cancelled: "cancelled";
5043
+ tool_failed: "tool_failed";
5044
+ }>;
5045
+ reason: z.ZodOptional<z.ZodString>;
5046
+ }, z.core.$strict>>;
5047
+ display: z.ZodJSONSchema;
5048
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5049
+ status: z.ZodLiteral<"rejected">;
5050
+ reason: z.ZodEnum<{
5051
+ credential_field: "credential_field";
5052
+ credential_value: "credential_value";
5053
+ }>;
5054
+ field: z.ZodOptional<z.ZodString>;
5055
+ }, z.core.$strict>>, z.ZodObject<{
5056
+ status: z.ZodLiteral<"available">;
5057
+ schemaId: z.ZodString;
5058
+ schemaVersion: z.ZodNumber;
5059
+ }, z.core.$strict>, z.ZodObject<{
5060
+ status: z.ZodEnum<{
5061
+ not_provided: "not_provided";
5062
+ invalid: "invalid";
5063
+ too_large: "too_large";
5064
+ expired: "expired";
5065
+ denied: "denied";
5066
+ }>;
5067
+ }, z.core.$strict>]>>>;
5068
+ }, z.core.$strict>>>;
5069
+ }, z.core.$strict>>;
5070
+ readonly params: z.ZodReadonly<z.ZodObject<{
5071
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
5072
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5073
+ }, z.core.$strict>>;
5074
+ };
5075
+ readonly "operation.result.get": {
5076
+ readonly params: z.ZodReadonly<z.ZodObject<{
5077
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
5078
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5079
+ }, z.core.$strict>>;
5080
+ readonly result: z.ZodReadonly<z.ZodObject<{
5081
+ result: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5082
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5083
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
5084
+ agentName: z.ZodString;
5085
+ toolName: z.ZodString;
5086
+ createdAt: z.ZodString;
5087
+ output: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5088
+ status: z.ZodLiteral<"rejected">;
5089
+ reason: z.ZodEnum<{
5090
+ credential_field: "credential_field";
5091
+ credential_value: "credential_value";
5092
+ }>;
5093
+ field: z.ZodOptional<z.ZodString>;
5094
+ }, z.core.$strict>>, z.ZodObject<{
5095
+ status: z.ZodLiteral<"available">;
5096
+ schemaId: z.ZodString;
5097
+ schemaVersion: z.ZodNumber;
5098
+ remoteReadable: z.ZodBoolean;
5099
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
5100
+ fallbackText: z.ZodString;
5101
+ }, z.core.$strict>, z.ZodObject<{
5102
+ status: z.ZodEnum<{
5103
+ not_provided: "not_provided";
5104
+ invalid: "invalid";
5105
+ too_large: "too_large";
5106
+ expired: "expired";
5107
+ denied: "denied";
5108
+ }>;
5109
+ }, z.core.$strict>]>>;
5110
+ }, z.core.$strict>>>;
5111
+ }, z.core.$strict>>;
5112
+ };
5113
+ readonly initialize: {
5114
+ readonly params: z.ZodReadonly<z.ZodObject<{
5115
+ protocolVersions: z.ZodArray<z.ZodString>;
5116
+ client: z.ZodReadonly<z.ZodObject<{
5117
+ name: z.ZodString;
5118
+ version: z.ZodString;
5119
+ }, z.core.$strict>>;
5120
+ }, z.core.$strict>>;
5121
+ readonly result: z.ZodReadonly<z.ZodObject<{
5122
+ limits: z.ZodReadonly<z.ZodObject<{
5123
+ maxFrameBytes: z.ZodNumber;
5124
+ maxPageSize: z.ZodNumber;
5125
+ eventReplay: z.ZodLiteral<false>;
5126
+ idempotencyCacheEntries: z.ZodNumber;
5127
+ }, z.core.$strict>>;
5128
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
5129
+ server: z.ZodReadonly<z.ZodObject<{
5130
+ runtimeVersion: z.ZodString;
5131
+ name: z.ZodString;
5132
+ version: z.ZodString;
5133
+ }, z.core.$strict>>;
5134
+ features: z.ZodArray<z.ZodEnum<{
5135
+ "thread-management": "thread-management";
5136
+ snapshots: "snapshots";
5137
+ turns: "turns";
5138
+ approvals: "approvals";
5139
+ "tool-streaming": "tool-streaming";
5140
+ "reasoning-summary": "reasoning-summary";
5141
+ "operation-projection": "operation-projection";
5142
+ "process-local-sequence": "process-local-sequence";
5143
+ }>>;
5144
+ protocolVersion: z.ZodEnum<{
5145
+ 1.1: "1.1";
5146
+ "1.0": "1.0";
5147
+ }>;
5148
+ }, z.core.$strict>>;
5149
+ };
5150
+ readonly "thread.list": {
5151
+ readonly params: z.ZodReadonly<z.ZodObject<{
5152
+ cursor: z.ZodOptional<z.ZodString>;
5153
+ limit: z.ZodDefault<z.ZodNumber>;
5154
+ }, z.core.$strict>>;
5155
+ readonly result: z.ZodReadonly<z.ZodObject<{
5156
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
5157
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5158
+ title: z.ZodOptional<z.ZodString>;
5159
+ model: z.ZodOptional<z.ZodString>;
5160
+ createdAt: z.ZodString;
5161
+ updatedAt: z.ZodString;
5162
+ messageCount: z.ZodNumber;
5163
+ }, z.core.$strict>>>;
5164
+ nextCursor: z.ZodNullable<z.ZodString>;
5165
+ }, z.core.$strict>>;
5166
+ };
5167
+ readonly "thread.create": {
5168
+ readonly params: z.ZodReadonly<z.ZodObject<{
5169
+ title: z.ZodOptional<z.ZodString>;
5170
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5171
+ }, z.core.$strict>>;
5172
+ readonly result: z.ZodReadonly<z.ZodObject<{
5173
+ thread: z.ZodReadonly<z.ZodObject<{
5174
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5175
+ title: z.ZodOptional<z.ZodString>;
5176
+ model: z.ZodOptional<z.ZodString>;
5177
+ createdAt: z.ZodString;
5178
+ updatedAt: z.ZodString;
5179
+ messageCount: z.ZodNumber;
5180
+ }, z.core.$strict>>;
5181
+ }, z.core.$strict>>;
5182
+ };
5183
+ readonly "thread.rename": {
5184
+ readonly params: z.ZodReadonly<z.ZodObject<{
5185
+ title: z.ZodString;
5186
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5187
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5188
+ }, z.core.$strict>>;
5189
+ readonly result: z.ZodReadonly<z.ZodObject<{
5190
+ thread: z.ZodReadonly<z.ZodObject<{
5191
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5192
+ title: z.ZodOptional<z.ZodString>;
5193
+ model: z.ZodOptional<z.ZodString>;
5194
+ createdAt: z.ZodString;
5195
+ updatedAt: z.ZodString;
5196
+ messageCount: z.ZodNumber;
5197
+ }, z.core.$strict>>;
5198
+ }, z.core.$strict>>;
5199
+ };
5200
+ readonly "thread.delete": {
5201
+ readonly params: z.ZodReadonly<z.ZodObject<{
5202
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5203
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5204
+ }, z.core.$strict>>;
5205
+ readonly result: z.ZodReadonly<z.ZodObject<{
5206
+ deleted: z.ZodLiteral<true>;
5207
+ }, z.core.$strict>>;
5208
+ };
5209
+ readonly "thread.detach": {
5210
+ readonly params: z.ZodReadonly<z.ZodObject<{
5211
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5212
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5213
+ }, z.core.$strict>>;
5214
+ readonly result: z.ZodReadonly<z.ZodObject<{
5215
+ detached: z.ZodBoolean;
5216
+ }, z.core.$strict>>;
5217
+ };
5218
+ readonly "turn.start": {
5219
+ readonly params: z.ZodReadonly<z.ZodObject<{
5220
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5221
+ input: z.ZodReadonly<z.ZodObject<{
5222
+ text: z.ZodString;
5223
+ }, z.core.$strict>>;
5224
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5225
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5226
+ }, z.core.$strict>>;
5227
+ readonly result: z.ZodReadonly<z.ZodObject<{
5228
+ accepted: z.ZodLiteral<true>;
5229
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5230
+ }, z.core.$strict>>;
5231
+ };
5232
+ readonly "turn.cancel": {
5233
+ readonly params: z.ZodReadonly<z.ZodObject<{
5234
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5235
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5236
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
5237
+ }, z.core.$strict>>;
5238
+ readonly result: z.ZodReadonly<z.ZodObject<{
5239
+ cancelling: z.ZodBoolean;
5240
+ }, z.core.$strict>>;
5241
+ };
5242
+ readonly "interaction.candidate": {
5243
+ readonly params: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5244
+ method: z.ZodLiteral<"approval.request">;
5245
+ candidate: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5246
+ decision: z.ZodLiteral<"approve">;
5247
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5248
+ decision: z.ZodLiteral<"reject">;
5249
+ reason: z.ZodOptional<z.ZodString>;
5250
+ }, z.core.$strict>>]>;
5251
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5252
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5253
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5254
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5255
+ method: z.ZodLiteral<"userInput.request">;
5256
+ candidate: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5257
+ status: z.ZodLiteral<"submitted">;
5258
+ values: z.ZodArray<z.ZodReadonly<z.ZodObject<{
5259
+ id: z.ZodString;
5260
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
5261
+ }, z.core.$strict>>>;
5262
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5263
+ status: z.ZodLiteral<"cancelled">;
5264
+ reason: z.ZodOptional<z.ZodString>;
5265
+ }, z.core.$strict>>]>;
5266
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5267
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5268
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5269
+ }, z.core.$strict>>]>;
5270
+ readonly result: z.ZodReadonly<z.ZodObject<{
5271
+ accepted: z.ZodLiteral<true>;
5272
+ }, z.core.$strict>>;
5273
+ };
5274
+ };
5275
+ export declare const relayRuntimeEventEnvelopeSchemaV13: z.ZodReadonly<z.ZodObject<{
5276
+ protocolVersion: z.ZodEnum<{
5277
+ 1.1: "1.1";
5278
+ "1.0": "1.0";
5279
+ }>;
5280
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
5281
+ sequence: z.ZodNumber;
5282
+ timestamp: z.ZodString;
5283
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5284
+ turnId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TurnId">>;
5285
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5286
+ type: z.ZodLiteral<"turn.started">;
5287
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5288
+ type: z.ZodLiteral<"message.started">;
5289
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5290
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5291
+ type: z.ZodLiteral<"message.delta">;
5292
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5293
+ delta: z.ZodString;
5294
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5295
+ type: z.ZodLiteral<"message.completed">;
5296
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5297
+ text: z.ZodString;
5298
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5299
+ type: z.ZodLiteral<"reasoning.summary.delta">;
5300
+ reasoningId: z.ZodString;
5301
+ delta: z.ZodString;
5302
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5303
+ type: z.ZodLiteral<"tool.started">;
5304
+ toolCallId: z.ZodString;
5305
+ agentName: z.ZodString;
5306
+ toolName: z.ZodString;
5307
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5308
+ type: z.ZodLiteral<"tool.completed">;
5309
+ toolCallId: z.ZodString;
5310
+ agentName: z.ZodString;
5311
+ toolName: z.ZodString;
5312
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5313
+ kind: z.ZodEnum<{
5314
+ success: "success";
5315
+ user_rejected: "user_rejected";
5316
+ policy_denied: "policy_denied";
5317
+ invalid_input: "invalid_input";
5318
+ cancelled: "cancelled";
5319
+ tool_failed: "tool_failed";
5320
+ }>;
5321
+ }, z.core.$strict>>>;
5322
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5323
+ type: z.ZodLiteral<"approval.required">;
5324
+ approval: z.ZodReadonly<z.ZodObject<{
5325
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5326
+ agentName: z.ZodString;
5327
+ toolName: z.ZodString;
5328
+ explanation: z.ZodOptional<z.ZodString>;
5329
+ }, z.core.$strict>>;
5330
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5331
+ type: z.ZodLiteral<"approval.resolved">;
5332
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5333
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5334
+ status: z.ZodLiteral<"resolved">;
5335
+ decision: z.ZodEnum<{
5336
+ approve: "approve";
5337
+ reject: "reject";
5338
+ }>;
5339
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5340
+ status: z.ZodLiteral<"cancelled">;
5341
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5342
+ status: z.ZodLiteral<"expired">;
5343
+ }, z.core.$strict>>]>;
5344
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5345
+ type: z.ZodLiteral<"turn.completed">;
5346
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5347
+ type: z.ZodLiteral<"turn.cancelled">;
5348
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5349
+ type: z.ZodLiteral<"turn.failed">;
5350
+ stage: z.ZodEnum<{
5351
+ bootstrap: "bootstrap";
5352
+ plan: "plan";
5353
+ execute: "execute";
5354
+ }>;
5355
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5356
+ type: z.ZodLiteral<"capabilities.changed">;
5357
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
5358
+ type: z.ZodLiteral<"tool.completed">;
5359
+ toolCallId: z.ZodString;
5360
+ agentName: z.ZodString;
5361
+ toolName: z.ZodString;
5362
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5363
+ kind: z.ZodEnum<{
5364
+ success: "success";
5365
+ user_rejected: "user_rejected";
5366
+ policy_denied: "policy_denied";
5367
+ invalid_input: "invalid_input";
5368
+ cancelled: "cancelled";
5369
+ tool_failed: "tool_failed";
5370
+ }>;
5371
+ }, z.core.$strict>>>;
5372
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5373
+ status: z.ZodLiteral<"rejected">;
5374
+ reason: z.ZodEnum<{
5375
+ credential_field: "credential_field";
5376
+ credential_value: "credential_value";
5377
+ }>;
5378
+ field: z.ZodOptional<z.ZodString>;
5379
+ }, z.core.$strict>>, z.ZodObject<{
5380
+ status: z.ZodLiteral<"available">;
5381
+ schemaId: z.ZodString;
5382
+ schemaVersion: z.ZodNumber;
5383
+ }, z.core.$strict>, z.ZodObject<{
5384
+ status: z.ZodEnum<{
5385
+ not_provided: "not_provided";
5386
+ invalid: "invalid";
5387
+ too_large: "too_large";
5388
+ expired: "expired";
5389
+ denied: "denied";
5390
+ }>;
5391
+ }, z.core.$strict>]>>>;
5392
+ operationId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OperationId">>;
5393
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5394
+ type: z.ZodLiteral<"context.recovery.changed">;
5395
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5396
+ checkpointId: z.ZodString;
5397
+ required: z.ZodBoolean;
5398
+ unextracted: z.ZodBoolean;
5399
+ requiredItemCount: z.ZodNumber;
5400
+ }, z.core.$strict>>>;
5401
+ }, z.core.$strict>>]>;
5402
+ }, z.core.$strict>>;
5403
+ export declare const relayDeviceConnectSchemaV13: z.ZodReadonly<z.ZodObject<{
5404
+ type: z.ZodLiteral<"device.connect">;
5405
+ deviceId: z.core.$ZodBranded<z.ZodString, "DeviceId">;
5406
+ pairingToken: z.ZodString;
5407
+ protocolVersion: z.ZodLiteral<"1.3">;
5408
+ }, z.core.$strict>>;
5409
+ export declare const relayRuntimeEventSchemaV13: z.ZodReadonly<z.ZodObject<{
5410
+ type: z.ZodLiteral<"runtime.event">;
5411
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5412
+ relaySequence: z.ZodNumber;
5413
+ event: z.ZodReadonly<z.ZodObject<{
5414
+ protocolVersion: z.ZodEnum<{
5415
+ 1.1: "1.1";
5416
+ "1.0": "1.0";
5417
+ }>;
5418
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
5419
+ sequence: z.ZodNumber;
5420
+ timestamp: z.ZodString;
5421
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5422
+ turnId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TurnId">>;
5423
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5424
+ type: z.ZodLiteral<"turn.started">;
5425
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5426
+ type: z.ZodLiteral<"message.started">;
5427
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5428
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5429
+ type: z.ZodLiteral<"message.delta">;
5430
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5431
+ delta: z.ZodString;
5432
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5433
+ type: z.ZodLiteral<"message.completed">;
5434
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5435
+ text: z.ZodString;
5436
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5437
+ type: z.ZodLiteral<"reasoning.summary.delta">;
5438
+ reasoningId: z.ZodString;
5439
+ delta: z.ZodString;
5440
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5441
+ type: z.ZodLiteral<"tool.started">;
5442
+ toolCallId: z.ZodString;
5443
+ agentName: z.ZodString;
5444
+ toolName: z.ZodString;
5445
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5446
+ type: z.ZodLiteral<"tool.completed">;
5447
+ toolCallId: z.ZodString;
5448
+ agentName: z.ZodString;
5449
+ toolName: z.ZodString;
5450
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5451
+ kind: z.ZodEnum<{
5452
+ success: "success";
5453
+ user_rejected: "user_rejected";
5454
+ policy_denied: "policy_denied";
5455
+ invalid_input: "invalid_input";
5456
+ cancelled: "cancelled";
5457
+ tool_failed: "tool_failed";
5458
+ }>;
5459
+ }, z.core.$strict>>>;
5460
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5461
+ type: z.ZodLiteral<"approval.required">;
5462
+ approval: z.ZodReadonly<z.ZodObject<{
5463
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5464
+ agentName: z.ZodString;
5465
+ toolName: z.ZodString;
5466
+ explanation: z.ZodOptional<z.ZodString>;
5467
+ }, z.core.$strict>>;
5468
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5469
+ type: z.ZodLiteral<"approval.resolved">;
5470
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5471
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5472
+ status: z.ZodLiteral<"resolved">;
5473
+ decision: z.ZodEnum<{
5474
+ approve: "approve";
5475
+ reject: "reject";
5476
+ }>;
5477
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5478
+ status: z.ZodLiteral<"cancelled">;
5479
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5480
+ status: z.ZodLiteral<"expired">;
5481
+ }, z.core.$strict>>]>;
5482
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5483
+ type: z.ZodLiteral<"turn.completed">;
5484
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5485
+ type: z.ZodLiteral<"turn.cancelled">;
5486
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5487
+ type: z.ZodLiteral<"turn.failed">;
5488
+ stage: z.ZodEnum<{
5489
+ bootstrap: "bootstrap";
5490
+ plan: "plan";
5491
+ execute: "execute";
5492
+ }>;
5493
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5494
+ type: z.ZodLiteral<"capabilities.changed">;
5495
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
5496
+ type: z.ZodLiteral<"tool.completed">;
5497
+ toolCallId: z.ZodString;
5498
+ agentName: z.ZodString;
5499
+ toolName: z.ZodString;
5500
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5501
+ kind: z.ZodEnum<{
5502
+ success: "success";
5503
+ user_rejected: "user_rejected";
5504
+ policy_denied: "policy_denied";
5505
+ invalid_input: "invalid_input";
5506
+ cancelled: "cancelled";
5507
+ tool_failed: "tool_failed";
5508
+ }>;
5509
+ }, z.core.$strict>>>;
5510
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5511
+ status: z.ZodLiteral<"rejected">;
5512
+ reason: z.ZodEnum<{
5513
+ credential_field: "credential_field";
5514
+ credential_value: "credential_value";
5515
+ }>;
5516
+ field: z.ZodOptional<z.ZodString>;
5517
+ }, z.core.$strict>>, z.ZodObject<{
5518
+ status: z.ZodLiteral<"available">;
5519
+ schemaId: z.ZodString;
5520
+ schemaVersion: z.ZodNumber;
5521
+ }, z.core.$strict>, z.ZodObject<{
5522
+ status: z.ZodEnum<{
5523
+ not_provided: "not_provided";
5524
+ invalid: "invalid";
5525
+ too_large: "too_large";
5526
+ expired: "expired";
5527
+ denied: "denied";
5528
+ }>;
5529
+ }, z.core.$strict>]>>>;
5530
+ operationId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OperationId">>;
5531
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5532
+ type: z.ZodLiteral<"context.recovery.changed">;
5533
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5534
+ checkpointId: z.ZodString;
5535
+ required: z.ZodBoolean;
5536
+ unextracted: z.ZodBoolean;
5537
+ requiredItemCount: z.ZodNumber;
5538
+ }, z.core.$strict>>>;
5539
+ }, z.core.$strict>>]>;
5540
+ }, z.core.$strict>>;
5541
+ }, z.core.$strict>>;
5542
+ export declare const relayMessageSchemaV13: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5543
+ type: z.ZodLiteral<"device.connect">;
5544
+ deviceId: z.core.$ZodBranded<z.ZodString, "DeviceId">;
5545
+ pairingToken: z.ZodString;
5546
+ protocolVersion: z.ZodLiteral<"1.3">;
5547
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5548
+ type: z.ZodLiteral<"runtime.request">;
5549
+ requestId: z.core.$ZodBranded<z.ZodString, "RelayRequestId">;
5550
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5551
+ params: z.ZodJSONSchema;
5552
+ method: z.ZodEnum<{
5553
+ "operation.result.get": "operation.result.get";
5554
+ initialize: "initialize";
5555
+ "thread.list": "thread.list";
5556
+ "thread.create": "thread.create";
5557
+ "thread.open": "thread.open";
5558
+ "thread.snapshot": "thread.snapshot";
5559
+ "thread.rename": "thread.rename";
5560
+ "thread.delete": "thread.delete";
5561
+ "thread.detach": "thread.detach";
5562
+ "thread.capabilities": "thread.capabilities";
5563
+ "turn.start": "turn.start";
5564
+ "turn.cancel": "turn.cancel";
5565
+ "operation.get": "operation.get";
5566
+ "interaction.candidate": "interaction.candidate";
5567
+ }>;
5568
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5569
+ type: z.ZodLiteral<"runtime.response">;
5570
+ requestId: z.core.$ZodBranded<z.ZodString, "RelayRequestId">;
5571
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5572
+ result: z.ZodOptional<z.ZodJSONSchema>;
5573
+ error: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5574
+ code: z.ZodString;
5575
+ message: z.ZodString;
5576
+ retryable: z.ZodBoolean;
5577
+ }, z.core.$strict>>>;
5578
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5579
+ type: z.ZodLiteral<"runtime.event">;
5580
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5581
+ relaySequence: z.ZodNumber;
5582
+ event: z.ZodReadonly<z.ZodObject<{
5583
+ protocolVersion: z.ZodEnum<{
5584
+ 1.1: "1.1";
5585
+ "1.0": "1.0";
5586
+ }>;
5587
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
5588
+ sequence: z.ZodNumber;
5589
+ timestamp: z.ZodString;
5590
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5591
+ turnId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TurnId">>;
5592
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5593
+ type: z.ZodLiteral<"turn.started">;
5594
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5595
+ type: z.ZodLiteral<"message.started">;
5596
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5597
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5598
+ type: z.ZodLiteral<"message.delta">;
5599
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5600
+ delta: z.ZodString;
5601
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5602
+ type: z.ZodLiteral<"message.completed">;
5603
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5604
+ text: z.ZodString;
5605
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5606
+ type: z.ZodLiteral<"reasoning.summary.delta">;
5607
+ reasoningId: z.ZodString;
5608
+ delta: z.ZodString;
5609
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5610
+ type: z.ZodLiteral<"tool.started">;
5611
+ toolCallId: z.ZodString;
5612
+ agentName: z.ZodString;
5613
+ toolName: z.ZodString;
5614
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5615
+ type: z.ZodLiteral<"tool.completed">;
5616
+ toolCallId: z.ZodString;
5617
+ agentName: z.ZodString;
5618
+ toolName: z.ZodString;
5619
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5620
+ kind: z.ZodEnum<{
5621
+ success: "success";
5622
+ user_rejected: "user_rejected";
5623
+ policy_denied: "policy_denied";
5624
+ invalid_input: "invalid_input";
5625
+ cancelled: "cancelled";
5626
+ tool_failed: "tool_failed";
5627
+ }>;
5628
+ }, z.core.$strict>>>;
5629
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5630
+ type: z.ZodLiteral<"approval.required">;
5631
+ approval: z.ZodReadonly<z.ZodObject<{
5632
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5633
+ agentName: z.ZodString;
5634
+ toolName: z.ZodString;
5635
+ explanation: z.ZodOptional<z.ZodString>;
5636
+ }, z.core.$strict>>;
5637
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5638
+ type: z.ZodLiteral<"approval.resolved">;
5639
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5640
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5641
+ status: z.ZodLiteral<"resolved">;
5642
+ decision: z.ZodEnum<{
5643
+ approve: "approve";
5644
+ reject: "reject";
5645
+ }>;
5646
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5647
+ status: z.ZodLiteral<"cancelled">;
5648
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5649
+ status: z.ZodLiteral<"expired">;
5650
+ }, z.core.$strict>>]>;
5651
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5652
+ type: z.ZodLiteral<"turn.completed">;
5653
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5654
+ type: z.ZodLiteral<"turn.cancelled">;
5655
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5656
+ type: z.ZodLiteral<"turn.failed">;
5657
+ stage: z.ZodEnum<{
5658
+ bootstrap: "bootstrap";
5659
+ plan: "plan";
5660
+ execute: "execute";
5661
+ }>;
5662
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5663
+ type: z.ZodLiteral<"capabilities.changed">;
5664
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
5665
+ type: z.ZodLiteral<"tool.completed">;
5666
+ toolCallId: z.ZodString;
5667
+ agentName: z.ZodString;
5668
+ toolName: z.ZodString;
5669
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5670
+ kind: z.ZodEnum<{
5671
+ success: "success";
5672
+ user_rejected: "user_rejected";
5673
+ policy_denied: "policy_denied";
5674
+ invalid_input: "invalid_input";
5675
+ cancelled: "cancelled";
5676
+ tool_failed: "tool_failed";
5677
+ }>;
5678
+ }, z.core.$strict>>>;
5679
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5680
+ status: z.ZodLiteral<"rejected">;
5681
+ reason: z.ZodEnum<{
5682
+ credential_field: "credential_field";
5683
+ credential_value: "credential_value";
5684
+ }>;
5685
+ field: z.ZodOptional<z.ZodString>;
5686
+ }, z.core.$strict>>, z.ZodObject<{
5687
+ status: z.ZodLiteral<"available">;
5688
+ schemaId: z.ZodString;
5689
+ schemaVersion: z.ZodNumber;
5690
+ }, z.core.$strict>, z.ZodObject<{
5691
+ status: z.ZodEnum<{
5692
+ not_provided: "not_provided";
5693
+ invalid: "invalid";
5694
+ too_large: "too_large";
5695
+ expired: "expired";
5696
+ denied: "denied";
5697
+ }>;
5698
+ }, z.core.$strict>]>>>;
5699
+ operationId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OperationId">>;
5700
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5701
+ type: z.ZodLiteral<"context.recovery.changed">;
5702
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
5703
+ checkpointId: z.ZodString;
5704
+ required: z.ZodBoolean;
5705
+ unextracted: z.ZodBoolean;
5706
+ requiredItemCount: z.ZodNumber;
5707
+ }, z.core.$strict>>>;
5708
+ }, z.core.$strict>>]>;
5709
+ }, z.core.$strict>>;
5710
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5711
+ type: z.ZodLiteral<"runtime.ack">;
5712
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5713
+ throughRelaySequence: z.ZodNumber;
5714
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5715
+ type: z.ZodLiteral<"runtime.gap">;
5716
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5717
+ fromRelaySequence: z.ZodNumber;
5718
+ throughRelaySequence: z.ZodNumber;
5719
+ recovery: z.ZodLiteral<"thread.snapshot">;
5720
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5721
+ type: z.ZodLiteral<"runtime.encrypted">;
5722
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5723
+ envelopeId: z.ZodString;
5724
+ payloadKind: z.ZodEnum<{
5725
+ interaction: "interaction";
5726
+ event: "event";
5727
+ request: "request";
5728
+ response: "response";
5729
+ }>;
5730
+ requestId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "RelayRequestId">>;
5731
+ relaySequence: z.ZodOptional<z.ZodNumber>;
5732
+ algorithm: z.ZodString;
5733
+ nonce: z.ZodString;
5734
+ ciphertext: z.ZodString;
5735
+ }, z.core.$strict>>, z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5736
+ method: z.ZodLiteral<"approval.request">;
5737
+ projection: z.ZodReadonly<z.ZodObject<{
5738
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5739
+ agentName: z.ZodString;
5740
+ toolName: z.ZodString;
5741
+ explanation: z.ZodOptional<z.ZodString>;
5742
+ }, z.core.$strict>>;
5743
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5744
+ relaySequence: z.ZodNumber;
5745
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5746
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5747
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5748
+ expiresAt: z.ZodString;
5749
+ sensitivity: z.ZodLiteral<"normal">;
5750
+ type: z.ZodLiteral<"interaction.request">;
5751
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5752
+ method: z.ZodLiteral<"userInput.request">;
5753
+ projection: z.ZodReadonly<z.ZodObject<{
5754
+ title: z.ZodOptional<z.ZodString>;
5755
+ description: z.ZodOptional<z.ZodString>;
5756
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5757
+ minLength: z.ZodOptional<z.ZodNumber>;
5758
+ maxLength: z.ZodOptional<z.ZodNumber>;
5759
+ id: z.ZodString;
5760
+ label: z.ZodString;
5761
+ description: z.ZodOptional<z.ZodString>;
5762
+ required: z.ZodBoolean;
5763
+ type: z.ZodLiteral<"text">;
5764
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5765
+ minLength: z.ZodOptional<z.ZodNumber>;
5766
+ maxLength: z.ZodOptional<z.ZodNumber>;
5767
+ id: z.ZodString;
5768
+ label: z.ZodString;
5769
+ description: z.ZodOptional<z.ZodString>;
5770
+ required: z.ZodBoolean;
5771
+ type: z.ZodLiteral<"multiline">;
5772
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5773
+ min: z.ZodOptional<z.ZodNumber>;
5774
+ max: z.ZodOptional<z.ZodNumber>;
5775
+ integer: z.ZodOptional<z.ZodBoolean>;
5776
+ id: z.ZodString;
5777
+ label: z.ZodString;
5778
+ description: z.ZodOptional<z.ZodString>;
5779
+ required: z.ZodBoolean;
5780
+ type: z.ZodLiteral<"number">;
5781
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5782
+ id: z.ZodString;
5783
+ label: z.ZodString;
5784
+ description: z.ZodOptional<z.ZodString>;
5785
+ required: z.ZodBoolean;
5786
+ type: z.ZodLiteral<"boolean">;
5787
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5788
+ multiple: z.ZodBoolean;
5789
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
5790
+ id: z.ZodString;
5791
+ label: z.ZodString;
5792
+ description: z.ZodOptional<z.ZodString>;
5793
+ }, z.core.$strict>>>;
5794
+ minSelections: z.ZodOptional<z.ZodNumber>;
5795
+ maxSelections: z.ZodOptional<z.ZodNumber>;
5796
+ id: z.ZodString;
5797
+ label: z.ZodString;
5798
+ description: z.ZodOptional<z.ZodString>;
5799
+ required: z.ZodBoolean;
5800
+ type: z.ZodLiteral<"choice">;
5801
+ }, z.core.$strict>>]>>;
5802
+ }, z.core.$strict>>;
5803
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5804
+ relaySequence: z.ZodNumber;
5805
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5806
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5807
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5808
+ expiresAt: z.ZodString;
5809
+ sensitivity: z.ZodLiteral<"normal">;
5810
+ type: z.ZodLiteral<"interaction.request">;
5811
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
5812
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5813
+ relaySequence: z.ZodNumber;
5814
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5815
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5816
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5817
+ method: z.ZodEnum<{
5818
+ "approval.request": "approval.request";
5819
+ "userInput.request": "userInput.request";
5820
+ }>;
5821
+ type: z.ZodLiteral<"interaction.resolved">;
5822
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5823
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5824
+ relaySequence: z.ZodNumber;
5825
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
5826
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5827
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
5828
+ method: z.ZodEnum<{
5829
+ "approval.request": "approval.request";
5830
+ "userInput.request": "userInput.request";
5831
+ }>;
5832
+ type: z.ZodLiteral<"interaction.cancelled">;
5833
+ }, z.core.$strict>>]>;
5834
+ export type RelayMessageV13 = z.output<typeof relayMessageSchemaV13>;
5835
+ export type RelayRuntimeEventV13 = z.output<typeof relayRuntimeEventSchemaV13>;
5836
+ export type RelayRuntimeEventEnvelopeV13 = z.output<typeof relayRuntimeEventEnvelopeSchemaV13>;
5837
+ export declare function projectRelayThreadSnapshotV13(value: unknown): z.output<typeof relayThreadSnapshotSchemaV13>;
5838
+ export declare function projectRuntimeEventEnvelopeForRelayV13(value: unknown): RelayRuntimeEventEnvelopeV13 | undefined;
5839
+ export declare function projectRelayMessageV13ToV12(message: RelayMessageV13): RelayMessageV12;
4721
5840
  export declare const RELAY_PROTOCOL_REGISTRY: {
5841
+ readonly "1.3": {
5842
+ readonly messageTypes: readonly ["device.connect", "runtime.request", "runtime.response", "runtime.event", "runtime.ack", "runtime.gap", "runtime.encrypted", "interaction.request", "interaction.resolved", "interaction.cancelled"];
5843
+ readonly messageSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5844
+ type: z.ZodLiteral<"device.connect">;
5845
+ deviceId: z.core.$ZodBranded<z.ZodString, "DeviceId">;
5846
+ pairingToken: z.ZodString;
5847
+ protocolVersion: z.ZodLiteral<"1.3">;
5848
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5849
+ type: z.ZodLiteral<"runtime.request">;
5850
+ requestId: z.core.$ZodBranded<z.ZodString, "RelayRequestId">;
5851
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5852
+ params: z.ZodJSONSchema;
5853
+ method: z.ZodEnum<{
5854
+ "operation.result.get": "operation.result.get";
5855
+ initialize: "initialize";
5856
+ "thread.list": "thread.list";
5857
+ "thread.create": "thread.create";
5858
+ "thread.open": "thread.open";
5859
+ "thread.snapshot": "thread.snapshot";
5860
+ "thread.rename": "thread.rename";
5861
+ "thread.delete": "thread.delete";
5862
+ "thread.detach": "thread.detach";
5863
+ "thread.capabilities": "thread.capabilities";
5864
+ "turn.start": "turn.start";
5865
+ "turn.cancel": "turn.cancel";
5866
+ "operation.get": "operation.get";
5867
+ "interaction.candidate": "interaction.candidate";
5868
+ }>;
5869
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5870
+ type: z.ZodLiteral<"runtime.response">;
5871
+ requestId: z.core.$ZodBranded<z.ZodString, "RelayRequestId">;
5872
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5873
+ result: z.ZodOptional<z.ZodJSONSchema>;
5874
+ error: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5875
+ code: z.ZodString;
5876
+ message: z.ZodString;
5877
+ retryable: z.ZodBoolean;
5878
+ }, z.core.$strict>>>;
5879
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5880
+ type: z.ZodLiteral<"runtime.event">;
5881
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
5882
+ relaySequence: z.ZodNumber;
5883
+ event: z.ZodReadonly<z.ZodObject<{
5884
+ protocolVersion: z.ZodEnum<{
5885
+ 1.1: "1.1";
5886
+ "1.0": "1.0";
5887
+ }>;
5888
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
5889
+ sequence: z.ZodNumber;
5890
+ timestamp: z.ZodString;
5891
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
5892
+ turnId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TurnId">>;
5893
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5894
+ type: z.ZodLiteral<"turn.started">;
5895
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5896
+ type: z.ZodLiteral<"message.started">;
5897
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5898
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5899
+ type: z.ZodLiteral<"message.delta">;
5900
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5901
+ delta: z.ZodString;
5902
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5903
+ type: z.ZodLiteral<"message.completed">;
5904
+ streamId: z.core.$ZodBranded<z.ZodString, "StreamId">;
5905
+ text: z.ZodString;
5906
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5907
+ type: z.ZodLiteral<"reasoning.summary.delta">;
5908
+ reasoningId: z.ZodString;
5909
+ delta: z.ZodString;
5910
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5911
+ type: z.ZodLiteral<"tool.started">;
5912
+ toolCallId: z.ZodString;
5913
+ agentName: z.ZodString;
5914
+ toolName: z.ZodString;
5915
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5916
+ type: z.ZodLiteral<"tool.completed">;
5917
+ toolCallId: z.ZodString;
5918
+ agentName: z.ZodString;
5919
+ toolName: z.ZodString;
5920
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5921
+ kind: z.ZodEnum<{
5922
+ success: "success";
5923
+ user_rejected: "user_rejected";
5924
+ policy_denied: "policy_denied";
5925
+ invalid_input: "invalid_input";
5926
+ cancelled: "cancelled";
5927
+ tool_failed: "tool_failed";
5928
+ }>;
5929
+ }, z.core.$strict>>>;
5930
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5931
+ type: z.ZodLiteral<"approval.required">;
5932
+ approval: z.ZodReadonly<z.ZodObject<{
5933
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5934
+ agentName: z.ZodString;
5935
+ toolName: z.ZodString;
5936
+ explanation: z.ZodOptional<z.ZodString>;
5937
+ }, z.core.$strict>>;
5938
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5939
+ type: z.ZodLiteral<"approval.resolved">;
5940
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
5941
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5942
+ status: z.ZodLiteral<"resolved">;
5943
+ decision: z.ZodEnum<{
5944
+ approve: "approve";
5945
+ reject: "reject";
5946
+ }>;
5947
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5948
+ status: z.ZodLiteral<"cancelled">;
5949
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5950
+ status: z.ZodLiteral<"expired">;
5951
+ }, z.core.$strict>>]>;
5952
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5953
+ type: z.ZodLiteral<"turn.completed">;
5954
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5955
+ type: z.ZodLiteral<"turn.cancelled">;
5956
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5957
+ type: z.ZodLiteral<"turn.failed">;
5958
+ stage: z.ZodEnum<{
5959
+ bootstrap: "bootstrap";
5960
+ plan: "plan";
5961
+ execute: "execute";
5962
+ }>;
5963
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
5964
+ type: z.ZodLiteral<"capabilities.changed">;
5965
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
5966
+ type: z.ZodLiteral<"tool.completed">;
5967
+ toolCallId: z.ZodString;
5968
+ agentName: z.ZodString;
5969
+ toolName: z.ZodString;
5970
+ outcome: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
5971
+ kind: z.ZodEnum<{
5972
+ success: "success";
5973
+ user_rejected: "user_rejected";
5974
+ policy_denied: "policy_denied";
5975
+ invalid_input: "invalid_input";
5976
+ cancelled: "cancelled";
5977
+ tool_failed: "tool_failed";
5978
+ }>;
5979
+ }, z.core.$strict>>>;
5980
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
5981
+ status: z.ZodLiteral<"rejected">;
5982
+ reason: z.ZodEnum<{
5983
+ credential_field: "credential_field";
5984
+ credential_value: "credential_value";
5985
+ }>;
5986
+ field: z.ZodOptional<z.ZodString>;
5987
+ }, z.core.$strict>>, z.ZodObject<{
5988
+ status: z.ZodLiteral<"available">;
5989
+ schemaId: z.ZodString;
5990
+ schemaVersion: z.ZodNumber;
5991
+ }, z.core.$strict>, z.ZodObject<{
5992
+ status: z.ZodEnum<{
5993
+ not_provided: "not_provided";
5994
+ invalid: "invalid";
5995
+ too_large: "too_large";
5996
+ expired: "expired";
5997
+ denied: "denied";
5998
+ }>;
5999
+ }, z.core.$strict>]>>>;
6000
+ operationId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "OperationId">>;
6001
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6002
+ type: z.ZodLiteral<"context.recovery.changed">;
6003
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
6004
+ checkpointId: z.ZodString;
6005
+ required: z.ZodBoolean;
6006
+ unextracted: z.ZodBoolean;
6007
+ requiredItemCount: z.ZodNumber;
6008
+ }, z.core.$strict>>>;
6009
+ }, z.core.$strict>>]>;
6010
+ }, z.core.$strict>>;
6011
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6012
+ type: z.ZodLiteral<"runtime.ack">;
6013
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6014
+ throughRelaySequence: z.ZodNumber;
6015
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6016
+ type: z.ZodLiteral<"runtime.gap">;
6017
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6018
+ fromRelaySequence: z.ZodNumber;
6019
+ throughRelaySequence: z.ZodNumber;
6020
+ recovery: z.ZodLiteral<"thread.snapshot">;
6021
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6022
+ type: z.ZodLiteral<"runtime.encrypted">;
6023
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6024
+ envelopeId: z.ZodString;
6025
+ payloadKind: z.ZodEnum<{
6026
+ interaction: "interaction";
6027
+ event: "event";
6028
+ request: "request";
6029
+ response: "response";
6030
+ }>;
6031
+ requestId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "RelayRequestId">>;
6032
+ relaySequence: z.ZodOptional<z.ZodNumber>;
6033
+ algorithm: z.ZodString;
6034
+ nonce: z.ZodString;
6035
+ ciphertext: z.ZodString;
6036
+ }, z.core.$strict>>, z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6037
+ method: z.ZodLiteral<"approval.request">;
6038
+ projection: z.ZodReadonly<z.ZodObject<{
6039
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
6040
+ agentName: z.ZodString;
6041
+ toolName: z.ZodString;
6042
+ explanation: z.ZodOptional<z.ZodString>;
6043
+ }, z.core.$strict>>;
6044
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6045
+ relaySequence: z.ZodNumber;
6046
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6047
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6048
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6049
+ expiresAt: z.ZodString;
6050
+ sensitivity: z.ZodLiteral<"normal">;
6051
+ type: z.ZodLiteral<"interaction.request">;
6052
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6053
+ method: z.ZodLiteral<"userInput.request">;
6054
+ projection: z.ZodReadonly<z.ZodObject<{
6055
+ title: z.ZodOptional<z.ZodString>;
6056
+ description: z.ZodOptional<z.ZodString>;
6057
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6058
+ minLength: z.ZodOptional<z.ZodNumber>;
6059
+ maxLength: z.ZodOptional<z.ZodNumber>;
6060
+ id: z.ZodString;
6061
+ label: z.ZodString;
6062
+ description: z.ZodOptional<z.ZodString>;
6063
+ required: z.ZodBoolean;
6064
+ type: z.ZodLiteral<"text">;
6065
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6066
+ minLength: z.ZodOptional<z.ZodNumber>;
6067
+ maxLength: z.ZodOptional<z.ZodNumber>;
6068
+ id: z.ZodString;
6069
+ label: z.ZodString;
6070
+ description: z.ZodOptional<z.ZodString>;
6071
+ required: z.ZodBoolean;
6072
+ type: z.ZodLiteral<"multiline">;
6073
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6074
+ min: z.ZodOptional<z.ZodNumber>;
6075
+ max: z.ZodOptional<z.ZodNumber>;
6076
+ integer: z.ZodOptional<z.ZodBoolean>;
6077
+ id: z.ZodString;
6078
+ label: z.ZodString;
6079
+ description: z.ZodOptional<z.ZodString>;
6080
+ required: z.ZodBoolean;
6081
+ type: z.ZodLiteral<"number">;
6082
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6083
+ id: z.ZodString;
6084
+ label: z.ZodString;
6085
+ description: z.ZodOptional<z.ZodString>;
6086
+ required: z.ZodBoolean;
6087
+ type: z.ZodLiteral<"boolean">;
6088
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6089
+ multiple: z.ZodBoolean;
6090
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6091
+ id: z.ZodString;
6092
+ label: z.ZodString;
6093
+ description: z.ZodOptional<z.ZodString>;
6094
+ }, z.core.$strict>>>;
6095
+ minSelections: z.ZodOptional<z.ZodNumber>;
6096
+ maxSelections: z.ZodOptional<z.ZodNumber>;
6097
+ id: z.ZodString;
6098
+ label: z.ZodString;
6099
+ description: z.ZodOptional<z.ZodString>;
6100
+ required: z.ZodBoolean;
6101
+ type: z.ZodLiteral<"choice">;
6102
+ }, z.core.$strict>>]>>;
6103
+ }, z.core.$strict>>;
6104
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6105
+ relaySequence: z.ZodNumber;
6106
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6107
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6108
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6109
+ expiresAt: z.ZodString;
6110
+ sensitivity: z.ZodLiteral<"normal">;
6111
+ type: z.ZodLiteral<"interaction.request">;
6112
+ }, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
6113
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6114
+ relaySequence: z.ZodNumber;
6115
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6116
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6117
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6118
+ method: z.ZodEnum<{
6119
+ "approval.request": "approval.request";
6120
+ "userInput.request": "userInput.request";
6121
+ }>;
6122
+ type: z.ZodLiteral<"interaction.resolved">;
6123
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6124
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
6125
+ relaySequence: z.ZodNumber;
6126
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6127
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6128
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6129
+ method: z.ZodEnum<{
6130
+ "approval.request": "approval.request";
6131
+ "userInput.request": "userInput.request";
6132
+ }>;
6133
+ type: z.ZodLiteral<"interaction.cancelled">;
6134
+ }, z.core.$strict>>]>;
6135
+ readonly requestMethods: readonly ["initialize", "thread.list", "thread.create", "thread.open", "thread.snapshot", "thread.rename", "thread.delete", "thread.detach", "thread.capabilities", "turn.start", "turn.cancel", "operation.get", "interaction.candidate", "operation.result.get"];
6136
+ readonly requestMethodSchemas: {
6137
+ readonly "thread.open": {
6138
+ readonly result: z.ZodReadonly<z.ZodObject<{
6139
+ thread: z.ZodReadonly<z.ZodObject<{
6140
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6141
+ title: z.ZodOptional<z.ZodString>;
6142
+ model: z.ZodOptional<z.ZodString>;
6143
+ createdAt: z.ZodString;
6144
+ updatedAt: z.ZodString;
6145
+ messageCount: z.ZodNumber;
6146
+ }, z.core.$strict>>;
6147
+ messages: z.ZodReadonly<z.ZodObject<{
6148
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6149
+ sequence: z.ZodNumber;
6150
+ role: z.ZodEnum<{
6151
+ user: "user";
6152
+ assistant: "assistant";
6153
+ }>;
6154
+ createdAt: z.ZodString;
6155
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6156
+ type: z.ZodLiteral<"text">;
6157
+ text: z.ZodString;
6158
+ }, z.core.$strict>>>;
6159
+ }, z.core.$strict>>>;
6160
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
6161
+ }, z.core.$strict>>;
6162
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
6163
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
6164
+ status: z.ZodEnum<{
6165
+ running: "running";
6166
+ cancelling: "cancelling";
6167
+ }>;
6168
+ startedAt: z.ZodString;
6169
+ }, z.core.$strict>>>;
6170
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6171
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
6172
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6173
+ agentName: z.ZodString;
6174
+ toolName: z.ZodString;
6175
+ preview: z.ZodJSONSchema;
6176
+ reason: z.ZodOptional<z.ZodString>;
6177
+ }, z.core.$strict>>>;
6178
+ transcriptCompleteness: z.ZodEnum<{
6179
+ complete: "complete";
6180
+ legacy_snapshot: "legacy_snapshot";
6181
+ }>;
6182
+ operations: z.ZodReadonly<z.ZodObject<{
6183
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6184
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
6185
+ sequence: z.ZodNumber;
6186
+ toolCallId: z.ZodString;
6187
+ agentName: z.ZodString;
6188
+ toolName: z.ZodString;
6189
+ createdAt: z.ZodString;
6190
+ outcome: z.ZodReadonly<z.ZodObject<{
6191
+ kind: z.ZodEnum<{
6192
+ success: "success";
6193
+ user_rejected: "user_rejected";
6194
+ policy_denied: "policy_denied";
6195
+ invalid_input: "invalid_input";
6196
+ cancelled: "cancelled";
6197
+ tool_failed: "tool_failed";
6198
+ }>;
6199
+ reason: z.ZodOptional<z.ZodString>;
6200
+ }, z.core.$strict>>;
6201
+ display: z.ZodJSONSchema;
6202
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6203
+ status: z.ZodLiteral<"rejected">;
6204
+ reason: z.ZodEnum<{
6205
+ credential_field: "credential_field";
6206
+ credential_value: "credential_value";
6207
+ }>;
6208
+ field: z.ZodOptional<z.ZodString>;
6209
+ }, z.core.$strict>>, z.ZodObject<{
6210
+ status: z.ZodLiteral<"available">;
6211
+ schemaId: z.ZodString;
6212
+ schemaVersion: z.ZodNumber;
6213
+ }, z.core.$strict>, z.ZodObject<{
6214
+ status: z.ZodEnum<{
6215
+ not_provided: "not_provided";
6216
+ invalid: "invalid";
6217
+ too_large: "too_large";
6218
+ expired: "expired";
6219
+ denied: "denied";
6220
+ }>;
6221
+ }, z.core.$strict>]>>>;
6222
+ }, z.core.$strict>>>;
6223
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
6224
+ }, z.core.$strict>>;
6225
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
6226
+ checkpointId: z.ZodString;
6227
+ required: z.ZodBoolean;
6228
+ unextracted: z.ZodBoolean;
6229
+ requiredItemCount: z.ZodNumber;
6230
+ }, z.core.$strict>>>;
6231
+ }, z.core.$strict>>;
6232
+ readonly params: z.ZodReadonly<z.ZodObject<{
6233
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6234
+ }, z.core.$strict>>;
6235
+ };
6236
+ readonly "thread.snapshot": {
6237
+ readonly result: z.ZodReadonly<z.ZodObject<{
6238
+ thread: z.ZodReadonly<z.ZodObject<{
6239
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6240
+ title: z.ZodOptional<z.ZodString>;
6241
+ model: z.ZodOptional<z.ZodString>;
6242
+ createdAt: z.ZodString;
6243
+ updatedAt: z.ZodString;
6244
+ messageCount: z.ZodNumber;
6245
+ }, z.core.$strict>>;
6246
+ messages: z.ZodReadonly<z.ZodObject<{
6247
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6248
+ sequence: z.ZodNumber;
6249
+ role: z.ZodEnum<{
6250
+ user: "user";
6251
+ assistant: "assistant";
6252
+ }>;
6253
+ createdAt: z.ZodString;
6254
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6255
+ type: z.ZodLiteral<"text">;
6256
+ text: z.ZodString;
6257
+ }, z.core.$strict>>>;
6258
+ }, z.core.$strict>>>;
6259
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
6260
+ }, z.core.$strict>>;
6261
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
6262
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
6263
+ status: z.ZodEnum<{
6264
+ running: "running";
6265
+ cancelling: "cancelling";
6266
+ }>;
6267
+ startedAt: z.ZodString;
6268
+ }, z.core.$strict>>>;
6269
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6270
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
6271
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6272
+ agentName: z.ZodString;
6273
+ toolName: z.ZodString;
6274
+ preview: z.ZodJSONSchema;
6275
+ reason: z.ZodOptional<z.ZodString>;
6276
+ }, z.core.$strict>>>;
6277
+ transcriptCompleteness: z.ZodEnum<{
6278
+ complete: "complete";
6279
+ legacy_snapshot: "legacy_snapshot";
6280
+ }>;
6281
+ operations: z.ZodReadonly<z.ZodObject<{
6282
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6283
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
6284
+ sequence: z.ZodNumber;
6285
+ toolCallId: z.ZodString;
6286
+ agentName: z.ZodString;
6287
+ toolName: z.ZodString;
6288
+ createdAt: z.ZodString;
6289
+ outcome: z.ZodReadonly<z.ZodObject<{
6290
+ kind: z.ZodEnum<{
6291
+ success: "success";
6292
+ user_rejected: "user_rejected";
6293
+ policy_denied: "policy_denied";
6294
+ invalid_input: "invalid_input";
6295
+ cancelled: "cancelled";
6296
+ tool_failed: "tool_failed";
6297
+ }>;
6298
+ reason: z.ZodOptional<z.ZodString>;
6299
+ }, z.core.$strict>>;
6300
+ display: z.ZodJSONSchema;
6301
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6302
+ status: z.ZodLiteral<"rejected">;
6303
+ reason: z.ZodEnum<{
6304
+ credential_field: "credential_field";
6305
+ credential_value: "credential_value";
6306
+ }>;
6307
+ field: z.ZodOptional<z.ZodString>;
6308
+ }, z.core.$strict>>, z.ZodObject<{
6309
+ status: z.ZodLiteral<"available">;
6310
+ schemaId: z.ZodString;
6311
+ schemaVersion: z.ZodNumber;
6312
+ }, z.core.$strict>, z.ZodObject<{
6313
+ status: z.ZodEnum<{
6314
+ not_provided: "not_provided";
6315
+ invalid: "invalid";
6316
+ too_large: "too_large";
6317
+ expired: "expired";
6318
+ denied: "denied";
6319
+ }>;
6320
+ }, z.core.$strict>]>>>;
6321
+ }, z.core.$strict>>>;
6322
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
6323
+ }, z.core.$strict>>;
6324
+ contextRecovery: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
6325
+ checkpointId: z.ZodString;
6326
+ required: z.ZodBoolean;
6327
+ unextracted: z.ZodBoolean;
6328
+ requiredItemCount: z.ZodNumber;
6329
+ }, z.core.$strict>>>;
6330
+ }, z.core.$strict>>;
6331
+ readonly params: z.ZodReadonly<z.ZodObject<{
6332
+ messageBeforeSequence: z.ZodOptional<z.ZodNumber>;
6333
+ operationBeforeSequence: z.ZodOptional<z.ZodNumber>;
6334
+ limit: z.ZodDefault<z.ZodNumber>;
6335
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6336
+ }, z.core.$strict>>;
6337
+ };
6338
+ readonly "thread.capabilities": {
6339
+ readonly params: z.ZodReadonly<z.ZodObject<{
6340
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6341
+ }, z.core.$strict>>;
6342
+ readonly result: z.ZodReadonly<z.ZodObject<{
6343
+ manifest: z.ZodJSONSchema;
6344
+ }, z.core.$strict>>;
6345
+ };
6346
+ readonly "operation.get": {
6347
+ readonly result: z.ZodReadonly<z.ZodObject<{
6348
+ operation: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
6349
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
6350
+ sequence: z.ZodNumber;
6351
+ toolCallId: z.ZodString;
6352
+ agentName: z.ZodString;
6353
+ toolName: z.ZodString;
6354
+ createdAt: z.ZodString;
6355
+ outcome: z.ZodReadonly<z.ZodObject<{
6356
+ kind: z.ZodEnum<{
6357
+ success: "success";
6358
+ user_rejected: "user_rejected";
6359
+ policy_denied: "policy_denied";
6360
+ invalid_input: "invalid_input";
6361
+ cancelled: "cancelled";
6362
+ tool_failed: "tool_failed";
6363
+ }>;
6364
+ reason: z.ZodOptional<z.ZodString>;
6365
+ }, z.core.$strict>>;
6366
+ display: z.ZodJSONSchema;
6367
+ appOutput: z.ZodOptional<z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6368
+ status: z.ZodLiteral<"rejected">;
6369
+ reason: z.ZodEnum<{
6370
+ credential_field: "credential_field";
6371
+ credential_value: "credential_value";
6372
+ }>;
6373
+ field: z.ZodOptional<z.ZodString>;
6374
+ }, z.core.$strict>>, z.ZodObject<{
6375
+ status: z.ZodLiteral<"available">;
6376
+ schemaId: z.ZodString;
6377
+ schemaVersion: z.ZodNumber;
6378
+ }, z.core.$strict>, z.ZodObject<{
6379
+ status: z.ZodEnum<{
6380
+ not_provided: "not_provided";
6381
+ invalid: "invalid";
6382
+ too_large: "too_large";
6383
+ expired: "expired";
6384
+ denied: "denied";
6385
+ }>;
6386
+ }, z.core.$strict>]>>>;
6387
+ }, z.core.$strict>>>;
6388
+ }, z.core.$strict>>;
6389
+ readonly params: z.ZodReadonly<z.ZodObject<{
6390
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
6391
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6392
+ }, z.core.$strict>>;
6393
+ };
6394
+ readonly "operation.result.get": {
6395
+ readonly params: z.ZodReadonly<z.ZodObject<{
6396
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
6397
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6398
+ }, z.core.$strict>>;
6399
+ readonly result: z.ZodReadonly<z.ZodObject<{
6400
+ result: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
6401
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6402
+ operationId: z.core.$ZodBranded<z.ZodString, "OperationId">;
6403
+ agentName: z.ZodString;
6404
+ toolName: z.ZodString;
6405
+ createdAt: z.ZodString;
6406
+ output: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6407
+ status: z.ZodLiteral<"rejected">;
6408
+ reason: z.ZodEnum<{
6409
+ credential_field: "credential_field";
6410
+ credential_value: "credential_value";
6411
+ }>;
6412
+ field: z.ZodOptional<z.ZodString>;
6413
+ }, z.core.$strict>>, z.ZodObject<{
6414
+ status: z.ZodLiteral<"available">;
6415
+ schemaId: z.ZodString;
6416
+ schemaVersion: z.ZodNumber;
6417
+ remoteReadable: z.ZodBoolean;
6418
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
6419
+ fallbackText: z.ZodString;
6420
+ }, z.core.$strict>, z.ZodObject<{
6421
+ status: z.ZodEnum<{
6422
+ not_provided: "not_provided";
6423
+ invalid: "invalid";
6424
+ too_large: "too_large";
6425
+ expired: "expired";
6426
+ denied: "denied";
6427
+ }>;
6428
+ }, z.core.$strict>]>>;
6429
+ }, z.core.$strict>>>;
6430
+ }, z.core.$strict>>;
6431
+ };
6432
+ readonly initialize: {
6433
+ readonly params: z.ZodReadonly<z.ZodObject<{
6434
+ protocolVersions: z.ZodArray<z.ZodString>;
6435
+ client: z.ZodReadonly<z.ZodObject<{
6436
+ name: z.ZodString;
6437
+ version: z.ZodString;
6438
+ }, z.core.$strict>>;
6439
+ }, z.core.$strict>>;
6440
+ readonly result: z.ZodReadonly<z.ZodObject<{
6441
+ limits: z.ZodReadonly<z.ZodObject<{
6442
+ maxFrameBytes: z.ZodNumber;
6443
+ maxPageSize: z.ZodNumber;
6444
+ eventReplay: z.ZodLiteral<false>;
6445
+ idempotencyCacheEntries: z.ZodNumber;
6446
+ }, z.core.$strict>>;
6447
+ runtimeInstanceId: z.core.$ZodBranded<z.ZodString, "RuntimeInstanceId">;
6448
+ server: z.ZodReadonly<z.ZodObject<{
6449
+ runtimeVersion: z.ZodString;
6450
+ name: z.ZodString;
6451
+ version: z.ZodString;
6452
+ }, z.core.$strict>>;
6453
+ features: z.ZodArray<z.ZodEnum<{
6454
+ "thread-management": "thread-management";
6455
+ snapshots: "snapshots";
6456
+ turns: "turns";
6457
+ approvals: "approvals";
6458
+ "tool-streaming": "tool-streaming";
6459
+ "reasoning-summary": "reasoning-summary";
6460
+ "operation-projection": "operation-projection";
6461
+ "process-local-sequence": "process-local-sequence";
6462
+ }>>;
6463
+ protocolVersion: z.ZodEnum<{
6464
+ 1.1: "1.1";
6465
+ "1.0": "1.0";
6466
+ }>;
6467
+ }, z.core.$strict>>;
6468
+ };
6469
+ readonly "thread.list": {
6470
+ readonly params: z.ZodReadonly<z.ZodObject<{
6471
+ cursor: z.ZodOptional<z.ZodString>;
6472
+ limit: z.ZodDefault<z.ZodNumber>;
6473
+ }, z.core.$strict>>;
6474
+ readonly result: z.ZodReadonly<z.ZodObject<{
6475
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6476
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6477
+ title: z.ZodOptional<z.ZodString>;
6478
+ model: z.ZodOptional<z.ZodString>;
6479
+ createdAt: z.ZodString;
6480
+ updatedAt: z.ZodString;
6481
+ messageCount: z.ZodNumber;
6482
+ }, z.core.$strict>>>;
6483
+ nextCursor: z.ZodNullable<z.ZodString>;
6484
+ }, z.core.$strict>>;
6485
+ };
6486
+ readonly "thread.create": {
6487
+ readonly params: z.ZodReadonly<z.ZodObject<{
6488
+ title: z.ZodOptional<z.ZodString>;
6489
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6490
+ }, z.core.$strict>>;
6491
+ readonly result: z.ZodReadonly<z.ZodObject<{
6492
+ thread: z.ZodReadonly<z.ZodObject<{
6493
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6494
+ title: z.ZodOptional<z.ZodString>;
6495
+ model: z.ZodOptional<z.ZodString>;
6496
+ createdAt: z.ZodString;
6497
+ updatedAt: z.ZodString;
6498
+ messageCount: z.ZodNumber;
6499
+ }, z.core.$strict>>;
6500
+ }, z.core.$strict>>;
6501
+ };
6502
+ readonly "thread.rename": {
6503
+ readonly params: z.ZodReadonly<z.ZodObject<{
6504
+ title: z.ZodString;
6505
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6506
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6507
+ }, z.core.$strict>>;
6508
+ readonly result: z.ZodReadonly<z.ZodObject<{
6509
+ thread: z.ZodReadonly<z.ZodObject<{
6510
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6511
+ title: z.ZodOptional<z.ZodString>;
6512
+ model: z.ZodOptional<z.ZodString>;
6513
+ createdAt: z.ZodString;
6514
+ updatedAt: z.ZodString;
6515
+ messageCount: z.ZodNumber;
6516
+ }, z.core.$strict>>;
6517
+ }, z.core.$strict>>;
6518
+ };
6519
+ readonly "thread.delete": {
6520
+ readonly params: z.ZodReadonly<z.ZodObject<{
6521
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6522
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6523
+ }, z.core.$strict>>;
6524
+ readonly result: z.ZodReadonly<z.ZodObject<{
6525
+ deleted: z.ZodLiteral<true>;
6526
+ }, z.core.$strict>>;
6527
+ };
6528
+ readonly "thread.detach": {
6529
+ readonly params: z.ZodReadonly<z.ZodObject<{
6530
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6531
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6532
+ }, z.core.$strict>>;
6533
+ readonly result: z.ZodReadonly<z.ZodObject<{
6534
+ detached: z.ZodBoolean;
6535
+ }, z.core.$strict>>;
6536
+ };
6537
+ readonly "turn.start": {
6538
+ readonly params: z.ZodReadonly<z.ZodObject<{
6539
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6540
+ input: z.ZodReadonly<z.ZodObject<{
6541
+ text: z.ZodString;
6542
+ }, z.core.$strict>>;
6543
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6544
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6545
+ }, z.core.$strict>>;
6546
+ readonly result: z.ZodReadonly<z.ZodObject<{
6547
+ accepted: z.ZodLiteral<true>;
6548
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6549
+ }, z.core.$strict>>;
6550
+ };
6551
+ readonly "turn.cancel": {
6552
+ readonly params: z.ZodReadonly<z.ZodObject<{
6553
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6554
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6555
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId">;
6556
+ }, z.core.$strict>>;
6557
+ readonly result: z.ZodReadonly<z.ZodObject<{
6558
+ cancelling: z.ZodBoolean;
6559
+ }, z.core.$strict>>;
6560
+ };
6561
+ readonly "interaction.candidate": {
6562
+ readonly params: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6563
+ method: z.ZodLiteral<"approval.request">;
6564
+ candidate: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6565
+ decision: z.ZodLiteral<"approve">;
6566
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6567
+ decision: z.ZodLiteral<"reject">;
6568
+ reason: z.ZodOptional<z.ZodString>;
6569
+ }, z.core.$strict>>]>;
6570
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6571
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6572
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6573
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6574
+ method: z.ZodLiteral<"userInput.request">;
6575
+ candidate: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
6576
+ status: z.ZodLiteral<"submitted">;
6577
+ values: z.ZodArray<z.ZodReadonly<z.ZodObject<{
6578
+ id: z.ZodString;
6579
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>;
6580
+ }, z.core.$strict>>>;
6581
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
6582
+ status: z.ZodLiteral<"cancelled">;
6583
+ reason: z.ZodOptional<z.ZodString>;
6584
+ }, z.core.$strict>>]>;
6585
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
6586
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
6587
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
6588
+ }, z.core.$strict>>]>;
6589
+ readonly result: z.ZodReadonly<z.ZodObject<{
6590
+ accepted: z.ZodLiteral<true>;
6591
+ }, z.core.$strict>>;
6592
+ };
6593
+ };
6594
+ readonly requestMethodDispositions: {
6595
+ readonly "operation.result.get": "query";
6596
+ readonly initialize: "local-only";
6597
+ readonly "thread.list": "query";
6598
+ readonly "thread.create": "mutation";
6599
+ readonly "thread.open": "query";
6600
+ readonly "thread.snapshot": "query";
6601
+ readonly "thread.rename": "mutation";
6602
+ readonly "thread.delete": "mutation";
6603
+ readonly "thread.detach": "mutation";
6604
+ readonly "thread.capabilities": "query";
6605
+ readonly "turn.start": "mutation";
6606
+ readonly "turn.cancel": "mutation";
6607
+ readonly "operation.get": "query";
6608
+ readonly "interaction.candidate": "mutation";
6609
+ };
6610
+ readonly mutationMethods: readonly ["thread.create", "thread.rename", "thread.delete", "thread.detach", "turn.start", "turn.cancel", "interaction.candidate"];
6611
+ readonly localOnlyMethods: readonly ["initialize"];
6612
+ };
4722
6613
  readonly "1.2": {
4723
6614
  readonly messageTypes: readonly ["device.connect", "runtime.request", "runtime.response", "runtime.event", "runtime.ack", "runtime.gap", "runtime.encrypted", "interaction.request", "interaction.resolved", "interaction.cancelled"];
4724
6615
  readonly messageSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{