@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.
- package/README.md +115 -344
- package/dist/client.d.ts +3 -1
- package/dist/client.js +1 -1
- package/dist/contracts/api.d.ts +1 -1
- package/dist/contracts/api.js +1 -1
- package/dist/contracts/entities/agents.d.ts +14 -7
- package/dist/contracts/entities/agents.js +7 -3
- package/dist/contracts/entities/artifacts.d.ts +9 -9
- package/dist/contracts/entities/artifacts.js +5 -5
- package/dist/contracts/entities/chat.d.ts +7 -7
- package/dist/contracts/entities/chat.js +5 -5
- package/dist/contracts/entities/mcp-connections.d.ts +18 -18
- package/dist/contracts/entities/mcp-connections.js +13 -13
- package/dist/contracts/entities/memories.d.ts +5 -5
- package/dist/contracts/entities/memories.js +2 -2
- package/dist/contracts/entities/prompts.d.ts +4 -4
- package/dist/contracts/entities/prompts.js +2 -2
- package/dist/contracts/entities/providers.d.ts +12 -7
- package/dist/contracts/entities/providers.js +12 -6
- package/dist/contracts/entities/sessions.d.ts +10 -10
- package/dist/contracts/entities/sessions.js +6 -6
- package/dist/contracts/entities/skills.d.ts +18 -18
- package/dist/contracts/entities/skills.js +6 -6
- package/dist/contracts/entities/tasks.d.ts +56 -46
- package/dist/contracts/entities/tasks.js +25 -16
- package/dist/contracts/entities/tenants.d.ts +6 -6
- package/dist/contracts/entities/tenants.js +4 -4
- package/dist/contracts/entities/usage.d.ts +5 -5
- package/dist/contracts/entities/usage.js +3 -3
- package/dist/contracts/entities/workspaces.d.ts +9 -9
- package/dist/contracts/entities/workspaces.js +7 -2
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +1 -1
- package/dist/direct-chat-transport.d.ts +16 -0
- package/dist/direct-chat-transport.js +49 -0
- package/dist/generation.js +4 -3
- package/dist/http.d.ts +2 -0
- package/dist/http.js +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -0
- package/dist/relay.js +2 -2
- package/dist/resources/agents.js +37 -22
- package/dist/resources/artifacts.js +8 -6
- package/dist/resources/mcp-connections.js +19 -15
- package/dist/resources/memories.js +10 -9
- package/dist/resources/prompts.js +10 -6
- package/dist/resources/providers.js +18 -12
- package/dist/resources/sessions.js +12 -10
- package/dist/resources/skills.js +33 -21
- package/dist/resources/tasks.js +22 -14
- package/dist/resources/tenant.js +4 -3
- package/dist/resources/usage.js +4 -3
- package/dist/resources/workspaces.js +10 -8
- package/dist/types.d.ts +225 -104
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { BlazingAgentsChatMessageMetadata } from "./contracts/entities/chat
|
|
|
6
6
|
import type { CreateMcpConnectionBody, McpAttachmentResponse, McpAttachmentsResponse, McpConnectionOauthConnectResponse, McpConnectionReconnectResult, McpConnectionResponse, McpConnectionsResponse, McpConnectionTestResponse, ReconnectMcpConnectionBody, UpdateMcpAttachmentBody, UpdateMcpConnectionBody } from "./contracts/entities/mcp-connections.ts";
|
|
7
7
|
import type { CreateMemoryBody, MemoriesListResponse, MemoryResponse, UpdateMemoryBody } from "./contracts/entities/memories.ts";
|
|
8
8
|
import type { CreatePromptBody, PromptResponse, PromptsResponse, UpdatePromptBody } from "./contracts/entities/prompts.ts";
|
|
9
|
-
import type { CreateProviderBody, DeleteProviderOptions, ProviderModelsResponse, ProviderResponse, ProvidersResponse, UpdateProviderBody } from "./contracts/entities/providers.ts";
|
|
9
|
+
import type { CreateProviderBody, DeleteProviderOptions, ProviderModelsResponse, ProviderResponse, ProvidersResponse, ThinkingLevelsResponse, UpdateProviderBody } from "./contracts/entities/providers.ts";
|
|
10
10
|
import type { DecideToolApprovalBody, SessionMessagesResponse, SessionsListResponse, ToolApprovalDecisionResponse, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
|
|
11
11
|
import type { CreateSkillBody, SkillArchiveType, SkillCopyResults, SkillDetail, SkillsListResponse } from "./contracts/entities/skills.ts";
|
|
12
12
|
import type { CreateTaskBody, CreateTaskResponse, CreateTaskRunBody, CreateTaskRunResponse, TaskResponse, TaskRunMessagesResponse, TaskRunResponse, TaskRunsListResponse, TasksListResponse, UpdateTaskBody } from "./contracts/entities/tasks.ts";
|
|
@@ -99,19 +99,19 @@ interface ExistingSessionInput {
|
|
|
99
99
|
}
|
|
100
100
|
type ChatSessionInput = NewSessionInput | ExistingSessionInput;
|
|
101
101
|
interface ChatMessageContentInput extends AttributionInput, CorrelatedRequestInput {
|
|
102
|
+
abortSignal?: AbortSignal;
|
|
102
103
|
agentId: string;
|
|
103
104
|
message: UIMessage;
|
|
104
105
|
messageId?: string;
|
|
105
106
|
promptId?: never;
|
|
106
|
-
signal?: AbortSignal;
|
|
107
107
|
variables?: never;
|
|
108
108
|
}
|
|
109
109
|
interface ChatPromptContentInput extends AttributionInput, CorrelatedRequestInput {
|
|
110
|
+
abortSignal?: AbortSignal;
|
|
110
111
|
agentId: string;
|
|
111
112
|
message?: never;
|
|
112
113
|
messageId?: string;
|
|
113
114
|
promptId: string;
|
|
114
|
-
signal?: AbortSignal;
|
|
115
115
|
variables?: Record<string, string>;
|
|
116
116
|
}
|
|
117
117
|
export type ChatMessageInput = ChatMessageContentInput & ChatSessionInput;
|
|
@@ -127,28 +127,32 @@ export interface ChatResult {
|
|
|
127
127
|
*/
|
|
128
128
|
sessionId: Promise<string>;
|
|
129
129
|
toResponse: () => Response;
|
|
130
|
+
/** Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse(). */
|
|
131
|
+
toStream: () => ReadableStream<Uint8Array>;
|
|
130
132
|
}
|
|
131
133
|
export interface TerminalStreamResult {
|
|
132
134
|
requestId?: string;
|
|
133
135
|
toResponse: () => Response;
|
|
136
|
+
/** Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse(). */
|
|
137
|
+
toStream: () => ReadableStream<Uint8Array>;
|
|
134
138
|
}
|
|
135
139
|
interface StatelessGenerationInput extends AttributionInput, CorrelatedRequestInput {
|
|
136
140
|
version?: number;
|
|
137
141
|
}
|
|
138
142
|
export interface CompletionPromptInput extends StatelessGenerationInput {
|
|
143
|
+
abortSignal?: AbortSignal;
|
|
139
144
|
agentId: string;
|
|
140
145
|
prompt: string;
|
|
141
146
|
promptId?: never;
|
|
142
147
|
schema?: never;
|
|
143
|
-
signal?: AbortSignal;
|
|
144
148
|
variables?: never;
|
|
145
149
|
}
|
|
146
150
|
export interface CompletionPromptIdInput extends StatelessGenerationInput {
|
|
151
|
+
abortSignal?: AbortSignal;
|
|
147
152
|
agentId: string;
|
|
148
153
|
prompt?: never;
|
|
149
154
|
promptId: string;
|
|
150
155
|
schema?: never;
|
|
151
|
-
signal?: AbortSignal;
|
|
152
156
|
variables?: Record<string, string>;
|
|
153
157
|
}
|
|
154
158
|
export type CompletionInput = CompletionPromptInput | CompletionPromptIdInput;
|
|
@@ -159,19 +163,19 @@ export interface CompletionResult {
|
|
|
159
163
|
toResponse: () => Response;
|
|
160
164
|
}
|
|
161
165
|
export interface ObjectPromptInput extends StatelessGenerationInput {
|
|
166
|
+
abortSignal?: AbortSignal;
|
|
162
167
|
agentId: string;
|
|
163
168
|
prompt: string;
|
|
164
169
|
promptId?: never;
|
|
165
170
|
schema: Record<string, unknown>;
|
|
166
|
-
signal?: AbortSignal;
|
|
167
171
|
variables?: never;
|
|
168
172
|
}
|
|
169
173
|
export interface ObjectPromptIdInput extends StatelessGenerationInput {
|
|
174
|
+
abortSignal?: AbortSignal;
|
|
170
175
|
agentId: string;
|
|
171
176
|
prompt?: never;
|
|
172
177
|
promptId: string;
|
|
173
178
|
schema: Record<string, unknown>;
|
|
174
|
-
signal?: AbortSignal;
|
|
175
179
|
variables?: Record<string, string>;
|
|
176
180
|
}
|
|
177
181
|
export type ObjectInput = ObjectPromptInput | ObjectPromptIdInput;
|
|
@@ -181,128 +185,224 @@ export interface ObjectResult {
|
|
|
181
185
|
requestId?: string;
|
|
182
186
|
toResponse: () => Response;
|
|
183
187
|
}
|
|
188
|
+
export interface ResourceRequestOptions {
|
|
189
|
+
abortSignal?: AbortSignal;
|
|
190
|
+
}
|
|
184
191
|
export interface AgentsResource {
|
|
185
192
|
/** Omitting `workspaceId` attaches a default Workspace with a lazy runtime. */
|
|
186
|
-
create(
|
|
193
|
+
create(input: CreateAgentBody & ResourceRequestOptions): Promise<Agent>;
|
|
187
194
|
/** Deletes the Agent while preserving its attached Workspace. */
|
|
188
|
-
delete(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
delete(input: {
|
|
196
|
+
agentId: string;
|
|
197
|
+
includeArtifacts: boolean;
|
|
198
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
199
|
+
disable(input: {
|
|
200
|
+
agentId: string;
|
|
201
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
202
|
+
enable(input: {
|
|
203
|
+
agentId: string;
|
|
204
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
205
|
+
get(input: {
|
|
206
|
+
agentId: string;
|
|
207
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
208
|
+
getVersion(input: {
|
|
209
|
+
agentId: string;
|
|
210
|
+
version: number;
|
|
211
|
+
} & ResourceRequestOptions): Promise<AgentVersion>;
|
|
212
|
+
list(input?: AgentsListOptions): Promise<AgentsResponse>;
|
|
213
|
+
listMcpAttachments(input: {
|
|
214
|
+
agentId: string;
|
|
215
|
+
} & ResourceRequestOptions): Promise<McpAttachmentsResponse>;
|
|
216
|
+
listVersions(input: {
|
|
217
|
+
agentId: string;
|
|
218
|
+
} & AgentVersionsListOptions): Promise<AgentVersionsResponse>;
|
|
219
|
+
removeAvatar(input: {
|
|
220
|
+
agentId: string;
|
|
221
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
222
|
+
/** Copies an immutable Version into the Agent, creating a new latest Version. */
|
|
223
|
+
restoreVersion(input: {
|
|
224
|
+
agentId: string;
|
|
225
|
+
version: number;
|
|
226
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
202
227
|
/** A concrete `workspaceId` switches the Agent; detachment is unsupported. */
|
|
203
|
-
update(
|
|
204
|
-
|
|
205
|
-
|
|
228
|
+
update(input: UpdateAgentBody & {
|
|
229
|
+
agentId: string;
|
|
230
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
231
|
+
updateMcpAttachment(input: UpdateMcpAttachmentBody & {
|
|
232
|
+
agentId: string;
|
|
233
|
+
mcpConnectionId: string;
|
|
234
|
+
} & ResourceRequestOptions): Promise<McpAttachmentResponse>;
|
|
235
|
+
uploadAvatar(input: {
|
|
236
|
+
agentId: string;
|
|
237
|
+
file: File;
|
|
238
|
+
} & ResourceRequestOptions): Promise<Agent>;
|
|
206
239
|
}
|
|
207
240
|
export interface AgentClient {
|
|
208
241
|
readonly skills: AgentSkillsResource;
|
|
209
242
|
}
|
|
210
|
-
export interface AgentsListOptions {
|
|
243
|
+
export interface AgentsListOptions extends ResourceRequestOptions {
|
|
211
244
|
userId?: string;
|
|
212
245
|
workspaceId?: string;
|
|
213
246
|
}
|
|
214
247
|
export interface WorkspacesResource {
|
|
215
|
-
create(
|
|
248
|
+
create(input?: CreateWorkspaceBody & ResourceRequestOptions): Promise<Workspace>;
|
|
216
249
|
delete(input: {
|
|
217
250
|
workspaceId: string;
|
|
218
|
-
}): Promise<"completed" | "pending">;
|
|
251
|
+
} & ResourceRequestOptions): Promise<"completed" | "pending">;
|
|
219
252
|
get(input: {
|
|
220
253
|
workspaceId: string;
|
|
221
|
-
}): Promise<Workspace>;
|
|
222
|
-
list(
|
|
254
|
+
} & ResourceRequestOptions): Promise<Workspace>;
|
|
255
|
+
list(input?: WorkspacesListOptions): Promise<WorkspacesListResponse>;
|
|
223
256
|
update(input: UpdateWorkspaceBody & {
|
|
224
257
|
workspaceId: string;
|
|
225
|
-
}): Promise<Workspace>;
|
|
258
|
+
} & ResourceRequestOptions): Promise<Workspace>;
|
|
226
259
|
}
|
|
227
|
-
export interface WorkspacesListOptions {
|
|
260
|
+
export interface WorkspacesListOptions extends ResourceRequestOptions {
|
|
228
261
|
cursor?: string;
|
|
229
262
|
limit?: number;
|
|
230
263
|
userId?: string;
|
|
231
264
|
}
|
|
232
|
-
export interface AgentVersionsListOptions {
|
|
265
|
+
export interface AgentVersionsListOptions extends ResourceRequestOptions {
|
|
233
266
|
cursor?: string;
|
|
234
267
|
limit?: number;
|
|
235
268
|
}
|
|
236
|
-
export interface ArtifactsListOptions {
|
|
269
|
+
export interface ArtifactsListOptions extends ResourceRequestOptions {
|
|
237
270
|
agentId?: string;
|
|
238
271
|
cursor?: string;
|
|
239
272
|
sessionId?: string;
|
|
240
273
|
}
|
|
241
274
|
export interface ArtifactsResource {
|
|
242
|
-
createDownloadUrl(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
275
|
+
createDownloadUrl(input: {
|
|
276
|
+
artifactId: string;
|
|
277
|
+
} & ResourceRequestOptions): Promise<ArtifactDownloadUrlResponse>;
|
|
278
|
+
delete(input: {
|
|
279
|
+
artifactId: string;
|
|
280
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
281
|
+
get(input: {
|
|
282
|
+
artifactId: string;
|
|
283
|
+
} & ResourceRequestOptions): Promise<ArtifactListItem>;
|
|
284
|
+
list(input?: ArtifactsListOptions): Promise<ArtifactsListResponse>;
|
|
246
285
|
}
|
|
247
286
|
export interface MemoriesResource {
|
|
248
|
-
create(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
287
|
+
create(input: CreateMemoryBody & {
|
|
288
|
+
agentId: string;
|
|
289
|
+
} & ResourceRequestOptions): Promise<MemoryResponse>;
|
|
290
|
+
delete(input: {
|
|
291
|
+
agentId: string;
|
|
292
|
+
memoryId: string;
|
|
293
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
294
|
+
get(input: {
|
|
295
|
+
agentId: string;
|
|
296
|
+
memoryId: string;
|
|
297
|
+
} & ResourceRequestOptions): Promise<MemoryResponse>;
|
|
298
|
+
list(input: {
|
|
299
|
+
agentId: string;
|
|
300
|
+
} & MemoriesListOptions): Promise<MemoriesListResponse>;
|
|
301
|
+
update(input: UpdateMemoryBody & {
|
|
302
|
+
agentId: string;
|
|
303
|
+
memoryId: string;
|
|
304
|
+
} & ResourceRequestOptions): Promise<MemoryResponse>;
|
|
305
|
+
}
|
|
306
|
+
export interface MemoriesListOptions extends ResourceRequestOptions {
|
|
255
307
|
cursor?: string;
|
|
256
308
|
limit?: number;
|
|
257
309
|
search?: string;
|
|
258
310
|
userId?: string;
|
|
259
311
|
}
|
|
260
312
|
export interface PromptsResource {
|
|
261
|
-
create(
|
|
262
|
-
delete(
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
313
|
+
create(input: CreatePromptBody & ResourceRequestOptions): Promise<PromptResponse>;
|
|
314
|
+
delete(input: {
|
|
315
|
+
promptId: string;
|
|
316
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
317
|
+
get(input: {
|
|
318
|
+
promptId: string;
|
|
319
|
+
} & ResourceRequestOptions): Promise<PromptResponse>;
|
|
320
|
+
list(input?: {
|
|
321
|
+
userId?: string;
|
|
322
|
+
} & ResourceRequestOptions): Promise<PromptsResponse>;
|
|
323
|
+
update(input: UpdatePromptBody & {
|
|
324
|
+
promptId: string;
|
|
325
|
+
} & ResourceRequestOptions): Promise<PromptResponse>;
|
|
266
326
|
}
|
|
267
327
|
export interface ProvidersResource {
|
|
268
|
-
create(
|
|
269
|
-
delete(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
328
|
+
create(input: CreateProviderBody & ResourceRequestOptions): Promise<ProviderResponse>;
|
|
329
|
+
delete(input: DeleteProviderOptions & {
|
|
330
|
+
providerId: string;
|
|
331
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
332
|
+
get(input: {
|
|
333
|
+
providerId: string;
|
|
334
|
+
} & ResourceRequestOptions): Promise<ProviderResponse>;
|
|
335
|
+
getThinkingLevels(input: {
|
|
336
|
+
providerId: string;
|
|
337
|
+
model: string;
|
|
338
|
+
} & ResourceRequestOptions): Promise<ThinkingLevelsResponse>;
|
|
339
|
+
list(input?: ResourceRequestOptions): Promise<ProvidersResponse>;
|
|
340
|
+
listModels(input: {
|
|
341
|
+
providerId: string;
|
|
342
|
+
} & ResourceRequestOptions): Promise<ProviderModelsResponse>;
|
|
343
|
+
update(input: UpdateProviderBody & {
|
|
344
|
+
providerId: string;
|
|
345
|
+
} & ResourceRequestOptions): Promise<ProviderResponse>;
|
|
274
346
|
}
|
|
275
347
|
export interface McpConnectionsResource {
|
|
276
|
-
connect(
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
348
|
+
connect(input: {
|
|
349
|
+
mcpConnectionId: string;
|
|
350
|
+
} & ResourceRequestOptions): Promise<McpConnectionOauthConnectResponse>;
|
|
351
|
+
create(input: CreateMcpConnectionBody & ResourceRequestOptions): Promise<McpConnectionResponse>;
|
|
352
|
+
delete(input: {
|
|
353
|
+
mcpConnectionId: string;
|
|
354
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
355
|
+
get(input: {
|
|
356
|
+
mcpConnectionId: string;
|
|
357
|
+
} & ResourceRequestOptions): Promise<McpConnectionResponse>;
|
|
358
|
+
list(input?: ResourceRequestOptions): Promise<McpConnectionsResponse>;
|
|
359
|
+
reconnect(input: ReconnectMcpConnectionBody & {
|
|
360
|
+
mcpConnectionId: string;
|
|
361
|
+
} & ResourceRequestOptions): Promise<McpConnectionReconnectResult>;
|
|
362
|
+
test(input: {
|
|
363
|
+
mcpConnectionId: string;
|
|
364
|
+
} & ResourceRequestOptions): Promise<McpConnectionTestResponse>;
|
|
365
|
+
update(input: UpdateMcpConnectionBody & {
|
|
366
|
+
mcpConnectionId: string;
|
|
367
|
+
} & ResourceRequestOptions): Promise<McpConnectionResponse>;
|
|
368
|
+
}
|
|
369
|
+
export interface SessionsListOptions extends ResourceRequestOptions {
|
|
286
370
|
cursor?: string;
|
|
287
371
|
limit?: number;
|
|
288
372
|
userId?: string;
|
|
289
373
|
}
|
|
290
|
-
export interface SessionMessagesOptions {
|
|
374
|
+
export interface SessionMessagesOptions extends ResourceRequestOptions {
|
|
291
375
|
after?: string;
|
|
292
376
|
cursor?: string;
|
|
293
377
|
limit?: number;
|
|
294
378
|
}
|
|
295
379
|
export interface SessionsResource {
|
|
296
|
-
decideToolApproval(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
380
|
+
decideToolApproval(input: DecideToolApprovalBody & {
|
|
381
|
+
agentId: string;
|
|
382
|
+
sessionId: string;
|
|
383
|
+
approvalId: string;
|
|
384
|
+
} & ResourceRequestOptions): Promise<ToolApprovalDecisionResponse>;
|
|
385
|
+
delete(input: {
|
|
386
|
+
agentId: string;
|
|
387
|
+
sessionId: string;
|
|
388
|
+
deleteArtifacts: boolean;
|
|
389
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
390
|
+
joinToolApprovalContinuation(input: {
|
|
391
|
+
agentId: string;
|
|
392
|
+
sessionId: string;
|
|
393
|
+
continuationId: string;
|
|
394
|
+
} & ResourceRequestOptions): Promise<TerminalStreamResult>;
|
|
395
|
+
list(input: {
|
|
396
|
+
agentId: string;
|
|
397
|
+
} & SessionsListOptions): Promise<SessionsListResponse>;
|
|
398
|
+
messages(input: {
|
|
399
|
+
agentId: string;
|
|
400
|
+
sessionId: string;
|
|
401
|
+
} & SessionMessagesOptions): Promise<SessionMessagesResponse>;
|
|
402
|
+
toolApprovals(input: {
|
|
403
|
+
agentId: string;
|
|
404
|
+
sessionId: string;
|
|
405
|
+
} & ResourceRequestOptions): Promise<ToolApprovalsResponse>;
|
|
306
406
|
}
|
|
307
407
|
export interface AgentSkillsResource {
|
|
308
408
|
copy(input: {
|
|
@@ -310,72 +410,93 @@ export interface AgentSkillsResource {
|
|
|
310
410
|
to: {
|
|
311
411
|
agentIds: string[];
|
|
312
412
|
};
|
|
313
|
-
}): Promise<SkillCopyResults>;
|
|
314
|
-
create(input: CreateSkillBody): Promise<SkillDetail>;
|
|
413
|
+
} & ResourceRequestOptions): Promise<SkillCopyResults>;
|
|
414
|
+
create(input: CreateSkillBody & ResourceRequestOptions): Promise<SkillDetail>;
|
|
315
415
|
delete(input: {
|
|
316
416
|
skillId: string;
|
|
317
|
-
}): Promise<void>;
|
|
417
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
318
418
|
deleteFile(input: {
|
|
319
419
|
path: string;
|
|
320
420
|
skillId: string;
|
|
321
|
-
}): Promise<SkillDetail>;
|
|
421
|
+
} & ResourceRequestOptions): Promise<SkillDetail>;
|
|
322
422
|
get(input: {
|
|
323
423
|
skillId: string;
|
|
324
|
-
}): Promise<SkillDetail>;
|
|
424
|
+
} & ResourceRequestOptions): Promise<SkillDetail>;
|
|
325
425
|
getFile(input: {
|
|
326
426
|
path: string;
|
|
327
427
|
skillId: string;
|
|
328
|
-
}): Promise<Uint8Array>;
|
|
329
|
-
list(
|
|
428
|
+
} & ResourceRequestOptions): Promise<Uint8Array>;
|
|
429
|
+
list(input?: SkillsListOptions): Promise<SkillsListResponse>;
|
|
330
430
|
putFile(input: {
|
|
331
431
|
content: Blob | string | Uint8Array;
|
|
332
432
|
path: string;
|
|
333
433
|
skillId: string;
|
|
334
|
-
}): Promise<SkillDetail>;
|
|
434
|
+
} & ResourceRequestOptions): Promise<SkillDetail>;
|
|
335
435
|
upload(input: {
|
|
336
436
|
source: {
|
|
337
437
|
file: Blob | Uint8Array;
|
|
338
438
|
type: SkillArchiveType;
|
|
339
439
|
};
|
|
340
|
-
}): Promise<SkillDetail>;
|
|
440
|
+
} & ResourceRequestOptions): Promise<SkillDetail>;
|
|
341
441
|
}
|
|
342
|
-
export interface SkillsListOptions {
|
|
442
|
+
export interface SkillsListOptions extends ResourceRequestOptions {
|
|
343
443
|
cursor?: string;
|
|
344
444
|
limit?: number;
|
|
345
445
|
}
|
|
346
|
-
export interface TasksListOptions {
|
|
446
|
+
export interface TasksListOptions extends ResourceRequestOptions {
|
|
347
447
|
agentId?: string;
|
|
348
448
|
cursor?: string;
|
|
349
449
|
limit?: number;
|
|
350
450
|
userId?: string;
|
|
351
451
|
}
|
|
352
|
-
export interface TaskRunsListOptions {
|
|
452
|
+
export interface TaskRunsListOptions extends ResourceRequestOptions {
|
|
353
453
|
cursor?: string;
|
|
354
454
|
limit?: number;
|
|
355
455
|
}
|
|
356
|
-
export interface TaskRunMessagesOptions {
|
|
456
|
+
export interface TaskRunMessagesOptions extends ResourceRequestOptions {
|
|
357
457
|
after?: string;
|
|
358
458
|
cursor?: string;
|
|
359
459
|
limit?: number;
|
|
360
460
|
}
|
|
361
461
|
export interface TasksResource {
|
|
362
|
-
cancelRun(
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
462
|
+
cancelRun(input: {
|
|
463
|
+
taskId: string;
|
|
464
|
+
runId: string;
|
|
465
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
466
|
+
create(input: CreateTaskBody & ResourceRequestOptions): Promise<CreateTaskResponse>;
|
|
467
|
+
createRun(input: CreateTaskRunBody & {
|
|
468
|
+
taskId: string;
|
|
469
|
+
} & ResourceRequestOptions): Promise<CreateTaskRunResponse>;
|
|
470
|
+
delete(input: {
|
|
471
|
+
taskId: string;
|
|
472
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
473
|
+
get(input: {
|
|
474
|
+
taskId: string;
|
|
475
|
+
} & ResourceRequestOptions): Promise<TaskResponse>;
|
|
476
|
+
getRun(input: {
|
|
477
|
+
taskId: string;
|
|
478
|
+
runId: string;
|
|
479
|
+
} & ResourceRequestOptions): Promise<TaskRunResponse>;
|
|
480
|
+
list(input?: TasksListOptions): Promise<TasksListResponse>;
|
|
481
|
+
listRuns(input: {
|
|
482
|
+
taskId: string;
|
|
483
|
+
} & TaskRunsListOptions): Promise<TaskRunsListResponse>;
|
|
484
|
+
runMessages(input: {
|
|
485
|
+
taskId: string;
|
|
486
|
+
runId: string;
|
|
487
|
+
} & TaskRunMessagesOptions): Promise<TaskRunMessagesResponse>;
|
|
488
|
+
update(input: UpdateTaskBody & {
|
|
489
|
+
taskId: string;
|
|
490
|
+
} & ResourceRequestOptions): Promise<TaskResponse>;
|
|
372
491
|
}
|
|
373
492
|
export interface TenantResource {
|
|
374
|
-
get(): Promise<TenantSettingsResponse>;
|
|
375
|
-
patch(
|
|
493
|
+
get(input?: ResourceRequestOptions): Promise<TenantSettingsResponse>;
|
|
494
|
+
patch(input: UpdateTenantSettingsBody & ResourceRequestOptions): Promise<TenantSettingsResponse>;
|
|
376
495
|
}
|
|
377
496
|
export interface UsageResource {
|
|
378
|
-
get(
|
|
379
|
-
getForAgent(
|
|
497
|
+
get(input?: Partial<UsageQuery> & ResourceRequestOptions): Promise<UsageResponse>;
|
|
498
|
+
getForAgent(input: Partial<UsageQuery> & {
|
|
499
|
+
agentId: string;
|
|
500
|
+
} & ResourceRequestOptions): Promise<UsageResponse>;
|
|
380
501
|
}
|
|
381
502
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazingagents/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TypeScript SDK for the Blazing Agents API",
|
|
5
5
|
"homepage": "https://docs.blazingagents.com",
|
|
6
6
|
"bugs": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint": "ultracite check",
|
|
36
36
|
"prepack": "npm run build",
|
|
37
37
|
"test": "vitest run --coverage",
|
|
38
|
-
"test:consumer": "npm run build && vitest run -c vitest.consumer.config.mts",
|
|
38
|
+
"test:consumer": "npm run build && tsc -p tsconfig.consumer.json && vitest run -c vitest.consumer.config.mts",
|
|
39
39
|
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.tests.json"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|