@parcha/agentrun-client 0.1.0-beta.38 → 0.1.0-beta.39

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.
@@ -1,9 +1,107 @@
1
1
  import type { BodyOptions, Call, DownloadOptions, Operation, RawBody, RequestOptions, Tagged } from "./types.js";
2
- export type AgentCreate = {
3
- definition: DefinitionInput;
4
- skills?: SkillFiles;
5
- note?: string;
2
+ export type Agent = {
3
+ agent_id: Id;
4
+ definition: Definition;
5
+ source: Source | null;
6
+ skills: Array<SkillFileInfo>;
7
+ sign_ins: Array<SignIn>;
8
+ runs: {
9
+ count: number;
10
+ live: number;
11
+ };
12
+ region: string;
13
+ home_etag: string;
14
+ created_at: Timestamp;
15
+ updated_at: Timestamp;
16
+ native_status?: {
17
+ runtime: "claude-code" | "codex";
18
+ project: string;
19
+ selector: {
20
+ kind: "project" | "agent" | "profile";
21
+ name?: string;
22
+ };
23
+ machine_id: string;
24
+ version: string | null;
25
+ model: string | null;
26
+ fingerprint: string;
27
+ configuration: Array<{
28
+ path: string;
29
+ sha256: string;
30
+ }>;
31
+ skills: Array<string>;
32
+ mcp_servers: Array<string>;
33
+ state: "needs_verification" | "needs_attention" | "ready";
34
+ issues: Array<string>;
35
+ capabilities: {
36
+ launch: boolean;
37
+ notes: boolean;
38
+ skills: boolean;
39
+ workflows: false;
40
+ approval: "native" | "unavailable";
41
+ usage: boolean;
42
+ };
43
+ connected: boolean;
44
+ verified_at?: string;
45
+ remote?: {
46
+ connector_id: string;
47
+ target_id: string;
48
+ };
49
+ };
50
+ external?: {
51
+ source: string;
52
+ kind: string;
53
+ id: string;
54
+ version: string;
55
+ };
56
+ console_url?: string;
57
+ tools?: Array<{
58
+ name: string;
59
+ blurb?: string;
60
+ provider?: string;
61
+ provider_from?: "agent" | "server" | "default";
62
+ default_provider?: string;
63
+ resolved?: string;
64
+ permission: "allow" | "ask" | "deny";
65
+ permission_from: "agent" | "server" | "default" | "unattended";
66
+ default_permission: "allow" | "ask" | "deny";
67
+ permissions: Array<"allow" | "ask" | "deny">;
68
+ }>;
69
+ kind?: "agentic" | "workflow" | null;
70
+ revision?: string | null;
71
+ revisions?: number;
72
+ archived_at?: string | null;
73
+ learning?: {
74
+ pending: number;
75
+ };
76
+ mcp_pin?: Record<string, {
77
+ tools: Array<{
78
+ name: string;
79
+ title?: string;
80
+ description?: string;
81
+ input_schema: Record<string, unknown>;
82
+ annotations?: Record<string, unknown>;
83
+ }>;
84
+ prices?: Record<string, number>;
85
+ }> | null;
86
+ own_computer?: {
87
+ provider: string;
88
+ id: string;
89
+ name: string;
90
+ state: "held" | "detached" | "deleting";
91
+ since: string;
92
+ image?: string;
93
+ run_id?: string;
94
+ why?: string;
95
+ } | null;
96
+ template?: {
97
+ id: string;
98
+ version: string;
99
+ sha: string | null;
100
+ } | null;
101
+ warnings?: Array<InputIssue>;
6
102
  };
103
+ export type Id = string;
104
+ export type Definition = DefinitionInput;
7
105
  export type DefinitionInput = {
8
106
  id?: Id;
9
107
  version?: number;
@@ -16,6 +114,43 @@ export type DefinitionInput = {
16
114
  output_schema?: JsonObject;
17
115
  workflow?: JsonObject;
18
116
  max_cost_usd?: number;
117
+ sdk?: {
118
+ runtime: "claude-agent-sdk" | "codex-sdk";
119
+ };
120
+ native?: {
121
+ runtime: "claude-code" | "codex";
122
+ project: string;
123
+ selector: {
124
+ kind: "project" | "agent" | "profile";
125
+ name?: string;
126
+ };
127
+ machine_id: string;
128
+ version: string | null;
129
+ model: string | null;
130
+ fingerprint: string;
131
+ configuration: Array<{
132
+ path: string;
133
+ sha256: string;
134
+ }>;
135
+ skills: Array<string>;
136
+ mcp_servers: Array<string>;
137
+ state: "needs_verification" | "needs_attention" | "ready";
138
+ issues: Array<string>;
139
+ capabilities: {
140
+ launch: boolean;
141
+ notes: boolean;
142
+ skills: boolean;
143
+ workflows: false;
144
+ approval: "native" | "unavailable";
145
+ usage: boolean;
146
+ };
147
+ connected: boolean;
148
+ verified_at?: string;
149
+ remote?: {
150
+ connector_id: string;
151
+ target_id: string;
152
+ };
153
+ };
19
154
  model?: string;
20
155
  model_tiers?: {
21
156
  fast?: string;
@@ -66,6 +201,24 @@ export type DefinitionInput = {
66
201
  provider?: "auto" | "native" | "exa-keyless" | "parallel" | "off";
67
202
  permission?: "allow" | "ask" | "deny";
68
203
  };
204
+ email_search?: {
205
+ permission?: "allow" | "ask" | "deny";
206
+ scope?: "thread" | "mailbox";
207
+ };
208
+ email_read?: {
209
+ permission?: "allow" | "ask" | "deny";
210
+ scope?: "thread" | "mailbox";
211
+ };
212
+ email_draft?: {
213
+ permission?: "allow" | "ask" | "deny";
214
+ };
215
+ email_send?: {
216
+ permission?: "allow" | "ask" | "deny";
217
+ };
218
+ email_file?: {
219
+ permission?: "allow" | "ask" | "deny";
220
+ scope?: "thread" | "mailbox";
221
+ };
69
222
  browser?: {
70
223
  provider?: "auto" | "browserbase" | "kernel" | "chrome";
71
224
  permission?: "allow" | "deny";
@@ -99,79 +252,8 @@ export type DefinitionInput = {
99
252
  approvals?: "ask" | "never";
100
253
  learning?: true | false | "notes";
101
254
  checkout?: "pull_request" | "none";
102
- cap_mode?: "expected" | "strict";
103
255
  };
104
- export type Id = string;
105
256
  export type JsonObject = Record<string, unknown>;
106
- export type SkillFiles = Record<string, string>;
107
- export type Agent = {
108
- agent_id: Id;
109
- definition: Definition;
110
- source: Source | null;
111
- skills: Array<SkillFileInfo>;
112
- sign_ins: Array<SignIn>;
113
- runs: {
114
- count: number;
115
- live: number;
116
- };
117
- region: string;
118
- home_etag: string;
119
- created_at: Timestamp;
120
- updated_at: Timestamp;
121
- external?: {
122
- source: string;
123
- kind: string;
124
- id: string;
125
- version: string;
126
- };
127
- console_url?: string;
128
- tools?: Array<{
129
- name: string;
130
- blurb?: string;
131
- provider?: string;
132
- provider_from?: "agent" | "server" | "default";
133
- default_provider?: string;
134
- resolved?: string;
135
- permission: "allow" | "ask" | "deny";
136
- permission_from: "agent" | "server" | "default" | "unattended";
137
- default_permission: "allow" | "ask" | "deny";
138
- permissions: Array<"allow" | "ask" | "deny">;
139
- }>;
140
- kind?: "agentic" | "workflow" | null;
141
- revision?: string | null;
142
- revisions?: number;
143
- archived_at?: string | null;
144
- learning?: {
145
- pending: number;
146
- };
147
- mcp_pin?: Record<string, {
148
- tools: Array<{
149
- name: string;
150
- title?: string;
151
- description?: string;
152
- input_schema: Record<string, unknown>;
153
- annotations?: Record<string, unknown>;
154
- }>;
155
- prices?: Record<string, number>;
156
- }> | null;
157
- own_computer?: {
158
- provider: string;
159
- id: string;
160
- name: string;
161
- state: "held" | "detached" | "deleting";
162
- since: string;
163
- image?: string;
164
- run_id?: string;
165
- why?: string;
166
- } | null;
167
- template?: {
168
- id: string;
169
- version: string;
170
- sha: string | null;
171
- } | null;
172
- warnings?: Array<InputIssue>;
173
- };
174
- export type Definition = DefinitionInput;
175
257
  export type Source = {
176
258
  sha: CommitSha;
177
259
  refreshed_at: Timestamp;
@@ -199,13 +281,19 @@ export type SecretMeta = {
199
281
  };
200
282
  export type InputIssue = {
201
283
  field: string;
202
- reason: "missing" | "wrong_type" | "not_allowed" | "not_an_option" | "too_short" | "too_long" | "too_few" | "too_many" | "bad_format" | "duplicate" | "invalid" | "not_set_up_here" | "redirect" | "not_https" | "too_many_tools" | "tools_too_large" | "reserved" | "expired" | "registration_unavailable";
284
+ reason: "missing" | "wrong_type" | "not_allowed" | "not_an_option" | "too_short" | "too_long" | "too_few" | "too_many" | "bad_format" | "duplicate" | "invalid" | "not_set_up_here" | "redirect" | "not_https" | "too_many_tools" | "tools_too_large" | "reserved" | "expired" | "registration_unavailable" | "priced_by_usage";
203
285
  expected?: string;
204
286
  message: string;
205
287
  fix?: string;
206
288
  code?: string;
207
289
  example?: unknown;
208
290
  };
291
+ export type AgentCreate = {
292
+ definition: DefinitionInput;
293
+ skills?: SkillFiles;
294
+ note?: string;
295
+ };
296
+ export type SkillFiles = Record<string, string>;
209
297
  export type AgentList = {
210
298
  agents: Array<Agent>;
211
299
  next_cursor: string | null;
@@ -225,6 +313,49 @@ export type RunSummary = {
225
313
  created_at: Timestamp;
226
314
  ended_at: Timestamp | null;
227
315
  cost: Cost;
316
+ sdk?: {
317
+ runtime: "claude-agent-sdk" | "codex-sdk";
318
+ model: string | null;
319
+ session_id: string | null;
320
+ learning_revision: string | null;
321
+ usage: {
322
+ input_tokens?: number | null;
323
+ output_tokens?: number | null;
324
+ cache_read_tokens?: number | null;
325
+ cache_write_tokens?: number | null;
326
+ cost_usd?: number | null;
327
+ } | null;
328
+ };
329
+ native?: {
330
+ runtime: string;
331
+ project: string;
332
+ selector: {
333
+ kind: "project" | "agent" | "profile";
334
+ name?: string;
335
+ };
336
+ machine_id: string;
337
+ fingerprint: string;
338
+ session_id: string | null;
339
+ model: string | null;
340
+ learning_revision: string | null;
341
+ usage: {
342
+ task: {
343
+ input_tokens: number | null;
344
+ output_tokens: number | null;
345
+ cache_read_tokens: number | null;
346
+ cache_write_tokens: number | null;
347
+ cost_usd: number | null;
348
+ } | null;
349
+ reflection: Array<{
350
+ input_tokens: number | null;
351
+ output_tokens: number | null;
352
+ cache_read_tokens: number | null;
353
+ cache_write_tokens: number | null;
354
+ cost_usd: number | null;
355
+ }>;
356
+ };
357
+ model_requests: null;
358
+ };
228
359
  console_url?: string;
229
360
  revision: string;
230
361
  kind: "agentic" | "workflow";
@@ -279,17 +410,18 @@ export type RunSummary = {
279
410
  tool: string;
280
411
  call_id: string;
281
412
  args_preview: string;
413
+ summary?: string;
282
414
  requested_at: string;
283
- price?: number | "not metered";
415
+ price?: number | "not metered" | "priced by usage";
284
416
  destructive?: true;
285
417
  } | {
286
418
  kind: "budget";
287
419
  cap_usd: number;
288
420
  spent_usd?: number;
421
+ held_usd?: number;
289
422
  needs_usd?: number;
290
423
  least_cap_usd?: number;
291
424
  suggested_cap_usd?: number;
292
- overshoot_bound_usd?: number;
293
425
  said: string;
294
426
  at: string;
295
427
  node?: string | null;
@@ -306,6 +438,8 @@ export type RunSummary = {
306
438
  completion_condition: string;
307
439
  asked_at: string;
308
440
  expires_at: string;
441
+ } | {
442
+ kind: "stopped";
309
443
  } | null;
310
444
  imported_from?: {
311
445
  source: "claude-code" | "codex" | "pi";
@@ -323,9 +457,14 @@ export type Cost = {
323
457
  basis: "charge" | "estimate";
324
458
  charge_state?: "held" | "settled" | "released" | null;
325
459
  cap_usd?: number | null;
460
+ free?: true;
326
461
  so_far_usd?: number;
327
462
  unpriced?: number;
328
- overshoot_bound_usd?: number;
463
+ upper_bound?: true;
464
+ plan?: {
465
+ requests: number;
466
+ tokens: number;
467
+ };
329
468
  };
330
469
  export type Effort = "low" | "medium" | "high";
331
470
  export type RunError = {
@@ -396,7 +535,6 @@ export type RunCreateInline = {
396
535
  mcp_auth?: Record<string, {
397
536
  headers: Record<string, string>;
398
537
  }>;
399
- cap_mode?: "expected" | "strict";
400
538
  workflow_first?: boolean;
401
539
  learning?: "use";
402
540
  repo?: string;
@@ -428,12 +566,54 @@ export type Run = {
428
566
  error: RunError | null;
429
567
  cost: Cost;
430
568
  poll_after_ms: number;
569
+ sdk?: {
570
+ runtime: "claude-agent-sdk" | "codex-sdk";
571
+ model: string | null;
572
+ session_id: string | null;
573
+ learning_revision: string | null;
574
+ usage: {
575
+ input_tokens?: number | null;
576
+ output_tokens?: number | null;
577
+ cache_read_tokens?: number | null;
578
+ cache_write_tokens?: number | null;
579
+ cost_usd?: number | null;
580
+ } | null;
581
+ };
582
+ native?: {
583
+ runtime: string;
584
+ project: string;
585
+ selector: {
586
+ kind: "project" | "agent" | "profile";
587
+ name?: string;
588
+ };
589
+ machine_id: string;
590
+ fingerprint: string;
591
+ session_id: string | null;
592
+ model: string | null;
593
+ learning_revision: string | null;
594
+ usage: {
595
+ task: {
596
+ input_tokens: number | null;
597
+ output_tokens: number | null;
598
+ cache_read_tokens: number | null;
599
+ cache_write_tokens: number | null;
600
+ cost_usd: number | null;
601
+ } | null;
602
+ reflection: Array<{
603
+ input_tokens: number | null;
604
+ output_tokens: number | null;
605
+ cache_read_tokens: number | null;
606
+ cache_write_tokens: number | null;
607
+ cost_usd: number | null;
608
+ }>;
609
+ };
610
+ model_requests: null;
611
+ };
431
612
  console_url?: string;
432
613
  revision: string;
433
614
  kind: "agentic" | "workflow";
434
615
  archived_at: string | null;
435
616
  approvals?: "ask" | "never";
436
- cap_mode?: "expected" | "strict" | null;
437
617
  last_progress_at?: string | null;
438
618
  input?: Record<string, unknown> | null;
439
619
  file_ids?: Array<string>;
@@ -509,17 +689,18 @@ export type Run = {
509
689
  tool: string;
510
690
  call_id: string;
511
691
  args_preview: string;
692
+ summary?: string;
512
693
  requested_at: string;
513
- price?: number | "not metered";
694
+ price?: number | "not metered" | "priced by usage";
514
695
  destructive?: true;
515
696
  } | {
516
697
  kind: "budget";
517
698
  cap_usd: number;
518
699
  spent_usd?: number;
700
+ held_usd?: number;
519
701
  needs_usd?: number;
520
702
  least_cap_usd?: number;
521
703
  suggested_cap_usd?: number;
522
- overshoot_bound_usd?: number;
523
704
  said: string;
524
705
  at: string;
525
706
  node?: string | null;
@@ -536,6 +717,8 @@ export type Run = {
536
717
  completion_condition: string;
537
718
  asked_at: string;
538
719
  expires_at: string;
720
+ } | {
721
+ kind: "stopped";
539
722
  } | null;
540
723
  imported_from?: {
541
724
  source: "claude-code" | "codex" | "pi";
@@ -587,7 +770,6 @@ export type RunCreate = {
587
770
  mcp_auth?: Record<string, {
588
771
  headers: Record<string, string>;
589
772
  }>;
590
- cap_mode?: "expected" | "strict";
591
773
  workflow_first?: boolean;
592
774
  learning?: "use";
593
775
  repo?: string;
@@ -643,7 +825,7 @@ export type TimelineRow = {
643
825
  origin?: "server" | "trigger";
644
826
  trigger?: {
645
827
  id: string;
646
- source: "schedule" | "webhook" | "slack" | "github";
828
+ source: "schedule" | "webhook" | "slack" | "github" | "composio" | "email";
647
829
  owner: boolean;
648
830
  name?: string;
649
831
  };
@@ -677,6 +859,8 @@ export type TimelineRow = {
677
859
  expect?: "met" | "unmet";
678
860
  }>;
679
861
  computer_calls_dropped?: number;
862
+ tool_input?: Record<string, unknown>;
863
+ tool_result_text?: string | null;
680
864
  learning?: {
681
865
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
682
866
  reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
@@ -686,9 +870,11 @@ export type TimelineRow = {
686
870
  export type TimelineKind = "thinking" | "text_block" | "tool_use" | "tool_result" | "phase" | "subagent_started" | "subagent_progress" | "subagent_completed" | "final_answer" | "error" | "user_message" | "waiting" | "usage" | "decision" | "tool_approval_requested" | "learning";
687
871
  export type TimelineUsage = {
688
872
  usd: number | null;
689
- requests: number;
873
+ requests: number | null;
874
+ free?: true;
690
875
  so_far_usd?: number;
691
876
  unpriced?: number;
877
+ upper_bound?: true;
692
878
  not_metered?: number;
693
879
  };
694
880
  export type Capabilities = {
@@ -742,12 +928,17 @@ export type Capabilities = {
742
928
  harnesses?: Array<{
743
929
  id: "pi" | "claude-agent" | "codex" | "opencode";
744
930
  available: boolean;
931
+ free_models: Array<{
932
+ id: string;
933
+ context_window: number;
934
+ }>;
745
935
  models: Array<string>;
746
936
  run_memory_mib: number;
747
937
  max_concurrent_runs: number;
748
938
  default_model: string | null;
749
939
  steer: boolean;
750
940
  reason?: string;
941
+ needs?: Array<"key" | "chatgpt">;
751
942
  installs?: "on_first_use";
752
943
  }>;
753
944
  tools: Array<{
@@ -898,7 +1089,7 @@ export type Features = {
898
1089
  };
899
1090
  triggers?: {
900
1091
  routes: boolean;
901
- sources: Array<"schedule" | "webhook" | "github">;
1092
+ sources: Array<"schedule" | "webhook" | "github" | "composio" | "email">;
902
1093
  targets: Array<"start_run" | "message_run">;
903
1094
  min_every_s: number;
904
1095
  history_kept: number;
@@ -906,12 +1097,13 @@ export type Features = {
906
1097
  failures_to_pause: number;
907
1098
  webhook: {
908
1099
  signing: "standard-webhooks/v1";
909
- signatures: Array<"standard" | "github" | "composio">;
1100
+ signatures: Array<"standard" | "github">;
910
1101
  tolerance_s: number;
911
1102
  max_body_bytes: number;
912
1103
  payload_kept_bytes: number;
913
1104
  at_rest: "sealed";
914
1105
  };
1106
+ public_url?: boolean;
915
1107
  };
916
1108
  };
917
1109
  export type Meter = "tokens" | "agent_time" | "browser_time" | "disk" | "tools" | "learning";
@@ -934,6 +1126,7 @@ export type Limits = {
934
1126
  min: Usd;
935
1127
  max: Usd;
936
1128
  } | null;
1129
+ free_model_requests?: number;
937
1130
  };
938
1131
  export type Usd = number;
939
1132
  export type Usage = {
@@ -963,6 +1156,52 @@ export type UsageLine = {
963
1156
  };
964
1157
  /** Archive the agent: hidden from the lists, kept with its history (POST /agents/{agent_id}/archive). */
965
1158
  export type ArchiveAgentResponse = Record<string, unknown>;
1159
+ /** Connect a native project using ordinary agent and revision storage (POST /native/connect). */
1160
+ export type ConnectNativeBody = {
1161
+ project: string;
1162
+ runtime: "claude-code" | "codex";
1163
+ selector?: {
1164
+ kind: "project" | "agent" | "profile";
1165
+ name?: string;
1166
+ };
1167
+ };
1168
+ export type ConnectNativeResponse = {
1169
+ agent: Agent;
1170
+ native: {
1171
+ runtime: "claude-code" | "codex";
1172
+ project: string;
1173
+ selector: {
1174
+ kind: "project" | "agent" | "profile";
1175
+ name?: string;
1176
+ };
1177
+ machine_id: string;
1178
+ version: string | null;
1179
+ model: string | null;
1180
+ fingerprint: string;
1181
+ configuration: Array<{
1182
+ path: string;
1183
+ sha256: string;
1184
+ }>;
1185
+ skills: Array<string>;
1186
+ mcp_servers: Array<string>;
1187
+ state: "needs_verification" | "needs_attention" | "ready";
1188
+ issues: Array<string>;
1189
+ capabilities: {
1190
+ launch: boolean;
1191
+ notes: boolean;
1192
+ skills: boolean;
1193
+ workflows: false;
1194
+ approval: "native" | "unavailable";
1195
+ usage: boolean;
1196
+ };
1197
+ connected: boolean;
1198
+ verified_at?: string;
1199
+ remote?: {
1200
+ connector_id: string;
1201
+ target_id: string;
1202
+ };
1203
+ };
1204
+ };
966
1205
  /** Create an agent home (POST /agents). */
967
1206
  export type CreateAgentBody = AgentCreate;
968
1207
  export interface CreateAgentParams {
@@ -979,6 +1218,79 @@ export type DeleteAgentArchilResponse = {
979
1218
  disk_id: string;
980
1219
  } | null;
981
1220
  };
1221
+ /** Disconnect future native jobs while retaining source configuration and history (POST /agents/{agent_id}/native/disconnect). */
1222
+ export type DisconnectNativeResponse = {
1223
+ native: {
1224
+ runtime: "claude-code" | "codex";
1225
+ project: string;
1226
+ selector: {
1227
+ kind: "project" | "agent" | "profile";
1228
+ name?: string;
1229
+ };
1230
+ machine_id: string;
1231
+ version: string | null;
1232
+ model: string | null;
1233
+ fingerprint: string;
1234
+ configuration: Array<{
1235
+ path: string;
1236
+ sha256: string;
1237
+ }>;
1238
+ skills: Array<string>;
1239
+ mcp_servers: Array<string>;
1240
+ state: "needs_verification" | "needs_attention" | "ready";
1241
+ issues: Array<string>;
1242
+ capabilities: {
1243
+ launch: boolean;
1244
+ notes: boolean;
1245
+ skills: boolean;
1246
+ workflows: false;
1247
+ approval: "native" | "unavailable";
1248
+ usage: boolean;
1249
+ };
1250
+ connected: boolean;
1251
+ verified_at?: string;
1252
+ remote?: {
1253
+ connector_id: string;
1254
+ target_id: string;
1255
+ };
1256
+ };
1257
+ };
1258
+ /** Discover existing native projects on this source machine without running a model (POST /native/discover). */
1259
+ export type DiscoverNativeBody = {
1260
+ project: string;
1261
+ runtime?: "claude-code" | "codex";
1262
+ };
1263
+ export type DiscoverNativeResponse = {
1264
+ machine_id: string;
1265
+ targets: Array<{
1266
+ runtime: "claude-code" | "codex";
1267
+ project: string;
1268
+ selector: {
1269
+ kind: "project" | "agent" | "profile";
1270
+ name?: string;
1271
+ };
1272
+ machine_id: string;
1273
+ version: string | null;
1274
+ model: string | null;
1275
+ fingerprint: string;
1276
+ configuration: Array<{
1277
+ path: string;
1278
+ sha256: string;
1279
+ }>;
1280
+ skills: Array<string>;
1281
+ mcp_servers: Array<string>;
1282
+ state: "needs_verification" | "needs_attention" | "ready";
1283
+ issues: Array<string>;
1284
+ capabilities: {
1285
+ launch: boolean;
1286
+ notes: boolean;
1287
+ skills: boolean;
1288
+ workflows: false;
1289
+ approval: "native" | "unavailable";
1290
+ usage: boolean;
1291
+ };
1292
+ }>;
1293
+ };
982
1294
  /** Forget one of the agent's saved sign-ins (DELETE /agents/{agent_id}/sign-ins/{key}). */
983
1295
  export type ForgetSignInResponse = {
984
1296
  key: string;
@@ -1048,6 +1360,43 @@ export type GetLearningLoopResponse = {
1048
1360
  }>;
1049
1361
  }>;
1050
1362
  };
1363
+ /** Read a native connection (GET /agents/{agent_id}/native). */
1364
+ export type GetNativeResponse = {
1365
+ native: {
1366
+ runtime: "claude-code" | "codex";
1367
+ project: string;
1368
+ selector: {
1369
+ kind: "project" | "agent" | "profile";
1370
+ name?: string;
1371
+ };
1372
+ machine_id: string;
1373
+ version: string | null;
1374
+ model: string | null;
1375
+ fingerprint: string;
1376
+ configuration: Array<{
1377
+ path: string;
1378
+ sha256: string;
1379
+ }>;
1380
+ skills: Array<string>;
1381
+ mcp_servers: Array<string>;
1382
+ state: "needs_verification" | "needs_attention" | "ready";
1383
+ issues: Array<string>;
1384
+ capabilities: {
1385
+ launch: boolean;
1386
+ notes: boolean;
1387
+ skills: boolean;
1388
+ workflows: false;
1389
+ approval: "native" | "unavailable";
1390
+ usage: boolean;
1391
+ };
1392
+ connected: boolean;
1393
+ verified_at?: string;
1394
+ remote?: {
1395
+ connector_id: string;
1396
+ target_id: string;
1397
+ };
1398
+ } | null;
1399
+ };
1051
1400
  /** List agents (GET /agents). */
1052
1401
  export interface ListAgentsParams {
1053
1402
  limit?: number;
@@ -1074,15 +1423,21 @@ export type ListLearningPromotionsResponse = {
1074
1423
  handed_back: number;
1075
1424
  of?: Array<string>;
1076
1425
  cost_usd?: number | null;
1077
- skipped_write?: number;
1078
1426
  skipped_tools?: Array<{
1079
1427
  tool: string;
1080
1428
  inputs: number;
1081
1429
  no_read_only_hint: boolean;
1082
1430
  }>;
1431
+ outcomes?: {
1432
+ answered: number;
1433
+ handed_back: number;
1434
+ failed: number;
1435
+ skipped_write: number;
1436
+ };
1083
1437
  };
1084
1438
  runs?: Array<string>;
1085
1439
  inputs?: Array<string>;
1440
+ replay_id?: string;
1086
1441
  refit?: {
1087
1442
  from: string;
1088
1443
  guards: Array<{
@@ -1094,6 +1449,8 @@ export type ListLearningPromotionsResponse = {
1094
1449
  }>;
1095
1450
  };
1096
1451
  checked?: number;
1452
+ since?: number;
1453
+ held_on?: Array<string>;
1097
1454
  commit?: string;
1098
1455
  superseded_by?: string;
1099
1456
  }>;
@@ -1118,6 +1475,241 @@ export interface UpdateDefinitionParams {
1118
1475
  "If-Match"?: string;
1119
1476
  }
1120
1477
  export type UpdateDefinitionResponse = Agent;
1478
+ /** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
1479
+ export type VerifyNativeResponse = {
1480
+ native: {
1481
+ runtime: "claude-code" | "codex";
1482
+ project: string;
1483
+ selector: {
1484
+ kind: "project" | "agent" | "profile";
1485
+ name?: string;
1486
+ };
1487
+ machine_id: string;
1488
+ version: string | null;
1489
+ model: string | null;
1490
+ fingerprint: string;
1491
+ configuration: Array<{
1492
+ path: string;
1493
+ sha256: string;
1494
+ }>;
1495
+ skills: Array<string>;
1496
+ mcp_servers: Array<string>;
1497
+ state: "needs_verification" | "needs_attention" | "ready";
1498
+ issues: Array<string>;
1499
+ capabilities: {
1500
+ launch: boolean;
1501
+ notes: boolean;
1502
+ skills: boolean;
1503
+ workflows: false;
1504
+ approval: "native" | "unavailable";
1505
+ usage: boolean;
1506
+ };
1507
+ connected: boolean;
1508
+ verified_at?: string;
1509
+ remote?: {
1510
+ connector_id: string;
1511
+ target_id: string;
1512
+ };
1513
+ };
1514
+ };
1515
+ /** Complete a source command once under its valid lease (POST /connectors/{connector_id}/commands/{command_id}/complete). */
1516
+ export type CompleteRemoteCommandBody = {
1517
+ lease_token: string;
1518
+ result?: unknown;
1519
+ error?: string;
1520
+ };
1521
+ export type CompleteRemoteCommandResponse = {
1522
+ accepted: true;
1523
+ };
1524
+ /** Create a ten-minute one-use connection code (POST /connectors/enrollment). */
1525
+ export type EnrollRemoteConnectorBody = {
1526
+ label?: string;
1527
+ capabilities?: {
1528
+ native_execution?: boolean;
1529
+ history_import?: boolean;
1530
+ };
1531
+ };
1532
+ export type EnrollRemoteConnectorResponse = {
1533
+ enrollment_token: string;
1534
+ expires_at: string;
1535
+ workspace_id: "local";
1536
+ };
1537
+ /** Import explicitly selected, redacted past sessions without running or learning from them (POST /connectors/{connector_id}/targets/{target_id}/history). */
1538
+ export type ImportRemoteHistoryBody = {
1539
+ sessions: Array<Record<string, unknown>>;
1540
+ };
1541
+ export type ImportRemoteHistoryResponse = {
1542
+ agent_id: string;
1543
+ runs: Array<{
1544
+ session_id: string;
1545
+ run_id: string;
1546
+ already: boolean;
1547
+ }>;
1548
+ imported: number;
1549
+ already: number;
1550
+ };
1551
+ /** Import an explicitly selected source-native agent reference (POST /connectors/{connector_id}/import). */
1552
+ export type ImportRemoteTargetBody = {
1553
+ target_id: string;
1554
+ name?: string;
1555
+ target: {
1556
+ runtime: "claude-code" | "codex";
1557
+ project: string;
1558
+ selector: {
1559
+ kind: "project" | "agent" | "profile";
1560
+ name?: string;
1561
+ };
1562
+ machine_id: string;
1563
+ version: string | null;
1564
+ model: string | null;
1565
+ fingerprint: string;
1566
+ configuration: Array<{
1567
+ path: string;
1568
+ sha256: string;
1569
+ }>;
1570
+ skills: Array<string>;
1571
+ mcp_servers: Array<string>;
1572
+ state: "needs_verification" | "needs_attention" | "ready";
1573
+ issues: Array<string>;
1574
+ capabilities: {
1575
+ launch: boolean;
1576
+ notes: boolean;
1577
+ skills: boolean;
1578
+ workflows: false;
1579
+ approval: "native" | "unavailable";
1580
+ usage: boolean;
1581
+ };
1582
+ connected: boolean;
1583
+ verified_at?: string;
1584
+ remote?: {
1585
+ connector_id: string;
1586
+ target_id: string;
1587
+ };
1588
+ };
1589
+ history_only?: boolean;
1590
+ };
1591
+ export type ImportRemoteTargetResponse = {
1592
+ agent_id: string;
1593
+ native: {
1594
+ runtime: "claude-code" | "codex";
1595
+ project: string;
1596
+ selector: {
1597
+ kind: "project" | "agent" | "profile";
1598
+ name?: string;
1599
+ };
1600
+ machine_id: string;
1601
+ version: string | null;
1602
+ model: string | null;
1603
+ fingerprint: string;
1604
+ configuration: Array<{
1605
+ path: string;
1606
+ sha256: string;
1607
+ }>;
1608
+ skills: Array<string>;
1609
+ mcp_servers: Array<string>;
1610
+ state: "needs_verification" | "needs_attention" | "ready";
1611
+ issues: Array<string>;
1612
+ capabilities: {
1613
+ launch: boolean;
1614
+ notes: boolean;
1615
+ skills: boolean;
1616
+ workflows: false;
1617
+ approval: "native" | "unavailable";
1618
+ usage: boolean;
1619
+ };
1620
+ connected: boolean;
1621
+ verified_at?: string;
1622
+ remote?: {
1623
+ connector_id: string;
1624
+ target_id: string;
1625
+ };
1626
+ };
1627
+ };
1628
+ /** List remote source machines and imported agent targets (GET /connectors). */
1629
+ export type ListRemoteConnectorsResponse = {
1630
+ connectors: Array<{
1631
+ id: string;
1632
+ connector_id: string;
1633
+ label: string;
1634
+ created_at: string;
1635
+ last_seen_at: string | null;
1636
+ status: "online" | "offline" | "revoked";
1637
+ capabilities: {
1638
+ observe: true;
1639
+ native_execution: boolean;
1640
+ history_import: boolean;
1641
+ };
1642
+ targets: Array<Record<string, unknown>>;
1643
+ }>;
1644
+ };
1645
+ /** Renew active source leases and claim one command without replay (POST /connectors/{connector_id}/poll). */
1646
+ export type PollRemoteConnectorBody = {
1647
+ worker_id: string;
1648
+ active?: Array<{
1649
+ command_id: string;
1650
+ lease_token: string;
1651
+ }>;
1652
+ };
1653
+ export type PollRemoteConnectorResponse = {
1654
+ commands: Array<Record<string, unknown>>;
1655
+ cancelled: Array<string>;
1656
+ server_time: number;
1657
+ lease_ttl_ms: number;
1658
+ };
1659
+ /** Exchange a one-use enrollment code for a connector-scoped credential (POST /connectors). */
1660
+ export type RegisterRemoteConnectorBody = {
1661
+ installation_id: string;
1662
+ operation_id: string;
1663
+ label?: string;
1664
+ capabilities: {
1665
+ native_execution: boolean;
1666
+ history_import?: boolean;
1667
+ };
1668
+ };
1669
+ export type RegisterRemoteConnectorResponse = {
1670
+ connector: {
1671
+ id: string;
1672
+ connector_id: string;
1673
+ label: string;
1674
+ created_at: string;
1675
+ last_seen_at: string | null;
1676
+ status: "online" | "offline" | "revoked";
1677
+ capabilities: {
1678
+ observe: true;
1679
+ native_execution: boolean;
1680
+ history_import: boolean;
1681
+ };
1682
+ targets: Array<Record<string, unknown>>;
1683
+ };
1684
+ credential: string;
1685
+ credential_expires_at: string;
1686
+ };
1687
+ /** Append an ordered idempotent native event batch for a valid command lease (POST /connectors/{connector_id}/commands/{command_id}/events). */
1688
+ export type RemoteCommandEventsBody = {
1689
+ lease_token: string;
1690
+ sequence: number;
1691
+ events: Array<Record<string, unknown>>;
1692
+ };
1693
+ export type RemoteCommandEventsResponse = {
1694
+ accepted: true;
1695
+ };
1696
+ /** Revoke a source connector and stop its outstanding commands (DELETE /connectors/{connector_id}). */
1697
+ export type RevokeRemoteConnectorResponse = {
1698
+ connector: {
1699
+ id: string;
1700
+ connector_id: string;
1701
+ label: string;
1702
+ created_at: string;
1703
+ last_seen_at: string | null;
1704
+ status: "online" | "offline" | "revoked";
1705
+ capabilities: {
1706
+ observe: true;
1707
+ native_execution: boolean;
1708
+ history_import: boolean;
1709
+ };
1710
+ targets: Array<Record<string, unknown>>;
1711
+ };
1712
+ };
1121
1713
  /** Reserve an upload (POST /files). */
1122
1714
  export type CreateFileBody = FileCreate;
1123
1715
  export interface CreateFileParams {
@@ -1414,6 +2006,7 @@ export type GetLearningCostResponse = {
1414
2006
  workflow: string | null;
1415
2007
  learned_revision: string | null;
1416
2008
  cost_usd: number | null;
2009
+ cost_upper_bound: boolean;
1417
2010
  learning_usd: number | null;
1418
2011
  total_usd: number | null;
1419
2012
  }>;
@@ -1452,6 +2045,16 @@ export type GetLearningCostResponse = {
1452
2045
  ran: number;
1453
2046
  back: number;
1454
2047
  } | null;
2048
+ withheld: {
2049
+ unknown: number;
2050
+ at_most: number;
2051
+ } | null;
2052
+ replay: {
2053
+ n: number;
2054
+ workflow_pct: number;
2055
+ agent_pct: number;
2056
+ cleared: boolean;
2057
+ } | null;
1455
2058
  };
1456
2059
  };
1457
2060
  /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
@@ -1683,6 +2286,31 @@ export type RecordLearningEvalResponse = {
1683
2286
  ci: Array<number>;
1684
2287
  recorded_at: string;
1685
2288
  };
2289
+ /** Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab) (GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}). */
2290
+ export type GetLearnedWorkflowReplayResponse = {
2291
+ replay: string;
2292
+ workflow: string;
2293
+ digest: string;
2294
+ status: "running" | "done" | "failed";
2295
+ inputs: number;
2296
+ outcomes: {
2297
+ answered: number;
2298
+ handed_back: number;
2299
+ failed: number;
2300
+ skipped_write: number;
2301
+ };
2302
+ score: {
2303
+ n: number;
2304
+ agree: number;
2305
+ agent_acc: number;
2306
+ wf_acc: number;
2307
+ delta: number;
2308
+ handed_back: number;
2309
+ };
2310
+ cost_usd: number | null;
2311
+ decided?: "promote" | "hold" | "superseded";
2312
+ reason?: string;
2313
+ };
1686
2314
  /** Retire a note, a skill or a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
1687
2315
  export interface RetireLearningFileParams {
1688
2316
  "If-Match"?: string;
@@ -1732,7 +2360,12 @@ export type CreatePairingResponse = {
1732
2360
  code: string;
1733
2361
  expires_at: string;
1734
2362
  };
2363
+ /** Delete the Composio project's webhook subscription, once no trigger uses it (DELETE /settings/mcp-servers/{name}/composio/subscription). */
2364
+ export type DeleteComposioSubscriptionResponse = {
2365
+ deleted: true;
2366
+ };
1735
2367
  /** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
2368
+ /** Forget this server's email account (DELETE /settings/email). */
1736
2369
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
1737
2370
  export type DeleteWorkspaceArchilResponse = {
1738
2371
  on: boolean;
@@ -1753,6 +2386,43 @@ export type DisconnectGitHubResponse = {
1753
2386
  triggers_off: number;
1754
2387
  note: string;
1755
2388
  };
2389
+ /** Finish signing in with ChatGPT with the address the sign-in tab ended on (POST /settings/chatgpt/sign-in/finish). */
2390
+ export type FinishChatGPTSignInBody = {
2391
+ redirect_url: string;
2392
+ };
2393
+ export type FinishChatGPTSignInResponse = {
2394
+ state: "signed_out" | "pending" | "signed_in" | "expired";
2395
+ email?: string;
2396
+ plan?: string;
2397
+ authorize_url?: string;
2398
+ expires_at?: string;
2399
+ models?: Array<string>;
2400
+ };
2401
+ /** This server's ChatGPT sign-in: its state, who and which plan, never a token (GET /settings/chatgpt). */
2402
+ export type GetChatGPTSignInResponse = {
2403
+ state: "signed_out" | "pending" | "signed_in" | "expired";
2404
+ email?: string;
2405
+ plan?: string;
2406
+ authorize_url?: string;
2407
+ expires_at?: string;
2408
+ models?: Array<string>;
2409
+ };
2410
+ /** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
2411
+ export type GetEmailAccountResponse = {
2412
+ configured: boolean;
2413
+ preset: "gmail" | "fastmail" | "icloud" | "other" | null;
2414
+ address: string | null;
2415
+ user: string | null;
2416
+ imap: {
2417
+ host: string;
2418
+ port: number;
2419
+ } | null;
2420
+ smtp: {
2421
+ host: string;
2422
+ port: number;
2423
+ } | null;
2424
+ password_unreadable: boolean;
2425
+ };
1756
2426
  /** Whether a GitHub App is connected, and if so its id, slug and installations, never a secret (GET /integrations/github). */
1757
2427
  export type GetGitHubConnectionResponse = {
1758
2428
  connected: false;
@@ -1790,6 +2460,19 @@ export interface GitHubInstalledParams {
1790
2460
  setup_action?: string;
1791
2461
  state?: string;
1792
2462
  }
2463
+ /** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
2464
+ export type ListComposioEventsResponse = {
2465
+ server: string;
2466
+ toolkit: string;
2467
+ events: Array<{
2468
+ slug: string;
2469
+ name: string;
2470
+ description: string;
2471
+ config: Record<string, unknown>;
2472
+ polled: boolean;
2473
+ instructions?: string;
2474
+ }>;
2475
+ };
1793
2476
  /** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
1794
2477
  export type ListComposioToolsBody = {
1795
2478
  api_key: string;
@@ -1804,6 +2487,22 @@ export type ListComposioToolsResponse = {
1804
2487
  description: string;
1805
2488
  }>;
1806
2489
  };
2490
+ /** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
2491
+ export type ListComposioTriggersResponse = {
2492
+ triggers: Array<{
2493
+ id: string;
2494
+ name: string;
2495
+ enabled: boolean;
2496
+ event: string;
2497
+ instance_id: string;
2498
+ on_composio: "on" | "off" | "missing" | "unknown";
2499
+ }>;
2500
+ subscription: {
2501
+ ours: boolean;
2502
+ webhook_url: string;
2503
+ } | null;
2504
+ composio_error?: string;
2505
+ };
1807
2506
  /** The values a computer provider's picked keys offer, read from the vendor (GET /computers/{provider}/choices). */
1808
2507
  export type ListComputerChoicesResponse = {
1809
2508
  choices: Array<{
@@ -1922,6 +2621,54 @@ export type PutWorkspaceArchilResponse = {
1922
2621
  s3Url?: string;
1923
2622
  image?: string;
1924
2623
  };
2624
+ /** Fire a Composio trigger: a request it checks, no token (POST /hooks/composio/{hook}). */
2625
+ export type ReceiveHookComposioResponse = {
2626
+ firings: Array<{
2627
+ key: string;
2628
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
2629
+ nominal_at: string;
2630
+ status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
2631
+ at: string;
2632
+ run_id: string | null;
2633
+ reason: string | null;
2634
+ error: {
2635
+ code: string;
2636
+ message: string;
2637
+ } | null;
2638
+ count?: number;
2639
+ attempts?: number;
2640
+ retry_at?: string;
2641
+ catch_up?: true;
2642
+ } | {
2643
+ ok: "duplicate";
2644
+ }>;
2645
+ } | {
2646
+ ok: "ignored";
2647
+ } | {
2648
+ firings: Array<{
2649
+ key: string;
2650
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
2651
+ nominal_at: string;
2652
+ status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
2653
+ at: string;
2654
+ run_id: string | null;
2655
+ reason: string | null;
2656
+ error: {
2657
+ code: string;
2658
+ message: string;
2659
+ } | null;
2660
+ count?: number;
2661
+ attempts?: number;
2662
+ retry_at?: string;
2663
+ catch_up?: true;
2664
+ } | {
2665
+ ok: "duplicate";
2666
+ }>;
2667
+ };
2668
+ /** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
2669
+ export type RotateComposioSecretResponse = {
2670
+ rotated: true;
2671
+ };
1925
2672
  /** Have Composio make a managed MCP server for a toolkit's chosen actions, and save it as an MCP server (PUT /settings/mcp-servers/{name}/composio). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
1926
2673
  export type SaveComposioServerBody = {
1927
2674
  api_key: string;
@@ -2016,6 +2763,46 @@ export type SaveComputerKeysResponse = {
2016
2763
  images?: Array<string>;
2017
2764
  };
2018
2765
  };
2766
+ /** Save this server's email account, its password sealed (PUT /settings/email). */
2767
+ export type SaveEmailAccountBody = {
2768
+ preset?: "gmail" | "fastmail" | "icloud" | "other" | "outlook";
2769
+ address: string;
2770
+ user?: string;
2771
+ password: string;
2772
+ imap?: {
2773
+ host: string;
2774
+ port: number;
2775
+ };
2776
+ smtp?: {
2777
+ host: string;
2778
+ port: number;
2779
+ };
2780
+ };
2781
+ export type SaveEmailAccountResponse = {
2782
+ configured: boolean;
2783
+ preset: "gmail" | "fastmail" | "icloud" | "other" | null;
2784
+ address: string | null;
2785
+ user: string | null;
2786
+ imap: {
2787
+ host: string;
2788
+ port: number;
2789
+ } | null;
2790
+ smtp: {
2791
+ host: string;
2792
+ port: number;
2793
+ } | null;
2794
+ password_unreadable: boolean;
2795
+ };
2796
+ /** Sign out of ChatGPT: the session revoked at OpenAI, then forgotten here (DELETE /settings/chatgpt). */
2797
+ export type SignOutChatGPTResponse = {
2798
+ revoked: boolean;
2799
+ message?: string;
2800
+ };
2801
+ /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
2802
+ export type StartChatGPTSignInResponse = {
2803
+ authorize_url: string;
2804
+ expires_at: string;
2805
+ };
2019
2806
  /** Start signing in to an MCP server with OAuth: the page the owner opens (POST /settings/mcp-servers/{name}/oauth/start). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
2020
2807
  export type StartMcpOAuthBody = {
2021
2808
  url: string;
@@ -2035,6 +2822,32 @@ export type TestComputerResponse = {
2035
2822
  ok: false;
2036
2823
  why: string;
2037
2824
  };
2825
+ /** Sign in to the email account's IMAP and SMTP servers, sending nothing (POST /settings/email/test). */
2826
+ export type TestEmailAccountBody = {
2827
+ preset?: "gmail" | "fastmail" | "icloud" | "other" | "outlook";
2828
+ address?: string;
2829
+ user?: string;
2830
+ password?: string;
2831
+ imap?: {
2832
+ host: string;
2833
+ port: number;
2834
+ };
2835
+ smtp?: {
2836
+ host: string;
2837
+ port: number;
2838
+ };
2839
+ };
2840
+ export type TestEmailAccountResponse = {
2841
+ ok: boolean;
2842
+ imap: {
2843
+ ok: boolean;
2844
+ message: string;
2845
+ };
2846
+ smtp: {
2847
+ ok: boolean;
2848
+ message: string;
2849
+ };
2850
+ };
2038
2851
  /** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
2039
2852
  export type TestWorkspaceArchilResponse = {
2040
2853
  ok: true;
@@ -2280,6 +3093,84 @@ export type SaveMcpServerResponse = {
2280
3093
  updated_at: string;
2281
3094
  secret?: SecretMeta;
2282
3095
  };
3096
+ /** Read activity and token usage reported by externally running agents (GET /observations). */
3097
+ export interface GetObservationsParams {
3098
+ days?: number;
3099
+ session_id?: string;
3100
+ }
3101
+ export type GetObservationsResponse = {
3102
+ connectors: Array<{
3103
+ id: string;
3104
+ display_name: string;
3105
+ connection_state: "online" | "offline" | "disconnected";
3106
+ ingestion_mode: "polling" | "otlp";
3107
+ last_heartbeat_at: string | null;
3108
+ receipt_count: number;
3109
+ receipt_capacity: number;
3110
+ storage_full: boolean;
3111
+ }>;
3112
+ sessions: Array<{
3113
+ id: string;
3114
+ connector_id: string;
3115
+ source_id: string;
3116
+ external_session_id: string;
3117
+ harness: "claude" | "codex";
3118
+ activity: "unknown" | "working" | "idle" | "waiting_input" | "finished" | "failed" | "stopped";
3119
+ reported_activity: "unknown" | "working" | "idle" | "waiting_input" | "finished" | "failed" | "stopped";
3120
+ connection_state: "online" | "offline" | "disconnected";
3121
+ selection_active: boolean;
3122
+ occurred_at: string;
3123
+ received_at: string;
3124
+ created_at: string;
3125
+ updated_at: string;
3126
+ sequence: number;
3127
+ display_name: string;
3128
+ models: Array<string>;
3129
+ usage: {
3130
+ input_tokens: number;
3131
+ output_tokens: number;
3132
+ cache_read_tokens: number | null;
3133
+ cache_write_tokens: number | null;
3134
+ total_tokens: number;
3135
+ cache_hit_rate: number | null;
3136
+ overflow: boolean;
3137
+ status: "reported" | "unavailable";
3138
+ };
3139
+ observation_only: true;
3140
+ }>;
3141
+ usage: {
3142
+ input_tokens: number | null;
3143
+ output_tokens: number | null;
3144
+ cache_read_tokens: number | null;
3145
+ cache_write_tokens: number | null;
3146
+ total_tokens: number | null;
3147
+ cache_hit_rate: number | null;
3148
+ overflow: boolean;
3149
+ status: "partial" | "unavailable";
3150
+ models: Array<{
3151
+ input_tokens: number | null;
3152
+ output_tokens: number | null;
3153
+ cache_read_tokens: number | null;
3154
+ cache_write_tokens: number | null;
3155
+ total_tokens: number | null;
3156
+ cache_hit_rate: number | null;
3157
+ overflow: boolean;
3158
+ model: string;
3159
+ }>;
3160
+ daily: Array<{
3161
+ date: string;
3162
+ total_tokens: number | null;
3163
+ }>;
3164
+ };
3165
+ limits: {
3166
+ max_receipts_per_connector: number;
3167
+ max_sessions_per_connector: number;
3168
+ receipt_retention: string;
3169
+ receipt_window_seconds: number;
3170
+ session_retention_days: number;
3171
+ usage_retention_days: number;
3172
+ };
3173
+ };
2283
3174
  /** The agent's revisions, newest first (GET /agents/{agent_id}/revisions). */
2284
3175
  export interface ListRevisionsParams {
2285
3176
  limit?: number;
@@ -2536,6 +3427,17 @@ export type GetRunLearningResponse = {
2536
3427
  name: string;
2537
3428
  pending?: true;
2538
3429
  }>;
3430
+ graded?: {
3431
+ run_id: string;
3432
+ correct: boolean;
3433
+ source: "feedback" | "eval";
3434
+ graded_at: string;
3435
+ path: "agent" | "handed_back" | "workflow" | "replay";
3436
+ workflow: string | null;
3437
+ workflow_digest: string | null;
3438
+ feedback: "revise" | "look_back" | null;
3439
+ feedback_status: "running" | "ended" | "not_run" | null;
3440
+ };
2539
3441
  } | null;
2540
3442
  /** What the run proposed, file by file (GET /runs/{run_id}/learning/diff). */
2541
3443
  export type GetRunLearningDiffResponse = {
@@ -2615,16 +3517,110 @@ export type TakeOverRunComputerResponse = {
2615
3517
  hold: "agent" | "pending" | "person";
2616
3518
  outcome?: "done" | "cancelled" | "expired";
2617
3519
  };
2618
- /** The run's timeline, as a page or a stream (GET /runs/{run_id}/timeline). */
2619
- export interface GetTimelineParams {
2620
- after?: number;
2621
- wait_ms?: number;
2622
- limit?: number;
2623
- "Last-Event-ID"?: string;
2624
- }
2625
- export type GetTimelineResponse = TimelinePage;
2626
- /** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
2627
- export type UnarchiveRunResponse = Record<string, unknown>;
3520
+ /** The run's timeline, as a page or a stream (GET /runs/{run_id}/timeline). */
3521
+ export interface GetTimelineParams {
3522
+ after?: number;
3523
+ wait_ms?: number;
3524
+ limit?: number;
3525
+ calls?: "whole";
3526
+ "Last-Event-ID"?: string;
3527
+ }
3528
+ export type GetTimelineResponse = TimelinePage;
3529
+ /** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
3530
+ export type UnarchiveRunResponse = Record<string, unknown>;
3531
+ /** Complete a backend SDK task (POST /sdk-runs/{run_id}/complete). */
3532
+ export type CompleteSdkRunBody = {
3533
+ status: "completed" | "failed" | "cancelled";
3534
+ answer: string;
3535
+ error?: string;
3536
+ model?: string;
3537
+ session_id?: string;
3538
+ usage?: {
3539
+ input_tokens?: number | null;
3540
+ output_tokens?: number | null;
3541
+ cache_read_tokens?: number | null;
3542
+ cache_write_tokens?: number | null;
3543
+ cost_usd?: number | null;
3544
+ };
3545
+ evidence_complete?: boolean;
3546
+ };
3547
+ export interface CompleteSdkRunParams {
3548
+ "Idempotency-Key"?: string;
3549
+ }
3550
+ export type CompleteSdkRunResponse = {
3551
+ accepted: true;
3552
+ };
3553
+ /** Record bounded SDK execution evidence (POST /sdk-runs/{run_id}/events). */
3554
+ export type SdkRunEventsBody = {
3555
+ sequence: number;
3556
+ events: Array<{
3557
+ type: "text";
3558
+ text: string;
3559
+ } | {
3560
+ type: "session";
3561
+ session_id: string;
3562
+ } | {
3563
+ type: "tool";
3564
+ id: string;
3565
+ name: string;
3566
+ status: "started" | "completed" | "failed";
3567
+ input?: unknown;
3568
+ output?: unknown;
3569
+ parent_tool_use_id?: string;
3570
+ }>;
3571
+ };
3572
+ export interface SdkRunEventsParams {
3573
+ "Idempotency-Key"?: string;
3574
+ }
3575
+ export type SdkRunEventsResponse = {
3576
+ accepted: true;
3577
+ };
3578
+ /** Read SDK run and learning state (GET /sdk-runs/{run_id}). */
3579
+ export type GetSdkRunResponse = {
3580
+ run_id: string;
3581
+ state: "running" | "processing" | "completed" | "failed" | "cancelled";
3582
+ learning_run_id?: string;
3583
+ learning: unknown;
3584
+ };
3585
+ /** Register a task executed by an existing backend SDK (POST /agents/{agent_id}/sdk-runs). */
3586
+ export type StartSdkRunBody = {
3587
+ runtime: "claude-agent-sdk" | "codex-sdk";
3588
+ input: string;
3589
+ instructions: string;
3590
+ model?: string;
3591
+ workflow_tools?: Array<{
3592
+ name: string;
3593
+ description: string;
3594
+ input_schema: Record<string, unknown>;
3595
+ output_schema?: Record<string, unknown>;
3596
+ permission: "allow" | "ask" | "deny";
3597
+ price_usd?: number;
3598
+ }>;
3599
+ workflow_adapters?: Array<"runNode" | "runJudge">;
3600
+ };
3601
+ export interface StartSdkRunParams {
3602
+ "Idempotency-Key": string;
3603
+ }
3604
+ export type StartSdkRunResponse = {
3605
+ run_id: string;
3606
+ agent_id: string;
3607
+ console_url: string;
3608
+ token: string;
3609
+ learning: {
3610
+ enabled: boolean;
3611
+ revision: string | null;
3612
+ context: string;
3613
+ skills: Array<{
3614
+ name: string;
3615
+ files: Record<string, string>;
3616
+ }>;
3617
+ workflows: Array<{
3618
+ name: string;
3619
+ workflow: string;
3620
+ description: string;
3621
+ }>;
3622
+ };
3623
+ };
2628
3624
  /** What this backend offers (GET /capabilities). */
2629
3625
  export type GetCapabilitiesResponse = Capabilities;
2630
3626
  /** Whether this server can serve (GET /health). */
@@ -2695,15 +3691,15 @@ export type GetStatsResponse = {
2695
3691
  needs_review: number;
2696
3692
  failed: number;
2697
3693
  runs_with_metrics: number;
2698
- tokens: number;
3694
+ tokens: number | null;
2699
3695
  cost_usd: number | null;
2700
3696
  unknown_cost_runs: number;
2701
- input: number;
2702
- cache_read: number;
2703
- cache_write: number;
2704
- output: number;
2705
- requests: number;
2706
- unmetered: number;
3697
+ input: number | null;
3698
+ cache_read: number | null;
3699
+ cache_write: number | null;
3700
+ output: number | null;
3701
+ requests: number | null;
3702
+ unmetered: number | null;
2707
3703
  };
2708
3704
  time: {
2709
3705
  ended_runs: number;
@@ -2719,7 +3715,7 @@ export type GetStatsResponse = {
2719
3715
  needs_review: number;
2720
3716
  failed: number;
2721
3717
  runs_with_metrics: number;
2722
- tokens: number;
3718
+ tokens: number | null;
2723
3719
  cost_usd: number | null;
2724
3720
  unknown_cost_runs: number;
2725
3721
  }>;
@@ -2730,7 +3726,7 @@ export type GetStatsResponse = {
2730
3726
  needs_review: number;
2731
3727
  failed: number;
2732
3728
  runs_with_metrics: number;
2733
- tokens: number;
3729
+ tokens: number | null;
2734
3730
  cost_usd: number | null;
2735
3731
  unknown_cost_runs: number;
2736
3732
  }>;
@@ -2741,7 +3737,7 @@ export type GetStatsResponse = {
2741
3737
  needs_review: number;
2742
3738
  failed: number;
2743
3739
  runs_with_metrics: number;
2744
- tokens: number;
3740
+ tokens: number | null;
2745
3741
  cost_usd: number | null;
2746
3742
  unknown_cost_runs: number;
2747
3743
  }>;
@@ -2766,6 +3762,7 @@ export type ApplyTemplateBody = {
2766
3762
  grants?: Array<string>;
2767
3763
  overrides?: {
2768
3764
  model?: string;
3765
+ choice?: string;
2769
3766
  approvals?: "ask" | "never";
2770
3767
  };
2771
3768
  };
@@ -2820,6 +3817,17 @@ export type ImportTemplateResponse = {
2820
3817
  model: {
2821
3818
  tier: "fast" | "balanced" | "strong";
2822
3819
  prefer?: string;
3820
+ fast?: string;
3821
+ strong?: string;
3822
+ choices?: Array<{
3823
+ id: string;
3824
+ label: string;
3825
+ model: string;
3826
+ harness: string;
3827
+ warning: string | null;
3828
+ note: string | null;
3829
+ secrets: Array<string>;
3830
+ }>;
2823
3831
  } | null;
2824
3832
  effort: string | null;
2825
3833
  tools: Array<string> | null;
@@ -2900,6 +3908,17 @@ export type ListTemplatesResponse = {
2900
3908
  model: {
2901
3909
  tier: "fast" | "balanced" | "strong";
2902
3910
  prefer?: string;
3911
+ fast?: string;
3912
+ strong?: string;
3913
+ choices?: Array<{
3914
+ id: string;
3915
+ label: string;
3916
+ model: string;
3917
+ harness: string;
3918
+ warning: string | null;
3919
+ note: string | null;
3920
+ secrets: Array<string>;
3921
+ }>;
2903
3922
  } | null;
2904
3923
  effort: string | null;
2905
3924
  tools: Array<string> | null;
@@ -3026,6 +4045,21 @@ export type PutToolSettingsBody = {
3026
4045
  provider?: "auto" | "native" | "exa-keyless" | "parallel" | "off";
3027
4046
  permission?: "allow" | "ask" | "deny";
3028
4047
  };
4048
+ email_search?: {
4049
+ permission?: "allow" | "ask" | "deny";
4050
+ };
4051
+ email_read?: {
4052
+ permission?: "allow" | "ask" | "deny";
4053
+ };
4054
+ email_draft?: {
4055
+ permission?: "allow" | "ask" | "deny";
4056
+ };
4057
+ email_send?: {
4058
+ permission?: "allow" | "ask" | "deny";
4059
+ };
4060
+ email_file?: {
4061
+ permission?: "allow" | "ask" | "deny";
4062
+ };
3029
4063
  browser?: {
3030
4064
  provider?: "auto" | "browserbase" | "kernel" | "chrome";
3031
4065
  permission?: "allow" | "deny";
@@ -3088,7 +4122,7 @@ export type CreateTriggerBody = {
3088
4122
  start_at?: string;
3089
4123
  } | {
3090
4124
  kind: "webhook";
3091
- signature?: "standard" | "github" | "composio";
4125
+ signature?: "standard" | "github";
3092
4126
  accept?: Array<{
3093
4127
  event: string;
3094
4128
  actions?: Array<string>;
@@ -3119,6 +4153,47 @@ export type CreateTriggerBody = {
3119
4153
  prefix: string;
3120
4154
  }>;
3121
4155
  }>;
4156
+ } | {
4157
+ kind: "composio";
4158
+ server: string;
4159
+ event: string;
4160
+ config: Record<string, unknown>;
4161
+ accept?: Array<{
4162
+ event: string;
4163
+ actions?: Array<string>;
4164
+ where?: Array<{
4165
+ pointer: string;
4166
+ in: Array<unknown>;
4167
+ } | {
4168
+ pointer: string;
4169
+ exists: boolean;
4170
+ } | {
4171
+ pointer: string;
4172
+ prefix: string;
4173
+ }>;
4174
+ }>;
4175
+ instance_id?: string;
4176
+ hook?: string;
4177
+ move_subscription?: true;
4178
+ } | {
4179
+ kind: "email";
4180
+ account?: "default";
4181
+ mailbox?: string;
4182
+ every_s?: number;
4183
+ accept?: Array<{
4184
+ event: string;
4185
+ actions?: Array<string>;
4186
+ where?: Array<{
4187
+ pointer: string;
4188
+ in: Array<unknown>;
4189
+ } | {
4190
+ pointer: string;
4191
+ exists: boolean;
4192
+ } | {
4193
+ pointer: string;
4194
+ prefix: string;
4195
+ }>;
4196
+ }>;
3122
4197
  };
3123
4198
  target: {
3124
4199
  kind: "start_run";
@@ -3156,7 +4231,7 @@ export type CreateTriggerResponse = {
3156
4231
  start_at: string;
3157
4232
  } | {
3158
4233
  kind: "webhook";
3159
- signature?: "standard" | "github" | "composio";
4234
+ signature?: "standard" | "github";
3160
4235
  accept?: Array<{
3161
4236
  event: string;
3162
4237
  actions?: Array<string>;
@@ -3187,6 +4262,47 @@ export type CreateTriggerResponse = {
3187
4262
  prefix: string;
3188
4263
  }>;
3189
4264
  }>;
4265
+ } | {
4266
+ kind: "composio";
4267
+ server: string;
4268
+ event: string;
4269
+ config: Record<string, unknown>;
4270
+ accept?: Array<{
4271
+ event: string;
4272
+ actions?: Array<string>;
4273
+ where?: Array<{
4274
+ pointer: string;
4275
+ in: Array<unknown>;
4276
+ } | {
4277
+ pointer: string;
4278
+ exists: boolean;
4279
+ } | {
4280
+ pointer: string;
4281
+ prefix: string;
4282
+ }>;
4283
+ }>;
4284
+ instance_id?: string;
4285
+ hook?: string;
4286
+ move_subscription?: true;
4287
+ } | {
4288
+ kind: "email";
4289
+ account: "default";
4290
+ mailbox: string;
4291
+ every_s: number;
4292
+ accept?: Array<{
4293
+ event: string;
4294
+ actions?: Array<string>;
4295
+ where?: Array<{
4296
+ pointer: string;
4297
+ in: Array<unknown>;
4298
+ } | {
4299
+ pointer: string;
4300
+ exists: boolean;
4301
+ } | {
4302
+ pointer: string;
4303
+ prefix: string;
4304
+ }>;
4305
+ }>;
3190
4306
  };
3191
4307
  target: {
3192
4308
  kind: "start_run";
@@ -3219,6 +4335,10 @@ export type CreateTriggerResponse = {
3219
4335
  at: string;
3220
4336
  reason: "connection_lost";
3221
4337
  detail: string;
4338
+ } | {
4339
+ at: string;
4340
+ reason: "sign_in_refused";
4341
+ detail: string;
3222
4342
  } | null;
3223
4343
  next_at: string | null;
3224
4344
  last_run_id: string | null;
@@ -3226,7 +4346,7 @@ export type CreateTriggerResponse = {
3226
4346
  updated_at: string;
3227
4347
  last_firing: {
3228
4348
  key: string;
3229
- by: "schedule" | "manual" | "webhook" | "github";
4349
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3230
4350
  nominal_at: string;
3231
4351
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3232
4352
  at: string;
@@ -3241,6 +4361,11 @@ export type CreateTriggerResponse = {
3241
4361
  retry_at?: string;
3242
4362
  catch_up?: true;
3243
4363
  } | null;
4364
+ last_check?: {
4365
+ at: string;
4366
+ ok: boolean;
4367
+ message: string;
4368
+ } | null;
3244
4369
  hook_url?: string;
3245
4370
  secret?: SecretMeta;
3246
4371
  signing_secret?: string;
@@ -3248,13 +4373,20 @@ export type CreateTriggerResponse = {
3248
4373
  note?: string;
3249
4374
  };
3250
4375
  /** Delete a trigger and its firings; the runs it started stay (DELETE /triggers/{trigger_id}). */
4376
+ export type DeleteTriggerResponse = {
4377
+ deleted: true;
4378
+ composio: {
4379
+ done: false;
4380
+ note: string;
4381
+ };
4382
+ };
3251
4383
  /** Run it now: one firing per Idempotency-Key (POST /triggers/{trigger_id}/fire). */
3252
4384
  export interface FireTriggerParams {
3253
4385
  "Idempotency-Key": string;
3254
4386
  }
3255
4387
  export type FireTriggerResponse = {
3256
4388
  key: string;
3257
- by: "schedule" | "manual" | "webhook" | "github";
4389
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3258
4390
  nominal_at: string;
3259
4391
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3260
4392
  at: string;
@@ -3273,7 +4405,7 @@ export type FireTriggerResponse = {
3273
4405
  export type ListTriggerFiringsResponse = {
3274
4406
  firings: Array<{
3275
4407
  key: string;
3276
- by: "schedule" | "manual" | "webhook" | "github";
4408
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3277
4409
  nominal_at: string;
3278
4410
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3279
4411
  at: string;
@@ -3307,7 +4439,7 @@ export type GetTriggerResponse = {
3307
4439
  start_at: string;
3308
4440
  } | {
3309
4441
  kind: "webhook";
3310
- signature?: "standard" | "github" | "composio";
4442
+ signature?: "standard" | "github";
3311
4443
  accept?: Array<{
3312
4444
  event: string;
3313
4445
  actions?: Array<string>;
@@ -3338,6 +4470,47 @@ export type GetTriggerResponse = {
3338
4470
  prefix: string;
3339
4471
  }>;
3340
4472
  }>;
4473
+ } | {
4474
+ kind: "composio";
4475
+ server: string;
4476
+ event: string;
4477
+ config: Record<string, unknown>;
4478
+ accept?: Array<{
4479
+ event: string;
4480
+ actions?: Array<string>;
4481
+ where?: Array<{
4482
+ pointer: string;
4483
+ in: Array<unknown>;
4484
+ } | {
4485
+ pointer: string;
4486
+ exists: boolean;
4487
+ } | {
4488
+ pointer: string;
4489
+ prefix: string;
4490
+ }>;
4491
+ }>;
4492
+ instance_id?: string;
4493
+ hook?: string;
4494
+ move_subscription?: true;
4495
+ } | {
4496
+ kind: "email";
4497
+ account: "default";
4498
+ mailbox: string;
4499
+ every_s: number;
4500
+ accept?: Array<{
4501
+ event: string;
4502
+ actions?: Array<string>;
4503
+ where?: Array<{
4504
+ pointer: string;
4505
+ in: Array<unknown>;
4506
+ } | {
4507
+ pointer: string;
4508
+ exists: boolean;
4509
+ } | {
4510
+ pointer: string;
4511
+ prefix: string;
4512
+ }>;
4513
+ }>;
3341
4514
  };
3342
4515
  target: {
3343
4516
  kind: "start_run";
@@ -3370,6 +4543,10 @@ export type GetTriggerResponse = {
3370
4543
  at: string;
3371
4544
  reason: "connection_lost";
3372
4545
  detail: string;
4546
+ } | {
4547
+ at: string;
4548
+ reason: "sign_in_refused";
4549
+ detail: string;
3373
4550
  } | null;
3374
4551
  next_at: string | null;
3375
4552
  last_run_id: string | null;
@@ -3377,7 +4554,7 @@ export type GetTriggerResponse = {
3377
4554
  updated_at: string;
3378
4555
  last_firing: {
3379
4556
  key: string;
3380
- by: "schedule" | "manual" | "webhook" | "github";
4557
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3381
4558
  nominal_at: string;
3382
4559
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3383
4560
  at: string;
@@ -3392,6 +4569,11 @@ export type GetTriggerResponse = {
3392
4569
  retry_at?: string;
3393
4570
  catch_up?: true;
3394
4571
  } | null;
4572
+ last_check?: {
4573
+ at: string;
4574
+ ok: boolean;
4575
+ message: string;
4576
+ } | null;
3395
4577
  hook_url?: string;
3396
4578
  secret?: SecretMeta;
3397
4579
  note?: string;
@@ -3415,7 +4597,7 @@ export type ListTriggersResponse = {
3415
4597
  start_at: string;
3416
4598
  } | {
3417
4599
  kind: "webhook";
3418
- signature?: "standard" | "github" | "composio";
4600
+ signature?: "standard" | "github";
3419
4601
  accept?: Array<{
3420
4602
  event: string;
3421
4603
  actions?: Array<string>;
@@ -3446,6 +4628,47 @@ export type ListTriggersResponse = {
3446
4628
  prefix: string;
3447
4629
  }>;
3448
4630
  }>;
4631
+ } | {
4632
+ kind: "composio";
4633
+ server: string;
4634
+ event: string;
4635
+ config: Record<string, unknown>;
4636
+ accept?: Array<{
4637
+ event: string;
4638
+ actions?: Array<string>;
4639
+ where?: Array<{
4640
+ pointer: string;
4641
+ in: Array<unknown>;
4642
+ } | {
4643
+ pointer: string;
4644
+ exists: boolean;
4645
+ } | {
4646
+ pointer: string;
4647
+ prefix: string;
4648
+ }>;
4649
+ }>;
4650
+ instance_id?: string;
4651
+ hook?: string;
4652
+ move_subscription?: true;
4653
+ } | {
4654
+ kind: "email";
4655
+ account: "default";
4656
+ mailbox: string;
4657
+ every_s: number;
4658
+ accept?: Array<{
4659
+ event: string;
4660
+ actions?: Array<string>;
4661
+ where?: Array<{
4662
+ pointer: string;
4663
+ in: Array<unknown>;
4664
+ } | {
4665
+ pointer: string;
4666
+ exists: boolean;
4667
+ } | {
4668
+ pointer: string;
4669
+ prefix: string;
4670
+ }>;
4671
+ }>;
3449
4672
  };
3450
4673
  target: {
3451
4674
  kind: "start_run";
@@ -3478,6 +4701,10 @@ export type ListTriggersResponse = {
3478
4701
  at: string;
3479
4702
  reason: "connection_lost";
3480
4703
  detail: string;
4704
+ } | {
4705
+ at: string;
4706
+ reason: "sign_in_refused";
4707
+ detail: string;
3481
4708
  } | null;
3482
4709
  next_at: string | null;
3483
4710
  last_run_id: string | null;
@@ -3485,7 +4712,7 @@ export type ListTriggersResponse = {
3485
4712
  updated_at: string;
3486
4713
  last_firing: {
3487
4714
  key: string;
3488
- by: "schedule" | "manual" | "webhook" | "github";
4715
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3489
4716
  nominal_at: string;
3490
4717
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3491
4718
  at: string;
@@ -3500,15 +4727,17 @@ export type ListTriggersResponse = {
3500
4727
  retry_at?: string;
3501
4728
  catch_up?: true;
3502
4729
  } | null;
4730
+ last_check?: {
4731
+ at: string;
4732
+ ok: boolean;
4733
+ message: string;
4734
+ } | null;
3503
4735
  hook_url?: string;
3504
4736
  secret?: SecretMeta;
3505
4737
  note?: string;
3506
4738
  }>;
3507
4739
  };
3508
4740
  /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
3509
- export type RotateTriggerSecretBody = {
3510
- secret?: string;
3511
- };
3512
4741
  export type RotateTriggerSecretResponse = {
3513
4742
  secret: SecretMeta;
3514
4743
  signing_secret?: string;
@@ -3530,7 +4759,7 @@ export type UpdateTriggerBody = {
3530
4759
  start_at?: string;
3531
4760
  } | {
3532
4761
  kind: "webhook";
3533
- signature?: "standard" | "github" | "composio";
4762
+ signature?: "standard" | "github";
3534
4763
  accept?: Array<{
3535
4764
  event: string;
3536
4765
  actions?: Array<string>;
@@ -3561,6 +4790,47 @@ export type UpdateTriggerBody = {
3561
4790
  prefix: string;
3562
4791
  }>;
3563
4792
  }>;
4793
+ } | {
4794
+ kind: "composio";
4795
+ server: string;
4796
+ event: string;
4797
+ config: Record<string, unknown>;
4798
+ accept?: Array<{
4799
+ event: string;
4800
+ actions?: Array<string>;
4801
+ where?: Array<{
4802
+ pointer: string;
4803
+ in: Array<unknown>;
4804
+ } | {
4805
+ pointer: string;
4806
+ exists: boolean;
4807
+ } | {
4808
+ pointer: string;
4809
+ prefix: string;
4810
+ }>;
4811
+ }>;
4812
+ instance_id?: string;
4813
+ hook?: string;
4814
+ move_subscription?: true;
4815
+ } | {
4816
+ kind: "email";
4817
+ account?: "default";
4818
+ mailbox?: string;
4819
+ every_s?: number;
4820
+ accept?: Array<{
4821
+ event: string;
4822
+ actions?: Array<string>;
4823
+ where?: Array<{
4824
+ pointer: string;
4825
+ in: Array<unknown>;
4826
+ } | {
4827
+ pointer: string;
4828
+ exists: boolean;
4829
+ } | {
4830
+ pointer: string;
4831
+ prefix: string;
4832
+ }>;
4833
+ }>;
3564
4834
  };
3565
4835
  target?: {
3566
4836
  kind: "start_run";
@@ -3595,7 +4865,7 @@ export type UpdateTriggerResponse = {
3595
4865
  start_at: string;
3596
4866
  } | {
3597
4867
  kind: "webhook";
3598
- signature?: "standard" | "github" | "composio";
4868
+ signature?: "standard" | "github";
3599
4869
  accept?: Array<{
3600
4870
  event: string;
3601
4871
  actions?: Array<string>;
@@ -3626,6 +4896,47 @@ export type UpdateTriggerResponse = {
3626
4896
  prefix: string;
3627
4897
  }>;
3628
4898
  }>;
4899
+ } | {
4900
+ kind: "composio";
4901
+ server: string;
4902
+ event: string;
4903
+ config: Record<string, unknown>;
4904
+ accept?: Array<{
4905
+ event: string;
4906
+ actions?: Array<string>;
4907
+ where?: Array<{
4908
+ pointer: string;
4909
+ in: Array<unknown>;
4910
+ } | {
4911
+ pointer: string;
4912
+ exists: boolean;
4913
+ } | {
4914
+ pointer: string;
4915
+ prefix: string;
4916
+ }>;
4917
+ }>;
4918
+ instance_id?: string;
4919
+ hook?: string;
4920
+ move_subscription?: true;
4921
+ } | {
4922
+ kind: "email";
4923
+ account: "default";
4924
+ mailbox: string;
4925
+ every_s: number;
4926
+ accept?: Array<{
4927
+ event: string;
4928
+ actions?: Array<string>;
4929
+ where?: Array<{
4930
+ pointer: string;
4931
+ in: Array<unknown>;
4932
+ } | {
4933
+ pointer: string;
4934
+ exists: boolean;
4935
+ } | {
4936
+ pointer: string;
4937
+ prefix: string;
4938
+ }>;
4939
+ }>;
3629
4940
  };
3630
4941
  target: {
3631
4942
  kind: "start_run";
@@ -3658,6 +4969,10 @@ export type UpdateTriggerResponse = {
3658
4969
  at: string;
3659
4970
  reason: "connection_lost";
3660
4971
  detail: string;
4972
+ } | {
4973
+ at: string;
4974
+ reason: "sign_in_refused";
4975
+ detail: string;
3661
4976
  } | null;
3662
4977
  next_at: string | null;
3663
4978
  last_run_id: string | null;
@@ -3665,7 +4980,7 @@ export type UpdateTriggerResponse = {
3665
4980
  updated_at: string;
3666
4981
  last_firing: {
3667
4982
  key: string;
3668
- by: "schedule" | "manual" | "webhook" | "github";
4983
+ by: "schedule" | "email" | "manual" | "webhook" | "github" | "composio";
3669
4984
  nominal_at: string;
3670
4985
  status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
3671
4986
  at: string;
@@ -3680,9 +4995,18 @@ export type UpdateTriggerResponse = {
3680
4995
  retry_at?: string;
3681
4996
  catch_up?: true;
3682
4997
  } | null;
4998
+ last_check?: {
4999
+ at: string;
5000
+ ok: boolean;
5001
+ message: string;
5002
+ } | null;
3683
5003
  hook_url?: string;
3684
5004
  secret?: SecretMeta;
3685
5005
  note?: string;
5006
+ composio?: {
5007
+ done: false;
5008
+ note: string;
5009
+ };
3686
5010
  };
3687
5011
  /** Usage by meter over a period (GET /usage). */
3688
5012
  export interface GetUsageParams {
@@ -3800,10 +5124,16 @@ export declare function resources(call: Call): {
3800
5124
  agents: {
3801
5125
  /** Archive the agent: hidden from the lists, kept with its history (POST /agents/{agent_id}/archive). */
3802
5126
  archive: (agentId: string, options?: RequestOptions) => Promise<ArchiveAgentResponse>;
5127
+ /** Connect a native project using ordinary agent and revision storage (POST /native/connect). */
5128
+ connectNative: (body: ConnectNativeBody, options?: RequestOptions) => Promise<ConnectNativeResponse>;
3803
5129
  /** Create an agent home (POST /agents). */
3804
5130
  create: (body: CreateAgentBody, params?: CreateAgentParams, options?: RequestOptions) => Promise<CreateAgentResponse>;
3805
5131
  /** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
3806
5132
  deleteAgentArchil: (agentId: string, options?: RequestOptions) => Promise<DeleteAgentArchilResponse>;
5133
+ /** Disconnect future native jobs while retaining source configuration and history (POST /agents/{agent_id}/native/disconnect). */
5134
+ disconnectNative: (agentId: string, options?: RequestOptions) => Promise<DisconnectNativeResponse>;
5135
+ /** Discover existing native projects on this source machine without running a model (POST /native/discover). */
5136
+ discoverNative: (body: DiscoverNativeBody, options?: RequestOptions) => Promise<DiscoverNativeResponse>;
3807
5137
  /** Forget one of the agent's saved sign-ins (DELETE /agents/{agent_id}/sign-ins/{key}). */
3808
5138
  forgetSignIn: (agentId: string, key: string, options?: RequestOptions) => Promise<ForgetSignInResponse>;
3809
5139
  /** One agent (GET /agents/{agent_id}). */
@@ -3812,6 +5142,8 @@ export declare function resources(call: Call): {
3812
5142
  getAgentArchil: (agentId: string, options?: RequestOptions) => Promise<GetAgentArchilResponse>;
3813
5143
  /** The self-learning loop's own record: each compile turn, and each guarded step of the learned workflows (GET /agents/{agent_id}/learning/loop). */
3814
5144
  getLearningLoop: (agentId: string, options?: RequestOptions) => Promise<GetLearningLoopResponse>;
5145
+ /** Read a native connection (GET /agents/{agent_id}/native). */
5146
+ getNative: (agentId: string, options?: RequestOptions) => Promise<GetNativeResponse>;
3815
5147
  /** List agents (GET /agents). */
3816
5148
  list: (params?: ListAgentsParams, options?: RequestOptions) => Promise<ListAgentsResponse>;
3817
5149
  /** Each learned workflow revision's promotion: its replay's numbers and whether it serves (GET /agents/{agent_id}/learning/promotions). */
@@ -3822,6 +5154,28 @@ export declare function resources(call: Call): {
3822
5154
  unarchive: (agentId: string, options?: RequestOptions) => Promise<UnarchiveAgentResponse>;
3823
5155
  /** Replace the agent's definition (PUT /agents/{agent_id}/definition). */
3824
5156
  update: (agentId: string, body: UpdateDefinitionBody, params?: UpdateDefinitionParams, options?: RequestOptions) => Promise<Tagged<UpdateDefinitionResponse>>;
5157
+ /** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
5158
+ verifyNative: (agentId: string, options?: RequestOptions) => Promise<VerifyNativeResponse>;
5159
+ };
5160
+ connectors: {
5161
+ /** Complete a source command once under its valid lease (POST /connectors/{connector_id}/commands/{command_id}/complete). */
5162
+ completeRemoteCommand: (connectorId: string, commandId: string, body: CompleteRemoteCommandBody, options?: RequestOptions) => Promise<CompleteRemoteCommandResponse>;
5163
+ /** Create a ten-minute one-use connection code (POST /connectors/enrollment). */
5164
+ enrollRemoteConnector: (body: EnrollRemoteConnectorBody, options?: RequestOptions) => Promise<EnrollRemoteConnectorResponse>;
5165
+ /** Import explicitly selected, redacted past sessions without running or learning from them (POST /connectors/{connector_id}/targets/{target_id}/history). */
5166
+ importRemoteHistory: (connectorId: string, targetId: string, body: ImportRemoteHistoryBody, options?: RequestOptions) => Promise<ImportRemoteHistoryResponse>;
5167
+ /** Import an explicitly selected source-native agent reference (POST /connectors/{connector_id}/import). */
5168
+ importRemoteTarget: (connectorId: string, body: ImportRemoteTargetBody, options?: RequestOptions) => Promise<ImportRemoteTargetResponse>;
5169
+ /** List remote source machines and imported agent targets (GET /connectors). */
5170
+ listRemoteConnectors: (options?: RequestOptions) => Promise<ListRemoteConnectorsResponse>;
5171
+ /** Renew active source leases and claim one command without replay (POST /connectors/{connector_id}/poll). */
5172
+ pollRemoteConnector: (connectorId: string, body: PollRemoteConnectorBody, options?: RequestOptions) => Promise<PollRemoteConnectorResponse>;
5173
+ /** Exchange a one-use enrollment code for a connector-scoped credential (POST /connectors). */
5174
+ registerRemoteConnector: (body: RegisterRemoteConnectorBody, options?: RequestOptions) => Promise<RegisterRemoteConnectorResponse>;
5175
+ /** Append an ordered idempotent native event batch for a valid command lease (POST /connectors/{connector_id}/commands/{command_id}/events). */
5176
+ remoteCommandEvents: (connectorId: string, commandId: string, body: RemoteCommandEventsBody, options?: RequestOptions) => Promise<RemoteCommandEventsResponse>;
5177
+ /** Revoke a source connector and stop its outstanding commands (DELETE /connectors/{connector_id}). */
5178
+ revokeRemoteConnector: (connectorId: string, options?: RequestOptions) => Promise<RevokeRemoteConnectorResponse>;
3825
5179
  };
3826
5180
  files: {
3827
5181
  /** Reserve an upload (POST /files). */
@@ -3868,6 +5222,8 @@ export declare function resources(call: Call): {
3868
5222
  read: (agentId: string, file: string, options?: RequestOptions) => Promise<Tagged<ReadLearningFileResponse | string>>;
3869
5223
  /** Record a held-out test of the agent: its counts and the cost a task, with learning and by hand (POST /agents/{agent_id}/learning/evals). */
3870
5224
  recordEval: (agentId: string, body: RecordLearningEvalBody, params?: RecordLearningEvalParams, options?: RequestOptions) => Promise<RecordLearningEvalResponse>;
5225
+ /** Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab) (GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}). */
5226
+ replay: (agentId: string, name: string, digest: string, replayId: string, options?: RequestOptions) => Promise<GetLearnedWorkflowReplayResponse>;
3871
5227
  /** Retire a note, a skill or a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
3872
5228
  retire: (agentId: string, file: string, params?: RetireLearningFileParams, options?: RequestOptions) => Promise<Tagged<string>>;
3873
5229
  /** A learned workflow's revisions on main, oldest first, each with its workflow.json as it was then (GET /agents/{agent_id}/learning/workflows/{name}/revisions). */
@@ -3878,30 +5234,56 @@ export declare function resources(call: Call): {
3878
5234
  local: {
3879
5235
  /** A code that pairs a person's own computer with this server (POST /computers/pairings). */
3880
5236
  createPairing: (options?: RequestOptions) => Promise<CreatePairingResponse>;
5237
+ /** Delete the Composio project's webhook subscription, once no trigger uses it (DELETE /settings/mcp-servers/{name}/composio/subscription). */
5238
+ deleteComposioSubscription: (name: string, options?: RequestOptions) => Promise<DeleteComposioSubscriptionResponse>;
3881
5239
  /** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
3882
5240
  deleteComputer: (computerId: string, options?: RequestOptions) => Promise<void>;
5241
+ /** Forget this server's email account (DELETE /settings/email). */
5242
+ deleteEmailAccount: (options?: RequestOptions) => Promise<void>;
3883
5243
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
3884
5244
  deleteWorkspaceArchil: (options?: RequestOptions) => Promise<DeleteWorkspaceArchilResponse>;
3885
5245
  /** Disconnect GitHub: the App's credentials gone from this server, and every github trigger off (DELETE /integrations/github). */
3886
5246
  disconnectGitHub: (options?: RequestOptions) => Promise<DisconnectGitHubResponse>;
5247
+ /** Finish signing in with ChatGPT with the address the sign-in tab ended on (POST /settings/chatgpt/sign-in/finish). */
5248
+ finishChatGptsignIn: (body: FinishChatGPTSignInBody, options?: RequestOptions) => Promise<FinishChatGPTSignInResponse>;
5249
+ /** This server's ChatGPT sign-in: its state, who and which plan, never a token (GET /settings/chatgpt). */
5250
+ getChatGptsignIn: (options?: RequestOptions) => Promise<GetChatGPTSignInResponse>;
5251
+ /** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
5252
+ getEmailAccount: (options?: RequestOptions) => Promise<GetEmailAccountResponse>;
3887
5253
  /** Whether a GitHub App is connected, and if so its id, slug and installations, never a secret (GET /integrations/github). */
3888
5254
  getGitHubConnection: (options?: RequestOptions) => Promise<GetGitHubConnectionResponse>;
3889
5255
  /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
3890
5256
  getWorkspaceArchil: (options?: RequestOptions) => Promise<GetWorkspaceArchilResponse>;
5257
+ /** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
5258
+ listComposioEvents: (name: string, options?: RequestOptions) => Promise<ListComposioEventsResponse>;
3891
5259
  /** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
3892
5260
  listComposioTools: (body: ListComposioToolsBody, options?: RequestOptions) => Promise<ListComposioToolsResponse>;
5261
+ /** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
5262
+ listComposioTriggers: (name: string, options?: RequestOptions) => Promise<ListComposioTriggersResponse>;
3893
5263
  /** The values a computer provider's picked keys offer, read from the vendor (GET /computers/{provider}/choices). */
3894
5264
  listComputerChoices: (provider: string, options?: RequestOptions) => Promise<ListComputerChoicesResponse>;
3895
5265
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
3896
5266
  listComputers: (options?: RequestOptions) => Promise<ListComputersResponse>;
3897
5267
  /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
3898
5268
  putWorkspaceArchil: (body: PutWorkspaceArchilBody, options?: RequestOptions) => Promise<PutWorkspaceArchilResponse>;
5269
+ /** Fire a Composio trigger: a request it checks, no token (POST /hooks/composio/{hook}). */
5270
+ receiveHookComposio: (hook: string, body: RawBody, options?: BodyOptions) => Promise<ReceiveHookComposioResponse>;
5271
+ /** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
5272
+ rotateComposioSecret: (name: string, options?: RequestOptions) => Promise<RotateComposioSecretResponse>;
3899
5273
  /** Have Composio make a managed MCP server for a toolkit's chosen actions, and save it as an MCP server (PUT /settings/mcp-servers/{name}/composio). */
3900
5274
  saveComposioServer: (name: string, body: SaveComposioServerBody, options?: RequestOptions) => Promise<SaveComposioServerResponse>;
3901
5275
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
3902
5276
  saveComputerKeys: (provider: string, body: SaveComputerKeysBody, options?: RequestOptions) => Promise<SaveComputerKeysResponse>;
5277
+ /** Save this server's email account, its password sealed (PUT /settings/email). */
5278
+ saveEmailAccount: (body: SaveEmailAccountBody, options?: RequestOptions) => Promise<SaveEmailAccountResponse>;
5279
+ /** Sign out of ChatGPT: the session revoked at OpenAI, then forgotten here (DELETE /settings/chatgpt). */
5280
+ signOutChatGpt: (options?: RequestOptions) => Promise<SignOutChatGPTResponse>;
5281
+ /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
5282
+ startChatGptsignIn: (options?: RequestOptions) => Promise<StartChatGPTSignInResponse>;
3903
5283
  /** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
3904
5284
  testComputer: (provider: string, options?: RequestOptions) => Promise<TestComputerResponse>;
5285
+ /** Sign in to the email account's IMAP and SMTP servers, sending nothing (POST /settings/email/test). */
5286
+ testEmailAccount: (body?: TestEmailAccountBody, options?: RequestOptions) => Promise<TestEmailAccountResponse>;
3905
5287
  /** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
3906
5288
  testWorkspaceArchil: (options?: RequestOptions) => Promise<TestWorkspaceArchilResponse>;
3907
5289
  };
@@ -3923,6 +5305,10 @@ export declare function resources(call: Call): {
3923
5305
  /** Preview a remote MCP server, then save it with the tools listed and its credential sealed (PUT /settings/mcp-servers/{name}). */
3924
5306
  save: (name: string, body: SaveMcpServerBody, options?: RequestOptions) => Promise<SaveMcpServerResponse>;
3925
5307
  };
5308
+ Observations: {
5309
+ /** Read activity and token usage reported by externally running agents (GET /observations). */
5310
+ getObservations: (params?: GetObservationsParams, options?: RequestOptions) => Promise<GetObservationsResponse>;
5311
+ };
3926
5312
  revisions: {
3927
5313
  /** The agent's revisions, newest first (GET /agents/{agent_id}/revisions). */
3928
5314
  list: (agentId: string, params?: ListRevisionsParams, options?: RequestOptions) => Promise<ListRevisionsResponse>;
@@ -3979,6 +5365,16 @@ export declare function resources(call: Call): {
3979
5365
  /** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
3980
5366
  unarchive: (runId: string, options?: RequestOptions) => Promise<UnarchiveRunResponse>;
3981
5367
  };
5368
+ sdkRuns: {
5369
+ /** Complete a backend SDK task (POST /sdk-runs/{run_id}/complete). */
5370
+ complete: (runId: string, body: CompleteSdkRunBody, params?: CompleteSdkRunParams, options?: RequestOptions) => Promise<CompleteSdkRunResponse>;
5371
+ /** Record bounded SDK execution evidence (POST /sdk-runs/{run_id}/events). */
5372
+ events: (runId: string, body: SdkRunEventsBody, params?: SdkRunEventsParams, options?: RequestOptions) => Promise<SdkRunEventsResponse>;
5373
+ /** Read SDK run and learning state (GET /sdk-runs/{run_id}). */
5374
+ get: (runId: string, options?: RequestOptions) => Promise<GetSdkRunResponse>;
5375
+ /** Register a task executed by an existing backend SDK (POST /agents/{agent_id}/sdk-runs). */
5376
+ start: (agentId: string, body: StartSdkRunBody, params: StartSdkRunParams, options?: RequestOptions) => Promise<StartSdkRunResponse>;
5377
+ };
3982
5378
  server: {
3983
5379
  /** What this backend offers (GET /capabilities). */
3984
5380
  capabilities: (options?: RequestOptions) => Promise<GetCapabilitiesResponse>;
@@ -4021,7 +5417,7 @@ export declare function resources(call: Call): {
4021
5417
  /** Make a trigger: a schedule or a signed webhook that starts a capped run of an agent, or messages a run (POST /triggers). */
4022
5418
  create: (body: CreateTriggerBody, params?: CreateTriggerParams, options?: RequestOptions) => Promise<CreateTriggerResponse>;
4023
5419
  /** Delete a trigger and its firings; the runs it started stay (DELETE /triggers/{trigger_id}). */
4024
- delete: (triggerId: string, options?: RequestOptions) => Promise<void>;
5420
+ delete: (triggerId: string, options?: RequestOptions) => Promise<DeleteTriggerResponse | undefined>;
4025
5421
  /** Run it now: one firing per Idempotency-Key (POST /triggers/{trigger_id}/fire). */
4026
5422
  fire: (triggerId: string, params: FireTriggerParams, options?: RequestOptions) => Promise<FireTriggerResponse>;
4027
5423
  /** The trigger's last 200 firings, newest first (GET /triggers/{trigger_id}/firings). */
@@ -4031,7 +5427,7 @@ export declare function resources(call: Call): {
4031
5427
  /** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
4032
5428
  list: (options?: RequestOptions) => Promise<ListTriggersResponse>;
4033
5429
  /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
4034
- rotateSecret: (triggerId: string, body?: RotateTriggerSecretBody, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
5430
+ rotateSecret: (triggerId: string, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
4035
5431
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
4036
5432
  update: (triggerId: string, body: UpdateTriggerBody, options?: RequestOptions) => Promise<UpdateTriggerResponse>;
4037
5433
  };