@soat/sdk 0.18.0 → 0.18.2

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.mjs CHANGED
@@ -854,6 +854,94 @@ var Agents = class {
854
854
  });
855
855
  }
856
856
  };
857
+ var AgentVersions = class {
858
+ /**
859
+ * List an agent's config versions
860
+ *
861
+ * Returns the agent's archived configurations, newest first. A version is written on create and on every subsequent write that changes the config — through the REST API or a formation apply alike. See [Versioning and Staged Rollout](/docs/modules/agents#versioning-and-staged-rollout).
862
+ *
863
+ */
864
+ static listAgentVersions(options) {
865
+ return (options.client ?? client).get({
866
+ url: "/api/v1/agents/{agent_id}/versions",
867
+ ...options
868
+ });
869
+ }
870
+ /**
871
+ * Get an archived agent config version
872
+ *
873
+ * Returns the exact configuration the agent held at a given version, so a generation can be traced back to the config that produced it.
874
+ *
875
+ */
876
+ static getAgentVersion(options) {
877
+ return (options.client ?? client).get({
878
+ url: "/api/v1/agents/{agent_id}/versions/{version}",
879
+ ...options
880
+ });
881
+ }
882
+ /**
883
+ * Restore an archived config as a new version
884
+ *
885
+ * Copies the named version's configuration onto the agent as a **new** version rather than rewinding the counter, so history stays append-only and the versions in between remain retrievable. Restoring the config the agent already holds is a no-op and creates no version.
886
+ *
887
+ * The restored config fully replaces the current one: a field the archived version did not set is cleared, not merged. Restore re-validates the config, so a tool, provider, or guardrail deleted since the snapshot was taken fails the request instead of writing a broken agent.
888
+ *
889
+ */
890
+ static restoreAgentVersion(options) {
891
+ return (options.client ?? client).post({
892
+ url: "/api/v1/agents/{agent_id}/versions/{version}/restore",
893
+ ...options,
894
+ headers: {
895
+ "Content-Type": "application/json",
896
+ ...options.headers
897
+ }
898
+ });
899
+ }
900
+ /**
901
+ * Set or replace a staged rollout
902
+ *
903
+ * Starts serving two archived versions side by side: `canary_percent` of traffic gets `canary_version`, the rest gets `stable_version`.
904
+ *
905
+ * Assignment is deterministic — it hashes the actor behind the request's session (falling back to the session itself), so one end user never flip-flops between configs mid-conversation. Requests with neither are split randomly.
906
+ *
907
+ * While a release is active the agent's live columns act as a **draft**: further edits archive new versions but do not disturb either side of the running split. End the rollout with `promote` or `abort`.
908
+ *
909
+ */
910
+ static setAgentRelease(options) {
911
+ return (options.client ?? client).put({
912
+ url: "/api/v1/agents/{agent_id}/release",
913
+ ...options,
914
+ headers: {
915
+ "Content-Type": "application/json",
916
+ ...options.headers
917
+ }
918
+ });
919
+ }
920
+ /**
921
+ * Promote the canary and end the rollout
922
+ *
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
+ *
925
+ */
926
+ static promoteAgentRelease(options) {
927
+ return (options.client ?? client).post({
928
+ url: "/api/v1/agents/{agent_id}/release/promote",
929
+ ...options
930
+ });
931
+ }
932
+ /**
933
+ * Abort the rollout and roll back to stable
934
+ *
935
+ * Restores the stable version's config as the agent's live config and clears the release, so all traffic returns to the configuration the rollout was measured against — not to whatever draft the live columns happened to hold.
936
+ *
937
+ */
938
+ static abortAgentRelease(options) {
939
+ return (options.client ?? client).post({
940
+ url: "/api/v1/agents/{agent_id}/release/abort",
941
+ ...options
942
+ });
943
+ }
944
+ };
857
945
  var AiProviders = class {
858
946
  /**
859
947
  * List AI providers
@@ -1504,6 +1592,12 @@ var Documents = class {
1504
1592
  * are read as a single source. How the source is chunked is controlled by
1505
1593
  * `chunk_strategy`.
1506
1594
  *
1595
+ * A file can only back one Document — a second call with the same `file_id`
1596
+ * returns `409 FILE_ALREADY_INGESTED`. To re-process an already-ingested file
1597
+ * (e.g. with a different `chunk_strategy`), use
1598
+ * `POST /documents/{document_id}/ingest`; to ingest the same source under a
1599
+ * different path, upload a new copy of the file first.
1600
+ *
1507
1601
  */
1508
1602
  static ingestDocument(options) {
1509
1603
  return (options.client ?? client).post({
@@ -3885,4 +3979,4 @@ var SoatClient = class {
3885
3979
  }
3886
3980
  };
3887
3981
  //#endregion
3888
- export { Activity, Actors, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Discussions, Documents, Embeddings, 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 };
3982
+ export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chats, Conversations, Discussions, Documents, Embeddings, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",