@soat/sdk 0.6.2 → 0.6.3

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.d.cts CHANGED
@@ -431,6 +431,14 @@ type Agent = {
431
431
  */
432
432
  write_memory_id?: string | null;
433
433
  } | null;
434
+ /**
435
+ * Maximum number of recent messages to include in the context window sent to the model. When null, all messages are included.
436
+ */
437
+ max_context_messages?: number | null;
438
+ /**
439
+ * When true, only one open session per actor_id is allowed for this agent. Creating a second open session for the same actor returns 409.
440
+ */
441
+ single_session_per_actor?: boolean;
434
442
  created_at?: Date;
435
443
  updated_at?: Date;
436
444
  };
@@ -474,6 +482,14 @@ type CreateAgentRequest = {
474
482
  */
475
483
  write_memory_id?: string | null;
476
484
  };
485
+ /**
486
+ * Maximum number of recent messages included in the context window. Null means no limit.
487
+ */
488
+ max_context_messages?: number;
489
+ /**
490
+ * When true, only one open session per actor_id is allowed for this agent.
491
+ */
492
+ single_session_per_actor?: boolean;
477
493
  };
478
494
  type UpdateAgentRequest = {
479
495
  ai_provider_id?: string;
@@ -508,6 +524,14 @@ type UpdateAgentRequest = {
508
524
  */
509
525
  write_memory_id?: string | null;
510
526
  } | null;
527
+ /**
528
+ * Maximum number of recent messages included in the context window. Null means no limit.
529
+ */
530
+ max_context_messages?: number | null;
531
+ /**
532
+ * When true, only one open session per actor_id is allowed for this agent.
533
+ */
534
+ single_session_per_actor?: boolean | null;
511
535
  };
512
536
  type CreateAgentGenerationRequest = {
513
537
  messages: Array<{
@@ -2103,7 +2127,7 @@ type SessionRecord = {
2103
2127
  * Underlying conversation public ID
2104
2128
  */
2105
2129
  conversation_id?: string;
2106
- status?: 'open' | 'closed';
2130
+ status?: 'open' | 'closed' | 'expired';
2107
2131
  name?: string | null;
2108
2132
  /**
2109
2133
  * Public ID of the user actor
@@ -2128,6 +2152,14 @@ type SessionRecord = {
2128
2152
  tool_context?: {
2129
2153
  [key: string]: string;
2130
2154
  } | null;
2155
+ /**
2156
+ * Number of seconds of inactivity after which the session expires. 0 means the session never expires.
2157
+ */
2158
+ inactivity_ttl_seconds?: number;
2159
+ /**
2160
+ * Timestamp of the last activity on the session (message added or response generated).
2161
+ */
2162
+ last_activity_at?: Date | null;
2131
2163
  };
2132
2164
  type SessionMessage = {
2133
2165
  role?: 'user' | 'assistant' | 'unknown';
@@ -2157,6 +2189,10 @@ type CreateSessionRequest = {
2157
2189
  tool_context?: {
2158
2190
  [key: string]: string;
2159
2191
  } | null;
2192
+ /**
2193
+ * Number of seconds of inactivity after which the session expires. 0 means the session never expires.
2194
+ */
2195
+ inactivity_ttl_seconds?: number;
2160
2196
  };
2161
2197
  type UpdateSessionRequest = {
2162
2198
  /**
@@ -2166,7 +2202,7 @@ type UpdateSessionRequest = {
2166
2202
  /**
2167
2203
  * Session status
2168
2204
  */
2169
- status?: 'open' | 'closed';
2205
+ status?: 'open' | 'closed' | 'expired';
2170
2206
  /**
2171
2207
  * Enable or disable automatic generation after user messages.
2172
2208
  */
@@ -6683,9 +6719,9 @@ type ListAgentSessionsData = {
6683
6719
  */
6684
6720
  actor_id?: string;
6685
6721
  /**
6686
- * Filter by session status (open or closed)
6722
+ * Filter by session status (open, closed, or expired)
6687
6723
  */
6688
- status?: 'open' | 'closed';
6724
+ status?: 'open' | 'closed' | 'expired';
6689
6725
  limit?: number;
6690
6726
  offset?: number;
6691
6727
  };
@@ -6742,6 +6778,10 @@ type CreateAgentSessionErrors = {
6742
6778
  * Not found
6743
6779
  */
6744
6780
  404: ErrorResponse;
6781
+ /**
6782
+ * An open session already exists for this actor (single_session_per_actor is enabled)
6783
+ */
6784
+ 409: ErrorResponse;
6745
6785
  };
6746
6786
  type CreateAgentSessionError = CreateAgentSessionErrors[keyof CreateAgentSessionErrors];
6747
6787
  type CreateAgentSessionResponses = {
@@ -6981,6 +7021,10 @@ type GenerateSessionResponseErrors = {
6981
7021
  * Generation already in progress
6982
7022
  */
6983
7023
  409: ErrorResponse;
7024
+ /**
7025
+ * Session has expired due to inactivity
7026
+ */
7027
+ 410: ErrorResponse;
6984
7028
  };
6985
7029
  type GenerateSessionResponseError = GenerateSessionResponseErrors[keyof GenerateSessionResponseErrors];
6986
7030
  type GenerateSessionResponseResponses = {
package/dist/index.d.ts CHANGED
@@ -431,6 +431,14 @@ type Agent = {
431
431
  */
432
432
  write_memory_id?: string | null;
433
433
  } | null;
434
+ /**
435
+ * Maximum number of recent messages to include in the context window sent to the model. When null, all messages are included.
436
+ */
437
+ max_context_messages?: number | null;
438
+ /**
439
+ * When true, only one open session per actor_id is allowed for this agent. Creating a second open session for the same actor returns 409.
440
+ */
441
+ single_session_per_actor?: boolean;
434
442
  created_at?: Date;
435
443
  updated_at?: Date;
436
444
  };
@@ -474,6 +482,14 @@ type CreateAgentRequest = {
474
482
  */
475
483
  write_memory_id?: string | null;
476
484
  };
485
+ /**
486
+ * Maximum number of recent messages included in the context window. Null means no limit.
487
+ */
488
+ max_context_messages?: number;
489
+ /**
490
+ * When true, only one open session per actor_id is allowed for this agent.
491
+ */
492
+ single_session_per_actor?: boolean;
477
493
  };
478
494
  type UpdateAgentRequest = {
479
495
  ai_provider_id?: string;
@@ -508,6 +524,14 @@ type UpdateAgentRequest = {
508
524
  */
509
525
  write_memory_id?: string | null;
510
526
  } | null;
527
+ /**
528
+ * Maximum number of recent messages included in the context window. Null means no limit.
529
+ */
530
+ max_context_messages?: number | null;
531
+ /**
532
+ * When true, only one open session per actor_id is allowed for this agent.
533
+ */
534
+ single_session_per_actor?: boolean | null;
511
535
  };
512
536
  type CreateAgentGenerationRequest = {
513
537
  messages: Array<{
@@ -2103,7 +2127,7 @@ type SessionRecord = {
2103
2127
  * Underlying conversation public ID
2104
2128
  */
2105
2129
  conversation_id?: string;
2106
- status?: 'open' | 'closed';
2130
+ status?: 'open' | 'closed' | 'expired';
2107
2131
  name?: string | null;
2108
2132
  /**
2109
2133
  * Public ID of the user actor
@@ -2128,6 +2152,14 @@ type SessionRecord = {
2128
2152
  tool_context?: {
2129
2153
  [key: string]: string;
2130
2154
  } | null;
2155
+ /**
2156
+ * Number of seconds of inactivity after which the session expires. 0 means the session never expires.
2157
+ */
2158
+ inactivity_ttl_seconds?: number;
2159
+ /**
2160
+ * Timestamp of the last activity on the session (message added or response generated).
2161
+ */
2162
+ last_activity_at?: Date | null;
2131
2163
  };
2132
2164
  type SessionMessage = {
2133
2165
  role?: 'user' | 'assistant' | 'unknown';
@@ -2157,6 +2189,10 @@ type CreateSessionRequest = {
2157
2189
  tool_context?: {
2158
2190
  [key: string]: string;
2159
2191
  } | null;
2192
+ /**
2193
+ * Number of seconds of inactivity after which the session expires. 0 means the session never expires.
2194
+ */
2195
+ inactivity_ttl_seconds?: number;
2160
2196
  };
2161
2197
  type UpdateSessionRequest = {
2162
2198
  /**
@@ -2166,7 +2202,7 @@ type UpdateSessionRequest = {
2166
2202
  /**
2167
2203
  * Session status
2168
2204
  */
2169
- status?: 'open' | 'closed';
2205
+ status?: 'open' | 'closed' | 'expired';
2170
2206
  /**
2171
2207
  * Enable or disable automatic generation after user messages.
2172
2208
  */
@@ -6683,9 +6719,9 @@ type ListAgentSessionsData = {
6683
6719
  */
6684
6720
  actor_id?: string;
6685
6721
  /**
6686
- * Filter by session status (open or closed)
6722
+ * Filter by session status (open, closed, or expired)
6687
6723
  */
6688
- status?: 'open' | 'closed';
6724
+ status?: 'open' | 'closed' | 'expired';
6689
6725
  limit?: number;
6690
6726
  offset?: number;
6691
6727
  };
@@ -6742,6 +6778,10 @@ type CreateAgentSessionErrors = {
6742
6778
  * Not found
6743
6779
  */
6744
6780
  404: ErrorResponse;
6781
+ /**
6782
+ * An open session already exists for this actor (single_session_per_actor is enabled)
6783
+ */
6784
+ 409: ErrorResponse;
6745
6785
  };
6746
6786
  type CreateAgentSessionError = CreateAgentSessionErrors[keyof CreateAgentSessionErrors];
6747
6787
  type CreateAgentSessionResponses = {
@@ -6981,6 +7021,10 @@ type GenerateSessionResponseErrors = {
6981
7021
  * Generation already in progress
6982
7022
  */
6983
7023
  409: ErrorResponse;
7024
+ /**
7025
+ * Session has expired due to inactivity
7026
+ */
7027
+ 410: ErrorResponse;
6984
7028
  };
6985
7029
  type GenerateSessionResponseError = GenerateSessionResponseErrors[keyof GenerateSessionResponseErrors];
6986
7030
  type GenerateSessionResponseResponses = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",