@blazingagents/sdk 0.19.0 → 0.20.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 +17 -1
- package/dist/approvals.d.ts +2 -14
- package/dist/approvals.js +10 -15
- package/dist/client.d.ts +4 -4
- package/dist/client.js +6 -6
- package/dist/contracts/api.d.ts +6 -6
- package/dist/contracts/api.js +2 -2
- package/dist/contracts/entities/chat.d.ts +8 -10
- package/dist/contracts/entities/chat.js +5 -7
- package/dist/contracts/entities/session-inputs.d.ts +29 -87
- package/dist/contracts/entities/session-inputs.js +18 -18
- package/dist/contracts/entities/sessions.d.ts +16 -17
- package/dist/contracts/entities/sessions.js +12 -7
- package/dist/contracts/index.d.ts +5 -5
- package/dist/contracts/index.js +3 -3
- package/dist/direct-chat-transport.d.ts +3 -2
- package/dist/direct-chat-transport.js +14 -35
- package/dist/generation.d.ts +2 -2
- package/dist/generation.js +14 -19
- package/dist/index.d.ts +3 -3
- package/dist/relay.d.ts +3 -3
- package/dist/relay.js +9 -10
- package/dist/resources/sessions.js +3 -40
- package/dist/types.d.ts +15 -41
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import type { CreateMemoryBody, MemoriesListResponse, MemoryResponse, UpdateMemo
|
|
|
9
9
|
import type { CreateMerchantConnectionBody, MerchantBindingResponse, MerchantBindingsResponse, MerchantConnectionResponse, MerchantUsageEventResponse, MerchantUsageEventStatus, MerchantUsageEventsResponse, MerchantUsageSummaryResponse, UpdateMerchantConnectionBody, UpsertMerchantBindingBody } from "./contracts/entities/merchant.ts";
|
|
10
10
|
import type { CreatePromptBody, PromptResponse, PromptsResponse, UpdatePromptBody } from "./contracts/entities/prompts.ts";
|
|
11
11
|
import type { CreateProviderBody, DeleteProviderOptions, ProviderModelsResponse, ProviderResponse, ProvidersResponse, ThinkingLevelsResponse, UpdateProviderBody } from "./contracts/entities/providers.ts";
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
12
|
+
import type { SessionInputResponse, SessionInputsQuery, SessionInputsResponse, StopSessionBody, StopSessionResponse, SubmitSessionInputBody } from "./contracts/entities/session-inputs.ts";
|
|
13
|
+
import type { LatestSessionsListResponse, SessionMessagesResponse, SessionResponse, SessionsListResponse, ToolApprovalDecision, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
|
|
14
14
|
import type { CreateSkillBody, SkillArchiveType, SkillCopyResults, SkillDetail, SkillsListResponse } from "./contracts/entities/skills.ts";
|
|
15
15
|
import type { CreateTaskBody, CreateTaskResponse, CreateTaskRunBody, CreateTaskRunResponse, TaskResponse, TaskRunMessagesResponse, TaskRunResponse, TaskRunsListResponse, TasksListResponse, UpdateTaskBody } from "./contracts/entities/tasks.ts";
|
|
16
16
|
import type { TenantSettingsResponse, UpdateTenantSettingsBody } from "./contracts/entities/tenants.ts";
|
|
@@ -68,10 +68,10 @@ export interface UserClient {
|
|
|
68
68
|
readonly artifacts: ArtifactsResource;
|
|
69
69
|
chat(input: ChatInput): Promise<ChatResult>;
|
|
70
70
|
completion(input: CompletionInput): Promise<CompletionResult>;
|
|
71
|
+
continueChat(input: ContinueChatInput): Promise<ChatResult>;
|
|
71
72
|
readonly memories: MemoriesResource;
|
|
72
73
|
object(input: ObjectInput): Promise<ObjectResult>;
|
|
73
74
|
readonly prompts: PromptsResource;
|
|
74
|
-
resumeChat(input: ResumeChatInput): Promise<ChatResult>;
|
|
75
75
|
readonly sessions: SessionsResource;
|
|
76
76
|
readonly tasks: TasksResource;
|
|
77
77
|
readonly usage: Pick<UsageResource, "get" | "sessions">;
|
|
@@ -117,6 +117,7 @@ interface ChatMessageContentInput extends AttributionInput, CorrelatedRequestInp
|
|
|
117
117
|
functions?: ChatFunctions;
|
|
118
118
|
message: UIMessage;
|
|
119
119
|
messageId?: string;
|
|
120
|
+
messages?: never;
|
|
120
121
|
promptId?: never;
|
|
121
122
|
variables?: never;
|
|
122
123
|
}
|
|
@@ -127,19 +128,23 @@ interface ChatPromptContentInput extends AttributionInput, CorrelatedRequestInpu
|
|
|
127
128
|
functions?: ChatFunctions;
|
|
128
129
|
message?: never;
|
|
129
130
|
messageId?: string;
|
|
131
|
+
messages?: never;
|
|
130
132
|
promptId: string;
|
|
131
133
|
variables?: Record<string, string>;
|
|
132
134
|
}
|
|
133
135
|
export type ChatMessageInput = ChatMessageContentInput & ChatSessionInput;
|
|
134
136
|
export type ChatPromptInput = ChatPromptContentInput & ChatSessionInput;
|
|
135
|
-
export type
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
export type ChatMessagesInput = Omit<ChatMessageContentInput, "message" | "messages"> & {
|
|
138
|
+
message?: never;
|
|
139
|
+
messages: UIMessage[];
|
|
140
|
+
} & ChatSessionInput;
|
|
141
|
+
export type ChatInput = ChatMessageInput | ChatMessagesInput | ChatPromptInput;
|
|
142
|
+
/** Records the complete approval round and streams the continuation. */
|
|
143
|
+
export interface ContinueChatInput extends CorrelatedRequestInput {
|
|
138
144
|
abortSignal?: AbortSignal;
|
|
139
145
|
agentId: string;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
functions: ChatFunctions;
|
|
146
|
+
decisions: ToolApprovalDecision[];
|
|
147
|
+
functions?: ChatFunctions;
|
|
143
148
|
sessionId: string;
|
|
144
149
|
}
|
|
145
150
|
export interface ChatResult {
|
|
@@ -395,21 +400,11 @@ export interface SessionMessagesOptions extends ResourceRequestOptions {
|
|
|
395
400
|
limit?: number;
|
|
396
401
|
}
|
|
397
402
|
export interface SessionsResource {
|
|
398
|
-
decideToolApproval(input: DecideToolApprovalBody & {
|
|
399
|
-
agentId: string;
|
|
400
|
-
sessionId: string;
|
|
401
|
-
approvalId: string;
|
|
402
|
-
} & ResourceRequestOptions): Promise<ToolApprovalDecisionResponse>;
|
|
403
403
|
delete(input: {
|
|
404
404
|
agentId: string;
|
|
405
405
|
sessionId: string;
|
|
406
406
|
deleteArtifacts: boolean;
|
|
407
407
|
} & ResourceRequestOptions): Promise<void>;
|
|
408
|
-
deleteInput(input: {
|
|
409
|
-
agentId: string;
|
|
410
|
-
sessionId: string;
|
|
411
|
-
requestId: string;
|
|
412
|
-
} & ResourceRequestOptions): Promise<SessionInputResponse>;
|
|
413
408
|
get(input: {
|
|
414
409
|
agentId: string;
|
|
415
410
|
sessionId: string;
|
|
@@ -419,11 +414,6 @@ export interface SessionsResource {
|
|
|
419
414
|
agentId: string;
|
|
420
415
|
sessionId: string;
|
|
421
416
|
} & SessionInputsQuery & ResourceRequestOptions): Promise<SessionInputsResponse>;
|
|
422
|
-
joinToolApprovalContinuation(input: {
|
|
423
|
-
agentId: string;
|
|
424
|
-
sessionId: string;
|
|
425
|
-
continuationId: string;
|
|
426
|
-
} & ResourceRequestOptions): Promise<TerminalStreamResult>;
|
|
427
417
|
list(input: {
|
|
428
418
|
agentId: string;
|
|
429
419
|
} & SessionsListOptions): Promise<SessionsListResponse>;
|
|
@@ -437,23 +427,7 @@ export interface SessionsResource {
|
|
|
437
427
|
agentId: string;
|
|
438
428
|
sessionId: string;
|
|
439
429
|
} & SessionMessagesOptions): Promise<SessionMessagesResponse>;
|
|
440
|
-
|
|
441
|
-
agentId: string;
|
|
442
|
-
sessionId: string;
|
|
443
|
-
requestId: string;
|
|
444
|
-
} & ResourceRequestOptions): Promise<SessionInputResponse>;
|
|
445
|
-
/** Resume accepted inputs after a pause. Uncertain inputs are never replayed. */
|
|
446
|
-
resumeInputs(input: {
|
|
447
|
-
agentId: string;
|
|
448
|
-
sessionId: string;
|
|
449
|
-
} & ResourceRequestOptions): Promise<ResumeSessionInputsResponse>;
|
|
450
|
-
/** Runs the pending batch and streams its output without resubmitting messages. */
|
|
451
|
-
runInputs(input: {
|
|
452
|
-
agentId: string;
|
|
453
|
-
sessionId: string;
|
|
454
|
-
functions?: ChatFunctions;
|
|
455
|
-
} & ResourceRequestOptions): Promise<TerminalStreamResult>;
|
|
456
|
-
/** Wait for settlement of the named Turn. A queued Turn may already be running. */
|
|
430
|
+
/** Records cancellation for the named Turn without waiting for settlement. */
|
|
457
431
|
stop(input: {
|
|
458
432
|
agentId: string;
|
|
459
433
|
sessionId: string;
|