@soat/sdk 0.38.1 → 0.40.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.mjs CHANGED
@@ -3168,7 +3168,7 @@ var Projects = class {
3168
3168
  /**
3169
3169
  * Update a project
3170
3170
  *
3171
- * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3171
+ * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3172
3172
  */
3173
3173
  static updateProject(options) {
3174
3174
  return (options.client ?? client).patch({
@@ -3879,28 +3879,28 @@ var Triggers = class {
3879
3879
  };
3880
3880
  var Usage = class {
3881
3881
  /**
3882
- * List usage meters
3882
+ * List usage events
3883
3883
  *
3884
- * Returns the raw usage-meter rows the caller can access, most recent first, optionally filtered by agent, generation, trace, actor, session, or `source`. Each row is the per-generation token usage as reported by the provider, for audit and reconciliation.
3884
+ * Returns the raw usage events the caller can access, most recent first, optionally filtered by agent, generation, trace, actor, session, or `source`. Each event is the per-generation token usage as reported by the provider, for audit and reconciliation.
3885
3885
  *
3886
3886
  */
3887
- static listUsageMeters(options) {
3887
+ static listUsageEvents(options) {
3888
3888
  return (options?.client ?? client).get({
3889
- url: "/api/v1/usage/meters",
3889
+ url: "/api/v1/usage/events",
3890
3890
  ...options
3891
3891
  });
3892
3892
  }
3893
3893
  /**
3894
3894
  * Get aggregated usage for a project
3895
3895
  *
3896
- * Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension and optionally narrowed to one `meter_type`. Each group and the grand total carry an `event_count`, summed token counts, a measured `quantity` per component (so infra meters report their real amount, not zeros), and `cost_usd` (null when no event in the bucket was priced). This is the per-project cost-by-range/by-category query — a monthly figure without scanning raw meter rows client-side.
3896
+ * Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension and optionally narrowed to one `meter_type`. Each group and the grand total carry an `event_count`, summed token counts, a measured `quantity` per component (so infra meters report their real amount, not zeros), and `cost_usd` (null when no event in the bucket was priced). This is the per-project cost-by-range/by-category query — a monthly figure without scanning raw usage events client-side.
3897
3897
  *
3898
- * `groups` is paginated. Its `total` is the number of distinct buckets in the window, so "how many runs this cycle" is one small response rather than a page walk, and `totals` always describes the whole window — never the page above it.
3898
+ * `groups` is paginated. Its `total` is the number of distinct buckets in the window — bucket cardinality, including a null bucket for the events the dimension does not apply to, and never a count of entities. To count entities, send `include=distinct` and read `totals.distinct`. `totals` always describes the whole window — never the page above it.
3899
3899
  *
3900
3900
  */
3901
- static getUsage(options) {
3901
+ static getUsageAggregate(options) {
3902
3902
  return (options.client ?? client).get({
3903
- url: "/api/v1/usage",
3903
+ url: "/api/v1/usage/aggregate",
3904
3904
  ...options
3905
3905
  });
3906
3906
  }
@@ -3945,9 +3945,9 @@ var Usage = class {
3945
3945
  });
3946
3946
  }
3947
3947
  /**
3948
- * Get a generation or run billing receipt
3948
+ * Get a generation or orchestration-run billing receipt
3949
3949
  *
3950
- * Returns a billing receipt. Pass generation_id for a per-generation receipt, or orchestration_run_id for a per-run receipt summed across the orchestration run's meters — both share the same shape (per-model line items with tokens, the price-book version that priced them, and cost, plus totals). Exactly one of generation_id or orchestration_run_id must be supplied.
3950
+ * Returns a billing receipt. Pass generation_id for a per-generation receipt, or orchestration_run_id for a receipt summed across the orchestration run's events — both share the same shape (per-model line items with tokens, the price-book version that priced them, and cost, plus totals). Exactly one of generation_id or orchestration_run_id must be supplied.
3951
3951
  *
3952
3952
  */
3953
3953
  static getUsageReceipt(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.38.1",
3
+ "version": "0.40.0",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",