@parcha/agentrun-client 0.1.0-beta.36 → 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.
@@ -27,7 +27,7 @@ export type DefinitionInput = {
27
27
  mode: "runner";
28
28
  } | {
29
29
  mode: "sandbox";
30
- box: "bwrap" | "docker" | "modal" | "daytona";
30
+ box: "docker" | "modal" | "daytona";
31
31
  };
32
32
  computer?: {
33
33
  kind: "none" | "sandbox" | "desktop" | "phone" | "browser";
@@ -83,6 +83,15 @@ export type DefinitionInput = {
83
83
  phone?: {
84
84
  permission?: "allow" | "deny";
85
85
  };
86
+ jev?: {
87
+ permission?: "allow" | "deny";
88
+ };
89
+ parallel?: {
90
+ permission?: "allow" | "deny";
91
+ };
92
+ openrouter?: {
93
+ permission?: "allow" | "deny";
94
+ };
86
95
  [key: string]: unknown;
87
96
  };
88
97
  approvals?: "ask" | "never";
@@ -174,7 +183,7 @@ export type SecretMeta = {
174
183
  };
175
184
  export type InputIssue = {
176
185
  field: string;
177
- 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";
178
187
  expected?: string;
179
188
  message: string;
180
189
  fix?: string;
@@ -208,7 +217,7 @@ export type RunSummary = {
208
217
  error?: RunError | null;
209
218
  learning?: {
210
219
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
211
- 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;
212
221
  detail: string | null;
213
222
  given?: Array<{
214
223
  file: string;
@@ -371,9 +380,13 @@ export type RunCreateInline = {
371
380
  headers: Record<string, string>;
372
381
  }>;
373
382
  cap_mode?: "expected" | "strict";
383
+ learning?: "use";
384
+ repo?: string;
374
385
  archil_disk?: {
375
386
  disk_id: string;
376
387
  };
388
+ hold?: boolean;
389
+ hold_minutes?: number;
377
390
  };
378
391
  export type ExternalRef = {
379
392
  source: string;
@@ -413,17 +426,23 @@ export type Run = {
413
426
  mode: "runner";
414
427
  } | {
415
428
  mode: "sandbox";
416
- box: "bwrap" | "docker" | "modal" | "daytona";
429
+ box: "docker" | "modal" | "daytona";
417
430
  };
418
431
  computer?: {
419
432
  kind: "sandbox" | "desktop" | "phone" | "browser";
420
433
  provider: string;
421
434
  state: "starting" | "ready" | "taken_over" | "ended" | "failed";
422
435
  why?: string;
436
+ held?: {
437
+ state: "starting" | "waiting" | "started" | "ended" | "released";
438
+ minutes: number;
439
+ until?: string;
440
+ why?: "timeout" | "lost";
441
+ };
423
442
  };
424
443
  learning?: {
425
444
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
426
- 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;
427
446
  detail: string | null;
428
447
  at: string;
429
448
  given?: Array<{
@@ -547,9 +566,13 @@ export type RunCreate = {
547
566
  headers: Record<string, string>;
548
567
  }>;
549
568
  cap_mode?: "expected" | "strict";
569
+ learning?: "use";
570
+ repo?: string;
550
571
  archil_disk?: {
551
572
  disk_id: string;
552
573
  };
574
+ hold?: boolean;
575
+ hold_minutes?: number;
553
576
  };
554
577
  export type StopResult = {
555
578
  run_id: Id;
@@ -593,6 +616,7 @@ export type TimelineRow = {
593
616
  path?: string;
594
617
  usage?: TimelineUsage;
595
618
  paused?: true;
619
+ refused?: true;
596
620
  origin?: "server" | "trigger";
597
621
  trigger?: {
598
622
  id: string;
@@ -608,9 +632,23 @@ export type TimelineRow = {
608
632
  model?: string;
609
633
  tier?: string;
610
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;
611
649
  learning?: {
612
650
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
613
- 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;
614
652
  detail: string | null;
615
653
  };
616
654
  };
@@ -653,7 +691,7 @@ export type Capabilities = {
653
691
  places: {
654
692
  modes: Array<"runner" | "sandbox">;
655
693
  boxes: Array<{
656
- id: "bwrap" | "docker" | "modal" | "daytona";
694
+ id: "docker" | "modal" | "daytona";
657
695
  available: boolean;
658
696
  state: "ready" | "unavailable";
659
697
  reason?: string;
@@ -665,7 +703,7 @@ export type Capabilities = {
665
703
  mode: "runner";
666
704
  } | {
667
705
  mode: "sandbox";
668
- box: "bwrap" | "docker" | "modal" | "daytona";
706
+ box: "docker" | "modal" | "daytona";
669
707
  };
670
708
  default_reason?: string;
671
709
  allow: Array<string>;
@@ -673,6 +711,7 @@ export type Capabilities = {
673
711
  harnesses?: Array<{
674
712
  id: "pi" | "claude-agent" | "codex" | "opencode";
675
713
  available: boolean;
714
+ models: Array<string>;
676
715
  run_memory_mib: number;
677
716
  max_concurrent_runs: number;
678
717
  default_model: string | null;
@@ -835,7 +874,7 @@ export type Features = {
835
874
  failures_to_pause: number;
836
875
  webhook: {
837
876
  signing: "standard-webhooks/v1";
838
- signatures: Array<"standard" | "github">;
877
+ signatures: Array<"standard" | "github" | "composio">;
839
878
  tolerance_s: number;
840
879
  max_body_bytes: number;
841
880
  payload_kept_bytes: number;
@@ -1013,6 +1052,235 @@ export type WriteHomeFileResponse = {
1013
1052
  content_type?: string | null;
1014
1053
  unreadable?: true;
1015
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
+ };
1016
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). */
1017
1285
  export interface GetLearningCostParams {
1018
1286
  limit?: number;
@@ -1049,6 +1317,36 @@ export type GetLearningCostResponse = {
1049
1317
  times_cheaper: number | null;
1050
1318
  };
1051
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
+ };
1052
1350
  /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
1053
1351
  export type GetAgentLearningResponse = {
1054
1352
  agent: string;
@@ -1222,10 +1520,57 @@ export type ListLearningNotesResponse = {
1222
1520
  };
1223
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}). */
1224
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
+ };
1225
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). */
1226
1550
  export interface RetireLearningFileParams {
1227
1551
  "If-Match"?: string;
1228
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
+ };
1229
1574
  /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
1230
1575
  export type WriteLearningFileBody = {
1231
1576
  text: string;
@@ -1243,6 +1588,13 @@ export type ConnectGitHubResponse = {
1243
1588
  manifest: Record<string, unknown>;
1244
1589
  state: string;
1245
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}). */
1246
1598
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
1247
1599
  export type DeleteWorkspaceArchilResponse = {
1248
1600
  on: boolean;
@@ -1300,8 +1652,66 @@ export interface GitHubInstalledParams {
1300
1652
  setup_action?: string;
1301
1653
  state?: string;
1302
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
+ };
1303
1683
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
1304
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
+ }>;
1305
1715
  kinds: Array<{
1306
1716
  kind: "none" | "sandbox" | "desktop" | "phone" | "browser";
1307
1717
  offered: boolean;
@@ -1322,6 +1732,7 @@ export type ListComputersResponse = {
1322
1732
  shell: "computer" | "local" | "none";
1323
1733
  host_tools: Array<string>;
1324
1734
  why?: string;
1735
+ picked?: Array<string>;
1325
1736
  shell_note?: string;
1326
1737
  gpu?: {
1327
1738
  types: Array<string>;
@@ -1373,6 +1784,53 @@ export type PutWorkspaceArchilResponse = {
1373
1784
  s3Url?: string;
1374
1785
  image?: string;
1375
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
+ };
1376
1834
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
1377
1835
  export type SaveComputerKeysBody = Record<string, string | null>;
1378
1836
  export type SaveComputerKeysResponse = {
@@ -1390,6 +1848,7 @@ export type SaveComputerKeysResponse = {
1390
1848
  shell: "computer" | "local" | "none";
1391
1849
  host_tools: Array<string>;
1392
1850
  why?: string;
1851
+ picked?: Array<string>;
1393
1852
  shell_note?: string;
1394
1853
  gpu?: {
1395
1854
  types: Array<string>;
@@ -1526,6 +1985,7 @@ export type PreviewMcpServerBody = {
1526
1985
  token?: string;
1527
1986
  headers?: Record<string, string>;
1528
1987
  };
1988
+ name?: string;
1529
1989
  } | {
1530
1990
  name: string;
1531
1991
  };
@@ -1666,6 +2126,29 @@ export type SetCurrentResponse = Agent;
1666
2126
  export type ArchiveRunResponse = Record<string, unknown>;
1667
2127
  /** End the run (POST /runs/{run_id}/cancel). */
1668
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
+ };
1669
2152
  /** Start a run of an agent another system owns, given inline (POST /runs). */
1670
2153
  export type CreateInlineRunBody = RunCreateInline;
1671
2154
  export interface CreateInlineRunParams {
@@ -1762,7 +2245,7 @@ export type HandBackRunComputerResponse = {
1762
2245
  export type GetRunLearningResponse = {
1763
2246
  run: string;
1764
2247
  state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
1765
- 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;
1766
2249
  detail: string | null;
1767
2250
  at: string;
1768
2251
  seed: string | null;
@@ -1897,6 +2380,13 @@ export interface CreateRunParams {
1897
2380
  "Idempotency-Key"?: string;
1898
2381
  }
1899
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
+ };
1900
2390
  /** End the current turn (POST /runs/{run_id}/stop). */
1901
2391
  export type StopRunResponse = StopResult;
1902
2392
  /** Take over the run's desktop or phone (POST /runs/{run_id}/computer/take-over). */
@@ -2244,6 +2734,15 @@ export type PutToolSettingsBody = {
2244
2734
  phone?: {
2245
2735
  permission?: "allow" | "deny";
2246
2736
  };
2737
+ jev?: {
2738
+ permission?: "allow" | "deny";
2739
+ };
2740
+ parallel?: {
2741
+ permission?: "allow" | "deny";
2742
+ };
2743
+ openrouter?: {
2744
+ permission?: "allow" | "deny";
2745
+ };
2247
2746
  [key: string]: unknown;
2248
2747
  };
2249
2748
  export type PutToolSettingsResponse = {
@@ -2278,7 +2777,7 @@ export type CreateTriggerBody = {
2278
2777
  start_at?: string;
2279
2778
  } | {
2280
2779
  kind: "webhook";
2281
- signature?: "standard" | "github";
2780
+ signature?: "standard" | "github" | "composio";
2282
2781
  accept?: Array<{
2283
2782
  event: string;
2284
2783
  actions?: Array<string>;
@@ -2346,7 +2845,7 @@ export type CreateTriggerResponse = {
2346
2845
  start_at: string;
2347
2846
  } | {
2348
2847
  kind: "webhook";
2349
- signature?: "standard" | "github";
2848
+ signature?: "standard" | "github" | "composio";
2350
2849
  accept?: Array<{
2351
2850
  event: string;
2352
2851
  actions?: Array<string>;
@@ -2497,7 +2996,7 @@ export type GetTriggerResponse = {
2497
2996
  start_at: string;
2498
2997
  } | {
2499
2998
  kind: "webhook";
2500
- signature?: "standard" | "github";
2999
+ signature?: "standard" | "github" | "composio";
2501
3000
  accept?: Array<{
2502
3001
  event: string;
2503
3002
  actions?: Array<string>;
@@ -2605,7 +3104,7 @@ export type ListTriggersResponse = {
2605
3104
  start_at: string;
2606
3105
  } | {
2607
3106
  kind: "webhook";
2608
- signature?: "standard" | "github";
3107
+ signature?: "standard" | "github" | "composio";
2609
3108
  accept?: Array<{
2610
3109
  event: string;
2611
3110
  actions?: Array<string>;
@@ -2695,10 +3194,13 @@ export type ListTriggersResponse = {
2695
3194
  note?: string;
2696
3195
  }>;
2697
3196
  };
2698
- /** 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
+ };
2699
3201
  export type RotateTriggerSecretResponse = {
2700
3202
  secret: SecretMeta;
2701
- signing_secret: string;
3203
+ signing_secret?: string;
2702
3204
  };
2703
3205
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
2704
3206
  export type UpdateTriggerBody = {
@@ -2717,7 +3219,7 @@ export type UpdateTriggerBody = {
2717
3219
  start_at?: string;
2718
3220
  } | {
2719
3221
  kind: "webhook";
2720
- signature?: "standard" | "github";
3222
+ signature?: "standard" | "github" | "composio";
2721
3223
  accept?: Array<{
2722
3224
  event: string;
2723
3225
  actions?: Array<string>;
@@ -2782,7 +3284,7 @@ export type UpdateTriggerResponse = {
2782
3284
  start_at: string;
2783
3285
  } | {
2784
3286
  kind: "webhook";
2785
- signature?: "standard" | "github";
3287
+ signature?: "standard" | "github" | "composio";
2786
3288
  accept?: Array<{
2787
3289
  event: string;
2788
3290
  actions?: Array<string>;
@@ -2868,6 +3370,8 @@ export type UpdateTriggerResponse = {
2868
3370
  catch_up?: true;
2869
3371
  } | null;
2870
3372
  hook_url?: string;
3373
+ secret?: SecretMeta;
3374
+ note?: string;
2871
3375
  };
2872
3376
  /** Usage by meter over a period (GET /usage). */
2873
3377
  export interface GetUsageParams {
@@ -3027,8 +3531,18 @@ export declare function resources(call: Call): {
3027
3531
  write: (agentId: string, path: string, body: RawBody, options?: BodyOptions) => Promise<WriteHomeFileResponse>;
3028
3532
  };
3029
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>;
3030
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). */
3031
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>;
3032
3546
  /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
3033
3547
  get: (agentId: string, options?: RequestOptions) => Promise<GetAgentLearningResponse>;
3034
3548
  /** A page of the changes on the agent's main, newest first (GET /agents/{agent_id}/learning/log). */
@@ -3037,12 +3551,20 @@ export declare function resources(call: Call): {
3037
3551
  notes: (agentId: string, params?: ListLearningNotesParams, options?: RequestOptions) => Promise<ListLearningNotesResponse>;
3038
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}). */
3039
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>;
3040
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). */
3041
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>;
3042
3560
  /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
3043
3561
  write: (agentId: string, file: string, body: WriteLearningFileBody | RawBody, params?: WriteLearningFileParams, options?: BodyOptions) => Promise<Tagged<string>>;
3044
3562
  };
3045
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>;
3046
3568
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
3047
3569
  deleteWorkspaceArchil: (options?: RequestOptions) => Promise<DeleteWorkspaceArchilResponse>;
3048
3570
  /** Disconnect GitHub: the App's credentials gone from this server, and every github trigger off (DELETE /integrations/github). */
@@ -3051,10 +3573,16 @@ export declare function resources(call: Call): {
3051
3573
  getGitHubConnection: (options?: RequestOptions) => Promise<GetGitHubConnectionResponse>;
3052
3574
  /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
3053
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>;
3054
3580
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
3055
3581
  listComputers: (options?: RequestOptions) => Promise<ListComputersResponse>;
3056
3582
  /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
3057
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>;
3058
3586
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
3059
3587
  saveComputerKeys: (provider: string, body: SaveComputerKeysBody, options?: RequestOptions) => Promise<SaveComputerKeysResponse>;
3060
3588
  /** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
@@ -3091,6 +3619,10 @@ export declare function resources(call: Call): {
3091
3619
  archive: (runId: string, options?: RequestOptions) => Promise<ArchiveRunResponse>;
3092
3620
  /** End the run (POST /runs/{run_id}/cancel). */
3093
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>;
3094
3626
  /** Start a run of an agent another system owns, given inline (POST /runs). */
3095
3627
  createInlineRun: (body: CreateInlineRunBody, params?: CreateInlineRunParams, options?: RequestOptions) => Promise<CreateInlineRunResponse>;
3096
3628
  /** The files the run wrote (GET /runs/{run_id}/files). */
@@ -3119,6 +3651,8 @@ export declare function resources(call: Call): {
3119
3651
  resume: (runId: string, options?: RequestOptions) => Promise<ResumeRunResponse>;
3120
3652
  /** Start a run (POST /agents/{agent_id}/runs). */
3121
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>;
3122
3656
  /** End the current turn (POST /runs/{run_id}/stop). */
3123
3657
  stop: (runId: string, options?: RequestOptions) => Promise<StopRunResponse>;
3124
3658
  /** Take over the run's desktop or phone (POST /runs/{run_id}/computer/take-over). */
@@ -3176,7 +3710,7 @@ export declare function resources(call: Call): {
3176
3710
  /** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
3177
3711
  list: (options?: RequestOptions) => Promise<ListTriggersResponse>;
3178
3712
  /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
3179
- rotateSecret: (triggerId: string, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
3713
+ rotateSecret: (triggerId: string, body?: RotateTriggerSecretBody, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
3180
3714
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
3181
3715
  update: (triggerId: string, body: UpdateTriggerBody, options?: RequestOptions) => Promise<UpdateTriggerResponse>;
3182
3716
  };
@@ -19,22 +19,34 @@ export const OPERATIONS = {
19
19
  listHomeFiles: { "method": "GET", "path": "/agents/{agent_id}/home/files", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
20
20
  readHomeFile: { "method": "GET", "path": "/agents/{agent_id}/home/files/{path}", "pathParams": ["agent_id", "path"], "multiSegment": ["path"], "query": ["download"], "headers": [], "body": null, "answer": "bytes", "secret": false, "publicFields": [], "tagged": false },
21
21
  writeHomeFile: { "method": "PUT", "path": "/agents/{agent_id}/home/files/{path}", "pathParams": ["agent_id", "path"], "multiSegment": ["path"], "query": [], "headers": [], "body": { "required": true, "types": ["application/octet-stream", "*/*"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
22
+ getLearningBatch: { "method": "GET", "path": "/agents/{agent_id}/learning/batches/{batch_id}", "pathParams": ["agent_id", "batch_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
23
+ cancelLearningBatch: { "method": "POST", "path": "/agents/{agent_id}/learning/batches/{batch_id}/cancel", "pathParams": ["agent_id", "batch_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
24
+ createLearningBatch: { "method": "POST", "path": "/agents/{agent_id}/learning/batches", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
25
+ listLearningBatches: { "method": "GET", "path": "/agents/{agent_id}/learning/batches", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
22
26
  getLearningCost: { "method": "GET", "path": "/agents/{agent_id}/learning/cost", "pathParams": ["agent_id"], "multiSegment": [], "query": ["limit", "format"], "headers": [], "body": null, "answer": "json+text", "secret": false, "publicFields": [], "tagged": false },
27
+ listLearningEvals: { "method": "GET", "path": "/agents/{agent_id}/learning/evals", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
23
28
  getAgentLearning: { "method": "GET", "path": "/agents/{agent_id}/learning", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
24
29
  listLearningLog: { "method": "GET", "path": "/agents/{agent_id}/learning/log", "pathParams": ["agent_id"], "multiSegment": [], "query": ["cursor", "limit"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
25
30
  listLearningNotes: { "method": "GET", "path": "/agents/{agent_id}/learning/notes", "pathParams": ["agent_id"], "multiSegment": [], "query": ["cursor", "limit", "status"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
26
31
  readLearningFile: { "method": "GET", "path": "/agents/{agent_id}/learning/files/{file}", "pathParams": ["agent_id", "file"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json+text", "secret": false, "publicFields": [], "tagged": true },
32
+ recordLearningEval: { "method": "POST", "path": "/agents/{agent_id}/learning/evals", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
27
33
  retireLearningFile: { "method": "POST", "path": "/agents/{agent_id}/learning/files/{file}/retire", "pathParams": ["agent_id", "file"], "multiSegment": [], "query": [], "headers": ["If-Match"], "body": null, "answer": "text", "secret": false, "publicFields": [], "tagged": true },
34
+ listLearnedWorkflowRevisions: { "method": "GET", "path": "/agents/{agent_id}/learning/workflows/{name}/revisions", "pathParams": ["agent_id", "name"], "multiSegment": [], "query": ["limit"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
28
35
  writeLearningFile: { "method": "PUT", "path": "/agents/{agent_id}/learning/files/{file}", "pathParams": ["agent_id", "file"], "multiSegment": [], "query": [], "headers": ["If-Match", "If-None-Match"], "body": { "required": true, "types": ["text/markdown", "text/plain", "application/json"] }, "answer": "text", "secret": false, "publicFields": [], "tagged": true },
29
36
  connectGitHub: { "method": "POST", "path": "/integrations/github/connect", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
37
+ createPairing: { "method": "POST", "path": "/computers/pairings", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
38
+ deleteComputer: { "method": "DELETE", "path": "/computers/{computer_id}", "pathParams": ["computer_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
30
39
  deleteWorkspaceArchil: { "method": "DELETE", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
31
40
  disconnectGitHub: { "method": "DELETE", "path": "/integrations/github", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
32
41
  getGitHubConnection: { "method": "GET", "path": "/integrations/github", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
33
42
  getWorkspaceArchil: { "method": "GET", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
34
43
  gitHubCallback: { "method": "GET", "path": "/integrations/github/callback", "pathParams": [], "multiSegment": [], "query": ["code", "state"], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
35
44
  gitHubInstalled: { "method": "GET", "path": "/integrations/github/installed", "pathParams": [], "multiSegment": [], "query": ["installation_id", "setup_action", "state"], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
45
+ listComposioTools: { "method": "POST", "path": "/settings/mcp-servers/composio/tools", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["toolkit"], "tagged": false },
46
+ listComputerChoices: { "method": "GET", "path": "/computers/{provider}/choices", "pathParams": ["provider"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
36
47
  listComputers: { "method": "GET", "path": "/computers", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
37
48
  putWorkspaceArchil: { "method": "PUT", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
49
+ saveComposioServer: { "method": "PUT", "path": "/settings/mcp-servers/{name}/composio", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["toolkit", "tools.[]", "user_id"], "tagged": false },
38
50
  saveComputerKeys: { "method": "PUT", "path": "/computers/{provider}/keys", "pathParams": ["provider"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
39
51
  startMcpOAuth: { "method": "POST", "path": "/settings/mcp-servers/{name}/oauth/start", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["url", "scopes.[]", "client_id"], "tagged": false },
40
52
  testComputer: { "method": "POST", "path": "/computers/{provider}/test", "pathParams": ["provider"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
@@ -51,6 +63,8 @@ export const OPERATIONS = {
51
63
  setCurrent: { "method": "POST", "path": "/agents/{agent_id}/current", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
52
64
  archiveRun: { "method": "POST", "path": "/runs/{run_id}/archive", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
53
65
  cancelRun: { "method": "POST", "path": "/runs/{run_id}/cancel", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
66
+ callRunComputer: { "method": "POST", "path": "/runs/{run_id}/computer/call", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
67
+ releaseRunComputer: { "method": "POST", "path": "/runs/{run_id}/computer/release", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
54
68
  createInlineRun: { "method": "POST", "path": "/runs", "pathParams": [], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
55
69
  listRunFiles: { "method": "GET", "path": "/runs/{run_id}/files", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
56
70
  getRun: { "method": "GET", "path": "/runs/{run_id}", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
@@ -65,6 +79,7 @@ export const OPERATIONS = {
65
79
  readRunFile: { "method": "GET", "path": "/runs/{run_id}/files/{path}", "pathParams": ["run_id", "path"], "multiSegment": ["path"], "query": ["download"], "headers": ["Range"], "body": null, "answer": "bytes", "secret": false, "publicFields": [], "tagged": false },
66
80
  resumeRun: { "method": "POST", "path": "/runs/{run_id}/resume", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
67
81
  createRun: { "method": "POST", "path": "/agents/{agent_id}/runs", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
82
+ startRun: { "method": "POST", "path": "/runs/{run_id}/start", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
68
83
  stopRun: { "method": "POST", "path": "/runs/{run_id}/stop", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
69
84
  takeOverRunComputer: { "method": "POST", "path": "/runs/{run_id}/computer/take-over", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
70
85
  getTimeline: { "method": "GET", "path": "/runs/{run_id}/timeline", "pathParams": ["run_id"], "multiSegment": [], "query": ["after", "wait_ms", "limit"], "headers": ["Last-Event-ID"], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
@@ -87,7 +102,7 @@ export const OPERATIONS = {
87
102
  listTriggerFirings: { "method": "GET", "path": "/triggers/{trigger_id}/firings", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
88
103
  getTrigger: { "method": "GET", "path": "/triggers/{trigger_id}", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
89
104
  listTriggers: { "method": "GET", "path": "/triggers", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
90
- rotateTriggerSecret: { "method": "POST", "path": "/triggers/{trigger_id}/secret", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
105
+ rotateTriggerSecret: { "method": "POST", "path": "/triggers/{trigger_id}/secret", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": [], "tagged": false },
91
106
  updateTrigger: { "method": "PATCH", "path": "/triggers/{trigger_id}", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
92
107
  getUsage: { "method": "GET", "path": "/usage", "pathParams": [], "multiSegment": [], "query": ["from", "to", "group_by"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
93
108
  deleteWebhook: { "method": "DELETE", "path": "/settings/webhook", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
@@ -146,8 +161,18 @@ export function resources(call) {
146
161
  write: (agentId, path, body, options) => call("writeHomeFile", [agentId, path], body, undefined, options),
147
162
  },
148
163
  learning: {
164
+ /** 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}). */
165
+ batch: (agentId, batchId, options) => call("getLearningBatch", [agentId, batchId], undefined, undefined, options),
166
+ /** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
167
+ batchCancel: (agentId, batchId, options) => call("cancelLearningBatch", [agentId, batchId], undefined, undefined, options),
168
+ /** 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). */
169
+ batchStart: (agentId, body, options) => call("createLearningBatch", [agentId], body, undefined, options),
170
+ /** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
171
+ batches: (agentId, options) => call("listLearningBatches", [agentId], undefined, undefined, options),
149
172
  /** 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). */
150
173
  cost: (agentId, params, options) => call("getLearningCost", [agentId], undefined, params, options),
174
+ /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
175
+ evals: (agentId, options) => call("listLearningEvals", [agentId], undefined, undefined, options),
151
176
  /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
152
177
  get: (agentId, options) => call("getAgentLearning", [agentId], undefined, undefined, options),
153
178
  /** A page of the changes on the agent's main, newest first (GET /agents/{agent_id}/learning/log). */
@@ -156,12 +181,20 @@ export function resources(call) {
156
181
  notes: (agentId, params, options) => call("listLearningNotes", [agentId], undefined, params, options),
157
182
  /** 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}). */
158
183
  read: (agentId, file, options) => call("readLearningFile", [agentId, file], undefined, undefined, options),
184
+ /** 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). */
185
+ recordEval: (agentId, body, params, options) => call("recordLearningEval", [agentId], body, params, options),
159
186
  /** 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). */
160
187
  retire: (agentId, file, params, options) => call("retireLearningFile", [agentId, file], undefined, params, options),
188
+ /** 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). */
189
+ workflowRevisions: (agentId, name, params, options) => call("listLearnedWorkflowRevisions", [agentId, name], undefined, params, options),
161
190
  /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
162
191
  write: (agentId, file, body, params, options) => call("writeLearningFile", [agentId, file], body, params, options),
163
192
  },
164
193
  local: {
194
+ /** A code that pairs a person's own computer with this server (POST /computers/pairings). */
195
+ createPairing: (options) => call("createPairing", [], undefined, undefined, options),
196
+ /** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
197
+ deleteComputer: (computerId, options) => call("deleteComputer", [computerId], undefined, undefined, options),
165
198
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
166
199
  deleteWorkspaceArchil: (options) => call("deleteWorkspaceArchil", [], undefined, undefined, options),
167
200
  /** Disconnect GitHub: the App's credentials gone from this server, and every github trigger off (DELETE /integrations/github). */
@@ -170,10 +203,16 @@ export function resources(call) {
170
203
  getGitHubConnection: (options) => call("getGitHubConnection", [], undefined, undefined, options),
171
204
  /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
172
205
  getWorkspaceArchil: (options) => call("getWorkspaceArchil", [], undefined, undefined, options),
206
+ /** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
207
+ listComposioTools: (body, options) => call("listComposioTools", [], body, undefined, options),
208
+ /** The values a computer provider's picked keys offer, read from the vendor (GET /computers/{provider}/choices). */
209
+ listComputerChoices: (provider, options) => call("listComputerChoices", [provider], undefined, undefined, options),
173
210
  /** Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved (GET /computers). */
174
211
  listComputers: (options) => call("listComputers", [], undefined, undefined, options),
175
212
  /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
176
213
  putWorkspaceArchil: (body, options) => call("putWorkspaceArchil", [], body, undefined, options),
214
+ /** 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). */
215
+ saveComposioServer: (name, body, options) => call("saveComposioServer", [name], body, undefined, options),
177
216
  /** Save a computer provider's keys, sealed (PUT /computers/{provider}/keys). */
178
217
  saveComputerKeys: (provider, body, options) => call("saveComputerKeys", [provider], body, undefined, options),
179
218
  /** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
@@ -210,6 +249,10 @@ export function resources(call) {
210
249
  archive: (runId, options) => call("archiveRun", [runId], undefined, undefined, options),
211
250
  /** End the run (POST /runs/{run_id}/cancel). */
212
251
  cancel: (runId, options) => call("cancelRun", [runId], undefined, undefined, options),
252
+ /** Send a run's computer one protocol call (POST /runs/{run_id}/computer/call). */
253
+ computerCall: (runId, body, options) => call("callRunComputer", [runId], body, undefined, options),
254
+ /** Let a held run's computer go (POST /runs/{run_id}/computer/release). */
255
+ computerRelease: (runId, body, options) => call("releaseRunComputer", [runId], body, undefined, options),
213
256
  /** Start a run of an agent another system owns, given inline (POST /runs). */
214
257
  createInlineRun: (body, params, options) => call("createInlineRun", [], body, params, options),
215
258
  /** The files the run wrote (GET /runs/{run_id}/files). */
@@ -238,6 +281,8 @@ export function resources(call) {
238
281
  resume: (runId, options) => call("resumeRun", [runId], undefined, undefined, options),
239
282
  /** Start a run (POST /agents/{agent_id}/runs). */
240
283
  start: (agentId, body, params, options) => call("createRun", [agentId], body, params, options),
284
+ /** Start a held run's agent (POST /runs/{run_id}/start). */
285
+ startHeld: (runId, body, options) => call("startRun", [runId], body, undefined, options),
241
286
  /** End the current turn (POST /runs/{run_id}/stop). */
242
287
  stop: (runId, options) => call("stopRun", [runId], undefined, undefined, options),
243
288
  /** Take over the run's desktop or phone (POST /runs/{run_id}/computer/take-over). */
@@ -295,7 +340,7 @@ export function resources(call) {
295
340
  /** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
296
341
  list: (options) => call("listTriggers", [], undefined, undefined, options),
297
342
  /** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
298
- rotateSecret: (triggerId, options) => call("rotateTriggerSecret", [triggerId], undefined, undefined, options),
343
+ rotateSecret: (triggerId, body, options) => call("rotateTriggerSecret", [triggerId], body, undefined, options),
299
344
  /** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
300
345
  update: (triggerId, body, options) => call("updateTrigger", [triggerId], body, undefined, options),
301
346
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-client",
3
- "version": "0.1.0-beta.36",
3
+ "version": "0.1.0-beta.37",
4
4
  "description": "A typed TypeScript client for a self-hosted AgentRun server: a method per operation of its API, typed from its OpenAPI document, with waiting for a run and following its timeline. No dependencies; fetch only.",
5
5
  "keywords": [
6
6
  "agentrun",