@parcha/agentrun-client 0.1.0-beta.35 → 0.1.0-beta.37

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.
@@ -17,13 +17,17 @@ export type DefinitionInput = {
17
17
  workflow?: JsonObject;
18
18
  max_cost_usd?: number;
19
19
  model?: string;
20
+ model_tiers?: {
21
+ fast?: string;
22
+ strong?: string;
23
+ };
20
24
  thinking?: "low" | "medium" | "high" | "xhigh" | "max";
21
25
  harness?: "pi" | "claude-agent" | "codex" | "opencode";
22
26
  place?: {
23
27
  mode: "runner";
24
28
  } | {
25
29
  mode: "sandbox";
26
- box: "bwrap" | "docker" | "modal" | "daytona";
30
+ box: "docker" | "modal" | "daytona";
27
31
  };
28
32
  computer?: {
29
33
  kind: "none" | "sandbox" | "desktop" | "phone" | "browser";
@@ -33,6 +37,7 @@ export type DefinitionInput = {
33
37
  type: string;
34
38
  count: number;
35
39
  };
40
+ persistent?: boolean;
36
41
  };
37
42
  tool_settings?: {
38
43
  read?: {
@@ -63,6 +68,9 @@ export type DefinitionInput = {
63
68
  provider?: "auto" | "browserbase" | "kernel" | "chrome";
64
69
  permission?: "allow" | "deny";
65
70
  };
71
+ subagent?: {
72
+ permission?: "allow" | "deny";
73
+ };
66
74
  pdf_pages?: {
67
75
  permission?: "allow" | "deny";
68
76
  };
@@ -75,10 +83,20 @@ export type DefinitionInput = {
75
83
  phone?: {
76
84
  permission?: "allow" | "deny";
77
85
  };
86
+ jev?: {
87
+ permission?: "allow" | "deny";
88
+ };
89
+ parallel?: {
90
+ permission?: "allow" | "deny";
91
+ };
92
+ openrouter?: {
93
+ permission?: "allow" | "deny";
94
+ };
78
95
  [key: string]: unknown;
79
96
  };
80
97
  approvals?: "ask" | "never";
81
- learning?: boolean;
98
+ learning?: true | false | "notes";
99
+ checkout?: "pull_request" | "none";
82
100
  max_tool_calls?: number;
83
101
  cap_mode?: "expected" | "strict";
84
102
  };
@@ -125,6 +143,16 @@ export type Agent = {
125
143
  learning?: {
126
144
  pending: number;
127
145
  };
146
+ own_computer?: {
147
+ provider: string;
148
+ id: string;
149
+ name: string;
150
+ state: "held" | "detached" | "deleting";
151
+ since: string;
152
+ image?: string;
153
+ run_id?: string;
154
+ why?: string;
155
+ } | null;
128
156
  warnings?: Array<InputIssue>;
129
157
  };
130
158
  export type Definition = DefinitionInput;
@@ -155,7 +183,7 @@ export type SecretMeta = {
155
183
  };
156
184
  export type InputIssue = {
157
185
  field: string;
158
- 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";
186
+ 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";
159
187
  expected?: string;
160
188
  message: string;
161
189
  fix?: string;
@@ -189,7 +217,7 @@ export type RunSummary = {
189
217
  error?: RunError | null;
190
218
  learning?: {
191
219
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
192
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | null;
220
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
193
221
  detail: string | null;
194
222
  given?: Array<{
195
223
  file: string;
@@ -348,7 +376,17 @@ export type RunCreateInline = {
348
376
  effort?: Effort;
349
377
  max_cost_usd?: number;
350
378
  quote_id?: string;
379
+ mcp_auth?: Record<string, {
380
+ headers: Record<string, string>;
381
+ }>;
351
382
  cap_mode?: "expected" | "strict";
383
+ learning?: "use";
384
+ repo?: string;
385
+ archil_disk?: {
386
+ disk_id: string;
387
+ };
388
+ hold?: boolean;
389
+ hold_minutes?: number;
352
390
  };
353
391
  export type ExternalRef = {
354
392
  source: string;
@@ -388,17 +426,23 @@ export type Run = {
388
426
  mode: "runner";
389
427
  } | {
390
428
  mode: "sandbox";
391
- box: "bwrap" | "docker" | "modal" | "daytona";
429
+ box: "docker" | "modal" | "daytona";
392
430
  };
393
431
  computer?: {
394
432
  kind: "sandbox" | "desktop" | "phone" | "browser";
395
433
  provider: string;
396
434
  state: "starting" | "ready" | "taken_over" | "ended" | "failed";
397
435
  why?: string;
436
+ held?: {
437
+ state: "starting" | "waiting" | "started" | "ended" | "released";
438
+ minutes: number;
439
+ until?: string;
440
+ why?: "timeout" | "lost";
441
+ };
398
442
  };
399
443
  learning?: {
400
444
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
401
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | null;
445
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
402
446
  detail: string | null;
403
447
  at: string;
404
448
  given?: Array<{
@@ -500,6 +544,9 @@ export type RunFile = {
500
544
  };
501
545
  export type MessageCreate = {
502
546
  content: string;
547
+ mcp_auth?: Record<string, {
548
+ headers: Record<string, string>;
549
+ }>;
503
550
  };
504
551
  export type MessageResult = {
505
552
  run_id: Id;
@@ -515,7 +562,17 @@ export type RunCreate = {
515
562
  effort?: Effort;
516
563
  max_cost_usd?: number;
517
564
  quote_id?: string;
565
+ mcp_auth?: Record<string, {
566
+ headers: Record<string, string>;
567
+ }>;
518
568
  cap_mode?: "expected" | "strict";
569
+ learning?: "use";
570
+ repo?: string;
571
+ archil_disk?: {
572
+ disk_id: string;
573
+ };
574
+ hold?: boolean;
575
+ hold_minutes?: number;
519
576
  };
520
577
  export type StopResult = {
521
578
  run_id: Id;
@@ -559,6 +616,7 @@ export type TimelineRow = {
559
616
  path?: string;
560
617
  usage?: TimelineUsage;
561
618
  paused?: true;
619
+ refused?: true;
562
620
  origin?: "server" | "trigger";
563
621
  trigger?: {
564
622
  id: string;
@@ -571,10 +629,26 @@ export type TimelineRow = {
571
629
  kind: string;
572
630
  status: string;
573
631
  duration_ms: number;
632
+ model?: string;
633
+ tier?: string;
574
634
  }>;
635
+ computer_calls?: Array<{
636
+ method: string;
637
+ ok: boolean;
638
+ ms: number;
639
+ code?: string;
640
+ steps?: Array<{
641
+ do: string;
642
+ route?: string;
643
+ verified?: boolean;
644
+ error?: string;
645
+ }>;
646
+ expect?: "met" | "unmet";
647
+ }>;
648
+ computer_calls_dropped?: number;
575
649
  learning?: {
576
650
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
577
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | null;
651
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
578
652
  detail: string | null;
579
653
  };
580
654
  };
@@ -617,9 +691,9 @@ export type Capabilities = {
617
691
  places: {
618
692
  modes: Array<"runner" | "sandbox">;
619
693
  boxes: Array<{
620
- id: "bwrap" | "docker" | "modal" | "daytona";
694
+ id: "docker" | "modal" | "daytona";
621
695
  available: boolean;
622
- state: "ready" | "preparing" | "unavailable";
696
+ state: "ready" | "unavailable";
623
697
  reason?: string;
624
698
  network?: "allowlist" | "none";
625
699
  network_reason?: string;
@@ -629,7 +703,7 @@ export type Capabilities = {
629
703
  mode: "runner";
630
704
  } | {
631
705
  mode: "sandbox";
632
- box: "bwrap" | "docker" | "modal" | "daytona";
706
+ box: "docker" | "modal" | "daytona";
633
707
  };
634
708
  default_reason?: string;
635
709
  allow: Array<string>;
@@ -637,6 +711,7 @@ export type Capabilities = {
637
711
  harnesses?: Array<{
638
712
  id: "pi" | "claude-agent" | "codex" | "opencode";
639
713
  available: boolean;
714
+ models: Array<string>;
640
715
  run_memory_mib: number;
641
716
  max_concurrent_runs: number;
642
717
  default_model: string | null;
@@ -778,7 +853,7 @@ export type Features = {
778
853
  };
779
854
  mcp_client?: {
780
855
  transports: Array<"streamable-http">;
781
- auth: Array<"none" | "bearer" | "headers" | "oauth" | "github_app">;
856
+ auth: Array<"none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run">;
782
857
  at_rest: "sealed";
783
858
  harnesses: Array<string>;
784
859
  };
@@ -799,7 +874,7 @@ export type Features = {
799
874
  failures_to_pause: number;
800
875
  webhook: {
801
876
  signing: "standard-webhooks/v1";
802
- signatures: Array<"standard" | "github">;
877
+ signatures: Array<"standard" | "github" | "composio">;
803
878
  tolerance_s: number;
804
879
  max_body_bytes: number;
805
880
  payload_kept_bytes: number;
@@ -862,6 +937,16 @@ export interface CreateAgentParams {
862
937
  "Idempotency-Key"?: string;
863
938
  }
864
939
  export type CreateAgentResponse = Agent;
940
+ /** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
941
+ export type DeleteAgentArchilResponse = {
942
+ on: boolean;
943
+ archil_disk: {
944
+ disk_id: string;
945
+ } | null;
946
+ removed: {
947
+ disk_id: string;
948
+ } | null;
949
+ };
865
950
  /** Forget one of the agent's saved sign-ins (DELETE /agents/{agent_id}/sign-ins/{key}). */
866
951
  export type ForgetSignInResponse = {
867
952
  key: string;
@@ -886,6 +971,13 @@ export type GetAgentResponse = Agent & ({
886
971
  permissions: Array<"allow" | "ask" | "deny">;
887
972
  }>;
888
973
  });
974
+ /** The agent's own Archil disk, once its first run made it (GET /agents/{agent_id}/archil). */
975
+ export type GetAgentArchilResponse = {
976
+ on: boolean;
977
+ archil_disk: {
978
+ disk_id: string;
979
+ } | null;
980
+ };
889
981
  /** List agents (GET /agents). */
890
982
  export interface ListAgentsParams {
891
983
  limit?: number;
@@ -960,6 +1052,301 @@ export type WriteHomeFileResponse = {
960
1052
  content_type?: string | null;
961
1053
  unreadable?: true;
962
1054
  };
1055
+ /** A learning batch's progress: rows done, right or wrong, lessons, workflow revisions, cost, the path each run took (GET /agents/{agent_id}/learning/batches/{batch_id}). */
1056
+ export type GetLearningBatchResponse = {
1057
+ id: string;
1058
+ agent_id: string;
1059
+ created_at: string;
1060
+ ended_at: string | null;
1061
+ status: "running" | "completed" | "cancelled" | "stopped";
1062
+ stopped: "cap" | "cost_unknown" | "learning_off" | null;
1063
+ inputs: Array<string>;
1064
+ answer: string;
1065
+ answer_field: string | null;
1066
+ effort: string | null;
1067
+ max_cost_usd: number;
1068
+ total: number;
1069
+ finished: number;
1070
+ right: number;
1071
+ wrong: number;
1072
+ failed: number;
1073
+ spent_usd: number;
1074
+ unknown_cost_rows: number;
1075
+ paths: {
1076
+ agent: number;
1077
+ handed_back: number;
1078
+ workflow: number;
1079
+ };
1080
+ lessons: {
1081
+ notes: Array<string>;
1082
+ skills: Array<string>;
1083
+ workflows: Array<string>;
1084
+ };
1085
+ revisions: Array<{
1086
+ row: number;
1087
+ commit: string | null;
1088
+ workflows: Array<string>;
1089
+ }>;
1090
+ cost_usd: number | null;
1091
+ remaining_usd: number | null;
1092
+ current: number | null;
1093
+ rows: Array<{
1094
+ n: number;
1095
+ state: "pending" | "running" | "done" | "failed";
1096
+ reference: string;
1097
+ run_id?: string;
1098
+ answer?: string | null;
1099
+ right?: boolean;
1100
+ reviewed?: boolean;
1101
+ path?: "agent" | "handed_back" | "workflow";
1102
+ cost_usd?: number | null;
1103
+ learning_usd?: number | null;
1104
+ total_usd?: number | null;
1105
+ learned?: {
1106
+ notes: Array<string>;
1107
+ skills: Array<string>;
1108
+ workflows: Array<string>;
1109
+ };
1110
+ merged?: string | null;
1111
+ error?: string;
1112
+ }>;
1113
+ error?: string;
1114
+ };
1115
+ /** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
1116
+ export type CancelLearningBatchResponse = {
1117
+ id: string;
1118
+ agent_id: string;
1119
+ created_at: string;
1120
+ ended_at: string | null;
1121
+ status: "running" | "completed" | "cancelled" | "stopped";
1122
+ stopped: "cap" | "cost_unknown" | "learning_off" | null;
1123
+ inputs: Array<string>;
1124
+ answer: string;
1125
+ answer_field: string | null;
1126
+ effort: string | null;
1127
+ max_cost_usd: number;
1128
+ total: number;
1129
+ finished: number;
1130
+ right: number;
1131
+ wrong: number;
1132
+ failed: number;
1133
+ spent_usd: number;
1134
+ unknown_cost_rows: number;
1135
+ paths: {
1136
+ agent: number;
1137
+ handed_back: number;
1138
+ workflow: number;
1139
+ };
1140
+ lessons: {
1141
+ notes: Array<string>;
1142
+ skills: Array<string>;
1143
+ workflows: Array<string>;
1144
+ };
1145
+ revisions: Array<{
1146
+ row: number;
1147
+ commit: string | null;
1148
+ workflows: Array<string>;
1149
+ }>;
1150
+ cost_usd: number | null;
1151
+ remaining_usd: number | null;
1152
+ current: number | null;
1153
+ rows: Array<{
1154
+ n: number;
1155
+ state: "pending" | "running" | "done" | "failed";
1156
+ reference: string;
1157
+ run_id?: string;
1158
+ answer?: string | null;
1159
+ right?: boolean;
1160
+ reviewed?: boolean;
1161
+ path?: "agent" | "handed_back" | "workflow";
1162
+ cost_usd?: number | null;
1163
+ learning_usd?: number | null;
1164
+ total_usd?: number | null;
1165
+ learned?: {
1166
+ notes: Array<string>;
1167
+ skills: Array<string>;
1168
+ workflows: Array<string>;
1169
+ };
1170
+ merged?: string | null;
1171
+ error?: string;
1172
+ }>;
1173
+ error?: string;
1174
+ };
1175
+ /** Learn from rows: run the agent on each in order, with learning on, and tell it the reference answer after each (POST /agents/{agent_id}/learning/batches). */
1176
+ export type CreateLearningBatchBody = {
1177
+ inputs: Array<string>;
1178
+ answer: string;
1179
+ rows: Array<Record<string, string>>;
1180
+ max_cost_usd: number;
1181
+ answer_field?: string;
1182
+ effort?: string;
1183
+ };
1184
+ export type CreateLearningBatchResponse = {
1185
+ id: string;
1186
+ agent_id: string;
1187
+ created_at: string;
1188
+ ended_at: string | null;
1189
+ status: "running" | "completed" | "cancelled" | "stopped";
1190
+ stopped: "cap" | "cost_unknown" | "learning_off" | null;
1191
+ inputs: Array<string>;
1192
+ answer: string;
1193
+ answer_field: string | null;
1194
+ effort: string | null;
1195
+ max_cost_usd: number;
1196
+ total: number;
1197
+ finished: number;
1198
+ right: number;
1199
+ wrong: number;
1200
+ failed: number;
1201
+ spent_usd: number;
1202
+ unknown_cost_rows: number;
1203
+ paths: {
1204
+ agent: number;
1205
+ handed_back: number;
1206
+ workflow: number;
1207
+ };
1208
+ lessons: {
1209
+ notes: Array<string>;
1210
+ skills: Array<string>;
1211
+ workflows: Array<string>;
1212
+ };
1213
+ revisions: Array<{
1214
+ row: number;
1215
+ commit: string | null;
1216
+ workflows: Array<string>;
1217
+ }>;
1218
+ cost_usd: number | null;
1219
+ remaining_usd: number | null;
1220
+ current: number | null;
1221
+ rows: Array<{
1222
+ n: number;
1223
+ state: "pending" | "running" | "done" | "failed";
1224
+ reference: string;
1225
+ run_id?: string;
1226
+ answer?: string | null;
1227
+ right?: boolean;
1228
+ reviewed?: boolean;
1229
+ path?: "agent" | "handed_back" | "workflow";
1230
+ cost_usd?: number | null;
1231
+ learning_usd?: number | null;
1232
+ total_usd?: number | null;
1233
+ learned?: {
1234
+ notes: Array<string>;
1235
+ skills: Array<string>;
1236
+ workflows: Array<string>;
1237
+ };
1238
+ merged?: string | null;
1239
+ error?: string;
1240
+ }>;
1241
+ error?: string;
1242
+ };
1243
+ /** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
1244
+ export type ListLearningBatchesResponse = {
1245
+ batches: Array<{
1246
+ id: string;
1247
+ agent_id: string;
1248
+ created_at: string;
1249
+ ended_at: string | null;
1250
+ status: "running" | "completed" | "cancelled" | "stopped";
1251
+ stopped: "cap" | "cost_unknown" | "learning_off" | null;
1252
+ inputs: Array<string>;
1253
+ answer: string;
1254
+ answer_field: string | null;
1255
+ effort: string | null;
1256
+ max_cost_usd: number;
1257
+ total: number;
1258
+ finished: number;
1259
+ right: number;
1260
+ wrong: number;
1261
+ failed: number;
1262
+ spent_usd: number;
1263
+ unknown_cost_rows: number;
1264
+ paths: {
1265
+ agent: number;
1266
+ handed_back: number;
1267
+ workflow: number;
1268
+ };
1269
+ lessons: {
1270
+ notes: Array<string>;
1271
+ skills: Array<string>;
1272
+ workflows: Array<string>;
1273
+ };
1274
+ revisions: Array<{
1275
+ row: number;
1276
+ commit: string | null;
1277
+ workflows: Array<string>;
1278
+ }>;
1279
+ cost_usd: number | null;
1280
+ remaining_usd: number | null;
1281
+ error?: string;
1282
+ }>;
1283
+ };
1284
+ /** The agent's cost per run, run after run: its own cost, what learning added and the path it took (GET /agents/{agent_id}/learning/cost). */
1285
+ export interface GetLearningCostParams {
1286
+ limit?: number;
1287
+ format?: "json" | "csv";
1288
+ }
1289
+ export type GetLearningCostResponse = {
1290
+ agent: string;
1291
+ runs: Array<{
1292
+ n: number;
1293
+ run_id: string;
1294
+ started_at: string;
1295
+ path: "agent" | "handed_back" | "workflow";
1296
+ workflow: string | null;
1297
+ learned_revision: string | null;
1298
+ cost_usd: number | null;
1299
+ learning_usd: number | null;
1300
+ total_usd: number | null;
1301
+ }>;
1302
+ total_runs: number;
1303
+ unknown_cost_runs: number;
1304
+ summary: {
1305
+ takeover: {
1306
+ n: number;
1307
+ run_id: string;
1308
+ } | null;
1309
+ before: {
1310
+ runs: number;
1311
+ mean_usd: number;
1312
+ } | null;
1313
+ after: {
1314
+ runs: number;
1315
+ mean_usd: number;
1316
+ } | null;
1317
+ times_cheaper: number | null;
1318
+ };
1319
+ };
1320
+ /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
1321
+ export type ListLearningEvalsResponse = {
1322
+ agent: string;
1323
+ latest: {
1324
+ id: string;
1325
+ name: string;
1326
+ n: number;
1327
+ correct: number;
1328
+ label_source: string | null;
1329
+ cost_per_task_usd: number | null;
1330
+ baseline_cost_per_task_usd: number | null;
1331
+ learned_revision: string | null;
1332
+ accuracy: number;
1333
+ ci: Array<number>;
1334
+ recorded_at: string;
1335
+ } | null;
1336
+ evals: Array<{
1337
+ id: string;
1338
+ name: string;
1339
+ n: number;
1340
+ correct: number;
1341
+ label_source: string | null;
1342
+ cost_per_task_usd: number | null;
1343
+ baseline_cost_per_task_usd: number | null;
1344
+ learned_revision: string | null;
1345
+ accuracy: number;
1346
+ ci: Array<number>;
1347
+ recorded_at: string;
1348
+ }>;
1349
+ };
963
1350
  /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
964
1351
  export type GetAgentLearningResponse = {
965
1352
  agent: string;
@@ -982,8 +1369,9 @@ export type GetAgentLearningResponse = {
982
1369
  };
983
1370
  retired?: {
984
1371
  at: string;
985
- by: "person" | "run";
986
- from: "active" | "pending";
1372
+ by: "person" | "run" | "host";
1373
+ from?: "active" | "pending";
1374
+ why?: "unreadable";
987
1375
  };
988
1376
  last_change?: {
989
1377
  kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
@@ -1004,8 +1392,9 @@ export type GetAgentLearningResponse = {
1004
1392
  etag: string;
1005
1393
  retired?: {
1006
1394
  at: string;
1007
- by: "person" | "run";
1008
- from: "active" | "pending";
1395
+ by: "person" | "run" | "host";
1396
+ from?: "active" | "pending";
1397
+ why?: "unreadable";
1009
1398
  };
1010
1399
  last_change?: {
1011
1400
  kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
@@ -1024,8 +1413,9 @@ export type GetAgentLearningResponse = {
1024
1413
  etag: string;
1025
1414
  retired?: {
1026
1415
  at: string;
1027
- by: "person" | "run";
1028
- from: "active" | "pending";
1416
+ by: "person" | "run" | "host";
1417
+ from?: "active" | "pending";
1418
+ why?: "unreadable";
1029
1419
  };
1030
1420
  last_change?: {
1031
1421
  kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
@@ -1115,8 +1505,9 @@ export type ListLearningNotesResponse = {
1115
1505
  };
1116
1506
  retired?: {
1117
1507
  at: string;
1118
- by: "person" | "run";
1119
- from: "active" | "pending";
1508
+ by: "person" | "run" | "host";
1509
+ from?: "active" | "pending";
1510
+ why?: "unreadable";
1120
1511
  };
1121
1512
  last_change?: {
1122
1513
  kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
@@ -1129,10 +1520,57 @@ export type ListLearningNotesResponse = {
1129
1520
  };
1130
1521
  /** One note (or MEMORY.md, a skill's SKILL.md or a draft's file) on main, as text, with its ETag (GET /agents/{agent_id}/learning/files/{file}). */
1131
1522
  export type ReadLearningFileResponse = unknown;
1523
+ /** 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). */
1524
+ export type RecordLearningEvalBody = {
1525
+ name: string;
1526
+ n: number;
1527
+ correct: number;
1528
+ label_source?: string | null;
1529
+ cost_per_task_usd?: number | null;
1530
+ baseline_cost_per_task_usd?: number | null;
1531
+ learned_revision?: string | null;
1532
+ };
1533
+ export interface RecordLearningEvalParams {
1534
+ "Idempotency-Key"?: string;
1535
+ }
1536
+ export type RecordLearningEvalResponse = {
1537
+ id: string;
1538
+ name: string;
1539
+ n: number;
1540
+ correct: number;
1541
+ label_source: string | null;
1542
+ cost_per_task_usd: number | null;
1543
+ baseline_cost_per_task_usd: number | null;
1544
+ learned_revision: string | null;
1545
+ accuracy: number;
1546
+ ci: Array<number>;
1547
+ recorded_at: string;
1548
+ };
1132
1549
  /** 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). */
1133
1550
  export interface RetireLearningFileParams {
1134
1551
  "If-Match"?: string;
1135
1552
  }
1553
+ /** 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). */
1554
+ export interface ListLearnedWorkflowRevisionsParams {
1555
+ limit?: number;
1556
+ }
1557
+ export type ListLearnedWorkflowRevisionsResponse = {
1558
+ name: string;
1559
+ revisions: Array<{
1560
+ commit: string;
1561
+ at: string;
1562
+ by: {
1563
+ run: string;
1564
+ } | {
1565
+ user: true;
1566
+ via?: string;
1567
+ };
1568
+ reason: string;
1569
+ text: string | null;
1570
+ }>;
1571
+ total: number;
1572
+ truncated: boolean;
1573
+ };
1136
1574
  /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
1137
1575
  export type WriteLearningFileBody = {
1138
1576
  text: string;
@@ -1150,6 +1588,13 @@ export type ConnectGitHubResponse = {
1150
1588
  manifest: Record<string, unknown>;
1151
1589
  state: string;
1152
1590
  };
1591
+ /** A code that pairs a person's own computer with this server (POST /computers/pairings). */
1592
+ export type CreatePairingResponse = {
1593
+ id: string;
1594
+ code: string;
1595
+ expires_at: string;
1596
+ };
1597
+ /** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
1153
1598
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
1154
1599
  export type DeleteWorkspaceArchilResponse = {
1155
1600
  on: boolean;
@@ -1159,7 +1604,7 @@ export type DeleteWorkspaceArchilResponse = {
1159
1604
  source: "env" | "console" | "sign-in" | null;
1160
1605
  changed_at: string | null;
1161
1606
  };
1162
- diskId?: string;
1607
+ source?: "env" | "console";
1163
1608
  region?: string;
1164
1609
  s3Url?: string;
1165
1610
  image?: string;
@@ -1182,7 +1627,7 @@ export type GetGitHubConnectionResponse = {
1182
1627
  account: string;
1183
1628
  }>;
1184
1629
  };
1185
- /** Whether run folders are on an Archil disk (Mode 2), its settings, and whether its keys are saved (GET /workspace/archil). */
1630
+ /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
1186
1631
  export type GetWorkspaceArchilResponse = {
1187
1632
  on: boolean;
1188
1633
  secret: {
@@ -1191,7 +1636,7 @@ export type GetWorkspaceArchilResponse = {
1191
1636
  source: "env" | "console" | "sign-in" | null;
1192
1637
  changed_at: string | null;
1193
1638
  };
1194
- diskId?: string;
1639
+ source?: "env" | "console";
1195
1640
  region?: string;
1196
1641
  s3Url?: string;
1197
1642
  image?: string;
@@ -1207,8 +1652,66 @@ export interface GitHubInstalledParams {
1207
1652
  setup_action?: string;
1208
1653
  state?: string;
1209
1654
  }
1655
+ /** 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. */
1656
+ export type ListComposioToolsBody = {
1657
+ api_key: string;
1658
+ toolkit: string;
1659
+ };
1660
+ export type ListComposioToolsResponse = {
1661
+ toolkit: string;
1662
+ no_auth: boolean;
1663
+ tools: Array<{
1664
+ slug: string;
1665
+ name: string;
1666
+ description: string;
1667
+ }>;
1668
+ };
1669
+ /** The values a computer provider's picked keys offer, read from the vendor (GET /computers/{provider}/choices). */
1670
+ export type ListComputerChoicesResponse = {
1671
+ choices: Array<{
1672
+ key: string;
1673
+ options: Array<{
1674
+ value: string;
1675
+ label: string;
1676
+ }>;
1677
+ saved?: string;
1678
+ } | {
1679
+ key: string;
1680
+ why: string;
1681
+ }>;
1682
+ };
1210
1683
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
1211
1684
  export type ListComputersResponse = {
1685
+ paired: Array<{
1686
+ id: string;
1687
+ name: string;
1688
+ kind: string;
1689
+ serves: Array<"none" | "sandbox" | "desktop" | "phone" | "browser">;
1690
+ unserved: string | null;
1691
+ os: string;
1692
+ os_version: string | null;
1693
+ device: {
1694
+ maker: string;
1695
+ model: string;
1696
+ } | null;
1697
+ arch: string;
1698
+ screen: {
1699
+ width: number;
1700
+ height: number;
1701
+ scale: number;
1702
+ } | null;
1703
+ groups: Array<string>;
1704
+ features: Record<string, true | {
1705
+ off: string;
1706
+ }>;
1707
+ driver: string;
1708
+ online: boolean;
1709
+ held_by_run: string | null;
1710
+ held_until: string | null;
1711
+ pairing: string;
1712
+ created_at: string;
1713
+ seen_at: string | null;
1714
+ }>;
1212
1715
  kinds: Array<{
1213
1716
  kind: "none" | "sandbox" | "desktop" | "phone" | "browser";
1214
1717
  offered: boolean;
@@ -1226,7 +1729,11 @@ export type ListComputersResponse = {
1226
1729
  }>;
1227
1730
  required: Array<string>;
1228
1731
  ready: boolean;
1732
+ shell: "computer" | "local" | "none";
1733
+ host_tools: Array<string>;
1229
1734
  why?: string;
1735
+ picked?: Array<string>;
1736
+ shell_note?: string;
1230
1737
  gpu?: {
1231
1738
  types: Array<string>;
1232
1739
  max: number;
@@ -1245,13 +1752,18 @@ export type ListComputersResponse = {
1245
1752
  };
1246
1753
  network?: string;
1247
1754
  images?: Array<string>;
1755
+ persistent?: {
1756
+ images?: Array<string>;
1757
+ };
1248
1758
  }>;
1249
1759
  why?: string;
1760
+ shell?: "computer" | "local" | "none";
1761
+ host_tools?: Array<string>;
1762
+ shell_note?: string;
1250
1763
  }>;
1251
1764
  };
1252
- /** Turn Mode 2 on: run folders on this Archil disk (PUT /workspace/archil). */
1765
+ /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
1253
1766
  export type PutWorkspaceArchilBody = {
1254
- diskId: string;
1255
1767
  region: string;
1256
1768
  s3Url: string;
1257
1769
  image?: string;
@@ -1267,11 +1779,58 @@ export type PutWorkspaceArchilResponse = {
1267
1779
  source: "env" | "console" | "sign-in" | null;
1268
1780
  changed_at: string | null;
1269
1781
  };
1270
- diskId?: string;
1782
+ source?: "env" | "console";
1271
1783
  region?: string;
1272
1784
  s3Url?: string;
1273
1785
  image?: string;
1274
1786
  };
1787
+ /** 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. */
1788
+ export type SaveComposioServerBody = {
1789
+ api_key: string;
1790
+ toolkit: string;
1791
+ tools: Array<string>;
1792
+ user_id?: string;
1793
+ };
1794
+ export type SaveComposioServerResponse = {
1795
+ server: {
1796
+ name: string;
1797
+ url: string;
1798
+ auth: {
1799
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1800
+ headers?: Array<string>;
1801
+ };
1802
+ credential: "sealed" | "unreadable" | "expired" | null;
1803
+ oauth?: {
1804
+ expires_at?: string;
1805
+ scopes: Array<string>;
1806
+ client_id?: string;
1807
+ client: "pre-registered" | "metadata-document" | "dynamic";
1808
+ };
1809
+ protocol: string;
1810
+ server_info: Record<string, unknown> | null;
1811
+ instructions?: string;
1812
+ tools: Array<{
1813
+ name: string;
1814
+ title?: string;
1815
+ description?: string;
1816
+ input_schema: Record<string, unknown>;
1817
+ output_schema?: Record<string, unknown>;
1818
+ annotations?: Record<string, unknown>;
1819
+ grantable?: false;
1820
+ reason?: string;
1821
+ permission?: "allow" | "ask" | "deny";
1822
+ default_permission?: "allow" | "ask" | "deny";
1823
+ permissions?: Array<"allow" | "ask" | "deny">;
1824
+ }>;
1825
+ prices?: Record<string, number>;
1826
+ not_metered?: Array<string>;
1827
+ listed_at: string;
1828
+ updated_at: string;
1829
+ secret?: SecretMeta;
1830
+ };
1831
+ connect_url?: string;
1832
+ not_served?: Array<string>;
1833
+ };
1275
1834
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
1276
1835
  export type SaveComputerKeysBody = Record<string, string | null>;
1277
1836
  export type SaveComputerKeysResponse = {
@@ -1286,7 +1845,11 @@ export type SaveComputerKeysResponse = {
1286
1845
  }>;
1287
1846
  required: Array<string>;
1288
1847
  ready: boolean;
1848
+ shell: "computer" | "local" | "none";
1849
+ host_tools: Array<string>;
1289
1850
  why?: string;
1851
+ picked?: Array<string>;
1852
+ shell_note?: string;
1290
1853
  gpu?: {
1291
1854
  types: Array<string>;
1292
1855
  max: number;
@@ -1305,6 +1868,9 @@ export type SaveComputerKeysResponse = {
1305
1868
  };
1306
1869
  network?: string;
1307
1870
  images?: Array<string>;
1871
+ persistent?: {
1872
+ images?: Array<string>;
1873
+ };
1308
1874
  };
1309
1875
  /** 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. */
1310
1876
  export type StartMcpOAuthBody = {
@@ -1324,7 +1890,7 @@ export type TestComputerResponse = {
1324
1890
  ok: false;
1325
1891
  why: string;
1326
1892
  };
1327
- /** Test the Archil disk with its saved account key (POST /workspace/archil/test). */
1893
+ /** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
1328
1894
  export type TestWorkspaceArchilResponse = {
1329
1895
  ok: true;
1330
1896
  detail: string;
@@ -1338,7 +1904,7 @@ export type GetMcpServerResponse = {
1338
1904
  name: string;
1339
1905
  url: string;
1340
1906
  auth: {
1341
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
1907
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1342
1908
  headers?: Array<string>;
1343
1909
  };
1344
1910
  credential: "sealed" | "unreadable" | "expired" | null;
@@ -1376,7 +1942,7 @@ export type ListMcpServersResponse = {
1376
1942
  name: string;
1377
1943
  url: string;
1378
1944
  auth: {
1379
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
1945
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1380
1946
  headers?: Array<string>;
1381
1947
  };
1382
1948
  credential: "sealed" | "unreadable" | "expired" | null;
@@ -1415,10 +1981,11 @@ export type McpOAuthClientResponse = Record<string, unknown>;
1415
1981
  export type PreviewMcpServerBody = {
1416
1982
  url: string;
1417
1983
  auth?: {
1418
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
1984
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1419
1985
  token?: string;
1420
1986
  headers?: Record<string, string>;
1421
1987
  };
1988
+ name?: string;
1422
1989
  } | {
1423
1990
  name: string;
1424
1991
  };
@@ -1453,7 +2020,7 @@ export type RefreshMcpServerResponse = {
1453
2020
  name: string;
1454
2021
  url: string;
1455
2022
  auth: {
1456
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
2023
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1457
2024
  headers?: Array<string>;
1458
2025
  };
1459
2026
  credential: "sealed" | "unreadable" | "expired" | null;
@@ -1490,7 +2057,7 @@ export type RefreshMcpServerResponse = {
1490
2057
  export type SaveMcpServerBody = {
1491
2058
  url: string;
1492
2059
  auth?: {
1493
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
2060
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1494
2061
  token?: string;
1495
2062
  headers?: Record<string, string>;
1496
2063
  };
@@ -1500,7 +2067,7 @@ export type SaveMcpServerResponse = {
1500
2067
  name: string;
1501
2068
  url: string;
1502
2069
  auth: {
1503
- type: "none" | "bearer" | "headers" | "oauth" | "github_app";
2070
+ type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
1504
2071
  headers?: Array<string>;
1505
2072
  };
1506
2073
  credential: "sealed" | "unreadable" | "expired" | null;
@@ -1559,6 +2126,29 @@ export type SetCurrentResponse = Agent;
1559
2126
  export type ArchiveRunResponse = Record<string, unknown>;
1560
2127
  /** End the run (POST /runs/{run_id}/cancel). */
1561
2128
  export type CancelRunResponse = CancelResult;
2129
+ /** Send a run's computer one protocol call (POST /runs/{run_id}/computer/call). */
2130
+ export type CallRunComputerBody = {
2131
+ method: "apps.install" | "apps.launch" | "apps.list" | "apps.terminate" | "deadline.extend" | "exec.run" | "files.list" | "files.mkdir" | "files.move" | "files.read" | "files.remove" | "files.stat" | "files.write" | "hello" | "input.actions" | "mount.sync" | "ping" | "process.list" | "process.read" | "process.resize" | "process.signal" | "process.start" | "process.wait" | "process.write" | "screen.read" | "screen.shot" | "screen.watch" | "tar.pull.begin" | "tar.pull.end" | "tar.pull.read" | "tar.push.begin" | "tar.push.end" | "tar.push.write" | "ui.act" | "ui.observe";
2132
+ params?: Record<string, unknown>;
2133
+ };
2134
+ export type CallRunComputerResponse = {
2135
+ ok: true;
2136
+ value: unknown;
2137
+ } | {
2138
+ ok: false;
2139
+ error: {
2140
+ code: string;
2141
+ message: string;
2142
+ [key: string]: unknown;
2143
+ };
2144
+ };
2145
+ /** Let a held run's computer go (POST /runs/{run_id}/computer/release). */
2146
+ export type ReleaseRunComputerBody = Record<string, never>;
2147
+ export type ReleaseRunComputerResponse = {
2148
+ held: {
2149
+ state: "released";
2150
+ };
2151
+ };
1562
2152
  /** Start a run of an agent another system owns, given inline (POST /runs). */
1563
2153
  export type CreateInlineRunBody = RunCreateInline;
1564
2154
  export interface CreateInlineRunParams {
@@ -1588,6 +2178,8 @@ export type GetRunGraphResponse = {
1588
2178
  startedAt?: string;
1589
2179
  endedAt?: string;
1590
2180
  branch?: string;
2181
+ model?: string;
2182
+ tier?: string;
1591
2183
  items?: Array<{
1592
2184
  index: number;
1593
2185
  status: "pending" | "working" | "done" | "failed" | "stopped" | "escalated" | "not_run" | "needs_review";
@@ -1653,7 +2245,7 @@ export type HandBackRunComputerResponse = {
1653
2245
  export type GetRunLearningResponse = {
1654
2246
  run: string;
1655
2247
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
1656
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | null;
2248
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
1657
2249
  detail: string | null;
1658
2250
  at: string;
1659
2251
  seed: string | null;
@@ -1788,6 +2380,13 @@ export interface CreateRunParams {
1788
2380
  "Idempotency-Key"?: string;
1789
2381
  }
1790
2382
  export type CreateRunResponse = Run;
2383
+ /** Start a held run's agent (POST /runs/{run_id}/start). */
2384
+ export type StartRunBody = Record<string, never>;
2385
+ export type StartRunResponse = {
2386
+ held: {
2387
+ state: "started";
2388
+ };
2389
+ };
1791
2390
  /** End the current turn (POST /runs/{run_id}/stop). */
1792
2391
  export type StopRunResponse = StopResult;
1793
2392
  /** Take over the run's desktop or phone (POST /runs/{run_id}/computer/take-over). */
@@ -1991,9 +2590,21 @@ export type ListTemplatesResponse = {
1991
2590
  } | null;
1992
2591
  effort: string | null;
1993
2592
  tools: Array<string> | null;
2593
+ checkout: "pull_request" | null;
1994
2594
  tool_policy: {
1995
2595
  bash: "read-only";
1996
2596
  } | null;
2597
+ computer: Array<"shell" | "none"> | null;
2598
+ computer_here: {
2599
+ entry: "shell" | "none" | null;
2600
+ computer: {
2601
+ kind: string;
2602
+ provider?: string;
2603
+ } | null;
2604
+ shell: string | null;
2605
+ dropped: Array<string>;
2606
+ note: string | null;
2607
+ } | null;
1997
2608
  mcp: Array<{
1998
2609
  server: string;
1999
2610
  required: boolean;
@@ -2108,6 +2719,9 @@ export type PutToolSettingsBody = {
2108
2719
  provider?: "auto" | "browserbase" | "kernel" | "chrome";
2109
2720
  permission?: "allow" | "deny";
2110
2721
  };
2722
+ subagent?: {
2723
+ permission?: "allow" | "deny";
2724
+ };
2111
2725
  pdf_pages?: {
2112
2726
  permission?: "allow" | "deny";
2113
2727
  };
@@ -2120,6 +2734,15 @@ export type PutToolSettingsBody = {
2120
2734
  phone?: {
2121
2735
  permission?: "allow" | "deny";
2122
2736
  };
2737
+ jev?: {
2738
+ permission?: "allow" | "deny";
2739
+ };
2740
+ parallel?: {
2741
+ permission?: "allow" | "deny";
2742
+ };
2743
+ openrouter?: {
2744
+ permission?: "allow" | "deny";
2745
+ };
2123
2746
  [key: string]: unknown;
2124
2747
  };
2125
2748
  export type PutToolSettingsResponse = {
@@ -2154,7 +2777,7 @@ export type CreateTriggerBody = {
2154
2777
  start_at?: string;
2155
2778
  } | {
2156
2779
  kind: "webhook";
2157
- signature?: "standard" | "github";
2780
+ signature?: "standard" | "github" | "composio";
2158
2781
  accept?: Array<{
2159
2782
  event: string;
2160
2783
  actions?: Array<string>;
@@ -2222,7 +2845,7 @@ export type CreateTriggerResponse = {
2222
2845
  start_at: string;
2223
2846
  } | {
2224
2847
  kind: "webhook";
2225
- signature?: "standard" | "github";
2848
+ signature?: "standard" | "github" | "composio";
2226
2849
  accept?: Array<{
2227
2850
  event: string;
2228
2851
  actions?: Array<string>;
@@ -2373,7 +2996,7 @@ export type GetTriggerResponse = {
2373
2996
  start_at: string;
2374
2997
  } | {
2375
2998
  kind: "webhook";
2376
- signature?: "standard" | "github";
2999
+ signature?: "standard" | "github" | "composio";
2377
3000
  accept?: Array<{
2378
3001
  event: string;
2379
3002
  actions?: Array<string>;
@@ -2481,7 +3104,7 @@ export type ListTriggersResponse = {
2481
3104
  start_at: string;
2482
3105
  } | {
2483
3106
  kind: "webhook";
2484
- signature?: "standard" | "github";
3107
+ signature?: "standard" | "github" | "composio";
2485
3108
  accept?: Array<{
2486
3109
  event: string;
2487
3110
  actions?: Array<string>;
@@ -2571,10 +3194,13 @@ export type ListTriggersResponse = {
2571
3194
  note?: string;
2572
3195
  }>;
2573
3196
  };
2574
- /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
3197
+ /** 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. */
3198
+ export type RotateTriggerSecretBody = {
3199
+ secret?: string;
3200
+ };
2575
3201
  export type RotateTriggerSecretResponse = {
2576
3202
  secret: SecretMeta;
2577
- signing_secret: string;
3203
+ signing_secret?: string;
2578
3204
  };
2579
3205
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
2580
3206
  export type UpdateTriggerBody = {
@@ -2593,7 +3219,7 @@ export type UpdateTriggerBody = {
2593
3219
  start_at?: string;
2594
3220
  } | {
2595
3221
  kind: "webhook";
2596
- signature?: "standard" | "github";
3222
+ signature?: "standard" | "github" | "composio";
2597
3223
  accept?: Array<{
2598
3224
  event: string;
2599
3225
  actions?: Array<string>;
@@ -2658,7 +3284,7 @@ export type UpdateTriggerResponse = {
2658
3284
  start_at: string;
2659
3285
  } | {
2660
3286
  kind: "webhook";
2661
- signature?: "standard" | "github";
3287
+ signature?: "standard" | "github" | "composio";
2662
3288
  accept?: Array<{
2663
3289
  event: string;
2664
3290
  actions?: Array<string>;
@@ -2744,6 +3370,8 @@ export type UpdateTriggerResponse = {
2744
3370
  catch_up?: true;
2745
3371
  } | null;
2746
3372
  hook_url?: string;
3373
+ secret?: SecretMeta;
3374
+ note?: string;
2747
3375
  };
2748
3376
  /** Usage by meter over a period (GET /usage). */
2749
3377
  export interface GetUsageParams {
@@ -2863,10 +3491,14 @@ export declare function resources(call: Call): {
2863
3491
  archive: (agentId: string, options?: RequestOptions) => Promise<ArchiveAgentResponse>;
2864
3492
  /** Create an agent home (POST /agents). */
2865
3493
  create: (body: CreateAgentBody, params?: CreateAgentParams, options?: RequestOptions) => Promise<CreateAgentResponse>;
3494
+ /** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
3495
+ deleteAgentArchil: (agentId: string, options?: RequestOptions) => Promise<DeleteAgentArchilResponse>;
2866
3496
  /** Forget one of the agent's saved sign-ins (DELETE /agents/{agent_id}/sign-ins/{key}). */
2867
3497
  forgetSignIn: (agentId: string, key: string, options?: RequestOptions) => Promise<ForgetSignInResponse>;
2868
3498
  /** One agent (GET /agents/{agent_id}). */
2869
3499
  get: (agentId: string, options?: RequestOptions) => Promise<Tagged<GetAgentResponse>>;
3500
+ /** The agent's own Archil disk, once its first run made it (GET /agents/{agent_id}/archil). */
3501
+ getAgentArchil: (agentId: string, options?: RequestOptions) => Promise<GetAgentArchilResponse>;
2870
3502
  /** List agents (GET /agents). */
2871
3503
  list: (params?: ListAgentsParams, options?: RequestOptions) => Promise<ListAgentsResponse>;
2872
3504
  /** The agent's runs index (GET /agents/{agent_id}/runs). */
@@ -2899,6 +3531,18 @@ export declare function resources(call: Call): {
2899
3531
  write: (agentId: string, path: string, body: RawBody, options?: BodyOptions) => Promise<WriteHomeFileResponse>;
2900
3532
  };
2901
3533
  learning: {
3534
+ /** A learning batch's progress: rows done, right or wrong, lessons, workflow revisions, cost, the path each run took (GET /agents/{agent_id}/learning/batches/{batch_id}). */
3535
+ batch: (agentId: string, batchId: string, options?: RequestOptions) => Promise<GetLearningBatchResponse>;
3536
+ /** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
3537
+ batchCancel: (agentId: string, batchId: string, options?: RequestOptions) => Promise<CancelLearningBatchResponse>;
3538
+ /** Learn from rows: run the agent on each in order, with learning on, and tell it the reference answer after each (POST /agents/{agent_id}/learning/batches). */
3539
+ batchStart: (agentId: string, body: CreateLearningBatchBody, options?: RequestOptions) => Promise<CreateLearningBatchResponse>;
3540
+ /** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
3541
+ batches: (agentId: string, options?: RequestOptions) => Promise<ListLearningBatchesResponse>;
3542
+ /** The agent's cost per run, run after run: its own cost, what learning added and the path it took (GET /agents/{agent_id}/learning/cost). */
3543
+ cost: (agentId: string, params?: GetLearningCostParams, options?: RequestOptions) => Promise<GetLearningCostResponse | string>;
3544
+ /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
3545
+ evals: (agentId: string, options?: RequestOptions) => Promise<ListLearningEvalsResponse>;
2902
3546
  /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
2903
3547
  get: (agentId: string, options?: RequestOptions) => Promise<GetAgentLearningResponse>;
2904
3548
  /** A page of the changes on the agent's main, newest first (GET /agents/{agent_id}/learning/log). */
@@ -2907,29 +3551,43 @@ export declare function resources(call: Call): {
2907
3551
  notes: (agentId: string, params?: ListLearningNotesParams, options?: RequestOptions) => Promise<ListLearningNotesResponse>;
2908
3552
  /** One note (or MEMORY.md, a skill's SKILL.md or a draft's file) on main, as text, with its ETag (GET /agents/{agent_id}/learning/files/{file}). */
2909
3553
  read: (agentId: string, file: string, options?: RequestOptions) => Promise<Tagged<ReadLearningFileResponse | string>>;
3554
+ /** 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). */
3555
+ recordEval: (agentId: string, body: RecordLearningEvalBody, params?: RecordLearningEvalParams, options?: RequestOptions) => Promise<RecordLearningEvalResponse>;
2910
3556
  /** 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). */
2911
3557
  retire: (agentId: string, file: string, params?: RetireLearningFileParams, options?: RequestOptions) => Promise<Tagged<string>>;
3558
+ /** 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). */
3559
+ workflowRevisions: (agentId: string, name: string, params?: ListLearnedWorkflowRevisionsParams, options?: RequestOptions) => Promise<ListLearnedWorkflowRevisionsResponse>;
2912
3560
  /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
2913
3561
  write: (agentId: string, file: string, body: WriteLearningFileBody | RawBody, params?: WriteLearningFileParams, options?: BodyOptions) => Promise<Tagged<string>>;
2914
3562
  };
2915
3563
  local: {
3564
+ /** A code that pairs a person's own computer with this server (POST /computers/pairings). */
3565
+ createPairing: (options?: RequestOptions) => Promise<CreatePairingResponse>;
3566
+ /** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
3567
+ deleteComputer: (computerId: string, options?: RequestOptions) => Promise<void>;
2916
3568
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
2917
3569
  deleteWorkspaceArchil: (options?: RequestOptions) => Promise<DeleteWorkspaceArchilResponse>;
2918
3570
  /** Disconnect GitHub: the App's credentials gone from this server, and every github trigger off (DELETE /integrations/github). */
2919
3571
  disconnectGitHub: (options?: RequestOptions) => Promise<DisconnectGitHubResponse>;
2920
3572
  /** Whether a GitHub App is connected, and if so its id, slug and installations, never a secret (GET /integrations/github). */
2921
3573
  getGitHubConnection: (options?: RequestOptions) => Promise<GetGitHubConnectionResponse>;
2922
- /** Whether run folders are on an Archil disk (Mode 2), its settings, and whether its keys are saved (GET /workspace/archil). */
3574
+ /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
2923
3575
  getWorkspaceArchil: (options?: RequestOptions) => Promise<GetWorkspaceArchilResponse>;
3576
+ /** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
3577
+ listComposioTools: (body: ListComposioToolsBody, options?: RequestOptions) => Promise<ListComposioToolsResponse>;
3578
+ /** The values a computer provider's picked keys offer, read from the vendor (GET /computers/{provider}/choices). */
3579
+ listComputerChoices: (provider: string, options?: RequestOptions) => Promise<ListComputerChoicesResponse>;
2924
3580
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
2925
3581
  listComputers: (options?: RequestOptions) => Promise<ListComputersResponse>;
2926
- /** Turn Mode 2 on: run folders on this Archil disk (PUT /workspace/archil). */
3582
+ /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
2927
3583
  putWorkspaceArchil: (body: PutWorkspaceArchilBody, options?: RequestOptions) => Promise<PutWorkspaceArchilResponse>;
3584
+ /** 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). */
3585
+ saveComposioServer: (name: string, body: SaveComposioServerBody, options?: RequestOptions) => Promise<SaveComposioServerResponse>;
2928
3586
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
2929
3587
  saveComputerKeys: (provider: string, body: SaveComputerKeysBody, options?: RequestOptions) => Promise<SaveComputerKeysResponse>;
2930
3588
  /** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
2931
3589
  testComputer: (provider: string, options?: RequestOptions) => Promise<TestComputerResponse>;
2932
- /** Test the Archil disk with its saved account key (POST /workspace/archil/test). */
3590
+ /** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
2933
3591
  testWorkspaceArchil: (options?: RequestOptions) => Promise<TestWorkspaceArchilResponse>;
2934
3592
  };
2935
3593
  mcpServers: {
@@ -2961,6 +3619,10 @@ export declare function resources(call: Call): {
2961
3619
  archive: (runId: string, options?: RequestOptions) => Promise<ArchiveRunResponse>;
2962
3620
  /** End the run (POST /runs/{run_id}/cancel). */
2963
3621
  cancel: (runId: string, options?: RequestOptions) => Promise<CancelRunResponse>;
3622
+ /** Send a run's computer one protocol call (POST /runs/{run_id}/computer/call). */
3623
+ computerCall: (runId: string, body: CallRunComputerBody, options?: RequestOptions) => Promise<CallRunComputerResponse>;
3624
+ /** Let a held run's computer go (POST /runs/{run_id}/computer/release). */
3625
+ computerRelease: (runId: string, body?: ReleaseRunComputerBody, options?: RequestOptions) => Promise<ReleaseRunComputerResponse>;
2964
3626
  /** Start a run of an agent another system owns, given inline (POST /runs). */
2965
3627
  createInlineRun: (body: CreateInlineRunBody, params?: CreateInlineRunParams, options?: RequestOptions) => Promise<CreateInlineRunResponse>;
2966
3628
  /** The files the run wrote (GET /runs/{run_id}/files). */
@@ -2989,6 +3651,8 @@ export declare function resources(call: Call): {
2989
3651
  resume: (runId: string, options?: RequestOptions) => Promise<ResumeRunResponse>;
2990
3652
  /** Start a run (POST /agents/{agent_id}/runs). */
2991
3653
  start: (agentId: string, body: CreateRunBody, params?: CreateRunParams, options?: RequestOptions) => Promise<CreateRunResponse>;
3654
+ /** Start a held run's agent (POST /runs/{run_id}/start). */
3655
+ startHeld: (runId: string, body?: StartRunBody, options?: RequestOptions) => Promise<StartRunResponse>;
2992
3656
  /** End the current turn (POST /runs/{run_id}/stop). */
2993
3657
  stop: (runId: string, options?: RequestOptions) => Promise<StopRunResponse>;
2994
3658
  /** Take over the run's desktop or phone (POST /runs/{run_id}/computer/take-over). */
@@ -3046,7 +3710,7 @@ export declare function resources(call: Call): {
3046
3710
  /** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
3047
3711
  list: (options?: RequestOptions) => Promise<ListTriggersResponse>;
3048
3712
  /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
3049
- rotateSecret: (triggerId: string, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
3713
+ rotateSecret: (triggerId: string, body?: RotateTriggerSecretBody, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
3050
3714
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
3051
3715
  update: (triggerId: string, body: UpdateTriggerBody, options?: RequestOptions) => Promise<UpdateTriggerResponse>;
3052
3716
  };