@soat/sdk 0.20.4 → 0.21.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/index.cjs +318 -113
- package/dist/index.d.cts +1529 -650
- package/dist/index.d.mts +1529 -650
- package/dist/index.mjs +318 -113
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -824,7 +824,7 @@ var Agents = class {
|
|
|
824
824
|
/**
|
|
825
825
|
* Run an agent generation
|
|
826
826
|
*
|
|
827
|
-
* Sends messages to the agent, resolves its tools, and runs the AI model loop.
|
|
827
|
+
* Sends messages to the agent, resolves its tools, and runs the AI model loop. Background by default: returns `202 Accepted` with a `generation_id` to poll via `GET /api/v1/generations/{generation_id}`. Pass `?wait=true` to block and receive the result inline, where client tools pause the generation and return `requires_action`. Streaming (`stream: true`) implies waiting.
|
|
828
828
|
*
|
|
829
829
|
*/
|
|
830
830
|
static createAgentGeneration(options) {
|
|
@@ -922,6 +922,8 @@ var AgentVersions = class {
|
|
|
922
922
|
*
|
|
923
923
|
* Makes the canary version's config the agent's live config and clears the release. The canary is pinned by version, so an edit that landed mid-rollout is not promoted in its place — it stays an unreleased draft in the version history.
|
|
924
924
|
*
|
|
925
|
+
* When the release carries a `promotion_gate`, the eval it names must have a run that finished `completed` with `passed: true` **and** was pinned to the canary version (`agent_version`); otherwise the call is a `409` and the rollout is left running untouched. The run that cleared the gate is recorded as `eval_run_id` on the version that goes live.
|
|
926
|
+
*
|
|
925
927
|
*/
|
|
926
928
|
static promoteAgentRelease(options) {
|
|
927
929
|
return (options.client ?? client).post({
|
|
@@ -974,7 +976,7 @@ var AiProviders = class {
|
|
|
974
976
|
*
|
|
975
977
|
* Deletes an AI provider configuration.
|
|
976
978
|
*
|
|
977
|
-
* Live references — chats, agents,
|
|
979
|
+
* Live references — chats, agents, and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks (nulls) its usage history, preserving those rows. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
|
|
978
980
|
*
|
|
979
981
|
*/
|
|
980
982
|
static deleteAiProvider(options) {
|
|
@@ -1010,6 +1012,20 @@ var AiProviders = class {
|
|
|
1010
1012
|
});
|
|
1011
1013
|
}
|
|
1012
1014
|
/**
|
|
1015
|
+
* List the models this provider can run
|
|
1016
|
+
*
|
|
1017
|
+
* Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings `default_model` and an agent's `model` carry.
|
|
1018
|
+
* Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time.
|
|
1019
|
+
* Not every provider type can answer. `azure` lists deployments an operator named rather than models, and `ollama` lists whatever was pulled onto that host, so both return `400 MODEL_LISTING_UNSUPPORTED`.
|
|
1020
|
+
*
|
|
1021
|
+
*/
|
|
1022
|
+
static listAiProviderModels(options) {
|
|
1023
|
+
return (options.client ?? client).get({
|
|
1024
|
+
url: "/api/v1/ai-providers/{ai_provider_id}/models",
|
|
1025
|
+
...options
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1013
1029
|
* List per-provider price overrides
|
|
1014
1030
|
*
|
|
1015
1031
|
* Returns the per-provider price overrides for this AI provider instance. An override prices this specific provider (e.g. an enterprise-negotiated rate or a gateway with markup) and wins over the global default at cost time. Authorized by the caller's access to the provider's project — so, unlike the global price book, a project's own overrides are visible here.
|
|
@@ -1385,9 +1401,14 @@ var Conversations = class {
|
|
|
1385
1401
|
* Generate the next message in a conversation
|
|
1386
1402
|
*
|
|
1387
1403
|
* Generates the next message using the specified actor's linked agent or chat.
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1404
|
+
* Background by default: returns `202 Accepted` immediately and the reply
|
|
1405
|
+
* lands as a new ConversationMessage when it completes — poll
|
|
1406
|
+
* `GET /api/v1/conversations/{conversation_id}/messages` for it.
|
|
1407
|
+
* Pass `?wait=true` to block and receive the result inline. On
|
|
1408
|
+
* `completed`, the reply is persisted as a new ConversationMessage
|
|
1409
|
+
* authored by that actor. On `requires_action`, nothing is persisted; the
|
|
1410
|
+
* caller must submit tool outputs via the Agents module and re-invoke
|
|
1411
|
+
* generate — so a flow using client tools should pass `?wait=true`.
|
|
1391
1412
|
*
|
|
1392
1413
|
*/
|
|
1393
1414
|
static generateConversationMessage(options) {
|
|
@@ -1453,109 +1474,6 @@ var Conversations = class {
|
|
|
1453
1474
|
});
|
|
1454
1475
|
}
|
|
1455
1476
|
};
|
|
1456
|
-
var Discussions = class {
|
|
1457
|
-
/**
|
|
1458
|
-
* List discussions
|
|
1459
|
-
*
|
|
1460
|
-
* Returns all discussions the caller has access to. If project_id is provided, returns only discussions in that project.
|
|
1461
|
-
*/
|
|
1462
|
-
static listDiscussions(options) {
|
|
1463
|
-
return (options?.client ?? client).get({
|
|
1464
|
-
url: "/api/v1/discussions",
|
|
1465
|
-
...options
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
/**
|
|
1469
|
-
* Create a discussion
|
|
1470
|
-
*
|
|
1471
|
-
* Creates a new discussion config. project keys infer the project from the key's scope; JWT callers must supply project_id.
|
|
1472
|
-
*/
|
|
1473
|
-
static createDiscussion(options) {
|
|
1474
|
-
return (options.client ?? client).post({
|
|
1475
|
-
url: "/api/v1/discussions",
|
|
1476
|
-
...options,
|
|
1477
|
-
headers: {
|
|
1478
|
-
"Content-Type": "application/json",
|
|
1479
|
-
...options.headers
|
|
1480
|
-
}
|
|
1481
|
-
});
|
|
1482
|
-
}
|
|
1483
|
-
/**
|
|
1484
|
-
* Get a discussion run by ID
|
|
1485
|
-
*
|
|
1486
|
-
* Returns a single discussion run, including its outcome, transcript conversation, and outcome document.
|
|
1487
|
-
*/
|
|
1488
|
-
static getDiscussionRun(options) {
|
|
1489
|
-
return (options.client ?? client).get({
|
|
1490
|
-
url: "/api/v1/discussions/runs/{run_id}",
|
|
1491
|
-
...options
|
|
1492
|
-
});
|
|
1493
|
-
}
|
|
1494
|
-
/**
|
|
1495
|
-
* Delete a discussion
|
|
1496
|
-
*
|
|
1497
|
-
* Deletes a discussion config and its participants.
|
|
1498
|
-
*/
|
|
1499
|
-
static deleteDiscussion(options) {
|
|
1500
|
-
return (options.client ?? client).delete({
|
|
1501
|
-
url: "/api/v1/discussions/{discussion_id}",
|
|
1502
|
-
...options
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
/**
|
|
1506
|
-
* Get a discussion by ID
|
|
1507
|
-
*
|
|
1508
|
-
* Returns a discussion config with its participants.
|
|
1509
|
-
*/
|
|
1510
|
-
static getDiscussion(options) {
|
|
1511
|
-
return (options.client ?? client).get({
|
|
1512
|
-
url: "/api/v1/discussions/{discussion_id}",
|
|
1513
|
-
...options
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
/**
|
|
1517
|
-
* Update a discussion
|
|
1518
|
-
*
|
|
1519
|
-
* Updates a discussion. Providing participants replaces the full set (not merged).
|
|
1520
|
-
*/
|
|
1521
|
-
static updateDiscussion(options) {
|
|
1522
|
-
return (options.client ?? client).patch({
|
|
1523
|
-
url: "/api/v1/discussions/{discussion_id}",
|
|
1524
|
-
...options,
|
|
1525
|
-
headers: {
|
|
1526
|
-
"Content-Type": "application/json",
|
|
1527
|
-
...options.headers
|
|
1528
|
-
}
|
|
1529
|
-
});
|
|
1530
|
-
}
|
|
1531
|
-
/**
|
|
1532
|
-
* List a discussion's runs
|
|
1533
|
-
*
|
|
1534
|
-
* Returns the run history of a discussion, most recent first.
|
|
1535
|
-
*/
|
|
1536
|
-
static listDiscussionRuns(options) {
|
|
1537
|
-
return (options.client ?? client).get({
|
|
1538
|
-
url: "/api/v1/discussions/{discussion_id}/runs",
|
|
1539
|
-
...options
|
|
1540
|
-
});
|
|
1541
|
-
}
|
|
1542
|
-
/**
|
|
1543
|
-
* Invoke a discussion
|
|
1544
|
-
*
|
|
1545
|
-
* Runs the discussion synchronously over the given topic and returns the completed run, whose outcome inlines the synthesized text. The run's transcript is persisted as a conversation and the outcome as a document.
|
|
1546
|
-
*
|
|
1547
|
-
*/
|
|
1548
|
-
static createDiscussionRun(options) {
|
|
1549
|
-
return (options.client ?? client).post({
|
|
1550
|
-
url: "/api/v1/discussions/{discussion_id}/runs",
|
|
1551
|
-
...options,
|
|
1552
|
-
headers: {
|
|
1553
|
-
"Content-Type": "application/json",
|
|
1554
|
-
...options.headers
|
|
1555
|
-
}
|
|
1556
|
-
});
|
|
1557
|
-
}
|
|
1558
|
-
};
|
|
1559
1477
|
var Documents = class {
|
|
1560
1478
|
/**
|
|
1561
1479
|
* List documents
|
|
@@ -1670,8 +1588,8 @@ var Documents = class {
|
|
|
1670
1588
|
* source file. Existing chunks are discarded and the document is reset to
|
|
1671
1589
|
* `status=pending` before re-processing. Use this to recover a document
|
|
1672
1590
|
* stuck in `processing`/`failed` or to re-chunk with a different strategy
|
|
1673
|
-
* without re-uploading the file.
|
|
1674
|
-
* `?
|
|
1591
|
+
* without re-uploading the file. Background by default (`202`); pass
|
|
1592
|
+
* `?wait=true` to run synchronously (`201`).
|
|
1675
1593
|
*
|
|
1676
1594
|
*/
|
|
1677
1595
|
static reingestDocument(options) {
|
|
@@ -1770,6 +1688,261 @@ var Embeddings = class {
|
|
|
1770
1688
|
});
|
|
1771
1689
|
}
|
|
1772
1690
|
};
|
|
1691
|
+
var Evaluations = class {
|
|
1692
|
+
/**
|
|
1693
|
+
* List datasets
|
|
1694
|
+
*
|
|
1695
|
+
* Returns the datasets defined in a project
|
|
1696
|
+
*/
|
|
1697
|
+
static listDatasets(options) {
|
|
1698
|
+
return (options?.client ?? client).get({
|
|
1699
|
+
url: "/api/v1/datasets",
|
|
1700
|
+
...options
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* Create a dataset
|
|
1705
|
+
*
|
|
1706
|
+
* Creates a project-scoped dataset — a named collection of test cases an eval runs an agent against. Names are unique per project.
|
|
1707
|
+
*
|
|
1708
|
+
* Datasets are operator-owned **fixtures**. The platform's content purge never deletes or mutates a dataset item, so erasing a generation cannot silently stop a test suite from being runnable.
|
|
1709
|
+
*/
|
|
1710
|
+
static createDataset(options) {
|
|
1711
|
+
return (options.client ?? client).post({
|
|
1712
|
+
url: "/api/v1/datasets",
|
|
1713
|
+
...options,
|
|
1714
|
+
headers: {
|
|
1715
|
+
"Content-Type": "application/json",
|
|
1716
|
+
...options.headers
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Delete a dataset
|
|
1722
|
+
*
|
|
1723
|
+
* Deletes a dataset, its items, and every eval bound to it. Results of runs that already scored those items keep their frozen copies of the input and expected output.
|
|
1724
|
+
*/
|
|
1725
|
+
static deleteDataset(options) {
|
|
1726
|
+
return (options.client ?? client).delete({
|
|
1727
|
+
url: "/api/v1/datasets/{dataset_id}",
|
|
1728
|
+
...options
|
|
1729
|
+
});
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Get a dataset
|
|
1733
|
+
*
|
|
1734
|
+
* Returns a specific dataset
|
|
1735
|
+
*/
|
|
1736
|
+
static getDataset(options) {
|
|
1737
|
+
return (options.client ?? client).get({
|
|
1738
|
+
url: "/api/v1/datasets/{dataset_id}",
|
|
1739
|
+
...options
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* Update a dataset
|
|
1744
|
+
*
|
|
1745
|
+
* Updates a dataset's name and/or description
|
|
1746
|
+
*/
|
|
1747
|
+
static updateDataset(options) {
|
|
1748
|
+
return (options.client ?? client).put({
|
|
1749
|
+
url: "/api/v1/datasets/{dataset_id}",
|
|
1750
|
+
...options,
|
|
1751
|
+
headers: {
|
|
1752
|
+
"Content-Type": "application/json",
|
|
1753
|
+
...options.headers
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* List dataset items
|
|
1759
|
+
*
|
|
1760
|
+
* Returns the test cases in a dataset, oldest first
|
|
1761
|
+
*/
|
|
1762
|
+
static listDatasetItems(options) {
|
|
1763
|
+
return (options.client ?? client).get({
|
|
1764
|
+
url: "/api/v1/datasets/{dataset_id}/items",
|
|
1765
|
+
...options
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Add a dataset item
|
|
1770
|
+
*
|
|
1771
|
+
* Adds one test case. `input` is replayed verbatim as the generation's messages, so it must be a non-empty array of `{ role, content }`.
|
|
1772
|
+
*/
|
|
1773
|
+
static createDatasetItem(options) {
|
|
1774
|
+
return (options.client ?? client).post({
|
|
1775
|
+
url: "/api/v1/datasets/{dataset_id}/items",
|
|
1776
|
+
...options,
|
|
1777
|
+
headers: {
|
|
1778
|
+
"Content-Type": "application/json",
|
|
1779
|
+
...options.headers
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Delete a dataset item
|
|
1785
|
+
*
|
|
1786
|
+
* Deletes a test case. Results of runs that already scored it stay readable; their `dataset_item_id` becomes null.
|
|
1787
|
+
*/
|
|
1788
|
+
static deleteDatasetItem(options) {
|
|
1789
|
+
return (options.client ?? client).delete({
|
|
1790
|
+
url: "/api/v1/datasets/{dataset_id}/items/{item_id}",
|
|
1791
|
+
...options
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Update a dataset item
|
|
1796
|
+
*
|
|
1797
|
+
* Updates a test case. Runs that already scored it are unaffected — each result carries its own frozen copy of the input and expected output.
|
|
1798
|
+
*/
|
|
1799
|
+
static updateDatasetItem(options) {
|
|
1800
|
+
return (options.client ?? client).put({
|
|
1801
|
+
url: "/api/v1/datasets/{dataset_id}/items/{item_id}",
|
|
1802
|
+
...options,
|
|
1803
|
+
headers: {
|
|
1804
|
+
"Content-Type": "application/json",
|
|
1805
|
+
...options.headers
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
/**
|
|
1810
|
+
* List evals
|
|
1811
|
+
*
|
|
1812
|
+
* Returns the evals defined in a project
|
|
1813
|
+
*/
|
|
1814
|
+
static listEvals(options) {
|
|
1815
|
+
return (options?.client ?? client).get({
|
|
1816
|
+
url: "/api/v1/evals",
|
|
1817
|
+
...options
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Create an eval
|
|
1822
|
+
*
|
|
1823
|
+
* Binds an agent under test to a dataset and a list of scorers. The agent and the dataset must belong to the same project as the eval; a cross-project reference is rejected with 400.
|
|
1824
|
+
*
|
|
1825
|
+
* Scorer config is frozen here rather than read from the agent at run time, so two runs of the same eval are always judged by the same criteria and their comparison measures the agent instead of the config drifting underneath it. Each scorer `type` may appear at most once.
|
|
1826
|
+
*/
|
|
1827
|
+
static createEval(options) {
|
|
1828
|
+
return (options.client ?? client).post({
|
|
1829
|
+
url: "/api/v1/evals",
|
|
1830
|
+
...options,
|
|
1831
|
+
headers: {
|
|
1832
|
+
"Content-Type": "application/json",
|
|
1833
|
+
...options.headers
|
|
1834
|
+
}
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Delete an eval
|
|
1839
|
+
*
|
|
1840
|
+
* Deletes an eval, its runs, and their results
|
|
1841
|
+
*/
|
|
1842
|
+
static deleteEval(options) {
|
|
1843
|
+
return (options.client ?? client).delete({
|
|
1844
|
+
url: "/api/v1/evals/{eval_id}",
|
|
1845
|
+
...options
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Get an eval
|
|
1850
|
+
*
|
|
1851
|
+
* Returns a specific eval
|
|
1852
|
+
*/
|
|
1853
|
+
static getEval(options) {
|
|
1854
|
+
return (options.client ?? client).get({
|
|
1855
|
+
url: "/api/v1/evals/{eval_id}",
|
|
1856
|
+
...options
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Update an eval
|
|
1861
|
+
*
|
|
1862
|
+
* Updates an eval. Changing `agent_id` re-validates the scorers against the new agent, since an `output_schema` scorer that was legal against the old one may not be.
|
|
1863
|
+
*/
|
|
1864
|
+
static updateEval(options) {
|
|
1865
|
+
return (options.client ?? client).put({
|
|
1866
|
+
url: "/api/v1/evals/{eval_id}",
|
|
1867
|
+
...options,
|
|
1868
|
+
headers: {
|
|
1869
|
+
"Content-Type": "application/json",
|
|
1870
|
+
...options.headers
|
|
1871
|
+
}
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* List eval runs
|
|
1876
|
+
*
|
|
1877
|
+
* Returns an eval's runs, newest first
|
|
1878
|
+
*/
|
|
1879
|
+
static listEvalRuns(options) {
|
|
1880
|
+
return (options.client ?? client).get({
|
|
1881
|
+
url: "/api/v1/evals/{eval_id}/runs",
|
|
1882
|
+
...options
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Start an eval run
|
|
1887
|
+
*
|
|
1888
|
+
* Runs the eval against its dataset, creating one real agent generation per item and scoring the outputs.
|
|
1889
|
+
*
|
|
1890
|
+
* `wait: true` executes the run synchronously and returns it terminal, with its scores. The dataset is capped at 25 items for a synchronous run; a larger one is rejected with 400 rather than partially scored.
|
|
1891
|
+
*
|
|
1892
|
+
* `wait: false` (the default) enqueues one task per item and returns immediately with `status: "queued"`. A worker executes the items and the run settles itself; poll `GET /evals/{eval_id}/runs/{eval_run_id}` for the terminal status, or subscribe to the `eval_run.completed` webhook. There is no item cap on a queued run.
|
|
1893
|
+
*
|
|
1894
|
+
* The whole run is pinned to **one** agent version, stamped on `agent_version`: pass one explicitly to evaluate a canary before promoting it, or omit it to use the active release's stable version (or the live draft when no release is in effect). Without the pin, release assignment would bucket each item independently and blend two configs into a single score.
|
|
1895
|
+
*
|
|
1896
|
+
* With `baseline_run_id`, the finished run's `aggregate_scores.baseline` carries per-scorer deltas against that run, computed over the items present and scorable in **both** runs, with the divergence counted. A delta over a shifted dataset is therefore never presented as a clean comparison.
|
|
1897
|
+
*/
|
|
1898
|
+
static startEvalRun(options) {
|
|
1899
|
+
return (options.client ?? client).post({
|
|
1900
|
+
url: "/api/v1/evals/{eval_id}/runs",
|
|
1901
|
+
...options,
|
|
1902
|
+
headers: {
|
|
1903
|
+
"Content-Type": "application/json",
|
|
1904
|
+
...options.headers
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* Get an eval run
|
|
1910
|
+
*
|
|
1911
|
+
* Returns a run's status, counts, and aggregate scores
|
|
1912
|
+
*/
|
|
1913
|
+
static getEvalRun(options) {
|
|
1914
|
+
return (options.client ?? client).get({
|
|
1915
|
+
url: "/api/v1/evals/{eval_id}/runs/{eval_run_id}",
|
|
1916
|
+
...options
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
/**
|
|
1920
|
+
* List eval run results
|
|
1921
|
+
*
|
|
1922
|
+
* Returns the per-item results of a run, oldest first
|
|
1923
|
+
*/
|
|
1924
|
+
static listEvalResults(options) {
|
|
1925
|
+
return (options.client ?? client).get({
|
|
1926
|
+
url: "/api/v1/evals/{eval_id}/runs/{eval_run_id}/results",
|
|
1927
|
+
...options
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Cancel an eval run
|
|
1932
|
+
*
|
|
1933
|
+
* Cancels a queued or running run: its outstanding item tasks are dropped so it stops consuming provider budget, and the run settles as `canceled`.
|
|
1934
|
+
*
|
|
1935
|
+
* Results already written are kept — they are real measurements of generations that were really paid for — and `completed_count` / `errored_count` report what ran. `aggregate_scores` is deliberately left null: a partial roll-up in the same field a completed run uses would read as a whole-dataset verdict.
|
|
1936
|
+
*
|
|
1937
|
+
* A run that has already finished is rejected with 400.
|
|
1938
|
+
*/
|
|
1939
|
+
static cancelEvalRun(options) {
|
|
1940
|
+
return (options.client ?? client).post({
|
|
1941
|
+
url: "/api/v1/evals/{eval_id}/runs/{eval_run_id}/cancel",
|
|
1942
|
+
...options
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
};
|
|
1773
1946
|
var Exceptions = class {
|
|
1774
1947
|
/**
|
|
1775
1948
|
* List exception items
|
|
@@ -3176,7 +3349,7 @@ var Sessions = class {
|
|
|
3176
3349
|
/**
|
|
3177
3350
|
* Trigger agent generation
|
|
3178
3351
|
*
|
|
3179
|
-
* Triggers the agent to generate a response based on the current conversation.
|
|
3352
|
+
* Triggers the agent to generate a response based on the current conversation. Background by default: returns `202 Accepted` immediately while the generation runs. Pass ?wait=true to block and receive the assistant reply (or a requires_action status if the agent needs client tool outputs) in the response.
|
|
3180
3353
|
*
|
|
3181
3354
|
*/
|
|
3182
3355
|
static generateSessionResponse(options) {
|
|
@@ -3540,7 +3713,7 @@ var Triggers = class {
|
|
|
3540
3713
|
/**
|
|
3541
3714
|
* Fire a trigger
|
|
3542
3715
|
*
|
|
3543
|
-
* Fires a trigger synchronously and returns the terminal firing record.
|
|
3716
|
+
* Fires a trigger synchronously and returns the terminal firing record. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
3544
3717
|
*/
|
|
3545
3718
|
static fireTrigger(options) {
|
|
3546
3719
|
return (options.client ?? client).post({
|
|
@@ -4067,31 +4240,49 @@ const bindResource = (SdkClass, client) => {
|
|
|
4067
4240
|
* the corresponding static class from the generated SDK, so all method
|
|
4068
4241
|
* signatures, types, and return values are identical — the only difference
|
|
4069
4242
|
* is that you never need to supply `client` yourself.
|
|
4243
|
+
*
|
|
4244
|
+
* The list is exhaustive by construction: `NoUnregisteredResource` at the
|
|
4245
|
+
* bottom of this file fails `pnpm typecheck` when a spec adds a resource this
|
|
4246
|
+
* class does not expose.
|
|
4070
4247
|
*/
|
|
4071
4248
|
var SoatClient = class {
|
|
4249
|
+
activity;
|
|
4072
4250
|
actors;
|
|
4073
4251
|
agents;
|
|
4252
|
+
agentVersions;
|
|
4074
4253
|
aiProviders;
|
|
4075
4254
|
apiKeys;
|
|
4255
|
+
approvals;
|
|
4256
|
+
auditLog;
|
|
4076
4257
|
chats;
|
|
4077
4258
|
conversations;
|
|
4078
4259
|
documents;
|
|
4260
|
+
embeddings;
|
|
4261
|
+
evaluations;
|
|
4262
|
+
exceptions;
|
|
4079
4263
|
files;
|
|
4080
4264
|
formations;
|
|
4265
|
+
generations;
|
|
4266
|
+
guardrails;
|
|
4081
4267
|
ingestionRules;
|
|
4082
4268
|
knowledge;
|
|
4083
4269
|
memories;
|
|
4084
4270
|
memoryEntries;
|
|
4271
|
+
modelRoutes;
|
|
4272
|
+
orchestrations;
|
|
4085
4273
|
policies;
|
|
4086
4274
|
projects;
|
|
4275
|
+
quotas;
|
|
4087
4276
|
secrets;
|
|
4088
4277
|
sessions;
|
|
4278
|
+
tasks;
|
|
4089
4279
|
tools;
|
|
4090
4280
|
traces;
|
|
4091
4281
|
triggers;
|
|
4092
4282
|
usage;
|
|
4093
4283
|
users;
|
|
4094
4284
|
webhooks;
|
|
4285
|
+
workflows;
|
|
4095
4286
|
constructor({ baseUrl, token, headers } = {}) {
|
|
4096
4287
|
const authHeaders = token ? { Authorization: `Bearer ${token}` } : {};
|
|
4097
4288
|
const httpClient = createClient(createConfig({
|
|
@@ -4101,30 +4292,44 @@ var SoatClient = class {
|
|
|
4101
4292
|
...headers
|
|
4102
4293
|
}
|
|
4103
4294
|
}));
|
|
4295
|
+
this.activity = bindResource(Activity, httpClient);
|
|
4104
4296
|
this.actors = bindResource(Actors, httpClient);
|
|
4105
4297
|
this.agents = bindResource(Agents, httpClient);
|
|
4298
|
+
this.agentVersions = bindResource(AgentVersions, httpClient);
|
|
4106
4299
|
this.aiProviders = bindResource(AiProviders, httpClient);
|
|
4107
4300
|
this.apiKeys = bindResource(ApiKeys, httpClient);
|
|
4301
|
+
this.approvals = bindResource(Approvals, httpClient);
|
|
4302
|
+
this.auditLog = bindResource(AuditLog, httpClient);
|
|
4108
4303
|
this.chats = bindResource(Chats, httpClient);
|
|
4109
4304
|
this.conversations = bindResource(Conversations, httpClient);
|
|
4110
4305
|
this.documents = bindResource(Documents, httpClient);
|
|
4306
|
+
this.embeddings = bindResource(Embeddings, httpClient);
|
|
4307
|
+
this.evaluations = bindResource(Evaluations, httpClient);
|
|
4308
|
+
this.exceptions = bindResource(Exceptions, httpClient);
|
|
4111
4309
|
this.files = bindResource(Files, httpClient);
|
|
4112
4310
|
this.formations = bindResource(Formations, httpClient);
|
|
4311
|
+
this.generations = bindResource(Generations, httpClient);
|
|
4312
|
+
this.guardrails = bindResource(Guardrails, httpClient);
|
|
4113
4313
|
this.ingestionRules = bindResource(IngestionRules, httpClient);
|
|
4114
4314
|
this.knowledge = bindResource(Knowledge, httpClient);
|
|
4115
4315
|
this.memories = bindResource(Memories, httpClient);
|
|
4116
4316
|
this.memoryEntries = bindResource(MemoryEntries, httpClient);
|
|
4317
|
+
this.modelRoutes = bindResource(ModelRoutes, httpClient);
|
|
4318
|
+
this.orchestrations = bindResource(Orchestrations, httpClient);
|
|
4117
4319
|
this.policies = bindResource(Policies, httpClient);
|
|
4118
4320
|
this.projects = bindResource(Projects, httpClient);
|
|
4321
|
+
this.quotas = bindResource(Quotas, httpClient);
|
|
4119
4322
|
this.secrets = bindResource(Secrets, httpClient);
|
|
4120
4323
|
this.sessions = bindResource(Sessions, httpClient);
|
|
4324
|
+
this.tasks = bindResource(Tasks, httpClient);
|
|
4121
4325
|
this.tools = bindResource(Tools, httpClient);
|
|
4122
4326
|
this.traces = bindResource(Traces, httpClient);
|
|
4123
4327
|
this.triggers = bindResource(Triggers, httpClient);
|
|
4124
4328
|
this.usage = bindResource(Usage, httpClient);
|
|
4125
4329
|
this.users = bindResource(Users, httpClient);
|
|
4126
4330
|
this.webhooks = bindResource(Webhooks, httpClient);
|
|
4331
|
+
this.workflows = bindResource(Workflows, httpClient);
|
|
4127
4332
|
}
|
|
4128
4333
|
};
|
|
4129
4334
|
//#endregion
|
|
4130
|
-
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations,
|
|
4335
|
+
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryEntries, ModelRoutes, Orchestrations, Policies, Projects, Quotas, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|