@blazingagents/sdk 0.29.0 → 0.30.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/dist/client.js +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +20 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -36,7 +36,11 @@ function createUserClient(config) {
|
|
|
36
36
|
artifacts: createArtifactsResource(config),
|
|
37
37
|
workspaces: createWorkspacesResource(config),
|
|
38
38
|
memories: createMemoriesResource(config),
|
|
39
|
-
usage: {
|
|
39
|
+
usage: {
|
|
40
|
+
get: usage.get,
|
|
41
|
+
getForAgent: usage.getForAgent,
|
|
42
|
+
sessions: usage.sessions,
|
|
43
|
+
},
|
|
40
44
|
/** Returns Skill operations for the selected Agent. */
|
|
41
45
|
agent: ({ agentId }) => ({
|
|
42
46
|
skills: createAgentSkillsResource(config, agentId),
|
package/dist/index.d.ts
CHANGED
|
@@ -28,4 +28,4 @@ export { BlazingAgentsDirectChatTransport, type BlazingAgentsDirectChatTransport
|
|
|
28
28
|
export { BlazingAgentsError } from "./errors.ts";
|
|
29
29
|
export { type ChatFunction, type ChatFunctionContext, type ChatFunctions, defineFunction, } from "./functions.ts";
|
|
30
30
|
export { createChatRelay, createCompletionRelay, type RelayContext, type SessionOwnershipStore, } from "./relay.ts";
|
|
31
|
-
export type { AgentClient, AgentSkillsResource, AgentsListOptions, AgentsResource, ArtifactsResource, AttributionInput, BlazingAgentsErrorCode, BlazingAgentsOptions, BlazingAgentsRequestOptions, BlazingAgentsUIMessage, BlazingAgentsUIMessageChunk, BlazingAgentsUIMessageData, ChatConnectionsResource, ChatDeliveriesListOptions, ChatDeliveriesResource, ChatInput, ChatMessageInput, ChatMessagesInput, ChatPromptInput, ChatResult, ChatTrigger, CompletionInput, CompletionPromptIdInput, CompletionPromptInput, CompletionResult, ContinueChatInput, KnownBlazingAgentsErrorCode, LatestSessionsListOptions, McpConnectionsResource, MemoriesListOptions, MemoriesResource, MerchantBindingsListOptions, MerchantBindingsResource, MerchantConnectionResource, MerchantUsageEventsListOptions, MerchantUsageEventsResource, ObjectInput, ObjectPromptIdInput, ObjectPromptInput, ObjectResult, PromptsResource, ProvidersResource, ResourceRequestOptions, ResponseObservation, SessionsResource, SkillsListOptions, TasksResource, TenantResource, TerminalStreamResult, UsageResource, UserClient, WorkspacesListOptions, WorkspacesResource, } from "./types.ts";
|
|
31
|
+
export type { AgentClient, AgentSkillsResource, AgentsListOptions, AgentsResource, ArtifactsResource, AttributionInput, BlazingAgentsErrorCode, BlazingAgentsOptions, BlazingAgentsRequestOptions, BlazingAgentsUIMessage, BlazingAgentsUIMessageChunk, BlazingAgentsUIMessageData, ChatConnectionsResource, ChatDeliveriesListOptions, ChatDeliveriesResource, ChatInput, ChatMessageInput, ChatMessagesInput, ChatPromptInput, ChatResult, ChatTrigger, CompletionInput, CompletionPromptIdInput, CompletionPromptInput, CompletionResult, ContinueChatInput, KnownBlazingAgentsErrorCode, LatestSessionsListOptions, McpConnectionsResource, MemoriesListOptions, MemoriesResource, MerchantBindingsListOptions, MerchantBindingsResource, MerchantConnectionResource, MerchantUsageEventsListOptions, MerchantUsageEventsResource, ObjectInput, ObjectPromptIdInput, ObjectPromptInput, ObjectResult, PromptsResource, ProvidersResource, ResourceRequestOptions, ResponseObservation, SessionsResource, SkillsListOptions, TasksResource, TenantResource, TerminalStreamResult, UsageResource, UserAgentsResource, UserClient, WorkspacesListOptions, WorkspacesResource, } from "./types.ts";
|
package/dist/types.d.ts
CHANGED
|
@@ -61,6 +61,24 @@ export interface BlazingAgentsOptions {
|
|
|
61
61
|
export interface BlazingAgentsRequestOptions {
|
|
62
62
|
clientRequestId: string;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Agent operations on a user-scoped client. The API refuses the spending limit
|
|
66
|
+
* methods for user-scoped callers.
|
|
67
|
+
*/
|
|
68
|
+
export interface UserAgentsResource extends Omit<AgentsResource, "getSpendingLimit" | "updateSpendingLimit"> {
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated The API always refuses this for user-scoped callers with
|
|
71
|
+
* `forbidden` (403). Call it on the tenant client instead. It is removed
|
|
72
|
+
* from user-scoped clients in a later release.
|
|
73
|
+
*/
|
|
74
|
+
getSpendingLimit: AgentsResource["getSpendingLimit"];
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated The API always refuses this for user-scoped callers with
|
|
77
|
+
* `forbidden` (403). Call it on the tenant client instead. It is removed
|
|
78
|
+
* from user-scoped clients in a later release.
|
|
79
|
+
*/
|
|
80
|
+
updateSpendingLimit: AgentsResource["updateSpendingLimit"];
|
|
81
|
+
}
|
|
64
82
|
export interface UserClient {
|
|
65
83
|
/**
|
|
66
84
|
* Returns the Skill operations for the selected Agent.
|
|
@@ -70,7 +88,7 @@ export interface UserClient {
|
|
|
70
88
|
agent(input: {
|
|
71
89
|
agentId: string;
|
|
72
90
|
}): AgentClient;
|
|
73
|
-
readonly agents:
|
|
91
|
+
readonly agents: UserAgentsResource;
|
|
74
92
|
readonly artifacts: ArtifactsResource;
|
|
75
93
|
/**
|
|
76
94
|
* Creates or resumes a Session and returns its SSE stream and Session ID.
|
|
@@ -100,7 +118,7 @@ export interface UserClient {
|
|
|
100
118
|
readonly prompts: PromptsResource;
|
|
101
119
|
readonly sessions: SessionsResource;
|
|
102
120
|
readonly tasks: TasksResource;
|
|
103
|
-
readonly usage: Pick<UsageResource, "get" | "sessions">;
|
|
121
|
+
readonly usage: Pick<UsageResource, "get" | "getForAgent" | "sessions">;
|
|
104
122
|
/**
|
|
105
123
|
* Creates a client view with the supplied request correlation ID.
|
|
106
124
|
* @param options - Caller-owned request correlation ID for subsequent calls.
|