@blazingagents/sdk 0.28.0 → 0.29.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.
|
@@ -32,111 +32,94 @@ export declare const AGENT_TOOL_FILE_ACCESS_TAGS: readonly ["file_read", "file_w
|
|
|
32
32
|
export type AgentToolFileAccessTag = (typeof AGENT_TOOL_FILE_ACCESS_TAGS)[number];
|
|
33
33
|
export declare const AGENT_TOOL_TAGS: readonly [...("files" | "memory" | "planning" | "web")[], "file_read", "file_write", "execute"];
|
|
34
34
|
export type AgentToolTag = AgentToolGroupTag | AgentToolFileAccessTag;
|
|
35
|
-
/** The group tag comes first
|
|
36
|
-
export type AgentToolTags = readonly [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export declare const AGENT_TOOL_CATEGORIES: readonly {
|
|
41
|
-
description: string;
|
|
42
|
-
id: AgentToolGroupTag;
|
|
43
|
-
name: string;
|
|
44
|
-
}[];
|
|
35
|
+
/** The group tag comes first. Only a file operation tool adds a file access tag, and at most one. */
|
|
36
|
+
export type AgentToolTags = readonly [
|
|
37
|
+
AgentToolGroupTag,
|
|
38
|
+
...AgentToolFileAccessTag[]
|
|
39
|
+
];
|
|
45
40
|
export interface AgentToolDefinition {
|
|
46
|
-
/** @deprecated Use the group tag in `tags`. */
|
|
47
|
-
category: AgentToolGroupTag;
|
|
48
41
|
description: string;
|
|
49
42
|
name: string;
|
|
50
43
|
/** The tool runs in the Agent's attached Workspace. */
|
|
51
44
|
requiresWorkspace: boolean;
|
|
52
45
|
tags: AgentToolTags;
|
|
53
46
|
}
|
|
54
|
-
|
|
47
|
+
declare const CATALOG: readonly [{
|
|
55
48
|
readonly name: "read";
|
|
56
49
|
readonly tags: readonly ["files", "file_read"];
|
|
57
|
-
readonly category: "files";
|
|
58
50
|
readonly requiresWorkspace: true;
|
|
59
51
|
readonly description: "Read a file from the Workspace.";
|
|
60
52
|
}, {
|
|
61
53
|
readonly name: "write";
|
|
62
54
|
readonly tags: readonly ["files", "file_write"];
|
|
63
|
-
readonly category: "files";
|
|
64
55
|
readonly requiresWorkspace: true;
|
|
65
56
|
readonly description: "Create or overwrite a file in the Workspace.";
|
|
66
57
|
}, {
|
|
67
58
|
readonly name: "edit";
|
|
68
59
|
readonly tags: readonly ["files", "file_write"];
|
|
69
|
-
readonly category: "files";
|
|
70
60
|
readonly requiresWorkspace: true;
|
|
71
61
|
readonly description: "Replace exact text in a Workspace file.";
|
|
72
62
|
}, {
|
|
73
63
|
readonly name: "grep";
|
|
74
64
|
readonly tags: readonly ["files", "file_read"];
|
|
75
|
-
readonly category: "files";
|
|
76
65
|
readonly requiresWorkspace: true;
|
|
77
66
|
readonly description: "Search Workspace file contents with a regular expression.";
|
|
78
67
|
}, {
|
|
79
68
|
readonly name: "glob";
|
|
80
69
|
readonly tags: readonly ["files", "file_read"];
|
|
81
|
-
readonly category: "files";
|
|
82
70
|
readonly requiresWorkspace: true;
|
|
83
71
|
readonly description: "Find Workspace files by path pattern.";
|
|
84
72
|
}, {
|
|
85
73
|
readonly name: "bash";
|
|
86
74
|
readonly tags: readonly ["files", "execute"];
|
|
87
|
-
readonly category: "files";
|
|
88
75
|
readonly requiresWorkspace: true;
|
|
89
76
|
readonly description: "Run shell commands in the Workspace.";
|
|
90
77
|
}, {
|
|
91
78
|
readonly name: "publish_artifacts";
|
|
92
79
|
readonly tags: readonly ["files"];
|
|
93
|
-
readonly category: "files";
|
|
94
80
|
readonly requiresWorkspace: true;
|
|
95
81
|
readonly description: "Publish Workspace files as downloadable Artifacts.";
|
|
96
82
|
}, {
|
|
97
83
|
readonly name: "write_todos";
|
|
98
84
|
readonly tags: readonly ["planning"];
|
|
99
|
-
readonly category: "planning";
|
|
100
85
|
readonly requiresWorkspace: false;
|
|
101
86
|
readonly description: "Plan and track multi-step work with a todo list.";
|
|
102
87
|
}, {
|
|
103
88
|
readonly name: "save_memory";
|
|
104
89
|
readonly tags: readonly ["memory"];
|
|
105
|
-
readonly category: "memory";
|
|
106
90
|
readonly requiresWorkspace: false;
|
|
107
91
|
readonly description: "Save a durable note.";
|
|
108
92
|
}, {
|
|
109
93
|
readonly name: "get_memory";
|
|
110
94
|
readonly tags: readonly ["memory"];
|
|
111
|
-
readonly category: "memory";
|
|
112
95
|
readonly requiresWorkspace: false;
|
|
113
96
|
readonly description: "Read one saved note.";
|
|
114
97
|
}, {
|
|
115
98
|
readonly name: "search_memories";
|
|
116
99
|
readonly tags: readonly ["memory"];
|
|
117
|
-
readonly category: "memory";
|
|
118
100
|
readonly requiresWorkspace: false;
|
|
119
101
|
readonly description: "Search saved notes.";
|
|
120
102
|
}, {
|
|
121
103
|
readonly name: "update_memory";
|
|
122
104
|
readonly tags: readonly ["memory"];
|
|
123
|
-
readonly category: "memory";
|
|
124
105
|
readonly requiresWorkspace: false;
|
|
125
106
|
readonly description: "Update a saved note.";
|
|
126
107
|
}, {
|
|
127
108
|
readonly name: "delete_memory";
|
|
128
109
|
readonly tags: readonly ["memory"];
|
|
129
|
-
readonly category: "memory";
|
|
130
110
|
readonly requiresWorkspace: false;
|
|
131
111
|
readonly description: "Delete a saved note.";
|
|
132
112
|
}, {
|
|
133
113
|
readonly name: "web_search";
|
|
134
114
|
readonly tags: readonly ["web"];
|
|
135
|
-
readonly category: "web";
|
|
136
115
|
readonly requiresWorkspace: false;
|
|
137
116
|
readonly description: "Search the public web for current results. Each search consumes Usage credit.";
|
|
138
117
|
}];
|
|
139
|
-
export type AgentToolName = (typeof
|
|
118
|
+
export type AgentToolName = (typeof CATALOG)[number]["name"];
|
|
119
|
+
/** Declared rather than inferred, so `tool.tags.includes(tag)` accepts any tag. */
|
|
120
|
+
export declare const AGENT_TOOLS: readonly (AgentToolDefinition & {
|
|
121
|
+
name: AgentToolName;
|
|
122
|
+
})[];
|
|
140
123
|
export declare const agentToolNames: readonly AgentToolName[];
|
|
141
124
|
/** Built-in tool names an approval policy can reference. */
|
|
142
125
|
export declare const builtinToolNames: readonly [...("bash" | "delete_memory" | "edit" | "get_memory" | "glob" | "grep" | "publish_artifacts" | "read" | "save_memory" | "search_memories" | "update_memory" | "web_search" | "write" | "write_todos")[], "activate_skill"];
|
|
@@ -145,3 +128,4 @@ export declare const builtinToolNames: readonly [...("bash" | "delete_memory" |
|
|
|
145
128
|
* for MCP tools are reserved so a caller function never shadows them.
|
|
146
129
|
*/
|
|
147
130
|
export declare const chatFunctionNameSchema: z.ZodString;
|
|
131
|
+
export {};
|
|
@@ -41,108 +41,94 @@ export const AGENT_TOOL_TAGS = [
|
|
|
41
41
|
...AGENT_TOOL_GROUPS.map((group) => group.tag),
|
|
42
42
|
...AGENT_TOOL_FILE_ACCESS_TAGS,
|
|
43
43
|
];
|
|
44
|
-
|
|
45
|
-
export const AGENT_TOOL_CATEGORIES = AGENT_TOOL_GROUPS.map(({ tag, ...group }) => ({ id: tag, ...group }));
|
|
46
|
-
export const AGENT_TOOLS = [
|
|
44
|
+
const CATALOG = [
|
|
47
45
|
{
|
|
48
46
|
name: "read",
|
|
49
47
|
tags: ["files", "file_read"],
|
|
50
|
-
category: "files",
|
|
51
48
|
requiresWorkspace: true,
|
|
52
49
|
description: "Read a file from the Workspace.",
|
|
53
50
|
},
|
|
54
51
|
{
|
|
55
52
|
name: "write",
|
|
56
53
|
tags: ["files", "file_write"],
|
|
57
|
-
category: "files",
|
|
58
54
|
requiresWorkspace: true,
|
|
59
55
|
description: "Create or overwrite a file in the Workspace.",
|
|
60
56
|
},
|
|
61
57
|
{
|
|
62
58
|
name: "edit",
|
|
63
59
|
tags: ["files", "file_write"],
|
|
64
|
-
category: "files",
|
|
65
60
|
requiresWorkspace: true,
|
|
66
61
|
description: "Replace exact text in a Workspace file.",
|
|
67
62
|
},
|
|
68
63
|
{
|
|
69
64
|
name: "grep",
|
|
70
65
|
tags: ["files", "file_read"],
|
|
71
|
-
category: "files",
|
|
72
66
|
requiresWorkspace: true,
|
|
73
67
|
description: "Search Workspace file contents with a regular expression.",
|
|
74
68
|
},
|
|
75
69
|
{
|
|
76
70
|
name: "glob",
|
|
77
71
|
tags: ["files", "file_read"],
|
|
78
|
-
category: "files",
|
|
79
72
|
requiresWorkspace: true,
|
|
80
73
|
description: "Find Workspace files by path pattern.",
|
|
81
74
|
},
|
|
82
75
|
{
|
|
83
76
|
name: "bash",
|
|
84
77
|
tags: ["files", "execute"],
|
|
85
|
-
category: "files",
|
|
86
78
|
requiresWorkspace: true,
|
|
87
79
|
description: "Run shell commands in the Workspace.",
|
|
88
80
|
},
|
|
89
81
|
{
|
|
90
82
|
name: "publish_artifacts",
|
|
91
83
|
tags: ["files"],
|
|
92
|
-
category: "files",
|
|
93
84
|
requiresWorkspace: true,
|
|
94
85
|
description: "Publish Workspace files as downloadable Artifacts.",
|
|
95
86
|
},
|
|
96
87
|
{
|
|
97
88
|
name: "write_todos",
|
|
98
89
|
tags: ["planning"],
|
|
99
|
-
category: "planning",
|
|
100
90
|
requiresWorkspace: false,
|
|
101
91
|
description: "Plan and track multi-step work with a todo list.",
|
|
102
92
|
},
|
|
103
93
|
{
|
|
104
94
|
name: "save_memory",
|
|
105
95
|
tags: ["memory"],
|
|
106
|
-
category: "memory",
|
|
107
96
|
requiresWorkspace: false,
|
|
108
97
|
description: "Save a durable note.",
|
|
109
98
|
},
|
|
110
99
|
{
|
|
111
100
|
name: "get_memory",
|
|
112
101
|
tags: ["memory"],
|
|
113
|
-
category: "memory",
|
|
114
102
|
requiresWorkspace: false,
|
|
115
103
|
description: "Read one saved note.",
|
|
116
104
|
},
|
|
117
105
|
{
|
|
118
106
|
name: "search_memories",
|
|
119
107
|
tags: ["memory"],
|
|
120
|
-
category: "memory",
|
|
121
108
|
requiresWorkspace: false,
|
|
122
109
|
description: "Search saved notes.",
|
|
123
110
|
},
|
|
124
111
|
{
|
|
125
112
|
name: "update_memory",
|
|
126
113
|
tags: ["memory"],
|
|
127
|
-
category: "memory",
|
|
128
114
|
requiresWorkspace: false,
|
|
129
115
|
description: "Update a saved note.",
|
|
130
116
|
},
|
|
131
117
|
{
|
|
132
118
|
name: "delete_memory",
|
|
133
119
|
tags: ["memory"],
|
|
134
|
-
category: "memory",
|
|
135
120
|
requiresWorkspace: false,
|
|
136
121
|
description: "Delete a saved note.",
|
|
137
122
|
},
|
|
138
123
|
{
|
|
139
124
|
name: "web_search",
|
|
140
125
|
tags: ["web"],
|
|
141
|
-
category: "web",
|
|
142
126
|
requiresWorkspace: false,
|
|
143
127
|
description: "Search the public web for current results. Each search consumes Usage credit.",
|
|
144
128
|
},
|
|
145
129
|
];
|
|
130
|
+
/** Declared rather than inferred, so `tool.tags.includes(tag)` accepts any tag. */
|
|
131
|
+
export const AGENT_TOOLS = CATALOG;
|
|
146
132
|
export const agentToolNames = AGENT_TOOLS.map((tool) => tool.name);
|
|
147
133
|
/** Built-in tool names an approval policy can reference. */
|
|
148
134
|
export const builtinToolNames = [...agentToolNames, "activate_skill"];
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
export { receivedApiErrorResponseSchema } from "./api.ts";
|
|
3
3
|
export type { ApprovalDecision, ApprovalPolicy, ToolExecutionReference, ToolReference, } from "./entities/agent-approval.ts";
|
|
4
4
|
export { approvalDecisionSchema, approvalPolicySchema, toolExecutionReferenceSchema, toolReferenceSchema, } from "./entities/agent-approval.ts";
|
|
5
|
-
export type {
|
|
6
|
-
export {
|
|
5
|
+
export type { AgentToolDefinition, AgentToolFileAccessTag, AgentToolGroupTag, AgentToolName, AgentToolTag, AgentToolTags, } from "./entities/agent-tools.ts";
|
|
6
|
+
export { AGENT_TOOL_FILE_ACCESS_TAGS, AGENT_TOOL_GROUPS, AGENT_TOOL_TAGS, AGENT_TOOLS, agentToolNames, chatFunctionNameSchema, } from "./entities/agent-tools.ts";
|
|
7
7
|
export { agentConfigSchema, agentResponseSchema, agentStatusSchema, agentsListQuerySchema, agentsResponseSchema, createAgentBodySchema, updateAgentBodySchema, } from "./entities/agents.ts";
|
|
8
8
|
export { artifactDownloadUrlResponseSchema, artifactListItemSchema, artifactsListResponseSchema, } from "./entities/artifacts.ts";
|
|
9
9
|
export { attributionCreateInputSchema, metadataSchema, } from "./entities/attribution.ts";
|
package/dist/contracts/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// biome-ignore lint/performance/noBarrelFile: public contract entry point
|
|
3
3
|
export { receivedApiErrorResponseSchema } from "./api.js";
|
|
4
4
|
export { approvalDecisionSchema, approvalPolicySchema, toolExecutionReferenceSchema, toolReferenceSchema, } from "./entities/agent-approval.js";
|
|
5
|
-
export {
|
|
5
|
+
export { AGENT_TOOL_FILE_ACCESS_TAGS, AGENT_TOOL_GROUPS, AGENT_TOOL_TAGS, AGENT_TOOLS, agentToolNames, chatFunctionNameSchema, } from "./entities/agent-tools.js";
|
|
6
6
|
export { agentConfigSchema, agentResponseSchema, agentStatusSchema, agentsListQuerySchema, agentsResponseSchema, createAgentBodySchema, updateAgentBodySchema, } from "./entities/agents.js";
|
|
7
7
|
export { artifactDownloadUrlResponseSchema, artifactListItemSchema, artifactsListResponseSchema, } from "./entities/artifacts.js";
|
|
8
8
|
export { attributionCreateInputSchema, metadataSchema, } from "./entities/attribution.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { UIMessage } from "ai";
|
|
|
7
7
|
export { BlazingAgentsChatTransport, type BlazingAgentsChatTransportOptions, } from "./chat-transport.ts";
|
|
8
8
|
export { BlazingAgents } from "./client.ts";
|
|
9
9
|
export type { ApprovalDecision, ApprovalPolicy, ToolExecutionReference, ToolReference, } from "./contracts/entities/agent-approval.ts";
|
|
10
|
-
export {
|
|
10
|
+
export { AGENT_TOOL_FILE_ACCESS_TAGS, AGENT_TOOL_GROUPS, AGENT_TOOL_TAGS, AGENT_TOOLS, type AgentToolDefinition, type AgentToolFileAccessTag, type AgentToolGroupTag, type AgentToolName, type AgentToolTag, type AgentToolTags, } from "./contracts/entities/agent-tools.ts";
|
|
11
11
|
export type { Agent, AgentConfig, AgentResponse, AgentsListQuery, AgentsResponse, CreateAgentBody, UpdateAgentBody, } from "./contracts/entities/agents.ts";
|
|
12
12
|
export { agentConfigSchema } from "./contracts/entities/agents.ts";
|
|
13
13
|
export type { ArtifactDownloadUrlResponse, ArtifactListItem, ArtifactsListResponse, } from "./contracts/entities/artifacts.ts";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// biome-ignore lint/performance/noBarrelFile: package entry point
|
|
7
7
|
export { BlazingAgentsChatTransport, } from "./chat-transport.js";
|
|
8
8
|
export { BlazingAgents } from "./client.js";
|
|
9
|
-
export {
|
|
9
|
+
export { AGENT_TOOL_FILE_ACCESS_TAGS, AGENT_TOOL_GROUPS, AGENT_TOOL_TAGS, AGENT_TOOLS, } from "./contracts/entities/agent-tools.js";
|
|
10
10
|
export { agentConfigSchema } from "./contracts/entities/agents.js";
|
|
11
11
|
export { sessionResponseSchema } from "./contracts/entities/sessions.js";
|
|
12
12
|
export { nextSpendingLimitReset } from "./contracts/entities/spending-limits.js";
|