@blazingagents/sdk 0.2.1 → 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 (55) hide show
  1. package/README.md +115 -344
  2. package/dist/client.d.ts +3 -1
  3. package/dist/client.js +1 -1
  4. package/dist/contracts/api.d.ts +1 -1
  5. package/dist/contracts/api.js +1 -1
  6. package/dist/contracts/entities/agents.d.ts +14 -7
  7. package/dist/contracts/entities/agents.js +7 -3
  8. package/dist/contracts/entities/artifacts.d.ts +9 -9
  9. package/dist/contracts/entities/artifacts.js +5 -5
  10. package/dist/contracts/entities/chat.d.ts +7 -7
  11. package/dist/contracts/entities/chat.js +5 -5
  12. package/dist/contracts/entities/mcp-connections.d.ts +18 -18
  13. package/dist/contracts/entities/mcp-connections.js +13 -13
  14. package/dist/contracts/entities/memories.d.ts +5 -5
  15. package/dist/contracts/entities/memories.js +2 -2
  16. package/dist/contracts/entities/prompts.d.ts +4 -4
  17. package/dist/contracts/entities/prompts.js +2 -2
  18. package/dist/contracts/entities/providers.d.ts +12 -7
  19. package/dist/contracts/entities/providers.js +12 -6
  20. package/dist/contracts/entities/sessions.d.ts +10 -10
  21. package/dist/contracts/entities/sessions.js +6 -6
  22. package/dist/contracts/entities/skills.d.ts +18 -18
  23. package/dist/contracts/entities/skills.js +6 -6
  24. package/dist/contracts/entities/tasks.d.ts +56 -46
  25. package/dist/contracts/entities/tasks.js +25 -16
  26. package/dist/contracts/entities/tenants.d.ts +6 -6
  27. package/dist/contracts/entities/tenants.js +4 -4
  28. package/dist/contracts/entities/usage.d.ts +5 -5
  29. package/dist/contracts/entities/usage.js +3 -3
  30. package/dist/contracts/entities/workspaces.d.ts +9 -9
  31. package/dist/contracts/entities/workspaces.js +7 -2
  32. package/dist/contracts/index.d.ts +1 -1
  33. package/dist/contracts/index.js +1 -1
  34. package/dist/direct-chat-transport.d.ts +16 -0
  35. package/dist/direct-chat-transport.js +49 -0
  36. package/dist/generation.js +4 -3
  37. package/dist/http.d.ts +2 -0
  38. package/dist/http.js +2 -2
  39. package/dist/index.d.ts +3 -2
  40. package/dist/index.js +1 -0
  41. package/dist/relay.js +2 -2
  42. package/dist/resources/agents.js +37 -22
  43. package/dist/resources/artifacts.js +8 -6
  44. package/dist/resources/mcp-connections.js +19 -15
  45. package/dist/resources/memories.js +10 -9
  46. package/dist/resources/prompts.js +10 -6
  47. package/dist/resources/providers.js +18 -12
  48. package/dist/resources/sessions.js +12 -10
  49. package/dist/resources/skills.js +33 -21
  50. package/dist/resources/tasks.js +22 -14
  51. package/dist/resources/tenant.js +4 -3
  52. package/dist/resources/usage.js +4 -3
  53. package/dist/resources/workspaces.js +10 -8
  54. package/dist/types.d.ts +225 -104
  55. package/package.json +2 -2
package/README.md CHANGED
@@ -1,389 +1,160 @@
1
- # `@blazingagents/sdk`
2
-
3
- The resource-style client SDK for the Blazing Agents `/v1` API.
1
+ <div align="center">
2
+ <a href="https://docs.blazingagents.com">
3
+ <img src="https://raw.githubusercontent.com/blazingagents/docs/main/public/brand/icon.svg" alt="Blazing Agents logo" width="96">
4
+ </a>
5
+ <h1>Blazing Agents TypeScript SDK</h1>
6
+ <p>Build production agents with a typed TypeScript client for the Blazing Agents API.</p>
7
+ <p>
8
+ <a href="https://docs.blazingagents.com/sdk/typescript">Documentation</a> ·
9
+ <a href="https://www.npmjs.com/package/@blazingagents/sdk">npm</a>
10
+ </p>
11
+ </div>
12
+
13
+ The official resource-style client SDK for the Blazing Agents `/v1` API. It
14
+ requires Node.js 24 or newer.
15
+
16
+ ## Features
17
+
18
+ - Typed clients for Agents, Workspaces, Skills, Providers, Prompts, Tasks,
19
+ Sessions, Artifacts, usage, and Tenant settings.
20
+ - Stateful chat and stateless text or structured-object generation.
21
+ - Public Zod contracts for validating API requests and responses.
22
+ - Cursor pagination and binary transfers.
23
+ - Request correlation and a typed, forward-compatible error model.
4
24
 
5
25
  ## Installation
6
26
 
7
- ```bash
27
+ ```console
8
28
  npm install @blazingagents/sdk ai@7.0.84
9
29
  ```
10
30
 
11
- ## Overview
12
-
13
- The SDK wraps the Blazing Agents REST API with a thin, typed client in the
14
- stripe/openai-node shape. It provides:
15
-
16
- - **Resource namespaces** for management CRUD (`agents`, `workspaces`,
17
- `prompts`, `providers`, `tasks`, `sessions`, `artifacts`, `tenant`, `usage`),
18
- plus Agent-scoped Skills through `client.agent(agentId).skills`.
19
- - **Generation methods** with a raw `useChat` SSE relay and AI SDK–shaped
20
- completion/object results.
21
- - **A single error class** (`BlazingAgentsError`) with known-code completion
22
- and forward-compatible server codes.
23
-
24
- `ai` is a peer dependency (`^7`). The SDK re-exports `UIMessage` from `ai` —
25
- it never redeclares it.
26
-
27
- ## Runtime contracts
28
-
29
- Import the public Zod schemas from the explicit contracts entry point:
30
-
31
- ```ts
32
- import {
33
- agentIdSchema,
34
- createAgentBodySchema,
35
- } from "@blazingagents/sdk/contracts";
36
-
37
- const agentId = agentIdSchema.parse("ag_0123456789abcdef");
38
- const input = createAgentBodySchema.parse({ name: "Support agent" });
39
- ```
40
-
41
- The contracts entry point contains public HTTP request and response schemas.
42
- Platform-only persistence and service contracts are not part of the SDK.
31
+ `ai` is a peer dependency. The SDK re-exports its `UIMessage` type.
43
32
 
44
33
  ## Quick start
45
34
 
46
- ```ts
47
- import { BlazingAgents } from "@blazingagents/sdk";
48
-
49
- const client = new BlazingAgents({
50
- apiKey: "ba_your_api_key",
51
- // baseUrl defaults to https://api.blazingagents.com.
52
- onResponse(response) {
53
- // Store response.requestId with your logs for support correlation.
54
- console.log(response.requestId, response.status);
55
- },
56
- });
57
-
58
- // --- Management ---
59
-
60
- // Agents
61
- const agent = await client.agents.create({
62
- name: "My Agent",
63
- model: "openrouter/auto",
64
- instructions: "Be helpful.",
65
- tools: ["write_todos"],
66
- });
67
- // Every Agent receives a Workspace. Its runtime stays lazy until first use.
68
- const defaultWorkspace = await client.workspaces.get({
69
- workspaceId: agent.workspaceId,
70
- });
71
-
72
- const list = await client.agents.list();
73
- const fetched = await client.agents.get(agent.id);
74
- const updated = await client.agents.update(agent.id, { name: "Renamed" });
75
-
76
- // Pass an existing Workspace to share it, or switch to one later.
77
- const sharedWorkspace = await client.workspaces.create({ name: "Team files" });
78
- const teammate = await client.agents.create({
79
- name: "Teammate",
80
- model: "openrouter/auto",
81
- workspaceId: sharedWorkspace.id,
82
- });
83
- await client.agents.update(agent.id, { workspaceId: sharedWorkspace.id });
84
-
85
- // Agent-owned Skills
86
- const skills = client.agent(teammate.id).skills;
87
- const skill = await skills.create({
88
- path: "SKILL.md",
89
- content: "---\nname: release-notes\ndescription: Draft release notes.\n---\n",
90
- });
91
- await skills.putFile({
92
- skillId: skill.id,
93
- path: "references/style.md",
94
- content: "Use sentence case.",
95
- });
96
-
97
- // Deleting an Agent preserves its Workspace for explicit cleanup or reuse.
98
- await client.agents.delete(agent.id, false);
99
- await client.workspaces.get({ workspaceId: sharedWorkspace.id });
100
-
101
- // Prompts
102
- const prompt = await client.prompts.create({
103
- name: "Greeting",
104
- template: "Hello {{name}}!",
105
- });
106
- const promptList = await client.prompts.list();
107
-
108
- // Providers
109
- const provider = await client.providers.create({
110
- name: "My OpenRouter",
111
- providerType: "openrouter",
112
- apiKey: "sk-or-...",
113
- });
114
-
115
- // Tenant settings
116
- const settings = await client.tenant.get();
117
- await client.tenant.patch({
118
- quota: { monthlyTokenLimit: 100_000, monthlyRequestLimit: null, resetDay: 1 },
119
- });
120
-
121
- // Usage
122
- const usage = await client.usage.get({ groupBy: "agent" });
123
- const agentUsage = await client.usage.getForAgent(agent.id);
124
-
125
- // Tasks
126
- const task = await client.tasks.create({
127
- agentId: agent.id,
128
- name: "Daily Report",
129
- prompt: "Generate the daily report",
130
- });
131
- const run = await client.tasks.createRun(task.task.id);
132
-
133
- // Persist task.task.id and run.runId, then return to the caller.
134
-
135
- // In a later request, scheduled job, or worker invocation:
136
- const outcome = await client.tasks.getRun(task.task.id, run.runId);
137
- if (outcome.status !== "queued" && outcome.status !== "running") {
138
- const transcript = await client.tasks.runMessages(task.task.id, run.runId);
139
- }
140
-
141
- // Sessions
142
- const sessions = await client.sessions.list(agent.id);
143
- const messages = await client.sessions.messages(agent.id, sessionId);
144
-
145
- // Artifacts
146
- const artifacts = await client.artifacts.list({ agentId: agent.id });
147
- const artifact = artifacts.data[0];
148
- if (artifact) {
149
- const { url } = await client.artifacts.createDownloadUrl(artifact.artifactId);
150
- const bytes = await (await fetch(url)).arrayBuffer();
151
- }
152
- ```
153
-
154
- Generation request inputs accept `clientRequestId` for caller-owned
155
- correlation without raw headers. For any resource or generation request, use
156
- `client.withOptions({ clientRequestId })` to create a scoped client view. The
157
- callback receives the method, path
158
- without query, status, duration, server `requestId`, and the same optional
159
- `clientRequestId` once for every received response, including errors and
160
- streaming handshakes. Callback failures are ignored and transport failures
161
- with no response do not invoke it. The server-owned `requestId` identifies one
162
- HTTP attempt and should be retained when contacting support.
163
- Successful generated message metadata separately exposes `usage.turnId` for
164
- the admitted, metered Turn. It is not the HTTP `requestId` or message ID.
165
-
166
- ## Generation methods
167
-
168
- ### `client.chat(input)` — stateful UI message stream
169
-
170
- The server mints the `ss_` session id. Start a new chat with a single
171
- `client.chat({ agentId, message })` call — no `sessionId`, no `mode` —
172
- and read the minted id from `await result.sessionId` (resolved from the
173
- create response's `Location` header):
35
+ Create a Tenant API key in the Blazing Agents dashboard, then pass it to the
36
+ client or read it from your server environment.
174
37
 
175
38
  ```ts
176
- // Create — the server mints the ss_ id and returns it via Location.
177
- const created = await client.chat({
178
- agentId: agent.id,
179
- message: {
180
- id: "msg_user_1",
181
- role: "user",
182
- parts: [{ type: "text", text: "Hello!" }],
183
- },
184
- });
185
- const sessionId = await created.sessionId;
186
- return created.toResponse();
187
- ```
188
-
189
- `toResponse()` exposes the server's AI SDK UI-message SSE response unchanged
190
- for relay to the browser. It is one-shot; a repeated call throws a
191
- `BlazingAgentsError` with `code: "stream_error"`. `result.sessionId` remains
192
- independently awaitable before or after selecting the response.
193
-
194
- After `useChat` successfully consumes that response, pass the same `sessionId`
195
- on a later request to continue the chat:
196
-
197
- ```ts
198
- const result = await client.chat({
199
- agentId: agent.id,
200
- sessionId,
201
- message: {
202
- id: "msg_user_2",
203
- role: "user",
204
- parts: [{ type: "text", text: "Follow up" }],
205
- },
206
- });
207
-
208
- return result.toResponse();
209
- ```
210
-
211
- `trigger: "regenerate-message"` is valid only when `sessionId` is present.
212
- `messageId` remains optional when regenerating an existing Session.
213
-
214
- Prompt-invocation variant (server resolves + renders the template):
215
-
216
- ```ts
217
- const result = await client.chat({
218
- agentId: agent.id,
219
- promptId: "prompt_...",
220
- variables: { name: "Alice" },
221
- });
222
- ```
223
-
224
- ### `client.completion(input)` — stateless text stream
39
+ import { BlazingAgents } from "@blazingagents/sdk";
225
40
 
226
- `POST /v1/agents/:agentId/generation` with text output. Returns a text-stream result:
41
+ const client = new BlazingAgents({ apiKey: "ba_..." });
227
42
 
228
- ```ts
229
43
  const result = await client.completion({
230
- agentId: agent.id,
231
- prompt: "Write a haiku about the sea.",
44
+ agentId: "ag_...",
45
+ prompt: "Write a friendly welcome message.",
232
46
  });
233
47
 
234
- for await (const delta of result.textStream) {
235
- process.stdout.write(delta);
236
- }
237
-
238
- const fullText = await result.text;
48
+ console.log(await result.text);
239
49
  ```
240
50
 
241
- ### `client.object(input)` — stateless structured output
51
+ Keep API keys on the server. For browser chat applications, relay `chat()`
52
+ through your backend and use `BlazingAgentsChatTransport` with AI SDK
53
+ `useChat`.
242
54
 
243
- `POST /v1/agents/:agentId/generation` with structured output. Returns a partial-object stream:
55
+ ## Documentation
244
56
 
245
- ```ts
246
- const result = await client.object({
247
- agentId: agent.id,
248
- prompt: "Give me a person",
249
- schema: {
250
- type: "object",
251
- properties: {
252
- name: { type: "string" },
253
- age: { type: "number" },
254
- },
255
- required: ["name"],
256
- },
257
- });
57
+ Read the
58
+ [TypeScript SDK documentation](https://docs.blazingagents.com/sdk/typescript)
59
+ for authentication, resource guides, generation and streaming, React
60
+ integration, error handling, and the complete API reference.
258
61
 
259
- for await (const partial of result.partialObjectStream) {
260
- console.log(partial);
261
- }
62
+ ## Development
262
63
 
263
- const finalObject = await result.object;
64
+ ```console
65
+ npm ci
66
+ npm run check
67
+ npm run test:consumer
264
68
  ```
265
69
 
266
- ## React `useChat` transport
70
+ ## License
267
71
 
268
- Keep `BlazingAgents` and its API key on your backend. The browser-safe
269
- `BlazingAgentsChatTransport` sends the latest user message, forwards
270
- regeneration metadata, captures the Session ID from the first response's
271
- `Location` header, and includes that ID on later sends.
72
+ [MIT](LICENSE)
272
73
 
273
- ### Tenant backend
74
+ ### Thinking level
274
75
 
275
- ```ts
276
- import {
277
- BlazingAgents,
278
- createChatRelay,
279
- createCompletionRelay,
280
- } from "@blazingagents/sdk";
281
-
282
- const client = new BlazingAgents({ apiKey: process.env.BLAZING_AGENTS_API_KEY });
283
-
284
- const resolveContext = async (request: Request) => {
285
- const user = await authenticateApplicationRequest(request);
286
- return user ? { agentId: "ag_...", userId: user.id } : null;
287
- };
288
-
289
- export const POST = createChatRelay({
290
- client,
291
- resolveContext,
292
- sessions: {
293
- ownerOf: (sessionId) => chatSessions.ownerOf(sessionId),
294
- recordOwner: (sessionId, userId) =>
295
- chatSessions.recordOwner(sessionId, userId),
296
- },
297
- });
76
+ Agent create/update accepts `thinkingLevel: "high"`, `"off"`, `"max"`, or
77
+ another nonempty string supported by the selected Model. Omission on creation
78
+ means Provider default; omission on update preserves the saved value, while
79
+ `thinkingLevel: null` clears it. Agent and Version responses include the
80
+ selection, and `restoreVersion` restores it through ordinary validation.
81
+ Use `client.providers.getThinkingLevels({ providerId, model })` to read
82
+ `{ known, levels }`. Unknown capabilities permit custom values that can still
83
+ be rejected during execution. Levels control reasoning, not a token/cost cap.
298
84
 
299
- export const POST_COMPLETION = createCompletionRelay({ client, resolveContext });
300
- ```
85
+ For native clients whose `Response` constructor does not support streaming bodies,
86
+ use `result.toStream()` on chat or terminal continuation results to read the
87
+ original SSE bytes. It shares one-shot ownership with `toResponse()`; choose one
88
+ accessor per result. Stream errors and cancellation retain the same behavior.
301
89
 
302
- Both factories accept standard Web `Request` objects and return standard Web
303
- `Response` objects. They validate AI SDK input, ignore browser attempts to set
304
- reserved agent/attribution fields, authorize Session resumes, record ownership
305
- before returning a created stream, preserve safe status and correlation
306
- headers, and propagate request cancellation. Framework adapters only need to
307
- pass their request to the returned function.
90
+ ### Direct native chat
308
91
 
309
- ### Browser
92
+ For a direct SDK integration, use `BlazingAgentsDirectChatTransport` with AI SDK
93
+ `useChat`. It sends through `client.chat()` and uses AI SDK's stream decoder
94
+ without constructing a streaming `Response`. Inject your native streaming fetch
95
+ implementation into `BlazingAgents` when the runtime requires one.
310
96
 
311
97
  ```tsx
98
+ import { useMemo } from "react";
312
99
  import { useChat } from "@ai-sdk/react";
313
- import { BlazingAgentsChatTransport } from "@blazingagents/sdk";
314
- import { useState } from "react";
315
-
316
- function useBlazingChat({
317
- initialSessionId,
318
- rememberSessionId,
319
- }: {
320
- initialSessionId?: string;
321
- rememberSessionId: (sessionId: string) => void;
322
- }) {
323
- const [transport] = useState(
324
- () =>
325
- new BlazingAgentsChatTransport({
326
- api: "/api/chat",
327
- onSessionId: rememberSessionId,
328
- sessionId: initialSessionId,
329
- }),
100
+ import { BlazingAgentsDirectChatTransport } from "@blazingagents/sdk";
101
+
102
+ function Chat({ client, agentId, initialSessionId, saveSessionId }) {
103
+ const transport = useMemo(
104
+ () => new BlazingAgentsDirectChatTransport({
105
+ client,
106
+ agentId,
107
+ sessionId: initialSessionId,
108
+ onSessionId: saveSessionId,
109
+ }),
110
+ [client, agentId, initialSessionId, saveSessionId],
330
111
  );
331
- return useChat({ transport });
112
+ const chat = useChat({ transport });
113
+ // Render chat.messages and submit using chat.sendMessage({ text }).
332
114
  }
333
115
  ```
334
116
 
335
- The backend should derive `userId` from its authenticated session, never from
336
- an untrusted browser field. The Session store is a durable server-owned mapping;
337
- the opaque browser `sessionId` and End-user Attribution are not authorization.
338
- Use one stable transport instance per chat. Persist the ID received by
339
- `onSessionId`, and restore it through `sessionId` only after the backend has
340
- authorized that Session for the current application user.
341
-
342
- ## Error model
343
-
344
- All SDK failures use `BlazingAgentsError`. The server's lower-snake-case code
345
- is preserved exactly, including a future code unknown to the installed SDK.
346
- `KnownBlazingAgentsErrorCode` provides editor completion for the current API
347
- catalog and four SDK-local codes:
348
-
349
- | Local code | Meaning |
350
- | --- | --- |
351
- | `invalid_response` | A response is not a valid API envelope or successful JSON result. |
352
- | `network_error` | Fetch failed before an HTTP exchange for a reason other than caller abort. |
353
- | `request_aborted` | The caller's `AbortSignal` aborted the request. |
354
- | `stream_error` | A stream failed after its response started or violated its stream contract. |
355
-
356
- `BlazingAgentsError` exposes `code`, `message`, and optional `status`,
357
- `details`, `param`, `headers`, `requestId`, `responseBody`,
358
- `responseBodyTruncated`, and `cause`. A malformed response uses the stable
359
- `invalid_response` message and retains a size-bounded body separately.
360
- Response-backed failures copy `X-Request-Id` into `requestId`.
117
+ Install `@ai-sdk/react` for the React hook. Keep the transport stable for one chat;
118
+ remount the chat with a new transport when switching credentials, Agents, or
119
+ Sessions. `onSessionId` runs once for a newly created Session before stream
120
+ consumption, so it can be saved even if streaming later fails. The adapter
121
+ preserves user message IDs, regeneration targets, and `useChat` cancellation.
122
+ Regeneration requires an existing Session. Reconnection returns `null`; the
123
+ adapter does not retry interrupted Turns or resume their streams.
124
+
125
+ ### Cancel requests
126
+
127
+ Pass an optional `abortSignal` in the request object for reads, writes, uploads,
128
+ and generation:
361
129
 
362
130
  ```ts
363
- import { BlazingAgentsError } from "@blazingagents/sdk";
364
-
365
- try {
366
- await client.agents.get("ag_nonexistent...");
367
- } catch (error) {
368
- if (BlazingAgentsError.isInstance(error)) {
369
- console.log(error.code);
370
- console.log(error.status);
371
- console.log(error.requestId);
372
- console.log(error.message);
373
- }
374
- }
131
+ const controller = new AbortController();
132
+ const agents = client.agents.list({ abortSignal: controller.signal });
133
+ controller.abort();
134
+ await agents; // Rejects with the SDK's typed cancellation error.
375
135
  ```
376
136
 
377
- Use `BlazingAgentsError.isInstance()` instead of `instanceof` when package
378
- copies may cross realms or bundlers. See the public
379
- [error catalog and stream boundary](https://docs.blazingagents.com/api-reference/protocols/errors).
137
+ SDK response parsing strips unknown object fields while validating required
138
+ fields and known field types. Request validation remains strict.
380
139
 
381
- ## Development
140
+ ### Migrating from 0.2.x to 0.3.0
382
141
 
383
- Install dependencies and run the complete standalone check:
142
+ Resource and generation methods take a single request object, optional when no
143
+ fields are required. Move positional identifiers, body fields, and request
144
+ options into that object. Use `abortSignal` instead of
145
+ `signal`; custom fetch implementations still receive the native `signal`.
384
146
 
385
- ```bash
386
- npm ci
387
- npm run check
388
- npm run test:consumer
147
+ ```ts
148
+ // Before (0.2.x)
149
+ client.agents.update(agentId, { name: "Builder" });
150
+ client.sessions.messages(agentId, sessionId, { signal });
151
+ client.agent(agentId).skills.list();
152
+
153
+ // After (0.3.0)
154
+ client.agents.update({ agentId, name: "Builder", abortSignal: signal });
155
+ client.sessions.messages({ agentId, sessionId, abortSignal: signal });
156
+ client.agent({ agentId }).skills.list({ abortSignal: signal });
389
157
  ```
158
+
159
+ `ResourceRequestOptions` replaces `ResourceReadOptions`. Cancellation stops the
160
+ request; it does not roll back a mutation already accepted by the server.
package/dist/client.d.ts CHANGED
@@ -13,7 +13,9 @@ export declare class BlazingAgents {
13
13
  readonly tenant: TenantResource;
14
14
  readonly workspaces: WorkspacesResource;
15
15
  constructor(options: BlazingAgentsOptions);
16
- agent(agentId: string): AgentClient;
16
+ agent({ agentId }: {
17
+ agentId: string;
18
+ }): AgentClient;
17
19
  /**
18
20
  * `POST /v1/agents/:agentId/sessions` (create, no `sessionId`) or
19
21
  * `POST /v1/agents/:agentId/sessions/:sessionId` (resume). Returns the
package/dist/client.js CHANGED
@@ -48,7 +48,7 @@ export class BlazingAgents {
48
48
  this.tenant = createTenantResource(this.config);
49
49
  this.workspaces = createWorkspacesResource(this.config);
50
50
  }
51
- agent(agentId) {
51
+ agent({ agentId }) {
52
52
  return { skills: createAgentSkillsResource(this.config, agentId) };
53
53
  }
54
54
  /**
@@ -238,7 +238,7 @@ export declare const cursorSchema: z.ZodString;
238
238
  export declare function paginatedResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
239
239
  data: z.ZodArray<T>;
240
240
  nextCursor: z.ZodNullable<z.ZodString>;
241
- }, z.core.$strict>;
241
+ }, z.core.$strip>;
242
242
  /**
243
243
  * Opaque keyset cursor helpers. Cursors are base64url-encoded JSON of the
244
244
  * keyset tuple the endpoint paginates by — never a raw value, never a row
@@ -132,7 +132,7 @@ export function paginatedResponseSchema(itemSchema) {
132
132
  data: z.array(itemSchema),
133
133
  nextCursor: z.string().nullable(),
134
134
  })
135
- .strict();
135
+ .strip();
136
136
  }
137
137
  /**
138
138
  * Opaque keyset cursor helpers. Cursors are base64url-encoded JSON of the
@@ -18,6 +18,7 @@ export declare const agentSchema: z.ZodObject<{
18
18
  tenantId: z.ZodString;
19
19
  name: z.ZodString;
20
20
  model: z.ZodNullable<z.ZodString>;
21
+ thinkingLevel: z.ZodNullable<z.ZodString>;
21
22
  providerId: z.ZodNullable<z.ZodString>;
22
23
  workspaceId: z.ZodString;
23
24
  memoryInjectionEnabled: z.ZodBoolean;
@@ -38,13 +39,14 @@ export declare const agentSchema: z.ZodObject<{
38
39
  active: "active";
39
40
  disabled: "disabled";
40
41
  }>;
41
- }, z.core.$strict>;
42
+ }, z.core.$strip>;
42
43
  export declare const agentsResponseSchema: z.ZodObject<{
43
44
  agents: z.ZodArray<z.ZodObject<{
44
45
  id: z.ZodString;
45
46
  tenantId: z.ZodString;
46
47
  name: z.ZodString;
47
48
  model: z.ZodNullable<z.ZodString>;
49
+ thinkingLevel: z.ZodNullable<z.ZodString>;
48
50
  providerId: z.ZodNullable<z.ZodString>;
49
51
  workspaceId: z.ZodString;
50
52
  memoryInjectionEnabled: z.ZodBoolean;
@@ -65,13 +67,14 @@ export declare const agentsResponseSchema: z.ZodObject<{
65
67
  active: "active";
66
68
  disabled: "disabled";
67
69
  }>;
68
- }, z.core.$strict>>;
69
- }, z.core.$strict>;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>;
70
72
  export declare const agentResponseSchema: z.ZodObject<{
71
73
  id: z.ZodString;
72
74
  tenantId: z.ZodString;
73
75
  name: z.ZodString;
74
76
  model: z.ZodNullable<z.ZodString>;
77
+ thinkingLevel: z.ZodNullable<z.ZodString>;
75
78
  providerId: z.ZodNullable<z.ZodString>;
76
79
  workspaceId: z.ZodString;
77
80
  memoryInjectionEnabled: z.ZodBoolean;
@@ -92,7 +95,7 @@ export declare const agentResponseSchema: z.ZodObject<{
92
95
  active: "active";
93
96
  disabled: "disabled";
94
97
  }>;
95
- }, z.core.$strict>;
98
+ }, z.core.$strip>;
96
99
  export declare const agentsListQuerySchema: z.ZodObject<{
97
100
  userId: z.ZodOptional<z.ZodString>;
98
101
  workspaceId: z.ZodOptional<z.ZodString>;
@@ -103,6 +106,7 @@ export declare const agentVersionSchema: z.ZodObject<{
103
106
  version: z.ZodNumber;
104
107
  name: z.ZodString;
105
108
  model: z.ZodNullable<z.ZodString>;
109
+ thinkingLevel: z.ZodNullable<z.ZodString>;
106
110
  providerId: z.ZodNullable<z.ZodString>;
107
111
  memoryInjectionEnabled: z.ZodBoolean;
108
112
  tools: z.ZodArray<z.ZodEnum<{
@@ -114,7 +118,7 @@ export declare const agentVersionSchema: z.ZodObject<{
114
118
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
115
119
  mcpConnectionIds: z.ZodArray<z.ZodString>;
116
120
  createdAt: z.ZodISODateTime;
117
- }, z.core.$strict>;
121
+ }, z.core.$strip>;
118
122
  export declare const agentVersionsListQuerySchema: z.ZodObject<{
119
123
  cursor: z.ZodOptional<z.ZodString>;
120
124
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -126,6 +130,7 @@ export declare const agentVersionsResponseSchema: z.ZodObject<{
126
130
  version: z.ZodNumber;
127
131
  name: z.ZodString;
128
132
  model: z.ZodNullable<z.ZodString>;
133
+ thinkingLevel: z.ZodNullable<z.ZodString>;
129
134
  providerId: z.ZodNullable<z.ZodString>;
130
135
  memoryInjectionEnabled: z.ZodBoolean;
131
136
  tools: z.ZodArray<z.ZodEnum<{
@@ -137,12 +142,13 @@ export declare const agentVersionsResponseSchema: z.ZodObject<{
137
142
  metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
138
143
  mcpConnectionIds: z.ZodArray<z.ZodString>;
139
144
  createdAt: z.ZodISODateTime;
140
- }, z.core.$strict>>;
145
+ }, z.core.$strip>>;
141
146
  nextCursor: z.ZodNullable<z.ZodString>;
142
- }, z.core.$strict>;
147
+ }, z.core.$strip>;
143
148
  export declare const createAgentBodySchema: z.ZodObject<{
144
149
  name: z.ZodString;
145
150
  model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
151
+ thinkingLevel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
146
152
  providerId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
147
153
  workspaceId: z.ZodOptional<z.ZodString>;
148
154
  memoryInjectionEnabled: z.ZodDefault<z.ZodBoolean>;
@@ -159,6 +165,7 @@ export declare const createAgentBodySchema: z.ZodObject<{
159
165
  export declare const updateAgentBodySchema: z.ZodObject<{
160
166
  name: z.ZodOptional<z.ZodString>;
161
167
  model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ thinkingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
169
  providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
170
  workspaceId: z.ZodOptional<z.ZodString>;
164
171
  memoryInjectionEnabled: z.ZodOptional<z.ZodBoolean>;