@spaciv/sdk 0.1.17 → 0.1.18

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.
@@ -26,6 +26,10 @@ export function instanceOfAssistantChatPollBody(value) {
26
26
  return false;
27
27
  if (!('status' in value) || value['status'] === undefined)
28
28
  return false;
29
+ if (!('subsessionSteps' in value) || value['subsessionSteps'] === undefined)
30
+ return false;
31
+ if (!('subsessionTool' in value) || value['subsessionTool'] === undefined)
32
+ return false;
29
33
  return true;
30
34
  }
31
35
  export function AssistantChatPollBodyFromJSON(json) {
@@ -41,6 +45,8 @@ export function AssistantChatPollBodyFromJSONTyped(json, ignoreDiscriminator) {
41
45
  'finishedToolCallIds': json['finishedToolCallIds'],
42
46
  'messages': (json['messages'].map(AssistantChatPollMessageFromJSON)),
43
47
  'status': json['status'],
48
+ 'subsessionSteps': json['subsessionSteps'],
49
+ 'subsessionTool': json['subsessionTool'],
44
50
  };
45
51
  }
46
52
  export function AssistantChatPollBodyToJSON(json) {
@@ -56,5 +62,7 @@ export function AssistantChatPollBodyToJSONTyped(value, ignoreDiscriminator = fa
56
62
  'finishedToolCallIds': value['finishedToolCallIds'],
57
63
  'messages': (value['messages'].map(AssistantChatPollMessageToJSON)),
58
64
  'status': value['status'],
65
+ 'subsessionSteps': value['subsessionSteps'],
66
+ 'subsessionTool': value['subsessionTool'],
59
67
  };
60
68
  }
@@ -58,6 +58,12 @@ export interface AssistantChatPollMessage {
58
58
  * @memberof AssistantChatPollMessage
59
59
  */
60
60
  role: string;
61
+ /**
62
+ * Id of the conversation a run_subsession action message (kind 2) started, which is polled like any other conversation to follow the subsession's own steps. It is not found until the subsession has started. Empty on every other message.
63
+ * @type {string}
64
+ * @memberof AssistantChatPollMessage
65
+ */
66
+ subsessionId: string;
61
67
  /**
62
68
  *
63
69
  * @type {string}
@@ -30,6 +30,8 @@ export function instanceOfAssistantChatPollMessage(value) {
30
30
  return false;
31
31
  if (!('role' in value) || value['role'] === undefined)
32
32
  return false;
33
+ if (!('subsessionId' in value) || value['subsessionId'] === undefined)
34
+ return false;
33
35
  if (!('text' in value) || value['text'] === undefined)
34
36
  return false;
35
37
  if (!('toolCallId' in value) || value['toolCallId'] === undefined)
@@ -51,6 +53,7 @@ export function AssistantChatPollMessageFromJSONTyped(json, ignoreDiscriminator)
51
53
  'payload': json['payload'],
52
54
  'requestId': json['requestId'],
53
55
  'role': json['role'],
56
+ 'subsessionId': json['subsessionId'],
54
57
  'text': json['text'],
55
58
  'toolCallId': json['toolCallId'],
56
59
  };
@@ -70,6 +73,7 @@ export function AssistantChatPollMessageToJSONTyped(value, ignoreDiscriminator =
70
73
  'payload': value['payload'],
71
74
  'requestId': value['requestId'],
72
75
  'role': value['role'],
76
+ 'subsessionId': value['subsessionId'],
73
77
  'text': value['text'],
74
78
  'toolCallId': value['toolCallId'],
75
79
  };
@@ -16,12 +16,30 @@ import type { AssistantTranscriptMessage } from './AssistantTranscriptMessage';
16
16
  * @interface AssistantTranscriptBody
17
17
  */
18
18
  export interface AssistantTranscriptBody {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof AssistantTranscriptBody
23
+ */
24
+ conversationId: string;
19
25
  /**
20
26
  *
21
27
  * @type {Array<AssistantTranscriptMessage>}
22
28
  * @memberof AssistantTranscriptBody
23
29
  */
24
30
  messages: Array<AssistantTranscriptMessage>;
31
+ /**
32
+ * For a subsession, the id of the run_subsession tool call that started it. Empty for a conversation the user started.
33
+ * @type {string}
34
+ * @memberof AssistantTranscriptBody
35
+ */
36
+ parentToolCallId: string;
37
+ /**
38
+ * The transcript of each subsession the assistant started, in the order it started them. A subsession's messages are not part of messages: the tool message answering its run_subsession call holds only its reply. A subsession is never compacted and starts none of its own, so its summary fields and its own subsessions are empty.
39
+ * @type {Array<AssistantTranscriptBody>}
40
+ * @memberof AssistantTranscriptBody
41
+ */
42
+ subsessions: Array<AssistantTranscriptBody>;
25
43
  /**
26
44
  * What the assistant is told of the messages it no longer replays, once the conversation has been compacted. Empty until then.
27
45
  * @type {string}
@@ -16,8 +16,14 @@ import { AssistantTranscriptMessageFromJSON, AssistantTranscriptMessageToJSON, }
16
16
  * Check if a given object implements the AssistantTranscriptBody interface.
17
17
  */
18
18
  export function instanceOfAssistantTranscriptBody(value) {
19
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
20
+ return false;
19
21
  if (!('messages' in value) || value['messages'] === undefined)
20
22
  return false;
23
+ if (!('parentToolCallId' in value) || value['parentToolCallId'] === undefined)
24
+ return false;
25
+ if (!('subsessions' in value) || value['subsessions'] === undefined)
26
+ return false;
21
27
  if (!('summary' in value) || value['summary'] === undefined)
22
28
  return false;
23
29
  if (!('summaryUpTo' in value) || value['summaryUpTo'] === undefined)
@@ -32,7 +38,10 @@ export function AssistantTranscriptBodyFromJSONTyped(json, ignoreDiscriminator)
32
38
  return json;
33
39
  }
34
40
  return {
41
+ 'conversationId': json['conversationId'],
35
42
  'messages': (json['messages'].map(AssistantTranscriptMessageFromJSON)),
43
+ 'parentToolCallId': json['parentToolCallId'],
44
+ 'subsessions': (json['subsessions'].map(AssistantTranscriptBodyFromJSON)),
36
45
  'summary': json['summary'],
37
46
  'summaryUpTo': json['summaryUpTo'],
38
47
  };
@@ -45,7 +54,10 @@ export function AssistantTranscriptBodyToJSONTyped(value, ignoreDiscriminator =
45
54
  return value;
46
55
  }
47
56
  return {
57
+ 'conversationId': value['conversationId'],
48
58
  'messages': (value['messages'].map(AssistantTranscriptMessageToJSON)),
59
+ 'parentToolCallId': value['parentToolCallId'],
60
+ 'subsessions': (value['subsessions'].map(AssistantTranscriptBodyToJSON)),
49
61
  'summary': value['summary'],
50
62
  'summaryUpTo': value['summaryUpTo'],
51
63
  };
@@ -48,6 +48,18 @@ export interface AssistantChatPollBody {
48
48
  * @memberof AssistantChatPollBody
49
49
  */
50
50
  status: string;
51
+ /**
52
+ * While a subsession is running, how many messages it has recorded so far, which grows with each of its steps even when it calls the same tool again. Zero when no subsession is running, including once it has ended and before the turn has recorded its result.
53
+ * @type {number}
54
+ * @memberof AssistantChatPollBody
55
+ */
56
+ subsessionSteps: number;
57
+ /**
58
+ * While a subsession is running, the tool it is running now. Empty while it is thinking, and when no subsession is running. The running subsession is the run_subsession action whose toolCallId is not yet among the finished tool calls.
59
+ * @type {string}
60
+ * @memberof AssistantChatPollBody
61
+ */
62
+ subsessionTool: string;
51
63
  }
52
64
  /**
53
65
  * Check if a given object implements the AssistantChatPollBody interface.
@@ -33,6 +33,10 @@ function instanceOfAssistantChatPollBody(value) {
33
33
  return false;
34
34
  if (!('status' in value) || value['status'] === undefined)
35
35
  return false;
36
+ if (!('subsessionSteps' in value) || value['subsessionSteps'] === undefined)
37
+ return false;
38
+ if (!('subsessionTool' in value) || value['subsessionTool'] === undefined)
39
+ return false;
36
40
  return true;
37
41
  }
38
42
  function AssistantChatPollBodyFromJSON(json) {
@@ -48,6 +52,8 @@ function AssistantChatPollBodyFromJSONTyped(json, ignoreDiscriminator) {
48
52
  'finishedToolCallIds': json['finishedToolCallIds'],
49
53
  'messages': (json['messages'].map(AssistantChatPollMessage_1.AssistantChatPollMessageFromJSON)),
50
54
  'status': json['status'],
55
+ 'subsessionSteps': json['subsessionSteps'],
56
+ 'subsessionTool': json['subsessionTool'],
51
57
  };
52
58
  }
53
59
  function AssistantChatPollBodyToJSON(json) {
@@ -63,5 +69,7 @@ function AssistantChatPollBodyToJSONTyped(value, ignoreDiscriminator = false) {
63
69
  'finishedToolCallIds': value['finishedToolCallIds'],
64
70
  'messages': (value['messages'].map(AssistantChatPollMessage_1.AssistantChatPollMessageToJSON)),
65
71
  'status': value['status'],
72
+ 'subsessionSteps': value['subsessionSteps'],
73
+ 'subsessionTool': value['subsessionTool'],
66
74
  };
67
75
  }
@@ -58,6 +58,12 @@ export interface AssistantChatPollMessage {
58
58
  * @memberof AssistantChatPollMessage
59
59
  */
60
60
  role: string;
61
+ /**
62
+ * Id of the conversation a run_subsession action message (kind 2) started, which is polled like any other conversation to follow the subsession's own steps. It is not found until the subsession has started. Empty on every other message.
63
+ * @type {string}
64
+ * @memberof AssistantChatPollMessage
65
+ */
66
+ subsessionId: string;
61
67
  /**
62
68
  *
63
69
  * @type {string}
@@ -37,6 +37,8 @@ function instanceOfAssistantChatPollMessage(value) {
37
37
  return false;
38
38
  if (!('role' in value) || value['role'] === undefined)
39
39
  return false;
40
+ if (!('subsessionId' in value) || value['subsessionId'] === undefined)
41
+ return false;
40
42
  if (!('text' in value) || value['text'] === undefined)
41
43
  return false;
42
44
  if (!('toolCallId' in value) || value['toolCallId'] === undefined)
@@ -58,6 +60,7 @@ function AssistantChatPollMessageFromJSONTyped(json, ignoreDiscriminator) {
58
60
  'payload': json['payload'],
59
61
  'requestId': json['requestId'],
60
62
  'role': json['role'],
63
+ 'subsessionId': json['subsessionId'],
61
64
  'text': json['text'],
62
65
  'toolCallId': json['toolCallId'],
63
66
  };
@@ -77,6 +80,7 @@ function AssistantChatPollMessageToJSONTyped(value, ignoreDiscriminator = false)
77
80
  'payload': value['payload'],
78
81
  'requestId': value['requestId'],
79
82
  'role': value['role'],
83
+ 'subsessionId': value['subsessionId'],
80
84
  'text': value['text'],
81
85
  'toolCallId': value['toolCallId'],
82
86
  };
@@ -16,12 +16,30 @@ import type { AssistantTranscriptMessage } from './AssistantTranscriptMessage';
16
16
  * @interface AssistantTranscriptBody
17
17
  */
18
18
  export interface AssistantTranscriptBody {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof AssistantTranscriptBody
23
+ */
24
+ conversationId: string;
19
25
  /**
20
26
  *
21
27
  * @type {Array<AssistantTranscriptMessage>}
22
28
  * @memberof AssistantTranscriptBody
23
29
  */
24
30
  messages: Array<AssistantTranscriptMessage>;
31
+ /**
32
+ * For a subsession, the id of the run_subsession tool call that started it. Empty for a conversation the user started.
33
+ * @type {string}
34
+ * @memberof AssistantTranscriptBody
35
+ */
36
+ parentToolCallId: string;
37
+ /**
38
+ * The transcript of each subsession the assistant started, in the order it started them. A subsession's messages are not part of messages: the tool message answering its run_subsession call holds only its reply. A subsession is never compacted and starts none of its own, so its summary fields and its own subsessions are empty.
39
+ * @type {Array<AssistantTranscriptBody>}
40
+ * @memberof AssistantTranscriptBody
41
+ */
42
+ subsessions: Array<AssistantTranscriptBody>;
25
43
  /**
26
44
  * What the assistant is told of the messages it no longer replays, once the conversation has been compacted. Empty until then.
27
45
  * @type {string}
@@ -23,8 +23,14 @@ const AssistantTranscriptMessage_1 = require("./AssistantTranscriptMessage");
23
23
  * Check if a given object implements the AssistantTranscriptBody interface.
24
24
  */
25
25
  function instanceOfAssistantTranscriptBody(value) {
26
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
27
+ return false;
26
28
  if (!('messages' in value) || value['messages'] === undefined)
27
29
  return false;
30
+ if (!('parentToolCallId' in value) || value['parentToolCallId'] === undefined)
31
+ return false;
32
+ if (!('subsessions' in value) || value['subsessions'] === undefined)
33
+ return false;
28
34
  if (!('summary' in value) || value['summary'] === undefined)
29
35
  return false;
30
36
  if (!('summaryUpTo' in value) || value['summaryUpTo'] === undefined)
@@ -39,7 +45,10 @@ function AssistantTranscriptBodyFromJSONTyped(json, ignoreDiscriminator) {
39
45
  return json;
40
46
  }
41
47
  return {
48
+ 'conversationId': json['conversationId'],
42
49
  'messages': (json['messages'].map(AssistantTranscriptMessage_1.AssistantTranscriptMessageFromJSON)),
50
+ 'parentToolCallId': json['parentToolCallId'],
51
+ 'subsessions': (json['subsessions'].map(AssistantTranscriptBodyFromJSON)),
43
52
  'summary': json['summary'],
44
53
  'summaryUpTo': json['summaryUpTo'],
45
54
  };
@@ -52,7 +61,10 @@ function AssistantTranscriptBodyToJSONTyped(value, ignoreDiscriminator = false)
52
61
  return value;
53
62
  }
54
63
  return {
64
+ 'conversationId': value['conversationId'],
55
65
  'messages': (value['messages'].map(AssistantTranscriptMessage_1.AssistantTranscriptMessageToJSON)),
66
+ 'parentToolCallId': value['parentToolCallId'],
67
+ 'subsessions': (value['subsessions'].map(AssistantTranscriptBodyToJSON)),
56
68
  'summary': value['summary'],
57
69
  'summaryUpTo': value['summaryUpTo'],
58
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaciv/sdk",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "OpenAPI client for @spaciv/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -79,7 +79,7 @@ export interface AssistantApiUpdateConfigRequest {
79
79
  */
80
80
  export interface AssistantApiInterface {
81
81
  /**
82
- * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Requires the *AI assistant* permission.
82
+ * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Returns `409` if `conversationId` names a conversation that cannot take messages: a subsession the assistant started for a tool call, which only ever answers the task it was given, or a deleted conversation. Requires the *AI assistant* permission.
83
83
  * @summary Send a chat message
84
84
  * @param {AssistantChatReq} [assistantChatReq]
85
85
  * @param {*} [options] Override http request option.
@@ -89,13 +89,13 @@ export interface AssistantApiInterface {
89
89
  createChatRaw(requestParameters: AssistantApiCreateChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssistantChatRes>>;
90
90
 
91
91
  /**
92
- * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Requires the *AI assistant* permission.
92
+ * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Returns `409` if `conversationId` names a conversation that cannot take messages: a subsession the assistant started for a tool call, which only ever answers the task it was given, or a deleted conversation. Requires the *AI assistant* permission.
93
93
  * Send a chat message
94
94
  */
95
95
  createChat(requestParameters: AssistantApiCreateChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantChatRes>;
96
96
 
97
97
  /**
98
- * Permanently removes a conversation and all its messages. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
98
+ * Permanently removes a conversation, all its messages, and every subsession it started. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is deleted only with the conversation that started it. Requires the *AI assistant* permission.
99
99
  * @summary Delete a conversation
100
100
  * @param {string} id UUID of the conversation to delete.
101
101
  * @param {*} [options] Override http request option.
@@ -105,7 +105,7 @@ export interface AssistantApiInterface {
105
105
  deleteConversationsRaw(requestParameters: AssistantApiDeleteConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
106
106
 
107
107
  /**
108
- * Permanently removes a conversation and all its messages. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
108
+ * Permanently removes a conversation, all its messages, and every subsession it started. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is deleted only with the conversation that started it. Requires the *AI assistant* permission.
109
109
  * Delete a conversation
110
110
  */
111
111
  deleteConversations(requestParameters: AssistantApiDeleteConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -126,7 +126,7 @@ export interface AssistantApiInterface {
126
126
  getConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantConfigBody>;
127
127
 
128
128
  /**
129
- * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, and the summary that replaces the earliest messages once the conversation has been compacted. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
129
+ * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, the summary that replaces the earliest messages once the conversation has been compacted, and the stored conversation of every subsession the assistant handed a task to. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
130
130
  * @summary Get a conversation\'s transcript
131
131
  * @param {string} id UUID of the conversation to read.
132
132
  * @param {*} [options] Override http request option.
@@ -136,7 +136,7 @@ export interface AssistantApiInterface {
136
136
  getConversationsTranscriptRaw(requestParameters: AssistantApiGetConversationsTranscriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssistantTranscriptBody>>;
137
137
 
138
138
  /**
139
- * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, and the summary that replaces the earliest messages once the conversation has been compacted. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
139
+ * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, the summary that replaces the earliest messages once the conversation has been compacted, and the stored conversation of every subsession the assistant handed a task to. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
140
140
  * Get a conversation\'s transcript
141
141
  */
142
142
  getConversationsTranscript(requestParameters: AssistantApiGetConversationsTranscriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantTranscriptBody>;
@@ -189,7 +189,7 @@ export interface AssistantApiInterface {
189
189
  pollConversations(requestParameters: AssistantApiPollConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantChatPollBody>;
190
190
 
191
191
  /**
192
- * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
192
+ * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Stopping a conversation also stops a subsession it is running. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is stopped only by stopping the conversation that started it. Requires the *AI assistant* permission.
193
193
  * @summary Stop the running turn
194
194
  * @param {string} id UUID of the conversation whose turn to stop.
195
195
  * @param {*} [options] Override http request option.
@@ -199,7 +199,7 @@ export interface AssistantApiInterface {
199
199
  stopConversationsRaw(requestParameters: AssistantApiStopConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
200
200
 
201
201
  /**
202
- * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
202
+ * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Stopping a conversation also stops a subsession it is running. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is stopped only by stopping the conversation that started it. Requires the *AI assistant* permission.
203
203
  * Stop the running turn
204
204
  */
205
205
  stopConversations(requestParameters: AssistantApiStopConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -228,7 +228,7 @@ export interface AssistantApiInterface {
228
228
  export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterface {
229
229
 
230
230
  /**
231
- * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Requires the *AI assistant* permission.
231
+ * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Returns `409` if `conversationId` names a conversation that cannot take messages: a subsession the assistant started for a tool call, which only ever answers the task it was given, or a deleted conversation. Requires the *AI assistant* permission.
232
232
  * Send a chat message
233
233
  */
234
234
  async createChatRaw(requestParameters: AssistantApiCreateChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssistantChatRes>> {
@@ -261,7 +261,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
261
261
  }
262
262
 
263
263
  /**
264
- * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Requires the *AI assistant* permission.
264
+ * Submits a message to the assistant and dispatches it for asynchronous processing. Returns a `conversationId` and a `requestId` immediately; the reply arrives out-of-band, through `GET /v1/assistant/conversations/{id}/poll`. If `conversationId` is omitted a new conversation is started. `attachmentFileIds` attaches up to 10 distinct files from account file storage and requires View file storage permission. Files cannot be attached while the account has turned the assistant\'s tools off. Returns `409` if `conversationId` names a conversation that cannot take messages: a subsession the assistant started for a tool call, which only ever answers the task it was given, or a deleted conversation. Requires the *AI assistant* permission.
265
265
  * Send a chat message
266
266
  */
267
267
  async createChat(requestParameters: AssistantApiCreateChatRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantChatRes> {
@@ -270,7 +270,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
270
270
  }
271
271
 
272
272
  /**
273
- * Permanently removes a conversation and all its messages. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
273
+ * Permanently removes a conversation, all its messages, and every subsession it started. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is deleted only with the conversation that started it. Requires the *AI assistant* permission.
274
274
  * Delete a conversation
275
275
  */
276
276
  async deleteConversationsRaw(requestParameters: AssistantApiDeleteConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -308,7 +308,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
308
308
  }
309
309
 
310
310
  /**
311
- * Permanently removes a conversation and all its messages. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
311
+ * Permanently removes a conversation, all its messages, and every subsession it started. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is deleted only with the conversation that started it. Requires the *AI assistant* permission.
312
312
  * Delete a conversation
313
313
  */
314
314
  async deleteConversations(requestParameters: AssistantApiDeleteConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -355,7 +355,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
355
355
  }
356
356
 
357
357
  /**
358
- * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, and the summary that replaces the earliest messages once the conversation has been compacted. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
358
+ * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, the summary that replaces the earliest messages once the conversation has been compacted, and the stored conversation of every subsession the assistant handed a task to. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
359
359
  * Get a conversation\'s transcript
360
360
  */
361
361
  async getConversationsTranscriptRaw(requestParameters: AssistantApiGetConversationsTranscriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssistantTranscriptBody>> {
@@ -393,7 +393,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
393
393
  }
394
394
 
395
395
  /**
396
- * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, and the summary that replaces the earliest messages once the conversation has been compacted. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
396
+ * Returns the conversation as it is stored, for debugging and evaluating the assistant: every message the assistant has been shown, including the results of its tool calls and the ids that pair each result with its call, the summary that replaces the earliest messages once the conversation has been compacted, and the stored conversation of every subsession the assistant handed a task to. Returns `404` if the conversation does not exist. Requires the *AI assistant* and *Download AI assistant conversation* permissions.
397
397
  * Get a conversation\'s transcript
398
398
  */
399
399
  async getConversationsTranscript(requestParameters: AssistantApiGetConversationsTranscriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssistantTranscriptBody> {
@@ -531,7 +531,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
531
531
  }
532
532
 
533
533
  /**
534
- * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
534
+ * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Stopping a conversation also stops a subsession it is running. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is stopped only by stopping the conversation that started it. Requires the *AI assistant* permission.
535
535
  * Stop the running turn
536
536
  */
537
537
  async stopConversationsRaw(requestParameters: AssistantApiStopConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -569,7 +569,7 @@ export class AssistantApi extends runtime.BaseAPI implements AssistantApiInterfa
569
569
  }
570
570
 
571
571
  /**
572
- * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Returns `404` if the conversation does not exist. Requires the *AI assistant* permission.
572
+ * Asks the assistant to stop the turn it is working on. The turn ends at its next step - a tool call already sent finishes and is recorded - so the conversation stays usable and keeps everything the turn did before it was stopped. Succeeds with nothing to do if no turn is running. Stopping a conversation also stops a subsession it is running. Returns `404` if the conversation does not exist, and `409` if it is a subsession, which is stopped only by stopping the conversation that started it. Requires the *AI assistant* permission.
573
573
  * Stop the running turn
574
574
  */
575
575
  async stopConversations(requestParameters: AssistantApiStopConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -167,7 +167,7 @@ export interface ScenariosApiInterface {
167
167
  listLayerVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LayerVariablesRes>;
168
168
 
169
169
  /**
170
- * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
170
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Returns `409` if the scenario keeps changing concurrently while the update is retried. Requires the *Edit scenario planning* permission.
171
171
  * @summary Update a scenario
172
172
  * @param {string} id
173
173
  * @param {ScenarioPatch} [scenarioPatch]
@@ -178,7 +178,7 @@ export interface ScenariosApiInterface {
178
178
  updateRaw(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
179
179
 
180
180
  /**
181
- * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
181
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Returns `409` if the scenario keeps changing concurrently while the update is retried. Requires the *Edit scenario planning* permission.
182
182
  * Update a scenario
183
183
  */
184
184
  update(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -468,7 +468,7 @@ export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterfa
468
468
  }
469
469
 
470
470
  /**
471
- * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
471
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Returns `409` if the scenario keeps changing concurrently while the update is retried. Requires the *Edit scenario planning* permission.
472
472
  * Update a scenario
473
473
  */
474
474
  async updateRaw(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
@@ -509,7 +509,7 @@ export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterfa
509
509
  }
510
510
 
511
511
  /**
512
- * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
512
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Returns `409` if the scenario keeps changing concurrently while the update is retried. Requires the *Edit scenario planning* permission.
513
513
  * Update a scenario
514
514
  */
515
515
  async update(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
@@ -71,6 +71,18 @@ export interface AssistantChatPollBody {
71
71
  * @memberof AssistantChatPollBody
72
72
  */
73
73
  status: string;
74
+ /**
75
+ * While a subsession is running, how many messages it has recorded so far, which grows with each of its steps even when it calls the same tool again. Zero when no subsession is running, including once it has ended and before the turn has recorded its result.
76
+ * @type {number}
77
+ * @memberof AssistantChatPollBody
78
+ */
79
+ subsessionSteps: number;
80
+ /**
81
+ * While a subsession is running, the tool it is running now. Empty while it is thinking, and when no subsession is running. The running subsession is the run_subsession action whose toolCallId is not yet among the finished tool calls.
82
+ * @type {string}
83
+ * @memberof AssistantChatPollBody
84
+ */
85
+ subsessionTool: string;
74
86
  }
75
87
 
76
88
  /**
@@ -81,6 +93,8 @@ export function instanceOfAssistantChatPollBody(value: object): value is Assista
81
93
  if (!('finishedToolCallIds' in value) || value['finishedToolCallIds'] === undefined) return false;
82
94
  if (!('messages' in value) || value['messages'] === undefined) return false;
83
95
  if (!('status' in value) || value['status'] === undefined) return false;
96
+ if (!('subsessionSteps' in value) || value['subsessionSteps'] === undefined) return false;
97
+ if (!('subsessionTool' in value) || value['subsessionTool'] === undefined) return false;
84
98
  return true;
85
99
  }
86
100
 
@@ -99,6 +113,8 @@ export function AssistantChatPollBodyFromJSONTyped(json: any, ignoreDiscriminato
99
113
  'finishedToolCallIds': json['finishedToolCallIds'],
100
114
  'messages': ((json['messages'] as Array<any>).map(AssistantChatPollMessageFromJSON)),
101
115
  'status': json['status'],
116
+ 'subsessionSteps': json['subsessionSteps'],
117
+ 'subsessionTool': json['subsessionTool'],
102
118
  };
103
119
  }
104
120
 
@@ -118,6 +134,8 @@ export function AssistantChatPollBodyToJSONTyped(value?: AssistantChatPollBody |
118
134
  'finishedToolCallIds': value['finishedToolCallIds'],
119
135
  'messages': ((value['messages'] as Array<any>).map(AssistantChatPollMessageToJSON)),
120
136
  'status': value['status'],
137
+ 'subsessionSteps': value['subsessionSteps'],
138
+ 'subsessionTool': value['subsessionTool'],
121
139
  };
122
140
  }
123
141
 
@@ -69,6 +69,12 @@ export interface AssistantChatPollMessage {
69
69
  * @memberof AssistantChatPollMessage
70
70
  */
71
71
  role: string;
72
+ /**
73
+ * Id of the conversation a run_subsession action message (kind 2) started, which is polled like any other conversation to follow the subsession's own steps. It is not found until the subsession has started. Empty on every other message.
74
+ * @type {string}
75
+ * @memberof AssistantChatPollMessage
76
+ */
77
+ subsessionId: string;
72
78
  /**
73
79
  *
74
80
  * @type {string}
@@ -94,6 +100,7 @@ export function instanceOfAssistantChatPollMessage(value: object): value is Assi
94
100
  if (!('payload' in value) || value['payload'] === undefined) return false;
95
101
  if (!('requestId' in value) || value['requestId'] === undefined) return false;
96
102
  if (!('role' in value) || value['role'] === undefined) return false;
103
+ if (!('subsessionId' in value) || value['subsessionId'] === undefined) return false;
97
104
  if (!('text' in value) || value['text'] === undefined) return false;
98
105
  if (!('toolCallId' in value) || value['toolCallId'] === undefined) return false;
99
106
  return true;
@@ -116,6 +123,7 @@ export function AssistantChatPollMessageFromJSONTyped(json: any, ignoreDiscrimin
116
123
  'payload': json['payload'],
117
124
  'requestId': json['requestId'],
118
125
  'role': json['role'],
126
+ 'subsessionId': json['subsessionId'],
119
127
  'text': json['text'],
120
128
  'toolCallId': json['toolCallId'],
121
129
  };
@@ -139,6 +147,7 @@ export function AssistantChatPollMessageToJSONTyped(value?: AssistantChatPollMes
139
147
  'payload': value['payload'],
140
148
  'requestId': value['requestId'],
141
149
  'role': value['role'],
150
+ 'subsessionId': value['subsessionId'],
142
151
  'text': value['text'],
143
152
  'toolCallId': value['toolCallId'],
144
153
  };