windmill-client 1.795.0 → 1.796.0
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/dist/core/OpenAPI.mjs +1 -1
- package/dist/index.js +312 -7
- package/dist/index.mjs +2 -2
- package/dist/services.gen.d.ts +169 -3
- package/dist/services.gen.mjs +310 -7
- package/dist/types.gen.d.ts +907 -46
- package/package.json +1 -1
package/dist/types.gen.d.ts
CHANGED
|
@@ -1479,6 +1479,249 @@ export type JwksResponse = {
|
|
|
1479
1479
|
[key: string]: unknown;
|
|
1480
1480
|
}>;
|
|
1481
1481
|
};
|
|
1482
|
+
/**
|
|
1483
|
+
* What an eval run is executed against.
|
|
1484
|
+
*/
|
|
1485
|
+
export type EvalSubject = {
|
|
1486
|
+
/**
|
|
1487
|
+
* `agent` runs the ai_agent resource as it is deployed when the run opens, `agent_draft` the caller's unsaved edits of it as the editor holds them (carried in `draft`), and `agent_version` one past version named by `version`. The first and last are read server-side; all three are inlined into the run, so every case of a run executes one configuration: a deploy part-way through changes what the next run measures, never this one.
|
|
1488
|
+
*
|
|
1489
|
+
*/
|
|
1490
|
+
kind: 'agent' | 'agent_draft' | 'agent_version';
|
|
1491
|
+
/**
|
|
1492
|
+
* Path of the ai_agent resource.
|
|
1493
|
+
*/
|
|
1494
|
+
path: string;
|
|
1495
|
+
/**
|
|
1496
|
+
* The agent's per-path version number when the run opened: how many times the resource had been saved, not a resource_version row id. For `agent` and `agent_draft` it names the configuration the run read and every case executed. For `agent_version` it is the request's own, says which version to inline, and is required.
|
|
1497
|
+
*
|
|
1498
|
+
*/
|
|
1499
|
+
version?: number | null;
|
|
1500
|
+
draft?: AgentDraft;
|
|
1501
|
+
/**
|
|
1502
|
+
* Hash of the configuration a draft run executed, stamped server-side. A draft moves without the version moving, so this is what dates a run of one. It is also what recognises a draft run whose configuration was later deployed: when it matches the agent as deployed, the run's kind and version are rewritten to that version, once, and the hash is kept as what the resolution rests on.
|
|
1503
|
+
*
|
|
1504
|
+
*/
|
|
1505
|
+
draft_hash?: string;
|
|
1506
|
+
};
|
|
1507
|
+
/**
|
|
1508
|
+
* The brain and tools of an agent, as the flow editor holds them. Carried by the request and present exactly when the subject kind is `agent_draft` — the edits exist only in the editor — where it is the whole definition of what ran: the run goes through the same unlinked branch of the agent executor the editor's own test uses.
|
|
1509
|
+
*
|
|
1510
|
+
*/
|
|
1511
|
+
export type AgentDraft = {
|
|
1512
|
+
/**
|
|
1513
|
+
* The agent's input transforms: provider, system prompt, output type and the rest. The message and attachments come from the case and override anything named here.
|
|
1514
|
+
*
|
|
1515
|
+
*/
|
|
1516
|
+
input_transforms?: {
|
|
1517
|
+
[key: string]: unknown;
|
|
1518
|
+
};
|
|
1519
|
+
tools?: Array<{
|
|
1520
|
+
[key: string]: unknown;
|
|
1521
|
+
}>;
|
|
1522
|
+
};
|
|
1523
|
+
export type EvalDataset = {
|
|
1524
|
+
path: string;
|
|
1525
|
+
summary?: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* The columns of the results table, in display order.
|
|
1528
|
+
*/
|
|
1529
|
+
scorers?: Array<Scorer>;
|
|
1530
|
+
created_at: string;
|
|
1531
|
+
created_by: string;
|
|
1532
|
+
edited_at: string;
|
|
1533
|
+
edited_by: string;
|
|
1534
|
+
};
|
|
1535
|
+
/**
|
|
1536
|
+
* The inputs a standalone run feeds the agent.
|
|
1537
|
+
*/
|
|
1538
|
+
export type EvalCaseInput = {
|
|
1539
|
+
user_message?: string;
|
|
1540
|
+
user_attachments?: Array<{
|
|
1541
|
+
[key: string]: unknown;
|
|
1542
|
+
}>;
|
|
1543
|
+
};
|
|
1544
|
+
export type NewEvalCase = {
|
|
1545
|
+
input?: EvalCaseInput;
|
|
1546
|
+
/**
|
|
1547
|
+
* Reference output a scorer compares a rerun against.
|
|
1548
|
+
*/
|
|
1549
|
+
expected?: unknown;
|
|
1550
|
+
};
|
|
1551
|
+
export type SaveEvalCase = {
|
|
1552
|
+
/**
|
|
1553
|
+
* Absent for a case the dataset does not hold yet.
|
|
1554
|
+
*/
|
|
1555
|
+
id?: string;
|
|
1556
|
+
} & NewEvalCase;
|
|
1557
|
+
export type EvalCase = {
|
|
1558
|
+
id: string;
|
|
1559
|
+
created_at: string;
|
|
1560
|
+
created_by: string;
|
|
1561
|
+
} & NewEvalCase;
|
|
1562
|
+
/**
|
|
1563
|
+
* A scorer is a column of the results table, and it is always a runnable: an ai_agent resource sent the run to grade, or a script handed the run as an argument. `id` is assigned when the scorer is added to a dataset and never reused: it is what makes a column the same column across experiments when the scorer is renamed, and a delta is only ever computed between two scores carrying the same id. A scorer sent without an id is given one.
|
|
1564
|
+
*
|
|
1565
|
+
*/
|
|
1566
|
+
export type Scorer = {
|
|
1567
|
+
id?: string;
|
|
1568
|
+
/**
|
|
1569
|
+
* Column header. Defaults to the last segment of the path.
|
|
1570
|
+
*/
|
|
1571
|
+
name?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* A score at or above this counts as a pass, and the column reports a pass rate beside its mean. Applied when results are read rather than when they are produced, so moving the line re-reads every score already recorded instead of invalidating them.
|
|
1574
|
+
*
|
|
1575
|
+
*/
|
|
1576
|
+
pass_if?: number;
|
|
1577
|
+
kind: 'script' | 'agent';
|
|
1578
|
+
/**
|
|
1579
|
+
* The script, or the ai_agent resource used as a judge.
|
|
1580
|
+
*/
|
|
1581
|
+
path: string;
|
|
1582
|
+
};
|
|
1583
|
+
/**
|
|
1584
|
+
* One run of a dataset: written once when the dataset is run, and only ever read afterwards. The case set it executed is returned by the results endpoint, not here: a listing would otherwise send the whole dataset back once per experiment.
|
|
1585
|
+
*/
|
|
1586
|
+
export type EvalExperiment = {
|
|
1587
|
+
id: string;
|
|
1588
|
+
dataset: string;
|
|
1589
|
+
subject: EvalSubject;
|
|
1590
|
+
/**
|
|
1591
|
+
* This agent's nth run of this dataset, allocated once and never reused. What a run is called. Numbered per agent rather than per subject kind: runs of what is deployed and runs of its draft are the same agent's history.
|
|
1592
|
+
*
|
|
1593
|
+
*/
|
|
1594
|
+
run_number: number;
|
|
1595
|
+
/**
|
|
1596
|
+
* The flow executing the run: one job holding every case and its scores.
|
|
1597
|
+
*
|
|
1598
|
+
*/
|
|
1599
|
+
run_job_id: string;
|
|
1600
|
+
case_count: number;
|
|
1601
|
+
/**
|
|
1602
|
+
* What the run scored, one entry per scorer that produced a number. Carried on the run itself so a list of runs can say what each one scored without reading every cell of every one of them. Empty on a run whose scores have not been read yet.
|
|
1603
|
+
*
|
|
1604
|
+
*/
|
|
1605
|
+
scores?: Array<ExperimentScore>;
|
|
1606
|
+
/**
|
|
1607
|
+
* Whether the flow executing this run is still going. What makes a list of runs worth watching rather than worth reloading.
|
|
1608
|
+
*
|
|
1609
|
+
*/
|
|
1610
|
+
running?: boolean;
|
|
1611
|
+
created_at: string;
|
|
1612
|
+
created_by: string;
|
|
1613
|
+
};
|
|
1614
|
+
/**
|
|
1615
|
+
* One scorer's headline for one run: the two numbers a column reports, over that run's cells.
|
|
1616
|
+
*/
|
|
1617
|
+
export type ExperimentScore = {
|
|
1618
|
+
scorer_id: string;
|
|
1619
|
+
/**
|
|
1620
|
+
* What the column is called in the dataset that ran it, resolved server-side because a list of runs spanning datasets cannot hold every dataset's scorers to look it up.
|
|
1621
|
+
*
|
|
1622
|
+
*/
|
|
1623
|
+
name: string;
|
|
1624
|
+
kind: 'agent' | 'script';
|
|
1625
|
+
mean?: number;
|
|
1626
|
+
/**
|
|
1627
|
+
* The share of scored cells at or above the column's threshold, for a column that has one. Absent where the column has no threshold and the mean is the whole headline.
|
|
1628
|
+
*
|
|
1629
|
+
*/
|
|
1630
|
+
pass_rate?: number;
|
|
1631
|
+
scored: number;
|
|
1632
|
+
/**
|
|
1633
|
+
* How many of the run's cells the column failed on. A column that failed on all of them has no number to report and is still one of the columns that ran.
|
|
1634
|
+
*
|
|
1635
|
+
*/
|
|
1636
|
+
failed: number;
|
|
1637
|
+
};
|
|
1638
|
+
/**
|
|
1639
|
+
* One scorer's verdict on one run, and how it compares with the baseline.
|
|
1640
|
+
*/
|
|
1641
|
+
export type CellScore = {
|
|
1642
|
+
scorer_id: string;
|
|
1643
|
+
score?: number;
|
|
1644
|
+
reason?: string;
|
|
1645
|
+
checks?: unknown;
|
|
1646
|
+
error?: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* The scorer read this case and had nothing to measure on it. Left out of the column's mean and pass rate rather than counted as a zero.
|
|
1649
|
+
*
|
|
1650
|
+
*/
|
|
1651
|
+
not_applicable?: boolean;
|
|
1652
|
+
/**
|
|
1653
|
+
* A scoring job is still running for this cell.
|
|
1654
|
+
*/
|
|
1655
|
+
pending: boolean;
|
|
1656
|
+
/**
|
|
1657
|
+
* Which side of the scorer's `pass_if` threshold the score fell on. Absent when the column has no threshold, or has no score yet.
|
|
1658
|
+
*
|
|
1659
|
+
*/
|
|
1660
|
+
passed?: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* The same scorer's number on the baseline experiment.
|
|
1663
|
+
*/
|
|
1664
|
+
baseline?: number;
|
|
1665
|
+
/**
|
|
1666
|
+
* The baseline's score came from a different definition of this scorer, so the delta is a change of scorer as much as a change of agent.
|
|
1667
|
+
*
|
|
1668
|
+
*/
|
|
1669
|
+
definition_changed: boolean;
|
|
1670
|
+
};
|
|
1671
|
+
export type ExperimentRow = {
|
|
1672
|
+
case_id: string;
|
|
1673
|
+
input: EvalCaseInput;
|
|
1674
|
+
expected?: unknown;
|
|
1675
|
+
/**
|
|
1676
|
+
* The iteration that ran this case. Absent between a run being recorded and its flow reaching this case, which reads as a case still to run.
|
|
1677
|
+
*
|
|
1678
|
+
*/
|
|
1679
|
+
job_id?: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* The case's status; `running` until its iteration completes, and `unavailable` for a case whose job was retained away before anything read what it produced.
|
|
1682
|
+
*
|
|
1683
|
+
*/
|
|
1684
|
+
status: 'running' | 'success' | 'failure' | 'canceled' | 'skipped' | 'unavailable';
|
|
1685
|
+
/**
|
|
1686
|
+
* The agent's answer. The full trajectory stays reachable through job_id.
|
|
1687
|
+
*/
|
|
1688
|
+
output?: string;
|
|
1689
|
+
/**
|
|
1690
|
+
* The agent version this cell ran against. Cells of one experiment can differ, which the table says rather than averaging two versions silently.
|
|
1691
|
+
*
|
|
1692
|
+
*/
|
|
1693
|
+
subject_version?: number;
|
|
1694
|
+
/**
|
|
1695
|
+
* For a run of unsaved edits, the hash of the configuration this cell ran. Edits move without a version changing, so this is what identifies what ran, and what recognises a run whose edits were later saved as a run of that version.
|
|
1696
|
+
*
|
|
1697
|
+
*/
|
|
1698
|
+
subject_draft_hash?: string;
|
|
1699
|
+
/**
|
|
1700
|
+
* One entry per scorer of the dataset, in column order.
|
|
1701
|
+
*/
|
|
1702
|
+
scores: Array<CellScore>;
|
|
1703
|
+
};
|
|
1704
|
+
/**
|
|
1705
|
+
* A column's summary. There is no single number for a dataset: averaging a judge with an exact match would invent one.
|
|
1706
|
+
*
|
|
1707
|
+
*/
|
|
1708
|
+
export type ScorerMean = {
|
|
1709
|
+
scorer_id: string;
|
|
1710
|
+
mean?: number;
|
|
1711
|
+
baseline_mean?: number;
|
|
1712
|
+
/**
|
|
1713
|
+
* The share of scored cells that passed, for a column with a threshold. Reported beside the mean rather than instead of it: a pass rate says how many cases are good enough, a mean says by how much, and neither answers the other's question.
|
|
1714
|
+
*
|
|
1715
|
+
*/
|
|
1716
|
+
pass_rate?: number;
|
|
1717
|
+
baseline_pass_rate?: number;
|
|
1718
|
+
scored: number;
|
|
1719
|
+
/**
|
|
1720
|
+
* Cells the baseline has no score for, so a column the baseline never ran shows as unscored rather than as a spurious difference.
|
|
1721
|
+
*/
|
|
1722
|
+
missing_in_baseline: number;
|
|
1723
|
+
definition_changed: boolean;
|
|
1724
|
+
};
|
|
1482
1725
|
export type FlowConversation = {
|
|
1483
1726
|
/**
|
|
1484
1727
|
* Unique identifier for the conversation
|
|
@@ -1611,6 +1854,46 @@ export type AIConfig = {
|
|
|
1611
1854
|
max_tokens_per_model?: {
|
|
1612
1855
|
[key: string]: (number);
|
|
1613
1856
|
};
|
|
1857
|
+
model_pricing?: {
|
|
1858
|
+
[key: string]: ModelPriceOverride;
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* negotiated rates in USD per million tokens, keyed `provider:model`
|
|
1863
|
+
*/
|
|
1864
|
+
export type ModelPriceOverride = {
|
|
1865
|
+
input: number;
|
|
1866
|
+
output: number;
|
|
1867
|
+
cache_read?: number;
|
|
1868
|
+
cache_write?: number;
|
|
1869
|
+
};
|
|
1870
|
+
export type AITokenUsageEvent = {
|
|
1871
|
+
provider: AIProvider;
|
|
1872
|
+
model: string;
|
|
1873
|
+
session_id?: string;
|
|
1874
|
+
input_tokens?: number;
|
|
1875
|
+
cache_read_tokens?: number;
|
|
1876
|
+
cache_write_tokens?: number;
|
|
1877
|
+
output_tokens?: number;
|
|
1878
|
+
/**
|
|
1879
|
+
* only set by providers that bill back an exact figure
|
|
1880
|
+
*/
|
|
1881
|
+
reported_cost_nano_usd?: number;
|
|
1882
|
+
requests?: number;
|
|
1883
|
+
};
|
|
1884
|
+
export type AITokenUsageBucket = {
|
|
1885
|
+
/**
|
|
1886
|
+
* the grouped dimension's value; empty when grouping by model
|
|
1887
|
+
*/
|
|
1888
|
+
key: string;
|
|
1889
|
+
provider: string;
|
|
1890
|
+
model: string;
|
|
1891
|
+
input_tokens: number;
|
|
1892
|
+
cache_read_tokens: number;
|
|
1893
|
+
cache_write_tokens: number;
|
|
1894
|
+
output_tokens: number;
|
|
1895
|
+
reported_cost_nano_usd?: number;
|
|
1896
|
+
requests: number;
|
|
1614
1897
|
};
|
|
1615
1898
|
export type InstanceAIProviderSummary = {
|
|
1616
1899
|
provider: AIProvider;
|
|
@@ -2588,7 +2871,14 @@ export type Resource = {
|
|
|
2588
2871
|
ws_specific?: boolean;
|
|
2589
2872
|
};
|
|
2590
2873
|
export type ResourceVersion = {
|
|
2874
|
+
/**
|
|
2875
|
+
* How this version is addressed. Unique across every resource, so it says nothing about how many times this one has been saved.
|
|
2876
|
+
*/
|
|
2591
2877
|
id: number;
|
|
2878
|
+
/**
|
|
2879
|
+
* Which version of this resource it is, counted from its first. What a version is called.
|
|
2880
|
+
*/
|
|
2881
|
+
version: number;
|
|
2592
2882
|
created_at: string;
|
|
2593
2883
|
created_by?: string;
|
|
2594
2884
|
};
|
|
@@ -9497,7 +9787,10 @@ export type ClearResourceHistoryData = {
|
|
|
9497
9787
|
};
|
|
9498
9788
|
export type ClearResourceHistoryResponse = string;
|
|
9499
9789
|
export type GetResourceVersionData = {
|
|
9500
|
-
|
|
9790
|
+
/**
|
|
9791
|
+
* The version's id, not its number.
|
|
9792
|
+
*/
|
|
9793
|
+
id: number;
|
|
9501
9794
|
workspace: string;
|
|
9502
9795
|
};
|
|
9503
9796
|
export type GetResourceVersionResponse = ResourceVersion & {
|
|
@@ -9505,7 +9798,10 @@ export type GetResourceVersionResponse = ResourceVersion & {
|
|
|
9505
9798
|
missing_references: Array<(string)>;
|
|
9506
9799
|
};
|
|
9507
9800
|
export type RestoreResourceVersionData = {
|
|
9508
|
-
|
|
9801
|
+
/**
|
|
9802
|
+
* The version's id, not its number.
|
|
9803
|
+
*/
|
|
9804
|
+
id: number;
|
|
9509
9805
|
workspace: string;
|
|
9510
9806
|
};
|
|
9511
9807
|
export type RestoreResourceVersionResponse = string;
|
|
@@ -13890,68 +14186,276 @@ export type ListConversationMessagesData = {
|
|
|
13890
14186
|
workspace: string;
|
|
13891
14187
|
};
|
|
13892
14188
|
export type ListConversationMessagesResponse = Array<FlowConversationMessage>;
|
|
13893
|
-
export type
|
|
14189
|
+
export type ListEvalDatasetsData = {
|
|
14190
|
+
workspace: string;
|
|
14191
|
+
};
|
|
14192
|
+
export type ListEvalDatasetsResponse = Array<EvalDataset>;
|
|
14193
|
+
export type CreateEvalDatasetData = {
|
|
13894
14194
|
/**
|
|
13895
|
-
*
|
|
13896
|
-
* cache. Used right after a deploy so the new path appears immediately.
|
|
13897
|
-
*
|
|
14195
|
+
* new eval dataset
|
|
13898
14196
|
*/
|
|
13899
|
-
|
|
14197
|
+
requestBody: {
|
|
14198
|
+
path: string;
|
|
14199
|
+
summary?: string;
|
|
14200
|
+
scorers?: Array<Scorer>;
|
|
14201
|
+
/**
|
|
14202
|
+
* The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards.
|
|
14203
|
+
*/
|
|
14204
|
+
cases?: Array<NewEvalCase>;
|
|
14205
|
+
};
|
|
13900
14206
|
workspace: string;
|
|
13901
14207
|
};
|
|
13902
|
-
export type
|
|
13903
|
-
|
|
14208
|
+
export type CreateEvalDatasetResponse = string;
|
|
14209
|
+
export type GetEvalDatasetData = {
|
|
14210
|
+
path: string;
|
|
14211
|
+
workspace: string;
|
|
13904
14212
|
};
|
|
13905
|
-
export type
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
*/
|
|
13909
|
-
createdBy?: string;
|
|
13910
|
-
/**
|
|
13911
|
-
* When true, append per-user draft rows whose path has no
|
|
13912
|
-
* deployed counterpart. Synthesized rows carry `draft_only: true`
|
|
13913
|
-
* so the home page can render a "Draft" badge. Gated to
|
|
13914
|
-
* non-operators + page 0 + no narrowing filters on the backend so
|
|
13915
|
-
* picker callers stay deployed-only and pagination stays clean.
|
|
13916
|
-
*
|
|
13917
|
-
*/
|
|
13918
|
-
includeDraftOnly?: boolean;
|
|
13919
|
-
/**
|
|
13920
|
-
* Filter by label
|
|
13921
|
-
*/
|
|
13922
|
-
label?: string;
|
|
14213
|
+
export type GetEvalDatasetResponse = EvalDataset;
|
|
14214
|
+
export type UpdateEvalDatasetData = {
|
|
14215
|
+
path: string;
|
|
13923
14216
|
/**
|
|
13924
|
-
*
|
|
14217
|
+
* updated eval dataset
|
|
13925
14218
|
*/
|
|
13926
|
-
|
|
14219
|
+
requestBody: {
|
|
14220
|
+
/**
|
|
14221
|
+
* Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has.
|
|
14222
|
+
*
|
|
14223
|
+
*/
|
|
14224
|
+
path?: string;
|
|
14225
|
+
/**
|
|
14226
|
+
* Left out to keep the stored summary; sent as "" to clear it.
|
|
14227
|
+
*/
|
|
14228
|
+
summary?: string;
|
|
14229
|
+
/**
|
|
14230
|
+
* Left out to keep the dataset's columns as they are; sent to replace them wholesale.
|
|
14231
|
+
*
|
|
14232
|
+
*/
|
|
14233
|
+
scorers?: Array<Scorer>;
|
|
14234
|
+
/**
|
|
14235
|
+
* The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it.
|
|
14236
|
+
*
|
|
14237
|
+
*/
|
|
14238
|
+
cases?: Array<SaveEvalCase>;
|
|
14239
|
+
};
|
|
14240
|
+
workspace: string;
|
|
14241
|
+
};
|
|
14242
|
+
export type UpdateEvalDatasetResponse = string;
|
|
14243
|
+
export type DeleteEvalDatasetData = {
|
|
14244
|
+
path: string;
|
|
14245
|
+
workspace: string;
|
|
14246
|
+
};
|
|
14247
|
+
export type DeleteEvalDatasetResponse = string;
|
|
14248
|
+
export type ListEvalCasesData = {
|
|
13927
14249
|
/**
|
|
13928
14250
|
* which page to return (start at 1, default 1)
|
|
13929
14251
|
*/
|
|
13930
14252
|
page?: number;
|
|
14253
|
+
path: string;
|
|
13931
14254
|
/**
|
|
13932
|
-
*
|
|
14255
|
+
* number of items to return for a given page (default 30, max 100)
|
|
13933
14256
|
*/
|
|
13934
|
-
|
|
14257
|
+
perPage?: number;
|
|
14258
|
+
workspace: string;
|
|
14259
|
+
};
|
|
14260
|
+
export type ListEvalCasesResponse = {
|
|
14261
|
+
cases: Array<EvalCase>;
|
|
14262
|
+
};
|
|
14263
|
+
export type EvalSubjectStateData = {
|
|
14264
|
+
path: string;
|
|
14265
|
+
workspace: string;
|
|
14266
|
+
};
|
|
14267
|
+
export type EvalSubjectStateResponse = {
|
|
14268
|
+
version?: number;
|
|
14269
|
+
};
|
|
14270
|
+
export type EvalRunPayloadData = {
|
|
13935
14271
|
/**
|
|
13936
|
-
*
|
|
14272
|
+
* The flow job that answered the case.
|
|
13937
14273
|
*/
|
|
13938
|
-
|
|
14274
|
+
jobId: string;
|
|
14275
|
+
workspace: string;
|
|
14276
|
+
};
|
|
14277
|
+
export type EvalRunPayloadResponse = {
|
|
13939
14278
|
/**
|
|
13940
|
-
*
|
|
14279
|
+
* The case, the answer, and every tool call the agent made.
|
|
13941
14280
|
*/
|
|
13942
|
-
|
|
14281
|
+
run: {
|
|
14282
|
+
[key: string]: unknown;
|
|
14283
|
+
};
|
|
13943
14284
|
/**
|
|
13944
|
-
*
|
|
13945
|
-
* show only the starred items
|
|
13946
|
-
*
|
|
14285
|
+
* The same run as a judge agent is shown it.
|
|
13947
14286
|
*/
|
|
13948
|
-
|
|
14287
|
+
rendered: string;
|
|
14288
|
+
};
|
|
14289
|
+
export type ScorerDefaultsData = {
|
|
13949
14290
|
workspace: string;
|
|
13950
14291
|
};
|
|
13951
|
-
export type
|
|
13952
|
-
export type ResumeSuspendedTriggerJobsData = {
|
|
14292
|
+
export type ScorerDefaultsResponse = {
|
|
13953
14293
|
/**
|
|
13954
|
-
*
|
|
14294
|
+
* The system prompt a judge agent is created with.
|
|
14295
|
+
*/
|
|
14296
|
+
judge_prompt: string;
|
|
14297
|
+
script_template: string;
|
|
14298
|
+
};
|
|
14299
|
+
export type RecentScorersData = {
|
|
14300
|
+
/**
|
|
14301
|
+
* only scorers of this kind
|
|
14302
|
+
*/
|
|
14303
|
+
kind?: 'script' | 'agent';
|
|
14304
|
+
workspace: string;
|
|
14305
|
+
};
|
|
14306
|
+
export type RecentScorersResponse = Array<(Scorer & {
|
|
14307
|
+
/**
|
|
14308
|
+
* The dataset it is a column of.
|
|
14309
|
+
*/
|
|
14310
|
+
dataset: string;
|
|
14311
|
+
})>;
|
|
14312
|
+
export type RunExperimentData = {
|
|
14313
|
+
/**
|
|
14314
|
+
* what to run
|
|
14315
|
+
*/
|
|
14316
|
+
requestBody: {
|
|
14317
|
+
dataset: string;
|
|
14318
|
+
subject: EvalSubject;
|
|
14319
|
+
};
|
|
14320
|
+
workspace: string;
|
|
14321
|
+
};
|
|
14322
|
+
export type RunExperimentResponse = string;
|
|
14323
|
+
export type CollectExperimentData = {
|
|
14324
|
+
id: string;
|
|
14325
|
+
workspace: string;
|
|
14326
|
+
};
|
|
14327
|
+
export type CollectExperimentResponse = number;
|
|
14328
|
+
export type ListAllExperimentsData = {
|
|
14329
|
+
/**
|
|
14330
|
+
* Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
|
|
14331
|
+
*
|
|
14332
|
+
*/
|
|
14333
|
+
subjectPath?: string;
|
|
14334
|
+
workspace: string;
|
|
14335
|
+
};
|
|
14336
|
+
export type ListAllExperimentsResponse = Array<EvalExperiment>;
|
|
14337
|
+
export type ExperimentResultsData = {
|
|
14338
|
+
/**
|
|
14339
|
+
* The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
|
|
14340
|
+
*
|
|
14341
|
+
*/
|
|
14342
|
+
baseline?: string;
|
|
14343
|
+
/**
|
|
14344
|
+
* the experiment to read
|
|
14345
|
+
*/
|
|
14346
|
+
id: string;
|
|
14347
|
+
path: string;
|
|
14348
|
+
workspace: string;
|
|
14349
|
+
};
|
|
14350
|
+
export type ExperimentResultsResponse = {
|
|
14351
|
+
experiment: EvalExperiment;
|
|
14352
|
+
baseline?: EvalExperiment;
|
|
14353
|
+
/**
|
|
14354
|
+
* The columns, which belong to the dataset rather than the experiment.
|
|
14355
|
+
*/
|
|
14356
|
+
scorers: Array<Scorer>;
|
|
14357
|
+
rows: Array<ExperimentRow>;
|
|
14358
|
+
means: Array<ScorerMean>;
|
|
14359
|
+
/**
|
|
14360
|
+
* Cells scoring lower than the baseline, across every column.
|
|
14361
|
+
*/
|
|
14362
|
+
regressed: number;
|
|
14363
|
+
/**
|
|
14364
|
+
* The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists.
|
|
14365
|
+
*
|
|
14366
|
+
*/
|
|
14367
|
+
subject_current_version?: number;
|
|
14368
|
+
/**
|
|
14369
|
+
* What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits.
|
|
14370
|
+
*
|
|
14371
|
+
*/
|
|
14372
|
+
subject_deployed_hash?: string;
|
|
14373
|
+
};
|
|
14374
|
+
export type ListPathAutocompletePathsData = {
|
|
14375
|
+
/**
|
|
14376
|
+
* bypass the server-side cache and re-query the DB, refreshing the
|
|
14377
|
+
* cache. Used right after a deploy so the new path appears immediately.
|
|
14378
|
+
*
|
|
14379
|
+
*/
|
|
14380
|
+
force?: boolean;
|
|
14381
|
+
workspace: string;
|
|
14382
|
+
};
|
|
14383
|
+
export type ListPathAutocompletePathsResponse = {
|
|
14384
|
+
paths: Array<(string)>;
|
|
14385
|
+
};
|
|
14386
|
+
export type ListRawAppsData = {
|
|
14387
|
+
/**
|
|
14388
|
+
* filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')
|
|
14389
|
+
*/
|
|
14390
|
+
createdBy?: string;
|
|
14391
|
+
/**
|
|
14392
|
+
* When true, append per-user draft rows whose path has no
|
|
14393
|
+
* deployed counterpart. Synthesized rows carry `draft_only: true`
|
|
14394
|
+
* so the home page can render a "Draft" badge. Gated to
|
|
14395
|
+
* non-operators + page 0 + no narrowing filters on the backend so
|
|
14396
|
+
* picker callers stay deployed-only and pagination stays clean.
|
|
14397
|
+
*
|
|
14398
|
+
*/
|
|
14399
|
+
includeDraftOnly?: boolean;
|
|
14400
|
+
/**
|
|
14401
|
+
* Filter by label
|
|
14402
|
+
*/
|
|
14403
|
+
label?: string;
|
|
14404
|
+
/**
|
|
14405
|
+
* order by desc order (default true)
|
|
14406
|
+
*/
|
|
14407
|
+
orderDesc?: boolean;
|
|
14408
|
+
/**
|
|
14409
|
+
* which page to return (start at 1, default 1)
|
|
14410
|
+
*/
|
|
14411
|
+
page?: number;
|
|
14412
|
+
/**
|
|
14413
|
+
* mask to filter exact matching path
|
|
14414
|
+
*/
|
|
14415
|
+
pathExact?: string;
|
|
14416
|
+
/**
|
|
14417
|
+
* mask to filter matching starting path
|
|
14418
|
+
*/
|
|
14419
|
+
pathStart?: string;
|
|
14420
|
+
/**
|
|
14421
|
+
* number of items to return for a given page (default 30, max 100)
|
|
14422
|
+
*/
|
|
14423
|
+
perPage?: number;
|
|
14424
|
+
/**
|
|
14425
|
+
* (default false)
|
|
14426
|
+
* show only the starred items
|
|
14427
|
+
*
|
|
14428
|
+
*/
|
|
14429
|
+
starredOnly?: boolean;
|
|
14430
|
+
workspace: string;
|
|
14431
|
+
};
|
|
14432
|
+
export type ListRawAppsResponse = Array<ListableRawApp>;
|
|
14433
|
+
export type RecordAiUsageData = {
|
|
14434
|
+
requestBody: {
|
|
14435
|
+
events: Array<AITokenUsageEvent>;
|
|
14436
|
+
};
|
|
14437
|
+
workspace: string;
|
|
14438
|
+
};
|
|
14439
|
+
export type RecordAiUsageResponse = void;
|
|
14440
|
+
export type ListAiUsageData = {
|
|
14441
|
+
days?: number;
|
|
14442
|
+
groupBy?: 'day' | 'user' | 'model';
|
|
14443
|
+
/**
|
|
14444
|
+
* workspace-wide usage (admin only) or the calling user's own
|
|
14445
|
+
*/
|
|
14446
|
+
scope?: 'workspace' | 'self';
|
|
14447
|
+
workspace: string;
|
|
14448
|
+
};
|
|
14449
|
+
export type ListAiUsageResponse = {
|
|
14450
|
+
buckets: Array<AITokenUsageBucket>;
|
|
14451
|
+
/**
|
|
14452
|
+
* more buckets matched than were returned, so summing them under-reports
|
|
14453
|
+
*/
|
|
14454
|
+
truncated: boolean;
|
|
14455
|
+
};
|
|
14456
|
+
export type ResumeSuspendedTriggerJobsData = {
|
|
14457
|
+
/**
|
|
14458
|
+
* Optional list of job IDs to reassign
|
|
13955
14459
|
*/
|
|
13956
14460
|
requestBody?: {
|
|
13957
14461
|
/**
|
|
@@ -22471,10 +22975,13 @@ export type $OpenApiTs = {
|
|
|
22471
22975
|
};
|
|
22472
22976
|
};
|
|
22473
22977
|
};
|
|
22474
|
-
'/w/{workspace}/resources/history/v/{
|
|
22978
|
+
'/w/{workspace}/resources/history/v/{id}': {
|
|
22475
22979
|
get: {
|
|
22476
22980
|
req: {
|
|
22477
|
-
|
|
22981
|
+
/**
|
|
22982
|
+
* The version's id, not its number.
|
|
22983
|
+
*/
|
|
22984
|
+
id: number;
|
|
22478
22985
|
workspace: string;
|
|
22479
22986
|
};
|
|
22480
22987
|
res: {
|
|
@@ -22488,10 +22995,13 @@ export type $OpenApiTs = {
|
|
|
22488
22995
|
};
|
|
22489
22996
|
};
|
|
22490
22997
|
};
|
|
22491
|
-
'/w/{workspace}/resources/history/restore/v/{
|
|
22998
|
+
'/w/{workspace}/resources/history/restore/v/{id}': {
|
|
22492
22999
|
post: {
|
|
22493
23000
|
req: {
|
|
22494
|
-
|
|
23001
|
+
/**
|
|
23002
|
+
* The version's id, not its number.
|
|
23003
|
+
*/
|
|
23004
|
+
id: number;
|
|
22495
23005
|
workspace: string;
|
|
22496
23006
|
};
|
|
22497
23007
|
res: {
|
|
@@ -29094,6 +29604,318 @@ export type $OpenApiTs = {
|
|
|
29094
29604
|
};
|
|
29095
29605
|
};
|
|
29096
29606
|
};
|
|
29607
|
+
'/w/{workspace}/ai_evals/datasets/list': {
|
|
29608
|
+
get: {
|
|
29609
|
+
req: {
|
|
29610
|
+
workspace: string;
|
|
29611
|
+
};
|
|
29612
|
+
res: {
|
|
29613
|
+
/**
|
|
29614
|
+
* eval datasets list
|
|
29615
|
+
*/
|
|
29616
|
+
200: Array<EvalDataset>;
|
|
29617
|
+
};
|
|
29618
|
+
};
|
|
29619
|
+
};
|
|
29620
|
+
'/w/{workspace}/ai_evals/datasets/create': {
|
|
29621
|
+
post: {
|
|
29622
|
+
req: {
|
|
29623
|
+
/**
|
|
29624
|
+
* new eval dataset
|
|
29625
|
+
*/
|
|
29626
|
+
requestBody: {
|
|
29627
|
+
path: string;
|
|
29628
|
+
summary?: string;
|
|
29629
|
+
scorers?: Array<Scorer>;
|
|
29630
|
+
/**
|
|
29631
|
+
* The cases to create the dataset holding, so one can be assembled in a single act rather than created empty and filled in afterwards.
|
|
29632
|
+
*/
|
|
29633
|
+
cases?: Array<NewEvalCase>;
|
|
29634
|
+
};
|
|
29635
|
+
workspace: string;
|
|
29636
|
+
};
|
|
29637
|
+
res: {
|
|
29638
|
+
/**
|
|
29639
|
+
* eval dataset created
|
|
29640
|
+
*/
|
|
29641
|
+
200: string;
|
|
29642
|
+
};
|
|
29643
|
+
};
|
|
29644
|
+
};
|
|
29645
|
+
'/w/{workspace}/ai_evals/datasets/get/{path}': {
|
|
29646
|
+
get: {
|
|
29647
|
+
req: {
|
|
29648
|
+
path: string;
|
|
29649
|
+
workspace: string;
|
|
29650
|
+
};
|
|
29651
|
+
res: {
|
|
29652
|
+
/**
|
|
29653
|
+
* eval dataset
|
|
29654
|
+
*/
|
|
29655
|
+
200: EvalDataset;
|
|
29656
|
+
};
|
|
29657
|
+
};
|
|
29658
|
+
};
|
|
29659
|
+
'/w/{workspace}/ai_evals/datasets/update/{path}': {
|
|
29660
|
+
post: {
|
|
29661
|
+
req: {
|
|
29662
|
+
path: string;
|
|
29663
|
+
/**
|
|
29664
|
+
* updated eval dataset
|
|
29665
|
+
*/
|
|
29666
|
+
requestBody: {
|
|
29667
|
+
/**
|
|
29668
|
+
* Renames the dataset. Its cases and experiments follow through the foreign keys, so a rename keeps the history it already has.
|
|
29669
|
+
*
|
|
29670
|
+
*/
|
|
29671
|
+
path?: string;
|
|
29672
|
+
/**
|
|
29673
|
+
* Left out to keep the stored summary; sent as "" to clear it.
|
|
29674
|
+
*/
|
|
29675
|
+
summary?: string;
|
|
29676
|
+
/**
|
|
29677
|
+
* Left out to keep the dataset's columns as they are; sent to replace them wholesale.
|
|
29678
|
+
*
|
|
29679
|
+
*/
|
|
29680
|
+
scorers?: Array<Scorer>;
|
|
29681
|
+
/**
|
|
29682
|
+
* The cases as they should stand afterwards: all of them, each carrying its id if the dataset already has it. Sent with the rest of an edit so that a rename the dataset refuses refuses the case edits with it.
|
|
29683
|
+
*
|
|
29684
|
+
*/
|
|
29685
|
+
cases?: Array<SaveEvalCase>;
|
|
29686
|
+
};
|
|
29687
|
+
workspace: string;
|
|
29688
|
+
};
|
|
29689
|
+
res: {
|
|
29690
|
+
/**
|
|
29691
|
+
* eval dataset updated
|
|
29692
|
+
*/
|
|
29693
|
+
200: string;
|
|
29694
|
+
};
|
|
29695
|
+
};
|
|
29696
|
+
};
|
|
29697
|
+
'/w/{workspace}/ai_evals/datasets/delete/{path}': {
|
|
29698
|
+
post: {
|
|
29699
|
+
req: {
|
|
29700
|
+
path: string;
|
|
29701
|
+
workspace: string;
|
|
29702
|
+
};
|
|
29703
|
+
res: {
|
|
29704
|
+
/**
|
|
29705
|
+
* eval dataset deleted
|
|
29706
|
+
*/
|
|
29707
|
+
200: string;
|
|
29708
|
+
};
|
|
29709
|
+
};
|
|
29710
|
+
};
|
|
29711
|
+
'/w/{workspace}/ai_evals/cases/list/{path}': {
|
|
29712
|
+
get: {
|
|
29713
|
+
req: {
|
|
29714
|
+
/**
|
|
29715
|
+
* which page to return (start at 1, default 1)
|
|
29716
|
+
*/
|
|
29717
|
+
page?: number;
|
|
29718
|
+
path: string;
|
|
29719
|
+
/**
|
|
29720
|
+
* number of items to return for a given page (default 30, max 100)
|
|
29721
|
+
*/
|
|
29722
|
+
perPage?: number;
|
|
29723
|
+
workspace: string;
|
|
29724
|
+
};
|
|
29725
|
+
res: {
|
|
29726
|
+
/**
|
|
29727
|
+
* eval cases
|
|
29728
|
+
*/
|
|
29729
|
+
200: {
|
|
29730
|
+
cases: Array<EvalCase>;
|
|
29731
|
+
};
|
|
29732
|
+
};
|
|
29733
|
+
};
|
|
29734
|
+
};
|
|
29735
|
+
'/w/{workspace}/ai_evals/subject_state': {
|
|
29736
|
+
get: {
|
|
29737
|
+
req: {
|
|
29738
|
+
path: string;
|
|
29739
|
+
workspace: string;
|
|
29740
|
+
};
|
|
29741
|
+
res: {
|
|
29742
|
+
/**
|
|
29743
|
+
* the subject as it is now
|
|
29744
|
+
*/
|
|
29745
|
+
200: {
|
|
29746
|
+
version?: number;
|
|
29747
|
+
};
|
|
29748
|
+
};
|
|
29749
|
+
};
|
|
29750
|
+
};
|
|
29751
|
+
'/w/{workspace}/ai_evals/run_payload': {
|
|
29752
|
+
get: {
|
|
29753
|
+
req: {
|
|
29754
|
+
/**
|
|
29755
|
+
* The flow job that answered the case.
|
|
29756
|
+
*/
|
|
29757
|
+
jobId: string;
|
|
29758
|
+
workspace: string;
|
|
29759
|
+
};
|
|
29760
|
+
res: {
|
|
29761
|
+
/**
|
|
29762
|
+
* the run and its rendering
|
|
29763
|
+
*/
|
|
29764
|
+
200: {
|
|
29765
|
+
/**
|
|
29766
|
+
* The case, the answer, and every tool call the agent made.
|
|
29767
|
+
*/
|
|
29768
|
+
run: {
|
|
29769
|
+
[key: string]: unknown;
|
|
29770
|
+
};
|
|
29771
|
+
/**
|
|
29772
|
+
* The same run as a judge agent is shown it.
|
|
29773
|
+
*/
|
|
29774
|
+
rendered: string;
|
|
29775
|
+
};
|
|
29776
|
+
};
|
|
29777
|
+
};
|
|
29778
|
+
};
|
|
29779
|
+
'/w/{workspace}/ai_evals/scorer_defaults': {
|
|
29780
|
+
get: {
|
|
29781
|
+
req: {
|
|
29782
|
+
workspace: string;
|
|
29783
|
+
};
|
|
29784
|
+
res: {
|
|
29785
|
+
/**
|
|
29786
|
+
* scorer defaults
|
|
29787
|
+
*/
|
|
29788
|
+
200: {
|
|
29789
|
+
/**
|
|
29790
|
+
* The system prompt a judge agent is created with.
|
|
29791
|
+
*/
|
|
29792
|
+
judge_prompt: string;
|
|
29793
|
+
script_template: string;
|
|
29794
|
+
};
|
|
29795
|
+
};
|
|
29796
|
+
};
|
|
29797
|
+
};
|
|
29798
|
+
'/w/{workspace}/ai_evals/scorers/recent': {
|
|
29799
|
+
get: {
|
|
29800
|
+
req: {
|
|
29801
|
+
/**
|
|
29802
|
+
* only scorers of this kind
|
|
29803
|
+
*/
|
|
29804
|
+
kind?: 'script' | 'agent';
|
|
29805
|
+
workspace: string;
|
|
29806
|
+
};
|
|
29807
|
+
res: {
|
|
29808
|
+
/**
|
|
29809
|
+
* recently used scorers
|
|
29810
|
+
*/
|
|
29811
|
+
200: Array<(Scorer & {
|
|
29812
|
+
/**
|
|
29813
|
+
* The dataset it is a column of.
|
|
29814
|
+
*/
|
|
29815
|
+
dataset: string;
|
|
29816
|
+
})>;
|
|
29817
|
+
};
|
|
29818
|
+
};
|
|
29819
|
+
};
|
|
29820
|
+
'/w/{workspace}/ai_evals/experiments/run': {
|
|
29821
|
+
post: {
|
|
29822
|
+
req: {
|
|
29823
|
+
/**
|
|
29824
|
+
* what to run
|
|
29825
|
+
*/
|
|
29826
|
+
requestBody: {
|
|
29827
|
+
dataset: string;
|
|
29828
|
+
subject: EvalSubject;
|
|
29829
|
+
};
|
|
29830
|
+
workspace: string;
|
|
29831
|
+
};
|
|
29832
|
+
res: {
|
|
29833
|
+
/**
|
|
29834
|
+
* id of the created experiment
|
|
29835
|
+
*/
|
|
29836
|
+
200: string;
|
|
29837
|
+
};
|
|
29838
|
+
};
|
|
29839
|
+
};
|
|
29840
|
+
'/w/{workspace}/ai_evals/experiments/collect': {
|
|
29841
|
+
post: {
|
|
29842
|
+
req: {
|
|
29843
|
+
id: string;
|
|
29844
|
+
workspace: string;
|
|
29845
|
+
};
|
|
29846
|
+
res: {
|
|
29847
|
+
/**
|
|
29848
|
+
* how many of the run's cases are recorded
|
|
29849
|
+
*/
|
|
29850
|
+
200: number;
|
|
29851
|
+
};
|
|
29852
|
+
};
|
|
29853
|
+
};
|
|
29854
|
+
'/w/{workspace}/ai_evals/experiments/list_all': {
|
|
29855
|
+
get: {
|
|
29856
|
+
req: {
|
|
29857
|
+
/**
|
|
29858
|
+
* Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
|
|
29859
|
+
*
|
|
29860
|
+
*/
|
|
29861
|
+
subjectPath?: string;
|
|
29862
|
+
workspace: string;
|
|
29863
|
+
};
|
|
29864
|
+
res: {
|
|
29865
|
+
/**
|
|
29866
|
+
* The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
|
|
29867
|
+
*
|
|
29868
|
+
*/
|
|
29869
|
+
200: Array<EvalExperiment>;
|
|
29870
|
+
};
|
|
29871
|
+
};
|
|
29872
|
+
};
|
|
29873
|
+
'/w/{workspace}/ai_evals/experiments/results/{path}': {
|
|
29874
|
+
get: {
|
|
29875
|
+
req: {
|
|
29876
|
+
/**
|
|
29877
|
+
* The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
|
|
29878
|
+
*
|
|
29879
|
+
*/
|
|
29880
|
+
baseline?: string;
|
|
29881
|
+
/**
|
|
29882
|
+
* the experiment to read
|
|
29883
|
+
*/
|
|
29884
|
+
id: string;
|
|
29885
|
+
path: string;
|
|
29886
|
+
workspace: string;
|
|
29887
|
+
};
|
|
29888
|
+
res: {
|
|
29889
|
+
/**
|
|
29890
|
+
* experiment results
|
|
29891
|
+
*/
|
|
29892
|
+
200: {
|
|
29893
|
+
experiment: EvalExperiment;
|
|
29894
|
+
baseline?: EvalExperiment;
|
|
29895
|
+
/**
|
|
29896
|
+
* The columns, which belong to the dataset rather than the experiment.
|
|
29897
|
+
*/
|
|
29898
|
+
scorers: Array<Scorer>;
|
|
29899
|
+
rows: Array<ExperimentRow>;
|
|
29900
|
+
means: Array<ScorerMean>;
|
|
29901
|
+
/**
|
|
29902
|
+
* Cells scoring lower than the baseline, across every column.
|
|
29903
|
+
*/
|
|
29904
|
+
regressed: number;
|
|
29905
|
+
/**
|
|
29906
|
+
* The version the subject is on now. A row that ran against an earlier one describes an agent that no longer exists.
|
|
29907
|
+
*
|
|
29908
|
+
*/
|
|
29909
|
+
subject_current_version?: number;
|
|
29910
|
+
/**
|
|
29911
|
+
* What the agent hashes to as deployed. A run of unsaved edits carrying this hash ran exactly what is deployed now — the edits were saved — so it is a run of that version rather than of edits.
|
|
29912
|
+
*
|
|
29913
|
+
*/
|
|
29914
|
+
subject_deployed_hash?: string;
|
|
29915
|
+
};
|
|
29916
|
+
};
|
|
29917
|
+
};
|
|
29918
|
+
};
|
|
29097
29919
|
'/w/{workspace}/path_autocomplete/list_paths': {
|
|
29098
29920
|
get: {
|
|
29099
29921
|
req: {
|
|
@@ -29171,6 +29993,45 @@ export type $OpenApiTs = {
|
|
|
29171
29993
|
};
|
|
29172
29994
|
};
|
|
29173
29995
|
};
|
|
29996
|
+
'/w/{workspace}/ai/usage': {
|
|
29997
|
+
post: {
|
|
29998
|
+
req: {
|
|
29999
|
+
requestBody: {
|
|
30000
|
+
events: Array<AITokenUsageEvent>;
|
|
30001
|
+
};
|
|
30002
|
+
workspace: string;
|
|
30003
|
+
};
|
|
30004
|
+
res: {
|
|
30005
|
+
/**
|
|
30006
|
+
* usage recorded
|
|
30007
|
+
*/
|
|
30008
|
+
204: void;
|
|
30009
|
+
};
|
|
30010
|
+
};
|
|
30011
|
+
get: {
|
|
30012
|
+
req: {
|
|
30013
|
+
days?: number;
|
|
30014
|
+
groupBy?: 'day' | 'user' | 'model';
|
|
30015
|
+
/**
|
|
30016
|
+
* workspace-wide usage (admin only) or the calling user's own
|
|
30017
|
+
*/
|
|
30018
|
+
scope?: 'workspace' | 'self';
|
|
30019
|
+
workspace: string;
|
|
30020
|
+
};
|
|
30021
|
+
res: {
|
|
30022
|
+
/**
|
|
30023
|
+
* usage buckets
|
|
30024
|
+
*/
|
|
30025
|
+
200: {
|
|
30026
|
+
buckets: Array<AITokenUsageBucket>;
|
|
30027
|
+
/**
|
|
30028
|
+
* more buckets matched than were returned, so summing them under-reports
|
|
30029
|
+
*/
|
|
30030
|
+
truncated: boolean;
|
|
30031
|
+
};
|
|
30032
|
+
};
|
|
30033
|
+
};
|
|
30034
|
+
};
|
|
29174
30035
|
'/w/{workspace}/trigger/{trigger_kind}/resume_suspended_trigger_jobs/{trigger_path}': {
|
|
29175
30036
|
post: {
|
|
29176
30037
|
req: {
|