@inferencesh/sdk 0.33.0 → 0.34.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/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.34.0] - 2026-10-26
11
+
12
+ ### Breaking
13
+ - `CursorListRequest.page` and `CursorListResponse.total_items` are gone: lists are cursor-only. Page with `cursor` and `has_more`.
14
+
15
+ ### Added
16
+ - `ToolInvocationDTO.action`: the phrase the model wrote for the call ("Fetch unread emails from alice@x.com"). Empty when it left it out.
17
+ - `AgentRunDTO.finished_at`: when the run reached a terminal state.
18
+ - `ChatRunEvent.duration_ms`: how long the run took, from its start to its end.
19
+
20
+ ### Changed
21
+ - Auth scheme scopes (`scopes`, `required_scopes`) are the provider's own scope names; `scope_aliases` are optional shorthand for them.
22
+
10
23
  ## [0.33.0] - 2026-10-24
11
24
 
12
25
  ### Breaking
package/dist/types.d.ts CHANGED
@@ -394,6 +394,10 @@ export interface AgentRunDTO extends BaseModelDTO, PermissionModelDTO {
394
394
  state: AgentRunState;
395
395
  error?: string;
396
396
  output?: any;
397
+ /**
398
+ * FinishedAt is when the run reached a terminal state; nil while it runs.
399
+ */
400
+ finished_at?: string;
397
401
  interrupt_reason?: InterruptReason;
398
402
  interrupt_tool_id?: string;
399
403
  interrupt_meta?: any;
@@ -2786,7 +2790,6 @@ export interface SortOrder {
2786
2790
  */
2787
2791
  export interface CursorListRequest {
2788
2792
  cursor: string;
2789
- page?: number;
2790
2793
  limit: number;
2791
2794
  direction: string;
2792
2795
  search?: SearchRequest;
@@ -2812,7 +2815,6 @@ export interface CursorListResponse<T extends any> {
2812
2815
  has_next: boolean;
2813
2816
  has_previous: boolean;
2814
2817
  items_per_page: number;
2815
- total_items: number;
2816
2818
  }
2817
2819
  /**
2818
2820
  * CountResponse is the response for count endpoints.
@@ -5419,6 +5421,11 @@ export interface ToolInvocationDTO extends BaseModelDTO, PermissionModelDTO {
5419
5421
  tool_invocation_id: string;
5420
5422
  type: ToolType;
5421
5423
  display_name?: string;
5424
+ /**
5425
+ * Action is what the model said the call does, as an imperative phrase
5426
+ * ("Fetch unread emails from alice@x.com"). Empty when it left it out.
5427
+ */
5428
+ action?: string;
5422
5429
  execution_id?: string;
5423
5430
  function: ToolInvocationFunction;
5424
5431
  status: ToolInvocationStatus;
@@ -5994,8 +6001,8 @@ export interface AuthMethodLookup {
5994
6001
  }
5995
6002
  /**
5996
6003
  * AuthMethodCapability is something an app can ask for from this provider,
5997
- * satisfied by a connection holding its scopes. Scopes are in the scheme's
5998
- * own (friendly) names, the ones a credential stores.
6004
+ * satisfied by a connection holding its scopes. Scopes are the provider's
6005
+ * own names (Wire form), the ones a credential stores.
5999
6006
  */
6000
6007
  export interface AuthMethodCapability {
6001
6008
  key: string;
@@ -6052,10 +6059,11 @@ export interface AuthMethod {
6052
6059
  authorization_endpoint?: string;
6053
6060
  scopes?: string[];
6054
6061
  /**
6055
- * ScopeAliases map the scheme's own scope names to what the provider
6056
- * wants on the wire ("gmail.send" → "https://www.googleapis.com/auth/
6057
- * gmail.send"). Credentials store the alias; the wire form is used only
6058
- * in requests. A scope with no alias is sent as is.
6062
+ * ScopeAliases are shorthand a caller may write for a provider scope
6063
+ * ("gmail.send" → "https://www.googleapis.com/auth/gmail.send"). They
6064
+ * are accepted on input only: credentials, capabilities and allowed
6065
+ * lists hold the provider's own name (Wire), and every comparison is
6066
+ * in that form. A scope with no alias is the provider's name as is.
6059
6067
  */
6060
6068
  scope_aliases?: {
6061
6069
  [key: string]: string;
@@ -6103,7 +6111,7 @@ export interface AuthMethod {
6103
6111
  * re-authorizing for more scopes, whatever the caller asked for: the
6104
6112
  * scopes the identity lookup and token refresh need (Google's openid,
6105
6113
  * email and profile; X's users.read and offline.access). In the
6106
- * scheme's own names, like Scopes. Empty = only what was asked for.
6114
+ * provider's own names, like Scopes. Empty = only what was asked for.
6107
6115
  */
6108
6116
  required_scopes?: string[];
6109
6117
  /**
@@ -6422,6 +6430,11 @@ export interface ChatRunEvent {
6422
6430
  run_id: string;
6423
6431
  state: AgentRunState;
6424
6432
  reason?: RunEndReason;
6433
+ /**
6434
+ * DurationMs is how long the run took, from its start to its end. The
6435
+ * event message's created_at is when it ended.
6436
+ */
6437
+ duration_ms?: number;
6425
6438
  }
6426
6439
  /**
6427
6440
  * ChatEvent is the payload of an event-role message: system info shown in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",