@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.cjs CHANGED
@@ -3169,7 +3169,7 @@ var Projects = class {
3169
3169
  /**
3170
3170
  * Update a project
3171
3171
  *
3172
- * 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.
3172
+ * 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.
3173
3173
  */
3174
3174
  static updateProject(options) {
3175
3175
  return (options.client ?? client).patch({
@@ -3880,28 +3880,28 @@ var Triggers = class {
3880
3880
  };
3881
3881
  var Usage = class {
3882
3882
  /**
3883
- * List usage meters
3883
+ * List usage events
3884
3884
  *
3885
- * 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.
3885
+ * 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.
3886
3886
  *
3887
3887
  */
3888
- static listUsageMeters(options) {
3888
+ static listUsageEvents(options) {
3889
3889
  return (options?.client ?? client).get({
3890
- url: "/api/v1/usage/meters",
3890
+ url: "/api/v1/usage/events",
3891
3891
  ...options
3892
3892
  });
3893
3893
  }
3894
3894
  /**
3895
3895
  * Get aggregated usage for a project
3896
3896
  *
3897
- * 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.
3897
+ * 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.
3898
3898
  *
3899
- * `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.
3899
+ * `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.
3900
3900
  *
3901
3901
  */
3902
- static getUsage(options) {
3902
+ static getUsageAggregate(options) {
3903
3903
  return (options.client ?? client).get({
3904
- url: "/api/v1/usage",
3904
+ url: "/api/v1/usage/aggregate",
3905
3905
  ...options
3906
3906
  });
3907
3907
  }
@@ -3946,9 +3946,9 @@ var Usage = class {
3946
3946
  });
3947
3947
  }
3948
3948
  /**
3949
- * Get a generation or run billing receipt
3949
+ * Get a generation or orchestration-run billing receipt
3950
3950
  *
3951
- * 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.
3951
+ * 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.
3952
3952
  *
3953
3953
  */
3954
3954
  static getUsageReceipt(options) {