@parcha/agentrun-client 0.1.0-beta.44 → 0.1.0-beta.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/codex.d.ts +3 -3
- package/dist/codex.js +2 -2
- package/dist/learning.d.ts +3 -8
- package/dist/learning.js +8 -14
- package/dist/operations.generated.d.ts +175 -544
- package/dist/operations.generated.js +27 -27
- package/package.json +2 -2
|
@@ -34,8 +34,7 @@ export type Agent = {
|
|
|
34
34
|
issues: Array<string>;
|
|
35
35
|
capabilities: {
|
|
36
36
|
launch: boolean;
|
|
37
|
-
|
|
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
|
-
|
|
142
|
-
skills: boolean;
|
|
140
|
+
learning: boolean;
|
|
143
141
|
workflows: false;
|
|
144
142
|
approval: "native" | "unavailable";
|
|
145
143
|
usage: boolean;
|
|
@@ -254,10 +252,11 @@ export type DefinitionInput = {
|
|
|
254
252
|
[key: string]: unknown;
|
|
255
253
|
};
|
|
256
254
|
approvals?: "ask" | "never";
|
|
257
|
-
learning?:
|
|
255
|
+
learning?: boolean | {
|
|
258
256
|
compile_after?: number;
|
|
259
257
|
agree_min?: number;
|
|
260
258
|
alone_min?: number;
|
|
259
|
+
agree_on?: Array<string>;
|
|
261
260
|
audit_every?: number;
|
|
262
261
|
audit_every_later?: number;
|
|
263
262
|
audit_later_after?: number;
|
|
@@ -378,36 +377,14 @@ export type RunSummary = {
|
|
|
378
377
|
effort?: Effort;
|
|
379
378
|
error?: RunError | null;
|
|
380
379
|
learning?: {
|
|
381
|
-
state: "seeded" | "reflecting" | "
|
|
382
|
-
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "
|
|
380
|
+
state: "seeded" | "reflecting" | "merged" | "dropped";
|
|
381
|
+
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
|
|
383
382
|
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
383
|
workflows?: Array<{
|
|
403
384
|
file: string;
|
|
404
385
|
name: string;
|
|
405
386
|
pending?: true;
|
|
406
387
|
}>;
|
|
407
|
-
pending?: Array<{
|
|
408
|
-
file: string;
|
|
409
|
-
name: string;
|
|
410
|
-
}>;
|
|
411
388
|
} | null;
|
|
412
389
|
review?: {
|
|
413
390
|
kind: string | null;
|
|
@@ -481,6 +458,7 @@ export type Cost = {
|
|
|
481
458
|
plan?: {
|
|
482
459
|
requests: number;
|
|
483
460
|
tokens: number;
|
|
461
|
+
on: "chatgpt" | "claude_code";
|
|
484
462
|
};
|
|
485
463
|
};
|
|
486
464
|
export type Effort = "low" | "medium" | "high";
|
|
@@ -668,37 +646,15 @@ export type Run = {
|
|
|
668
646
|
};
|
|
669
647
|
};
|
|
670
648
|
learning?: {
|
|
671
|
-
state: "seeded" | "reflecting" | "
|
|
672
|
-
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "
|
|
649
|
+
state: "seeded" | "reflecting" | "merged" | "dropped";
|
|
650
|
+
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
|
|
673
651
|
detail: string | null;
|
|
674
652
|
at: string;
|
|
675
|
-
given?: Array<{
|
|
676
|
-
file: string;
|
|
677
|
-
name: string;
|
|
678
|
-
}>;
|
|
679
|
-
read?: Array<{
|
|
680
|
-
file: string;
|
|
681
|
-
name: string;
|
|
682
|
-
}>;
|
|
683
|
-
learned?: Array<{
|
|
684
|
-
file: string;
|
|
685
|
-
name: string;
|
|
686
|
-
supersedes: Array<string>;
|
|
687
|
-
}>;
|
|
688
|
-
skills?: Array<{
|
|
689
|
-
file: string;
|
|
690
|
-
name: string;
|
|
691
|
-
pending?: true;
|
|
692
|
-
}>;
|
|
693
653
|
workflows?: Array<{
|
|
694
654
|
file: string;
|
|
695
655
|
name: string;
|
|
696
656
|
pending?: true;
|
|
697
657
|
}>;
|
|
698
|
-
pending?: Array<{
|
|
699
|
-
file: string;
|
|
700
|
-
name: string;
|
|
701
|
-
}>;
|
|
702
658
|
} | null;
|
|
703
659
|
review?: {
|
|
704
660
|
kind: string | null;
|
|
@@ -894,8 +850,8 @@ export type TimelineRow = {
|
|
|
894
850
|
tool_input?: Record<string, unknown>;
|
|
895
851
|
tool_result_text?: string | null;
|
|
896
852
|
learning?: {
|
|
897
|
-
state: "seeded" | "reflecting" | "
|
|
898
|
-
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "
|
|
853
|
+
state: "seeded" | "reflecting" | "merged" | "dropped";
|
|
854
|
+
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
|
|
899
855
|
detail: string | null;
|
|
900
856
|
};
|
|
901
857
|
};
|
|
@@ -932,7 +888,6 @@ export type Capabilities = {
|
|
|
932
888
|
regions: Array<Region>;
|
|
933
889
|
limits: Limits;
|
|
934
890
|
learning: {
|
|
935
|
-
grade_model: string | null;
|
|
936
891
|
pending: true;
|
|
937
892
|
approve: boolean;
|
|
938
893
|
approve_needs?: "password";
|
|
@@ -1011,7 +966,7 @@ export type Capabilities = {
|
|
|
1011
966
|
default_permission: "allow" | "ask" | "deny";
|
|
1012
967
|
permissions: Array<"allow" | "ask" | "deny">;
|
|
1013
968
|
ask_needs?: "password";
|
|
1014
|
-
key?: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "openrouter";
|
|
969
|
+
key?: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "particle" | "openrouter";
|
|
1015
970
|
}>;
|
|
1016
971
|
workflows?: {
|
|
1017
972
|
nodes: Array<string>;
|
|
@@ -1042,6 +997,7 @@ export type Capabilities = {
|
|
|
1042
997
|
condition: string;
|
|
1043
998
|
limit: string;
|
|
1044
999
|
};
|
|
1000
|
+
run_isolation?: "uid" | "process";
|
|
1045
1001
|
};
|
|
1046
1002
|
export type Features = {
|
|
1047
1003
|
agents: {
|
|
@@ -1226,8 +1182,7 @@ export type ConnectNativeResponse = {
|
|
|
1226
1182
|
issues: Array<string>;
|
|
1227
1183
|
capabilities: {
|
|
1228
1184
|
launch: boolean;
|
|
1229
|
-
|
|
1230
|
-
skills: boolean;
|
|
1185
|
+
learning: boolean;
|
|
1231
1186
|
workflows: false;
|
|
1232
1187
|
approval: "native" | "unavailable";
|
|
1233
1188
|
usage: boolean;
|
|
@@ -1246,6 +1201,7 @@ export interface CreateAgentParams {
|
|
|
1246
1201
|
"Idempotency-Key"?: string;
|
|
1247
1202
|
}
|
|
1248
1203
|
export type CreateAgentResponse = Agent;
|
|
1204
|
+
/** Delete an agent another system owns (DELETE /agents/{agent_id}). */
|
|
1249
1205
|
/** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
|
|
1250
1206
|
export type DeleteAgentArchilResponse = {
|
|
1251
1207
|
on: boolean;
|
|
@@ -1279,8 +1235,7 @@ export type DisconnectNativeResponse = {
|
|
|
1279
1235
|
issues: Array<string>;
|
|
1280
1236
|
capabilities: {
|
|
1281
1237
|
launch: boolean;
|
|
1282
|
-
|
|
1283
|
-
skills: boolean;
|
|
1238
|
+
learning: boolean;
|
|
1284
1239
|
workflows: false;
|
|
1285
1240
|
approval: "native" | "unavailable";
|
|
1286
1241
|
usage: boolean;
|
|
@@ -1321,8 +1276,7 @@ export type DiscoverNativeResponse = {
|
|
|
1321
1276
|
issues: Array<string>;
|
|
1322
1277
|
capabilities: {
|
|
1323
1278
|
launch: boolean;
|
|
1324
|
-
|
|
1325
|
-
skills: boolean;
|
|
1279
|
+
learning: boolean;
|
|
1326
1280
|
workflows: false;
|
|
1327
1281
|
approval: "native" | "unavailable";
|
|
1328
1282
|
usage: boolean;
|
|
@@ -1369,7 +1323,6 @@ export type GetLearningLoopResponse = {
|
|
|
1369
1323
|
round: number;
|
|
1370
1324
|
at: string;
|
|
1371
1325
|
workflow: string | null;
|
|
1372
|
-
from_notes: Array<string>;
|
|
1373
1326
|
attempts: Array<{
|
|
1374
1327
|
ok: boolean;
|
|
1375
1328
|
errors: Array<string>;
|
|
@@ -1403,8 +1356,7 @@ export type GetNativeResponse = {
|
|
|
1403
1356
|
issues: Array<string>;
|
|
1404
1357
|
capabilities: {
|
|
1405
1358
|
launch: boolean;
|
|
1406
|
-
|
|
1407
|
-
skills: boolean;
|
|
1359
|
+
learning: boolean;
|
|
1408
1360
|
workflows: false;
|
|
1409
1361
|
approval: "native" | "unavailable";
|
|
1410
1362
|
usage: boolean;
|
|
@@ -1457,6 +1409,7 @@ export type ListLearningPromotionsResponse = {
|
|
|
1457
1409
|
agree_min: number;
|
|
1458
1410
|
alone_min: number;
|
|
1459
1411
|
attempt: 1 | 2;
|
|
1412
|
+
agree_on?: Array<string>;
|
|
1460
1413
|
n?: number;
|
|
1461
1414
|
agreed?: number;
|
|
1462
1415
|
alone?: number;
|
|
@@ -1540,6 +1493,7 @@ export type ListLearningPromotionsResponse = {
|
|
|
1540
1493
|
agree_min: number;
|
|
1541
1494
|
alone_min: number;
|
|
1542
1495
|
attempt: 1 | 2;
|
|
1496
|
+
agree_on?: Array<string>;
|
|
1543
1497
|
n?: number;
|
|
1544
1498
|
agreed?: number;
|
|
1545
1499
|
alone?: number;
|
|
@@ -1609,8 +1563,7 @@ export type VerifyNativeResponse = {
|
|
|
1609
1563
|
issues: Array<string>;
|
|
1610
1564
|
capabilities: {
|
|
1611
1565
|
launch: boolean;
|
|
1612
|
-
|
|
1613
|
-
skills: boolean;
|
|
1566
|
+
learning: boolean;
|
|
1614
1567
|
workflows: false;
|
|
1615
1568
|
approval: "native" | "unavailable";
|
|
1616
1569
|
usage: boolean;
|
|
@@ -1684,8 +1637,7 @@ export type ImportRemoteTargetBody = {
|
|
|
1684
1637
|
issues: Array<string>;
|
|
1685
1638
|
capabilities: {
|
|
1686
1639
|
launch: boolean;
|
|
1687
|
-
|
|
1688
|
-
skills: boolean;
|
|
1640
|
+
learning: boolean;
|
|
1689
1641
|
workflows: false;
|
|
1690
1642
|
approval: "native" | "unavailable";
|
|
1691
1643
|
usage: boolean;
|
|
@@ -1722,8 +1674,7 @@ export type ImportRemoteTargetResponse = {
|
|
|
1722
1674
|
issues: Array<string>;
|
|
1723
1675
|
capabilities: {
|
|
1724
1676
|
launch: boolean;
|
|
1725
|
-
|
|
1726
|
-
skills: boolean;
|
|
1677
|
+
learning: boolean;
|
|
1727
1678
|
workflows: false;
|
|
1728
1679
|
approval: "native" | "unavailable";
|
|
1729
1680
|
usage: boolean;
|
|
@@ -1873,234 +1824,11 @@ export type WriteHomeFileResponse = {
|
|
|
1873
1824
|
content_type?: string | null;
|
|
1874
1825
|
unreadable?: true;
|
|
1875
1826
|
};
|
|
1876
|
-
/**
|
|
1877
|
-
export type
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
ended_at: string | null;
|
|
1882
|
-
status: "running" | "completed" | "cancelled" | "stopped";
|
|
1883
|
-
stopped: "cap" | "cost_unknown" | "learning_off" | null;
|
|
1884
|
-
inputs: Array<string>;
|
|
1885
|
-
answer: string;
|
|
1886
|
-
answer_field: string | null;
|
|
1887
|
-
effort: string | null;
|
|
1888
|
-
max_cost_usd: number;
|
|
1889
|
-
total: number;
|
|
1890
|
-
finished: number;
|
|
1891
|
-
right: number;
|
|
1892
|
-
wrong: number;
|
|
1893
|
-
failed: number;
|
|
1894
|
-
spent_usd: number;
|
|
1895
|
-
unknown_cost_rows: number;
|
|
1896
|
-
paths: {
|
|
1897
|
-
agent: number;
|
|
1898
|
-
handed_back: number;
|
|
1899
|
-
workflow: number;
|
|
1900
|
-
};
|
|
1901
|
-
lessons: {
|
|
1902
|
-
notes: Array<string>;
|
|
1903
|
-
skills: Array<string>;
|
|
1904
|
-
workflows: Array<string>;
|
|
1905
|
-
};
|
|
1906
|
-
revisions: Array<{
|
|
1907
|
-
row: number;
|
|
1908
|
-
commit: string | null;
|
|
1909
|
-
workflows: Array<string>;
|
|
1910
|
-
}>;
|
|
1911
|
-
cost_usd: number | null;
|
|
1912
|
-
remaining_usd: number | null;
|
|
1913
|
-
current: number | null;
|
|
1914
|
-
rows: Array<{
|
|
1915
|
-
n: number;
|
|
1916
|
-
state: "pending" | "running" | "done" | "failed";
|
|
1917
|
-
reference: string;
|
|
1918
|
-
run_id?: string;
|
|
1919
|
-
answer?: string | null;
|
|
1920
|
-
right?: boolean;
|
|
1921
|
-
reviewed?: boolean;
|
|
1922
|
-
path?: "agent" | "handed_back" | "workflow";
|
|
1923
|
-
cost_usd?: number | null;
|
|
1924
|
-
learning_usd?: number | null;
|
|
1925
|
-
total_usd?: number | null;
|
|
1926
|
-
learned?: {
|
|
1927
|
-
notes: Array<string>;
|
|
1928
|
-
skills: Array<string>;
|
|
1929
|
-
workflows: Array<string>;
|
|
1930
|
-
};
|
|
1931
|
-
merged?: string | null;
|
|
1932
|
-
error?: string;
|
|
1933
|
-
}>;
|
|
1934
|
-
error?: string;
|
|
1935
|
-
};
|
|
1936
|
-
/** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
|
|
1937
|
-
export type CancelLearningBatchResponse = {
|
|
1938
|
-
id: string;
|
|
1939
|
-
agent_id: string;
|
|
1940
|
-
created_at: string;
|
|
1941
|
-
ended_at: string | null;
|
|
1942
|
-
status: "running" | "completed" | "cancelled" | "stopped";
|
|
1943
|
-
stopped: "cap" | "cost_unknown" | "learning_off" | null;
|
|
1944
|
-
inputs: Array<string>;
|
|
1945
|
-
answer: string;
|
|
1946
|
-
answer_field: string | null;
|
|
1947
|
-
effort: string | null;
|
|
1948
|
-
max_cost_usd: number;
|
|
1949
|
-
total: number;
|
|
1950
|
-
finished: number;
|
|
1951
|
-
right: number;
|
|
1952
|
-
wrong: number;
|
|
1953
|
-
failed: number;
|
|
1954
|
-
spent_usd: number;
|
|
1955
|
-
unknown_cost_rows: number;
|
|
1956
|
-
paths: {
|
|
1957
|
-
agent: number;
|
|
1958
|
-
handed_back: number;
|
|
1959
|
-
workflow: number;
|
|
1960
|
-
};
|
|
1961
|
-
lessons: {
|
|
1962
|
-
notes: Array<string>;
|
|
1963
|
-
skills: Array<string>;
|
|
1964
|
-
workflows: Array<string>;
|
|
1965
|
-
};
|
|
1966
|
-
revisions: Array<{
|
|
1967
|
-
row: number;
|
|
1968
|
-
commit: string | null;
|
|
1969
|
-
workflows: Array<string>;
|
|
1970
|
-
}>;
|
|
1971
|
-
cost_usd: number | null;
|
|
1972
|
-
remaining_usd: number | null;
|
|
1973
|
-
current: number | null;
|
|
1974
|
-
rows: Array<{
|
|
1975
|
-
n: number;
|
|
1976
|
-
state: "pending" | "running" | "done" | "failed";
|
|
1977
|
-
reference: string;
|
|
1978
|
-
run_id?: string;
|
|
1979
|
-
answer?: string | null;
|
|
1980
|
-
right?: boolean;
|
|
1981
|
-
reviewed?: boolean;
|
|
1982
|
-
path?: "agent" | "handed_back" | "workflow";
|
|
1983
|
-
cost_usd?: number | null;
|
|
1984
|
-
learning_usd?: number | null;
|
|
1985
|
-
total_usd?: number | null;
|
|
1986
|
-
learned?: {
|
|
1987
|
-
notes: Array<string>;
|
|
1988
|
-
skills: Array<string>;
|
|
1989
|
-
workflows: Array<string>;
|
|
1990
|
-
};
|
|
1991
|
-
merged?: string | null;
|
|
1992
|
-
error?: string;
|
|
1993
|
-
}>;
|
|
1994
|
-
error?: string;
|
|
1995
|
-
};
|
|
1996
|
-
/** 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). */
|
|
1997
|
-
export type CreateLearningBatchBody = {
|
|
1998
|
-
inputs: Array<string>;
|
|
1999
|
-
answer: string;
|
|
2000
|
-
rows: Array<Record<string, string>>;
|
|
2001
|
-
max_cost_usd: number;
|
|
2002
|
-
answer_field?: string;
|
|
2003
|
-
effort?: string;
|
|
2004
|
-
};
|
|
2005
|
-
export type CreateLearningBatchResponse = {
|
|
2006
|
-
id: string;
|
|
2007
|
-
agent_id: string;
|
|
2008
|
-
created_at: string;
|
|
2009
|
-
ended_at: string | null;
|
|
2010
|
-
status: "running" | "completed" | "cancelled" | "stopped";
|
|
2011
|
-
stopped: "cap" | "cost_unknown" | "learning_off" | null;
|
|
2012
|
-
inputs: Array<string>;
|
|
2013
|
-
answer: string;
|
|
2014
|
-
answer_field: string | null;
|
|
2015
|
-
effort: string | null;
|
|
2016
|
-
max_cost_usd: number;
|
|
2017
|
-
total: number;
|
|
2018
|
-
finished: number;
|
|
2019
|
-
right: number;
|
|
2020
|
-
wrong: number;
|
|
2021
|
-
failed: number;
|
|
2022
|
-
spent_usd: number;
|
|
2023
|
-
unknown_cost_rows: number;
|
|
2024
|
-
paths: {
|
|
2025
|
-
agent: number;
|
|
2026
|
-
handed_back: number;
|
|
2027
|
-
workflow: number;
|
|
2028
|
-
};
|
|
2029
|
-
lessons: {
|
|
2030
|
-
notes: Array<string>;
|
|
2031
|
-
skills: Array<string>;
|
|
2032
|
-
workflows: Array<string>;
|
|
2033
|
-
};
|
|
2034
|
-
revisions: Array<{
|
|
2035
|
-
row: number;
|
|
2036
|
-
commit: string | null;
|
|
2037
|
-
workflows: Array<string>;
|
|
2038
|
-
}>;
|
|
2039
|
-
cost_usd: number | null;
|
|
2040
|
-
remaining_usd: number | null;
|
|
2041
|
-
current: number | null;
|
|
2042
|
-
rows: Array<{
|
|
2043
|
-
n: number;
|
|
2044
|
-
state: "pending" | "running" | "done" | "failed";
|
|
2045
|
-
reference: string;
|
|
2046
|
-
run_id?: string;
|
|
2047
|
-
answer?: string | null;
|
|
2048
|
-
right?: boolean;
|
|
2049
|
-
reviewed?: boolean;
|
|
2050
|
-
path?: "agent" | "handed_back" | "workflow";
|
|
2051
|
-
cost_usd?: number | null;
|
|
2052
|
-
learning_usd?: number | null;
|
|
2053
|
-
total_usd?: number | null;
|
|
2054
|
-
learned?: {
|
|
2055
|
-
notes: Array<string>;
|
|
2056
|
-
skills: Array<string>;
|
|
2057
|
-
workflows: Array<string>;
|
|
2058
|
-
};
|
|
2059
|
-
merged?: string | null;
|
|
2060
|
-
error?: string;
|
|
2061
|
-
}>;
|
|
2062
|
-
error?: string;
|
|
2063
|
-
};
|
|
2064
|
-
/** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
|
|
2065
|
-
export type ListLearningBatchesResponse = {
|
|
2066
|
-
batches: Array<{
|
|
2067
|
-
id: string;
|
|
2068
|
-
agent_id: string;
|
|
2069
|
-
created_at: string;
|
|
2070
|
-
ended_at: string | null;
|
|
2071
|
-
status: "running" | "completed" | "cancelled" | "stopped";
|
|
2072
|
-
stopped: "cap" | "cost_unknown" | "learning_off" | null;
|
|
2073
|
-
inputs: Array<string>;
|
|
2074
|
-
answer: string;
|
|
2075
|
-
answer_field: string | null;
|
|
2076
|
-
effort: string | null;
|
|
2077
|
-
max_cost_usd: number;
|
|
2078
|
-
total: number;
|
|
2079
|
-
finished: number;
|
|
2080
|
-
right: number;
|
|
2081
|
-
wrong: number;
|
|
2082
|
-
failed: number;
|
|
2083
|
-
spent_usd: number;
|
|
2084
|
-
unknown_cost_rows: number;
|
|
2085
|
-
paths: {
|
|
2086
|
-
agent: number;
|
|
2087
|
-
handed_back: number;
|
|
2088
|
-
workflow: number;
|
|
2089
|
-
};
|
|
2090
|
-
lessons: {
|
|
2091
|
-
notes: Array<string>;
|
|
2092
|
-
skills: Array<string>;
|
|
2093
|
-
workflows: Array<string>;
|
|
2094
|
-
};
|
|
2095
|
-
revisions: Array<{
|
|
2096
|
-
row: number;
|
|
2097
|
-
commit: string | null;
|
|
2098
|
-
workflows: Array<string>;
|
|
2099
|
-
}>;
|
|
2100
|
-
cost_usd: number | null;
|
|
2101
|
-
remaining_usd: number | null;
|
|
2102
|
-
error?: string;
|
|
2103
|
-
}>;
|
|
1827
|
+
/** The agent's corrections.md on main, with its ETag (GET /agents/{agent_id}/learning/corrections). */
|
|
1828
|
+
export type GetLearningCorrectionsResponse = {
|
|
1829
|
+
text: string;
|
|
1830
|
+
etag: string;
|
|
1831
|
+
cap_bytes: 2048;
|
|
2104
1832
|
};
|
|
2105
1833
|
/** 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). */
|
|
2106
1834
|
export interface GetLearningCostParams {
|
|
@@ -2110,12 +1838,14 @@ export interface GetLearningCostParams {
|
|
|
2110
1838
|
export type GetLearningCostResponse = {
|
|
2111
1839
|
agent: string;
|
|
2112
1840
|
runs: Array<{
|
|
2113
|
-
n: number;
|
|
1841
|
+
n: number | null;
|
|
2114
1842
|
run_id: string;
|
|
2115
1843
|
started_at: string;
|
|
2116
1844
|
path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
|
|
2117
1845
|
workflow: string | null;
|
|
2118
|
-
|
|
1846
|
+
digest: string | null;
|
|
1847
|
+
took_over: boolean;
|
|
1848
|
+
audited: boolean;
|
|
2119
1849
|
cost_usd: number | null;
|
|
2120
1850
|
cost_upper_bound: boolean;
|
|
2121
1851
|
learning_usd: number | null;
|
|
@@ -2181,6 +1911,7 @@ export type GetLearningCostResponse = {
|
|
|
2181
1911
|
run_id: string;
|
|
2182
1912
|
at: string;
|
|
2183
1913
|
} | null;
|
|
1914
|
+
learning_usd: number;
|
|
2184
1915
|
points: Array<{
|
|
2185
1916
|
n: number;
|
|
2186
1917
|
run_id: string;
|
|
@@ -2216,97 +1947,17 @@ export type GetLearningCostResponse = {
|
|
|
2216
1947
|
}>;
|
|
2217
1948
|
};
|
|
2218
1949
|
};
|
|
2219
|
-
/**
|
|
2220
|
-
export type ListLearningEvalsResponse = {
|
|
2221
|
-
agent: string;
|
|
2222
|
-
latest: {
|
|
2223
|
-
id: string;
|
|
2224
|
-
name: string;
|
|
2225
|
-
n: number;
|
|
2226
|
-
correct: number;
|
|
2227
|
-
label_source: string | null;
|
|
2228
|
-
cost_per_task_usd: number | null;
|
|
2229
|
-
baseline_cost_per_task_usd: number | null;
|
|
2230
|
-
learned_revision: string | null;
|
|
2231
|
-
accuracy: number;
|
|
2232
|
-
ci: Array<number>;
|
|
2233
|
-
recorded_at: string;
|
|
2234
|
-
} | null;
|
|
2235
|
-
evals: Array<{
|
|
2236
|
-
id: string;
|
|
2237
|
-
name: string;
|
|
2238
|
-
n: number;
|
|
2239
|
-
correct: number;
|
|
2240
|
-
label_source: string | null;
|
|
2241
|
-
cost_per_task_usd: number | null;
|
|
2242
|
-
baseline_cost_per_task_usd: number | null;
|
|
2243
|
-
learned_revision: string | null;
|
|
2244
|
-
accuracy: number;
|
|
2245
|
-
ci: Array<number>;
|
|
2246
|
-
recorded_at: string;
|
|
2247
|
-
}>;
|
|
2248
|
-
};
|
|
2249
|
-
/** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
|
|
1950
|
+
/** What the agent has learned: its corrections, workflow drafts, log of changes and counts (GET /agents/{agent_id}/learning). */
|
|
2250
1951
|
export type GetAgentLearningResponse = {
|
|
2251
1952
|
agent: string;
|
|
2252
1953
|
main: string | null;
|
|
2253
|
-
|
|
2254
|
-
notes: {
|
|
2255
|
-
items: Array<{
|
|
2256
|
-
file: string;
|
|
2257
|
-
name: string;
|
|
2258
|
-
description: string;
|
|
2259
|
-
type: "user" | "feedback" | "project" | "reference";
|
|
2260
|
-
status: "active" | "superseded" | "retired" | "pending";
|
|
2261
|
-
origin: "you" | "run";
|
|
2262
|
-
superseded_by: string | null;
|
|
2263
|
-
text: string;
|
|
2264
|
-
etag: string;
|
|
2265
|
-
runs: {
|
|
2266
|
-
given: number;
|
|
2267
|
-
read: number;
|
|
2268
|
-
};
|
|
2269
|
-
retired?: {
|
|
2270
|
-
at: string;
|
|
2271
|
-
by: "person" | "run" | "host";
|
|
2272
|
-
from?: "active" | "pending";
|
|
2273
|
-
why?: "unreadable";
|
|
2274
|
-
};
|
|
2275
|
-
last_change?: {
|
|
2276
|
-
kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
|
|
2277
|
-
by: "person" | "run";
|
|
2278
|
-
at: string;
|
|
2279
|
-
};
|
|
2280
|
-
}>;
|
|
2281
|
-
total: number;
|
|
2282
|
-
next_cursor: string | null;
|
|
2283
|
-
};
|
|
2284
|
-
skills: Array<{
|
|
2285
|
-
name: string;
|
|
2286
|
-
file: string;
|
|
2287
|
-
description: string;
|
|
2288
|
-
status: "active" | "pending" | "retired";
|
|
2289
|
-
run: string | null;
|
|
2290
|
-
bytes: number;
|
|
2291
|
-
etag: string;
|
|
2292
|
-
retired?: {
|
|
2293
|
-
at: string;
|
|
2294
|
-
by: "person" | "run" | "host";
|
|
2295
|
-
from?: "active" | "pending";
|
|
2296
|
-
why?: "unreadable";
|
|
2297
|
-
};
|
|
2298
|
-
last_change?: {
|
|
2299
|
-
kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
|
|
2300
|
-
by: "person" | "run";
|
|
2301
|
-
at: string;
|
|
2302
|
-
};
|
|
2303
|
-
}>;
|
|
1954
|
+
corrections: string;
|
|
2304
1955
|
workflows: Array<{
|
|
2305
1956
|
name: string;
|
|
2306
1957
|
file: string;
|
|
2307
1958
|
readme: string;
|
|
2308
1959
|
description: string;
|
|
2309
|
-
status: "
|
|
1960
|
+
status: "serving" | "checking" | "held" | "stopped" | "pending" | "retired";
|
|
2310
1961
|
run: string | null;
|
|
2311
1962
|
bytes: number;
|
|
2312
1963
|
etag: string;
|
|
@@ -2317,7 +1968,7 @@ export type GetAgentLearningResponse = {
|
|
|
2317
1968
|
why?: "unreadable";
|
|
2318
1969
|
};
|
|
2319
1970
|
last_change?: {
|
|
2320
|
-
kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned"
|
|
1971
|
+
kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned";
|
|
2321
1972
|
by: "person" | "run";
|
|
2322
1973
|
at: string;
|
|
2323
1974
|
};
|
|
@@ -2347,16 +1998,10 @@ export type GetAgentLearningResponse = {
|
|
|
2347
1998
|
before: {
|
|
2348
1999
|
runs: number;
|
|
2349
2000
|
median_duration_s: number;
|
|
2350
|
-
median_cost_usd: number | null;
|
|
2351
|
-
cost_runs: number;
|
|
2352
|
-
median_learning_usd: number | null;
|
|
2353
2001
|
};
|
|
2354
2002
|
after: {
|
|
2355
2003
|
runs: number;
|
|
2356
2004
|
median_duration_s: number;
|
|
2357
|
-
median_cost_usd: number | null;
|
|
2358
|
-
cost_runs: number;
|
|
2359
|
-
median_learning_usd: number | null;
|
|
2360
2005
|
};
|
|
2361
2006
|
} | null;
|
|
2362
2007
|
};
|
|
@@ -2381,70 +2026,8 @@ export type ListLearningLogResponse = {
|
|
|
2381
2026
|
total: number;
|
|
2382
2027
|
next_cursor: string | null;
|
|
2383
2028
|
};
|
|
2384
|
-
/**
|
|
2385
|
-
export interface ListLearningNotesParams {
|
|
2386
|
-
cursor?: string;
|
|
2387
|
-
limit?: number;
|
|
2388
|
-
status?: "active" | "superseded" | "retired" | "pending";
|
|
2389
|
-
}
|
|
2390
|
-
export type ListLearningNotesResponse = {
|
|
2391
|
-
items: Array<{
|
|
2392
|
-
file: string;
|
|
2393
|
-
name: string;
|
|
2394
|
-
description: string;
|
|
2395
|
-
type: "user" | "feedback" | "project" | "reference";
|
|
2396
|
-
status: "active" | "superseded" | "retired" | "pending";
|
|
2397
|
-
origin: "you" | "run";
|
|
2398
|
-
superseded_by: string | null;
|
|
2399
|
-
text: string;
|
|
2400
|
-
etag: string;
|
|
2401
|
-
runs: {
|
|
2402
|
-
given: number;
|
|
2403
|
-
read: number;
|
|
2404
|
-
};
|
|
2405
|
-
retired?: {
|
|
2406
|
-
at: string;
|
|
2407
|
-
by: "person" | "run" | "host";
|
|
2408
|
-
from?: "active" | "pending";
|
|
2409
|
-
why?: "unreadable";
|
|
2410
|
-
};
|
|
2411
|
-
last_change?: {
|
|
2412
|
-
kind: "approved" | "edited" | "created" | "retired" | "restored" | "learned" | "superseded";
|
|
2413
|
-
by: "person" | "run";
|
|
2414
|
-
at: string;
|
|
2415
|
-
};
|
|
2416
|
-
}>;
|
|
2417
|
-
total: number;
|
|
2418
|
-
next_cursor: string | null;
|
|
2419
|
-
};
|
|
2420
|
-
/** 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}). */
|
|
2029
|
+
/** 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}). */
|
|
2421
2030
|
export type ReadLearningFileResponse = unknown;
|
|
2422
|
-
/** 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). */
|
|
2423
|
-
export type RecordLearningEvalBody = {
|
|
2424
|
-
name: string;
|
|
2425
|
-
n: number;
|
|
2426
|
-
correct: number;
|
|
2427
|
-
label_source?: string | null;
|
|
2428
|
-
cost_per_task_usd?: number | null;
|
|
2429
|
-
baseline_cost_per_task_usd?: number | null;
|
|
2430
|
-
learned_revision?: string | null;
|
|
2431
|
-
};
|
|
2432
|
-
export interface RecordLearningEvalParams {
|
|
2433
|
-
"Idempotency-Key"?: string;
|
|
2434
|
-
}
|
|
2435
|
-
export type RecordLearningEvalResponse = {
|
|
2436
|
-
id: string;
|
|
2437
|
-
name: string;
|
|
2438
|
-
n: number;
|
|
2439
|
-
correct: number;
|
|
2440
|
-
label_source: string | null;
|
|
2441
|
-
cost_per_task_usd: number | null;
|
|
2442
|
-
baseline_cost_per_task_usd: number | null;
|
|
2443
|
-
learned_revision: string | null;
|
|
2444
|
-
accuracy: number;
|
|
2445
|
-
ci: Array<number>;
|
|
2446
|
-
recorded_at: string;
|
|
2447
|
-
};
|
|
2448
2031
|
/** 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}). */
|
|
2449
2032
|
export type GetLearnedWorkflowReplayResponse = {
|
|
2450
2033
|
replay: string;
|
|
@@ -2470,7 +2053,7 @@ export type GetLearnedWorkflowReplayResponse = {
|
|
|
2470
2053
|
decided?: "promote" | "hold";
|
|
2471
2054
|
reason?: string;
|
|
2472
2055
|
};
|
|
2473
|
-
/** Retire a
|
|
2056
|
+
/** Retire a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
|
|
2474
2057
|
export interface RetireLearningFileParams {
|
|
2475
2058
|
"If-Match"?: string;
|
|
2476
2059
|
}
|
|
@@ -2496,14 +2079,18 @@ export type ListLearnedWorkflowRevisionsResponse = {
|
|
|
2496
2079
|
total: number;
|
|
2497
2080
|
truncated: boolean;
|
|
2498
2081
|
};
|
|
2499
|
-
/**
|
|
2500
|
-
export type
|
|
2082
|
+
/** Replace the agent's corrections.md (If-Match) (PUT /agents/{agent_id}/learning/corrections). */
|
|
2083
|
+
export type PutLearningCorrectionsBody = {
|
|
2501
2084
|
text: string;
|
|
2502
2085
|
};
|
|
2503
|
-
export interface
|
|
2504
|
-
"If-Match"
|
|
2505
|
-
"If-None-Match"?: string;
|
|
2086
|
+
export interface PutLearningCorrectionsParams {
|
|
2087
|
+
"If-Match": string;
|
|
2506
2088
|
}
|
|
2089
|
+
export type PutLearningCorrectionsResponse = {
|
|
2090
|
+
text: string;
|
|
2091
|
+
etag: string;
|
|
2092
|
+
cap_bytes: 2048;
|
|
2093
|
+
};
|
|
2507
2094
|
/** Start Connect GitHub: the app-manifest form the console posts to GitHub (POST /integrations/github/connect). */
|
|
2508
2095
|
export type ConnectGitHubBody = {
|
|
2509
2096
|
org?: string;
|
|
@@ -2518,6 +2105,7 @@ export type CreatePairingResponse = {
|
|
|
2518
2105
|
id: string;
|
|
2519
2106
|
code: string;
|
|
2520
2107
|
expires_at: string;
|
|
2108
|
+
runs_refused: string | null;
|
|
2521
2109
|
};
|
|
2522
2110
|
/** Forget this server's calendar (DELETE /settings/calendar). */
|
|
2523
2111
|
/** Delete the Composio project's webhook subscription, once no trigger uses it (DELETE /settings/mcp-servers/{name}/composio/subscription). */
|
|
@@ -2574,6 +2162,20 @@ export type GetChatGPTSignInResponse = {
|
|
|
2574
2162
|
expires_at?: string;
|
|
2575
2163
|
models?: Array<string>;
|
|
2576
2164
|
};
|
|
2165
|
+
/** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
|
|
2166
|
+
export type GetClaudeLoginResponse = {
|
|
2167
|
+
state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
|
|
2168
|
+
place: "agentrun" | "machine";
|
|
2169
|
+
command: string;
|
|
2170
|
+
can_start: boolean;
|
|
2171
|
+
refused?: string;
|
|
2172
|
+
account?: {
|
|
2173
|
+
method?: string;
|
|
2174
|
+
email?: string;
|
|
2175
|
+
organization?: string;
|
|
2176
|
+
plan?: string;
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2577
2179
|
/** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
|
|
2578
2180
|
export type GetEmailAccountResponse = {
|
|
2579
2181
|
configured: boolean;
|
|
@@ -2693,6 +2295,7 @@ export type ListComputersResponse = {
|
|
|
2693
2295
|
kind: string;
|
|
2694
2296
|
serves: Array<"none" | "sandbox" | "desktop" | "phone" | "browser">;
|
|
2695
2297
|
unserved: string | null;
|
|
2298
|
+
runs_refused: string | null;
|
|
2696
2299
|
os: string;
|
|
2697
2300
|
os_version: string | null;
|
|
2698
2301
|
device: {
|
|
@@ -2734,6 +2337,7 @@ export type ListComputersResponse = {
|
|
|
2734
2337
|
}>;
|
|
2735
2338
|
required: Array<string>;
|
|
2736
2339
|
ready: boolean;
|
|
2340
|
+
runs_refused: string | null;
|
|
2737
2341
|
shell: "computer" | "local" | "none";
|
|
2738
2342
|
host_tools: Array<string>;
|
|
2739
2343
|
why?: string;
|
|
@@ -2918,6 +2522,7 @@ export type SaveComputerKeysResponse = {
|
|
|
2918
2522
|
}>;
|
|
2919
2523
|
required: Array<string>;
|
|
2920
2524
|
ready: boolean;
|
|
2525
|
+
runs_refused: string | null;
|
|
2921
2526
|
shell: "computer" | "local" | "none";
|
|
2922
2527
|
host_tools: Array<string>;
|
|
2923
2528
|
why?: string;
|
|
@@ -2985,6 +2590,20 @@ export type StartChatGPTSignInResponse = {
|
|
|
2985
2590
|
authorize_url: string;
|
|
2986
2591
|
expires_at: string;
|
|
2987
2592
|
};
|
|
2593
|
+
/** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
|
|
2594
|
+
export type StartClaudeLoginResponse = {
|
|
2595
|
+
state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
|
|
2596
|
+
place: "agentrun" | "machine";
|
|
2597
|
+
command: string;
|
|
2598
|
+
can_start: boolean;
|
|
2599
|
+
refused?: string;
|
|
2600
|
+
account?: {
|
|
2601
|
+
method?: string;
|
|
2602
|
+
email?: string;
|
|
2603
|
+
organization?: string;
|
|
2604
|
+
plan?: string;
|
|
2605
|
+
};
|
|
2606
|
+
};
|
|
2988
2607
|
/** 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. */
|
|
2989
2608
|
export type StartMcpOAuthBody = {
|
|
2990
2609
|
url: string;
|
|
@@ -3046,6 +2665,38 @@ export type TestWorkspaceArchilResponse = {
|
|
|
3046
2665
|
ok: false;
|
|
3047
2666
|
why: string;
|
|
3048
2667
|
};
|
|
2668
|
+
/** Turn off Claude Code's login on this machine (DELETE /settings/claude-login). */
|
|
2669
|
+
export type TurnOffClaudeLoginResponse = {
|
|
2670
|
+
state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
|
|
2671
|
+
place: "agentrun" | "machine";
|
|
2672
|
+
command: string;
|
|
2673
|
+
can_start: boolean;
|
|
2674
|
+
refused?: string;
|
|
2675
|
+
account?: {
|
|
2676
|
+
method?: string;
|
|
2677
|
+
email?: string;
|
|
2678
|
+
organization?: string;
|
|
2679
|
+
plan?: string;
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
/** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
|
|
2683
|
+
export type TurnOnClaudeLoginBody = {
|
|
2684
|
+
place?: "agentrun" | "machine";
|
|
2685
|
+
only_me: true;
|
|
2686
|
+
};
|
|
2687
|
+
export type TurnOnClaudeLoginResponse = {
|
|
2688
|
+
state: "off" | "other_machine" | "signed_in" | "signed_out" | "no_cli" | "unknown";
|
|
2689
|
+
place: "agentrun" | "machine";
|
|
2690
|
+
command: string;
|
|
2691
|
+
can_start: boolean;
|
|
2692
|
+
refused?: string;
|
|
2693
|
+
account?: {
|
|
2694
|
+
method?: string;
|
|
2695
|
+
email?: string;
|
|
2696
|
+
organization?: string;
|
|
2697
|
+
plan?: string;
|
|
2698
|
+
};
|
|
2699
|
+
};
|
|
3049
2700
|
/** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
|
|
3050
2701
|
export type DeleteMcpServerResponse = {
|
|
3051
2702
|
deleted: true;
|
|
@@ -3450,7 +3101,7 @@ export type GradeRunResponse = {
|
|
|
3450
3101
|
path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
|
|
3451
3102
|
workflow: string | null;
|
|
3452
3103
|
workflow_digest: string | null;
|
|
3453
|
-
feedback: "
|
|
3104
|
+
feedback: "correction" | null;
|
|
3454
3105
|
expected?: Record<string, unknown>;
|
|
3455
3106
|
};
|
|
3456
3107
|
/** A workflow run's graph, live (GET /runs/{run_id}/graph). */
|
|
@@ -3538,28 +3189,18 @@ export type HandBackRunComputerResponse = {
|
|
|
3538
3189
|
/** The run's learning whole: its seed, merge, verdict, problems and cost (GET /runs/{run_id}/learning). */
|
|
3539
3190
|
export type GetRunLearningResponse = {
|
|
3540
3191
|
run: string;
|
|
3541
|
-
state: "seeded" | "reflecting" | "
|
|
3542
|
-
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "
|
|
3192
|
+
state: "seeded" | "reflecting" | "merged" | "dropped";
|
|
3193
|
+
reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | null;
|
|
3543
3194
|
detail: string | null;
|
|
3544
3195
|
at: string;
|
|
3545
3196
|
seed: string | null;
|
|
3546
3197
|
merged: string | null;
|
|
3547
|
-
|
|
3198
|
+
workflows: Array<{
|
|
3548
3199
|
file: string;
|
|
3549
3200
|
name: string;
|
|
3201
|
+
pending?: true;
|
|
3550
3202
|
}>;
|
|
3551
|
-
|
|
3552
|
-
merge: boolean;
|
|
3553
|
-
reason: string;
|
|
3554
|
-
items: Array<{
|
|
3555
|
-
file: string;
|
|
3556
|
-
keep: boolean;
|
|
3557
|
-
pending?: true;
|
|
3558
|
-
origin?: "you" | "run";
|
|
3559
|
-
question?: string;
|
|
3560
|
-
why: string;
|
|
3561
|
-
}>;
|
|
3562
|
-
} | null;
|
|
3203
|
+
corrections: number;
|
|
3563
3204
|
problems: Array<{
|
|
3564
3205
|
rule: string;
|
|
3565
3206
|
path?: string;
|
|
@@ -3567,7 +3208,6 @@ export type GetRunLearningResponse = {
|
|
|
3567
3208
|
}>;
|
|
3568
3209
|
compiled: {
|
|
3569
3210
|
workflow: string;
|
|
3570
|
-
from_notes: Array<string>;
|
|
3571
3211
|
attempts: Array<{
|
|
3572
3212
|
ok: boolean;
|
|
3573
3213
|
errors: Array<string>;
|
|
@@ -3576,51 +3216,13 @@ export type GetRunLearningResponse = {
|
|
|
3576
3216
|
promoted: boolean | null;
|
|
3577
3217
|
} | null;
|
|
3578
3218
|
draft_errors: Array<string>;
|
|
3579
|
-
cost_usd: {
|
|
3580
|
-
grade: number | null;
|
|
3581
|
-
};
|
|
3582
|
-
tokens: {
|
|
3583
|
-
grade: {
|
|
3584
|
-
input: number;
|
|
3585
|
-
cache_read: number;
|
|
3586
|
-
cache_write: number;
|
|
3587
|
-
output: number;
|
|
3588
|
-
} | null;
|
|
3589
|
-
};
|
|
3590
3219
|
used: {
|
|
3591
|
-
skills: Array<{
|
|
3592
|
-
name: string;
|
|
3593
|
-
read: boolean;
|
|
3594
|
-
}>;
|
|
3595
3220
|
workflows: Array<{
|
|
3596
3221
|
name: string;
|
|
3597
3222
|
calls: number;
|
|
3598
3223
|
failed: number;
|
|
3599
3224
|
}>;
|
|
3600
3225
|
};
|
|
3601
|
-
given?: Array<{
|
|
3602
|
-
file: string;
|
|
3603
|
-
name: string;
|
|
3604
|
-
}>;
|
|
3605
|
-
read?: Array<{
|
|
3606
|
-
file: string;
|
|
3607
|
-
name: string;
|
|
3608
|
-
}>;
|
|
3609
|
-
learned?: Array<{
|
|
3610
|
-
file: string;
|
|
3611
|
-
name: string;
|
|
3612
|
-
supersedes: Array<string>;
|
|
3613
|
-
}>;
|
|
3614
|
-
skills?: Array<{
|
|
3615
|
-
file: string;
|
|
3616
|
-
name: string;
|
|
3617
|
-
pending?: true;
|
|
3618
|
-
}>;
|
|
3619
|
-
workflows?: Array<{
|
|
3620
|
-
file: string;
|
|
3621
|
-
name: string;
|
|
3622
|
-
pending?: true;
|
|
3623
|
-
}>;
|
|
3624
3226
|
graded?: {
|
|
3625
3227
|
run_id: string;
|
|
3626
3228
|
correct: boolean;
|
|
@@ -3629,7 +3231,7 @@ export type GetRunLearningResponse = {
|
|
|
3629
3231
|
path: "agent" | "handed_back" | "workflow" | "replay" | "audit";
|
|
3630
3232
|
workflow: string | null;
|
|
3631
3233
|
workflow_digest: string | null;
|
|
3632
|
-
feedback: "
|
|
3234
|
+
feedback: "correction" | null;
|
|
3633
3235
|
feedback_status: "running" | "ended" | "not_run" | null;
|
|
3634
3236
|
};
|
|
3635
3237
|
} | null;
|
|
@@ -3721,6 +3323,38 @@ export interface GetTimelineParams {
|
|
|
3721
3323
|
"Last-Event-ID"?: string;
|
|
3722
3324
|
}
|
|
3723
3325
|
export type GetTimelineResponse = TimelinePage;
|
|
3326
|
+
/** A run's trace: each model request and tool call, with its time, tokens and cost (GET /runs/{run_id}/trace). */
|
|
3327
|
+
export type GetRunTraceResponse = {
|
|
3328
|
+
run_id: Id;
|
|
3329
|
+
model_requests: "priced" | "tokens_only" | "not_recorded";
|
|
3330
|
+
spans: Array<{
|
|
3331
|
+
id: string;
|
|
3332
|
+
kind: "model" | "tool";
|
|
3333
|
+
parent_id: string | null;
|
|
3334
|
+
name: string;
|
|
3335
|
+
agent_label: string | null;
|
|
3336
|
+
started_at: Timestamp;
|
|
3337
|
+
ended_at: string | null;
|
|
3338
|
+
status: "ok" | "failed" | "refused" | "interrupted" | "waiting" | "running";
|
|
3339
|
+
stop_reason: string | null;
|
|
3340
|
+
tokens: {
|
|
3341
|
+
input: number;
|
|
3342
|
+
cache_read: number;
|
|
3343
|
+
cache_write: number;
|
|
3344
|
+
output: number;
|
|
3345
|
+
reasoning?: number;
|
|
3346
|
+
} | null;
|
|
3347
|
+
usd: number | null;
|
|
3348
|
+
decision: boolean;
|
|
3349
|
+
charged: boolean;
|
|
3350
|
+
not_metered: boolean;
|
|
3351
|
+
tool_use_id: string | null;
|
|
3352
|
+
input_preview: string | null;
|
|
3353
|
+
result_preview: string | null;
|
|
3354
|
+
result_size_bytes: number | null;
|
|
3355
|
+
}>;
|
|
3356
|
+
dropped: number;
|
|
3357
|
+
};
|
|
3724
3358
|
/** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
|
|
3725
3359
|
export type UnarchiveRunResponse = Record<string, unknown>;
|
|
3726
3360
|
/** Complete a backend SDK task (POST /sdk-runs/{run_id}/complete). */
|
|
@@ -3805,10 +3439,6 @@ export type StartSdkRunResponse = {
|
|
|
3805
3439
|
enabled: boolean;
|
|
3806
3440
|
revision: string | null;
|
|
3807
3441
|
context: string;
|
|
3808
|
-
skills: Array<{
|
|
3809
|
-
name: string;
|
|
3810
|
-
files: Record<string, string>;
|
|
3811
|
-
}>;
|
|
3812
3442
|
workflows: Array<{
|
|
3813
3443
|
name: string;
|
|
3814
3444
|
workflow: string;
|
|
@@ -3955,6 +3585,7 @@ export type ApplyTemplateBody = {
|
|
|
3955
3585
|
parameters?: Record<string, unknown>;
|
|
3956
3586
|
servers?: Record<string, string>;
|
|
3957
3587
|
grants?: Array<string>;
|
|
3588
|
+
agent_id?: string;
|
|
3958
3589
|
overrides?: {
|
|
3959
3590
|
model?: string;
|
|
3960
3591
|
choice?: string;
|
|
@@ -4063,7 +3694,7 @@ export type ImportTemplateResponse = {
|
|
|
4063
3694
|
budget: {
|
|
4064
3695
|
per_run_usd: number;
|
|
4065
3696
|
} | null;
|
|
4066
|
-
learning: boolean
|
|
3697
|
+
learning: boolean | Record<string, unknown>;
|
|
4067
3698
|
approvals_default: "ask" | "never";
|
|
4068
3699
|
triggers: Array<Record<string, unknown>>;
|
|
4069
3700
|
skills: Array<string>;
|
|
@@ -4154,7 +3785,7 @@ export type ListTemplatesResponse = {
|
|
|
4154
3785
|
budget: {
|
|
4155
3786
|
per_run_usd: number;
|
|
4156
3787
|
} | null;
|
|
4157
|
-
learning: boolean
|
|
3788
|
+
learning: boolean | Record<string, unknown>;
|
|
4158
3789
|
approvals_default: "ask" | "never";
|
|
4159
3790
|
triggers: Array<Record<string, unknown>>;
|
|
4160
3791
|
skills: Array<string>;
|
|
@@ -4165,11 +3796,11 @@ export type ListTemplatesResponse = {
|
|
|
4165
3796
|
/** The tool keys a person may save, and which are set: names only, never a value (GET /settings/tool-keys). */
|
|
4166
3797
|
export type ListToolKeysResponse = {
|
|
4167
3798
|
keys: Array<{
|
|
4168
|
-
id: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "openrouter";
|
|
3799
|
+
id: "parallel" | "monid" | "browserbase" | "kernel" | "typesafe" | "anthropic" | "openai" | "particle" | "openrouter";
|
|
4169
3800
|
kind: "tool" | "model";
|
|
4170
3801
|
label: string;
|
|
4171
3802
|
unlocks: Array<string>;
|
|
4172
|
-
harnesses: Array<
|
|
3803
|
+
harnesses: Array<string>;
|
|
4173
3804
|
fields: Array<{
|
|
4174
3805
|
name: string;
|
|
4175
3806
|
set: boolean;
|
|
@@ -5464,6 +5095,8 @@ export declare function resources(call: Call): {
|
|
|
5464
5095
|
connectNative: (body: ConnectNativeBody, options?: RequestOptions) => Promise<ConnectNativeResponse>;
|
|
5465
5096
|
/** Create an agent home (POST /agents). */
|
|
5466
5097
|
create: (body: CreateAgentBody, params?: CreateAgentParams, options?: RequestOptions) => Promise<CreateAgentResponse>;
|
|
5098
|
+
/** Delete an agent another system owns (DELETE /agents/{agent_id}). */
|
|
5099
|
+
deleteAgent: (agentId: string, options?: RequestOptions) => Promise<void>;
|
|
5467
5100
|
/** Remove an agent's own Archil disk, and everything on it (DELETE /agents/{agent_id}/archil). */
|
|
5468
5101
|
deleteAgentArchil: (agentId: string, options?: RequestOptions) => Promise<DeleteAgentArchilResponse>;
|
|
5469
5102
|
/** Disconnect future native jobs while retaining source configuration and history (POST /agents/{agent_id}/native/disconnect). */
|
|
@@ -5538,36 +5171,24 @@ export declare function resources(call: Call): {
|
|
|
5538
5171
|
write: (agentId: string, path: string, body: RawBody, options?: BodyOptions) => Promise<WriteHomeFileResponse>;
|
|
5539
5172
|
};
|
|
5540
5173
|
learning: {
|
|
5541
|
-
/**
|
|
5542
|
-
|
|
5543
|
-
/** Cancel a running learning batch (POST /agents/{agent_id}/learning/batches/{batch_id}/cancel). */
|
|
5544
|
-
batchCancel: (agentId: string, batchId: string, options?: RequestOptions) => Promise<CancelLearningBatchResponse>;
|
|
5545
|
-
/** 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). */
|
|
5546
|
-
batchStart: (agentId: string, body: CreateLearningBatchBody, options?: RequestOptions) => Promise<CreateLearningBatchResponse>;
|
|
5547
|
-
/** The agent's learning batches, latest first (GET /agents/{agent_id}/learning/batches). */
|
|
5548
|
-
batches: (agentId: string, options?: RequestOptions) => Promise<ListLearningBatchesResponse>;
|
|
5174
|
+
/** The agent's corrections.md on main, with its ETag (GET /agents/{agent_id}/learning/corrections). */
|
|
5175
|
+
corrections: (agentId: string, options?: RequestOptions) => Promise<Tagged<GetLearningCorrectionsResponse>>;
|
|
5549
5176
|
/** 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). */
|
|
5550
5177
|
cost: (agentId: string, params?: GetLearningCostParams, options?: RequestOptions) => Promise<GetLearningCostResponse | string>;
|
|
5551
|
-
/**
|
|
5552
|
-
evals: (agentId: string, options?: RequestOptions) => Promise<ListLearningEvalsResponse>;
|
|
5553
|
-
/** What the agent has learned: its index, notes, log of changes and counts (GET /agents/{agent_id}/learning). */
|
|
5178
|
+
/** What the agent has learned: its corrections, workflow drafts, log of changes and counts (GET /agents/{agent_id}/learning). */
|
|
5554
5179
|
get: (agentId: string, options?: RequestOptions) => Promise<GetAgentLearningResponse>;
|
|
5555
5180
|
/** A page of the changes on the agent's main, newest first (GET /agents/{agent_id}/learning/log). */
|
|
5556
5181
|
log: (agentId: string, params?: ListLearningLogParams, options?: RequestOptions) => Promise<ListLearningLogResponse>;
|
|
5557
|
-
/**
|
|
5558
|
-
notes: (agentId: string, params?: ListLearningNotesParams, options?: RequestOptions) => Promise<ListLearningNotesResponse>;
|
|
5559
|
-
/** 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}). */
|
|
5182
|
+
/** 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}). */
|
|
5560
5183
|
read: (agentId: string, file: string, options?: RequestOptions) => Promise<Tagged<ReadLearningFileResponse | string>>;
|
|
5561
|
-
/** 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). */
|
|
5562
|
-
recordEval: (agentId: string, body: RecordLearningEvalBody, params?: RecordLearningEvalParams, options?: RequestOptions) => Promise<RecordLearningEvalResponse>;
|
|
5563
5184
|
/** 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}). */
|
|
5564
5185
|
replay: (agentId: string, name: string, digest: string, replayId: string, options?: RequestOptions) => Promise<GetLearnedWorkflowReplayResponse>;
|
|
5565
|
-
/** Retire a
|
|
5186
|
+
/** Retire a workflow draft: out of every later run, kept in history (POST /agents/{agent_id}/learning/files/{file}/retire). */
|
|
5566
5187
|
retire: (agentId: string, file: string, params?: RetireLearningFileParams, options?: RequestOptions) => Promise<Tagged<string>>;
|
|
5567
5188
|
/** 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). */
|
|
5568
5189
|
workflowRevisions: (agentId: string, name: string, params?: ListLearnedWorkflowRevisionsParams, options?: RequestOptions) => Promise<ListLearnedWorkflowRevisionsResponse>;
|
|
5569
|
-
/**
|
|
5570
|
-
|
|
5190
|
+
/** Replace the agent's corrections.md (If-Match) (PUT /agents/{agent_id}/learning/corrections). */
|
|
5191
|
+
writeCorrections: (agentId: string, body: PutLearningCorrectionsBody | RawBody, params: PutLearningCorrectionsParams, options?: BodyOptions) => Promise<Tagged<PutLearningCorrectionsResponse>>;
|
|
5571
5192
|
};
|
|
5572
5193
|
local: {
|
|
5573
5194
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
@@ -5590,6 +5211,8 @@ export declare function resources(call: Call): {
|
|
|
5590
5211
|
getCalendar: (options?: RequestOptions) => Promise<GetCalendarResponse>;
|
|
5591
5212
|
/** This server's ChatGPT sign-in: its state, who and which plan, never a token (GET /settings/chatgpt). */
|
|
5592
5213
|
getChatGptsignIn: (options?: RequestOptions) => Promise<GetChatGPTSignInResponse>;
|
|
5214
|
+
/** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
|
|
5215
|
+
getClaudeLogin: (options?: RequestOptions) => Promise<GetClaudeLoginResponse>;
|
|
5593
5216
|
/** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
|
|
5594
5217
|
getEmailAccount: (options?: RequestOptions) => Promise<GetEmailAccountResponse>;
|
|
5595
5218
|
/** Whether a GitHub App is connected, and if so its id, slug and installations, never a secret (GET /integrations/github). */
|
|
@@ -5624,6 +5247,8 @@ export declare function resources(call: Call): {
|
|
|
5624
5247
|
signOutChatGpt: (options?: RequestOptions) => Promise<SignOutChatGPTResponse>;
|
|
5625
5248
|
/** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
|
|
5626
5249
|
startChatGptsignIn: (options?: RequestOptions) => Promise<StartChatGPTSignInResponse>;
|
|
5250
|
+
/** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
|
|
5251
|
+
startClaudeLogin: (options?: RequestOptions) => Promise<StartClaudeLoginResponse>;
|
|
5627
5252
|
/** Read the calendar and say what it holds (POST /settings/calendar/test). */
|
|
5628
5253
|
testCalendar: (body?: TestCalendarBody, options?: RequestOptions) => Promise<TestCalendarResponse>;
|
|
5629
5254
|
/** Test a computer provider's account with its saved keys (POST /computers/{provider}/test). */
|
|
@@ -5632,6 +5257,10 @@ export declare function resources(call: Call): {
|
|
|
5632
5257
|
testEmailAccount: (body?: TestEmailAccountBody, options?: RequestOptions) => Promise<TestEmailAccountResponse>;
|
|
5633
5258
|
/** Test the Archil account key at its region's control plane (POST /workspace/archil/test). */
|
|
5634
5259
|
testWorkspaceArchil: (options?: RequestOptions) => Promise<TestWorkspaceArchilResponse>;
|
|
5260
|
+
/** Turn off Claude Code's login on this machine (DELETE /settings/claude-login). */
|
|
5261
|
+
turnOffClaudeLogin: (options?: RequestOptions) => Promise<TurnOffClaudeLoginResponse>;
|
|
5262
|
+
/** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
|
|
5263
|
+
turnOnClaudeLogin: (body: TurnOnClaudeLoginBody, options?: RequestOptions) => Promise<TurnOnClaudeLoginResponse>;
|
|
5635
5264
|
};
|
|
5636
5265
|
mcpServers: {
|
|
5637
5266
|
/** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
|
|
@@ -5708,6 +5337,8 @@ export declare function resources(call: Call): {
|
|
|
5708
5337
|
takeOverRunComputer: (runId: string, body?: TakeOverRunComputerBody, options?: RequestOptions) => Promise<TakeOverRunComputerResponse>;
|
|
5709
5338
|
/** The run's timeline, as a page or a stream (GET /runs/{run_id}/timeline). */
|
|
5710
5339
|
timeline: (runId: string, params?: GetTimelineParams, options?: RequestOptions) => Promise<GetTimelineResponse>;
|
|
5340
|
+
/** A run's trace: each model request and tool call, with its time, tokens and cost (GET /runs/{run_id}/trace). */
|
|
5341
|
+
trace: (runId: string, options?: RequestOptions) => Promise<GetRunTraceResponse>;
|
|
5711
5342
|
/** Show the archived run in the lists again (POST /runs/{run_id}/unarchive). */
|
|
5712
5343
|
unarchive: (runId: string, options?: RequestOptions) => Promise<UnarchiveRunResponse>;
|
|
5713
5344
|
};
|