@macro-inc/sdk 0.2.2 → 0.4.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 (175) hide show
  1. package/README.md +177 -3
  2. package/dist/{chunk-OGE7WXJE.js → chunk-AZJUIUIV.js} +177 -23
  3. package/dist/{chunk-PRUFPW3B.js → chunk-G43PLP2U.js} +144 -0
  4. package/dist/{chunk-7LVVPVNT.js → chunk-K4G5VO4P.js} +76 -1
  5. package/dist/{chunk-PAAFJYGO.js → chunk-PPR7IWZ7.js} +77 -51
  6. package/dist/{chunk-QVBNNMQS.js → chunk-PTX2RV2N.js} +169 -20
  7. package/dist/{chunk-SUINKDXF.js → chunk-PZPTJI6F.js} +42 -0
  8. package/dist/{chunk-7YJ6Y7HJ.js → chunk-XFA7NCJ5.js} +207 -0
  9. package/dist/{chunk-ZQXOHNDB.js → chunk-ZLBDES7U.js} +789 -12
  10. package/dist/generated/agent-fold/index.d.ts +4332 -0
  11. package/dist/generated/agent-fold/index.js +0 -0
  12. package/dist/generated/agent-harness/index.d.ts +1 -1
  13. package/dist/generated/agent-harness/index.js +1 -1
  14. package/dist/generated/agent-harness/sdk.gen.d.ts +83 -9
  15. package/dist/generated/agent-harness/types.gen.d.ts +1504 -160
  16. package/dist/generated/agent-reviews/index.d.ts +893 -0
  17. package/dist/generated/agent-reviews/index.js +0 -0
  18. package/dist/generated/auth/index.d.ts +1 -1
  19. package/dist/generated/auth/index.js +1 -1
  20. package/dist/generated/auth/sdk.gen.d.ts +108 -2
  21. package/dist/generated/auth/types.gen.d.ts +799 -6
  22. package/dist/generated/calendar/index.d.ts +1 -1
  23. package/dist/generated/calendar/index.js +1 -1
  24. package/dist/generated/calendar/sdk.gen.d.ts +63 -1
  25. package/dist/generated/calendar/types.gen.d.ts +1234 -5
  26. package/dist/generated/cognition/index.d.ts +1 -1
  27. package/dist/generated/cognition/index.js +1 -1
  28. package/dist/generated/cognition/sdk.gen.d.ts +85 -20
  29. package/dist/generated/cognition/types.gen.d.ts +1040 -121
  30. package/dist/generated/connection/index.d.ts +1 -1
  31. package/dist/generated/connection/index.js +15 -0
  32. package/dist/generated/connection/sdk.gen.d.ts +6 -1
  33. package/dist/generated/connection/types.gen.d.ts +18 -1
  34. package/dist/generated/email/index.d.ts +1 -1
  35. package/dist/generated/email/index.js +1 -1
  36. package/dist/generated/email/sdk.gen.d.ts +44 -2
  37. package/dist/generated/email/types.gen.d.ts +475 -10
  38. package/dist/generated/notification/index.d.ts +1 -1
  39. package/dist/generated/notification/index.js +1 -1
  40. package/dist/generated/notification/sdk.gen.d.ts +29 -21
  41. package/dist/generated/notification/types.gen.d.ts +267 -73
  42. package/dist/generated/properties/index.d.ts +1 -1
  43. package/dist/generated/properties/types.gen.d.ts +21 -1
  44. package/dist/generated/scheduled-action/index.d.ts +1 -1
  45. package/dist/generated/scheduled-action/index.js +1 -1
  46. package/dist/generated/scheduled-action/sdk.gen.d.ts +8 -1
  47. package/dist/generated/scheduled-action/types.gen.d.ts +669 -19
  48. package/dist/generated/search/index.d.ts +1 -1
  49. package/dist/generated/search/types.gen.d.ts +87 -7
  50. package/dist/generated/static-files/types.gen.d.ts +6 -0
  51. package/dist/generated/storage/index.d.ts +1 -1
  52. package/dist/generated/storage/index.js +1 -1
  53. package/dist/generated/storage/sdk.gen.d.ts +376 -13
  54. package/dist/generated/storage/types.gen.d.ts +12038 -5562
  55. package/dist/src/entities/account-managers/grant.d.ts +39 -0
  56. package/dist/src/entities/account-managers/namespace.d.ts +17 -0
  57. package/dist/src/entities/agent-sessions/activity.d.ts +39 -0
  58. package/dist/src/entities/agent-sessions/agent-session.d.ts +148 -6
  59. package/dist/src/entities/agent-sessions/code-execution.d.ts +5 -0
  60. package/dist/src/entities/agent-sessions/namespace.d.ts +54 -4
  61. package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
  62. package/dist/src/entities/agent-sessions/review.d.ts +18 -62
  63. package/dist/src/entities/agent-sessions/view.d.ts +11 -0
  64. package/dist/src/entities/agents/namespace.d.ts +11 -2
  65. package/dist/src/entities/ai/namespace.d.ts +5 -1
  66. package/dist/src/entities/api-keys/namespace.d.ts +5 -1
  67. package/dist/src/entities/bots/bot.d.ts +108 -0
  68. package/dist/src/entities/bots/namespace.d.ts +17 -4
  69. package/dist/src/entities/bots/token.d.ts +34 -0
  70. package/dist/src/entities/calendar/booking-link.d.ts +49 -0
  71. package/dist/src/entities/calendar/booking-namespace.d.ts +130 -0
  72. package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
  73. package/dist/src/entities/calendar/booking.d.ts +77 -0
  74. package/dist/src/entities/calendar/calendar.d.ts +11 -4
  75. package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
  76. package/dist/src/entities/calendar/event.d.ts +104 -3
  77. package/dist/src/entities/calendar/namespace.d.ts +151 -7
  78. package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
  79. package/dist/src/entities/calls/call-record.d.ts +34 -4
  80. package/dist/src/entities/calls/connection.d.ts +53 -0
  81. package/dist/src/entities/calls/errors.d.ts +15 -0
  82. package/dist/src/entities/calls/namespace.d.ts +21 -1
  83. package/dist/src/entities/calls/participant.d.ts +22 -0
  84. package/dist/src/entities/channels/access-request.d.ts +34 -0
  85. package/dist/src/entities/channels/channel.d.ts +47 -1
  86. package/dist/src/entities/channels/namespace.d.ts +21 -5
  87. package/dist/src/entities/channels/namespace.test.d.ts +1 -0
  88. package/dist/src/entities/channels/post.d.ts +14 -3
  89. package/dist/src/entities/channels/thread.d.ts +10 -1
  90. package/dist/src/entities/chats/chat.d.ts +7 -1
  91. package/dist/src/entities/chats/namespace.d.ts +14 -1
  92. package/dist/src/entities/connected-apps/connected-app.d.ts +107 -0
  93. package/dist/src/entities/connected-apps/connector.d.ts +56 -0
  94. package/dist/src/entities/connected-apps/namespace.d.ts +74 -0
  95. package/dist/src/entities/crm/company.d.ts +7 -3
  96. package/dist/src/entities/crm/contact.d.ts +4 -4
  97. package/dist/src/entities/crm/namespace.d.ts +34 -1
  98. package/dist/src/entities/crm/pipeline.d.ts +43 -2
  99. package/dist/src/entities/databases/database.d.ts +17 -0
  100. package/dist/src/entities/databases/namespace.d.ts +56 -0
  101. package/dist/src/entities/documents/ai-edit.d.ts +52 -0
  102. package/dist/src/entities/documents/document.d.ts +244 -5
  103. package/dist/src/entities/documents/namespace.d.ts +89 -4
  104. package/dist/src/entities/documents/office-files.d.ts +47 -0
  105. package/dist/src/entities/email/draft.d.ts +36 -7
  106. package/dist/src/entities/email/message.d.ts +99 -3
  107. package/dist/src/entities/email/namespace.d.ts +47 -4
  108. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  109. package/dist/src/entities/email/thread.d.ts +55 -3
  110. package/dist/src/entities/entity-mentions/namespace.d.ts +5 -1
  111. package/dist/src/entities/external-chat/chat.d.ts +105 -0
  112. package/dist/src/entities/external-chat/message.d.ts +54 -0
  113. package/dist/src/entities/external-chat/namespace.d.ts +18 -0
  114. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  115. package/dist/src/entities/external-chat/send.d.ts +32 -0
  116. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  117. package/dist/src/entities/favorites/namespace.d.ts +5 -1
  118. package/dist/src/entities/foreign/namespace.d.ts +3 -0
  119. package/dist/src/entities/forms/form.d.ts +17 -2
  120. package/dist/src/entities/forms/namespace.d.ts +5 -1
  121. package/dist/src/entities/github-pull-requests/namespace.d.ts +5 -1
  122. package/dist/src/entities/harnesses/harness.d.ts +9 -0
  123. package/dist/src/entities/harnesses/namespace.d.ts +5 -1
  124. package/dist/src/entities/images/image.d.ts +77 -0
  125. package/dist/src/entities/images/namespace.d.ts +48 -0
  126. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  127. package/dist/src/entities/initiatives/initiative.d.ts +12 -1
  128. package/dist/src/entities/initiatives/namespace.d.ts +15 -2
  129. package/dist/src/entities/me/namespace.d.ts +43 -0
  130. package/dist/src/entities/meetings/meeting.d.ts +5 -0
  131. package/dist/src/entities/meetings/namespace.d.ts +5 -1
  132. package/dist/src/entities/messages/thread.d.ts +1 -1
  133. package/dist/src/entities/notifications/namespace.d.ts +3 -0
  134. package/dist/src/entities/pins/namespace.d.ts +5 -1
  135. package/dist/src/entities/projects/namespace.d.ts +4 -1
  136. package/dist/src/entities/projects/project.d.ts +9 -1
  137. package/dist/src/entities/properties/namespace.d.ts +2 -0
  138. package/dist/src/entities/referrals/namespace.d.ts +33 -0
  139. package/dist/src/entities/routines/namespace.d.ts +42 -2
  140. package/dist/src/entities/routines/routine.d.ts +84 -5
  141. package/dist/src/entities/search/namespace.d.ts +65 -0
  142. package/dist/src/entities/{search.d.ts → search/options.d.ts} +8 -2
  143. package/dist/src/entities/search/types.d.ts +90 -0
  144. package/dist/src/entities/sharing/access.d.ts +14 -0
  145. package/dist/src/entities/tasks/namespace.d.ts +42 -3
  146. package/dist/src/entities/tasks/task.d.ts +47 -6
  147. package/dist/src/entities/teams/invite.d.ts +30 -0
  148. package/dist/src/entities/teams/namespace.d.ts +3 -0
  149. package/dist/src/entities/teams/team.d.ts +37 -0
  150. package/dist/src/entities/unfurls/namespace.d.ts +5 -1
  151. package/dist/src/entities/users/namespace.d.ts +9 -0
  152. package/dist/src/entities/users/user.d.ts +8 -0
  153. package/dist/src/entities/web/namespace.d.ts +61 -0
  154. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  155. package/dist/src/entities/webhooks/namespace.d.ts +2 -0
  156. package/dist/src/entities/whatsapp/account.d.ts +20 -0
  157. package/dist/src/entities/whatsapp/chat.d.ts +54 -0
  158. package/dist/src/entities/whatsapp/namespace.d.ts +23 -0
  159. package/dist/src/entities/workspace/items.d.ts +7 -0
  160. package/dist/src/entities/workspace/namespace.d.ts +14 -9
  161. package/dist/src/entities/workspace/query.d.ts +23 -0
  162. package/dist/src/entities/workspace/types.d.ts +6 -3
  163. package/dist/src/events/hydrate/agentSession.d.ts +1 -1
  164. package/dist/src/events/hydrate/call.d.ts +101 -0
  165. package/dist/src/events/hydrate/channel.d.ts +8 -1
  166. package/dist/src/events/hydrate/document.d.ts +1 -1
  167. package/dist/src/events/hydrate/message.d.ts +1 -1
  168. package/dist/src/events/types.d.ts +2 -1
  169. package/dist/src/macro.d.ts +73 -4
  170. package/dist/src/macro.js +8235 -3701
  171. package/dist/src/mentions.d.ts +6 -1
  172. package/dist/src/utils/activity.d.ts +23 -2
  173. package/dist/src/utils/index.d.ts +1 -1
  174. package/dist/src/utils/unwrap.d.ts +27 -2
  175. package/package.json +2 -2
@@ -5,6 +5,48 @@ export type ClientOptions = {
5
5
  * Ordered from least to most access top -> bottom
6
6
  */
7
7
  export type AccessLevel = 'view' | 'comment' | 'edit' | 'owner';
8
+ /**
9
+ * One activity row on the wire — the realtime projection of an inserted
10
+ * `activity_events` row.
11
+ */
12
+ export type ActivityWireRow = {
13
+ /**
14
+ * The stored action tag.
15
+ */
16
+ action: string;
17
+ /**
18
+ * The stored action payload, if any.
19
+ */
20
+ action_payload?: unknown;
21
+ /**
22
+ * Who mechanically acted, as a principal string (`macro|…` / `bot|…`).
23
+ */
24
+ actor_id: string;
25
+ /**
26
+ * Originating code-mode invocation, absent on older events.
27
+ */
28
+ agent_correlation_id?: string | null;
29
+ /**
30
+ * The entity acted on.
31
+ */
32
+ entity_id: string;
33
+ /**
34
+ * The kind of entity acted on.
35
+ */
36
+ entity_type: EntityType;
37
+ /**
38
+ * The stored activity id.
39
+ */
40
+ id: string;
41
+ /**
42
+ * When it happened.
43
+ */
44
+ occurred_at: string;
45
+ /**
46
+ * Whose activity this is (a principal string).
47
+ */
48
+ subject_id: string;
49
+ };
8
50
  /**
9
51
  * One thing a caller wants an agent to do.
10
52
  */
@@ -37,6 +79,46 @@ export type AgentAction = (AgentPromptAction & {
37
79
  * not uuids and stay `None`.
38
80
  */
39
81
  export type AgentActionId = string;
82
+ /**
83
+ * Stable chronological resume position.
84
+ */
85
+ export type AgentActivityCursor = {
86
+ /**
87
+ * Tie-breaking activity identity.
88
+ */
89
+ id: string;
90
+ /**
91
+ * Last stored event time.
92
+ */
93
+ occurredAt: string;
94
+ };
95
+ /**
96
+ * One page of the activity caused by this session.
97
+ */
98
+ export type AgentActivityPage = {
99
+ /**
100
+ * Original activity rows, also retained in the affected entities' histories.
101
+ */
102
+ activities: Array<ActivityWireRow>;
103
+ nextCursor?: null | AgentActivityCursor;
104
+ };
105
+ /**
106
+ * An agent acting for a person.
107
+ */
108
+ export type AgentActor = {
109
+ /**
110
+ * The agent.
111
+ */
112
+ bot: BotId;
113
+ /**
114
+ * Where the agent's own work came from.
115
+ */
116
+ lineage: Lineage;
117
+ /**
118
+ * The person it acts for.
119
+ */
120
+ on_behalf_of: MacroUserIdStr;
121
+ };
40
122
  /**
41
123
  * Type-specific state for one agent session setting.
42
124
  */
@@ -196,6 +278,28 @@ export type AgentConversationsDto = {
196
278
  */
197
279
  conversations: Array<AgentConversationDto>;
198
280
  };
281
+ /**
282
+ * Which kind of agent a prompt is sent to.
283
+ */
284
+ export type AgentMode = 'chat' | 'code';
285
+ /**
286
+ * Request body for `POST /agent-mode-choice`.
287
+ */
288
+ export type AgentModeChoiceRequest = {
289
+ /**
290
+ * The prompt the composer is about to send.
291
+ */
292
+ prompt: string;
293
+ };
294
+ /**
295
+ * Response body for `POST /agent-mode-choice`.
296
+ */
297
+ export type AgentModeChoiceResponse = {
298
+ /**
299
+ * Which kind of agent should receive the prompt.
300
+ */
301
+ mode: AgentMode;
302
+ };
199
303
  /**
200
304
  * One model picker option.
201
305
  */
@@ -329,6 +433,25 @@ export type AgentSessionChangesResponse = {
329
433
  capturing: boolean;
330
434
  changeset?: null | ChangesetDto;
331
435
  };
436
+ /**
437
+ * Response body for one session's folded log.
438
+ */
439
+ export type AgentSessionFoldedLogResponse = {
440
+ /**
441
+ * The agent whose messages these are; it sent every agent message.
442
+ */
443
+ bot: SessionBot;
444
+ /**
445
+ * The conversation, oldest first: prompts, replies, tool calls and their
446
+ * results, plans, permission requests and how each turn ended. Each
447
+ * element is a `FoldedMessage` from the fold's TypeScript contract,
448
+ * which the SDK exports; the schema is opaque here because those types
449
+ * are described with specta rather than utoipa.
450
+ */
451
+ messages: Array<{
452
+ [key: string]: unknown;
453
+ }>;
454
+ };
332
455
  /**
333
456
  * One entry of a session's protocol log.
334
457
  *
@@ -465,6 +588,11 @@ export type AgentSessionResponse = {
465
588
  * The ACP session id, if one exists.
466
589
  */
467
590
  acpSessionId?: string | null;
591
+ /**
592
+ * When the session was archived, or `None` while it is active.
593
+ */
594
+ archivedAt?: string | null;
595
+ archivedBy?: null | ArchiveCause;
468
596
  /**
469
597
  * The bot running the agent.
470
598
  */
@@ -493,10 +621,6 @@ export type AgentSessionResponse = {
493
621
  * at creation. Absent otherwise, so existing payloads are unchanged.
494
622
  */
495
623
  instructions?: string | null;
496
- /**
497
- * Whether the session is archived and read-only.
498
- */
499
- isArchived: boolean;
500
624
  /**
501
625
  * Model slug.
502
626
  */
@@ -509,6 +633,11 @@ export type AgentSessionResponse = {
509
633
  * User-facing session name.
510
634
  */
511
635
  name: string;
636
+ /**
637
+ * What opened the session: who or what started it, and what it is about.
638
+ * `unknown` when nothing recorded it.
639
+ */
640
+ origin?: TriggerOrigin;
512
641
  /**
513
642
  * The exact message that invoked the bot, if any.
514
643
  */
@@ -588,6 +717,12 @@ export type AiAdmissionErrorBody = {
588
717
  */
589
718
  error: string;
590
719
  };
720
+ /**
721
+ * Editable fields for ai inference, before submission and identity resolution.
722
+ */
723
+ export type AiSuggestions = {
724
+ [key: string]: never;
725
+ };
591
726
  /**
592
727
  * Request body for answering a held tool call.
593
728
  */
@@ -606,7 +741,130 @@ export type AnswerToolApprovalResponse = {
606
741
  */
607
742
  status: ToolApprovalStatusDto;
608
743
  };
744
+ /**
745
+ * Request body for reporting a connected app.
746
+ */
747
+ export type AppConnectedRequest = {
748
+ actionId?: null | AgentActionId;
749
+ /**
750
+ * The Pipedream app slug the owner connected, e.g. `notion`.
751
+ */
752
+ appSlug: string;
753
+ };
754
+ /**
755
+ * Who or what archived a session.
756
+ */
757
+ export type ArchiveCause = 'user' | 'pull_request_merged' | 'runtime_closed';
758
+ /**
759
+ * One session's choices over its owner's defaults. `null` follows the owner.
760
+ */
761
+ export type AutoArchiveOverridesBody = {
762
+ /**
763
+ * Archive once the session's pull requests merge, or `null` to follow the owner.
764
+ */
765
+ onPullRequestMerged?: boolean | null;
766
+ /**
767
+ * Archive once the session's runtime session is deliberately closed, or `null` to follow
768
+ * the owner.
769
+ */
770
+ onRuntimeClosed?: boolean | null;
771
+ };
772
+ /**
773
+ * Which triggers archive the caller's sessions when a session has no choice of its own.
774
+ */
775
+ export type AutoArchivePreferencesBody = {
776
+ /**
777
+ * Archive a session once every pull request linked to it is closed and at least one merged.
778
+ */
779
+ onPullRequestMerged: boolean;
780
+ /**
781
+ * Archive a session once the runtime session backing it is deliberately closed.
782
+ */
783
+ onRuntimeClosed: boolean;
784
+ };
609
785
  export type BotId = string;
786
+ /**
787
+ * Editable fields for calendar inference, before submission and identity resolution.
788
+ */
789
+ export type CalendarSuggestions = {
790
+ /**
791
+ * Suggested Markdown content or outgoing message body.
792
+ */
793
+ body?: string | null;
794
+ /**
795
+ * Event end as a local wall-clock value in the request's timezone.
796
+ */
797
+ end?: string | null;
798
+ /**
799
+ * Only populated when an invitation was explicitly requested.
800
+ */
801
+ guests?: Array<string>;
802
+ /**
803
+ * Human-readable event venue or meeting URL.
804
+ */
805
+ location?: string | null;
806
+ recurrence?: null | RecurrenceSuggestion;
807
+ /**
808
+ * Local wall-clock values, interpreted in the request's IANA timezone.
809
+ */
810
+ start?: string | null;
811
+ /**
812
+ * Verbatim clock phrase whose missing AM/PM required an editable assumption.
813
+ */
814
+ start_assumption?: string | null;
815
+ /**
816
+ * Suggested note, task, or event title.
817
+ */
818
+ title?: string | null;
819
+ };
820
+ /**
821
+ * Call one tool of a connected app.
822
+ */
823
+ export type CallConnectedTool = {
824
+ /**
825
+ * The tool's arguments, matching its input schema.
826
+ */
827
+ arguments?: {
828
+ [key: string]: unknown;
829
+ };
830
+ /**
831
+ * The tool's name on its server.
832
+ */
833
+ tool: string;
834
+ };
835
+ /**
836
+ * Call search supports speakers, channels and attendance status.
837
+ */
838
+ export type CallSearchSuggestions = {
839
+ /**
840
+ * Speaker names or supplied addresses.
841
+ */
842
+ from: Array<string>;
843
+ /**
844
+ * Channel names.
845
+ */
846
+ in: Array<string>;
847
+ /**
848
+ * Remaining keyword phrase.
849
+ */
850
+ query?: string | null;
851
+ /**
852
+ * Attendance display value, resolved against supported options by the client.
853
+ */
854
+ status?: string | null;
855
+ };
856
+ /**
857
+ * Who did something that opened a session.
858
+ */
859
+ export type Caller = {
860
+ type: 'person';
861
+ /**
862
+ * Who.
863
+ */
864
+ user: MacroUserIdStr;
865
+ } | (AgentActor & {
866
+ type: 'agent';
867
+ });
610
868
  /**
611
869
  * Harness names accepted by the capability-discovery endpoint.
612
870
  */
@@ -726,6 +984,23 @@ export type ChangesetDto = {
726
984
  * The source of a changeset's diff, on the wire.
727
985
  */
728
986
  export type ChangesetSourceDto = 'github_pull_request';
987
+ /**
988
+ * Message filters remain display names until resolved against the user's directory.
989
+ */
990
+ export type ChannelSearchSuggestions = {
991
+ /**
992
+ * Explicit message sender names or addresses.
993
+ */
994
+ from: Array<string>;
995
+ /**
996
+ * Explicit channel names.
997
+ */
998
+ in: Array<string>;
999
+ /**
1000
+ * Remaining keyword phrase.
1001
+ */
1002
+ query?: string | null;
1003
+ };
729
1004
  /**
730
1005
  * The channel share permission
731
1006
  */
@@ -739,6 +1014,32 @@ export type ChannelSharePermission = {
739
1014
  */
740
1015
  channel_id: string;
741
1016
  };
1017
+ /**
1018
+ * A draft snapshot. Revisions are opaque to the server and echoed to the client.
1019
+ */
1020
+ export type ClassifyInputRequest = {
1021
+ /**
1022
+ * Opaque client revision used to discard stale predictions.
1023
+ */
1024
+ revision: number;
1025
+ /**
1026
+ * Current draft text to classify without executing it.
1027
+ */
1028
+ text: string;
1029
+ };
1030
+ /**
1031
+ * Ranked-type evidence for a particular client draft revision.
1032
+ */
1033
+ export type ClassifyInputResponse = {
1034
+ /**
1035
+ * Revision echoed from the classification request.
1036
+ */
1037
+ revision: number;
1038
+ /**
1039
+ * Independent scores in the fixed intent-question order.
1040
+ */
1041
+ scores: Array<IntentScore>;
1042
+ };
742
1043
  /**
743
1044
  * Request or response body for the caller's coding preferences.
744
1045
  */
@@ -753,17 +1054,147 @@ export type CodingPreferencesBody = {
753
1054
  openPullRequests: boolean;
754
1055
  };
755
1056
  /**
756
- * One-time manual code. Deliberately does not implement Debug.
1057
+ * Add a custom MCP server to the user's connections.
757
1058
  */
758
- export type CompleteRequest = {
1059
+ export type ConnectMcpServer = {
759
1060
  /**
760
- * Server-issued handle; never an owner selected by the caller.
1061
+ * Display name for the server.
761
1062
  */
762
- attemptId: string;
1063
+ serverName: string;
763
1064
  /**
764
- * Claude's complete code#state string, not an access token.
1065
+ * The server's URL.
765
1066
  */
766
- code: string;
1067
+ url: string;
1068
+ };
1069
+ /**
1070
+ * Response from [`ConnectMcpServer`].
1071
+ */
1072
+ export type ConnectMcpServerResponse = {
1073
+ /**
1074
+ * Whether the user already had this server before the call.
1075
+ */
1076
+ alreadyConnected: boolean;
1077
+ /**
1078
+ * Whether the server holds the user's sign-in.
1079
+ */
1080
+ authenticated: boolean;
1081
+ /**
1082
+ * Whether the server's tools are turned on.
1083
+ */
1084
+ enabled: boolean;
1085
+ /**
1086
+ * The server's display name.
1087
+ */
1088
+ serverName: string;
1089
+ /**
1090
+ * What happened and what the user still has to do.
1091
+ */
1092
+ summary: string;
1093
+ /**
1094
+ * The server's URL.
1095
+ */
1096
+ url: string;
1097
+ };
1098
+ /**
1099
+ * A connected app the session's agent may use.
1100
+ */
1101
+ export type ConnectedApp = {
1102
+ /**
1103
+ * The app's slug, or its custom server key.
1104
+ */
1105
+ key: string;
1106
+ /**
1107
+ * Which store the app comes from.
1108
+ */
1109
+ kind: ConnectedAppKind;
1110
+ /**
1111
+ * Display name, e.g. `Slack` or the owner's name for a custom server.
1112
+ */
1113
+ name: string;
1114
+ };
1115
+ /**
1116
+ * Which store a connected app comes from.
1117
+ */
1118
+ export type ConnectedAppKind = 'app' | 'custom';
1119
+ /**
1120
+ * One tool a connected app serves.
1121
+ */
1122
+ export type ConnectedTool = {
1123
+ /**
1124
+ * What the server says the tool does.
1125
+ */
1126
+ description?: string | null;
1127
+ /**
1128
+ * JSON Schema for the tool's arguments.
1129
+ */
1130
+ inputSchema: {
1131
+ [key: string]: unknown;
1132
+ };
1133
+ /**
1134
+ * The tool's name on its server.
1135
+ */
1136
+ name: string;
1137
+ };
1138
+ /**
1139
+ * One tool found by a search across the agent's connected apps.
1140
+ */
1141
+ export type ConnectedToolMatch = {
1142
+ /**
1143
+ * The app serving the tool.
1144
+ */
1145
+ app: ConnectedApp;
1146
+ /**
1147
+ * The tool.
1148
+ */
1149
+ tool: ConnectedTool;
1150
+ };
1151
+ /**
1152
+ * A connected tool's answer: MCP's `CallToolResult`.
1153
+ */
1154
+ export type ConnectedToolResult = {
1155
+ /**
1156
+ * MCP content blocks, e.g. `{type: "text", text}`.
1157
+ */
1158
+ content: Array<{
1159
+ [key: string]: unknown;
1160
+ }>;
1161
+ /**
1162
+ * The tool failed, or could not run; `content` says why.
1163
+ */
1164
+ isError: boolean;
1165
+ /**
1166
+ * Structured output, for tools that declare an output schema.
1167
+ */
1168
+ structuredContent?: {
1169
+ [key: string]: unknown;
1170
+ } | null;
1171
+ };
1172
+ /**
1173
+ * The best matches across the agent's connected apps, and the apps whose
1174
+ * tools could not be listed, which the search did not cover.
1175
+ */
1176
+ export type ConnectedToolSearch = {
1177
+ /**
1178
+ * At most [`MAX_TOOL_MATCHES`] tools, best first.
1179
+ */
1180
+ matches: Array<ConnectedToolMatch>;
1181
+ /**
1182
+ * Apps whose tools could not be listed.
1183
+ */
1184
+ unsearched: Array<ConnectedApp>;
1185
+ };
1186
+ /**
1187
+ * An advertised action, not a tool loaded into the current turn.
1188
+ */
1189
+ export type ConnectorTool = {
1190
+ /**
1191
+ * What the action supports.
1192
+ */
1193
+ description: string;
1194
+ /**
1195
+ * Upstream tool name.
1196
+ */
1197
+ name: string;
767
1198
  };
768
1199
  /**
769
1200
  * Request body for a control operation on a live session.
@@ -818,9 +1249,10 @@ export type ConversationTurnState = 'queued' | 'running' | 'succeeded' | 'failed
818
1249
  * say which bot and which directory, and must own that bot. Omitting it asks
819
1250
  * for a managed session, whose runtime this deployment provisions. A managed
820
1251
  * request may select an authorized persisted persona with `botId`; omitting
821
- * it uses the deployment's default coding persona. Fields describing someone
822
- * else's runtime must still be omitted rather than quietly ignored. Mixing
823
- * the two shapes is refused rather than guessed at.
1252
+ * it uses the deployment's default coding persona, or Cursor when `repoUrl`
1253
+ * is set. Fields describing someone else's runtime must still be omitted
1254
+ * rather than quietly ignored. Mixing the two shapes is refused rather
1255
+ * than guessed at.
824
1256
  *
825
1257
  * Clients serialize this, so both derives are used.
826
1258
  */
@@ -829,9 +1261,9 @@ export type CreateAgentSessionRequest = {
829
1261
  * Bot the session runs for. On a managed request this optionally selects
830
1262
  * a persisted persona the user owns, may use through team membership, or
831
1263
  * can `@` mention in a shared channel; omitting it uses the deployment's
832
- * default coding persona. On an external request, bot callers may omit it
833
- * (their own identity is used) and must not name another bot; user callers
834
- * must supply a bot they own.
1264
+ * default coding persona, or Cursor when `repoUrl` is set. On an
1265
+ * external request, bot callers may omit it (their own identity is used)
1266
+ * and must not name another bot; user callers must supply a bot they own.
835
1267
  */
836
1268
  botId?: string | null;
837
1269
  /**
@@ -878,6 +1310,12 @@ export type CreateAgentSessionRequest = {
878
1310
  * control endpoint. Omitted, the session opens idle.
879
1311
  */
880
1312
  prompt?: string | null;
1313
+ promptActionId?: null | AgentActionId;
1314
+ /**
1315
+ * Files `prompt` refers to, in the order the user attached them.
1316
+ * Requires `prompt`.
1317
+ */
1318
+ promptAttachments?: Array<PromptAttachment>;
881
1319
  /**
882
1320
  * Starting branch for a managed coding session's selected repository.
883
1321
  * Omitted, the session starts on the repository's default branch.
@@ -886,7 +1324,9 @@ export type CreateAgentSessionRequest = {
886
1324
  /**
887
1325
  * Explicit GitHub repository for a managed Cursor session, as one of the
888
1326
  * urls `GET /agent-repositories` lists for the caller. Access is checked
889
- * for the session owner. For external sessions this is informational:
1327
+ * for the session owner. On a managed request that names no `botId`,
1328
+ * this starts the session as Cursor — the only managed persona that
1329
+ * honors a repository. For external sessions this is informational:
890
1330
  * cloning it is the runtime operator's job.
891
1331
  */
892
1332
  repoUrl?: string | null;
@@ -910,25 +1350,13 @@ export type CreateAgentSessionResponse = {
910
1350
  session: AgentSessionResponse;
911
1351
  };
912
1352
  /**
913
- * Review creation. Drafts are validated by the action's owning adapter.
1353
+ * Review creation. Decoding it validates every draft; creating a review only
1354
+ * presents the drafts, and the account holder acts separately.
914
1355
  */
915
1356
  export type CreateReview = {
916
- /**
917
- * One to one hundred independent drafts. Email: {subject, body: Markdown,
918
- * to: [{email, name?}], cc?: [{email, name?}], bcc?: [{email, name?}],
919
- * replyingToId?, attachments?: [{documentId}]}. Calendar: {title,
920
- * time: {kind: "timed", startsAt: ISO datetime, endsAt: ISO datetime,
921
- * timeZone?: IANA zone} or {kind: "allDay", startDate: ISO date,
922
- * endDate: exclusive ISO date}, description?, location?, attendees?:
923
- * [{email, isOptional?}]}.
924
- * Creating any review only presents these drafts; the user acts separately.
925
- */
926
- drafts: Array<unknown>;
1357
+ [key: string]: unknown;
1358
+ } & {
927
1359
  executionId?: null | ExecutionId;
928
- /**
929
- * Existing UI and action to use.
930
- */
931
- kind: ReviewKind;
932
1360
  /**
933
1361
  * Stack label.
934
1362
  */
@@ -964,6 +1392,10 @@ export type CreateSessionThread = {
964
1392
  */
965
1393
  threadId?: string | null;
966
1394
  };
1395
+ /**
1396
+ * Surface of a review decision.
1397
+ */
1398
+ export type DecisionVia = 'card' | 'chat' | 'inbox';
967
1399
  /**
968
1400
  * HTTP request selecting one provider to probe.
969
1401
  */
@@ -991,11 +1423,91 @@ export type DiscoverAgentCapabilitiesResponse = {
991
1423
  configOptions: Array<AgentConfigOptionDto>;
992
1424
  };
993
1425
  /**
994
- * A validated document identifier. Historical document ids need not be UUIDs.
995
- */
996
- export type DocumentId = string;
997
- /**
998
- * Request body for editing a queued prompt.
1426
+ * Discovery metadata and optional markup for a user-controlled auth flow.
1427
+ */
1428
+ export type DiscoverConnectorsResponse = {
1429
+ /**
1430
+ * Include verbatim only if an advertised tool supports the requested task.
1431
+ */
1432
+ connect_markup?: string | null;
1433
+ /**
1434
+ * Catalog or capability results.
1435
+ */
1436
+ result: DiscoveryResult;
1437
+ };
1438
+ /**
1439
+ * A verified app identity from the directory.
1440
+ */
1441
+ export type DiscoveredApp = {
1442
+ /**
1443
+ * Exact identity to inspect or connect.
1444
+ */
1445
+ app_slug: string;
1446
+ /**
1447
+ * Directory description; inspect tools to verify specific capabilities.
1448
+ */
1449
+ description?: string | null;
1450
+ /**
1451
+ * Human-readable app name.
1452
+ */
1453
+ name: string;
1454
+ };
1455
+ /**
1456
+ * Search by app name, then inspect a returned slug before recommending auth.
1457
+ */
1458
+ export type DiscoveryRequest = {
1459
+ operation: 'search';
1460
+ /**
1461
+ * App name, e.g. "Notion" or "Linear", not a task description.
1462
+ */
1463
+ query: string;
1464
+ } | {
1465
+ /**
1466
+ * Exact app slug from search results.
1467
+ */
1468
+ app_slug: string;
1469
+ operation: 'inspect';
1470
+ };
1471
+ /**
1472
+ * Discovery results never execute tools or change connections.
1473
+ */
1474
+ export type DiscoveryResult = {
1475
+ /**
1476
+ * Matching apps.
1477
+ */
1478
+ apps: Array<DiscoveredApp>;
1479
+ /**
1480
+ * Narrow the app name if this is true.
1481
+ */
1482
+ more_results: boolean;
1483
+ operation: 'search';
1484
+ } | {
1485
+ /**
1486
+ * App from the directory.
1487
+ */
1488
+ app: DiscoveredApp;
1489
+ /**
1490
+ * Whether this caller has an enabled connection. For an app that
1491
+ * connects through its own MCP server, that connection is checked
1492
+ * there, not in Pipedream.
1493
+ */
1494
+ connected: boolean;
1495
+ operation: 'inspect';
1496
+ /**
1497
+ * Advertised tools. Use SearchTools after connecting to load them.
1498
+ */
1499
+ tools: Array<ConnectorTool>;
1500
+ /**
1501
+ * True when some advertised tools were omitted.
1502
+ */
1503
+ tools_truncated: boolean;
1504
+ };
1505
+ /**
1506
+ * A validated document identifier. Historical document ids need not be UUIDs.
1507
+ */
1508
+ export type DocumentId = string;
1509
+ /**
1510
+ * Request body for editing a queued prompt.
999
1511
  */
1000
1512
  export type EditQueuedActionRequest = {
1001
1513
  /**
@@ -1043,11 +1555,51 @@ export type ElicitationContentValue = string | boolean | number | number | Array
1043
1555
  */
1044
1556
  export type ElicitationRequestId = number | string;
1045
1557
  /**
1046
- * A JSON body is required on writes, including start/disconnect (no form-based CSRF).
1558
+ * Email search exposes importance and connected inbox addresses, not sender filters.
1047
1559
  */
1048
- export type EmptyRequest = {
1049
- [key: string]: never;
1560
+ export type EmailSearchSuggestions = {
1561
+ /**
1562
+ * Explicit importance wording, resolved by the client.
1563
+ */
1564
+ importance?: string | null;
1565
+ /**
1566
+ * Explicit connected inbox addresses, resolved by the client.
1567
+ */
1568
+ inboxes: Array<string>;
1569
+ /**
1570
+ * Remaining keyword phrase.
1571
+ */
1572
+ query?: string | null;
1050
1573
  };
1574
+ /**
1575
+ * Editable fields for email inference, before submission and identity resolution.
1576
+ */
1577
+ export type EmailSuggestions = {
1578
+ /**
1579
+ * Explicit blind-carbon-copy recipient names or supplied email addresses.
1580
+ */
1581
+ bcc?: Array<string>;
1582
+ /**
1583
+ * Suggested Markdown content or outgoing message body.
1584
+ */
1585
+ body?: string | null;
1586
+ /**
1587
+ * Explicit carbon-copy recipient names or supplied email addresses.
1588
+ */
1589
+ cc?: Array<string>;
1590
+ /**
1591
+ * Person or channel names for the client to resolve.
1592
+ */
1593
+ recipients?: Array<string>;
1594
+ /**
1595
+ * Suggested outgoing email subject.
1596
+ */
1597
+ subject?: string | null;
1598
+ };
1599
+ /**
1600
+ * The type of an entity in Macro
1601
+ */
1602
+ export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'crm_pipeline' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action' | 'initiative' | 'database' | 'database_row' | 'form' | 'external_chat';
1051
1603
  /**
1052
1604
  * A bounded SDK operation observed during execution; not an authorization or write receipt.
1053
1605
  */
@@ -1074,6 +1626,7 @@ export type ExecutionId = string;
1074
1626
  * The full journal is not included in the model's tool result.
1075
1627
  */
1076
1628
  export type ExecutionRecord = {
1629
+ actingAs?: null | ToolActor;
1077
1630
  /**
1078
1631
  * Advisory SDK operation activity, without arguments or response contents.
1079
1632
  */
@@ -1106,6 +1659,10 @@ export type ExecutionRecord = {
1106
1659
  * Overall execution state.
1107
1660
  */
1108
1661
  status: ExecutionStatus;
1662
+ /**
1663
+ * Original turn, preventing another requester from replaying a saved result.
1664
+ */
1665
+ turnId?: string | null;
1109
1666
  };
1110
1667
  /**
1111
1668
  * The recorded outcome of a program.
@@ -1128,6 +1685,45 @@ export type ExternalSessionResponse = {
1128
1685
  */
1129
1686
  url?: string | null;
1130
1687
  };
1688
+ /**
1689
+ * Draft snapshot and local context used to suggest editable destination fields.
1690
+ */
1691
+ export type ExtractInputRequest = {
1692
+ /**
1693
+ * Destination whose fields should be extracted.
1694
+ */
1695
+ intent: InputIntent;
1696
+ /**
1697
+ * Available task fields and display values, never authorized entity IDs.
1698
+ */
1699
+ property_definitions?: Array<InputPropertyDefinition>;
1700
+ /**
1701
+ * Reference instant for interpreting relative dates.
1702
+ */
1703
+ reference_time: string;
1704
+ /**
1705
+ * Opaque client revision used to discard stale suggestions.
1706
+ */
1707
+ revision: number;
1708
+ search_type?: null | SearchType;
1709
+ /**
1710
+ * Original draft text; inference must not execute its instructions.
1711
+ */
1712
+ text: string;
1713
+ /**
1714
+ * IANA timezone for interpreting local dates and clock times.
1715
+ */
1716
+ time_zone: string;
1717
+ };
1718
+ /**
1719
+ * Validated suggestions for a particular client draft revision.
1720
+ */
1721
+ export type ExtractInputResponse = InputSuggestions & {
1722
+ /**
1723
+ * Revision echoed from the extraction request.
1724
+ */
1725
+ revision: number;
1726
+ };
1131
1727
  /**
1132
1728
  * What happened to a file, on the wire.
1133
1729
  */
@@ -1145,6 +1741,111 @@ export type GitRefDto = {
1145
1741
  */
1146
1742
  sha?: string | null;
1147
1743
  };
1744
+ /**
1745
+ * A destination the composer can prepare, but never execute through inference.
1746
+ */
1747
+ export type InputIntent = 'ai' | 'search' | 'email' | 'note' | 'task' | 'calendar' | 'message';
1748
+ /**
1749
+ * A task property and the display values available for extraction.
1750
+ */
1751
+ export type InputPropertyDefinition = {
1752
+ /**
1753
+ * Property display name from the client's catalog.
1754
+ */
1755
+ name: string;
1756
+ /**
1757
+ * Allowed display values; an empty list permits free-text suggestions.
1758
+ */
1759
+ options?: Array<string>;
1760
+ };
1761
+ /**
1762
+ * Suggested display values to resolve against a real task-property catalog.
1763
+ */
1764
+ export type InputPropertySuggestion = {
1765
+ /**
1766
+ * Property display name, never an authorized identifier.
1767
+ */
1768
+ name: string;
1769
+ /**
1770
+ * Suggested display values, never authorized entity identifiers.
1771
+ */
1772
+ values: Array<string>;
1773
+ };
1774
+ /**
1775
+ * A single inferred destination together with only its applicable fields.
1776
+ */
1777
+ export type InputSuggestions = {
1778
+ intent: 'ai';
1779
+ /**
1780
+ * Editable ai fields.
1781
+ */
1782
+ suggestions: AiSuggestions;
1783
+ } | {
1784
+ intent: 'search';
1785
+ /**
1786
+ * Editable search fields.
1787
+ */
1788
+ suggestions: SearchSuggestions;
1789
+ } | {
1790
+ intent: 'email';
1791
+ /**
1792
+ * Editable email fields.
1793
+ */
1794
+ suggestions: EmailSuggestions;
1795
+ } | {
1796
+ intent: 'note';
1797
+ /**
1798
+ * Editable note fields.
1799
+ */
1800
+ suggestions: NoteSuggestions;
1801
+ } | {
1802
+ intent: 'task';
1803
+ /**
1804
+ * Editable task fields.
1805
+ */
1806
+ suggestions: TaskSuggestions;
1807
+ } | {
1808
+ intent: 'calendar';
1809
+ /**
1810
+ * Editable calendar fields.
1811
+ */
1812
+ suggestions: CalendarSuggestions;
1813
+ } | {
1814
+ intent: 'message';
1815
+ /**
1816
+ * Editable message fields.
1817
+ */
1818
+ suggestions: MessageSuggestions;
1819
+ };
1820
+ /**
1821
+ * Independent yes/no probabilities; these do not sum to one.
1822
+ */
1823
+ export type IntentScore = {
1824
+ /**
1825
+ * Destination evaluated by the classifier.
1826
+ */
1827
+ intent: InputIntent;
1828
+ /**
1829
+ * Independent probability between zero and one.
1830
+ */
1831
+ score: number;
1832
+ };
1833
+ /**
1834
+ * Where an acting agent's work came from.
1835
+ */
1836
+ export type Lineage = {
1837
+ /**
1838
+ * The first non-agent cause of its work.
1839
+ */
1840
+ root: Root;
1841
+ /**
1842
+ * The acting session.
1843
+ */
1844
+ session: string;
1845
+ type: 'session';
1846
+ } | {
1847
+ type: 'unattributed';
1848
+ };
1148
1849
  /**
1149
1850
  * Defines who can access an item through its share link.
1150
1851
  */
@@ -1182,7 +1883,7 @@ export type LoadAgentModelsResponse = {
1182
1883
  /**
1183
1884
  * Which way a logged frame travelled, mirroring [`Message`]'s discriminant.
1184
1885
  */
1185
- export type LogDirectionDto = 'to_server' | 'to_runtime';
1886
+ export type LogDirectionDto = 'notification' | 'to_server' | 'to_runtime';
1186
1887
  /**
1187
1888
  * The two fields [`AgentSessionLogEntryDto`] flattens in.
1188
1889
  *
@@ -1205,6 +1906,7 @@ export type LogFrameDto = {
1205
1906
  */
1206
1907
  direction: LogDirectionDto;
1207
1908
  };
1909
+ export type MacroUserIdStr = string;
1208
1910
  /**
1209
1911
  * The entity whose permissions and lifecycle govern a message.
1210
1912
  */
@@ -1245,10 +1947,49 @@ export type MessageParent = {
1245
1947
  id: string;
1246
1948
  type: 'call';
1247
1949
  };
1950
+ /**
1951
+ * Editable fields for message inference, before submission and identity resolution.
1952
+ */
1953
+ export type MessageSuggestions = {
1954
+ /**
1955
+ * Suggested Markdown content or outgoing message body.
1956
+ */
1957
+ body?: string | null;
1958
+ /**
1959
+ * Person or channel names for the client to resolve.
1960
+ */
1961
+ recipients?: Array<string>;
1962
+ };
1248
1963
  /**
1249
1964
  * Harness names accepted by the model discovery endpoint.
1250
1965
  */
1251
- export type ModelHarnessDto = 'in-memory' | 'cursor' | 'claude-cloud' | 'macrod';
1966
+ export type ModelHarnessDto = 'in-memory' | 'cursor' | 'macrod';
1967
+ /**
1968
+ * Monthly ordinal weekday, such as the first Friday.
1969
+ */
1970
+ export type MonthlyWeekday = {
1971
+ /**
1972
+ * One through five, or minus one for last.
1973
+ */
1974
+ ordinal: number;
1975
+ /**
1976
+ * Weekday selected by the ordinal.
1977
+ */
1978
+ weekday: WeekdayCode;
1979
+ };
1980
+ /**
1981
+ * Editable fields for note inference, before submission and identity resolution.
1982
+ */
1983
+ export type NoteSuggestions = {
1984
+ /**
1985
+ * Suggested Markdown content or outgoing message body.
1986
+ */
1987
+ body?: string | null;
1988
+ /**
1989
+ * Suggested note, task, or event title.
1990
+ */
1991
+ title?: string | null;
1992
+ };
1252
1993
  /**
1253
1994
  * The decision carried by an [`AgentPermissionAction`].
1254
1995
  */
@@ -1261,6 +2002,19 @@ export type PermissionAnswer = {
1261
2002
  } | {
1262
2003
  kind: 'cancelled';
1263
2004
  };
2005
+ /**
2006
+ * A view to present.
2007
+ */
2008
+ export type PresentView = {
2009
+ executionId?: null | ExecutionId;
2010
+ /**
2011
+ * A dynamic-UI view, in the format of the PresentView schema in
2012
+ * ExecuteCode's description.
2013
+ */
2014
+ view: {
2015
+ [key: string]: unknown;
2016
+ };
2017
+ };
1264
2018
  /**
1265
2019
  * Request body for `POST /agent-sessions/preview`.
1266
2020
  *
@@ -1390,6 +2144,15 @@ export type PullRequestsSessionsResponse = {
1390
2144
  */
1391
2145
  pullRequests: Array<PullRequestSessions>;
1392
2146
  };
2147
+ /**
2148
+ * A topic for search types without additional supported facets.
2149
+ */
2150
+ export type QuerySearchSuggestions = {
2151
+ /**
2152
+ * Remaining keyword phrase after supported filters and instructions.
2153
+ */
2154
+ query?: string | null;
2155
+ };
1393
2156
  /**
1394
2157
  * One action waiting in a session's queue.
1395
2158
  *
@@ -1461,6 +2224,50 @@ export type RecordedToolCall = {
1461
2224
  */
1462
2225
  status: RecordedCallStatus;
1463
2226
  };
2227
+ /**
2228
+ * Resolved recurrence ending condition accepted by the shared calendar editor.
2229
+ */
2230
+ export type RecurrenceEnd = {
2231
+ kind: 'never';
2232
+ } | {
2233
+ /**
2234
+ * Positive occurrence count.
2235
+ */
2236
+ count: number;
2237
+ kind: 'after';
2238
+ } | {
2239
+ /**
2240
+ * Date resolved against the request's clock and timezone.
2241
+ */
2242
+ date: string;
2243
+ kind: 'on';
2244
+ };
2245
+ /**
2246
+ * Repetition units supported by the shared calendar editor.
2247
+ */
2248
+ export type RecurrenceFrequency = 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';
2249
+ /**
2250
+ * Resolved, editable repetition values; the existing calendar serializer builds RRULEs.
2251
+ */
2252
+ export type RecurrenceSuggestion = {
2253
+ /**
2254
+ * Weekly weekday selectors.
2255
+ */
2256
+ by_day: Array<WeekdayCode>;
2257
+ /**
2258
+ * Resolved ending condition.
2259
+ */
2260
+ ends: RecurrenceEnd;
2261
+ /**
2262
+ * Repetition unit.
2263
+ */
2264
+ frequency: RecurrenceFrequency;
2265
+ /**
2266
+ * Positive interval.
2267
+ */
2268
+ interval: number;
2269
+ monthly_by_day?: null | MonthlyWeekday;
2270
+ };
1464
2271
  /**
1465
2272
  * Request body for renaming an agent session.
1466
2273
  */
@@ -1485,9 +2292,11 @@ export type RetryAgentConversationTurnRequest = {
1485
2292
  export type ReviewDecision = {
1486
2293
  action: 'edit';
1487
2294
  /**
1488
- * Replacement action arguments.
2295
+ * Replacement action arguments, keyed by the review's kind.
1489
2296
  */
1490
- draft: unknown;
2297
+ draft: {
2298
+ [key: string]: unknown;
2299
+ };
1491
2300
  /**
1492
2301
  * Pending item to update.
1493
2302
  */
@@ -1518,68 +2327,46 @@ export type ReviewDecision = {
1518
2327
  revision: number;
1519
2328
  };
1520
2329
  /**
1521
- * Persisted review identity.
1522
- */
1523
- export type ReviewId = string;
1524
- /**
1525
- * One editable item and its durable outcome.
2330
+ * Facts about the most recent account-holder decision.
1526
2331
  */
1527
- export type ReviewItem = {
2332
+ export type ReviewDecisionContext = {
1528
2333
  /**
1529
- * Validated arguments for the existing composer/action.
2334
+ * Authenticated account holder.
1530
2335
  */
1531
- draft: unknown;
1532
- /**
1533
- * Failure or uncertainty description.
1534
- */
1535
- error?: string | null;
2336
+ by: string;
1536
2337
  /**
1537
- * Stable item identity across stack navigation and edits.
2338
+ * Items selected by this decision.
1538
2339
  */
1539
- id: string;
2340
+ items: Array<string>;
1540
2341
  /**
1541
- * Actual backend response, never a model assertion.
2342
+ * Revision claimed by this batch, used in notification deduplication.
1542
2343
  */
1543
- result?: unknown;
2344
+ revision: number;
1544
2345
  /**
1545
- * Current outcome.
2346
+ * Entry surface.
1546
2347
  */
1547
- status: ReviewItemStatus;
2348
+ via: DecisionVia;
1548
2349
  };
1549
2350
  /**
1550
- * A review item never retries an ambiguous external result automatically.
1551
- */
1552
- export type ReviewItemStatus = 'pending' | 'submitting' | 'completed' | 'dismissed' | 'unknown';
1553
- /**
1554
- * The component and action used to finish a review.
2351
+ * Persisted review identity.
1555
2352
  */
1556
- export type ReviewKind = 'email' | 'calendar';
2353
+ export type ReviewId = string;
1557
2354
  /**
1558
2355
  * Full UI record, fetched outside the model context.
1559
2356
  */
1560
2357
  export type ReviewRecord = {
2358
+ [key: string]: unknown;
2359
+ } & {
2360
+ /**
2361
+ * Account whose email/calendar the drafts use.
2362
+ */
2363
+ actingUser: string;
2364
+ decision?: null | ReviewDecisionContext;
1561
2365
  executionId?: null | ExecutionId;
1562
2366
  /**
1563
2367
  * Review identity.
1564
2368
  */
1565
2369
  id: ReviewId;
1566
- /**
1567
- * Drafts and per-item outcomes.
1568
- */
1569
- items: Array<ReviewItem>;
1570
- /**
1571
- * Component kind.
1572
- */
1573
- kind: ReviewKind;
1574
- /**
1575
- * Most recent delivery claim, allowing retry after a replica stops.
1576
- */
1577
- notificationAttemptAt?: number | null;
1578
- /**
1579
- * Stable queued-action identity until the outcome has reached the session.
1580
- * A failed notification may be retried without repeating external actions.
1581
- */
1582
- notificationId?: string | null;
1583
2370
  /**
1584
2371
  * Durable presentation acknowledgment, separate from user decisions.
1585
2372
  */
@@ -1601,6 +2388,37 @@ export type ReviewRecord = {
1601
2388
  */
1602
2389
  updatedAt: number;
1603
2390
  };
2391
+ /**
2392
+ * The first non-agent cause. An agent cannot be one, so a chain always ends
2393
+ * at a person or a routine.
2394
+ */
2395
+ export type Root = {
2396
+ type: 'person';
2397
+ /**
2398
+ * Who.
2399
+ */
2400
+ user: MacroUserIdStr;
2401
+ } | {
2402
+ /**
2403
+ * The routine.
2404
+ */
2405
+ routine: string;
2406
+ type: 'routine';
2407
+ };
2408
+ /**
2409
+ * What made a routine fire.
2410
+ */
2411
+ export type RoutineCause = {
2412
+ type: 'scheduled';
2413
+ } | {
2414
+ type: 'manual';
2415
+ } | {
2416
+ /**
2417
+ * The event.
2418
+ */
2419
+ event_id: string;
2420
+ type: 'event';
2421
+ };
1604
2422
  /**
1605
2423
  * Named compute tier for a managed sandbox.
1606
2424
  *
@@ -1617,6 +2435,50 @@ export type SandboxSizeBody = {
1617
2435
  */
1618
2436
  size: SandboxSize;
1619
2437
  };
2438
+ /**
2439
+ * Only the selected type's fields can appear in a search suggestion.
2440
+ */
2441
+ export type SearchSuggestions = (QuerySearchSuggestions & {
2442
+ type: 'all';
2443
+ }) | (ChannelSearchSuggestions & {
2444
+ type: 'channels';
2445
+ }) | (QuerySearchSuggestions & {
2446
+ type: 'document-or-file';
2447
+ }) | (TaskSearchSuggestions & {
2448
+ type: 'task';
2449
+ }) | (EmailSearchSuggestions & {
2450
+ type: 'email';
2451
+ }) | (CallSearchSuggestions & {
2452
+ type: 'calls';
2453
+ }) | (QuerySearchSuggestions & {
2454
+ type: 'folders';
2455
+ }) | (QuerySearchSuggestions & {
2456
+ type: 'agent';
2457
+ }) | (QuerySearchSuggestions & {
2458
+ type: 'calendar';
2459
+ });
2460
+ /**
2461
+ * Search indexes supported by the shared search editor.
2462
+ */
2463
+ export type SearchType = 'all' | 'channels' | 'document-or-file' | 'task' | 'email' | 'calls' | 'folders' | 'agent' | 'calendar';
2464
+ /**
2465
+ * A session's auto-archive settings and history.
2466
+ */
2467
+ export type SessionAutoArchiveResponse = {
2468
+ /**
2469
+ * When a trigger first archived the session. Kept when a person restores it: a session
2470
+ * archives itself at most once.
2471
+ */
2472
+ autoArchivedAt?: string | null;
2473
+ /**
2474
+ * The owner's defaults, which apply where the session has no choice of its own.
2475
+ */
2476
+ defaults: AutoArchivePreferencesBody;
2477
+ /**
2478
+ * The session's own choices.
2479
+ */
2480
+ overrides: AutoArchiveOverridesBody;
2481
+ };
1620
2482
  /**
1621
2483
  * The agent behind a session, as much of it as rendering a message needs.
1622
2484
  */
@@ -1692,9 +2554,9 @@ export type SessionStatusDto = {
1692
2554
  */
1693
2555
  export type SetAgentSessionArchivedRequest = {
1694
2556
  /**
1695
- * The requested archive state.
2557
+ * Archive the session, or restore it.
1696
2558
  */
1697
- isArchived: boolean;
2559
+ archived: boolean;
1698
2560
  };
1699
2561
  export type SharePermissionV2 = {
1700
2562
  /**
@@ -1723,39 +2585,55 @@ export type StartFreshAgentConversationRequest = {
1723
2585
  sessionId: string;
1724
2586
  };
1725
2587
  /**
1726
- * Public PKCE challenge and attempt handle; contains no verifier or provider tokens.
2588
+ * Task facets match the shared search editor; assignee and creator are distinct.
1727
2589
  */
1728
- export type StartResponse = {
2590
+ export type TaskSearchSuggestions = {
2591
+ /**
2592
+ * Assigned people's names or supplied addresses.
2593
+ */
2594
+ assignees: Array<string>;
1729
2595
  /**
1730
- * Opaque owner-bound attempt handle.
2596
+ * Task creators' names or supplied addresses.
1731
2597
  */
1732
- attemptId: string;
2598
+ created_by: Array<string>;
1733
2599
  /**
1734
- * Claude-hosted consent page.
2600
+ * Priority display values for client-side option resolution.
1735
2601
  */
1736
- authorizationUrl: string;
2602
+ priority: Array<string>;
1737
2603
  /**
1738
- * Attempt lifetime in seconds.
2604
+ * Remaining keyword phrase.
1739
2605
  */
1740
- expiresIn: number;
2606
+ query?: string | null;
2607
+ /**
2608
+ * Status display values for client-side option resolution.
2609
+ */
2610
+ status: Array<string>;
1741
2611
  };
1742
2612
  /**
1743
- * Safe connection metadata.
2613
+ * Editable fields for task inference, before submission and identity resolution.
1744
2614
  */
1745
- export type StatusResponse = {
2615
+ export type TaskSuggestions = {
1746
2616
  /**
1747
- * Whether the authenticated Macro user has connected.
2617
+ * Suggested Markdown content or outgoing message body.
1748
2618
  */
1749
- connected: boolean;
2619
+ body?: string | null;
1750
2620
  /**
1751
- * Whether this deployment supports browser connection.
2621
+ * Task deadline as a local ISO date.
1752
2622
  */
1753
- enabled: boolean;
2623
+ due_date?: string | null;
2624
+ /**
2625
+ * Display names/values that the client resolves against available task fields.
2626
+ */
2627
+ properties?: Array<InputPropertySuggestion>;
1754
2628
  /**
1755
- * Whether reconnecting after service restart is required.
2629
+ * Suggested note, task, or event title.
1756
2630
  */
1757
- ephemeral: boolean;
2631
+ title?: string | null;
1758
2632
  };
2633
+ /**
2634
+ * Which authenticated participant's access a tool call requests.
2635
+ */
2636
+ export type ToolActor = 'requester' | 'owner';
1759
2637
  /**
1760
2638
  * How a person answers a held tool call.
1761
2639
  */
@@ -1764,6 +2642,78 @@ export type ToolApprovalAnswerDto = 'approve' | 'approve_and_remember' | 'deny'
1764
2642
  * Where a held tool call stands once answered.
1765
2643
  */
1766
2644
  export type ToolApprovalStatusDto = 'pending' | 'approved' | 'denied' | 'cancelled' | 'expired';
2645
+ /**
2646
+ * What opened a session.
2647
+ */
2648
+ export type TriggerOrigin = {
2649
+ /**
2650
+ * Who posted it.
2651
+ */
2652
+ by: Caller;
2653
+ /**
2654
+ * The message.
2655
+ */
2656
+ message_id: string;
2657
+ origin: 'mentioned';
2658
+ } | {
2659
+ /**
2660
+ * Who wrote.
2661
+ */
2662
+ by: MacroUserIdStr;
2663
+ /**
2664
+ * The message.
2665
+ */
2666
+ message_id: string;
2667
+ origin: 'conversation';
2668
+ } | {
2669
+ /**
2670
+ * Who assigned it.
2671
+ */
2672
+ by: Caller;
2673
+ origin: 'task_assigned';
2674
+ /**
2675
+ * The task.
2676
+ */
2677
+ task: string;
2678
+ } | {
2679
+ /**
2680
+ * Who added the task to the project.
2681
+ */
2682
+ by: Caller;
2683
+ origin: 'project_inherited';
2684
+ /**
2685
+ * The project.
2686
+ */
2687
+ project: string;
2688
+ /**
2689
+ * The task.
2690
+ */
2691
+ task: string;
2692
+ } | {
2693
+ /**
2694
+ * Who opened it.
2695
+ */
2696
+ by: MacroUserIdStr;
2697
+ origin: 'requested';
2698
+ } | {
2699
+ /**
2700
+ * The user whose authority the work runs under.
2701
+ */
2702
+ on_behalf_of: MacroUserIdStr;
2703
+ origin: 'dispatched';
2704
+ } | {
2705
+ /**
2706
+ * What made it fire.
2707
+ */
2708
+ firing: RoutineCause;
2709
+ origin: 'routine';
2710
+ /**
2711
+ * The routine.
2712
+ */
2713
+ routine: string;
2714
+ } | {
2715
+ origin: 'unknown';
2716
+ };
1767
2717
  export type UpdateChannelSharePermission = {
1768
2718
  accessLevel?: null | AccessLevel;
1769
2719
  /**
@@ -1801,17 +2751,72 @@ export type WarmAgentSessionRequest = {
1801
2751
  export type WarmAgentSessionResponse = {
1802
2752
  session?: null | AgentSessionResponse;
1803
2753
  };
1804
- /**
1805
- * Just a session id, for the preview variants that carry nothing else.
1806
- *
1807
- * Clients deserialize this, so both derives are used.
1808
- */
1809
- export type WithAgentSessionId = {
1810
- /**
1811
- * The session id.
1812
- */
1813
- id: string;
2754
+ /**
2755
+ * RFC weekday values used by the existing recurrence UI.
2756
+ */
2757
+ export type WeekdayCode = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU';
2758
+ /**
2759
+ * Just a session id, for the preview variants that carry nothing else.
2760
+ *
2761
+ * Clients deserialize this, so both derives are used.
2762
+ */
2763
+ export type WithAgentSessionId = {
2764
+ /**
2765
+ * The session id.
2766
+ */
2767
+ id: string;
2768
+ };
2769
+ /**
2770
+ * One account's active registration of one session as its work.
2771
+ */
2772
+ export type WorkRegistrationResponse = {
2773
+ /**
2774
+ * The account whose work this is.
2775
+ */
2776
+ accountId: string;
2777
+ /**
2778
+ * The session registered.
2779
+ */
2780
+ agentSessionId: string;
2781
+ /**
2782
+ * The registration.
2783
+ */
2784
+ id: string;
2785
+ /**
2786
+ * When the account registered it.
2787
+ */
2788
+ registeredAt: string;
2789
+ };
2790
+ export type GetAgentAutoArchivePreferencesData = {
2791
+ body?: never;
2792
+ path?: never;
2793
+ query?: never;
2794
+ url: '/agent-auto-archive-preferences';
2795
+ };
2796
+ export type GetAgentAutoArchivePreferencesErrors = {
2797
+ 401: string;
2798
+ 500: string;
2799
+ };
2800
+ export type GetAgentAutoArchivePreferencesError = GetAgentAutoArchivePreferencesErrors[keyof GetAgentAutoArchivePreferencesErrors];
2801
+ export type GetAgentAutoArchivePreferencesResponses = {
2802
+ 200: AutoArchivePreferencesBody;
2803
+ };
2804
+ export type GetAgentAutoArchivePreferencesResponse = GetAgentAutoArchivePreferencesResponses[keyof GetAgentAutoArchivePreferencesResponses];
2805
+ export type PutAgentAutoArchivePreferencesData = {
2806
+ body: AutoArchivePreferencesBody;
2807
+ path?: never;
2808
+ query?: never;
2809
+ url: '/agent-auto-archive-preferences';
2810
+ };
2811
+ export type PutAgentAutoArchivePreferencesErrors = {
2812
+ 401: string;
2813
+ 500: string;
2814
+ };
2815
+ export type PutAgentAutoArchivePreferencesError = PutAgentAutoArchivePreferencesErrors[keyof PutAgentAutoArchivePreferencesErrors];
2816
+ export type PutAgentAutoArchivePreferencesResponses = {
2817
+ 200: AutoArchivePreferencesBody;
1814
2818
  };
2819
+ export type PutAgentAutoArchivePreferencesResponse = PutAgentAutoArchivePreferencesResponses[keyof PutAgentAutoArchivePreferencesResponses];
1815
2820
  export type DiscoverAgentCapabilitiesHandlerData = {
1816
2821
  body: DiscoverAgentCapabilitiesRequest;
1817
2822
  path?: never;
@@ -1972,6 +2977,41 @@ export type RetryAgentConversationTurnResponses = {
1972
2977
  204: void;
1973
2978
  };
1974
2979
  export type RetryAgentConversationTurnResponse = RetryAgentConversationTurnResponses[keyof RetryAgentConversationTurnResponses];
2980
+ export type ChooseAgentModeData = {
2981
+ body: AgentModeChoiceRequest;
2982
+ path?: never;
2983
+ query?: never;
2984
+ url: '/agent-mode-choice';
2985
+ };
2986
+ export type ChooseAgentModeErrors = {
2987
+ /**
2988
+ * The prompt is blank
2989
+ */
2990
+ 400: unknown;
2991
+ /**
2992
+ * Unauthenticated
2993
+ */
2994
+ 401: unknown;
2995
+ /**
2996
+ * The caller cannot start new AI work
2997
+ */
2998
+ 402: unknown;
2999
+ /**
3000
+ * Auto mode is not enabled for the caller
3001
+ */
3002
+ 403: unknown;
3003
+ /**
3004
+ * The classifier is unconfigured, failed, or timed out
3005
+ */
3006
+ 503: unknown;
3007
+ };
3008
+ export type ChooseAgentModeResponses = {
3009
+ /**
3010
+ * The kind of agent the prompt goes to
3011
+ */
3012
+ 200: AgentModeChoiceResponse;
3013
+ };
3014
+ export type ChooseAgentModeResponse = ChooseAgentModeResponses[keyof ChooseAgentModeResponses];
1975
3015
  export type LoadAgentModelsHandlerData = {
1976
3016
  body: LoadAgentModelsRequest;
1977
3017
  path?: never;
@@ -2235,6 +3275,74 @@ export type GetAgentSessionResponses = {
2235
3275
  200: AgentSessionResponse;
2236
3276
  };
2237
3277
  export type GetAgentSessionResponse = GetAgentSessionResponses[keyof GetAgentSessionResponses];
3278
+ export type GetAgentSessionActivityData = {
3279
+ body?: never;
3280
+ path: {
3281
+ session_id: string;
3282
+ };
3283
+ query?: {
3284
+ /**
3285
+ * Restrict activity to one code-mode invocation within this session.
3286
+ */
3287
+ agentCorrelationId?: string | null;
3288
+ /**
3289
+ * Cursor timestamp from the previous page.
3290
+ */
3291
+ beforeAt?: string | null;
3292
+ /**
3293
+ * Cursor activity ID from the previous page.
3294
+ */
3295
+ beforeId?: string | null;
3296
+ /**
3297
+ * Page size, from 1 to 100; defaults to 50.
3298
+ */
3299
+ limit?: number | null;
3300
+ };
3301
+ url: '/agent-sessions/{session_id}/activity';
3302
+ };
3303
+ export type GetAgentSessionActivityErrors = {
3304
+ 400: unknown;
3305
+ 401: unknown;
3306
+ 403: unknown;
3307
+ };
3308
+ export type GetAgentSessionActivityResponses = {
3309
+ 200: AgentActivityPage;
3310
+ };
3311
+ export type GetAgentSessionActivityResponse = GetAgentSessionActivityResponses[keyof GetAgentSessionActivityResponses];
3312
+ export type ReportAgentSessionAppConnectedData = {
3313
+ body: AppConnectedRequest;
3314
+ path: {
3315
+ /**
3316
+ * ID of the agent session
3317
+ */
3318
+ session_id: string;
3319
+ };
3320
+ query?: never;
3321
+ url: '/agent-sessions/{session_id}/app-connections';
3322
+ };
3323
+ export type ReportAgentSessionAppConnectedErrors = {
3324
+ 401: string;
3325
+ /**
3326
+ * Not the session's owner, or no edit access
3327
+ */
3328
+ 403: string;
3329
+ /**
3330
+ * The session is archived
3331
+ */
3332
+ 409: string;
3333
+ /**
3334
+ * The owner has not connected that app
3335
+ */
3336
+ 422: string;
3337
+ 500: string;
3338
+ };
3339
+ export type ReportAgentSessionAppConnectedError = ReportAgentSessionAppConnectedErrors[keyof ReportAgentSessionAppConnectedErrors];
3340
+ export type ReportAgentSessionAppConnectedResponses = {
3341
+ /**
3342
+ * The session continues once it is idle
3343
+ */
3344
+ 202: unknown;
3345
+ };
2238
3346
  export type SetAgentSessionArchivedData = {
2239
3347
  body: SetAgentSessionArchivedRequest;
2240
3348
  path: {
@@ -2260,6 +3368,48 @@ export type SetAgentSessionArchivedResponses = {
2260
3368
  204: void;
2261
3369
  };
2262
3370
  export type SetAgentSessionArchivedResponse = SetAgentSessionArchivedResponses[keyof SetAgentSessionArchivedResponses];
3371
+ export type GetAgentSessionAutoArchiveData = {
3372
+ body?: never;
3373
+ path: {
3374
+ /**
3375
+ * ID of the agent session
3376
+ */
3377
+ session_id: string;
3378
+ };
3379
+ query?: never;
3380
+ url: '/agent-sessions/{session_id}/auto-archive';
3381
+ };
3382
+ export type GetAgentSessionAutoArchiveErrors = {
3383
+ 401: string;
3384
+ 403: string;
3385
+ 500: string;
3386
+ };
3387
+ export type GetAgentSessionAutoArchiveError = GetAgentSessionAutoArchiveErrors[keyof GetAgentSessionAutoArchiveErrors];
3388
+ export type GetAgentSessionAutoArchiveResponses = {
3389
+ 200: SessionAutoArchiveResponse;
3390
+ };
3391
+ export type GetAgentSessionAutoArchiveResponse = GetAgentSessionAutoArchiveResponses[keyof GetAgentSessionAutoArchiveResponses];
3392
+ export type PutAgentSessionAutoArchiveData = {
3393
+ body: AutoArchiveOverridesBody;
3394
+ path: {
3395
+ /**
3396
+ * ID of the agent session
3397
+ */
3398
+ session_id: string;
3399
+ };
3400
+ query?: never;
3401
+ url: '/agent-sessions/{session_id}/auto-archive';
3402
+ };
3403
+ export type PutAgentSessionAutoArchiveErrors = {
3404
+ 401: string;
3405
+ 403: string;
3406
+ 500: string;
3407
+ };
3408
+ export type PutAgentSessionAutoArchiveError = PutAgentSessionAutoArchiveErrors[keyof PutAgentSessionAutoArchiveErrors];
3409
+ export type PutAgentSessionAutoArchiveResponses = {
3410
+ 200: AutoArchiveOverridesBody;
3411
+ };
3412
+ export type PutAgentSessionAutoArchiveResponse = PutAgentSessionAutoArchiveResponses[keyof PutAgentSessionAutoArchiveResponses];
2263
3413
  export type GetAgentSessionChangesData = {
2264
3414
  body?: never;
2265
3415
  path: {
@@ -2349,6 +3499,129 @@ export type GetCodeExecutionResponses = {
2349
3499
  200: ExecutionRecord;
2350
3500
  };
2351
3501
  export type GetCodeExecutionResponse = GetCodeExecutionResponses[keyof GetCodeExecutionResponses];
3502
+ export type ListExecutionConnectedAppsData = {
3503
+ body?: never;
3504
+ path: {
3505
+ session_id: string;
3506
+ /**
3507
+ * A running execution of the session's current turn
3508
+ */
3509
+ execution_id: string;
3510
+ };
3511
+ query?: never;
3512
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps';
3513
+ };
3514
+ export type ListExecutionConnectedAppsErrors = {
3515
+ 403: unknown;
3516
+ 404: unknown;
3517
+ };
3518
+ export type ListExecutionConnectedAppsResponses = {
3519
+ 200: Array<ConnectedApp>;
3520
+ };
3521
+ export type ListExecutionConnectedAppsResponse = ListExecutionConnectedAppsResponses[keyof ListExecutionConnectedAppsResponses];
3522
+ export type DiscoverConnectedAppsData = {
3523
+ body: DiscoveryRequest;
3524
+ path: {
3525
+ session_id: string;
3526
+ execution_id: string;
3527
+ };
3528
+ query?: never;
3529
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/discover';
3530
+ };
3531
+ export type DiscoverConnectedAppsErrors = {
3532
+ 400: unknown;
3533
+ 403: unknown;
3534
+ 404: unknown;
3535
+ };
3536
+ export type DiscoverConnectedAppsResponses = {
3537
+ 200: DiscoverConnectorsResponse;
3538
+ };
3539
+ export type DiscoverConnectedAppsResponse = DiscoverConnectedAppsResponses[keyof DiscoverConnectedAppsResponses];
3540
+ export type AddConnectedMcpServerData = {
3541
+ body: ConnectMcpServer;
3542
+ path: {
3543
+ session_id: string;
3544
+ execution_id: string;
3545
+ };
3546
+ query?: never;
3547
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/servers';
3548
+ };
3549
+ export type AddConnectedMcpServerErrors = {
3550
+ 400: unknown;
3551
+ 403: unknown;
3552
+ 404: unknown;
3553
+ };
3554
+ export type AddConnectedMcpServerResponses = {
3555
+ 200: ConnectMcpServerResponse;
3556
+ };
3557
+ export type AddConnectedMcpServerResponse = AddConnectedMcpServerResponses[keyof AddConnectedMcpServerResponses];
3558
+ export type SearchConnectedAppToolsData = {
3559
+ body?: never;
3560
+ path: {
3561
+ session_id: string;
3562
+ execution_id: string;
3563
+ };
3564
+ query: {
3565
+ /**
3566
+ * Keywords matched against tool names and descriptions, e.g. `linear issue`.
3567
+ */
3568
+ query: string;
3569
+ };
3570
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/tools';
3571
+ };
3572
+ export type SearchConnectedAppToolsErrors = {
3573
+ 403: unknown;
3574
+ 404: unknown;
3575
+ };
3576
+ export type SearchConnectedAppToolsResponses = {
3577
+ 200: ConnectedToolSearch;
3578
+ };
3579
+ export type SearchConnectedAppToolsResponse = SearchConnectedAppToolsResponses[keyof SearchConnectedAppToolsResponses];
3580
+ export type CallConnectedAppToolData = {
3581
+ body: CallConnectedTool;
3582
+ path: {
3583
+ session_id: string;
3584
+ execution_id: string;
3585
+ kind: ConnectedAppKind;
3586
+ /**
3587
+ * The app's slug or custom server key
3588
+ */
3589
+ key: string;
3590
+ };
3591
+ query?: never;
3592
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/calls';
3593
+ };
3594
+ export type CallConnectedAppToolErrors = {
3595
+ 400: unknown;
3596
+ 403: unknown;
3597
+ 404: unknown;
3598
+ };
3599
+ export type CallConnectedAppToolResponses = {
3600
+ 200: ConnectedToolResult;
3601
+ };
3602
+ export type CallConnectedAppToolResponse = CallConnectedAppToolResponses[keyof CallConnectedAppToolResponses];
3603
+ export type ListConnectedAppToolsData = {
3604
+ body?: never;
3605
+ path: {
3606
+ session_id: string;
3607
+ execution_id: string;
3608
+ kind: ConnectedAppKind;
3609
+ /**
3610
+ * The app's slug or custom server key
3611
+ */
3612
+ key: string;
3613
+ };
3614
+ query?: never;
3615
+ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/connected-apps/{kind}/{key}/tools';
3616
+ };
3617
+ export type ListConnectedAppToolsErrors = {
3618
+ 403: unknown;
3619
+ 404: unknown;
3620
+ };
3621
+ export type ListConnectedAppToolsResponses = {
3622
+ 200: Array<ConnectedTool>;
3623
+ };
3624
+ export type ListConnectedAppToolsResponse = ListConnectedAppToolsResponses[keyof ListConnectedAppToolsResponses];
2352
3625
  export type ListExecutionReviewsData = {
2353
3626
  body?: never;
2354
3627
  path: {
@@ -2419,6 +3692,27 @@ export type GetAgentSessionLogResponses = {
2419
3692
  200: AgentSessionLogResponse;
2420
3693
  };
2421
3694
  export type GetAgentSessionLogResponse = GetAgentSessionLogResponses[keyof GetAgentSessionLogResponses];
3695
+ export type GetAgentSessionFoldedLogData = {
3696
+ body?: never;
3697
+ path: {
3698
+ /**
3699
+ * ID of the agent session
3700
+ */
3701
+ session_id: string;
3702
+ };
3703
+ query?: never;
3704
+ url: '/agent-sessions/{session_id}/log/folded';
3705
+ };
3706
+ export type GetAgentSessionFoldedLogErrors = {
3707
+ 401: string;
3708
+ 403: string;
3709
+ 500: string;
3710
+ };
3711
+ export type GetAgentSessionFoldedLogError = GetAgentSessionFoldedLogErrors[keyof GetAgentSessionFoldedLogErrors];
3712
+ export type GetAgentSessionFoldedLogResponses = {
3713
+ 200: AgentSessionFoldedLogResponse;
3714
+ };
3715
+ export type GetAgentSessionFoldedLogResponse = GetAgentSessionFoldedLogResponses[keyof GetAgentSessionFoldedLogResponses];
2422
3716
  export type RenameAgentSessionData = {
2423
3717
  body: RenameAgentSessionRequest;
2424
3718
  path: {
@@ -2777,85 +4071,135 @@ export type AnswerAgentSessionToolApprovalResponses = {
2777
4071
  200: AnswerToolApprovalResponse;
2778
4072
  };
2779
4073
  export type AnswerAgentSessionToolApprovalResponse = AnswerAgentSessionToolApprovalResponses[keyof AnswerAgentSessionToolApprovalResponses];
2780
- export type DisconnectData = {
2781
- body: EmptyRequest;
2782
- path?: never;
4074
+ export type PresentSessionViewData = {
4075
+ body: PresentView;
4076
+ path: {
4077
+ session_id: string;
4078
+ };
2783
4079
  query?: never;
2784
- url: '/claude-auth';
4080
+ url: '/agent-sessions/{session_id}/views';
2785
4081
  };
2786
- export type DisconnectErrors = {
2787
- /**
2788
- * Disabled
2789
- */
4082
+ export type PresentSessionViewErrors = {
4083
+ 400: unknown;
2790
4084
  403: unknown;
2791
4085
  };
2792
- export type DisconnectResponses = {
4086
+ export type PresentSessionViewResponses = {
4087
+ 204: void;
4088
+ };
4089
+ export type PresentSessionViewResponse = PresentSessionViewResponses[keyof PresentSessionViewResponses];
4090
+ export type UnregisterAgentSessionWorkData = {
4091
+ body?: never;
4092
+ path: {
4093
+ /**
4094
+ * ID of the agent session
4095
+ */
4096
+ session_id: string;
4097
+ };
4098
+ query?: never;
4099
+ url: '/agent-sessions/{session_id}/work-registration';
4100
+ };
4101
+ export type UnregisterAgentSessionWorkErrors = {
4102
+ 401: string;
4103
+ 500: string;
4104
+ };
4105
+ export type UnregisterAgentSessionWorkError = UnregisterAgentSessionWorkErrors[keyof UnregisterAgentSessionWorkErrors];
4106
+ export type UnregisterAgentSessionWorkResponses = {
2793
4107
  /**
2794
- * Disconnected
4108
+ * The caller has no active registration of the session
2795
4109
  */
2796
4110
  204: void;
2797
4111
  };
2798
- export type DisconnectResponse = DisconnectResponses[keyof DisconnectResponses];
2799
- export type StatusData = {
4112
+ export type UnregisterAgentSessionWorkResponse = UnregisterAgentSessionWorkResponses[keyof UnregisterAgentSessionWorkResponses];
4113
+ export type RegisterAgentSessionWorkData = {
4114
+ body?: never;
4115
+ path: {
4116
+ /**
4117
+ * ID of the agent session
4118
+ */
4119
+ session_id: string;
4120
+ };
4121
+ query?: never;
4122
+ url: '/agent-sessions/{session_id}/work-registration';
4123
+ };
4124
+ export type RegisterAgentSessionWorkErrors = {
4125
+ 401: string;
4126
+ 403: string;
4127
+ 409: string;
4128
+ 500: string;
4129
+ };
4130
+ export type RegisterAgentSessionWorkError = RegisterAgentSessionWorkErrors[keyof RegisterAgentSessionWorkErrors];
4131
+ export type RegisterAgentSessionWorkResponses = {
4132
+ 200: WorkRegistrationResponse;
4133
+ };
4134
+ export type RegisterAgentSessionWorkResponse = RegisterAgentSessionWorkResponses[keyof RegisterAgentSessionWorkResponses];
4135
+ export type ListAgentWorkRegistrationsData = {
2800
4136
  body?: never;
2801
4137
  path?: never;
2802
4138
  query?: never;
2803
- url: '/claude-auth';
4139
+ url: '/agent-work-registrations';
2804
4140
  };
2805
- export type StatusErrors = {
2806
- /**
2807
- * Unauthenticated
2808
- */
2809
- 401: unknown;
4141
+ export type ListAgentWorkRegistrationsErrors = {
4142
+ 401: string;
4143
+ 500: string;
2810
4144
  };
2811
- export type StatusResponses = {
2812
- 200: StatusResponse;
4145
+ export type ListAgentWorkRegistrationsError = ListAgentWorkRegistrationsErrors[keyof ListAgentWorkRegistrationsErrors];
4146
+ export type ListAgentWorkRegistrationsResponses = {
4147
+ 200: Array<WorkRegistrationResponse>;
2813
4148
  };
2814
- export type StatusResponse2 = StatusResponses[keyof StatusResponses];
2815
- export type CompleteData = {
2816
- body: CompleteRequest;
4149
+ export type ListAgentWorkRegistrationsResponse = ListAgentWorkRegistrationsResponses[keyof ListAgentWorkRegistrationsResponses];
4150
+ export type ClassifyData = {
4151
+ body: ClassifyInputRequest;
2817
4152
  path?: never;
2818
4153
  query?: never;
2819
- url: '/claude-auth/complete';
4154
+ url: '/universal_input/classify';
2820
4155
  };
2821
- export type CompleteErrors = {
4156
+ export type ClassifyErrors = {
2822
4157
  /**
2823
- * Invalid code
4158
+ * Invalid input
2824
4159
  */
2825
4160
  400: unknown;
2826
4161
  /**
2827
- * Expired or replayed
4162
+ * Unauthenticated
2828
4163
  */
2829
- 409: unknown;
4164
+ 401: unknown;
2830
4165
  /**
2831
- * Provider failed
4166
+ * AI allowance exhausted
2832
4167
  */
2833
- 502: unknown;
2834
- };
2835
- export type CompleteResponses = {
4168
+ 402: unknown;
2836
4169
  /**
2837
- * Connected
4170
+ * Detection unavailable
2838
4171
  */
2839
- 204: void;
4172
+ 503: unknown;
4173
+ };
4174
+ export type ClassifyResponses = {
4175
+ 200: ClassifyInputResponse;
2840
4176
  };
2841
- export type CompleteResponse = CompleteResponses[keyof CompleteResponses];
2842
- export type StartData = {
2843
- body: EmptyRequest;
4177
+ export type ClassifyResponse = ClassifyResponses[keyof ClassifyResponses];
4178
+ export type ExtractData = {
4179
+ body: ExtractInputRequest;
2844
4180
  path?: never;
2845
4181
  query?: never;
2846
- url: '/claude-auth/start';
4182
+ url: '/universal_input/extract';
2847
4183
  };
2848
- export type StartErrors = {
4184
+ export type ExtractErrors = {
2849
4185
  /**
2850
- * Disabled
4186
+ * Invalid input
2851
4187
  */
2852
- 403: unknown;
4188
+ 400: unknown;
2853
4189
  /**
2854
- * Too many attempts
4190
+ * Unauthenticated
4191
+ */
4192
+ 401: unknown;
4193
+ /**
4194
+ * AI allowance exhausted
4195
+ */
4196
+ 402: unknown;
4197
+ /**
4198
+ * Extraction unavailable
2855
4199
  */
2856
- 429: unknown;
4200
+ 503: unknown;
2857
4201
  };
2858
- export type StartResponses = {
2859
- 200: StartResponse;
4202
+ export type ExtractResponses = {
4203
+ 200: ExtractInputResponse;
2860
4204
  };
2861
- export type StartResponse2 = StartResponses[keyof StartResponses];
4205
+ export type ExtractResponse = ExtractResponses[keyof ExtractResponses];