sarvam-agents-client 0.2.2 → 0.3.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.
Files changed (101) hide show
  1. package/dist/apis/AgentsApi.d.ts +4 -4
  2. package/dist/apis/AgentsApi.js +4 -4
  3. package/dist/apis/AppsApi.d.ts +1 -0
  4. package/dist/apis/AppsApi.js +3 -0
  5. package/dist/apis/QueueApi.d.ts +1 -0
  6. package/dist/apis/QueueApi.js +3 -0
  7. package/dist/apis/ResponsesApi.d.ts +2 -0
  8. package/dist/apis/ResponsesApi.js +6 -0
  9. package/dist/compose/agent.d.ts +10 -3
  10. package/dist/compose/agent.js +8 -0
  11. package/dist/compose/deploy.d.ts +3 -2
  12. package/dist/compose/errors.d.ts +17 -0
  13. package/dist/compose/errors.js +17 -0
  14. package/dist/compose/events.d.ts +44 -0
  15. package/dist/compose/events.js +32 -2
  16. package/dist/compose/index.d.ts +3 -2
  17. package/dist/compose/output.d.ts +29 -0
  18. package/dist/compose/output.js +451 -0
  19. package/dist/compose/run.d.ts +45 -13
  20. package/dist/compose/run.js +68 -3
  21. package/dist/compose/runState.d.ts +2 -1
  22. package/dist/compose/settingsTransport.d.ts +3 -2
  23. package/dist/compose/transport.d.ts +3 -2
  24. package/dist/esm/apis/AgentsApi.d.ts +4 -4
  25. package/dist/esm/apis/AgentsApi.js +4 -4
  26. package/dist/esm/apis/AppsApi.d.ts +1 -0
  27. package/dist/esm/apis/AppsApi.js +3 -0
  28. package/dist/esm/apis/QueueApi.d.ts +1 -0
  29. package/dist/esm/apis/QueueApi.js +3 -0
  30. package/dist/esm/apis/ResponsesApi.d.ts +2 -0
  31. package/dist/esm/apis/ResponsesApi.js +6 -0
  32. package/dist/esm/compose/agent.d.ts +10 -3
  33. package/dist/esm/compose/agent.js +8 -0
  34. package/dist/esm/compose/deploy.d.ts +3 -2
  35. package/dist/esm/compose/errors.d.ts +17 -0
  36. package/dist/esm/compose/errors.js +17 -0
  37. package/dist/esm/compose/events.d.ts +44 -0
  38. package/dist/esm/compose/events.js +32 -2
  39. package/dist/esm/compose/index.d.ts +3 -2
  40. package/dist/esm/compose/output.d.ts +29 -0
  41. package/dist/esm/compose/output.js +445 -0
  42. package/dist/esm/compose/run.d.ts +45 -13
  43. package/dist/esm/compose/run.js +69 -4
  44. package/dist/esm/compose/runState.d.ts +2 -1
  45. package/dist/esm/compose/settingsTransport.d.ts +3 -2
  46. package/dist/esm/compose/transport.d.ts +3 -2
  47. package/dist/esm/models/AppResource.d.ts +29 -0
  48. package/dist/esm/models/AppResource.js +16 -0
  49. package/dist/esm/models/AppToolsResponse.d.ts +3 -4
  50. package/dist/esm/models/AppToolsResponse.js +3 -2
  51. package/dist/esm/models/AppView.d.ts +48 -0
  52. package/dist/esm/models/AppView.js +23 -0
  53. package/dist/esm/models/McpSecurityAppealView.d.ts +50 -0
  54. package/dist/esm/models/McpSecurityAppealView.js +47 -0
  55. package/dist/esm/models/McpSecurityView.d.ts +105 -0
  56. package/dist/esm/models/McpSecurityView.js +66 -0
  57. package/dist/esm/models/MessagesResponse.d.ts +6 -0
  58. package/dist/esm/models/MessagesResponse.js +2 -0
  59. package/dist/esm/models/ResponseDetail.d.ts +32 -0
  60. package/dist/esm/models/ResponseDetail.js +10 -0
  61. package/dist/esm/models/index.d.ts +2 -0
  62. package/dist/esm/models/index.js +2 -0
  63. package/dist/models/AppResource.d.ts +29 -0
  64. package/dist/models/AppResource.js +17 -1
  65. package/dist/models/AppToolsResponse.d.ts +3 -4
  66. package/dist/models/AppToolsResponse.js +3 -2
  67. package/dist/models/AppView.d.ts +48 -0
  68. package/dist/models/AppView.js +24 -1
  69. package/dist/models/McpSecurityAppealView.d.ts +50 -0
  70. package/dist/models/McpSecurityAppealView.js +54 -0
  71. package/dist/models/McpSecurityView.d.ts +105 -0
  72. package/dist/models/McpSecurityView.js +73 -0
  73. package/dist/models/MessagesResponse.d.ts +6 -0
  74. package/dist/models/MessagesResponse.js +2 -0
  75. package/dist/models/ResponseDetail.d.ts +32 -0
  76. package/dist/models/ResponseDetail.js +10 -0
  77. package/dist/models/index.d.ts +2 -0
  78. package/dist/models/index.js +2 -0
  79. package/package.json +4 -3
  80. package/src/apis/AgentsApi.ts +4 -4
  81. package/src/apis/AppsApi.ts +5 -0
  82. package/src/apis/QueueApi.ts +5 -0
  83. package/src/apis/ResponsesApi.ts +10 -0
  84. package/src/compose/agent.ts +21 -6
  85. package/src/compose/deploy.ts +6 -5
  86. package/src/compose/errors.ts +28 -1
  87. package/src/compose/events.ts +61 -1
  88. package/src/compose/index.ts +3 -2
  89. package/src/compose/output.ts +415 -0
  90. package/src/compose/run.ts +114 -20
  91. package/src/compose/runState.ts +2 -1
  92. package/src/compose/settingsTransport.ts +4 -3
  93. package/src/compose/transport.ts +3 -2
  94. package/src/models/AppResource.ts +42 -0
  95. package/src/models/AppToolsResponse.ts +11 -4
  96. package/src/models/AppView.ts +73 -0
  97. package/src/models/McpSecurityAppealView.ts +89 -0
  98. package/src/models/McpSecurityView.ts +169 -0
  99. package/src/models/MessagesResponse.ts +8 -0
  100. package/src/models/ResponseDetail.ts +40 -0
  101. package/src/models/index.ts +2 -0
@@ -1,5 +1,6 @@
1
1
  /** RunState: what a paused run needs to continue (conversation, pending interruptions and the caller's answers). */
2
2
  import type { Agent } from "./agent.js";
3
+ import type { OutputType } from "./output.js";
3
4
  import { UserError } from "./errors.js";
4
5
  import type { ClarifyQuestion } from "./events.js";
5
6
 
@@ -56,7 +57,7 @@ export class RunState {
56
57
  }
57
58
 
58
59
  /** Read a state written by `toString()` (or by Python's `to_json()`). */
59
- static async fromString(agent: Agent, s: string): Promise<RunState> {
60
+ static async fromString(agent: Agent<OutputType | undefined>, s: string): Promise<RunState> {
60
61
  void agent; // accepted for @openai/agents parity; the state holds no agent definition
61
62
  let data: unknown;
62
63
  try {
@@ -8,6 +8,7 @@ import type { Configuration } from "../runtime.js";
8
8
  import { answerClarify, reconnect, streamResponse } from "../streaming.js";
9
9
  import type { ResponseStream } from "../streaming.js";
10
10
  import type { Agent } from "./agent.js";
11
+ import type { OutputType } from "./output.js";
11
12
  import { NotSupportedByServerError, UserError } from "./errors.js";
12
13
  import { fromUiChunk } from "./events.js";
13
14
  import type { Event } from "./events.js";
@@ -89,7 +90,7 @@ export class SettingsTransport implements Transport {
89
90
  return this.remote(resource, await this.instructions(agentId));
90
91
  }
91
92
 
92
- async createAgent(agent: Agent): Promise<RemoteAgent> {
93
+ async createAgent(agent: Agent<OutputType | undefined>): Promise<RemoteAgent> {
93
94
  const settings = agent.toSettings();
94
95
  let resource;
95
96
  try {
@@ -132,7 +133,7 @@ export class SettingsTransport implements Transport {
132
133
  };
133
134
  }
134
135
 
135
- async updateAgent(agentId: string, agent: Agent): Promise<RemoteAgent> {
136
+ async updateAgent(agentId: string, agent: Agent<OutputType | undefined>): Promise<RemoteAgent> {
136
137
  const settings = agent.toSettings();
137
138
  // findAgents searches by display name, so an adopted (or dashboard-renamed) agent must carry sdk_name.
138
139
  if ((await this.agents.getAgent({ agentId })).name !== agent.name) {
@@ -271,7 +272,7 @@ async function invalidSettings(err: unknown): Promise<UserError | null> {
271
272
  }
272
273
 
273
274
  /** findAgents() matches on metadata.sdk_name; a server that drops it would get a new agent per deploy. */
274
- function checkMetadata(envelope: Envelope, agent: Agent): void {
275
+ function checkMetadata(envelope: Envelope, agent: Agent<OutputType | undefined>): void {
275
276
  const metadata = (envelope.settings ?? {})["metadata"];
276
277
  if (typeof metadata !== "object" || metadata === null || Array.isArray(metadata) || metadata["sdk_name"] !== agent.name) {
277
278
  throw new NotSupportedByServerError(["metadata"]);
@@ -1,5 +1,6 @@
1
1
  /** Transport interface: the seam between the compose layer and the server. */
2
2
  import type { Agent } from "./agent.js";
3
+ import type { OutputType } from "./output.js";
3
4
  import type { Event } from "./events.js";
4
5
 
5
6
  export interface SettingsWarning {
@@ -28,8 +29,8 @@ export interface Transport {
28
29
  readonly kind: "settings";
29
30
  findAgents(sdkName: string): Promise<RemoteAgent[]>;
30
31
  readAgent(agentId: string): Promise<RemoteAgent>;
31
- createAgent(agent: Agent): Promise<RemoteAgent>;
32
- updateAgent(agentId: string, agent: Agent): Promise<RemoteAgent>;
32
+ createAgent(agent: Agent<OutputType | undefined>): Promise<RemoteAgent>;
33
+ updateAgent(agentId: string, agent: Agent<OutputType | undefined>): Promise<RemoteAgent>;
33
34
  deleteAgent(agentId: string): Promise<void>;
34
35
  startTurn(agentId: string, conversationId: string | null, text: string, signal?: AbortSignal): Promise<TurnStream>;
35
36
  answerClarify(
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
+ import type { McpSecurityView } from './McpSecurityView.js';
17
+ import {
18
+ McpSecurityViewFromJSON,
19
+ McpSecurityViewFromJSONTyped,
20
+ McpSecurityViewToJSON,
21
+ McpSecurityViewToJSONTyped,
22
+ } from './McpSecurityView.js';
16
23
  import type { Scope } from './Scope.js';
17
24
  import {
18
25
  ScopeFromJSON,
@@ -194,6 +201,24 @@ export interface AppResource {
194
201
  * @memberof AppResource
195
202
  */
196
203
  connectorMode?: string | null;
204
+ /**
205
+ *
206
+ * @type {boolean}
207
+ * @memberof AppResource
208
+ */
209
+ isCustom?: boolean;
210
+ /**
211
+ *
212
+ * @type {string}
213
+ * @memberof AppResource
214
+ */
215
+ authKind?: AppResourceAuthKindEnum | null;
216
+ /**
217
+ *
218
+ * @type {McpSecurityView}
219
+ * @memberof AppResource
220
+ */
221
+ security?: McpSecurityView | null;
197
222
  }
198
223
 
199
224
 
@@ -215,6 +240,17 @@ export const AppResourceAuthTypeEnum = {
215
240
  } as const;
216
241
  export type AppResourceAuthTypeEnum = typeof AppResourceAuthTypeEnum[keyof typeof AppResourceAuthTypeEnum];
217
242
 
243
+ /**
244
+ * @export
245
+ */
246
+ export const AppResourceAuthKindEnum = {
247
+ Oauth: 'oauth',
248
+ ApiKey: 'api_key',
249
+ SharedKey: 'shared_key',
250
+ None: 'none'
251
+ } as const;
252
+ export type AppResourceAuthKindEnum = typeof AppResourceAuthKindEnum[keyof typeof AppResourceAuthKindEnum];
253
+
218
254
 
219
255
  /**
220
256
  * Check if a given object implements the AppResource interface.
@@ -264,6 +300,9 @@ export function AppResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean
264
300
  'orgName': json['orgName'] == null ? undefined : json['orgName'],
265
301
  'isManagedConnector': json['isManagedConnector'] == null ? undefined : json['isManagedConnector'],
266
302
  'connectorMode': json['connectorMode'] == null ? undefined : json['connectorMode'],
303
+ 'isCustom': json['isCustom'] == null ? undefined : json['isCustom'],
304
+ 'authKind': json['authKind'] == null ? undefined : json['authKind'],
305
+ 'security': json['security'] == null ? undefined : McpSecurityViewFromJSON(json['security']),
267
306
  };
268
307
  }
269
308
 
@@ -302,6 +341,9 @@ export function AppResourceToJSONTyped(value?: AppResource | null, ignoreDiscrim
302
341
  'orgName': value['orgName'],
303
342
  'isManagedConnector': value['isManagedConnector'],
304
343
  'connectorMode': value['connectorMode'],
344
+ 'isCustom': value['isCustom'],
345
+ 'authKind': value['authKind'],
346
+ 'security': McpSecurityViewToJSON(value['security']),
305
347
  };
306
348
  }
307
349
 
@@ -20,6 +20,13 @@ import {
20
20
  AppToolViewToJSON,
21
21
  AppToolViewToJSONTyped,
22
22
  } from './AppToolView.js';
23
+ import type { McpSecurityView } from './McpSecurityView.js';
24
+ import {
25
+ McpSecurityViewFromJSON,
26
+ McpSecurityViewFromJSONTyped,
27
+ McpSecurityViewToJSON,
28
+ McpSecurityViewToJSONTyped,
29
+ } from './McpSecurityView.js';
23
30
 
24
31
  /**
25
32
  * FE dialog payload for ``GET /v1/apps/{integration_id}/tools``.
@@ -53,10 +60,10 @@ export interface AppToolsResponse {
53
60
  tools: Array<AppToolView>;
54
61
  /**
55
62
  *
56
- * @type {{ [key: string]: any; }}
63
+ * @type {McpSecurityView}
57
64
  * @memberof AppToolsResponse
58
65
  */
59
- security?: { [key: string]: any; } | null;
66
+ security?: McpSecurityView | null;
60
67
  /**
61
68
  *
62
69
  * @type {string}
@@ -102,7 +109,7 @@ export function AppToolsResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
102
109
  'name': json['name'],
103
110
  'authStatus': json['authStatus'],
104
111
  'tools': ((json['tools'] as Array<any>).map(AppToolViewFromJSON)),
105
- 'security': json['security'] == null ? undefined : json['security'],
112
+ 'security': json['security'] == null ? undefined : McpSecurityViewFromJSON(json['security']),
106
113
  'trust': json['trust'] == null ? undefined : json['trust'],
107
114
  };
108
115
  }
@@ -122,7 +129,7 @@ export function AppToolsResponseToJSONTyped(value?: AppToolsResponse | null, ign
122
129
  'name': value['name'],
123
130
  'authStatus': value['authStatus'],
124
131
  'tools': ((value['tools'] as Array<any>).map(AppToolViewToJSON)),
125
- 'security': value['security'],
132
+ 'security': McpSecurityViewToJSON(value['security']),
126
133
  'trust': value['trust'],
127
134
  };
128
135
  }
@@ -13,6 +13,20 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
+ import type { McpSecurityView } from './McpSecurityView.js';
17
+ import {
18
+ McpSecurityViewFromJSON,
19
+ McpSecurityViewFromJSONTyped,
20
+ McpSecurityViewToJSON,
21
+ McpSecurityViewToJSONTyped,
22
+ } from './McpSecurityView.js';
23
+ import type { Scope } from './Scope.js';
24
+ import {
25
+ ScopeFromJSON,
26
+ ScopeFromJSONTyped,
27
+ ScopeToJSON,
28
+ ScopeToJSONTyped,
29
+ } from './Scope.js';
16
30
  import type { AppCategory } from './AppCategory.js';
17
31
  import {
18
32
  AppCategoryFromJSON,
@@ -135,6 +149,42 @@ export interface AppView {
135
149
  * @memberof AppView
136
150
  */
137
151
  connectorMode?: string | null;
152
+ /**
153
+ *
154
+ * @type {boolean}
155
+ * @memberof AppView
156
+ */
157
+ isCustom?: boolean;
158
+ /**
159
+ *
160
+ * @type {boolean}
161
+ * @memberof AppView
162
+ */
163
+ isOwnedByMe?: boolean;
164
+ /**
165
+ *
166
+ * @type {Scope}
167
+ * @memberof AppView
168
+ */
169
+ scope?: Scope | null;
170
+ /**
171
+ *
172
+ * @type {string}
173
+ * @memberof AppView
174
+ */
175
+ createdByName?: string | null;
176
+ /**
177
+ *
178
+ * @type {string}
179
+ * @memberof AppView
180
+ */
181
+ authKind?: AppViewAuthKindEnum | null;
182
+ /**
183
+ *
184
+ * @type {McpSecurityView}
185
+ * @memberof AppView
186
+ */
187
+ security?: McpSecurityView | null;
138
188
  }
139
189
 
140
190
 
@@ -148,6 +198,17 @@ export const AppViewAuthTypeEnum = {
148
198
  } as const;
149
199
  export type AppViewAuthTypeEnum = typeof AppViewAuthTypeEnum[keyof typeof AppViewAuthTypeEnum];
150
200
 
201
+ /**
202
+ * @export
203
+ */
204
+ export const AppViewAuthKindEnum = {
205
+ Oauth: 'oauth',
206
+ ApiKey: 'api_key',
207
+ SharedKey: 'shared_key',
208
+ None: 'none'
209
+ } as const;
210
+ export type AppViewAuthKindEnum = typeof AppViewAuthKindEnum[keyof typeof AppViewAuthKindEnum];
211
+
151
212
 
152
213
  /**
153
214
  * Check if a given object implements the AppView interface.
@@ -194,6 +255,12 @@ export function AppViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
194
255
  'alreadyUsingUrl': json['alreadyUsingUrl'] == null ? undefined : json['alreadyUsingUrl'],
195
256
  'isManagedConnector': json['isManagedConnector'] == null ? undefined : json['isManagedConnector'],
196
257
  'connectorMode': json['connectorMode'] == null ? undefined : json['connectorMode'],
258
+ 'isCustom': json['isCustom'] == null ? undefined : json['isCustom'],
259
+ 'isOwnedByMe': json['isOwnedByMe'] == null ? undefined : json['isOwnedByMe'],
260
+ 'scope': json['scope'] == null ? undefined : ScopeFromJSON(json['scope']),
261
+ 'createdByName': json['createdByName'] == null ? undefined : json['createdByName'],
262
+ 'authKind': json['authKind'] == null ? undefined : json['authKind'],
263
+ 'security': json['security'] == null ? undefined : McpSecurityViewFromJSON(json['security']),
197
264
  };
198
265
  }
199
266
 
@@ -226,6 +293,12 @@ export function AppViewToJSONTyped(value?: AppView | null, ignoreDiscriminator:
226
293
  'alreadyUsingUrl': value['alreadyUsingUrl'],
227
294
  'isManagedConnector': value['isManagedConnector'],
228
295
  'connectorMode': value['connectorMode'],
296
+ 'isCustom': value['isCustom'],
297
+ 'isOwnedByMe': value['isOwnedByMe'],
298
+ 'scope': ScopeToJSON(value['scope']),
299
+ 'createdByName': value['createdByName'],
300
+ 'authKind': value['authKind'],
301
+ 'security': McpSecurityViewToJSON(value['security']),
229
302
  };
230
303
  }
231
304
 
@@ -0,0 +1,89 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * Appeal metadata on a BYO security projection. Status ``none`` when idle.
18
+ * @export
19
+ * @interface McpSecurityAppealView
20
+ */
21
+ export interface McpSecurityAppealView {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof McpSecurityAppealView
26
+ */
27
+ status?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof McpSecurityAppealView
32
+ */
33
+ contactEmail?: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof McpSecurityAppealView
38
+ */
39
+ contactPhone?: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof McpSecurityAppealView
44
+ */
45
+ denialReason?: string | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the McpSecurityAppealView interface.
50
+ */
51
+ export function instanceOfMcpSecurityAppealView(value: object): value is McpSecurityAppealView {
52
+ return true;
53
+ }
54
+
55
+ export function McpSecurityAppealViewFromJSON(json: any): McpSecurityAppealView {
56
+ return McpSecurityAppealViewFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function McpSecurityAppealViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): McpSecurityAppealView {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'status': json['status'] == null ? undefined : json['status'],
66
+ 'contactEmail': json['contactEmail'] == null ? undefined : json['contactEmail'],
67
+ 'contactPhone': json['contactPhone'] == null ? undefined : json['contactPhone'],
68
+ 'denialReason': json['denialReason'] == null ? undefined : json['denialReason'],
69
+ };
70
+ }
71
+
72
+ export function McpSecurityAppealViewToJSON(json: any): McpSecurityAppealView {
73
+ return McpSecurityAppealViewToJSONTyped(json, false);
74
+ }
75
+
76
+ export function McpSecurityAppealViewToJSONTyped(value?: McpSecurityAppealView | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'status': value['status'],
84
+ 'contactEmail': value['contactEmail'],
85
+ 'contactPhone': value['contactPhone'],
86
+ 'denialReason': value['denialReason'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,169 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { McpSecurityAppealView } from './McpSecurityAppealView.js';
17
+ import {
18
+ McpSecurityAppealViewFromJSON,
19
+ McpSecurityAppealViewFromJSONTyped,
20
+ McpSecurityAppealViewToJSON,
21
+ McpSecurityAppealViewToJSONTyped,
22
+ } from './McpSecurityAppealView.js';
23
+
24
+ /**
25
+ * Card-facing BYO security object (list, agent-bound apps, catalog, tools).
26
+ * @export
27
+ * @interface McpSecurityView
28
+ */
29
+ export interface McpSecurityView {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof McpSecurityView
34
+ */
35
+ state?: string | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof McpSecurityView
40
+ */
41
+ progress?: string | null;
42
+ /**
43
+ *
44
+ * @type {boolean}
45
+ * @memberof McpSecurityView
46
+ */
47
+ blocking?: boolean;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof McpSecurityView
52
+ */
53
+ enforced?: boolean;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof McpSecurityView
58
+ */
59
+ lastFailure?: string | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof McpSecurityView
64
+ */
65
+ message?: string | null;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof McpSecurityView
70
+ */
71
+ ownerActionRequired?: boolean | null;
72
+ /**
73
+ *
74
+ * @type {boolean}
75
+ * @memberof McpSecurityView
76
+ */
77
+ unverifiable?: boolean | null;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof McpSecurityView
82
+ */
83
+ auditAttempts?: number;
84
+ /**
85
+ *
86
+ * @type {number}
87
+ * @memberof McpSecurityView
88
+ */
89
+ auditAttemptLimit?: number;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof McpSecurityView
94
+ */
95
+ attemptsRemaining?: number;
96
+ /**
97
+ *
98
+ * @type {Array<string>}
99
+ * @memberof McpSecurityView
100
+ */
101
+ lastHoldReasons?: Array<string>;
102
+ /**
103
+ *
104
+ * @type {McpSecurityAppealView}
105
+ * @memberof McpSecurityView
106
+ */
107
+ appeal?: McpSecurityAppealView | null;
108
+ }
109
+
110
+ /**
111
+ * Check if a given object implements the McpSecurityView interface.
112
+ */
113
+ export function instanceOfMcpSecurityView(value: object): value is McpSecurityView {
114
+ return true;
115
+ }
116
+
117
+ export function McpSecurityViewFromJSON(json: any): McpSecurityView {
118
+ return McpSecurityViewFromJSONTyped(json, false);
119
+ }
120
+
121
+ export function McpSecurityViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): McpSecurityView {
122
+ if (json == null) {
123
+ return json;
124
+ }
125
+ return {
126
+
127
+ 'state': json['state'] == null ? undefined : json['state'],
128
+ 'progress': json['progress'] == null ? undefined : json['progress'],
129
+ 'blocking': json['blocking'] == null ? undefined : json['blocking'],
130
+ 'enforced': json['enforced'] == null ? undefined : json['enforced'],
131
+ 'lastFailure': json['lastFailure'] == null ? undefined : json['lastFailure'],
132
+ 'message': json['message'] == null ? undefined : json['message'],
133
+ 'ownerActionRequired': json['ownerActionRequired'] == null ? undefined : json['ownerActionRequired'],
134
+ 'unverifiable': json['unverifiable'] == null ? undefined : json['unverifiable'],
135
+ 'auditAttempts': json['auditAttempts'] == null ? undefined : json['auditAttempts'],
136
+ 'auditAttemptLimit': json['auditAttemptLimit'] == null ? undefined : json['auditAttemptLimit'],
137
+ 'attemptsRemaining': json['attemptsRemaining'] == null ? undefined : json['attemptsRemaining'],
138
+ 'lastHoldReasons': json['lastHoldReasons'] == null ? undefined : json['lastHoldReasons'],
139
+ 'appeal': json['appeal'] == null ? undefined : McpSecurityAppealViewFromJSON(json['appeal']),
140
+ };
141
+ }
142
+
143
+ export function McpSecurityViewToJSON(json: any): McpSecurityView {
144
+ return McpSecurityViewToJSONTyped(json, false);
145
+ }
146
+
147
+ export function McpSecurityViewToJSONTyped(value?: McpSecurityView | null, ignoreDiscriminator: boolean = false): any {
148
+ if (value == null) {
149
+ return value;
150
+ }
151
+
152
+ return {
153
+
154
+ 'state': value['state'],
155
+ 'progress': value['progress'],
156
+ 'blocking': value['blocking'],
157
+ 'enforced': value['enforced'],
158
+ 'lastFailure': value['lastFailure'],
159
+ 'message': value['message'],
160
+ 'ownerActionRequired': value['ownerActionRequired'],
161
+ 'unverifiable': value['unverifiable'],
162
+ 'auditAttempts': value['auditAttempts'],
163
+ 'auditAttemptLimit': value['auditAttemptLimit'],
164
+ 'attemptsRemaining': value['attemptsRemaining'],
165
+ 'lastHoldReasons': value['lastHoldReasons'],
166
+ 'appeal': McpSecurityAppealViewToJSON(value['appeal']),
167
+ };
168
+ }
169
+
@@ -82,6 +82,12 @@ export interface MessagesResponse {
82
82
  * @memberof MessagesResponse
83
83
  */
84
84
  nextBeforeCursor?: string | null;
85
+ /**
86
+ *
87
+ * @type {string}
88
+ * @memberof MessagesResponse
89
+ */
90
+ resumeCursor?: string | null;
85
91
  /**
86
92
  *
87
93
  * @type {Array<QueuedTurnView>}
@@ -117,6 +123,7 @@ export function MessagesResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
117
123
  'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
118
124
  'activeResponseId': json['activeResponseId'] == null ? undefined : json['activeResponseId'],
119
125
  'nextBeforeCursor': json['nextBeforeCursor'] == null ? undefined : json['nextBeforeCursor'],
126
+ 'resumeCursor': json['resumeCursor'] == null ? undefined : json['resumeCursor'],
120
127
  'queuedTurns': json['queuedTurns'] == null ? undefined : ((json['queuedTurns'] as Array<any>).map(QueuedTurnViewFromJSON)),
121
128
  };
122
129
  }
@@ -140,6 +147,7 @@ export function MessagesResponseToJSONTyped(value?: MessagesResponse | null, ign
140
147
  'nextCursor': value['nextCursor'],
141
148
  'activeResponseId': value['activeResponseId'],
142
149
  'nextBeforeCursor': value['nextBeforeCursor'],
150
+ 'resumeCursor': value['resumeCursor'],
143
151
  'queuedTurns': value['queuedTurns'] == null ? undefined : ((value['queuedTurns'] as Array<any>).map(QueuedTurnViewToJSON)),
144
152
  };
145
153
  }
@@ -45,6 +45,36 @@ export interface ResponseDetail {
45
45
  * @memberof ResponseDetail
46
46
  */
47
47
  output: Array<UIMessage>;
48
+ /**
49
+ *
50
+ * @type {any}
51
+ * @memberof ResponseDetail
52
+ */
53
+ structuredOutput?: any | null;
54
+ /**
55
+ *
56
+ * @type {Array<string>}
57
+ * @memberof ResponseDetail
58
+ */
59
+ outputErrors?: Array<string> | null;
60
+ /**
61
+ *
62
+ * @type {Array<{ [key: string]: any; }>}
63
+ * @memberof ResponseDetail
64
+ */
65
+ outputCitations?: Array<{ [key: string]: any; }> | null;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof ResponseDetail
70
+ */
71
+ outputNote?: string | null;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof ResponseDetail
76
+ */
77
+ outputSkipped?: string | null;
48
78
  }
49
79
 
50
80
 
@@ -83,6 +113,11 @@ export function ResponseDetailFromJSONTyped(json: any, ignoreDiscriminator: bool
83
113
  'responseId': json['responseId'],
84
114
  'status': json['status'],
85
115
  'output': ((json['output'] as Array<any>).map(UIMessageFromJSON)),
116
+ 'structuredOutput': json['structuredOutput'] == null ? undefined : json['structuredOutput'],
117
+ 'outputErrors': json['outputErrors'] == null ? undefined : json['outputErrors'],
118
+ 'outputCitations': json['outputCitations'] == null ? undefined : json['outputCitations'],
119
+ 'outputNote': json['outputNote'] == null ? undefined : json['outputNote'],
120
+ 'outputSkipped': json['outputSkipped'] == null ? undefined : json['outputSkipped'],
86
121
  };
87
122
  }
88
123
 
@@ -100,6 +135,11 @@ export function ResponseDetailToJSONTyped(value?: ResponseDetail | null, ignoreD
100
135
  'responseId': value['responseId'],
101
136
  'status': value['status'],
102
137
  'output': ((value['output'] as Array<any>).map(UIMessageToJSON)),
138
+ 'structuredOutput': value['structuredOutput'],
139
+ 'outputErrors': value['outputErrors'],
140
+ 'outputCitations': value['outputCitations'],
141
+ 'outputNote': value['outputNote'],
142
+ 'outputSkipped': value['outputSkipped'],
103
143
  };
104
144
  }
105
145
 
@@ -108,6 +108,8 @@ export * from './InputMessage.js';
108
108
  export * from './InstructionsBody.js';
109
109
  export * from './InstructionsResponse.js';
110
110
  export * from './ListModels403Response.js';
111
+ export * from './McpSecurityAppealView.js';
112
+ export * from './McpSecurityView.js';
111
113
  export * from './MessagePart.js';
112
114
  export * from './MessagesResponse.js';
113
115
  export * from './MintUploadUrl403Response.js';