@macro-inc/sdk 0.0.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +628 -21
- package/dist/{chunk-5HAKQN23.js → chunk-7LVVPVNT.js} +70 -57
- package/dist/{chunk-JXIQT5TH.js → chunk-7YJ6Y7HJ.js} +234 -16
- package/dist/chunk-LMJW65ML.js +836 -0
- package/dist/{chunk-SGAHIERJ.js → chunk-OGE7WXJE.js} +16 -0
- package/dist/chunk-PRUFPW3B.js +943 -0
- package/dist/{chunk-CTKR64MY.js → chunk-QVBNNMQS.js} +242 -367
- package/dist/{chunk-QNUS5BC5.js → chunk-SUINKDXF.js} +30 -84
- package/dist/{chunk-77EI4LSQ.js → chunk-ZQXOHNDB.js} +1518 -386
- package/dist/generated/agent-harness/index.d.ts +1 -1
- package/dist/generated/agent-harness/index.js +1 -1
- package/dist/generated/agent-harness/sdk.gen.d.ts +174 -4
- package/dist/generated/agent-harness/types.gen.d.ts +2511 -189
- package/dist/generated/auth/index.d.ts +1 -1
- package/dist/generated/auth/index.js +1 -1
- package/dist/generated/auth/sdk.gen.d.ts +106 -8
- package/dist/generated/auth/types.gen.d.ts +1473 -116
- package/dist/generated/calendar/client/client.gen.d.ts +2 -0
- package/dist/generated/calendar/client/index.d.ts +10 -0
- package/dist/generated/calendar/client/types.gen.d.ts +120 -0
- package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
- package/dist/generated/calendar/client.gen.d.ts +12 -0
- package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
- package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/calendar/core/params.gen.d.ts +43 -0
- package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/calendar/core/types.gen.d.ts +83 -0
- package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
- package/dist/generated/calendar/index.d.ts +2 -0
- package/dist/generated/calendar/index.js +6 -0
- package/dist/generated/calendar/sdk.gen.d.ts +95 -0
- package/dist/generated/calendar/types.gen.d.ts +1091 -0
- package/dist/generated/cognition/index.d.ts +1 -1
- package/dist/generated/cognition/index.js +1 -1
- package/dist/generated/cognition/sdk.gen.d.ts +6 -1
- package/dist/generated/cognition/types.gen.d.ts +304 -36
- package/dist/generated/connection/types.gen.d.ts +1 -1
- package/dist/generated/email/index.d.ts +1 -1
- package/dist/generated/email/index.js +1 -1
- package/dist/generated/email/sdk.gen.d.ts +32 -27
- package/dist/generated/email/types.gen.d.ts +586 -409
- package/dist/generated/notification/index.d.ts +1 -1
- package/dist/generated/notification/types.gen.d.ts +384 -19
- package/dist/generated/properties/types.gen.d.ts +8 -5
- package/dist/generated/scheduled-action/index.d.ts +1 -1
- package/dist/generated/scheduled-action/index.js +3 -842
- package/dist/generated/scheduled-action/sdk.gen.d.ts +3 -1
- package/dist/generated/scheduled-action/types.gen.d.ts +277 -41
- package/dist/generated/search/index.d.ts +1 -1
- package/dist/generated/search/types.gen.d.ts +262 -43
- package/dist/generated/storage/index.d.ts +1 -1
- package/dist/generated/storage/index.js +1 -1
- package/dist/generated/storage/sdk.gen.d.ts +678 -107
- package/dist/generated/storage/types.gen.d.ts +14827 -5995
- package/dist/generated/unfurl/index.d.ts +1 -1
- package/dist/generated/unfurl/index.js +3 -832
- package/dist/generated/unfurl/types.gen.d.ts +20 -0
- package/dist/src/config.d.ts +33 -13
- package/dist/src/entities/agent-sessions/agent-session.d.ts +150 -6
- package/dist/src/entities/agent-sessions/code-execution.d.ts +43 -0
- package/dist/src/entities/agent-sessions/conversation.d.ts +54 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +23 -5
- package/dist/src/entities/agent-sessions/queued-action.d.ts +46 -0
- package/dist/src/entities/agent-sessions/review.d.ts +107 -0
- package/dist/src/entities/agent-sessions/tool-approval.d.ts +21 -0
- package/dist/src/entities/agents/agent.d.ts +47 -0
- package/dist/src/entities/agents/namespace.d.ts +13 -0
- package/dist/src/entities/ai/namespace.d.ts +24 -0
- package/dist/src/entities/api-keys/api-key.d.ts +17 -0
- package/dist/src/entities/api-keys/namespace.d.ts +18 -0
- package/dist/src/entities/calendar/calendar.d.ts +35 -0
- package/dist/src/entities/calendar/event.d.ts +123 -0
- package/dist/src/entities/calendar/event.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +111 -0
- package/dist/src/entities/calendar/replacement.d.ts +15 -0
- package/dist/src/entities/calls/call-record.d.ts +62 -6
- package/dist/src/entities/calls/message.d.ts +33 -0
- package/dist/src/entities/channels/activity.d.ts +24 -0
- package/dist/src/entities/channels/channel.d.ts +44 -3
- package/dist/src/entities/channels/labels.d.ts +39 -0
- package/dist/src/entities/channels/message.d.ts +9 -17
- package/dist/src/entities/channels/namespace.d.ts +6 -0
- package/dist/src/entities/channels/picture.d.ts +11 -0
- package/dist/src/entities/channels/post.d.ts +1 -1
- package/dist/src/entities/channels/thread.d.ts +5 -0
- package/dist/src/entities/chats/chat.d.ts +11 -1
- package/dist/src/entities/chats/generation.d.ts +46 -0
- package/dist/src/entities/crm/comment.d.ts +55 -34
- package/dist/src/entities/crm/company.d.ts +42 -10
- package/dist/src/entities/crm/contact.d.ts +42 -10
- package/dist/src/entities/crm/namespace.d.ts +18 -1
- package/dist/src/entities/crm/pipeline.d.ts +122 -0
- package/dist/src/entities/crm/pipelines.d.ts +14 -0
- package/dist/src/entities/databases/column.d.ts +75 -0
- package/dist/src/entities/databases/database.d.ts +272 -0
- package/dist/src/entities/databases/namespace.d.ts +21 -0
- package/dist/src/entities/databases/query.d.ts +86 -0
- package/dist/src/entities/databases/row.d.ts +27 -0
- package/dist/src/entities/databases/table.d.ts +61 -0
- package/dist/src/entities/databases/view.d.ts +40 -0
- package/dist/src/entities/databases/webhook.d.ts +32 -0
- package/dist/src/entities/documents/anchor.d.ts +29 -0
- package/dist/src/entities/documents/comment.d.ts +25 -22
- package/dist/src/entities/documents/document.d.ts +60 -12
- package/dist/src/entities/documents/namespace.d.ts +30 -0
- package/dist/src/entities/documents/version.d.ts +22 -0
- package/dist/src/entities/email/draft.d.ts +79 -0
- package/dist/src/entities/email/filter.d.ts +34 -0
- package/dist/src/entities/email/link.d.ts +6 -4
- package/dist/src/entities/email/message.d.ts +12 -1
- package/dist/src/entities/email/namespace.d.ts +34 -1
- package/dist/src/entities/email/thread.d.ts +23 -1
- package/dist/src/entities/entity-mentions/mention.d.ts +16 -0
- package/dist/src/entities/entity-mentions/namespace.d.ts +12 -0
- package/dist/src/entities/entity.d.ts +7 -0
- package/dist/src/entities/favorites/namespace.d.ts +14 -2
- package/dist/src/entities/foreign/foreign-entity.d.ts +2 -0
- package/dist/src/entities/foreign/namespace.d.ts +40 -0
- package/dist/src/entities/forms/form.d.ts +227 -0
- package/dist/src/entities/forms/namespace.d.ts +18 -0
- package/dist/src/entities/forms/question.d.ts +37 -0
- package/dist/src/entities/forms/response.d.ts +32 -0
- package/dist/src/entities/forms/section.d.ts +19 -0
- package/dist/src/entities/github-pull-requests/namespace.d.ts +12 -0
- package/dist/src/entities/github-pull-requests/pull-request.d.ts +52 -0
- package/dist/src/entities/harnesses/harness.d.ts +19 -0
- package/dist/src/entities/harnesses/namespace.d.ts +33 -0
- package/dist/src/entities/harnesses/pairing.d.ts +39 -0
- package/dist/src/entities/initiatives/initiative.d.ts +50 -0
- package/dist/src/entities/initiatives/namespace.d.ts +13 -0
- package/dist/src/entities/meetings/meeting.d.ts +38 -0
- package/dist/src/entities/meetings/namespace.d.ts +18 -0
- package/dist/src/entities/messages/thread.d.ts +101 -0
- package/dist/src/entities/notifications/notification.d.ts +6 -3
- package/dist/src/entities/notifications/notification.test.d.ts +1 -0
- package/dist/src/entities/projects/project.d.ts +7 -0
- package/dist/src/entities/reference.d.ts +82 -0
- package/dist/src/entities/routines/namespace.d.ts +15 -0
- package/dist/src/entities/routines/routine.d.ts +115 -0
- package/dist/src/entities/sharing/access.d.ts +65 -0
- package/dist/src/entities/sharing/permissions.d.ts +13 -0
- package/dist/src/entities/tasks/namespace.d.ts +4 -0
- package/dist/src/entities/tasks/task.d.ts +6 -0
- package/dist/src/entities/unfurls/namespace.d.ts +10 -0
- package/dist/src/entities/webhooks/webhook.d.ts +3 -1
- package/dist/src/entities/workspace/items.d.ts +7 -0
- package/dist/src/entities/workspace/namespace.d.ts +83 -0
- package/dist/src/entities/workspace/query.d.ts +12 -0
- package/dist/src/entities/workspace/types.d.ts +96 -0
- package/dist/src/events/hydrate/agentSession.d.ts +192 -0
- package/dist/src/events/hydrate/channel.d.ts +2 -39
- package/dist/src/events/hydrate/message.d.ts +70 -0
- package/dist/src/events/receiver.d.ts +57 -19
- package/dist/src/events/types.d.ts +3 -1
- package/dist/src/macro.d.ts +80 -3
- package/dist/src/macro.js +8832 -2784
- package/dist/src/utils/activity.d.ts +11 -0
- package/dist/src/utils/activity.test.d.ts +1 -0
- package/dist/src/utils/client.d.ts +10 -1
- package/dist/src/utils/concurrency.d.ts +5 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/pagination.d.ts +9 -4
- package/package.json +11 -3
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: `${string}://${string}` | (string & {});
|
|
3
3
|
};
|
|
4
|
+
/**
|
|
5
|
+
* Ordered from least to most access top -> bottom
|
|
6
|
+
*/
|
|
7
|
+
export type AccessLevel = 'view' | 'comment' | 'edit' | 'owner';
|
|
4
8
|
/**
|
|
5
9
|
* One thing a caller wants an agent to do.
|
|
6
10
|
*/
|
|
@@ -8,31 +12,323 @@ export type AgentAction = (AgentPromptAction & {
|
|
|
8
12
|
type: 'prompt';
|
|
9
13
|
}) | (AgentSetModelAction & {
|
|
10
14
|
type: 'setModel';
|
|
15
|
+
}) | (AgentSetConfigOptionAction & {
|
|
16
|
+
type: 'setConfigOption';
|
|
11
17
|
}) | {
|
|
12
18
|
type: 'compact';
|
|
13
19
|
} | {
|
|
14
20
|
type: 'stop';
|
|
15
|
-
}
|
|
21
|
+
} | (AgentRespondElicitationAction & {
|
|
22
|
+
type: 'respondElicitation';
|
|
23
|
+
}) | (AgentPermissionAction & {
|
|
24
|
+
type: 'respondToPermission';
|
|
25
|
+
});
|
|
16
26
|
/**
|
|
17
27
|
* Identifies one accepted [`AgentAction`] end to end: returned by the
|
|
18
28
|
* control endpoint, written as the JSON-RPC request id on the action's wire
|
|
19
29
|
* frame, and read back off that frame as `request_id` on the folded message
|
|
20
|
-
* it derives.
|
|
30
|
+
* it derives.
|
|
21
31
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
32
|
+
* A v7 uuid, so ids sort by mint time. Minted by the server at accept time,
|
|
33
|
+
* or by a client that speculated the action and named it in the control
|
|
34
|
+
* request - either way the server is the only writer of runtime-bound
|
|
35
|
+
* frames, so a uuid-shaped request id remains the whole ownership test. The
|
|
36
|
+
* machine's own handshake request ids (`agent_session:{session}:{n}`) are
|
|
37
|
+
* not uuids and stay `None`.
|
|
25
38
|
*/
|
|
26
39
|
export type AgentActionId = string;
|
|
40
|
+
/**
|
|
41
|
+
* Type-specific state for one agent session setting.
|
|
42
|
+
*/
|
|
43
|
+
export type AgentConfigKindDto = {
|
|
44
|
+
/**
|
|
45
|
+
* Current opaque value.
|
|
46
|
+
*/
|
|
47
|
+
currentValue: string;
|
|
48
|
+
/**
|
|
49
|
+
* Ordered values supplied by the agent.
|
|
50
|
+
*/
|
|
51
|
+
options: Array<AgentConfigSelectOptionDto>;
|
|
52
|
+
type: 'select';
|
|
53
|
+
} | {
|
|
54
|
+
/**
|
|
55
|
+
* Current value.
|
|
56
|
+
*/
|
|
57
|
+
currentValue: boolean;
|
|
58
|
+
type: 'boolean';
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* One agent-advertised ACP session setting.
|
|
62
|
+
*/
|
|
63
|
+
export type AgentConfigOptionDto = AgentConfigKindDto & {
|
|
64
|
+
/**
|
|
65
|
+
* ACP semantic category, such as `model` or `thought_level`.
|
|
66
|
+
*/
|
|
67
|
+
category?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Optional explanatory copy.
|
|
70
|
+
*/
|
|
71
|
+
description?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Opaque id used to change this setting.
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* Display label supplied by the agent.
|
|
78
|
+
*/
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* One value in an agent-advertised select.
|
|
83
|
+
*/
|
|
84
|
+
export type AgentConfigSelectOptionDto = {
|
|
85
|
+
/**
|
|
86
|
+
* Optional provider description of this value.
|
|
87
|
+
*/
|
|
88
|
+
description?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* Optional group heading supplied by the provider.
|
|
91
|
+
*/
|
|
92
|
+
group?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Display label.
|
|
95
|
+
*/
|
|
96
|
+
name: string;
|
|
97
|
+
/**
|
|
98
|
+
* Opaque value returned to the agent when selected.
|
|
99
|
+
*/
|
|
100
|
+
value: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* An agent's conversation in a channel, as the person it is with sees it.
|
|
104
|
+
*/
|
|
105
|
+
export type AgentConversationDto = {
|
|
106
|
+
/**
|
|
107
|
+
* Whether the caller may currently send a new prompt.
|
|
108
|
+
*/
|
|
109
|
+
available: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Optional persona avatar.
|
|
112
|
+
*/
|
|
113
|
+
avatarUrl?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Persona id (without the bot principal prefix).
|
|
116
|
+
*/
|
|
117
|
+
botId: string;
|
|
118
|
+
/**
|
|
119
|
+
* The channel containing the visible transcript.
|
|
120
|
+
*/
|
|
121
|
+
channelId: string;
|
|
122
|
+
/**
|
|
123
|
+
* Persona's historical display name.
|
|
124
|
+
*/
|
|
125
|
+
name: string;
|
|
126
|
+
/**
|
|
127
|
+
* The sessions the conversation has run on, oldest first.
|
|
128
|
+
*/
|
|
129
|
+
sessions: Array<AgentConversationSessionDto>;
|
|
130
|
+
/**
|
|
131
|
+
* Whether new persona settings are available to adopt explicitly.
|
|
132
|
+
*/
|
|
133
|
+
settingsChanged: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Persistent state of each accepted message and its current attempt.
|
|
136
|
+
*/
|
|
137
|
+
turns: Array<AgentConversationTurnDto>;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* One session a conversation has run on; every channel message stays visible.
|
|
141
|
+
*/
|
|
142
|
+
export type AgentConversationSessionDto = {
|
|
143
|
+
/**
|
|
144
|
+
* When the session began.
|
|
145
|
+
*/
|
|
146
|
+
createdAt: string;
|
|
147
|
+
/**
|
|
148
|
+
* Whether this is the current agent context.
|
|
149
|
+
*/
|
|
150
|
+
isCurrent: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Session whose controls and live events belong to this context.
|
|
153
|
+
*/
|
|
154
|
+
sessionId: string;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Execution status without exposing the persona prompt or stored credentials.
|
|
158
|
+
*/
|
|
159
|
+
export type AgentConversationTurnDto = {
|
|
160
|
+
/**
|
|
161
|
+
* Current runtime attempt identity.
|
|
162
|
+
*/
|
|
163
|
+
actionId: string;
|
|
164
|
+
/**
|
|
165
|
+
* When the source message was first accepted.
|
|
166
|
+
*/
|
|
167
|
+
createdAt: string;
|
|
168
|
+
/**
|
|
169
|
+
* The associated agent reply, if it has been posted.
|
|
170
|
+
*/
|
|
171
|
+
replyMessageId?: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* Whether Retry would be accepted now. A failed attempt is not retryable
|
|
174
|
+
* until its reply says how it ended.
|
|
175
|
+
*/
|
|
176
|
+
retryable: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Session carrying this turn.
|
|
179
|
+
*/
|
|
180
|
+
sessionId: string;
|
|
181
|
+
/**
|
|
182
|
+
* The user's message in the channel timeline.
|
|
183
|
+
*/
|
|
184
|
+
sourceMessageId: string;
|
|
185
|
+
/**
|
|
186
|
+
* Durable execution state.
|
|
187
|
+
*/
|
|
188
|
+
state: ConversationTurnState;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* The agent conversations in a channel the caller may see.
|
|
192
|
+
*/
|
|
193
|
+
export type AgentConversationsDto = {
|
|
194
|
+
/**
|
|
195
|
+
* Empty for ordinary channels and other people's conversations.
|
|
196
|
+
*/
|
|
197
|
+
conversations: Array<AgentConversationDto>;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* One model picker option.
|
|
201
|
+
*/
|
|
202
|
+
export type AgentModelDto = {
|
|
203
|
+
/**
|
|
204
|
+
* Optional provider description.
|
|
205
|
+
*/
|
|
206
|
+
description?: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* Optional group heading supplied by the provider.
|
|
209
|
+
*/
|
|
210
|
+
group?: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* Provider model id.
|
|
213
|
+
*/
|
|
214
|
+
id: string;
|
|
215
|
+
/**
|
|
216
|
+
* Display name.
|
|
217
|
+
*/
|
|
218
|
+
name: string;
|
|
219
|
+
/**
|
|
220
|
+
* Image input support, absent when the runtime does not advertise it.
|
|
221
|
+
*/
|
|
222
|
+
supportsImages?: boolean | null;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Model-selection availability returned over HTTP.
|
|
226
|
+
*/
|
|
227
|
+
export type AgentModelsStatusDto = 'available' | 'unsupported';
|
|
228
|
+
/**
|
|
229
|
+
* A user's answer to the agent's `session/request_permission`.
|
|
230
|
+
*
|
|
231
|
+
* Unlike every other action this is not a new request but the reply to one
|
|
232
|
+
* the agent made, so it carries the agent's own request id rather than
|
|
233
|
+
* receiving a server-minted one.
|
|
234
|
+
*/
|
|
235
|
+
export type AgentPermissionAction = {
|
|
236
|
+
/**
|
|
237
|
+
* What the user decided.
|
|
238
|
+
*/
|
|
239
|
+
answer: PermissionAnswer;
|
|
240
|
+
/**
|
|
241
|
+
* The agent's JSON-RPC request id, echoed verbatim from the folded
|
|
242
|
+
* permission part. A string or a number on the wire; agents mint both,
|
|
243
|
+
* and `7` does not answer `"7"`.
|
|
244
|
+
*/
|
|
245
|
+
requestId: unknown;
|
|
246
|
+
};
|
|
27
247
|
/**
|
|
28
248
|
* Ask the agent to work on something.
|
|
29
249
|
*/
|
|
30
250
|
export type AgentPromptAction = {
|
|
251
|
+
/**
|
|
252
|
+
* Files the prompt refers to, in the order the user attached them.
|
|
253
|
+
* Delivered after the text as one `resource_link` block each.
|
|
254
|
+
*/
|
|
255
|
+
attachments?: Array<PromptAttachment>;
|
|
31
256
|
/**
|
|
32
257
|
* What to tell the agent.
|
|
33
258
|
*/
|
|
34
259
|
prompt: string;
|
|
35
260
|
};
|
|
261
|
+
/**
|
|
262
|
+
* Response body for `GET /agent-repositories`.
|
|
263
|
+
*/
|
|
264
|
+
export type AgentRepositoriesResponse = {
|
|
265
|
+
/**
|
|
266
|
+
* Every repository the caller reaches through Macro's GitHub App, sorted
|
|
267
|
+
* by `owner/name`. Empty when the App is installed nowhere the caller
|
|
268
|
+
* has a claim to.
|
|
269
|
+
*/
|
|
270
|
+
repositories: Array<AgentRepositoryDto>;
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* Response body for `GET /agent-repositories/branches`.
|
|
274
|
+
*/
|
|
275
|
+
export type AgentRepositoryBranchesResponse = {
|
|
276
|
+
/**
|
|
277
|
+
* Branch names on the repository, in the order GitHub returned them.
|
|
278
|
+
* Empty when the repository has no commits yet.
|
|
279
|
+
*/
|
|
280
|
+
branches: Array<string>;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* One repository the caller can select for a coding session.
|
|
284
|
+
*/
|
|
285
|
+
export type AgentRepositoryDto = {
|
|
286
|
+
/**
|
|
287
|
+
* The branch a clone checks out, and where a session starts when its
|
|
288
|
+
* request selects this repository without a `repoBranch`. Absent for a
|
|
289
|
+
* repository with no commits.
|
|
290
|
+
*/
|
|
291
|
+
defaultBranch?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
* The canonical `https://github.com/owner/name` url, in the form
|
|
294
|
+
* `POST /agent-sessions` accepts as `repoUrl`.
|
|
295
|
+
*/
|
|
296
|
+
url: string;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Answer an elicitation the agent is waiting on.
|
|
300
|
+
*/
|
|
301
|
+
export type AgentRespondElicitationAction = ElicitationAnswer & {
|
|
302
|
+
/**
|
|
303
|
+
* The agent's `elicitation/create` request id - not an
|
|
304
|
+
* [`AgentActionId`], because the agent minted it.
|
|
305
|
+
*/
|
|
306
|
+
requestId: ElicitationRequestId;
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Response body for `GET /agent-sessions/{session_id}/changes/patch`.
|
|
310
|
+
*
|
|
311
|
+
* Clients deserialize this, so both derives are used.
|
|
312
|
+
*/
|
|
313
|
+
export type AgentSessionChangesPatchResponse = {
|
|
314
|
+
/**
|
|
315
|
+
* The git-style unified diff of the current changeset.
|
|
316
|
+
*/
|
|
317
|
+
patch: string;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Response body for `GET /agent-sessions/{session_id}/changes`.
|
|
321
|
+
*
|
|
322
|
+
* Clients deserialize this, so both derives are used.
|
|
323
|
+
*/
|
|
324
|
+
export type AgentSessionChangesResponse = {
|
|
325
|
+
attempt?: null | CaptureAttemptDto;
|
|
326
|
+
/**
|
|
327
|
+
* A capture is running right now.
|
|
328
|
+
*/
|
|
329
|
+
capturing: boolean;
|
|
330
|
+
changeset?: null | ChangesetDto;
|
|
331
|
+
};
|
|
36
332
|
/**
|
|
37
333
|
* One entry of a session's protocol log.
|
|
38
334
|
*
|
|
@@ -58,6 +354,10 @@ export type AgentSessionLogEntryDto = LogFrameDto & {
|
|
|
58
354
|
* session and nothing more.
|
|
59
355
|
*/
|
|
60
356
|
createdAt: string;
|
|
357
|
+
/**
|
|
358
|
+
* Durable transport row identity; together with `createdAt`, its order cursor.
|
|
359
|
+
*/
|
|
360
|
+
id: string;
|
|
61
361
|
/**
|
|
62
362
|
* The user whose action produced the frame, absent when no user did.
|
|
63
363
|
*
|
|
@@ -83,10 +383,78 @@ export type AgentSessionLogResponse = {
|
|
|
83
383
|
*/
|
|
84
384
|
bot: SessionBot;
|
|
85
385
|
/**
|
|
86
|
-
*
|
|
386
|
+
* Effective history in ascending `(createdAt, id)` order.
|
|
387
|
+
* The first row is the inclusive history boundary cursor: buffered rows
|
|
388
|
+
* before it are obsolete. Reconcile snapshot overlap by row ID, never content.
|
|
389
|
+
* An empty history has no boundary or overlapping rows.
|
|
87
390
|
*/
|
|
88
391
|
entries: Array<AgentSessionLogEntryDto>;
|
|
89
392
|
};
|
|
393
|
+
/**
|
|
394
|
+
* The fields a chip renders for a session the caller may view.
|
|
395
|
+
*
|
|
396
|
+
* Clients deserialize this, so both derives are used.
|
|
397
|
+
*/
|
|
398
|
+
export type AgentSessionPreviewData = {
|
|
399
|
+
bot?: null | SessionBot;
|
|
400
|
+
/**
|
|
401
|
+
* The bot running the agent.
|
|
402
|
+
*/
|
|
403
|
+
botId: string;
|
|
404
|
+
/**
|
|
405
|
+
* When the session was created.
|
|
406
|
+
*/
|
|
407
|
+
createdAt: string;
|
|
408
|
+
/**
|
|
409
|
+
* The session id.
|
|
410
|
+
*/
|
|
411
|
+
id: string;
|
|
412
|
+
/**
|
|
413
|
+
* When the session was last modified.
|
|
414
|
+
*/
|
|
415
|
+
modifiedAt: string;
|
|
416
|
+
/**
|
|
417
|
+
* User-facing session name.
|
|
418
|
+
*/
|
|
419
|
+
name: string;
|
|
420
|
+
/**
|
|
421
|
+
* The user who owns the session.
|
|
422
|
+
*/
|
|
423
|
+
ownerId: string;
|
|
424
|
+
/**
|
|
425
|
+
* The session's last known status.
|
|
426
|
+
*/
|
|
427
|
+
status: SessionStatusDto;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* What one requested id resolved to, on the wire.
|
|
431
|
+
*
|
|
432
|
+
* Tagged the same way the chat and document preview endpoints tag theirs
|
|
433
|
+
* (`type` in `access` / `no_access` / `does_not_exist`), so a client that
|
|
434
|
+
* renders those chips can render this one with the same branch.
|
|
435
|
+
*
|
|
436
|
+
* Clients deserialize this, so both derives are used.
|
|
437
|
+
*/
|
|
438
|
+
export type AgentSessionPreviewDto = (AgentSessionPreviewData & {
|
|
439
|
+
type: 'access';
|
|
440
|
+
}) | (WithAgentSessionId & {
|
|
441
|
+
type: 'no_access';
|
|
442
|
+
}) | (WithAgentSessionId & {
|
|
443
|
+
type: 'does_not_exist';
|
|
444
|
+
});
|
|
445
|
+
/**
|
|
446
|
+
* Response body for a session's queue: everything waiting, oldest first.
|
|
447
|
+
*
|
|
448
|
+
* A wrapper rather than a bare array so that anything which is about the
|
|
449
|
+
* response rather than about an entry has somewhere to go later without
|
|
450
|
+
* breaking every client.
|
|
451
|
+
*/
|
|
452
|
+
export type AgentSessionQueueResponse = {
|
|
453
|
+
/**
|
|
454
|
+
* The waiting actions, in dispatch order.
|
|
455
|
+
*/
|
|
456
|
+
entries: Array<QueuedActionDto>;
|
|
457
|
+
};
|
|
90
458
|
/**
|
|
91
459
|
* Response body describing an agent session.
|
|
92
460
|
*
|
|
@@ -101,6 +469,12 @@ export type AgentSessionResponse = {
|
|
|
101
469
|
* The bot running the agent.
|
|
102
470
|
*/
|
|
103
471
|
botId: string;
|
|
472
|
+
/**
|
|
473
|
+
* Whether the caller may drive the session - prompt it, answer its
|
|
474
|
+
* questions, stop it - rather than only watch. Edit access; the
|
|
475
|
+
* creator owns the session, so a create response always says so.
|
|
476
|
+
*/
|
|
477
|
+
canEdit: boolean;
|
|
104
478
|
/**
|
|
105
479
|
* When the session was created.
|
|
106
480
|
*/
|
|
@@ -114,6 +488,15 @@ export type AgentSessionResponse = {
|
|
|
114
488
|
* The session id.
|
|
115
489
|
*/
|
|
116
490
|
id: string;
|
|
491
|
+
/**
|
|
492
|
+
* Instructions the session's runtime works under, when any were stated
|
|
493
|
+
* at creation. Absent otherwise, so existing payloads are unchanged.
|
|
494
|
+
*/
|
|
495
|
+
instructions?: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* Whether the session is archived and read-only.
|
|
498
|
+
*/
|
|
499
|
+
isArchived: boolean;
|
|
117
500
|
/**
|
|
118
501
|
* Model slug.
|
|
119
502
|
*/
|
|
@@ -134,6 +517,10 @@ export type AgentSessionResponse = {
|
|
|
134
517
|
* The user who created and owns the session.
|
|
135
518
|
*/
|
|
136
519
|
ownerId: string;
|
|
520
|
+
/**
|
|
521
|
+
* The session's linked pull request.
|
|
522
|
+
*/
|
|
523
|
+
pullRequestUrl?: string | null;
|
|
137
524
|
/**
|
|
138
525
|
* The repository the session works with, when one was stated.
|
|
139
526
|
*/
|
|
@@ -146,20 +533,38 @@ export type AgentSessionResponse = {
|
|
|
146
533
|
* The session's status.
|
|
147
534
|
*/
|
|
148
535
|
status: SessionStatusDto;
|
|
536
|
+
/**
|
|
537
|
+
* The Macro task the session was linked to.
|
|
538
|
+
*/
|
|
539
|
+
taskId?: string | null;
|
|
149
540
|
/**
|
|
150
541
|
* The channel `thread_id` lives in, when the session was spawned from a
|
|
151
|
-
* thread.
|
|
542
|
+
* channel thread. Derived from `thread_parent`.
|
|
152
543
|
*/
|
|
153
544
|
threadChannelId?: string | null;
|
|
154
545
|
/**
|
|
155
546
|
* The root message of the thread the session was created from, if any.
|
|
156
547
|
*/
|
|
157
548
|
threadId?: string | null;
|
|
549
|
+
threadParent?: null | MessageParent;
|
|
158
550
|
/**
|
|
159
551
|
* The directory the session's harness runs in on its runtime.
|
|
160
552
|
*/
|
|
161
553
|
workspace: string;
|
|
162
554
|
};
|
|
555
|
+
/**
|
|
556
|
+
* Ask the agent to change one advertised select-style session setting.
|
|
557
|
+
*/
|
|
558
|
+
export type AgentSetConfigOptionAction = {
|
|
559
|
+
/**
|
|
560
|
+
* Opaque ACP config id advertised by the agent.
|
|
561
|
+
*/
|
|
562
|
+
configId: string;
|
|
563
|
+
/**
|
|
564
|
+
* Opaque select value advertised for that config option.
|
|
565
|
+
*/
|
|
566
|
+
value: string;
|
|
567
|
+
};
|
|
163
568
|
/**
|
|
164
569
|
* Ask the agent to run on a different model from here on.
|
|
165
570
|
*/
|
|
@@ -169,61 +574,329 @@ export type AgentSetModelAction = {
|
|
|
169
574
|
*/
|
|
170
575
|
model: string;
|
|
171
576
|
};
|
|
172
|
-
export type BotId = string;
|
|
173
|
-
/**
|
|
174
|
-
* The operation to perform.
|
|
175
|
-
*/
|
|
176
|
-
export type ControlRequest = AgentAction;
|
|
177
577
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* Carries two shapes, told apart by `workspace`. Naming one asks for an
|
|
181
|
-
* external session: the runtime is the bot operator's, so the caller has to
|
|
182
|
-
* say which bot and which directory, and must own that bot. Omitting it asks
|
|
183
|
-
* for a managed session, whose sandbox this deployment provisions from its
|
|
184
|
-
* own configuration - which is why the fields describing someone else's
|
|
185
|
-
* runtime must be omitted along with it rather than quietly ignored. Mixing
|
|
186
|
-
* the two is refused rather than guessed at, so that no request can reach the
|
|
187
|
-
* managed path carrying a bot the caller was never entitled to name.
|
|
188
|
-
*
|
|
189
|
-
* Clients serialize this, so both derives are used.
|
|
578
|
+
* Public admission error payload. Handlers with additional fields can reuse the
|
|
579
|
+
* domain error's code and message and [`admission_status`].
|
|
190
580
|
*/
|
|
191
|
-
export type
|
|
192
|
-
/**
|
|
193
|
-
* Bot the session runs for. Bot callers may omit it (their own identity
|
|
194
|
-
* is used) and must not name another bot; user callers must supply a
|
|
195
|
-
* bot they own. External sessions only: a managed session runs as the
|
|
196
|
-
* bot its deployment is configured for.
|
|
197
|
-
*/
|
|
198
|
-
botId?: string | null;
|
|
581
|
+
export type AiAdmissionErrorBody = {
|
|
199
582
|
/**
|
|
200
|
-
*
|
|
201
|
-
* own their own sessions; required for bot callers without verified
|
|
202
|
-
* acting-user claims.
|
|
203
|
-
*
|
|
204
|
-
* For bot callers this is a claim, not a verified fact: it is scoped to
|
|
205
|
-
* the bot's own sessions, but the named user owns the session on the
|
|
206
|
-
* bot's say-so.
|
|
583
|
+
* Stable denial or unavailability code.
|
|
207
584
|
*/
|
|
208
|
-
|
|
585
|
+
code: string;
|
|
209
586
|
/**
|
|
210
|
-
*
|
|
211
|
-
* only - an external runtime sends its own first prompt through the
|
|
212
|
-
* control endpoint. Omitted, the session opens idle.
|
|
587
|
+
* Human-readable explanation, without internal billing diagnostics.
|
|
213
588
|
*/
|
|
214
|
-
|
|
589
|
+
error: string;
|
|
590
|
+
};
|
|
591
|
+
/**
|
|
592
|
+
* Request body for answering a held tool call.
|
|
593
|
+
*/
|
|
594
|
+
export type AnswerToolApprovalRequest = {
|
|
215
595
|
/**
|
|
216
|
-
*
|
|
217
|
-
* optional: having it cloned there is the runtime operator's job.
|
|
596
|
+
* The answer.
|
|
218
597
|
*/
|
|
219
|
-
|
|
220
|
-
|
|
598
|
+
answer: ToolApprovalAnswerDto;
|
|
599
|
+
};
|
|
600
|
+
/**
|
|
601
|
+
* Response body for answering a held tool call.
|
|
602
|
+
*/
|
|
603
|
+
export type AnswerToolApprovalResponse = {
|
|
221
604
|
/**
|
|
222
|
-
*
|
|
223
|
-
* for an external session, absent for a managed one, which runs in the
|
|
224
|
-
* path baked into its image.
|
|
605
|
+
* Where the call stands now.
|
|
225
606
|
*/
|
|
226
|
-
|
|
607
|
+
status: ToolApprovalStatusDto;
|
|
608
|
+
};
|
|
609
|
+
export type BotId = string;
|
|
610
|
+
/**
|
|
611
|
+
* Harness names accepted by the capability-discovery endpoint.
|
|
612
|
+
*/
|
|
613
|
+
export type CapabilityHarnessDto = 'in-memory' | 'cursor' | 'macrod';
|
|
614
|
+
/**
|
|
615
|
+
* The latest capture attempt.
|
|
616
|
+
*
|
|
617
|
+
* Clients deserialize this, so both derives are used.
|
|
618
|
+
*/
|
|
619
|
+
export type CaptureAttemptDto = {
|
|
620
|
+
/**
|
|
621
|
+
* Why it did not capture, in a sentence the user can read.
|
|
622
|
+
*/
|
|
623
|
+
error?: string | null;
|
|
624
|
+
/**
|
|
625
|
+
* When it ended; absent while it runs.
|
|
626
|
+
*/
|
|
627
|
+
finishedAt?: string | null;
|
|
628
|
+
outcome?: null | CaptureOutcomeDto;
|
|
629
|
+
/**
|
|
630
|
+
* When it started.
|
|
631
|
+
*/
|
|
632
|
+
startedAt: string;
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* How the latest capture attempt ended, on the wire.
|
|
636
|
+
*/
|
|
637
|
+
export type CaptureOutcomeDto = 'captured' | 'not_ready' | 'failed';
|
|
638
|
+
/**
|
|
639
|
+
* One changed file.
|
|
640
|
+
*
|
|
641
|
+
* Clients deserialize this, so both derives are used.
|
|
642
|
+
*/
|
|
643
|
+
export type ChangedFileDto = {
|
|
644
|
+
/**
|
|
645
|
+
* Lines added.
|
|
646
|
+
*/
|
|
647
|
+
additions: number;
|
|
648
|
+
/**
|
|
649
|
+
* The diff carries no text for this file.
|
|
650
|
+
*/
|
|
651
|
+
binary: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Lines removed.
|
|
654
|
+
*/
|
|
655
|
+
deletions: number;
|
|
656
|
+
/**
|
|
657
|
+
* What happened to the file.
|
|
658
|
+
*/
|
|
659
|
+
kind: FileChangeKindDto;
|
|
660
|
+
/**
|
|
661
|
+
* The file's hunks were left out of the patch to fit the size budget.
|
|
662
|
+
*/
|
|
663
|
+
patchOmitted: boolean;
|
|
664
|
+
/**
|
|
665
|
+
* The file's path after the change, or before it for a deletion.
|
|
666
|
+
*/
|
|
667
|
+
path: string;
|
|
668
|
+
/**
|
|
669
|
+
* Where a renamed file came from.
|
|
670
|
+
*/
|
|
671
|
+
previousPath?: string | null;
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* One changeset: the files a patch touches and what happened to each.
|
|
675
|
+
*
|
|
676
|
+
* Clients deserialize this, so both derives are used.
|
|
677
|
+
*/
|
|
678
|
+
export type ChangesetDto = {
|
|
679
|
+
/**
|
|
680
|
+
* Lines added across all files.
|
|
681
|
+
*/
|
|
682
|
+
additions: number;
|
|
683
|
+
/**
|
|
684
|
+
* The side the work started from.
|
|
685
|
+
*/
|
|
686
|
+
base: GitRefDto;
|
|
687
|
+
/**
|
|
688
|
+
* When the diff was taken.
|
|
689
|
+
*/
|
|
690
|
+
capturedAt: string;
|
|
691
|
+
/**
|
|
692
|
+
* Lines removed across all files.
|
|
693
|
+
*/
|
|
694
|
+
deletions: number;
|
|
695
|
+
/**
|
|
696
|
+
* Every changed file, in patch order.
|
|
697
|
+
*/
|
|
698
|
+
files: Array<ChangedFileDto>;
|
|
699
|
+
/**
|
|
700
|
+
* The side carrying the work.
|
|
701
|
+
*/
|
|
702
|
+
head: GitRefDto;
|
|
703
|
+
/**
|
|
704
|
+
* The changeset's id; a different id means different changes.
|
|
705
|
+
*/
|
|
706
|
+
id: string;
|
|
707
|
+
/**
|
|
708
|
+
* Size of the patch the matching patch route serves; zero when nothing
|
|
709
|
+
* changed.
|
|
710
|
+
*/
|
|
711
|
+
patchBytes: number;
|
|
712
|
+
/**
|
|
713
|
+
* `https://github.com/owner/name`, when known.
|
|
714
|
+
*/
|
|
715
|
+
repository?: string | null;
|
|
716
|
+
/**
|
|
717
|
+
* Where the diff was read from.
|
|
718
|
+
*/
|
|
719
|
+
source: ChangesetSourceDto;
|
|
720
|
+
/**
|
|
721
|
+
* Some files' hunks were left out of the patch.
|
|
722
|
+
*/
|
|
723
|
+
truncated: boolean;
|
|
724
|
+
};
|
|
725
|
+
/**
|
|
726
|
+
* The source of a changeset's diff, on the wire.
|
|
727
|
+
*/
|
|
728
|
+
export type ChangesetSourceDto = 'github_pull_request';
|
|
729
|
+
/**
|
|
730
|
+
* The channel share permission
|
|
731
|
+
*/
|
|
732
|
+
export type ChannelSharePermission = {
|
|
733
|
+
/**
|
|
734
|
+
* The access level for the channel
|
|
735
|
+
*/
|
|
736
|
+
access_level: AccessLevel;
|
|
737
|
+
/**
|
|
738
|
+
* The channel id
|
|
739
|
+
*/
|
|
740
|
+
channel_id: string;
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* Request or response body for the caller's coding preferences.
|
|
744
|
+
*/
|
|
745
|
+
export type CodingPreferencesBody = {
|
|
746
|
+
/**
|
|
747
|
+
* Whether new coding sessions research prior work and link a Macro task.
|
|
748
|
+
*/
|
|
749
|
+
createTasks: boolean;
|
|
750
|
+
/**
|
|
751
|
+
* Whether new coding sessions deliver their work as a pull request.
|
|
752
|
+
*/
|
|
753
|
+
openPullRequests: boolean;
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* One-time manual code. Deliberately does not implement Debug.
|
|
757
|
+
*/
|
|
758
|
+
export type CompleteRequest = {
|
|
759
|
+
/**
|
|
760
|
+
* Server-issued handle; never an owner selected by the caller.
|
|
761
|
+
*/
|
|
762
|
+
attemptId: string;
|
|
763
|
+
/**
|
|
764
|
+
* Claude's complete code#state string, not an access token.
|
|
765
|
+
*/
|
|
766
|
+
code: string;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Request body for a control operation on a live session.
|
|
770
|
+
*
|
|
771
|
+
* A wrapper around the operation rather than the bare enum so that fields
|
|
772
|
+
* which are about the request rather than the operation have somewhere to go.
|
|
773
|
+
* The acting user is deliberately not one of them: it comes from the caller's
|
|
774
|
+
* credentials, so that a caller cannot attribute an operation to someone else.
|
|
775
|
+
*
|
|
776
|
+
* Clients serialize this, so both derives are used.
|
|
777
|
+
*/
|
|
778
|
+
export type ControlRequest = AgentAction & {
|
|
779
|
+
actionId?: null | AgentActionId;
|
|
780
|
+
/**
|
|
781
|
+
* Why the agent is being asked. Only a runtime forwarding a triggered
|
|
782
|
+
* prompt may send it; a user's request carrying it is refused.
|
|
783
|
+
*/
|
|
784
|
+
context?: {
|
|
785
|
+
[key: string]: unknown;
|
|
786
|
+
} | null;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Response body for a control operation.
|
|
790
|
+
*
|
|
791
|
+
* Clients deserialize this, so both derives are used.
|
|
792
|
+
*/
|
|
793
|
+
export type ControlResponse = {
|
|
794
|
+
/**
|
|
795
|
+
* Matches `requestId` on the folded message this action derives once it
|
|
796
|
+
* dispatches, and names the queue entry until then. The caller's own
|
|
797
|
+
* `actionId` when it supplied one; a freshly minted id otherwise.
|
|
798
|
+
*/
|
|
799
|
+
actionId: AgentActionId;
|
|
800
|
+
/**
|
|
801
|
+
* Whether the action went out or waits in the queue.
|
|
802
|
+
*/
|
|
803
|
+
status: ControlStatusDto;
|
|
804
|
+
};
|
|
805
|
+
/**
|
|
806
|
+
* What accepting a control operation did with it, on the wire.
|
|
807
|
+
*/
|
|
808
|
+
export type ControlStatusDto = 'sent' | 'queued';
|
|
809
|
+
/**
|
|
810
|
+
* The state of one source message, retained after completion for deduplication.
|
|
811
|
+
*/
|
|
812
|
+
export type ConversationTurnState = 'queued' | 'running' | 'succeeded' | 'failed' | 'stopped' | 'interrupted';
|
|
813
|
+
/**
|
|
814
|
+
* Request body for `POST /agent-sessions`.
|
|
815
|
+
*
|
|
816
|
+
* Carries two shapes, told apart by `workspace`. Naming one asks for an
|
|
817
|
+
* external session: the runtime is the bot operator's, so the caller has to
|
|
818
|
+
* say which bot and which directory, and must own that bot. Omitting it asks
|
|
819
|
+
* for a managed session, whose runtime this deployment provisions. A managed
|
|
820
|
+
* 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.
|
|
824
|
+
*
|
|
825
|
+
* Clients serialize this, so both derives are used.
|
|
826
|
+
*/
|
|
827
|
+
export type CreateAgentSessionRequest = {
|
|
828
|
+
/**
|
|
829
|
+
* Bot the session runs for. On a managed request this optionally selects
|
|
830
|
+
* a persisted persona the user owns, may use through team membership, or
|
|
831
|
+
* 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.
|
|
835
|
+
*/
|
|
836
|
+
botId?: string | null;
|
|
837
|
+
/**
|
|
838
|
+
* Id to create the session under, minted by the caller. Lets a surface
|
|
839
|
+
* open on the session's final id - URL, history row, references - the
|
|
840
|
+
* moment the user acts, rather than after this request answers (which
|
|
841
|
+
* for a managed sandbox can take a while). Omitted, the service mints
|
|
842
|
+
* one. Answers 409 if a session already holds the id. On an external
|
|
843
|
+
* request it is how a runtime answering a composer request names the
|
|
844
|
+
* id it was handed, so the requester waiting on that id finds the session.
|
|
845
|
+
*/
|
|
846
|
+
id?: string | null;
|
|
847
|
+
/**
|
|
848
|
+
* Instructions the session's runtime works under, for its whole life.
|
|
849
|
+
*
|
|
850
|
+
* Recorded on the session whichever runtime serves it. Only the
|
|
851
|
+
* in-process one acts on them today; `agent_harness`'s `AgentKind`
|
|
852
|
+
* records what each of the others will need to.
|
|
853
|
+
*/
|
|
854
|
+
instructions?: string | null;
|
|
855
|
+
/**
|
|
856
|
+
* Model the managed session runs on, overriding the persona's. Managed
|
|
857
|
+
* sessions only: an external runtime picks its own.
|
|
858
|
+
*
|
|
859
|
+
* The session's model from the moment it exists, which is what a caller
|
|
860
|
+
* choosing one before the first prompt means. Selecting a model *during*
|
|
861
|
+
* a session is a control action instead, and reads as one in its
|
|
862
|
+
* transcript.
|
|
863
|
+
*/
|
|
864
|
+
model?: string | null;
|
|
865
|
+
/**
|
|
866
|
+
* The user who owns the session. Ignored for user callers, who always
|
|
867
|
+
* own their own sessions, for harness callers, whose verified acting
|
|
868
|
+
* user owns the session, and for bots that already act for a verified
|
|
869
|
+
* user. A bot without one may name a user here. That claim is trusted
|
|
870
|
+
* for the bot's own sessions. With no claim, a team bot owns the session
|
|
871
|
+
* itself only while non-user owners are enabled. Every other bot still
|
|
872
|
+
* needs an owner.
|
|
873
|
+
*/
|
|
874
|
+
owner?: string | null;
|
|
875
|
+
/**
|
|
876
|
+
* First prompt to deliver once the session is running. Managed sessions
|
|
877
|
+
* only - an external runtime sends its own first prompt through the
|
|
878
|
+
* control endpoint. Omitted, the session opens idle.
|
|
879
|
+
*/
|
|
880
|
+
prompt?: string | null;
|
|
881
|
+
/**
|
|
882
|
+
* Starting branch for a managed coding session's selected repository.
|
|
883
|
+
* Omitted, the session starts on the repository's default branch.
|
|
884
|
+
*/
|
|
885
|
+
repoBranch?: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* Explicit GitHub repository for a managed Cursor session, as one of the
|
|
888
|
+
* urls `GET /agent-repositories` lists for the caller. Access is checked
|
|
889
|
+
* for the session owner. For external sessions this is informational:
|
|
890
|
+
* cloning it is the runtime operator's job.
|
|
891
|
+
*/
|
|
892
|
+
repoUrl?: string | null;
|
|
893
|
+
thread?: null | CreateSessionThread;
|
|
894
|
+
/**
|
|
895
|
+
* Absolute directory the bot's harness runs in on its runtime. Present
|
|
896
|
+
* for an external session, absent for a managed one, which runs in the
|
|
897
|
+
* path baked into its image.
|
|
898
|
+
*/
|
|
899
|
+
workspace?: string | null;
|
|
227
900
|
};
|
|
228
901
|
/**
|
|
229
902
|
* Response body for `POST /agent-sessions`.
|
|
@@ -236,6 +909,31 @@ export type CreateAgentSessionResponse = {
|
|
|
236
909
|
*/
|
|
237
910
|
session: AgentSessionResponse;
|
|
238
911
|
};
|
|
912
|
+
/**
|
|
913
|
+
* Review creation. Drafts are validated by the action's owning adapter.
|
|
914
|
+
*/
|
|
915
|
+
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>;
|
|
927
|
+
executionId?: null | ExecutionId;
|
|
928
|
+
/**
|
|
929
|
+
* Existing UI and action to use.
|
|
930
|
+
*/
|
|
931
|
+
kind: ReviewKind;
|
|
932
|
+
/**
|
|
933
|
+
* Stack label.
|
|
934
|
+
*/
|
|
935
|
+
title: string;
|
|
936
|
+
};
|
|
239
937
|
/**
|
|
240
938
|
* The triggering mention on a create request.
|
|
241
939
|
*
|
|
@@ -243,9 +941,10 @@ export type CreateAgentSessionResponse = {
|
|
|
243
941
|
*/
|
|
244
942
|
export type CreateSessionThread = {
|
|
245
943
|
/**
|
|
246
|
-
* Channel the mentioning message was posted in.
|
|
944
|
+
* Channel the mentioning message was posted in. Runtimes built before
|
|
945
|
+
* message parents send this instead of `parent`.
|
|
247
946
|
*/
|
|
248
|
-
channelId
|
|
947
|
+
channelId?: string | null;
|
|
249
948
|
/**
|
|
250
949
|
* The mention's text, quoted in the session's announcement.
|
|
251
950
|
*/
|
|
@@ -254,6 +953,11 @@ export type CreateSessionThread = {
|
|
|
254
953
|
* The mentioning message.
|
|
255
954
|
*/
|
|
256
955
|
messageId: string;
|
|
956
|
+
parent?: null | MessageParent;
|
|
957
|
+
/**
|
|
958
|
+
* Update the existing bot response reserved by a task assignment.
|
|
959
|
+
*/
|
|
960
|
+
reuseOriginMessage?: boolean;
|
|
257
961
|
/**
|
|
258
962
|
* Thread the session belongs to; defaults to the message itself, which
|
|
259
963
|
* is how a top-level mention roots its own thread.
|
|
@@ -261,154 +965,1556 @@ export type CreateSessionThread = {
|
|
|
261
965
|
threadId?: string | null;
|
|
262
966
|
};
|
|
263
967
|
/**
|
|
264
|
-
*
|
|
968
|
+
* HTTP request selecting one provider to probe.
|
|
265
969
|
*/
|
|
266
|
-
export type
|
|
970
|
+
export type DiscoverAgentCapabilitiesRequest = {
|
|
267
971
|
/**
|
|
268
|
-
*
|
|
972
|
+
* Provider to probe.
|
|
269
973
|
*/
|
|
270
|
-
|
|
974
|
+
harness: CapabilityHarnessDto;
|
|
271
975
|
/**
|
|
272
|
-
*
|
|
976
|
+
* Required for macrod and forbidden for other targets.
|
|
273
977
|
*/
|
|
274
|
-
|
|
978
|
+
harnessId?: string | null;
|
|
275
979
|
/**
|
|
276
|
-
*
|
|
980
|
+
* Model whose session settings should be inspected.
|
|
277
981
|
*/
|
|
278
|
-
|
|
982
|
+
model?: string | null;
|
|
279
983
|
};
|
|
280
984
|
/**
|
|
281
|
-
*
|
|
985
|
+
* Successful capability-discovery response.
|
|
282
986
|
*/
|
|
283
|
-
export type
|
|
987
|
+
export type DiscoverAgentCapabilitiesResponse = {
|
|
988
|
+
/**
|
|
989
|
+
* Complete ordered ACP session configuration advertised by the agent.
|
|
990
|
+
*/
|
|
991
|
+
configOptions: Array<AgentConfigOptionDto>;
|
|
992
|
+
};
|
|
284
993
|
/**
|
|
285
|
-
*
|
|
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.
|
|
999
|
+
*/
|
|
1000
|
+
export type EditQueuedActionRequest = {
|
|
1001
|
+
/**
|
|
1002
|
+
* The new raw prompt text, replacing the old wholesale. Never blank: a
|
|
1003
|
+
* prompt with nothing to say is a removal, and there is an endpoint for
|
|
1004
|
+
* that.
|
|
1005
|
+
*/
|
|
1006
|
+
prompt: string;
|
|
1007
|
+
};
|
|
1008
|
+
/**
|
|
1009
|
+
* What the user decided about an elicitation. Mirrors ACP's three actions;
|
|
1010
|
+
* there is no `Other` because we never originate an action we do not know.
|
|
1011
|
+
*/
|
|
1012
|
+
export type ElicitationAnswer = {
|
|
1013
|
+
action: 'accept';
|
|
1014
|
+
/**
|
|
1015
|
+
* Form: the submitted values keyed by property. URL: omitted.
|
|
1016
|
+
*/
|
|
1017
|
+
content?: {
|
|
1018
|
+
[key: string]: ElicitationContentValue;
|
|
1019
|
+
} | null;
|
|
1020
|
+
} | {
|
|
1021
|
+
action: 'decline';
|
|
1022
|
+
} | {
|
|
1023
|
+
action: 'cancel';
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* A value ACP accepts in an elicitation answer.
|
|
286
1027
|
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
1028
|
+
* Mirrors ACP's `ElicitationContentValue` so that the contract a caller
|
|
1029
|
+
* answers against is the closed union ACP will accept, rather than arbitrary
|
|
1030
|
+
* JSON narrowed on the way out. An object, a null, or a mixed array is
|
|
1031
|
+
* refused when the request is deserialized - where the caller learns of it -
|
|
1032
|
+
* instead of at send time, when the elicitation slot has already been
|
|
1033
|
+
* released.
|
|
292
1034
|
*/
|
|
293
|
-
export type
|
|
1035
|
+
export type ElicitationContentValue = string | boolean | number | number | Array<string>;
|
|
1036
|
+
/**
|
|
1037
|
+
* The JSON-RPC id of an agent's `elicitation/create` request, carried whole
|
|
1038
|
+
* so the answer echoes exactly what the agent sent.
|
|
1039
|
+
*
|
|
1040
|
+
* Agents pick these, not us: Claude Code counts from `0`, others use
|
|
1041
|
+
* strings. `null` is not a legal id for a request that expects a response,
|
|
1042
|
+
* so it is not representable here.
|
|
1043
|
+
*/
|
|
1044
|
+
export type ElicitationRequestId = number | string;
|
|
1045
|
+
/**
|
|
1046
|
+
* A JSON body is required on writes, including start/disconnect (no form-based CSRF).
|
|
1047
|
+
*/
|
|
1048
|
+
export type EmptyRequest = {
|
|
1049
|
+
[key: string]: never;
|
|
1050
|
+
};
|
|
1051
|
+
/**
|
|
1052
|
+
* A bounded SDK operation observed during execution; not an authorization or write receipt.
|
|
1053
|
+
*/
|
|
1054
|
+
export type ExecutionActivity = {
|
|
294
1055
|
/**
|
|
295
|
-
*
|
|
296
|
-
* Protocol, whose shape belongs to the fold rather than this endpoint.
|
|
1056
|
+
* Request identity within the execution.
|
|
297
1057
|
*/
|
|
298
|
-
|
|
299
|
-
[key: string]: unknown;
|
|
300
|
-
};
|
|
1058
|
+
id: number;
|
|
301
1059
|
/**
|
|
302
|
-
*
|
|
1060
|
+
* Server-selected label from the generated operation catalog.
|
|
303
1061
|
*/
|
|
304
|
-
|
|
1062
|
+
label: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Observed request state; unfinished operations have unknown outcomes.
|
|
1065
|
+
*/
|
|
1066
|
+
status: RecordedCallStatus;
|
|
305
1067
|
};
|
|
306
1068
|
/**
|
|
307
|
-
*
|
|
1069
|
+
* Caller-selected UUID persisted in tool input before execution begins.
|
|
308
1070
|
*/
|
|
309
|
-
export type
|
|
1071
|
+
export type ExecutionId = string;
|
|
1072
|
+
/**
|
|
1073
|
+
* Durable source and final outcome, with historical bridge calls when present.
|
|
1074
|
+
* The full journal is not included in the model's tool result.
|
|
1075
|
+
*/
|
|
1076
|
+
export type ExecutionRecord = {
|
|
310
1077
|
/**
|
|
311
|
-
*
|
|
1078
|
+
* Advisory SDK operation activity, without arguments or response contents.
|
|
312
1079
|
*/
|
|
313
|
-
|
|
1080
|
+
activity?: Array<ExecutionActivity>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Additional request activity was omitted at the bounded observation limit.
|
|
1083
|
+
*/
|
|
1084
|
+
activityTruncated?: boolean;
|
|
1085
|
+
/**
|
|
1086
|
+
* Historical bridge calls. Direct HTTP executions leave this empty.
|
|
1087
|
+
*/
|
|
1088
|
+
calls: Array<RecordedToolCall>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Safe execution failure text.
|
|
1091
|
+
*/
|
|
1092
|
+
error?: string | null;
|
|
1093
|
+
/**
|
|
1094
|
+
* Execution identity.
|
|
1095
|
+
*/
|
|
1096
|
+
executionId: ExecutionId;
|
|
1097
|
+
/**
|
|
1098
|
+
* JSON returned by the program, if successful.
|
|
1099
|
+
*/
|
|
1100
|
+
result?: unknown;
|
|
1101
|
+
/**
|
|
1102
|
+
* The submitted JavaScript module.
|
|
1103
|
+
*/
|
|
1104
|
+
source: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* Overall execution state.
|
|
1107
|
+
*/
|
|
1108
|
+
status: ExecutionStatus;
|
|
314
1109
|
};
|
|
315
1110
|
/**
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* The API and database store the name. CPU, RAM, and disk live in
|
|
319
|
-
* `crates/agent_harness/sandbox_sizes.json`.
|
|
1111
|
+
* The recorded outcome of a program.
|
|
320
1112
|
*/
|
|
321
|
-
export type
|
|
1113
|
+
export type ExecutionStatus = 'running' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out';
|
|
322
1114
|
/**
|
|
323
|
-
*
|
|
1115
|
+
* The provider-side identity of an externally-served session.
|
|
324
1116
|
*/
|
|
325
|
-
export type
|
|
1117
|
+
export type ExternalSessionResponse = {
|
|
326
1118
|
/**
|
|
327
|
-
*
|
|
1119
|
+
* The provider's display name for the agent, when it reported one.
|
|
328
1120
|
*/
|
|
329
|
-
|
|
1121
|
+
name?: string | null;
|
|
1122
|
+
/**
|
|
1123
|
+
* Which provider serves the session, e.g. `cursor`.
|
|
1124
|
+
*/
|
|
1125
|
+
provider: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* The agent's page on the provider's site, for a client to link out to.
|
|
1128
|
+
*/
|
|
1129
|
+
url?: string | null;
|
|
1130
|
+
};
|
|
1131
|
+
/**
|
|
1132
|
+
* What happened to a file, on the wire.
|
|
1133
|
+
*/
|
|
1134
|
+
export type FileChangeKindDto = 'added' | 'modified' | 'deleted' | 'renamed';
|
|
1135
|
+
/**
|
|
1136
|
+
* One end of the compared range.
|
|
1137
|
+
*/
|
|
1138
|
+
export type GitRefDto = {
|
|
1139
|
+
/**
|
|
1140
|
+
* The branch name, when known.
|
|
1141
|
+
*/
|
|
1142
|
+
name?: string | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* The commit, when known.
|
|
1145
|
+
*/
|
|
1146
|
+
sha?: string | null;
|
|
1147
|
+
};
|
|
1148
|
+
/**
|
|
1149
|
+
* Defines who can access an item through its share link.
|
|
1150
|
+
*/
|
|
1151
|
+
export type LinkShare = 'PUBLIC' | 'TEAM';
|
|
1152
|
+
/**
|
|
1153
|
+
* HTTP request selecting one provider to probe.
|
|
1154
|
+
*/
|
|
1155
|
+
export type LoadAgentModelsRequest = {
|
|
1156
|
+
/**
|
|
1157
|
+
* Provider to probe.
|
|
1158
|
+
*/
|
|
1159
|
+
harness: ModelHarnessDto;
|
|
1160
|
+
/**
|
|
1161
|
+
* Required for macrod and forbidden for other targets.
|
|
1162
|
+
*/
|
|
1163
|
+
harnessId?: string | null;
|
|
1164
|
+
};
|
|
1165
|
+
/**
|
|
1166
|
+
* Successful model-discovery response.
|
|
1167
|
+
*/
|
|
1168
|
+
export type LoadAgentModelsResponse = {
|
|
1169
|
+
/**
|
|
1170
|
+
* Current provider model, if model selection is available.
|
|
1171
|
+
*/
|
|
1172
|
+
currentModel?: string | null;
|
|
1173
|
+
/**
|
|
1174
|
+
* Ordered model catalog.
|
|
1175
|
+
*/
|
|
1176
|
+
models: Array<AgentModelDto>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Model-selection availability.
|
|
1179
|
+
*/
|
|
1180
|
+
status: AgentModelsStatusDto;
|
|
1181
|
+
};
|
|
1182
|
+
/**
|
|
1183
|
+
* Which way a logged frame travelled, mirroring [`Message`]'s discriminant.
|
|
1184
|
+
*/
|
|
1185
|
+
export type LogDirectionDto = 'to_server' | 'to_runtime';
|
|
1186
|
+
/**
|
|
1187
|
+
* The two fields [`AgentSessionLogEntryDto`] flattens in.
|
|
1188
|
+
*
|
|
1189
|
+
* Schema only. Nothing constructs one: the entry serializes through
|
|
1190
|
+
* [`Message`], and this exists so the generated clients see `direction` and
|
|
1191
|
+
* `content` as named fields instead of an open map. A hand-built copy could
|
|
1192
|
+
* drift from the fold's wire format, and the point of the endpoint is that it
|
|
1193
|
+
* cannot - so this describes that format without being able to produce it.
|
|
1194
|
+
*/
|
|
1195
|
+
export type LogFrameDto = {
|
|
1196
|
+
/**
|
|
1197
|
+
* The protocol envelope, verbatim. Opaque here: it is Agent Runtime
|
|
1198
|
+
* Protocol, whose shape belongs to the fold rather than this endpoint.
|
|
1199
|
+
*/
|
|
1200
|
+
content: {
|
|
1201
|
+
[key: string]: unknown;
|
|
1202
|
+
};
|
|
1203
|
+
/**
|
|
1204
|
+
* Which way the frame travelled.
|
|
1205
|
+
*/
|
|
1206
|
+
direction: LogDirectionDto;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* The entity whose permissions and lifecycle govern a message.
|
|
1210
|
+
*/
|
|
1211
|
+
export type MessageParent = {
|
|
1212
|
+
/**
|
|
1213
|
+
* A channel, including direct messages.
|
|
1214
|
+
*/
|
|
1215
|
+
id: string;
|
|
1216
|
+
type: 'channel';
|
|
1217
|
+
} | {
|
|
1218
|
+
/**
|
|
1219
|
+
* A document, including tasks and PDFs.
|
|
1220
|
+
*/
|
|
1221
|
+
id: DocumentId;
|
|
1222
|
+
type: 'document';
|
|
1223
|
+
} | {
|
|
1224
|
+
/**
|
|
1225
|
+
* An initiative, presented as a project in the application.
|
|
1226
|
+
*/
|
|
1227
|
+
id: string;
|
|
1228
|
+
type: 'initiative';
|
|
1229
|
+
} | {
|
|
1230
|
+
/**
|
|
1231
|
+
* A CRM company.
|
|
1232
|
+
*/
|
|
1233
|
+
id: string;
|
|
1234
|
+
type: 'crm_company';
|
|
1235
|
+
} | {
|
|
1236
|
+
/**
|
|
1237
|
+
* A CRM contact.
|
|
1238
|
+
*/
|
|
1239
|
+
id: string;
|
|
1240
|
+
type: 'crm_contact';
|
|
1241
|
+
} | {
|
|
1242
|
+
/**
|
|
1243
|
+
* A video call and its persistent chat thread.
|
|
1244
|
+
*/
|
|
1245
|
+
id: string;
|
|
1246
|
+
type: 'call';
|
|
1247
|
+
};
|
|
1248
|
+
/**
|
|
1249
|
+
* Harness names accepted by the model discovery endpoint.
|
|
1250
|
+
*/
|
|
1251
|
+
export type ModelHarnessDto = 'in-memory' | 'cursor' | 'claude-cloud' | 'macrod';
|
|
1252
|
+
/**
|
|
1253
|
+
* The decision carried by an [`AgentPermissionAction`].
|
|
1254
|
+
*/
|
|
1255
|
+
export type PermissionAnswer = {
|
|
1256
|
+
kind: 'selected';
|
|
1257
|
+
/**
|
|
1258
|
+
* The chosen option's id, as the agent listed it.
|
|
1259
|
+
*/
|
|
1260
|
+
optionId: string;
|
|
1261
|
+
} | {
|
|
1262
|
+
kind: 'cancelled';
|
|
1263
|
+
};
|
|
1264
|
+
/**
|
|
1265
|
+
* Request body for `POST /agent-sessions/preview`.
|
|
1266
|
+
*
|
|
1267
|
+
* Clients serialize this, so both derives are used.
|
|
1268
|
+
*/
|
|
1269
|
+
export type PreviewAgentSessionsRequest = {
|
|
1270
|
+
/**
|
|
1271
|
+
* The sessions to preview. Duplicates are collapsed server-side; at most
|
|
1272
|
+
* [`MAX_PREVIEW_SESSION_IDS`](crate::domain::model::MAX_PREVIEW_SESSION_IDS)
|
|
1273
|
+
* distinct ids per request.
|
|
1274
|
+
*/
|
|
1275
|
+
sessionIds: Array<string>;
|
|
1276
|
+
};
|
|
1277
|
+
/**
|
|
1278
|
+
* Response body for `POST /agent-sessions/preview`: one entry per distinct
|
|
1279
|
+
* requested id, in no particular order.
|
|
1280
|
+
*
|
|
1281
|
+
* Clients deserialize this, so both derives are used.
|
|
1282
|
+
*/
|
|
1283
|
+
export type PreviewAgentSessionsResponse = {
|
|
1284
|
+
/**
|
|
1285
|
+
* What the caller may see of each requested session.
|
|
1286
|
+
*/
|
|
1287
|
+
previews: Array<AgentSessionPreviewDto>;
|
|
1288
|
+
};
|
|
1289
|
+
/**
|
|
1290
|
+
* A file the prompt refers to, by where the agent can fetch it.
|
|
1291
|
+
*
|
|
1292
|
+
* Mirrors ACP's `resource_link` content block, which every agent must
|
|
1293
|
+
* accept: bytes never ride the prompt, only a URI (a static file service URL
|
|
1294
|
+
* in practice) with enough metadata for a client to render a chip and for
|
|
1295
|
+
* the agent to decide whether to fetch it. Keeping the wire shape ACP-native
|
|
1296
|
+
* means the harness translates without resolving anything, and the fold
|
|
1297
|
+
* reads the same fields back off the logged frame.
|
|
1298
|
+
*/
|
|
1299
|
+
export type PromptAttachment = {
|
|
1300
|
+
/**
|
|
1301
|
+
* The file's media type, when known.
|
|
1302
|
+
*/
|
|
1303
|
+
mimeType?: string | null;
|
|
1304
|
+
/**
|
|
1305
|
+
* Display name, typically the original file name.
|
|
1306
|
+
*/
|
|
1307
|
+
name: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Size in bytes, when known.
|
|
1310
|
+
*/
|
|
1311
|
+
size?: number | null;
|
|
1312
|
+
/**
|
|
1313
|
+
* Where the agent can fetch the file.
|
|
1314
|
+
*/
|
|
1315
|
+
uri: string;
|
|
1316
|
+
};
|
|
1317
|
+
/**
|
|
1318
|
+
* Who associated a pull request with a session.
|
|
1319
|
+
*/
|
|
1320
|
+
export type PullRequestLinkSource = 'agent' | 'user';
|
|
1321
|
+
/**
|
|
1322
|
+
* A session linked to a pull request, as a viewer of that session sees it.
|
|
1323
|
+
*/
|
|
1324
|
+
export type PullRequestLinkedSession = {
|
|
1325
|
+
/**
|
|
1326
|
+
* The message that started the session, such as an @mention, when it was
|
|
1327
|
+
* started from a thread. A mention inside a thread is that reply, not the root.
|
|
1328
|
+
*/
|
|
1329
|
+
originMessageId?: string | null;
|
|
1330
|
+
/**
|
|
1331
|
+
* The session id.
|
|
1332
|
+
*/
|
|
1333
|
+
sessionId: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* Who associated the pull request with the session.
|
|
1336
|
+
*/
|
|
1337
|
+
source: PullRequestLinkSource;
|
|
1338
|
+
threadParent?: null | MessageParent;
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* The sessions linked to one pull request that the caller can view.
|
|
1342
|
+
*/
|
|
1343
|
+
export type PullRequestSessions = {
|
|
1344
|
+
/**
|
|
1345
|
+
* The pull request's `owner/repo/pull/number` key.
|
|
1346
|
+
*/
|
|
1347
|
+
githubKey: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* Linked sessions the caller can view, oldest link first.
|
|
1350
|
+
*/
|
|
1351
|
+
sessions: Array<PullRequestLinkedSession>;
|
|
1352
|
+
/**
|
|
1353
|
+
* The requested pull request URL, canonicalized.
|
|
1354
|
+
*/
|
|
1355
|
+
url: string;
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* The sessions associated with a pull request.
|
|
1359
|
+
*/
|
|
1360
|
+
export type PullRequestSessionsResponse = {
|
|
1361
|
+
/**
|
|
1362
|
+
* Sessions associated with the pull request that the caller can view.
|
|
1363
|
+
*/
|
|
1364
|
+
sessionIds: Array<string>;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* A GitHub pull request, by URL.
|
|
1368
|
+
*/
|
|
1369
|
+
export type PullRequestUrl = {
|
|
1370
|
+
/**
|
|
1371
|
+
* The pull request's GitHub URL, such as `https://github.com/owner/repo/pull/12`.
|
|
1372
|
+
*/
|
|
1373
|
+
url: string;
|
|
1374
|
+
};
|
|
1375
|
+
/**
|
|
1376
|
+
* GitHub pull requests, by URL.
|
|
1377
|
+
*/
|
|
1378
|
+
export type PullRequestUrls = {
|
|
1379
|
+
/**
|
|
1380
|
+
* Pull request GitHub URLs, at most 100.
|
|
1381
|
+
*/
|
|
1382
|
+
urls: Array<string>;
|
|
1383
|
+
};
|
|
1384
|
+
/**
|
|
1385
|
+
* The sessions associated with each requested pull request.
|
|
1386
|
+
*/
|
|
1387
|
+
export type PullRequestsSessionsResponse = {
|
|
1388
|
+
/**
|
|
1389
|
+
* One entry per requested pull request, in request order.
|
|
1390
|
+
*/
|
|
1391
|
+
pullRequests: Array<PullRequestSessions>;
|
|
1392
|
+
};
|
|
1393
|
+
/**
|
|
1394
|
+
* One action waiting in a session's queue.
|
|
1395
|
+
*
|
|
1396
|
+
* Clients deserialize this, so both derives are used.
|
|
1397
|
+
*/
|
|
1398
|
+
export type QueuedActionDto = {
|
|
1399
|
+
/**
|
|
1400
|
+
* The id the action was accepted under.
|
|
1401
|
+
*/
|
|
1402
|
+
actionId: AgentActionId;
|
|
1403
|
+
/**
|
|
1404
|
+
* The user who queued it, absent when a bot acted on nobody's behalf.
|
|
1405
|
+
*/
|
|
1406
|
+
actorUserId?: string | null;
|
|
1407
|
+
/**
|
|
1408
|
+
* Files the prompt refers to, for prompts only. Kept through an edit,
|
|
1409
|
+
* which replaces the text alone.
|
|
1410
|
+
*/
|
|
1411
|
+
attachments?: Array<PromptAttachment>;
|
|
1412
|
+
/**
|
|
1413
|
+
* When it was accepted.
|
|
1414
|
+
*/
|
|
1415
|
+
createdAt: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* What kind of action waits - `prompt` or `compact`; only
|
|
1418
|
+
* turn-occupying actions are ever queued.
|
|
1419
|
+
*/
|
|
1420
|
+
kind: string;
|
|
1421
|
+
/**
|
|
1422
|
+
* The prompt's raw text, present for prompts only. What an edit
|
|
1423
|
+
* replaces.
|
|
1424
|
+
*/
|
|
1425
|
+
prompt?: string | null;
|
|
1426
|
+
};
|
|
1427
|
+
/**
|
|
1428
|
+
* A dispatch result; unfinished work is never reported as success.
|
|
1429
|
+
*/
|
|
1430
|
+
export type RecordedCallStatus = 'running' | 'completed' | 'failed' | 'unknown';
|
|
1431
|
+
/**
|
|
1432
|
+
* A real inner call, recorded by trusted dispatch for the existing renderers.
|
|
1433
|
+
*/
|
|
1434
|
+
export type RecordedToolCall = {
|
|
1435
|
+
/**
|
|
1436
|
+
* Safe tool failure, if one was returned.
|
|
1437
|
+
*/
|
|
1438
|
+
error?: string | null;
|
|
1439
|
+
/**
|
|
1440
|
+
* Stable, execution-scoped component identity.
|
|
1441
|
+
*/
|
|
1442
|
+
id: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Arguments passed to the actual tool.
|
|
1445
|
+
*/
|
|
1446
|
+
input: unknown;
|
|
1447
|
+
/**
|
|
1448
|
+
* Canonical Macro tool name from the allowlisted registry.
|
|
1449
|
+
*/
|
|
1450
|
+
name: string;
|
|
1451
|
+
/**
|
|
1452
|
+
* Original tool output, retained independently of the program's return value.
|
|
1453
|
+
*/
|
|
1454
|
+
output?: unknown;
|
|
1455
|
+
/**
|
|
1456
|
+
* Whether the response was omitted to keep the durable journal bounded.
|
|
1457
|
+
*/
|
|
1458
|
+
outputOmitted: boolean;
|
|
1459
|
+
/**
|
|
1460
|
+
* A started call that never replied has an unknown side-effect outcome.
|
|
1461
|
+
*/
|
|
1462
|
+
status: RecordedCallStatus;
|
|
1463
|
+
};
|
|
1464
|
+
/**
|
|
1465
|
+
* Request body for renaming an agent session.
|
|
1466
|
+
*/
|
|
1467
|
+
export type RenameAgentSessionRequest = {
|
|
1468
|
+
/**
|
|
1469
|
+
* New user-facing name. Leading and trailing whitespace is discarded.
|
|
1470
|
+
*/
|
|
1471
|
+
name: string;
|
|
1472
|
+
};
|
|
1473
|
+
/**
|
|
1474
|
+
* The attempt the user saw and chose to retry; prevents double-click reruns.
|
|
1475
|
+
*/
|
|
1476
|
+
export type RetryAgentConversationTurnRequest = {
|
|
1477
|
+
/**
|
|
1478
|
+
* Current failed attempt identity.
|
|
1479
|
+
*/
|
|
1480
|
+
actionId: string;
|
|
1481
|
+
};
|
|
1482
|
+
/**
|
|
1483
|
+
* One atomic user decision against the displayed revision.
|
|
1484
|
+
*/
|
|
1485
|
+
export type ReviewDecision = {
|
|
1486
|
+
action: 'edit';
|
|
1487
|
+
/**
|
|
1488
|
+
* Replacement action arguments.
|
|
1489
|
+
*/
|
|
1490
|
+
draft: unknown;
|
|
1491
|
+
/**
|
|
1492
|
+
* Pending item to update.
|
|
1493
|
+
*/
|
|
1494
|
+
item: string;
|
|
1495
|
+
/**
|
|
1496
|
+
* Revision displayed by the caller.
|
|
1497
|
+
*/
|
|
1498
|
+
revision: number;
|
|
1499
|
+
} | {
|
|
1500
|
+
action: 'submit';
|
|
1501
|
+
/**
|
|
1502
|
+
* Pending items, or an empty list to select all pending items.
|
|
1503
|
+
*/
|
|
1504
|
+
items: Array<string>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Revision displayed by the caller.
|
|
1507
|
+
*/
|
|
1508
|
+
revision: number;
|
|
1509
|
+
} | {
|
|
1510
|
+
action: 'dismiss';
|
|
1511
|
+
/**
|
|
1512
|
+
* Pending items, or an empty list to select all pending items.
|
|
1513
|
+
*/
|
|
1514
|
+
items: Array<string>;
|
|
1515
|
+
/**
|
|
1516
|
+
* Revision displayed by the caller.
|
|
1517
|
+
*/
|
|
1518
|
+
revision: number;
|
|
1519
|
+
};
|
|
1520
|
+
/**
|
|
1521
|
+
* Persisted review identity.
|
|
1522
|
+
*/
|
|
1523
|
+
export type ReviewId = string;
|
|
1524
|
+
/**
|
|
1525
|
+
* One editable item and its durable outcome.
|
|
1526
|
+
*/
|
|
1527
|
+
export type ReviewItem = {
|
|
1528
|
+
/**
|
|
1529
|
+
* Validated arguments for the existing composer/action.
|
|
1530
|
+
*/
|
|
1531
|
+
draft: unknown;
|
|
1532
|
+
/**
|
|
1533
|
+
* Failure or uncertainty description.
|
|
1534
|
+
*/
|
|
1535
|
+
error?: string | null;
|
|
1536
|
+
/**
|
|
1537
|
+
* Stable item identity across stack navigation and edits.
|
|
1538
|
+
*/
|
|
1539
|
+
id: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* Actual backend response, never a model assertion.
|
|
1542
|
+
*/
|
|
1543
|
+
result?: unknown;
|
|
1544
|
+
/**
|
|
1545
|
+
* Current outcome.
|
|
1546
|
+
*/
|
|
1547
|
+
status: ReviewItemStatus;
|
|
1548
|
+
};
|
|
1549
|
+
/**
|
|
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.
|
|
1555
|
+
*/
|
|
1556
|
+
export type ReviewKind = 'email' | 'calendar';
|
|
1557
|
+
/**
|
|
1558
|
+
* Full UI record, fetched outside the model context.
|
|
1559
|
+
*/
|
|
1560
|
+
export type ReviewRecord = {
|
|
1561
|
+
executionId?: null | ExecutionId;
|
|
1562
|
+
/**
|
|
1563
|
+
* Review identity.
|
|
1564
|
+
*/
|
|
1565
|
+
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
|
+
/**
|
|
1584
|
+
* Durable presentation acknowledgment, separate from user decisions.
|
|
1585
|
+
*/
|
|
1586
|
+
presentedAt?: number | null;
|
|
1587
|
+
/**
|
|
1588
|
+
* Compare-and-swap revision for edits and submissions.
|
|
1589
|
+
*/
|
|
1590
|
+
revision: number;
|
|
1591
|
+
/**
|
|
1592
|
+
* Owning session.
|
|
1593
|
+
*/
|
|
1594
|
+
sessionId: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* Stack label.
|
|
1597
|
+
*/
|
|
1598
|
+
title: string;
|
|
1599
|
+
/**
|
|
1600
|
+
* Milliseconds since epoch of the last state change.
|
|
1601
|
+
*/
|
|
1602
|
+
updatedAt: number;
|
|
1603
|
+
};
|
|
1604
|
+
/**
|
|
1605
|
+
* Named compute tier for a managed sandbox.
|
|
1606
|
+
*
|
|
1607
|
+
* The API and database store the name. CPU, RAM, and disk live in
|
|
1608
|
+
* `crates/agent_harness/sandbox_sizes.json`.
|
|
1609
|
+
*/
|
|
1610
|
+
export type SandboxSize = 'small' | 'default' | 'large';
|
|
1611
|
+
/**
|
|
1612
|
+
* Request or response body for a named sandbox size.
|
|
1613
|
+
*/
|
|
1614
|
+
export type SandboxSizeBody = {
|
|
1615
|
+
/**
|
|
1616
|
+
* Named compute tier.
|
|
1617
|
+
*/
|
|
1618
|
+
size: SandboxSize;
|
|
1619
|
+
};
|
|
1620
|
+
/**
|
|
1621
|
+
* The agent behind a session, as much of it as rendering a message needs.
|
|
1622
|
+
*/
|
|
1623
|
+
export type SessionBot = {
|
|
1624
|
+
/**
|
|
1625
|
+
* Avatar, when it has one.
|
|
1626
|
+
*/
|
|
1627
|
+
avatarUrl?: string | null;
|
|
1628
|
+
/**
|
|
1629
|
+
* Stable `@` handle, without a leading `@`.
|
|
1630
|
+
*/
|
|
1631
|
+
handle: string;
|
|
1632
|
+
/**
|
|
1633
|
+
* The bot's id. A message it sent has `"bot|{id}"` as its sender.
|
|
1634
|
+
*/
|
|
1635
|
+
id: BotId;
|
|
1636
|
+
/**
|
|
1637
|
+
* Display name.
|
|
1638
|
+
*/
|
|
1639
|
+
name: string;
|
|
1640
|
+
};
|
|
1641
|
+
/**
|
|
1642
|
+
* A pull request associated with a session.
|
|
1643
|
+
*/
|
|
1644
|
+
export type SessionPullRequestLink = {
|
|
1645
|
+
/**
|
|
1646
|
+
* When the pull request was associated with the session.
|
|
1647
|
+
*/
|
|
1648
|
+
createdAt: string;
|
|
1649
|
+
/**
|
|
1650
|
+
* The pull request's `owner/repo/pull/number` key.
|
|
1651
|
+
*/
|
|
1652
|
+
githubKey: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* The Macro user who linked it, for links a person made.
|
|
1655
|
+
*/
|
|
1656
|
+
linkedBy?: string | null;
|
|
1657
|
+
/**
|
|
1658
|
+
* Who associated the pull request with the session.
|
|
1659
|
+
*/
|
|
1660
|
+
source: PullRequestLinkSource;
|
|
1661
|
+
/**
|
|
1662
|
+
* The pull request's GitHub URL.
|
|
1663
|
+
*/
|
|
1664
|
+
url: string;
|
|
1665
|
+
};
|
|
1666
|
+
/**
|
|
1667
|
+
* The pull requests associated with a session.
|
|
1668
|
+
*/
|
|
1669
|
+
export type SessionPullRequestsResponse = {
|
|
1670
|
+
/**
|
|
1671
|
+
* Pull requests, oldest link first.
|
|
1672
|
+
*/
|
|
1673
|
+
pullRequests: Array<SessionPullRequestLink>;
|
|
1674
|
+
};
|
|
1675
|
+
/**
|
|
1676
|
+
* Transport representation of a session's status, mirroring
|
|
1677
|
+
* [`SessionStatus`].
|
|
1678
|
+
*/
|
|
1679
|
+
export type SessionStatusDto = {
|
|
1680
|
+
kind: 'no_messages';
|
|
1681
|
+
} | {
|
|
1682
|
+
/**
|
|
1683
|
+
* The wire name of the system event, e.g. `acp_ready`.
|
|
1684
|
+
*/
|
|
1685
|
+
event: string;
|
|
1686
|
+
kind: 'event';
|
|
1687
|
+
} | {
|
|
1688
|
+
kind: 'disconnected';
|
|
1689
|
+
};
|
|
1690
|
+
/**
|
|
1691
|
+
* Request body for archiving or unarchiving an agent session.
|
|
1692
|
+
*/
|
|
1693
|
+
export type SetAgentSessionArchivedRequest = {
|
|
1694
|
+
/**
|
|
1695
|
+
* The requested archive state.
|
|
1696
|
+
*/
|
|
1697
|
+
isArchived: boolean;
|
|
1698
|
+
};
|
|
1699
|
+
export type SharePermissionV2 = {
|
|
1700
|
+
/**
|
|
1701
|
+
* The channel share permissions for the item
|
|
1702
|
+
*/
|
|
1703
|
+
channelSharePermissions?: Array<ChannelSharePermission> | null;
|
|
1704
|
+
/**
|
|
1705
|
+
* The share permission id
|
|
1706
|
+
*/
|
|
1707
|
+
id: string;
|
|
1708
|
+
linkShare?: null | LinkShare;
|
|
1709
|
+
linkShareAccessLevel?: null | AccessLevel;
|
|
1710
|
+
/**
|
|
1711
|
+
* The owner of the item
|
|
1712
|
+
*/
|
|
1713
|
+
owner: string;
|
|
1714
|
+
teamShareAccessLevel?: null | AccessLevel;
|
|
1715
|
+
};
|
|
1716
|
+
/**
|
|
1717
|
+
* The session the user is choosing to leave behind.
|
|
1718
|
+
*/
|
|
1719
|
+
export type StartFreshAgentConversationRequest = {
|
|
1720
|
+
/**
|
|
1721
|
+
* Current session id shown in the conversation metadata.
|
|
1722
|
+
*/
|
|
1723
|
+
sessionId: string;
|
|
1724
|
+
};
|
|
1725
|
+
/**
|
|
1726
|
+
* Public PKCE challenge and attempt handle; contains no verifier or provider tokens.
|
|
1727
|
+
*/
|
|
1728
|
+
export type StartResponse = {
|
|
1729
|
+
/**
|
|
1730
|
+
* Opaque owner-bound attempt handle.
|
|
1731
|
+
*/
|
|
1732
|
+
attemptId: string;
|
|
1733
|
+
/**
|
|
1734
|
+
* Claude-hosted consent page.
|
|
1735
|
+
*/
|
|
1736
|
+
authorizationUrl: string;
|
|
1737
|
+
/**
|
|
1738
|
+
* Attempt lifetime in seconds.
|
|
1739
|
+
*/
|
|
1740
|
+
expiresIn: number;
|
|
1741
|
+
};
|
|
1742
|
+
/**
|
|
1743
|
+
* Safe connection metadata.
|
|
1744
|
+
*/
|
|
1745
|
+
export type StatusResponse = {
|
|
1746
|
+
/**
|
|
1747
|
+
* Whether the authenticated Macro user has connected.
|
|
1748
|
+
*/
|
|
1749
|
+
connected: boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Whether this deployment supports browser connection.
|
|
1752
|
+
*/
|
|
1753
|
+
enabled: boolean;
|
|
1754
|
+
/**
|
|
1755
|
+
* Whether reconnecting after service restart is required.
|
|
1756
|
+
*/
|
|
1757
|
+
ephemeral: boolean;
|
|
1758
|
+
};
|
|
1759
|
+
/**
|
|
1760
|
+
* How a person answers a held tool call.
|
|
1761
|
+
*/
|
|
1762
|
+
export type ToolApprovalAnswerDto = 'approve' | 'approve_and_remember' | 'deny' | 'cancel';
|
|
1763
|
+
/**
|
|
1764
|
+
* Where a held tool call stands once answered.
|
|
1765
|
+
*/
|
|
1766
|
+
export type ToolApprovalStatusDto = 'pending' | 'approved' | 'denied' | 'cancelled' | 'expired';
|
|
1767
|
+
export type UpdateChannelSharePermission = {
|
|
1768
|
+
accessLevel?: null | AccessLevel;
|
|
1769
|
+
/**
|
|
1770
|
+
* The channel id
|
|
1771
|
+
*/
|
|
1772
|
+
channelId: string;
|
|
1773
|
+
/**
|
|
1774
|
+
* The type of operation to be performed on the chanel share permission
|
|
1775
|
+
* You can add, remove or replace and existing permission
|
|
1776
|
+
*/
|
|
1777
|
+
operation: UpdateOperation;
|
|
1778
|
+
};
|
|
1779
|
+
export type UpdateOperation = 'add' | 'remove' | 'replace';
|
|
1780
|
+
export type UpdateSharePermissionRequestV2 = {
|
|
1781
|
+
/**
|
|
1782
|
+
* Any channel share permissions to be created/updated/removed
|
|
1783
|
+
*/
|
|
1784
|
+
channelSharePermissions?: Array<UpdateChannelSharePermission> | null;
|
|
1785
|
+
linkShare?: null | LinkShare;
|
|
1786
|
+
linkShareAccessLevel?: null | AccessLevel;
|
|
1787
|
+
teamShareAccessLevel?: null | AccessLevel;
|
|
1788
|
+
};
|
|
1789
|
+
/**
|
|
1790
|
+
* A client-minted id deduplicates warm calls without creating a conversation.
|
|
1791
|
+
*/
|
|
1792
|
+
export type WarmAgentSessionRequest = {
|
|
1793
|
+
/**
|
|
1794
|
+
* Id reserved by this browser for its next in-memory conversation.
|
|
1795
|
+
*/
|
|
1796
|
+
id: string;
|
|
1797
|
+
};
|
|
1798
|
+
/**
|
|
1799
|
+
* A bounded best-effort warm attempt; absence means normal creation should proceed.
|
|
1800
|
+
*/
|
|
1801
|
+
export type WarmAgentSessionResponse = {
|
|
1802
|
+
session?: null | AgentSessionResponse;
|
|
1803
|
+
};
|
|
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;
|
|
1814
|
+
};
|
|
1815
|
+
export type DiscoverAgentCapabilitiesHandlerData = {
|
|
1816
|
+
body: DiscoverAgentCapabilitiesRequest;
|
|
1817
|
+
path?: never;
|
|
1818
|
+
query?: never;
|
|
1819
|
+
url: '/agent-capabilities/discover';
|
|
1820
|
+
};
|
|
1821
|
+
export type DiscoverAgentCapabilitiesHandlerErrors = {
|
|
1822
|
+
/**
|
|
1823
|
+
* Invalid target
|
|
1824
|
+
*/
|
|
1825
|
+
400: unknown;
|
|
1826
|
+
/**
|
|
1827
|
+
* Unauthenticated
|
|
1828
|
+
*/
|
|
1829
|
+
401: unknown;
|
|
1830
|
+
/**
|
|
1831
|
+
* Harness is not visible to caller
|
|
1832
|
+
*/
|
|
1833
|
+
403: unknown;
|
|
1834
|
+
/**
|
|
1835
|
+
* Macrod runtime or Cursor account is not connected
|
|
1836
|
+
*/
|
|
1837
|
+
409: unknown;
|
|
1838
|
+
/**
|
|
1839
|
+
* Provider probe failed
|
|
1840
|
+
*/
|
|
1841
|
+
502: unknown;
|
|
1842
|
+
/**
|
|
1843
|
+
* Macrod probe timed out
|
|
1844
|
+
*/
|
|
1845
|
+
504: unknown;
|
|
1846
|
+
};
|
|
1847
|
+
export type DiscoverAgentCapabilitiesHandlerResponses = {
|
|
1848
|
+
/**
|
|
1849
|
+
* Fresh provider session capabilities
|
|
1850
|
+
*/
|
|
1851
|
+
200: DiscoverAgentCapabilitiesResponse;
|
|
1852
|
+
};
|
|
1853
|
+
export type DiscoverAgentCapabilitiesHandlerResponse = DiscoverAgentCapabilitiesHandlerResponses[keyof DiscoverAgentCapabilitiesHandlerResponses];
|
|
1854
|
+
export type GetAgentCodingPreferencesData = {
|
|
1855
|
+
body?: never;
|
|
1856
|
+
path?: never;
|
|
1857
|
+
query?: never;
|
|
1858
|
+
url: '/agent-coding-preferences';
|
|
1859
|
+
};
|
|
1860
|
+
export type GetAgentCodingPreferencesErrors = {
|
|
1861
|
+
401: string;
|
|
1862
|
+
500: string;
|
|
1863
|
+
};
|
|
1864
|
+
export type GetAgentCodingPreferencesError = GetAgentCodingPreferencesErrors[keyof GetAgentCodingPreferencesErrors];
|
|
1865
|
+
export type GetAgentCodingPreferencesResponses = {
|
|
1866
|
+
200: CodingPreferencesBody;
|
|
1867
|
+
};
|
|
1868
|
+
export type GetAgentCodingPreferencesResponse = GetAgentCodingPreferencesResponses[keyof GetAgentCodingPreferencesResponses];
|
|
1869
|
+
export type PutAgentCodingPreferencesData = {
|
|
1870
|
+
body: CodingPreferencesBody;
|
|
1871
|
+
path?: never;
|
|
1872
|
+
query?: never;
|
|
1873
|
+
url: '/agent-coding-preferences';
|
|
1874
|
+
};
|
|
1875
|
+
export type PutAgentCodingPreferencesErrors = {
|
|
1876
|
+
401: string;
|
|
1877
|
+
500: string;
|
|
1878
|
+
};
|
|
1879
|
+
export type PutAgentCodingPreferencesError = PutAgentCodingPreferencesErrors[keyof PutAgentCodingPreferencesErrors];
|
|
1880
|
+
export type PutAgentCodingPreferencesResponses = {
|
|
1881
|
+
200: CodingPreferencesBody;
|
|
1882
|
+
};
|
|
1883
|
+
export type PutAgentCodingPreferencesResponse = PutAgentCodingPreferencesResponses[keyof PutAgentCodingPreferencesResponses];
|
|
1884
|
+
export type ListAgentConversationsData = {
|
|
1885
|
+
body?: never;
|
|
1886
|
+
path: {
|
|
1887
|
+
/**
|
|
1888
|
+
* Conversation channel
|
|
1889
|
+
*/
|
|
1890
|
+
channel_id: string;
|
|
1891
|
+
};
|
|
1892
|
+
query?: never;
|
|
1893
|
+
url: '/agent-conversations/{channel_id}';
|
|
1894
|
+
};
|
|
1895
|
+
export type ListAgentConversationsErrors = {
|
|
1896
|
+
/**
|
|
1897
|
+
* Conversations temporarily unavailable
|
|
1898
|
+
*/
|
|
1899
|
+
503: unknown;
|
|
1900
|
+
};
|
|
1901
|
+
export type ListAgentConversationsResponses = {
|
|
1902
|
+
/**
|
|
1903
|
+
* The caller's agent conversations in the channel
|
|
1904
|
+
*/
|
|
1905
|
+
200: AgentConversationsDto;
|
|
1906
|
+
};
|
|
1907
|
+
export type ListAgentConversationsResponse = ListAgentConversationsResponses[keyof ListAgentConversationsResponses];
|
|
1908
|
+
export type StartFreshAgentConversationData = {
|
|
1909
|
+
body: StartFreshAgentConversationRequest;
|
|
1910
|
+
path: {
|
|
1911
|
+
channel_id: string;
|
|
1912
|
+
/**
|
|
1913
|
+
* Persona the conversation is with
|
|
1914
|
+
*/
|
|
1915
|
+
bot_id: string;
|
|
1916
|
+
};
|
|
1917
|
+
query?: never;
|
|
1918
|
+
url: '/agent-conversations/{channel_id}/{bot_id}/start-fresh';
|
|
1919
|
+
};
|
|
1920
|
+
export type StartFreshAgentConversationErrors = {
|
|
1921
|
+
/**
|
|
1922
|
+
* Conversation not found
|
|
1923
|
+
*/
|
|
1924
|
+
404: unknown;
|
|
1925
|
+
/**
|
|
1926
|
+
* Context is busy, stale or unavailable
|
|
1927
|
+
*/
|
|
1928
|
+
409: unknown;
|
|
1929
|
+
/**
|
|
1930
|
+
* Temporarily unavailable
|
|
1931
|
+
*/
|
|
1932
|
+
503: unknown;
|
|
1933
|
+
};
|
|
1934
|
+
export type StartFreshAgentConversationResponses = {
|
|
1935
|
+
/**
|
|
1936
|
+
* New context reserved
|
|
1937
|
+
*/
|
|
1938
|
+
204: void;
|
|
1939
|
+
};
|
|
1940
|
+
export type StartFreshAgentConversationResponse = StartFreshAgentConversationResponses[keyof StartFreshAgentConversationResponses];
|
|
1941
|
+
export type RetryAgentConversationTurnData = {
|
|
1942
|
+
body: RetryAgentConversationTurnRequest;
|
|
1943
|
+
path: {
|
|
1944
|
+
channel_id: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* Persona the conversation is with
|
|
1947
|
+
*/
|
|
1948
|
+
bot_id: string;
|
|
1949
|
+
source: string;
|
|
1950
|
+
};
|
|
1951
|
+
query?: never;
|
|
1952
|
+
url: '/agent-conversations/{channel_id}/{bot_id}/turns/{source}/retry';
|
|
1953
|
+
};
|
|
1954
|
+
export type RetryAgentConversationTurnErrors = {
|
|
1955
|
+
/**
|
|
1956
|
+
* Conversation or turn not found
|
|
1957
|
+
*/
|
|
1958
|
+
404: unknown;
|
|
1959
|
+
/**
|
|
1960
|
+
* Attempt cannot be retried
|
|
1961
|
+
*/
|
|
1962
|
+
409: unknown;
|
|
1963
|
+
/**
|
|
1964
|
+
* Temporarily unavailable
|
|
1965
|
+
*/
|
|
1966
|
+
503: unknown;
|
|
1967
|
+
};
|
|
1968
|
+
export type RetryAgentConversationTurnResponses = {
|
|
1969
|
+
/**
|
|
1970
|
+
* Retry queued
|
|
1971
|
+
*/
|
|
1972
|
+
204: void;
|
|
1973
|
+
};
|
|
1974
|
+
export type RetryAgentConversationTurnResponse = RetryAgentConversationTurnResponses[keyof RetryAgentConversationTurnResponses];
|
|
1975
|
+
export type LoadAgentModelsHandlerData = {
|
|
1976
|
+
body: LoadAgentModelsRequest;
|
|
1977
|
+
path?: never;
|
|
1978
|
+
query?: never;
|
|
1979
|
+
url: '/agent-models/load';
|
|
1980
|
+
};
|
|
1981
|
+
export type LoadAgentModelsHandlerErrors = {
|
|
1982
|
+
/**
|
|
1983
|
+
* Invalid target
|
|
1984
|
+
*/
|
|
1985
|
+
400: unknown;
|
|
1986
|
+
/**
|
|
1987
|
+
* Unauthenticated
|
|
1988
|
+
*/
|
|
1989
|
+
401: unknown;
|
|
1990
|
+
/**
|
|
1991
|
+
* Harness is not visible to caller
|
|
1992
|
+
*/
|
|
1993
|
+
403: unknown;
|
|
1994
|
+
/**
|
|
1995
|
+
* Macrod runtime or Cursor account is not connected
|
|
1996
|
+
*/
|
|
1997
|
+
409: unknown;
|
|
1998
|
+
/**
|
|
1999
|
+
* Provider probe failed
|
|
2000
|
+
*/
|
|
2001
|
+
502: unknown;
|
|
2002
|
+
/**
|
|
2003
|
+
* Macrod probe timed out
|
|
2004
|
+
*/
|
|
2005
|
+
504: unknown;
|
|
2006
|
+
};
|
|
2007
|
+
export type LoadAgentModelsHandlerResponses = {
|
|
2008
|
+
/**
|
|
2009
|
+
* Fresh provider model catalog
|
|
2010
|
+
*/
|
|
2011
|
+
200: LoadAgentModelsResponse;
|
|
2012
|
+
};
|
|
2013
|
+
export type LoadAgentModelsHandlerResponse = LoadAgentModelsHandlerResponses[keyof LoadAgentModelsHandlerResponses];
|
|
2014
|
+
export type ListAgentRepositoriesData = {
|
|
2015
|
+
body?: never;
|
|
2016
|
+
path?: never;
|
|
2017
|
+
query?: never;
|
|
2018
|
+
url: '/agent-repositories';
|
|
2019
|
+
};
|
|
2020
|
+
export type ListAgentRepositoriesErrors = {
|
|
2021
|
+
/**
|
|
2022
|
+
* Unauthenticated
|
|
2023
|
+
*/
|
|
2024
|
+
401: unknown;
|
|
2025
|
+
/**
|
|
2026
|
+
* GitHub could not be asked which repositories the caller reaches
|
|
2027
|
+
*/
|
|
2028
|
+
502: unknown;
|
|
2029
|
+
};
|
|
2030
|
+
export type ListAgentRepositoriesResponses = {
|
|
2031
|
+
/**
|
|
2032
|
+
* The caller's reachable repositories
|
|
2033
|
+
*/
|
|
2034
|
+
200: AgentRepositoriesResponse;
|
|
2035
|
+
};
|
|
2036
|
+
export type ListAgentRepositoriesResponse = ListAgentRepositoriesResponses[keyof ListAgentRepositoriesResponses];
|
|
2037
|
+
export type ListAgentRepositoryBranchesData = {
|
|
2038
|
+
body?: never;
|
|
2039
|
+
path?: never;
|
|
2040
|
+
query: {
|
|
2041
|
+
/**
|
|
2042
|
+
* Canonical https://github.com/owner/name URL
|
|
2043
|
+
*/
|
|
2044
|
+
repoUrl: string;
|
|
2045
|
+
};
|
|
2046
|
+
url: '/agent-repositories/branches';
|
|
2047
|
+
};
|
|
2048
|
+
export type ListAgentRepositoryBranchesErrors = {
|
|
2049
|
+
/**
|
|
2050
|
+
* The query did not name a GitHub repository
|
|
2051
|
+
*/
|
|
2052
|
+
400: unknown;
|
|
2053
|
+
/**
|
|
2054
|
+
* Unauthenticated
|
|
2055
|
+
*/
|
|
2056
|
+
401: unknown;
|
|
2057
|
+
/**
|
|
2058
|
+
* The caller cannot reach this repository
|
|
2059
|
+
*/
|
|
2060
|
+
403: unknown;
|
|
2061
|
+
/**
|
|
2062
|
+
* GitHub could not be asked which branches the repository has
|
|
2063
|
+
*/
|
|
2064
|
+
502: unknown;
|
|
2065
|
+
};
|
|
2066
|
+
export type ListAgentRepositoryBranchesResponses = {
|
|
2067
|
+
/**
|
|
2068
|
+
* The repository's branches
|
|
2069
|
+
*/
|
|
2070
|
+
200: AgentRepositoryBranchesResponse;
|
|
2071
|
+
};
|
|
2072
|
+
export type ListAgentRepositoryBranchesResponse = ListAgentRepositoryBranchesResponses[keyof ListAgentRepositoryBranchesResponses];
|
|
2073
|
+
export type GetAgentSandboxSizeData = {
|
|
2074
|
+
body?: never;
|
|
2075
|
+
path?: never;
|
|
2076
|
+
query?: never;
|
|
2077
|
+
url: '/agent-sandbox-size';
|
|
2078
|
+
};
|
|
2079
|
+
export type GetAgentSandboxSizeErrors = {
|
|
2080
|
+
401: string;
|
|
2081
|
+
500: string;
|
|
2082
|
+
};
|
|
2083
|
+
export type GetAgentSandboxSizeError = GetAgentSandboxSizeErrors[keyof GetAgentSandboxSizeErrors];
|
|
2084
|
+
export type GetAgentSandboxSizeResponses = {
|
|
2085
|
+
200: SandboxSizeBody;
|
|
2086
|
+
};
|
|
2087
|
+
export type GetAgentSandboxSizeResponse = GetAgentSandboxSizeResponses[keyof GetAgentSandboxSizeResponses];
|
|
2088
|
+
export type PutAgentSandboxSizeData = {
|
|
2089
|
+
body: SandboxSizeBody;
|
|
2090
|
+
path?: never;
|
|
2091
|
+
query?: never;
|
|
2092
|
+
url: '/agent-sandbox-size';
|
|
2093
|
+
};
|
|
2094
|
+
export type PutAgentSandboxSizeErrors = {
|
|
2095
|
+
401: string;
|
|
2096
|
+
500: string;
|
|
2097
|
+
};
|
|
2098
|
+
export type PutAgentSandboxSizeError = PutAgentSandboxSizeErrors[keyof PutAgentSandboxSizeErrors];
|
|
2099
|
+
export type PutAgentSandboxSizeResponses = {
|
|
2100
|
+
200: SandboxSizeBody;
|
|
2101
|
+
};
|
|
2102
|
+
export type PutAgentSandboxSizeResponse = PutAgentSandboxSizeResponses[keyof PutAgentSandboxSizeResponses];
|
|
2103
|
+
export type CreateAgentSessionData = {
|
|
2104
|
+
body: CreateAgentSessionRequest;
|
|
2105
|
+
path?: never;
|
|
2106
|
+
query?: never;
|
|
2107
|
+
url: '/agent-sessions';
|
|
2108
|
+
};
|
|
2109
|
+
export type CreateAgentSessionErrors = {
|
|
2110
|
+
401: string;
|
|
2111
|
+
/**
|
|
2112
|
+
* AI allowance exhausted
|
|
2113
|
+
*/
|
|
2114
|
+
402: AiAdmissionErrorBody;
|
|
2115
|
+
403: string;
|
|
2116
|
+
404: string;
|
|
2117
|
+
422: string;
|
|
2118
|
+
500: string;
|
|
2119
|
+
/**
|
|
2120
|
+
* AI usage validation unavailable; retry later
|
|
2121
|
+
*/
|
|
2122
|
+
503: AiAdmissionErrorBody;
|
|
2123
|
+
};
|
|
2124
|
+
export type CreateAgentSessionError = CreateAgentSessionErrors[keyof CreateAgentSessionErrors];
|
|
2125
|
+
export type CreateAgentSessionResponses = {
|
|
2126
|
+
201: CreateAgentSessionResponse;
|
|
2127
|
+
};
|
|
2128
|
+
export type CreateAgentSessionResponse2 = CreateAgentSessionResponses[keyof CreateAgentSessionResponses];
|
|
2129
|
+
export type AgentSessionsForPullRequestData = {
|
|
2130
|
+
body: PullRequestUrl;
|
|
2131
|
+
path?: never;
|
|
2132
|
+
query?: never;
|
|
2133
|
+
url: '/agent-sessions/by-pull-request';
|
|
2134
|
+
};
|
|
2135
|
+
export type AgentSessionsForPullRequestErrors = {
|
|
2136
|
+
400: string;
|
|
2137
|
+
401: string;
|
|
2138
|
+
500: string;
|
|
2139
|
+
};
|
|
2140
|
+
export type AgentSessionsForPullRequestError = AgentSessionsForPullRequestErrors[keyof AgentSessionsForPullRequestErrors];
|
|
2141
|
+
export type AgentSessionsForPullRequestResponses = {
|
|
2142
|
+
200: PullRequestSessionsResponse;
|
|
2143
|
+
};
|
|
2144
|
+
export type AgentSessionsForPullRequestResponse = AgentSessionsForPullRequestResponses[keyof AgentSessionsForPullRequestResponses];
|
|
2145
|
+
export type AgentSessionsForPullRequestsData = {
|
|
2146
|
+
body: PullRequestUrls;
|
|
2147
|
+
path?: never;
|
|
2148
|
+
query?: never;
|
|
2149
|
+
url: '/agent-sessions/by-pull-requests';
|
|
2150
|
+
};
|
|
2151
|
+
export type AgentSessionsForPullRequestsErrors = {
|
|
2152
|
+
400: string;
|
|
2153
|
+
401: string;
|
|
2154
|
+
500: string;
|
|
2155
|
+
};
|
|
2156
|
+
export type AgentSessionsForPullRequestsError = AgentSessionsForPullRequestsErrors[keyof AgentSessionsForPullRequestsErrors];
|
|
2157
|
+
export type AgentSessionsForPullRequestsResponses = {
|
|
2158
|
+
200: PullRequestsSessionsResponse;
|
|
2159
|
+
};
|
|
2160
|
+
export type AgentSessionsForPullRequestsResponse = AgentSessionsForPullRequestsResponses[keyof AgentSessionsForPullRequestsResponses];
|
|
2161
|
+
export type PreviewAgentSessionsData = {
|
|
2162
|
+
body: PreviewAgentSessionsRequest;
|
|
2163
|
+
path?: never;
|
|
2164
|
+
query?: never;
|
|
2165
|
+
url: '/agent-sessions/preview';
|
|
2166
|
+
};
|
|
2167
|
+
export type PreviewAgentSessionsErrors = {
|
|
2168
|
+
/**
|
|
2169
|
+
* more than the maximum number of session ids
|
|
2170
|
+
*/
|
|
2171
|
+
400: string;
|
|
2172
|
+
401: string;
|
|
2173
|
+
500: string;
|
|
2174
|
+
};
|
|
2175
|
+
export type PreviewAgentSessionsError = PreviewAgentSessionsErrors[keyof PreviewAgentSessionsErrors];
|
|
2176
|
+
export type PreviewAgentSessionsResponses = {
|
|
2177
|
+
200: PreviewAgentSessionsResponse;
|
|
2178
|
+
};
|
|
2179
|
+
export type PreviewAgentSessionsResponse2 = PreviewAgentSessionsResponses[keyof PreviewAgentSessionsResponses];
|
|
2180
|
+
export type WarmAgentSessionHandlerData = {
|
|
2181
|
+
body: WarmAgentSessionRequest;
|
|
2182
|
+
path?: never;
|
|
2183
|
+
query?: never;
|
|
2184
|
+
url: '/agent-sessions/warm';
|
|
2185
|
+
};
|
|
2186
|
+
export type WarmAgentSessionHandlerResponses = {
|
|
2187
|
+
200: WarmAgentSessionResponse;
|
|
2188
|
+
};
|
|
2189
|
+
export type WarmAgentSessionHandlerResponse = WarmAgentSessionHandlerResponses[keyof WarmAgentSessionHandlerResponses];
|
|
2190
|
+
export type DeleteAgentSessionData = {
|
|
2191
|
+
body?: never;
|
|
2192
|
+
path: {
|
|
2193
|
+
/**
|
|
2194
|
+
* ID of the agent session
|
|
2195
|
+
*/
|
|
2196
|
+
session_id: string;
|
|
2197
|
+
};
|
|
2198
|
+
query?: never;
|
|
2199
|
+
url: '/agent-sessions/{session_id}';
|
|
2200
|
+
};
|
|
2201
|
+
export type DeleteAgentSessionErrors = {
|
|
2202
|
+
401: string;
|
|
2203
|
+
403: string;
|
|
2204
|
+
500: string;
|
|
2205
|
+
};
|
|
2206
|
+
export type DeleteAgentSessionError = DeleteAgentSessionErrors[keyof DeleteAgentSessionErrors];
|
|
2207
|
+
export type DeleteAgentSessionResponses = {
|
|
2208
|
+
200: unknown;
|
|
2209
|
+
};
|
|
2210
|
+
export type GetAgentSessionData = {
|
|
2211
|
+
body?: never;
|
|
2212
|
+
path: {
|
|
2213
|
+
/**
|
|
2214
|
+
* ID of the agent session
|
|
2215
|
+
*/
|
|
2216
|
+
session_id: string;
|
|
2217
|
+
};
|
|
2218
|
+
query?: never;
|
|
2219
|
+
url: '/agent-sessions/{session_id}';
|
|
2220
|
+
};
|
|
2221
|
+
export type GetAgentSessionErrors = {
|
|
2222
|
+
/**
|
|
2223
|
+
* the session exists but is not this caller's
|
|
2224
|
+
*/
|
|
2225
|
+
401: string;
|
|
2226
|
+
403: string;
|
|
2227
|
+
/**
|
|
2228
|
+
* no session with this id: not created yet, or deleted since
|
|
2229
|
+
*/
|
|
2230
|
+
404: string;
|
|
2231
|
+
500: string;
|
|
2232
|
+
};
|
|
2233
|
+
export type GetAgentSessionError = GetAgentSessionErrors[keyof GetAgentSessionErrors];
|
|
2234
|
+
export type GetAgentSessionResponses = {
|
|
2235
|
+
200: AgentSessionResponse;
|
|
2236
|
+
};
|
|
2237
|
+
export type GetAgentSessionResponse = GetAgentSessionResponses[keyof GetAgentSessionResponses];
|
|
2238
|
+
export type SetAgentSessionArchivedData = {
|
|
2239
|
+
body: SetAgentSessionArchivedRequest;
|
|
2240
|
+
path: {
|
|
2241
|
+
/**
|
|
2242
|
+
* ID of the agent session
|
|
2243
|
+
*/
|
|
2244
|
+
session_id: string;
|
|
2245
|
+
};
|
|
2246
|
+
query?: never;
|
|
2247
|
+
url: '/agent-sessions/{session_id}/archived';
|
|
2248
|
+
};
|
|
2249
|
+
export type SetAgentSessionArchivedErrors = {
|
|
2250
|
+
401: string;
|
|
2251
|
+
403: string;
|
|
2252
|
+
/**
|
|
2253
|
+
* The session answers an agent conversation
|
|
2254
|
+
*/
|
|
2255
|
+
409: string;
|
|
2256
|
+
500: string;
|
|
2257
|
+
};
|
|
2258
|
+
export type SetAgentSessionArchivedError = SetAgentSessionArchivedErrors[keyof SetAgentSessionArchivedErrors];
|
|
2259
|
+
export type SetAgentSessionArchivedResponses = {
|
|
2260
|
+
204: void;
|
|
2261
|
+
};
|
|
2262
|
+
export type SetAgentSessionArchivedResponse = SetAgentSessionArchivedResponses[keyof SetAgentSessionArchivedResponses];
|
|
2263
|
+
export type GetAgentSessionChangesData = {
|
|
2264
|
+
body?: never;
|
|
2265
|
+
path: {
|
|
2266
|
+
/**
|
|
2267
|
+
* ID of the agent session
|
|
2268
|
+
*/
|
|
2269
|
+
session_id: string;
|
|
2270
|
+
};
|
|
2271
|
+
query?: never;
|
|
2272
|
+
url: '/agent-sessions/{session_id}/changes';
|
|
2273
|
+
};
|
|
2274
|
+
export type GetAgentSessionChangesErrors = {
|
|
2275
|
+
401: string;
|
|
2276
|
+
403: string;
|
|
2277
|
+
500: string;
|
|
2278
|
+
};
|
|
2279
|
+
export type GetAgentSessionChangesError = GetAgentSessionChangesErrors[keyof GetAgentSessionChangesErrors];
|
|
2280
|
+
export type GetAgentSessionChangesResponses = {
|
|
2281
|
+
200: AgentSessionChangesResponse;
|
|
2282
|
+
};
|
|
2283
|
+
export type GetAgentSessionChangesResponse = GetAgentSessionChangesResponses[keyof GetAgentSessionChangesResponses];
|
|
2284
|
+
export type GetAgentSessionChangesPatchData = {
|
|
2285
|
+
body?: never;
|
|
2286
|
+
path: {
|
|
2287
|
+
/**
|
|
2288
|
+
* ID of the agent session
|
|
2289
|
+
*/
|
|
2290
|
+
session_id: string;
|
|
2291
|
+
};
|
|
2292
|
+
query?: never;
|
|
2293
|
+
url: '/agent-sessions/{session_id}/changes/patch';
|
|
2294
|
+
};
|
|
2295
|
+
export type GetAgentSessionChangesPatchErrors = {
|
|
2296
|
+
401: string;
|
|
2297
|
+
403: string;
|
|
2298
|
+
404: string;
|
|
2299
|
+
500: string;
|
|
2300
|
+
};
|
|
2301
|
+
export type GetAgentSessionChangesPatchError = GetAgentSessionChangesPatchErrors[keyof GetAgentSessionChangesPatchErrors];
|
|
2302
|
+
export type GetAgentSessionChangesPatchResponses = {
|
|
2303
|
+
200: AgentSessionChangesPatchResponse;
|
|
2304
|
+
};
|
|
2305
|
+
export type GetAgentSessionChangesPatchResponse = GetAgentSessionChangesPatchResponses[keyof GetAgentSessionChangesPatchResponses];
|
|
2306
|
+
export type RefreshAgentSessionChangesData = {
|
|
2307
|
+
body?: never;
|
|
2308
|
+
path: {
|
|
2309
|
+
/**
|
|
2310
|
+
* ID of the agent session
|
|
2311
|
+
*/
|
|
2312
|
+
session_id: string;
|
|
2313
|
+
};
|
|
2314
|
+
query?: never;
|
|
2315
|
+
url: '/agent-sessions/{session_id}/changes/refresh';
|
|
2316
|
+
};
|
|
2317
|
+
export type RefreshAgentSessionChangesErrors = {
|
|
2318
|
+
401: string;
|
|
2319
|
+
403: string;
|
|
2320
|
+
500: string;
|
|
2321
|
+
};
|
|
2322
|
+
export type RefreshAgentSessionChangesError = RefreshAgentSessionChangesErrors[keyof RefreshAgentSessionChangesErrors];
|
|
2323
|
+
export type RefreshAgentSessionChangesResponses = {
|
|
2324
|
+
202: AgentSessionChangesResponse;
|
|
2325
|
+
};
|
|
2326
|
+
export type RefreshAgentSessionChangesResponse = RefreshAgentSessionChangesResponses[keyof RefreshAgentSessionChangesResponses];
|
|
2327
|
+
export type GetCodeExecutionData = {
|
|
2328
|
+
body?: never;
|
|
2329
|
+
path: {
|
|
2330
|
+
/**
|
|
2331
|
+
* Owning session
|
|
2332
|
+
*/
|
|
2333
|
+
session_id: string;
|
|
2334
|
+
/**
|
|
2335
|
+
* Execution receipt identity
|
|
2336
|
+
*/
|
|
2337
|
+
execution_id: string;
|
|
2338
|
+
};
|
|
2339
|
+
query?: never;
|
|
2340
|
+
url: '/agent-sessions/{session_id}/code-executions/{execution_id}';
|
|
2341
|
+
};
|
|
2342
|
+
export type GetCodeExecutionErrors = {
|
|
2343
|
+
401: unknown;
|
|
2344
|
+
403: unknown;
|
|
2345
|
+
404: unknown;
|
|
2346
|
+
500: unknown;
|
|
2347
|
+
};
|
|
2348
|
+
export type GetCodeExecutionResponses = {
|
|
2349
|
+
200: ExecutionRecord;
|
|
2350
|
+
};
|
|
2351
|
+
export type GetCodeExecutionResponse = GetCodeExecutionResponses[keyof GetCodeExecutionResponses];
|
|
2352
|
+
export type ListExecutionReviewsData = {
|
|
2353
|
+
body?: never;
|
|
2354
|
+
path: {
|
|
2355
|
+
session_id: string;
|
|
2356
|
+
execution_id: string;
|
|
2357
|
+
};
|
|
2358
|
+
query?: never;
|
|
2359
|
+
url: '/agent-sessions/{session_id}/code-executions/{execution_id}/reviews';
|
|
2360
|
+
};
|
|
2361
|
+
export type ListExecutionReviewsErrors = {
|
|
2362
|
+
403: unknown;
|
|
2363
|
+
};
|
|
2364
|
+
export type ListExecutionReviewsResponses = {
|
|
2365
|
+
200: Array<ReviewRecord>;
|
|
2366
|
+
};
|
|
2367
|
+
export type ListExecutionReviewsResponse = ListExecutionReviewsResponses[keyof ListExecutionReviewsResponses];
|
|
2368
|
+
export type ControlAgentSessionData = {
|
|
2369
|
+
body: ControlRequest;
|
|
2370
|
+
path: {
|
|
2371
|
+
/**
|
|
2372
|
+
* ID of the agent session
|
|
2373
|
+
*/
|
|
2374
|
+
session_id: string;
|
|
2375
|
+
};
|
|
2376
|
+
query?: never;
|
|
2377
|
+
url: '/agent-sessions/{session_id}/control';
|
|
2378
|
+
};
|
|
2379
|
+
export type ControlAgentSessionErrors = {
|
|
2380
|
+
401: string;
|
|
2381
|
+
/**
|
|
2382
|
+
* AI allowance exhausted
|
|
2383
|
+
*/
|
|
2384
|
+
402: AiAdmissionErrorBody;
|
|
2385
|
+
403: string;
|
|
2386
|
+
422: string;
|
|
2387
|
+
500: string;
|
|
2388
|
+
/**
|
|
2389
|
+
* AI usage validation unavailable, or replica draining; retry later
|
|
2390
|
+
*/
|
|
2391
|
+
503: AiAdmissionErrorBody;
|
|
2392
|
+
};
|
|
2393
|
+
export type ControlAgentSessionError = ControlAgentSessionErrors[keyof ControlAgentSessionErrors];
|
|
2394
|
+
export type ControlAgentSessionResponses = {
|
|
2395
|
+
/**
|
|
2396
|
+
* Accepted. `sent` reached the runtime; `queued` waits for the running turn to end and can be edited or removed meanwhile.
|
|
2397
|
+
*/
|
|
2398
|
+
200: ControlResponse;
|
|
2399
|
+
};
|
|
2400
|
+
export type ControlAgentSessionResponse = ControlAgentSessionResponses[keyof ControlAgentSessionResponses];
|
|
2401
|
+
export type GetAgentSessionLogData = {
|
|
2402
|
+
body?: never;
|
|
2403
|
+
path: {
|
|
2404
|
+
/**
|
|
2405
|
+
* ID of the agent session
|
|
2406
|
+
*/
|
|
2407
|
+
session_id: string;
|
|
2408
|
+
};
|
|
2409
|
+
query?: never;
|
|
2410
|
+
url: '/agent-sessions/{session_id}/log';
|
|
2411
|
+
};
|
|
2412
|
+
export type GetAgentSessionLogErrors = {
|
|
2413
|
+
401: string;
|
|
2414
|
+
403: string;
|
|
2415
|
+
500: string;
|
|
2416
|
+
};
|
|
2417
|
+
export type GetAgentSessionLogError = GetAgentSessionLogErrors[keyof GetAgentSessionLogErrors];
|
|
2418
|
+
export type GetAgentSessionLogResponses = {
|
|
2419
|
+
200: AgentSessionLogResponse;
|
|
2420
|
+
};
|
|
2421
|
+
export type GetAgentSessionLogResponse = GetAgentSessionLogResponses[keyof GetAgentSessionLogResponses];
|
|
2422
|
+
export type RenameAgentSessionData = {
|
|
2423
|
+
body: RenameAgentSessionRequest;
|
|
2424
|
+
path: {
|
|
2425
|
+
/**
|
|
2426
|
+
* ID of the agent session
|
|
2427
|
+
*/
|
|
2428
|
+
session_id: string;
|
|
2429
|
+
};
|
|
2430
|
+
query?: never;
|
|
2431
|
+
url: '/agent-sessions/{session_id}/name';
|
|
330
2432
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Avatar, when it has one.
|
|
337
|
-
*/
|
|
338
|
-
avatarUrl?: string | null;
|
|
339
|
-
/**
|
|
340
|
-
* The bot's id. A message it sent has `"bot|{id}"` as its sender.
|
|
341
|
-
*/
|
|
342
|
-
id: BotId;
|
|
2433
|
+
export type RenameAgentSessionErrors = {
|
|
2434
|
+
400: string;
|
|
2435
|
+
401: string;
|
|
2436
|
+
403: string;
|
|
343
2437
|
/**
|
|
344
|
-
*
|
|
2438
|
+
* The session is archived
|
|
345
2439
|
*/
|
|
346
|
-
|
|
2440
|
+
409: string;
|
|
2441
|
+
500: string;
|
|
347
2442
|
};
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
*/
|
|
352
|
-
export type SessionStatusDto = {
|
|
353
|
-
kind: 'no_messages';
|
|
354
|
-
} | {
|
|
355
|
-
/**
|
|
356
|
-
* The wire name of the system event, e.g. `acp_ready`.
|
|
357
|
-
*/
|
|
358
|
-
event: string;
|
|
359
|
-
kind: 'event';
|
|
360
|
-
} | {
|
|
361
|
-
kind: 'disconnected';
|
|
2443
|
+
export type RenameAgentSessionError = RenameAgentSessionErrors[keyof RenameAgentSessionErrors];
|
|
2444
|
+
export type RenameAgentSessionResponses = {
|
|
2445
|
+
204: void;
|
|
362
2446
|
};
|
|
363
|
-
export type
|
|
2447
|
+
export type RenameAgentSessionResponse = RenameAgentSessionResponses[keyof RenameAgentSessionResponses];
|
|
2448
|
+
export type GetAgentSessionPermissionsData = {
|
|
364
2449
|
body?: never;
|
|
365
|
-
path
|
|
2450
|
+
path: {
|
|
2451
|
+
/**
|
|
2452
|
+
* ID of the agent session
|
|
2453
|
+
*/
|
|
2454
|
+
session_id: string;
|
|
2455
|
+
};
|
|
366
2456
|
query?: never;
|
|
367
|
-
url: '/agent-
|
|
2457
|
+
url: '/agent-sessions/{session_id}/permissions';
|
|
368
2458
|
};
|
|
369
|
-
export type
|
|
370
|
-
|
|
2459
|
+
export type GetAgentSessionPermissionsErrors = {
|
|
2460
|
+
403: string;
|
|
371
2461
|
500: string;
|
|
372
2462
|
};
|
|
373
|
-
export type
|
|
374
|
-
export type
|
|
375
|
-
200:
|
|
2463
|
+
export type GetAgentSessionPermissionsError = GetAgentSessionPermissionsErrors[keyof GetAgentSessionPermissionsErrors];
|
|
2464
|
+
export type GetAgentSessionPermissionsResponses = {
|
|
2465
|
+
200: SharePermissionV2;
|
|
376
2466
|
};
|
|
377
|
-
export type
|
|
378
|
-
export type
|
|
379
|
-
body:
|
|
380
|
-
path
|
|
2467
|
+
export type GetAgentSessionPermissionsResponse = GetAgentSessionPermissionsResponses[keyof GetAgentSessionPermissionsResponses];
|
|
2468
|
+
export type UpdateAgentSessionPermissionsData = {
|
|
2469
|
+
body: UpdateSharePermissionRequestV2;
|
|
2470
|
+
path: {
|
|
2471
|
+
/**
|
|
2472
|
+
* ID of the agent session
|
|
2473
|
+
*/
|
|
2474
|
+
session_id: string;
|
|
2475
|
+
};
|
|
381
2476
|
query?: never;
|
|
382
|
-
url: '/agent-
|
|
2477
|
+
url: '/agent-sessions/{session_id}/permissions';
|
|
383
2478
|
};
|
|
384
|
-
export type
|
|
385
|
-
|
|
2479
|
+
export type UpdateAgentSessionPermissionsErrors = {
|
|
2480
|
+
400: string;
|
|
2481
|
+
403: string;
|
|
2482
|
+
409: string;
|
|
386
2483
|
500: string;
|
|
387
2484
|
};
|
|
388
|
-
export type
|
|
389
|
-
export type
|
|
390
|
-
200:
|
|
2485
|
+
export type UpdateAgentSessionPermissionsError = UpdateAgentSessionPermissionsErrors[keyof UpdateAgentSessionPermissionsErrors];
|
|
2486
|
+
export type UpdateAgentSessionPermissionsResponses = {
|
|
2487
|
+
200: SharePermissionV2;
|
|
391
2488
|
};
|
|
392
|
-
export type
|
|
393
|
-
export type
|
|
394
|
-
body
|
|
395
|
-
path
|
|
396
|
-
|
|
397
|
-
|
|
2489
|
+
export type UpdateAgentSessionPermissionsResponse = UpdateAgentSessionPermissionsResponses[keyof UpdateAgentSessionPermissionsResponses];
|
|
2490
|
+
export type UnlinkAgentSessionPullRequestData = {
|
|
2491
|
+
body?: never;
|
|
2492
|
+
path: {
|
|
2493
|
+
/**
|
|
2494
|
+
* ID of the agent session
|
|
2495
|
+
*/
|
|
2496
|
+
session_id: string;
|
|
2497
|
+
};
|
|
2498
|
+
query: {
|
|
2499
|
+
/**
|
|
2500
|
+
* The pull request's GitHub URL
|
|
2501
|
+
*/
|
|
2502
|
+
url: string;
|
|
2503
|
+
};
|
|
2504
|
+
url: '/agent-sessions/{session_id}/pull-requests';
|
|
398
2505
|
};
|
|
399
|
-
export type
|
|
2506
|
+
export type UnlinkAgentSessionPullRequestErrors = {
|
|
2507
|
+
400: string;
|
|
400
2508
|
401: string;
|
|
401
2509
|
403: string;
|
|
402
|
-
404: string;
|
|
403
|
-
422: string;
|
|
404
2510
|
500: string;
|
|
405
2511
|
};
|
|
406
|
-
export type
|
|
407
|
-
export type
|
|
408
|
-
|
|
2512
|
+
export type UnlinkAgentSessionPullRequestError = UnlinkAgentSessionPullRequestErrors[keyof UnlinkAgentSessionPullRequestErrors];
|
|
2513
|
+
export type UnlinkAgentSessionPullRequestResponses = {
|
|
2514
|
+
204: void;
|
|
409
2515
|
};
|
|
410
|
-
export type
|
|
411
|
-
export type
|
|
2516
|
+
export type UnlinkAgentSessionPullRequestResponse = UnlinkAgentSessionPullRequestResponses[keyof UnlinkAgentSessionPullRequestResponses];
|
|
2517
|
+
export type ListAgentSessionPullRequestsData = {
|
|
412
2518
|
body?: never;
|
|
413
2519
|
path: {
|
|
414
2520
|
/**
|
|
@@ -417,19 +2523,20 @@ export type DeleteAgentSessionData = {
|
|
|
417
2523
|
session_id: string;
|
|
418
2524
|
};
|
|
419
2525
|
query?: never;
|
|
420
|
-
url: '/agent-sessions/{session_id}';
|
|
2526
|
+
url: '/agent-sessions/{session_id}/pull-requests';
|
|
421
2527
|
};
|
|
422
|
-
export type
|
|
2528
|
+
export type ListAgentSessionPullRequestsErrors = {
|
|
423
2529
|
401: string;
|
|
424
2530
|
403: string;
|
|
425
2531
|
500: string;
|
|
426
2532
|
};
|
|
427
|
-
export type
|
|
428
|
-
export type
|
|
429
|
-
200:
|
|
2533
|
+
export type ListAgentSessionPullRequestsError = ListAgentSessionPullRequestsErrors[keyof ListAgentSessionPullRequestsErrors];
|
|
2534
|
+
export type ListAgentSessionPullRequestsResponses = {
|
|
2535
|
+
200: SessionPullRequestsResponse;
|
|
430
2536
|
};
|
|
431
|
-
export type
|
|
432
|
-
|
|
2537
|
+
export type ListAgentSessionPullRequestsResponse = ListAgentSessionPullRequestsResponses[keyof ListAgentSessionPullRequestsResponses];
|
|
2538
|
+
export type LinkAgentSessionPullRequestData = {
|
|
2539
|
+
body: PullRequestUrl;
|
|
433
2540
|
path: {
|
|
434
2541
|
/**
|
|
435
2542
|
* ID of the agent session
|
|
@@ -437,20 +2544,21 @@ export type GetAgentSessionData = {
|
|
|
437
2544
|
session_id: string;
|
|
438
2545
|
};
|
|
439
2546
|
query?: never;
|
|
440
|
-
url: '/agent-sessions/{session_id}';
|
|
2547
|
+
url: '/agent-sessions/{session_id}/pull-requests';
|
|
441
2548
|
};
|
|
442
|
-
export type
|
|
2549
|
+
export type LinkAgentSessionPullRequestErrors = {
|
|
2550
|
+
400: string;
|
|
443
2551
|
401: string;
|
|
444
2552
|
403: string;
|
|
445
2553
|
500: string;
|
|
446
2554
|
};
|
|
447
|
-
export type
|
|
448
|
-
export type
|
|
449
|
-
|
|
2555
|
+
export type LinkAgentSessionPullRequestError = LinkAgentSessionPullRequestErrors[keyof LinkAgentSessionPullRequestErrors];
|
|
2556
|
+
export type LinkAgentSessionPullRequestResponses = {
|
|
2557
|
+
204: void;
|
|
450
2558
|
};
|
|
451
|
-
export type
|
|
452
|
-
export type
|
|
453
|
-
body
|
|
2559
|
+
export type LinkAgentSessionPullRequestResponse = LinkAgentSessionPullRequestResponses[keyof LinkAgentSessionPullRequestResponses];
|
|
2560
|
+
export type GetAgentSessionQueueData = {
|
|
2561
|
+
body?: never;
|
|
454
2562
|
path: {
|
|
455
2563
|
/**
|
|
456
2564
|
* ID of the agent session
|
|
@@ -458,64 +2566,159 @@ export type ControlAgentSessionData = {
|
|
|
458
2566
|
session_id: string;
|
|
459
2567
|
};
|
|
460
2568
|
query?: never;
|
|
461
|
-
url: '/agent-sessions/{session_id}/
|
|
2569
|
+
url: '/agent-sessions/{session_id}/queue';
|
|
462
2570
|
};
|
|
463
|
-
export type
|
|
2571
|
+
export type GetAgentSessionQueueErrors = {
|
|
464
2572
|
401: string;
|
|
465
2573
|
403: string;
|
|
466
2574
|
500: string;
|
|
467
2575
|
};
|
|
468
|
-
export type
|
|
469
|
-
export type
|
|
2576
|
+
export type GetAgentSessionQueueError = GetAgentSessionQueueErrors[keyof GetAgentSessionQueueErrors];
|
|
2577
|
+
export type GetAgentSessionQueueResponses = {
|
|
2578
|
+
200: AgentSessionQueueResponse;
|
|
2579
|
+
};
|
|
2580
|
+
export type GetAgentSessionQueueResponse = GetAgentSessionQueueResponses[keyof GetAgentSessionQueueResponses];
|
|
2581
|
+
export type RemoveQueuedActionData = {
|
|
2582
|
+
body?: never;
|
|
2583
|
+
path: {
|
|
2584
|
+
/**
|
|
2585
|
+
* ID of the agent session
|
|
2586
|
+
*/
|
|
2587
|
+
session_id: string;
|
|
2588
|
+
/**
|
|
2589
|
+
* ID the action was accepted under
|
|
2590
|
+
*/
|
|
2591
|
+
action_id: string;
|
|
2592
|
+
};
|
|
2593
|
+
query?: never;
|
|
2594
|
+
url: '/agent-sessions/{session_id}/queue/{action_id}';
|
|
2595
|
+
};
|
|
2596
|
+
export type RemoveQueuedActionErrors = {
|
|
2597
|
+
401: string;
|
|
2598
|
+
403: string;
|
|
470
2599
|
/**
|
|
471
|
-
*
|
|
2600
|
+
* Already dispatched or never queued
|
|
472
2601
|
*/
|
|
473
|
-
|
|
2602
|
+
404: string;
|
|
2603
|
+
500: string;
|
|
474
2604
|
};
|
|
475
|
-
export type
|
|
476
|
-
export type
|
|
477
|
-
|
|
2605
|
+
export type RemoveQueuedActionError = RemoveQueuedActionErrors[keyof RemoveQueuedActionErrors];
|
|
2606
|
+
export type RemoveQueuedActionResponses = {
|
|
2607
|
+
204: void;
|
|
2608
|
+
};
|
|
2609
|
+
export type RemoveQueuedActionResponse = RemoveQueuedActionResponses[keyof RemoveQueuedActionResponses];
|
|
2610
|
+
export type EditQueuedActionData = {
|
|
2611
|
+
body: EditQueuedActionRequest;
|
|
478
2612
|
path: {
|
|
479
2613
|
/**
|
|
480
2614
|
* ID of the agent session
|
|
481
2615
|
*/
|
|
482
2616
|
session_id: string;
|
|
2617
|
+
/**
|
|
2618
|
+
* ID the action was accepted under
|
|
2619
|
+
*/
|
|
2620
|
+
action_id: string;
|
|
483
2621
|
};
|
|
484
2622
|
query?: never;
|
|
485
|
-
url: '/agent-sessions/{session_id}/
|
|
2623
|
+
url: '/agent-sessions/{session_id}/queue/{action_id}';
|
|
486
2624
|
};
|
|
487
|
-
export type
|
|
2625
|
+
export type EditQueuedActionErrors = {
|
|
488
2626
|
401: string;
|
|
489
2627
|
403: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* Already dispatched or never queued
|
|
2630
|
+
*/
|
|
2631
|
+
404: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* The queued action carries no text
|
|
2634
|
+
*/
|
|
2635
|
+
422: string;
|
|
490
2636
|
500: string;
|
|
491
2637
|
};
|
|
492
|
-
export type
|
|
493
|
-
export type
|
|
494
|
-
|
|
2638
|
+
export type EditQueuedActionError = EditQueuedActionErrors[keyof EditQueuedActionErrors];
|
|
2639
|
+
export type EditQueuedActionResponses = {
|
|
2640
|
+
204: void;
|
|
495
2641
|
};
|
|
496
|
-
export type
|
|
497
|
-
export type
|
|
498
|
-
body
|
|
2642
|
+
export type EditQueuedActionResponse = EditQueuedActionResponses[keyof EditQueuedActionResponses];
|
|
2643
|
+
export type SteerQueuedActionData = {
|
|
2644
|
+
body?: never;
|
|
499
2645
|
path: {
|
|
500
2646
|
/**
|
|
501
2647
|
* ID of the agent session
|
|
502
2648
|
*/
|
|
503
2649
|
session_id: string;
|
|
2650
|
+
/**
|
|
2651
|
+
* ID the action was accepted under
|
|
2652
|
+
*/
|
|
2653
|
+
action_id: string;
|
|
504
2654
|
};
|
|
505
2655
|
query?: never;
|
|
506
|
-
url: '/agent-sessions/{session_id}/
|
|
2656
|
+
url: '/agent-sessions/{session_id}/queue/{action_id}/steer';
|
|
507
2657
|
};
|
|
508
|
-
export type
|
|
509
|
-
400: string;
|
|
2658
|
+
export type SteerQueuedActionErrors = {
|
|
510
2659
|
401: string;
|
|
511
2660
|
403: string;
|
|
2661
|
+
/**
|
|
2662
|
+
* Already dispatched or never queued
|
|
2663
|
+
*/
|
|
2664
|
+
404: string;
|
|
512
2665
|
500: string;
|
|
513
2666
|
};
|
|
514
|
-
export type
|
|
515
|
-
export type
|
|
2667
|
+
export type SteerQueuedActionError = SteerQueuedActionErrors[keyof SteerQueuedActionErrors];
|
|
2668
|
+
export type SteerQueuedActionResponses = {
|
|
516
2669
|
204: void;
|
|
517
2670
|
};
|
|
518
|
-
export type
|
|
2671
|
+
export type SteerQueuedActionResponse = SteerQueuedActionResponses[keyof SteerQueuedActionResponses];
|
|
2672
|
+
export type CreateSessionReviewData = {
|
|
2673
|
+
body: CreateReview;
|
|
2674
|
+
path: {
|
|
2675
|
+
session_id: string;
|
|
2676
|
+
};
|
|
2677
|
+
query?: never;
|
|
2678
|
+
url: '/agent-sessions/{session_id}/reviews';
|
|
2679
|
+
};
|
|
2680
|
+
export type CreateSessionReviewErrors = {
|
|
2681
|
+
400: unknown;
|
|
2682
|
+
403: unknown;
|
|
2683
|
+
};
|
|
2684
|
+
export type CreateSessionReviewResponses = {
|
|
2685
|
+
200: ReviewRecord;
|
|
2686
|
+
};
|
|
2687
|
+
export type CreateSessionReviewResponse = CreateSessionReviewResponses[keyof CreateSessionReviewResponses];
|
|
2688
|
+
export type GetSessionReviewData = {
|
|
2689
|
+
body?: never;
|
|
2690
|
+
path: {
|
|
2691
|
+
session_id: string;
|
|
2692
|
+
review_id: string;
|
|
2693
|
+
};
|
|
2694
|
+
query?: never;
|
|
2695
|
+
url: '/agent-sessions/{session_id}/reviews/{review_id}';
|
|
2696
|
+
};
|
|
2697
|
+
export type GetSessionReviewErrors = {
|
|
2698
|
+
403: unknown;
|
|
2699
|
+
404: unknown;
|
|
2700
|
+
};
|
|
2701
|
+
export type GetSessionReviewResponses = {
|
|
2702
|
+
200: ReviewRecord;
|
|
2703
|
+
};
|
|
2704
|
+
export type GetSessionReviewResponse = GetSessionReviewResponses[keyof GetSessionReviewResponses];
|
|
2705
|
+
export type DecideSessionReviewData = {
|
|
2706
|
+
body: ReviewDecision;
|
|
2707
|
+
path: {
|
|
2708
|
+
session_id: string;
|
|
2709
|
+
review_id: string;
|
|
2710
|
+
};
|
|
2711
|
+
query?: never;
|
|
2712
|
+
url: '/agent-sessions/{session_id}/reviews/{review_id}';
|
|
2713
|
+
};
|
|
2714
|
+
export type DecideSessionReviewErrors = {
|
|
2715
|
+
403: unknown;
|
|
2716
|
+
409: unknown;
|
|
2717
|
+
};
|
|
2718
|
+
export type DecideSessionReviewResponses = {
|
|
2719
|
+
200: ReviewRecord;
|
|
2720
|
+
};
|
|
2721
|
+
export type DecideSessionReviewResponse = DecideSessionReviewResponses[keyof DecideSessionReviewResponses];
|
|
519
2722
|
export type PutAgentSessionSandboxSizeData = {
|
|
520
2723
|
body: SandboxSizeBody;
|
|
521
2724
|
path: {
|
|
@@ -537,3 +2740,122 @@ export type PutAgentSessionSandboxSizeResponses = {
|
|
|
537
2740
|
200: SandboxSizeBody;
|
|
538
2741
|
};
|
|
539
2742
|
export type PutAgentSessionSandboxSizeResponse = PutAgentSessionSandboxSizeResponses[keyof PutAgentSessionSandboxSizeResponses];
|
|
2743
|
+
export type AnswerAgentSessionToolApprovalData = {
|
|
2744
|
+
body: AnswerToolApprovalRequest;
|
|
2745
|
+
path: {
|
|
2746
|
+
/**
|
|
2747
|
+
* ID of the agent session
|
|
2748
|
+
*/
|
|
2749
|
+
session_id: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* ID of the held tool call
|
|
2752
|
+
*/
|
|
2753
|
+
approval_id: string;
|
|
2754
|
+
};
|
|
2755
|
+
query?: never;
|
|
2756
|
+
url: '/agent-sessions/{session_id}/tool-approvals/{approval_id}';
|
|
2757
|
+
};
|
|
2758
|
+
export type AnswerAgentSessionToolApprovalErrors = {
|
|
2759
|
+
401: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* Not the owner, for approve or deny; or no edit access
|
|
2762
|
+
*/
|
|
2763
|
+
403: string;
|
|
2764
|
+
404: string;
|
|
2765
|
+
/**
|
|
2766
|
+
* Already resolved
|
|
2767
|
+
*/
|
|
2768
|
+
409: string;
|
|
2769
|
+
/**
|
|
2770
|
+
* Approve for good, for a call no person asked for
|
|
2771
|
+
*/
|
|
2772
|
+
422: string;
|
|
2773
|
+
500: string;
|
|
2774
|
+
};
|
|
2775
|
+
export type AnswerAgentSessionToolApprovalError = AnswerAgentSessionToolApprovalErrors[keyof AnswerAgentSessionToolApprovalErrors];
|
|
2776
|
+
export type AnswerAgentSessionToolApprovalResponses = {
|
|
2777
|
+
200: AnswerToolApprovalResponse;
|
|
2778
|
+
};
|
|
2779
|
+
export type AnswerAgentSessionToolApprovalResponse = AnswerAgentSessionToolApprovalResponses[keyof AnswerAgentSessionToolApprovalResponses];
|
|
2780
|
+
export type DisconnectData = {
|
|
2781
|
+
body: EmptyRequest;
|
|
2782
|
+
path?: never;
|
|
2783
|
+
query?: never;
|
|
2784
|
+
url: '/claude-auth';
|
|
2785
|
+
};
|
|
2786
|
+
export type DisconnectErrors = {
|
|
2787
|
+
/**
|
|
2788
|
+
* Disabled
|
|
2789
|
+
*/
|
|
2790
|
+
403: unknown;
|
|
2791
|
+
};
|
|
2792
|
+
export type DisconnectResponses = {
|
|
2793
|
+
/**
|
|
2794
|
+
* Disconnected
|
|
2795
|
+
*/
|
|
2796
|
+
204: void;
|
|
2797
|
+
};
|
|
2798
|
+
export type DisconnectResponse = DisconnectResponses[keyof DisconnectResponses];
|
|
2799
|
+
export type StatusData = {
|
|
2800
|
+
body?: never;
|
|
2801
|
+
path?: never;
|
|
2802
|
+
query?: never;
|
|
2803
|
+
url: '/claude-auth';
|
|
2804
|
+
};
|
|
2805
|
+
export type StatusErrors = {
|
|
2806
|
+
/**
|
|
2807
|
+
* Unauthenticated
|
|
2808
|
+
*/
|
|
2809
|
+
401: unknown;
|
|
2810
|
+
};
|
|
2811
|
+
export type StatusResponses = {
|
|
2812
|
+
200: StatusResponse;
|
|
2813
|
+
};
|
|
2814
|
+
export type StatusResponse2 = StatusResponses[keyof StatusResponses];
|
|
2815
|
+
export type CompleteData = {
|
|
2816
|
+
body: CompleteRequest;
|
|
2817
|
+
path?: never;
|
|
2818
|
+
query?: never;
|
|
2819
|
+
url: '/claude-auth/complete';
|
|
2820
|
+
};
|
|
2821
|
+
export type CompleteErrors = {
|
|
2822
|
+
/**
|
|
2823
|
+
* Invalid code
|
|
2824
|
+
*/
|
|
2825
|
+
400: unknown;
|
|
2826
|
+
/**
|
|
2827
|
+
* Expired or replayed
|
|
2828
|
+
*/
|
|
2829
|
+
409: unknown;
|
|
2830
|
+
/**
|
|
2831
|
+
* Provider failed
|
|
2832
|
+
*/
|
|
2833
|
+
502: unknown;
|
|
2834
|
+
};
|
|
2835
|
+
export type CompleteResponses = {
|
|
2836
|
+
/**
|
|
2837
|
+
* Connected
|
|
2838
|
+
*/
|
|
2839
|
+
204: void;
|
|
2840
|
+
};
|
|
2841
|
+
export type CompleteResponse = CompleteResponses[keyof CompleteResponses];
|
|
2842
|
+
export type StartData = {
|
|
2843
|
+
body: EmptyRequest;
|
|
2844
|
+
path?: never;
|
|
2845
|
+
query?: never;
|
|
2846
|
+
url: '/claude-auth/start';
|
|
2847
|
+
};
|
|
2848
|
+
export type StartErrors = {
|
|
2849
|
+
/**
|
|
2850
|
+
* Disabled
|
|
2851
|
+
*/
|
|
2852
|
+
403: unknown;
|
|
2853
|
+
/**
|
|
2854
|
+
* Too many attempts
|
|
2855
|
+
*/
|
|
2856
|
+
429: unknown;
|
|
2857
|
+
};
|
|
2858
|
+
export type StartResponses = {
|
|
2859
|
+
200: StartResponse;
|
|
2860
|
+
};
|
|
2861
|
+
export type StartResponse2 = StartResponses[keyof StartResponses];
|