@parcha/agentrun-client 0.1.0-beta.43 → 0.1.0-beta.45

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.
@@ -34,8 +34,7 @@ export type Agent = {
34
34
  issues: Array<string>;
35
35
  capabilities: {
36
36
  launch: boolean;
37
- notes: boolean;
38
- skills: boolean;
37
+ learning: boolean;
39
38
  workflows: false;
40
39
  approval: "native" | "unavailable";
41
40
  usage: boolean;
@@ -138,8 +137,7 @@ export type DefinitionInput = {
138
137
  issues: Array<string>;
139
138
  capabilities: {
140
139
  launch: boolean;
141
- notes: boolean;
142
- skills: boolean;
140
+ learning: boolean;
143
141
  workflows: false;
144
142
  approval: "native" | "unavailable";
145
143
  usage: boolean;
@@ -157,7 +155,7 @@ export type DefinitionInput = {
157
155
  strong?: string;
158
156
  };
159
157
  thinking?: "low" | "medium" | "high" | "xhigh" | "max";
160
- harness?: "pi" | "claude-agent" | "codex" | "opencode";
158
+ harness?: string;
161
159
  place?: {
162
160
  mode: "runner";
163
161
  } | {
@@ -254,7 +252,7 @@ export type DefinitionInput = {
254
252
  [key: string]: unknown;
255
253
  };
256
254
  approvals?: "ask" | "never";
257
- learning?: true | false | "notes" | {
255
+ learning?: boolean | {
258
256
  compile_after?: number;
259
257
  agree_min?: number;
260
258
  alone_min?: number;
@@ -378,36 +376,14 @@ export type RunSummary = {
378
376
  effort?: Effort;
379
377
  error?: RunError | null;
380
378
  learning?: {
381
- state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
382
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
379
+ state: "seeded" | "reflecting" | "merged" | "dropped";
380
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
383
381
  detail: string | null;
384
- given?: Array<{
385
- file: string;
386
- name: string;
387
- }>;
388
- read?: Array<{
389
- file: string;
390
- name: string;
391
- }>;
392
- learned?: Array<{
393
- file: string;
394
- name: string;
395
- supersedes: Array<string>;
396
- }>;
397
- skills?: Array<{
398
- file: string;
399
- name: string;
400
- pending?: true;
401
- }>;
402
382
  workflows?: Array<{
403
383
  file: string;
404
384
  name: string;
405
385
  pending?: true;
406
386
  }>;
407
- pending?: Array<{
408
- file: string;
409
- name: string;
410
- }>;
411
387
  } | null;
412
388
  review?: {
413
389
  kind: string | null;
@@ -476,9 +452,12 @@ export type Cost = {
476
452
  so_far_usd?: number;
477
453
  unpriced?: number;
478
454
  upper_bound?: true;
455
+ learning_usd?: number | null;
456
+ all_in_usd?: number | null;
479
457
  plan?: {
480
458
  requests: number;
481
459
  tokens: number;
460
+ on: "chatgpt" | "claude_code";
482
461
  };
483
462
  };
484
463
  export type Effort = "low" | "medium" | "high";
@@ -547,6 +526,7 @@ export type RunCreateInline = {
547
526
  effort?: Effort;
548
527
  max_cost_usd?: number;
549
528
  quote_id?: string;
529
+ model_key?: string;
550
530
  mcp_auth?: Record<string, {
551
531
  headers: Record<string, string>;
552
532
  }>;
@@ -665,37 +645,15 @@ export type Run = {
665
645
  };
666
646
  };
667
647
  learning?: {
668
- state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
669
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
648
+ state: "seeded" | "reflecting" | "merged" | "dropped";
649
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
670
650
  detail: string | null;
671
651
  at: string;
672
- given?: Array<{
673
- file: string;
674
- name: string;
675
- }>;
676
- read?: Array<{
677
- file: string;
678
- name: string;
679
- }>;
680
- learned?: Array<{
681
- file: string;
682
- name: string;
683
- supersedes: Array<string>;
684
- }>;
685
- skills?: Array<{
686
- file: string;
687
- name: string;
688
- pending?: true;
689
- }>;
690
652
  workflows?: Array<{
691
653
  file: string;
692
654
  name: string;
693
655
  pending?: true;
694
656
  }>;
695
- pending?: Array<{
696
- file: string;
697
- name: string;
698
- }>;
699
657
  } | null;
700
658
  review?: {
701
659
  kind: string | null;
@@ -753,6 +711,7 @@ export type Run = {
753
711
  firing_key: string;
754
712
  } | null;
755
713
  audit_of?: string | null;
714
+ path?: "agent" | "handed_back" | "workflow" | "replay" | "audit" | null;
756
715
  };
757
716
  export type RunResult = {
758
717
  output: unknown;
@@ -774,6 +733,7 @@ export type RunFile = {
774
733
  };
775
734
  export type MessageCreate = {
776
735
  content: string;
736
+ model_key?: string;
777
737
  mcp_auth?: Record<string, {
778
738
  headers: Record<string, string>;
779
739
  }>;
@@ -792,6 +752,7 @@ export type RunCreate = {
792
752
  effort?: Effort;
793
753
  max_cost_usd?: number;
794
754
  quote_id?: string;
755
+ model_key?: string;
795
756
  mcp_auth?: Record<string, {
796
757
  headers: Record<string, string>;
797
758
  }>;
@@ -888,8 +849,8 @@ export type TimelineRow = {
888
849
  tool_input?: Record<string, unknown>;
889
850
  tool_result_text?: string | null;
890
851
  learning?: {
891
- state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
892
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
852
+ state: "seeded" | "reflecting" | "merged" | "dropped";
853
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
893
854
  detail: string | null;
894
855
  };
895
856
  };
@@ -926,7 +887,6 @@ export type Capabilities = {
926
887
  regions: Array<Region>;
927
888
  limits: Limits;
928
889
  learning: {
929
- grade_model: string | null;
930
890
  pending: true;
931
891
  approve: boolean;
932
892
  approve_needs?: "password";
@@ -952,7 +912,13 @@ export type Capabilities = {
952
912
  allow: Array<string>;
953
913
  };
954
914
  harnesses?: Array<{
955
- id: "pi" | "claude-agent" | "codex" | "opencode";
915
+ id: string;
916
+ label: string;
917
+ promises: {
918
+ resume: "exact" | "load" | "restart";
919
+ tool_gate: "every_call" | "permission" | "config";
920
+ billing: "proxy" | "plan";
921
+ };
956
922
  available: boolean;
957
923
  free_models: Array<{
958
924
  id: string;
@@ -979,7 +945,7 @@ export type Capabilities = {
979
945
  available: boolean;
980
946
  reason?: string;
981
947
  missing?: Array<string>;
982
- harnesses: Array<"pi" | "claude-agent" | "codex" | "opencode">;
948
+ harnesses: Array<string>;
983
949
  providers?: Array<string>;
984
950
  provider?: string;
985
951
  default_provider?: string;
@@ -999,7 +965,7 @@ export type Capabilities = {
999
965
  default_permission: "allow" | "ask" | "deny";
1000
966
  permissions: Array<"allow" | "ask" | "deny">;
1001
967
  ask_needs?: "password";
1002
- key?: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "openrouter";
968
+ key?: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "particle" | "openrouter";
1003
969
  }>;
1004
970
  workflows?: {
1005
971
  nodes: Array<string>;
@@ -1030,6 +996,7 @@ export type Capabilities = {
1030
996
  condition: string;
1031
997
  limit: string;
1032
998
  };
999
+ run_isolation?: "uid" | "process";
1033
1000
  };
1034
1001
  export type Features = {
1035
1002
  agents: {
@@ -1214,8 +1181,7 @@ export type ConnectNativeResponse = {
1214
1181
  issues: Array<string>;
1215
1182
  capabilities: {
1216
1183
  launch: boolean;
1217
- notes: boolean;
1218
- skills: boolean;
1184
+ learning: boolean;
1219
1185
  workflows: false;
1220
1186
  approval: "native" | "unavailable";
1221
1187
  usage: boolean;
@@ -1234,6 +1200,7 @@ export interface CreateAgentParams {
1234
1200
  "Idempotency-Key"?: string;
1235
1201
  }
1236
1202
  export type CreateAgentResponse = Agent;
1203
+ /** Delete an agent another system owns (DELETE /agents/{agent_id}). */
1237
1204
  /** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
1238
1205
  export type DeleteAgentArchilResponse = {
1239
1206
  on: boolean;
@@ -1267,8 +1234,7 @@ export type DisconnectNativeResponse = {
1267
1234
  issues: Array<string>;
1268
1235
  capabilities: {
1269
1236
  launch: boolean;
1270
- notes: boolean;
1271
- skills: boolean;
1237
+ learning: boolean;
1272
1238
  workflows: false;
1273
1239
  approval: "native" | "unavailable";
1274
1240
  usage: boolean;
@@ -1309,8 +1275,7 @@ export type DiscoverNativeResponse = {
1309
1275
  issues: Array<string>;
1310
1276
  capabilities: {
1311
1277
  launch: boolean;
1312
- notes: boolean;
1313
- skills: boolean;
1278
+ learning: boolean;
1314
1279
  workflows: false;
1315
1280
  approval: "native" | "unavailable";
1316
1281
  usage: boolean;
@@ -1357,7 +1322,6 @@ export type GetLearningLoopResponse = {
1357
1322
  round: number;
1358
1323
  at: string;
1359
1324
  workflow: string | null;
1360
- from_notes: Array<string>;
1361
1325
  attempts: Array<{
1362
1326
  ok: boolean;
1363
1327
  errors: Array<string>;
@@ -1391,8 +1355,7 @@ export type GetNativeResponse = {
1391
1355
  issues: Array<string>;
1392
1356
  capabilities: {
1393
1357
  launch: boolean;
1394
- notes: boolean;
1395
- skills: boolean;
1358
+ learning: boolean;
1396
1359
  workflows: false;
1397
1360
  approval: "native" | "unavailable";
1398
1361
  usage: boolean;
@@ -1510,6 +1473,52 @@ export type ListLearningPromotionsResponse = {
1510
1473
  } | null;
1511
1474
  audits_off: string | null;
1512
1475
  not_auditable: number;
1476
+ champion: {
1477
+ digest: string;
1478
+ commit: string | null;
1479
+ nodes: Array<{
1480
+ path: string;
1481
+ kind: string;
1482
+ label: string;
1483
+ tier: "fast" | "agent" | null;
1484
+ checks: Array<{
1485
+ on: "when" | "until";
1486
+ predicate: Record<string, unknown>;
1487
+ }>;
1488
+ }> | null;
1489
+ check: {
1490
+ compile_after: number;
1491
+ agree_min: number;
1492
+ alone_min: number;
1493
+ attempt: 1 | 2;
1494
+ n?: number;
1495
+ agreed?: number;
1496
+ alone?: number;
1497
+ of?: Array<string>;
1498
+ cost_usd?: number | null;
1499
+ outcomes?: {
1500
+ answered: number;
1501
+ handed_back: number;
1502
+ failed: number;
1503
+ skipped_write: number;
1504
+ };
1505
+ unstarted?: number;
1506
+ skipped_tools?: Array<{
1507
+ tool: string;
1508
+ inputs: number;
1509
+ no_read_only_hint: boolean;
1510
+ }>;
1511
+ disagreements?: Array<{
1512
+ run: string;
1513
+ input: string;
1514
+ agent: string | null;
1515
+ draft?: string;
1516
+ escalated?: string;
1517
+ failed?: true;
1518
+ }>;
1519
+ stopped?: true;
1520
+ } | null;
1521
+ } | null;
1513
1522
  }>;
1514
1523
  };
1515
1524
  /** The agent's runs index (GET /agents/{agent_id}/runs). */
@@ -1551,8 +1560,7 @@ export type VerifyNativeResponse = {
1551
1560
  issues: Array<string>;
1552
1561
  capabilities: {
1553
1562
  launch: boolean;
1554
- notes: boolean;
1555
- skills: boolean;
1563
+ learning: boolean;
1556
1564
  workflows: false;
1557
1565
  approval: "native" | "unavailable";
1558
1566
  usage: boolean;
@@ -1626,8 +1634,7 @@ export type ImportRemoteTargetBody = {
1626
1634
  issues: Array<string>;
1627
1635
  capabilities: {
1628
1636
  launch: boolean;
1629
- notes: boolean;
1630
- skills: boolean;
1637
+ learning: boolean;
1631
1638
  workflows: false;
1632
1639
  approval: "native" | "unavailable";
1633
1640
  usage: boolean;
@@ -1664,8 +1671,7 @@ export type ImportRemoteTargetResponse = {
1664
1671
  issues: Array<string>;
1665
1672
  capabilities: {
1666
1673
  launch: boolean;
1667
- notes: boolean;
1668
- skills: boolean;
1674
+ learning: boolean;
1669
1675
  workflows: false;
1670
1676
  approval: "native" | "unavailable";
1671
1677
  usage: boolean;
@@ -1815,234 +1821,11 @@ export type WriteHomeFileResponse = {
1815
1821
  content_type?: string | null;
1816
1822
  unreadable?: true;
1817
1823
  };
1818
- /** 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}). */
1819
- export type GetLearningBatchResponse = {
1820
- id: string;
1821
- agent_id: string;
1822
- created_at: string;
1823
- ended_at: string | null;
1824
- status: "running" | "completed" | "cancelled" | "stopped";
1825
- stopped: "cap" | "cost_unknown" | "learning_off" | null;
1826
- inputs: Array<string>;
1827
- answer: string;
1828
- answer_field: string | null;
1829
- effort: string | null;
1830
- max_cost_usd: number;
1831
- total: number;
1832
- finished: number;
1833
- right: number;
1834
- wrong: number;
1835
- failed: number;
1836
- spent_usd: number;
1837
- unknown_cost_rows: number;
1838
- paths: {
1839
- agent: number;
1840
- handed_back: number;
1841
- workflow: number;
1842
- };
1843
- lessons: {
1844
- notes: Array<string>;
1845
- skills: Array<string>;
1846
- workflows: Array<string>;
1847
- };
1848
- revisions: Array<{
1849
- row: number;
1850
- commit: string | null;
1851
- workflows: Array<string>;
1852
- }>;
1853
- cost_usd: number | null;
1854
- remaining_usd: number | null;
1855
- current: number | null;
1856
- rows: Array<{
1857
- n: number;
1858
- state: "pending" | "running" | "done" | "failed";
1859
- reference: string;
1860
- run_id?: string;
1861
- answer?: string | null;
1862
- right?: boolean;
1863
- reviewed?: boolean;
1864
- path?: "agent" | "handed_back" | "workflow";
1865
- cost_usd?: number | null;
1866
- learning_usd?: number | null;
1867
- total_usd?: number | null;
1868
- learned?: {
1869
- notes: Array<string>;
1870
- skills: Array<string>;
1871
- workflows: Array<string>;
1872
- };
1873
- merged?: string | null;
1874
- error?: string;
1875
- }>;
1876
- error?: string;
1877
- };
1878
- /** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
1879
- export type CancelLearningBatchResponse = {
1880
- id: string;
1881
- agent_id: string;
1882
- created_at: string;
1883
- ended_at: string | null;
1884
- status: "running" | "completed" | "cancelled" | "stopped";
1885
- stopped: "cap" | "cost_unknown" | "learning_off" | null;
1886
- inputs: Array<string>;
1887
- answer: string;
1888
- answer_field: string | null;
1889
- effort: string | null;
1890
- max_cost_usd: number;
1891
- total: number;
1892
- finished: number;
1893
- right: number;
1894
- wrong: number;
1895
- failed: number;
1896
- spent_usd: number;
1897
- unknown_cost_rows: number;
1898
- paths: {
1899
- agent: number;
1900
- handed_back: number;
1901
- workflow: number;
1902
- };
1903
- lessons: {
1904
- notes: Array<string>;
1905
- skills: Array<string>;
1906
- workflows: Array<string>;
1907
- };
1908
- revisions: Array<{
1909
- row: number;
1910
- commit: string | null;
1911
- workflows: Array<string>;
1912
- }>;
1913
- cost_usd: number | null;
1914
- remaining_usd: number | null;
1915
- current: number | null;
1916
- rows: Array<{
1917
- n: number;
1918
- state: "pending" | "running" | "done" | "failed";
1919
- reference: string;
1920
- run_id?: string;
1921
- answer?: string | null;
1922
- right?: boolean;
1923
- reviewed?: boolean;
1924
- path?: "agent" | "handed_back" | "workflow";
1925
- cost_usd?: number | null;
1926
- learning_usd?: number | null;
1927
- total_usd?: number | null;
1928
- learned?: {
1929
- notes: Array<string>;
1930
- skills: Array<string>;
1931
- workflows: Array<string>;
1932
- };
1933
- merged?: string | null;
1934
- error?: string;
1935
- }>;
1936
- error?: string;
1937
- };
1938
- /** 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). */
1939
- export type CreateLearningBatchBody = {
1940
- inputs: Array<string>;
1941
- answer: string;
1942
- rows: Array<Record<string, string>>;
1943
- max_cost_usd: number;
1944
- answer_field?: string;
1945
- effort?: string;
1946
- };
1947
- export type CreateLearningBatchResponse = {
1948
- id: string;
1949
- agent_id: string;
1950
- created_at: string;
1951
- ended_at: string | null;
1952
- status: "running" | "completed" | "cancelled" | "stopped";
1953
- stopped: "cap" | "cost_unknown" | "learning_off" | null;
1954
- inputs: Array<string>;
1955
- answer: string;
1956
- answer_field: string | null;
1957
- effort: string | null;
1958
- max_cost_usd: number;
1959
- total: number;
1960
- finished: number;
1961
- right: number;
1962
- wrong: number;
1963
- failed: number;
1964
- spent_usd: number;
1965
- unknown_cost_rows: number;
1966
- paths: {
1967
- agent: number;
1968
- handed_back: number;
1969
- workflow: number;
1970
- };
1971
- lessons: {
1972
- notes: Array<string>;
1973
- skills: Array<string>;
1974
- workflows: Array<string>;
1975
- };
1976
- revisions: Array<{
1977
- row: number;
1978
- commit: string | null;
1979
- workflows: Array<string>;
1980
- }>;
1981
- cost_usd: number | null;
1982
- remaining_usd: number | null;
1983
- current: number | null;
1984
- rows: Array<{
1985
- n: number;
1986
- state: "pending" | "running" | "done" | "failed";
1987
- reference: string;
1988
- run_id?: string;
1989
- answer?: string | null;
1990
- right?: boolean;
1991
- reviewed?: boolean;
1992
- path?: "agent" | "handed_back" | "workflow";
1993
- cost_usd?: number | null;
1994
- learning_usd?: number | null;
1995
- total_usd?: number | null;
1996
- learned?: {
1997
- notes: Array<string>;
1998
- skills: Array<string>;
1999
- workflows: Array<string>;
2000
- };
2001
- merged?: string | null;
2002
- error?: string;
2003
- }>;
2004
- error?: string;
2005
- };
2006
- /** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
2007
- export type ListLearningBatchesResponse = {
2008
- batches: Array<{
2009
- id: string;
2010
- agent_id: string;
2011
- created_at: string;
2012
- ended_at: string | null;
2013
- status: "running" | "completed" | "cancelled" | "stopped";
2014
- stopped: "cap" | "cost_unknown" | "learning_off" | null;
2015
- inputs: Array<string>;
2016
- answer: string;
2017
- answer_field: string | null;
2018
- effort: string | null;
2019
- max_cost_usd: number;
2020
- total: number;
2021
- finished: number;
2022
- right: number;
2023
- wrong: number;
2024
- failed: number;
2025
- spent_usd: number;
2026
- unknown_cost_rows: number;
2027
- paths: {
2028
- agent: number;
2029
- handed_back: number;
2030
- workflow: number;
2031
- };
2032
- lessons: {
2033
- notes: Array<string>;
2034
- skills: Array<string>;
2035
- workflows: Array<string>;
2036
- };
2037
- revisions: Array<{
2038
- row: number;
2039
- commit: string | null;
2040
- workflows: Array<string>;
2041
- }>;
2042
- cost_usd: number | null;
2043
- remaining_usd: number | null;
2044
- error?: string;
2045
- }>;
1824
+ /** The agent's corrections.md on main, with its ETag (GET /agents/{agent_id}/learning/corrections). */
1825
+ export type GetLearningCorrectionsResponse = {
1826
+ text: string;
1827
+ etag: string;
1828
+ cap_bytes: 2048;
2046
1829
  };
2047
1830
  /** 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). */
2048
1831
  export interface GetLearningCostParams {
@@ -2052,12 +1835,14 @@ export interface GetLearningCostParams {
2052
1835
  export type GetLearningCostResponse = {
2053
1836
  agent: string;
2054
1837
  runs: Array<{
2055
- n: number;
1838
+ n: number | null;
2056
1839
  run_id: string;
2057
1840
  started_at: string;
2058
1841
  path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
2059
1842
  workflow: string | null;
2060
- learned_revision: string | null;
1843
+ digest: string | null;
1844
+ took_over: boolean;
1845
+ audited: boolean;
2061
1846
  cost_usd: number | null;
2062
1847
  cost_upper_bound: boolean;
2063
1848
  learning_usd: number | null;
@@ -2113,98 +1898,63 @@ export type GetLearningCostResponse = {
2113
1898
  agree_min: number;
2114
1899
  } | null;
2115
1900
  };
1901
+ bill: {
1902
+ baseline: {
1903
+ runs: number;
1904
+ mean_usd: number;
1905
+ } | null;
1906
+ promoted: {
1907
+ n: number;
1908
+ run_id: string;
1909
+ at: string;
1910
+ } | null;
1911
+ learning_usd: number;
1912
+ points: Array<{
1913
+ n: number;
1914
+ run_id: string;
1915
+ actual_usd: number;
1916
+ agent_usd: number | null;
1917
+ }>;
1918
+ break_even: {
1919
+ n: number;
1920
+ run_id: string;
1921
+ } | null;
1922
+ gap_usd: number | null;
1923
+ withheld: number;
1924
+ booked_usd: number;
1925
+ revisions: Array<{
1926
+ workflow: string;
1927
+ digest: string;
1928
+ compile_usd: number | null;
1929
+ check_usd: number | null;
1930
+ spend_usd: number | null;
1931
+ k: number;
1932
+ served: number;
1933
+ attributed_usd: number | null;
1934
+ unattributed_usd: number | null;
1935
+ state: "checking" | "serving" | "stopped";
1936
+ }>;
1937
+ unattributed_usd: number | null;
1938
+ holds: Array<{
1939
+ n: number | null;
1940
+ at: string;
1941
+ workflow: string;
1942
+ by: "audit" | "check" | "dsl";
1943
+ reason: string;
1944
+ }>;
1945
+ };
2116
1946
  };
2117
- /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
2118
- export type ListLearningEvalsResponse = {
2119
- agent: string;
2120
- latest: {
2121
- id: string;
2122
- name: string;
2123
- n: number;
2124
- correct: number;
2125
- label_source: string | null;
2126
- cost_per_task_usd: number | null;
2127
- baseline_cost_per_task_usd: number | null;
2128
- learned_revision: string | null;
2129
- accuracy: number;
2130
- ci: Array<number>;
2131
- recorded_at: string;
2132
- } | null;
2133
- evals: Array<{
2134
- id: string;
2135
- name: string;
2136
- n: number;
2137
- correct: number;
2138
- label_source: string | null;
2139
- cost_per_task_usd: number | null;
2140
- baseline_cost_per_task_usd: number | null;
2141
- learned_revision: string | null;
2142
- accuracy: number;
2143
- ci: Array<number>;
2144
- recorded_at: string;
2145
- }>;
2146
- };
2147
- /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
1947
+ /** What the agent has learned: its corrections, workflow drafts, log of changes and counts (GET /agents/{agent_id}/learning). */
2148
1948
  export type GetAgentLearningResponse = {
2149
1949
  agent: string;
2150
1950
  main: string | null;
2151
- index: string;
2152
- notes: {
2153
- items: Array<{
2154
- file: string;
2155
- name: string;
2156
- description: string;
2157
- type: "user" | "feedback" | "project" | "reference";
2158
- status: "active" | "superseded" | "retired" | "pending";
2159
- origin: "you" | "run";
2160
- superseded_by: string | null;
2161
- text: string;
2162
- etag: string;
2163
- runs: {
2164
- given: number;
2165
- read: number;
2166
- };
2167
- retired?: {
2168
- at: string;
2169
- by: "person" | "run" | "host";
2170
- from?: "active" | "pending";
2171
- why?: "unreadable";
2172
- };
2173
- last_change?: {
2174
- kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
2175
- by: "person" | "run";
2176
- at: string;
2177
- };
2178
- }>;
2179
- total: number;
2180
- next_cursor: string | null;
2181
- };
2182
- skills: Array<{
2183
- name: string;
2184
- file: string;
2185
- description: string;
2186
- status: "active" | "pending" | "retired";
2187
- run: string | null;
2188
- bytes: number;
2189
- etag: string;
2190
- retired?: {
2191
- at: string;
2192
- by: "person" | "run" | "host";
2193
- from?: "active" | "pending";
2194
- why?: "unreadable";
2195
- };
2196
- last_change?: {
2197
- kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
2198
- by: "person" | "run";
2199
- at: string;
2200
- };
2201
- }>;
1951
+ corrections: string;
2202
1952
  workflows: Array<{
2203
1953
  name: string;
2204
1954
  file: string;
2205
1955
  readme: string;
2206
1956
  description: string;
2207
- status: "active" | "pending" | "retired";
1957
+ status: "serving" | "checking" | "held" | "stopped" | "pending" | "retired";
2208
1958
  run: string | null;
2209
1959
  bytes: number;
2210
1960
  etag: string;
@@ -2215,7 +1965,7 @@ export type GetAgentLearningResponse = {
2215
1965
  why?: "unreadable";
2216
1966
  };
2217
1967
  last_change?: {
2218
- kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
1968
+ kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned";
2219
1969
  by: "person" | "run";
2220
1970
  at: string;
2221
1971
  };
@@ -2245,16 +1995,10 @@ export type GetAgentLearningResponse = {
2245
1995
  before: {
2246
1996
  runs: number;
2247
1997
  median_duration_s: number;
2248
- median_cost_usd: number | null;
2249
- cost_runs: number;
2250
- median_learning_usd: number | null;
2251
1998
  };
2252
1999
  after: {
2253
2000
  runs: number;
2254
2001
  median_duration_s: number;
2255
- median_cost_usd: number | null;
2256
- cost_runs: number;
2257
- median_learning_usd: number | null;
2258
2002
  };
2259
2003
  } | null;
2260
2004
  };
@@ -2279,70 +2023,8 @@ export type ListLearningLogResponse = {
2279
2023
  total: number;
2280
2024
  next_cursor: string | null;
2281
2025
  };
2282
- /** A page of the agent's notes (GET /agents/{agent_id}/learning/notes). */
2283
- export interface ListLearningNotesParams {
2284
- cursor?: string;
2285
- limit?: number;
2286
- status?: "active" | "superseded" | "retired" | "pending";
2287
- }
2288
- export type ListLearningNotesResponse = {
2289
- items: Array<{
2290
- file: string;
2291
- name: string;
2292
- description: string;
2293
- type: "user" | "feedback" | "project" | "reference";
2294
- status: "active" | "superseded" | "retired" | "pending";
2295
- origin: "you" | "run";
2296
- superseded_by: string | null;
2297
- text: string;
2298
- etag: string;
2299
- runs: {
2300
- given: number;
2301
- read: number;
2302
- };
2303
- retired?: {
2304
- at: string;
2305
- by: "person" | "run" | "host";
2306
- from?: "active" | "pending";
2307
- why?: "unreadable";
2308
- };
2309
- last_change?: {
2310
- kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
2311
- by: "person" | "run";
2312
- at: string;
2313
- };
2314
- }>;
2315
- total: number;
2316
- next_cursor: string | null;
2317
- };
2318
- /** 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}). */
2026
+ /** One file of a learned workflow on main (its workflow.json or README.md), as text, with its ETag (GET /agents/{agent_id}/learning/files/{file}). */
2319
2027
  export type ReadLearningFileResponse = unknown;
2320
- /** 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). */
2321
- export type RecordLearningEvalBody = {
2322
- name: string;
2323
- n: number;
2324
- correct: number;
2325
- label_source?: string | null;
2326
- cost_per_task_usd?: number | null;
2327
- baseline_cost_per_task_usd?: number | null;
2328
- learned_revision?: string | null;
2329
- };
2330
- export interface RecordLearningEvalParams {
2331
- "Idempotency-Key"?: string;
2332
- }
2333
- export type RecordLearningEvalResponse = {
2334
- id: string;
2335
- name: string;
2336
- n: number;
2337
- correct: number;
2338
- label_source: string | null;
2339
- cost_per_task_usd: number | null;
2340
- baseline_cost_per_task_usd: number | null;
2341
- learned_revision: string | null;
2342
- accuracy: number;
2343
- ci: Array<number>;
2344
- recorded_at: string;
2345
- };
2346
2028
  /** Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab) (GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}). */
2347
2029
  export type GetLearnedWorkflowReplayResponse = {
2348
2030
  replay: string;
@@ -2368,7 +2050,7 @@ export type GetLearnedWorkflowReplayResponse = {
2368
2050
  decided?: "promote" | "hold";
2369
2051
  reason?: string;
2370
2052
  };
2371
- /** 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). */
2053
+ /** Retire a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
2372
2054
  export interface RetireLearningFileParams {
2373
2055
  "If-Match"?: string;
2374
2056
  }
@@ -2394,14 +2076,18 @@ export type ListLearnedWorkflowRevisionsResponse = {
2394
2076
  total: number;
2395
2077
  truncated: boolean;
2396
2078
  };
2397
- /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
2398
- export type WriteLearningFileBody = {
2079
+ /** Replace the agent's corrections.md (If-Match) (PUT /agents/{agent_id}/learning/corrections). */
2080
+ export type PutLearningCorrectionsBody = {
2399
2081
  text: string;
2400
2082
  };
2401
- export interface WriteLearningFileParams {
2402
- "If-Match"?: string;
2403
- "If-None-Match"?: string;
2083
+ export interface PutLearningCorrectionsParams {
2084
+ "If-Match": string;
2404
2085
  }
2086
+ export type PutLearningCorrectionsResponse = {
2087
+ text: string;
2088
+ etag: string;
2089
+ cap_bytes: 2048;
2090
+ };
2405
2091
  /** Start Connect GitHub: the app-manifest form the console posts to GitHub (POST /integrations/github/connect). */
2406
2092
  export type ConnectGitHubBody = {
2407
2093
  org?: string;
@@ -2416,6 +2102,7 @@ export type CreatePairingResponse = {
2416
2102
  id: string;
2417
2103
  code: string;
2418
2104
  expires_at: string;
2105
+ runs_refused: string | null;
2419
2106
  };
2420
2107
  /** Forget this server's calendar (DELETE /settings/calendar). */
2421
2108
  /** Delete the Composio project's webhook subscription, once no trigger uses it (DELETE /settings/mcp-servers/{name}/composio/subscription). */
@@ -2472,6 +2159,20 @@ export type GetChatGPTSignInResponse = {
2472
2159
  expires_at?: string;
2473
2160
  models?: Array<string>;
2474
2161
  };
2162
+ /** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
2163
+ export type GetClaudeLoginResponse = {
2164
+ state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
2165
+ place: "agentrun" | "machine";
2166
+ command: string;
2167
+ can_start: boolean;
2168
+ refused?: string;
2169
+ account?: {
2170
+ method?: string;
2171
+ email?: string;
2172
+ organization?: string;
2173
+ plan?: string;
2174
+ };
2175
+ };
2475
2176
  /** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
2476
2177
  export type GetEmailAccountResponse = {
2477
2178
  configured: boolean;
@@ -2535,6 +2236,7 @@ export type ListComposioEventsResponse = {
2535
2236
  description: string;
2536
2237
  config: Record<string, unknown>;
2537
2238
  polled: boolean;
2239
+ sealed: Array<string>;
2538
2240
  instructions?: string;
2539
2241
  }>;
2540
2242
  };
@@ -2590,6 +2292,7 @@ export type ListComputersResponse = {
2590
2292
  kind: string;
2591
2293
  serves: Array<"none" | "sandbox" | "desktop" | "phone" | "browser">;
2592
2294
  unserved: string | null;
2295
+ runs_refused: string | null;
2593
2296
  os: string;
2594
2297
  os_version: string | null;
2595
2298
  device: {
@@ -2631,6 +2334,7 @@ export type ListComputersResponse = {
2631
2334
  }>;
2632
2335
  required: Array<string>;
2633
2336
  ready: boolean;
2337
+ runs_refused: string | null;
2634
2338
  shell: "computer" | "local" | "none";
2635
2339
  host_tools: Array<string>;
2636
2340
  why?: string;
@@ -2815,6 +2519,7 @@ export type SaveComputerKeysResponse = {
2815
2519
  }>;
2816
2520
  required: Array<string>;
2817
2521
  ready: boolean;
2522
+ runs_refused: string | null;
2818
2523
  shell: "computer" | "local" | "none";
2819
2524
  host_tools: Array<string>;
2820
2525
  why?: string;
@@ -2882,6 +2587,20 @@ export type StartChatGPTSignInResponse = {
2882
2587
  authorize_url: string;
2883
2588
  expires_at: string;
2884
2589
  };
2590
+ /** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
2591
+ export type StartClaudeLoginResponse = {
2592
+ state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
2593
+ place: "agentrun" | "machine";
2594
+ command: string;
2595
+ can_start: boolean;
2596
+ refused?: string;
2597
+ account?: {
2598
+ method?: string;
2599
+ email?: string;
2600
+ organization?: string;
2601
+ plan?: string;
2602
+ };
2603
+ };
2885
2604
  /** 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. */
2886
2605
  export type StartMcpOAuthBody = {
2887
2606
  url: string;
@@ -2943,6 +2662,38 @@ export type TestWorkspaceArchilResponse = {
2943
2662
  ok: false;
2944
2663
  why: string;
2945
2664
  };
2665
+ /** Turn off Claude Code's login on this machine (DELETE /settings/claude-login). */
2666
+ export type TurnOffClaudeLoginResponse = {
2667
+ state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
2668
+ place: "agentrun" | "machine";
2669
+ command: string;
2670
+ can_start: boolean;
2671
+ refused?: string;
2672
+ account?: {
2673
+ method?: string;
2674
+ email?: string;
2675
+ organization?: string;
2676
+ plan?: string;
2677
+ };
2678
+ };
2679
+ /** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
2680
+ export type TurnOnClaudeLoginBody = {
2681
+ place?: "agentrun" | "machine";
2682
+ only_me: true;
2683
+ };
2684
+ export type TurnOnClaudeLoginResponse = {
2685
+ state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
2686
+ place: "agentrun" | "machine";
2687
+ command: string;
2688
+ can_start: boolean;
2689
+ refused?: string;
2690
+ account?: {
2691
+ method?: string;
2692
+ email?: string;
2693
+ organization?: string;
2694
+ plan?: string;
2695
+ };
2696
+ };
2946
2697
  /** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
2947
2698
  export type DeleteMcpServerResponse = {
2948
2699
  deleted: true;
@@ -3347,7 +3098,7 @@ export type GradeRunResponse = {
3347
3098
  path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
3348
3099
  workflow: string | null;
3349
3100
  workflow_digest: string | null;
3350
- feedback: "look_back" | null;
3101
+ feedback: "correction" | null;
3351
3102
  expected?: Record<string, unknown>;
3352
3103
  };
3353
3104
  /** A workflow run's graph, live (GET /runs/{run_id}/graph). */
@@ -3435,28 +3186,18 @@ export type HandBackRunComputerResponse = {
3435
3186
  /** The run's learning whole: its seed, merge, verdict, problems and cost (GET /runs/{run_id}/learning). */
3436
3187
  export type GetRunLearningResponse = {
3437
3188
  run: string;
3438
- state: "seeded" | "reflecting" | "proposed" | "merged" | "dropped";
3439
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_timeout" | "reflect_failed" | "empty" | "unparsed" | "propose_failed" | "checker" | "grader" | "grade_failed" | "use" | null;
3189
+ state: "seeded" | "reflecting" | "merged" | "dropped";
3190
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
3440
3191
  detail: string | null;
3441
3192
  at: string;
3442
3193
  seed: string | null;
3443
3194
  merged: string | null;
3444
- pending: Array<{
3195
+ workflows: Array<{
3445
3196
  file: string;
3446
3197
  name: string;
3198
+ pending?: true;
3447
3199
  }>;
3448
- verdict: {
3449
- merge: boolean;
3450
- reason: string;
3451
- items: Array<{
3452
- file: string;
3453
- keep: boolean;
3454
- pending?: true;
3455
- origin?: "you" | "run";
3456
- question?: string;
3457
- why: string;
3458
- }>;
3459
- } | null;
3200
+ corrections: number;
3460
3201
  problems: Array<{
3461
3202
  rule: string;
3462
3203
  path?: string;
@@ -3464,7 +3205,6 @@ export type GetRunLearningResponse = {
3464
3205
  }>;
3465
3206
  compiled: {
3466
3207
  workflow: string;
3467
- from_notes: Array<string>;
3468
3208
  attempts: Array<{
3469
3209
  ok: boolean;
3470
3210
  errors: Array<string>;
@@ -3473,51 +3213,13 @@ export type GetRunLearningResponse = {
3473
3213
  promoted: boolean | null;
3474
3214
  } | null;
3475
3215
  draft_errors: Array<string>;
3476
- cost_usd: {
3477
- grade: number | null;
3478
- };
3479
- tokens: {
3480
- grade: {
3481
- input: number;
3482
- cache_read: number;
3483
- cache_write: number;
3484
- output: number;
3485
- } | null;
3486
- };
3487
3216
  used: {
3488
- skills: Array<{
3489
- name: string;
3490
- read: boolean;
3491
- }>;
3492
3217
  workflows: Array<{
3493
3218
  name: string;
3494
3219
  calls: number;
3495
3220
  failed: number;
3496
3221
  }>;
3497
3222
  };
3498
- given?: Array<{
3499
- file: string;
3500
- name: string;
3501
- }>;
3502
- read?: Array<{
3503
- file: string;
3504
- name: string;
3505
- }>;
3506
- learned?: Array<{
3507
- file: string;
3508
- name: string;
3509
- supersedes: Array<string>;
3510
- }>;
3511
- skills?: Array<{
3512
- file: string;
3513
- name: string;
3514
- pending?: true;
3515
- }>;
3516
- workflows?: Array<{
3517
- file: string;
3518
- name: string;
3519
- pending?: true;
3520
- }>;
3521
3223
  graded?: {
3522
3224
  run_id: string;
3523
3225
  correct: boolean;
@@ -3526,7 +3228,7 @@ export type GetRunLearningResponse = {
3526
3228
  path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
3527
3229
  workflow: string | null;
3528
3230
  workflow_digest: string | null;
3529
- feedback: "look_back" | null;
3231
+ feedback: "correction" | null;
3530
3232
  feedback_status: "running" | "ended" | "not_run" | null;
3531
3233
  };
3532
3234
  } | null;
@@ -3618,6 +3320,38 @@ export interface GetTimelineParams {
3618
3320
  "Last-Event-ID"?: string;
3619
3321
  }
3620
3322
  export type GetTimelineResponse = TimelinePage;
3323
+ /** A run's trace: each model request and tool call, with its time, tokens and cost (GET /runs/{run_id}/trace). */
3324
+ export type GetRunTraceResponse = {
3325
+ run_id: Id;
3326
+ model_requests: "priced" | "tokens_only" | "not_recorded";
3327
+ spans: Array<{
3328
+ id: string;
3329
+ kind: "model" | "tool";
3330
+ parent_id: string | null;
3331
+ name: string;
3332
+ agent_label: string | null;
3333
+ started_at: Timestamp;
3334
+ ended_at: string | null;
3335
+ status: "ok" | "failed" | "refused" | "interrupted" | "waiting" | "running";
3336
+ stop_reason: string | null;
3337
+ tokens: {
3338
+ input: number;
3339
+ cache_read: number;
3340
+ cache_write: number;
3341
+ output: number;
3342
+ reasoning?: number;
3343
+ } | null;
3344
+ usd: number | null;
3345
+ decision: boolean;
3346
+ charged: boolean;
3347
+ not_metered: boolean;
3348
+ tool_use_id: string | null;
3349
+ input_preview: string | null;
3350
+ result_preview: string | null;
3351
+ result_size_bytes: number | null;
3352
+ }>;
3353
+ dropped: number;
3354
+ };
3621
3355
  /** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
3622
3356
  export type UnarchiveRunResponse = Record<string, unknown>;
3623
3357
  /** Complete a backend SDK task (POST /sdk-runs/{run_id}/complete). */
@@ -3702,10 +3436,6 @@ export type StartSdkRunResponse = {
3702
3436
  enabled: boolean;
3703
3437
  revision: string | null;
3704
3438
  context: string;
3705
- skills: Array<{
3706
- name: string;
3707
- files: Record<string, string>;
3708
- }>;
3709
3439
  workflows: Array<{
3710
3440
  name: string;
3711
3441
  workflow: string;
@@ -3717,9 +3447,9 @@ export type StartSdkRunResponse = {
3717
3447
  export type GetCapabilitiesResponse = Capabilities;
3718
3448
  /** Whether this server can serve (GET /health). */
3719
3449
  export type GetHealthResponse = {
3720
- status: "ok" | "failing";
3450
+ status: "ok" | "failing" | "warming";
3721
3451
  checks: {
3722
- store: "ok" | "does_not_open";
3452
+ store: "ok" | "does_not_open" | "opening";
3723
3453
  disk: "ok" | "below_floor" | "cannot_check";
3724
3454
  };
3725
3455
  };
@@ -3852,6 +3582,7 @@ export type ApplyTemplateBody = {
3852
3582
  parameters?: Record<string, unknown>;
3853
3583
  servers?: Record<string, string>;
3854
3584
  grants?: Array<string>;
3585
+ agent_id?: string;
3855
3586
  overrides?: {
3856
3587
  model?: string;
3857
3588
  choice?: string;
@@ -4062,11 +3793,11 @@ export type ListTemplatesResponse = {
4062
3793
  /** The tool keys a person may save, and which are set: names only, never a value (GET /settings/tool-keys). */
4063
3794
  export type ListToolKeysResponse = {
4064
3795
  keys: Array<{
4065
- id: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "openrouter";
3796
+ id: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "particle" | "openrouter";
4066
3797
  kind: "tool" | "model";
4067
3798
  label: string;
4068
3799
  unlocks: Array<string>;
4069
- harnesses: Array<"pi" | "claude-agent" | "codex" | "opencode">;
3800
+ harnesses: Array<string>;
4070
3801
  fields: Array<{
4071
3802
  name: string;
4072
3803
  set: boolean;
@@ -4268,6 +3999,7 @@ export type CreateTriggerBody = {
4268
3999
  }>;
4269
4000
  }>;
4270
4001
  instance_id?: string;
4002
+ sealed_config?: Array<string>;
4271
4003
  hook?: string;
4272
4004
  move_subscription?: true;
4273
4005
  } | {
@@ -4399,6 +4131,7 @@ export type CreateTriggerResponse = {
4399
4131
  }>;
4400
4132
  }>;
4401
4133
  instance_id?: string;
4134
+ sealed_config?: Array<string>;
4402
4135
  hook?: string;
4403
4136
  move_subscription?: true;
4404
4137
  } | {
@@ -4629,6 +4362,7 @@ export type GetTriggerResponse = {
4629
4362
  }>;
4630
4363
  }>;
4631
4364
  instance_id?: string;
4365
+ sealed_config?: Array<string>;
4632
4366
  hook?: string;
4633
4367
  move_subscription?: true;
4634
4368
  } | {
@@ -4809,6 +4543,7 @@ export type ListTriggersResponse = {
4809
4543
  }>;
4810
4544
  }>;
4811
4545
  instance_id?: string;
4546
+ sealed_config?: Array<string>;
4812
4547
  hook?: string;
4813
4548
  move_subscription?: true;
4814
4549
  } | {
@@ -4993,6 +4728,7 @@ export type UpdateTriggerBody = {
4993
4728
  }>;
4994
4729
  }>;
4995
4730
  instance_id?: string;
4731
+ sealed_config?: Array<string>;
4996
4732
  hook?: string;
4997
4733
  move_subscription?: true;
4998
4734
  } | {
@@ -5121,6 +4857,7 @@ export type UpdateTriggerResponse = {
5121
4857
  }>;
5122
4858
  }>;
5123
4859
  instance_id?: string;
4860
+ sealed_config?: Array<string>;
5124
4861
  hook?: string;
5125
4862
  move_subscription?: true;
5126
4863
  } | {
@@ -5355,6 +5092,8 @@ export declare function resources(call: Call): {
5355
5092
  connectNative: (body: ConnectNativeBody, options?: RequestOptions) => Promise<ConnectNativeResponse>;
5356
5093
  /** Create an agent home (POST /agents). */
5357
5094
  create: (body: CreateAgentBody, params?: CreateAgentParams, options?: RequestOptions) => Promise<CreateAgentResponse>;
5095
+ /** Delete an agent another system owns (DELETE /agents/{agent_id}). */
5096
+ deleteAgent: (agentId: string, options?: RequestOptions) => Promise<void>;
5358
5097
  /** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
5359
5098
  deleteAgentArchil: (agentId: string, options?: RequestOptions) => Promise<DeleteAgentArchilResponse>;
5360
5099
  /** Disconnect future native jobs while retaining source configuration and history (POST /agents/{agent_id}/native/disconnect). */
@@ -5429,36 +5168,24 @@ export declare function resources(call: Call): {
5429
5168
  write: (agentId: string, path: string, body: RawBody, options?: BodyOptions) => Promise<WriteHomeFileResponse>;
5430
5169
  };
5431
5170
  learning: {
5432
- /** 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}). */
5433
- batch: (agentId: string, batchId: string, options?: RequestOptions) => Promise<GetLearningBatchResponse>;
5434
- /** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
5435
- batchCancel: (agentId: string, batchId: string, options?: RequestOptions) => Promise<CancelLearningBatchResponse>;
5436
- /** 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). */
5437
- batchStart: (agentId: string, body: CreateLearningBatchBody, options?: RequestOptions) => Promise<CreateLearningBatchResponse>;
5438
- /** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
5439
- batches: (agentId: string, options?: RequestOptions) => Promise<ListLearningBatchesResponse>;
5171
+ /** The agent's corrections.md on main, with its ETag (GET /agents/{agent_id}/learning/corrections). */
5172
+ corrections: (agentId: string, options?: RequestOptions) => Promise<Tagged<GetLearningCorrectionsResponse>>;
5440
5173
  /** 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). */
5441
5174
  cost: (agentId: string, params?: GetLearningCostParams, options?: RequestOptions) => Promise<GetLearningCostResponse | string>;
5442
- /** The agent's eval records: the latest, and every one kept, newest first (GET /agents/{agent_id}/learning/evals). */
5443
- evals: (agentId: string, options?: RequestOptions) => Promise<ListLearningEvalsResponse>;
5444
- /** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
5175
+ /** What the agent has learned: its corrections, workflow drafts, log of changes and counts (GET /agents/{agent_id}/learning). */
5445
5176
  get: (agentId: string, options?: RequestOptions) => Promise<GetAgentLearningResponse>;
5446
5177
  /** A page of the changes on the agent's main, newest first (GET /agents/{agent_id}/learning/log). */
5447
5178
  log: (agentId: string, params?: ListLearningLogParams, options?: RequestOptions) => Promise<ListLearningLogResponse>;
5448
- /** A page of the agent's notes (GET /agents/{agent_id}/learning/notes). */
5449
- notes: (agentId: string, params?: ListLearningNotesParams, options?: RequestOptions) => Promise<ListLearningNotesResponse>;
5450
- /** 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}). */
5179
+ /** One file of a learned workflow on main (its workflow.json or README.md), as text, with its ETag (GET /agents/{agent_id}/learning/files/{file}). */
5451
5180
  read: (agentId: string, file: string, options?: RequestOptions) => Promise<Tagged<ReadLearningFileResponse | string>>;
5452
- /** 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). */
5453
- recordEval: (agentId: string, body: RecordLearningEvalBody, params?: RecordLearningEvalParams, options?: RequestOptions) => Promise<RecordLearningEvalResponse>;
5454
5181
  /** Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab) (GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}). */
5455
5182
  replay: (agentId: string, name: string, digest: string, replayId: string, options?: RequestOptions) => Promise<GetLearnedWorkflowReplayResponse>;
5456
- /** 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). */
5183
+ /** Retire a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
5457
5184
  retire: (agentId: string, file: string, params?: RetireLearningFileParams, options?: RequestOptions) => Promise<Tagged<string>>;
5458
5185
  /** 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). */
5459
5186
  workflowRevisions: (agentId: string, name: string, params?: ListLearnedWorkflowRevisionsParams, options?: RequestOptions) => Promise<ListLearnedWorkflowRevisionsResponse>;
5460
- /** Edit a note (If-Match) or create one (If-None-Match: *) (PUT /agents/{agent_id}/learning/files/{file}). */
5461
- write: (agentId: string, file: string, body: WriteLearningFileBody | RawBody, params?: WriteLearningFileParams, options?: BodyOptions) => Promise<Tagged<string>>;
5187
+ /** Replace the agent's corrections.md (If-Match) (PUT /agents/{agent_id}/learning/corrections). */
5188
+ writeCorrections: (agentId: string, body: PutLearningCorrectionsBody | RawBody, params: PutLearningCorrectionsParams, options?: BodyOptions) => Promise<Tagged<PutLearningCorrectionsResponse>>;
5462
5189
  };
5463
5190
  local: {
5464
5191
  /** A code that pairs a person's own computer with this server (POST /computers/pairings). */
@@ -5481,6 +5208,8 @@ export declare function resources(call: Call): {
5481
5208
  getCalendar: (options?: RequestOptions) => Promise<GetCalendarResponse>;
5482
5209
  /** This server's ChatGPT sign-in: its state, who and which plan, never a token (GET /settings/chatgpt). */
5483
5210
  getChatGptsignIn: (options?: RequestOptions) => Promise<GetChatGPTSignInResponse>;
5211
+ /** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
5212
+ getClaudeLogin: (options?: RequestOptions) => Promise<GetClaudeLoginResponse>;
5484
5213
  /** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
5485
5214
  getEmailAccount: (options?: RequestOptions) => Promise<GetEmailAccountResponse>;
5486
5215
  /** Whether a GitHub App is connected, and if so its id, slug and installations, never a secret (GET /integrations/github). */
@@ -5515,6 +5244,8 @@ export declare function resources(call: Call): {
5515
5244
  signOutChatGpt: (options?: RequestOptions) => Promise<SignOutChatGPTResponse>;
5516
5245
  /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
5517
5246
  startChatGptsignIn: (options?: RequestOptions) => Promise<StartChatGPTSignInResponse>;
5247
+ /** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
5248
+ startClaudeLogin: (options?: RequestOptions) => Promise<StartClaudeLoginResponse>;
5518
5249
  /** Read the calendar and say what it holds (POST /settings/calendar/test). */
5519
5250
  testCalendar: (body?: TestCalendarBody, options?: RequestOptions) => Promise<TestCalendarResponse>;
5520
5251
  /** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
@@ -5523,6 +5254,10 @@ export declare function resources(call: Call): {
5523
5254
  testEmailAccount: (body?: TestEmailAccountBody, options?: RequestOptions) => Promise<TestEmailAccountResponse>;
5524
5255
  /** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
5525
5256
  testWorkspaceArchil: (options?: RequestOptions) => Promise<TestWorkspaceArchilResponse>;
5257
+ /** Turn off Claude Code's login on this machine (DELETE /settings/claude-login). */
5258
+ turnOffClaudeLogin: (options?: RequestOptions) => Promise<TurnOffClaudeLoginResponse>;
5259
+ /** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
5260
+ turnOnClaudeLogin: (body: TurnOnClaudeLoginBody, options?: RequestOptions) => Promise<TurnOnClaudeLoginResponse>;
5526
5261
  };
5527
5262
  mcpServers: {
5528
5263
  /** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
@@ -5599,6 +5334,8 @@ export declare function resources(call: Call): {
5599
5334
  takeOverRunComputer: (runId: string, body?: TakeOverRunComputerBody, options?: RequestOptions) => Promise<TakeOverRunComputerResponse>;
5600
5335
  /** The run's timeline, as a page or a stream (GET /runs/{run_id}/timeline). */
5601
5336
  timeline: (runId: string, params?: GetTimelineParams, options?: RequestOptions) => Promise<GetTimelineResponse>;
5337
+ /** A run's trace: each model request and tool call, with its time, tokens and cost (GET /runs/{run_id}/trace). */
5338
+ trace: (runId: string, options?: RequestOptions) => Promise<GetRunTraceResponse>;
5602
5339
  /** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
5603
5340
  unarchive: (runId: string, options?: RequestOptions) => Promise<UnarchiveRunResponse>;
5604
5341
  };