@blazingagents/sdk 0.26.0 → 0.27.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/contracts/entities/agent-approval.d.ts +3 -0
- package/dist/contracts/entities/agent-approval.js +2 -5
- package/dist/contracts/entities/agent-tools.d.ts +94 -15
- package/dist/contracts/entities/agent-tools.js +104 -32
- package/dist/contracts/entities/agents.d.ts +88 -12
- package/dist/contracts/entities/agents.js +3 -3
- package/dist/contracts/entities/sessions.d.ts +17 -2
- package/dist/contracts/entities/tasks.d.ts +30 -4
- package/dist/contracts/index.d.ts +2 -1
- package/dist/contracts/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ export declare const toolReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
20
20
|
save_memory: "save_memory";
|
|
21
21
|
search_memories: "search_memories";
|
|
22
22
|
update_memory: "update_memory";
|
|
23
|
+
web_search: "web_search";
|
|
23
24
|
write: "write";
|
|
24
25
|
write_todos: "write_todos";
|
|
25
26
|
}>;
|
|
@@ -48,6 +49,7 @@ export declare const toolExecutionReferenceSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
48
49
|
save_memory: "save_memory";
|
|
49
50
|
search_memories: "search_memories";
|
|
50
51
|
update_memory: "update_memory";
|
|
52
|
+
web_search: "web_search";
|
|
51
53
|
write: "write";
|
|
52
54
|
write_todos: "write_todos";
|
|
53
55
|
}>;
|
|
@@ -82,6 +84,7 @@ export declare const approvalPolicySchema: z.ZodObject<{
|
|
|
82
84
|
save_memory: "save_memory";
|
|
83
85
|
search_memories: "search_memories";
|
|
84
86
|
update_memory: "update_memory";
|
|
87
|
+
web_search: "web_search";
|
|
85
88
|
write: "write";
|
|
86
89
|
write_todos: "write_todos";
|
|
87
90
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { mcpConnectionIdSchema } from "../ids.js";
|
|
3
|
-
import {
|
|
3
|
+
import { builtinToolNames, chatFunctionNameSchema } from "./agent-tools.js";
|
|
4
4
|
export const approvalDecisionSchema = z.enum([
|
|
5
5
|
"full",
|
|
6
6
|
"deny",
|
|
@@ -11,10 +11,7 @@ export const toolReferenceSchema = z.discriminatedUnion("type", [
|
|
|
11
11
|
z
|
|
12
12
|
.object({
|
|
13
13
|
type: z.literal("builtin"),
|
|
14
|
-
name: z.enum(
|
|
15
|
-
...AGENT_TOOL_CATALOG.flatMap((group) => group.tools),
|
|
16
|
-
"activate_skill",
|
|
17
|
-
]),
|
|
14
|
+
name: z.enum(builtinToolNames),
|
|
18
15
|
})
|
|
19
16
|
.strict(),
|
|
20
17
|
z
|
|
@@ -1,29 +1,108 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
id:
|
|
8
|
-
name: string;
|
|
9
|
-
tools: readonly string[];
|
|
10
|
-
}
|
|
11
|
-
export declare const AGENT_TOOL_CATALOG: readonly [{
|
|
12
|
-
readonly id: "workspace";
|
|
2
|
+
/**
|
|
3
|
+
* Agent tools are toggled one by one. A category only groups tools for
|
|
4
|
+
* display; it never enables anything on its own.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AGENT_TOOL_CATEGORIES: readonly [{
|
|
7
|
+
readonly id: "files";
|
|
13
8
|
readonly name: "File operations";
|
|
14
9
|
readonly description: "Read, write, edit, search, and run shell commands in the attached Workspace.";
|
|
15
|
-
readonly tools: readonly ["read", "write", "edit", "grep", "glob", "bash", "publish_artifacts"];
|
|
16
10
|
}, {
|
|
17
|
-
readonly id: "
|
|
11
|
+
readonly id: "planning";
|
|
18
12
|
readonly name: "Task planning";
|
|
19
13
|
readonly description: "Create and manage a structured todo list to plan and track multi-step work.";
|
|
20
|
-
readonly tools: readonly ["write_todos"];
|
|
21
14
|
}, {
|
|
22
15
|
readonly id: "memory";
|
|
23
16
|
readonly name: "Memory";
|
|
24
17
|
readonly description: "Save, recall, search, update, and delete durable notes owned by this Agent.";
|
|
25
|
-
|
|
18
|
+
}, {
|
|
19
|
+
readonly id: "web";
|
|
20
|
+
readonly name: "Web";
|
|
21
|
+
readonly description: "Search the public web for current information.";
|
|
22
|
+
}];
|
|
23
|
+
export type AgentToolCategoryId = (typeof AGENT_TOOL_CATEGORIES)[number]["id"];
|
|
24
|
+
export interface AgentToolDefinition {
|
|
25
|
+
category: AgentToolCategoryId;
|
|
26
|
+
description: string;
|
|
27
|
+
name: string;
|
|
28
|
+
/** The tool runs in the Agent's attached Workspace. */
|
|
29
|
+
requiresWorkspace: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const AGENT_TOOLS: readonly [{
|
|
32
|
+
readonly name: "read";
|
|
33
|
+
readonly category: "files";
|
|
34
|
+
readonly requiresWorkspace: true;
|
|
35
|
+
readonly description: "Read a file from the Workspace.";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "write";
|
|
38
|
+
readonly category: "files";
|
|
39
|
+
readonly requiresWorkspace: true;
|
|
40
|
+
readonly description: "Create or overwrite a file in the Workspace.";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "edit";
|
|
43
|
+
readonly category: "files";
|
|
44
|
+
readonly requiresWorkspace: true;
|
|
45
|
+
readonly description: "Replace exact text in a Workspace file.";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "grep";
|
|
48
|
+
readonly category: "files";
|
|
49
|
+
readonly requiresWorkspace: true;
|
|
50
|
+
readonly description: "Search Workspace file contents with a regular expression.";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "glob";
|
|
53
|
+
readonly category: "files";
|
|
54
|
+
readonly requiresWorkspace: true;
|
|
55
|
+
readonly description: "Find Workspace files by path pattern.";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "bash";
|
|
58
|
+
readonly category: "files";
|
|
59
|
+
readonly requiresWorkspace: true;
|
|
60
|
+
readonly description: "Run shell commands in the Workspace.";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "publish_artifacts";
|
|
63
|
+
readonly category: "files";
|
|
64
|
+
readonly requiresWorkspace: true;
|
|
65
|
+
readonly description: "Publish Workspace files as downloadable Artifacts.";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "write_todos";
|
|
68
|
+
readonly category: "planning";
|
|
69
|
+
readonly requiresWorkspace: false;
|
|
70
|
+
readonly description: "Plan and track multi-step work with a todo list.";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "save_memory";
|
|
73
|
+
readonly category: "memory";
|
|
74
|
+
readonly requiresWorkspace: false;
|
|
75
|
+
readonly description: "Save a durable note.";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "get_memory";
|
|
78
|
+
readonly category: "memory";
|
|
79
|
+
readonly requiresWorkspace: false;
|
|
80
|
+
readonly description: "Read one saved note.";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "search_memories";
|
|
83
|
+
readonly category: "memory";
|
|
84
|
+
readonly requiresWorkspace: false;
|
|
85
|
+
readonly description: "Search saved notes.";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "update_memory";
|
|
88
|
+
readonly category: "memory";
|
|
89
|
+
readonly requiresWorkspace: false;
|
|
90
|
+
readonly description: "Update a saved note.";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "delete_memory";
|
|
93
|
+
readonly category: "memory";
|
|
94
|
+
readonly requiresWorkspace: false;
|
|
95
|
+
readonly description: "Delete a saved note.";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "web_search";
|
|
98
|
+
readonly category: "web";
|
|
99
|
+
readonly requiresWorkspace: false;
|
|
100
|
+
readonly description: "Search the public web for current results. Each search consumes Usage credit.";
|
|
26
101
|
}];
|
|
102
|
+
export type AgentToolName = (typeof AGENT_TOOLS)[number]["name"];
|
|
103
|
+
export declare const agentToolNames: readonly AgentToolName[];
|
|
104
|
+
/** Built-in tool names an approval policy can reference. */
|
|
105
|
+
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"];
|
|
27
106
|
/**
|
|
28
107
|
* A model-facing tool name. Built-in tool names and the `mcp__` prefix used
|
|
29
108
|
* for MCP tools are reserved so a caller function never shadows them.
|
|
@@ -1,48 +1,120 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
];
|
|
8
|
-
export const AGENT_TOOL_CATALOG = [
|
|
2
|
+
/**
|
|
3
|
+
* Agent tools are toggled one by one. A category only groups tools for
|
|
4
|
+
* display; it never enables anything on its own.
|
|
5
|
+
*/
|
|
6
|
+
export const AGENT_TOOL_CATEGORIES = [
|
|
9
7
|
{
|
|
10
|
-
id: "
|
|
8
|
+
id: "files",
|
|
11
9
|
name: "File operations",
|
|
12
10
|
description: "Read, write, edit, search, and run shell commands in the attached Workspace.",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"edit",
|
|
17
|
-
"grep",
|
|
18
|
-
"glob",
|
|
19
|
-
"bash",
|
|
20
|
-
"publish_artifacts",
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "write_todos",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "planning",
|
|
25
14
|
name: "Task planning",
|
|
26
15
|
description: "Create and manage a structured todo list to plan and track multi-step work.",
|
|
27
|
-
tools: ["write_todos"],
|
|
28
16
|
},
|
|
29
17
|
{
|
|
30
18
|
id: "memory",
|
|
31
19
|
name: "Memory",
|
|
32
20
|
description: "Save, recall, search, update, and delete durable notes owned by this Agent.",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "web",
|
|
24
|
+
name: "Web",
|
|
25
|
+
description: "Search the public web for current information.",
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export const AGENT_TOOLS = [
|
|
29
|
+
{
|
|
30
|
+
name: "read",
|
|
31
|
+
category: "files",
|
|
32
|
+
requiresWorkspace: true,
|
|
33
|
+
description: "Read a file from the Workspace.",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "write",
|
|
37
|
+
category: "files",
|
|
38
|
+
requiresWorkspace: true,
|
|
39
|
+
description: "Create or overwrite a file in the Workspace.",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "edit",
|
|
43
|
+
category: "files",
|
|
44
|
+
requiresWorkspace: true,
|
|
45
|
+
description: "Replace exact text in a Workspace file.",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "grep",
|
|
49
|
+
category: "files",
|
|
50
|
+
requiresWorkspace: true,
|
|
51
|
+
description: "Search Workspace file contents with a regular expression.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "glob",
|
|
55
|
+
category: "files",
|
|
56
|
+
requiresWorkspace: true,
|
|
57
|
+
description: "Find Workspace files by path pattern.",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "bash",
|
|
61
|
+
category: "files",
|
|
62
|
+
requiresWorkspace: true,
|
|
63
|
+
description: "Run shell commands in the Workspace.",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "publish_artifacts",
|
|
67
|
+
category: "files",
|
|
68
|
+
requiresWorkspace: true,
|
|
69
|
+
description: "Publish Workspace files as downloadable Artifacts.",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "write_todos",
|
|
73
|
+
category: "planning",
|
|
74
|
+
requiresWorkspace: false,
|
|
75
|
+
description: "Plan and track multi-step work with a todo list.",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "save_memory",
|
|
79
|
+
category: "memory",
|
|
80
|
+
requiresWorkspace: false,
|
|
81
|
+
description: "Save a durable note.",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "get_memory",
|
|
85
|
+
category: "memory",
|
|
86
|
+
requiresWorkspace: false,
|
|
87
|
+
description: "Read one saved note.",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "search_memories",
|
|
91
|
+
category: "memory",
|
|
92
|
+
requiresWorkspace: false,
|
|
93
|
+
description: "Search saved notes.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "update_memory",
|
|
97
|
+
category: "memory",
|
|
98
|
+
requiresWorkspace: false,
|
|
99
|
+
description: "Update a saved note.",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "delete_memory",
|
|
103
|
+
category: "memory",
|
|
104
|
+
requiresWorkspace: false,
|
|
105
|
+
description: "Delete a saved note.",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "web_search",
|
|
109
|
+
category: "web",
|
|
110
|
+
requiresWorkspace: false,
|
|
111
|
+
description: "Search the public web for current results. Each search consumes Usage credit.",
|
|
40
112
|
},
|
|
41
113
|
];
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
114
|
+
export const agentToolNames = AGENT_TOOLS.map((tool) => tool.name);
|
|
115
|
+
/** Built-in tool names an approval policy can reference. */
|
|
116
|
+
export const builtinToolNames = [...agentToolNames, "activate_skill"];
|
|
117
|
+
const RESERVED_CHAT_FUNCTION_NAMES = new Set(builtinToolNames);
|
|
46
118
|
/**
|
|
47
119
|
* A model-facing tool name. Built-in tool names and the `mcp__` prefix used
|
|
48
120
|
* for MCP tools are reserved so a caller function never shadows them.
|
|
@@ -3,8 +3,19 @@ export declare const agentInstructionsSchema: z.ZodString;
|
|
|
3
3
|
/** Provider-native model id, passed through without interpretation. */
|
|
4
4
|
export declare const agentModelIdSchema: z.ZodString;
|
|
5
5
|
export declare const agentToolsSchema: z.ZodArray<z.ZodEnum<{
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
bash: "bash";
|
|
7
|
+
delete_memory: "delete_memory";
|
|
8
|
+
edit: "edit";
|
|
9
|
+
get_memory: "get_memory";
|
|
10
|
+
glob: "glob";
|
|
11
|
+
grep: "grep";
|
|
12
|
+
publish_artifacts: "publish_artifacts";
|
|
13
|
+
read: "read";
|
|
14
|
+
save_memory: "save_memory";
|
|
15
|
+
search_memories: "search_memories";
|
|
16
|
+
update_memory: "update_memory";
|
|
17
|
+
web_search: "web_search";
|
|
18
|
+
write: "write";
|
|
8
19
|
write_todos: "write_todos";
|
|
9
20
|
}>>;
|
|
10
21
|
export declare const agentMcpConnectionIdsSchema: z.ZodArray<z.ZodString>;
|
|
@@ -36,6 +47,7 @@ export declare const agentResponseSchema: z.ZodObject<{
|
|
|
36
47
|
save_memory: "save_memory";
|
|
37
48
|
search_memories: "search_memories";
|
|
38
49
|
update_memory: "update_memory";
|
|
50
|
+
web_search: "web_search";
|
|
39
51
|
write: "write";
|
|
40
52
|
write_todos: "write_todos";
|
|
41
53
|
}>;
|
|
@@ -75,6 +87,7 @@ export declare const agentResponseSchema: z.ZodObject<{
|
|
|
75
87
|
save_memory: "save_memory";
|
|
76
88
|
search_memories: "search_memories";
|
|
77
89
|
update_memory: "update_memory";
|
|
90
|
+
web_search: "web_search";
|
|
78
91
|
write: "write";
|
|
79
92
|
write_todos: "write_todos";
|
|
80
93
|
}>;
|
|
@@ -102,8 +115,19 @@ export declare const agentResponseSchema: z.ZodObject<{
|
|
|
102
115
|
compactionReserveTokens: z.ZodNumber;
|
|
103
116
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
104
117
|
tools: z.ZodArray<z.ZodEnum<{
|
|
105
|
-
|
|
106
|
-
|
|
118
|
+
bash: "bash";
|
|
119
|
+
delete_memory: "delete_memory";
|
|
120
|
+
edit: "edit";
|
|
121
|
+
get_memory: "get_memory";
|
|
122
|
+
glob: "glob";
|
|
123
|
+
grep: "grep";
|
|
124
|
+
publish_artifacts: "publish_artifacts";
|
|
125
|
+
read: "read";
|
|
126
|
+
save_memory: "save_memory";
|
|
127
|
+
search_memories: "search_memories";
|
|
128
|
+
update_memory: "update_memory";
|
|
129
|
+
web_search: "web_search";
|
|
130
|
+
write: "write";
|
|
107
131
|
write_todos: "write_todos";
|
|
108
132
|
}>>;
|
|
109
133
|
instructions: z.ZodString;
|
|
@@ -143,6 +167,7 @@ export declare const agentsResponseSchema: z.ZodObject<{
|
|
|
143
167
|
save_memory: "save_memory";
|
|
144
168
|
search_memories: "search_memories";
|
|
145
169
|
update_memory: "update_memory";
|
|
170
|
+
web_search: "web_search";
|
|
146
171
|
write: "write";
|
|
147
172
|
write_todos: "write_todos";
|
|
148
173
|
}>;
|
|
@@ -182,6 +207,7 @@ export declare const agentsResponseSchema: z.ZodObject<{
|
|
|
182
207
|
save_memory: "save_memory";
|
|
183
208
|
search_memories: "search_memories";
|
|
184
209
|
update_memory: "update_memory";
|
|
210
|
+
web_search: "web_search";
|
|
185
211
|
write: "write";
|
|
186
212
|
write_todos: "write_todos";
|
|
187
213
|
}>;
|
|
@@ -209,8 +235,19 @@ export declare const agentsResponseSchema: z.ZodObject<{
|
|
|
209
235
|
compactionReserveTokens: z.ZodNumber;
|
|
210
236
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
211
237
|
tools: z.ZodArray<z.ZodEnum<{
|
|
212
|
-
|
|
213
|
-
|
|
238
|
+
bash: "bash";
|
|
239
|
+
delete_memory: "delete_memory";
|
|
240
|
+
edit: "edit";
|
|
241
|
+
get_memory: "get_memory";
|
|
242
|
+
glob: "glob";
|
|
243
|
+
grep: "grep";
|
|
244
|
+
publish_artifacts: "publish_artifacts";
|
|
245
|
+
read: "read";
|
|
246
|
+
save_memory: "save_memory";
|
|
247
|
+
search_memories: "search_memories";
|
|
248
|
+
update_memory: "update_memory";
|
|
249
|
+
web_search: "web_search";
|
|
250
|
+
write: "write";
|
|
214
251
|
write_todos: "write_todos";
|
|
215
252
|
}>>;
|
|
216
253
|
instructions: z.ZodString;
|
|
@@ -257,6 +294,7 @@ export declare const agentConfigSchema: z.ZodObject<{
|
|
|
257
294
|
save_memory: "save_memory";
|
|
258
295
|
search_memories: "search_memories";
|
|
259
296
|
update_memory: "update_memory";
|
|
297
|
+
web_search: "web_search";
|
|
260
298
|
write: "write";
|
|
261
299
|
write_todos: "write_todos";
|
|
262
300
|
}>;
|
|
@@ -296,6 +334,7 @@ export declare const agentConfigSchema: z.ZodObject<{
|
|
|
296
334
|
save_memory: "save_memory";
|
|
297
335
|
search_memories: "search_memories";
|
|
298
336
|
update_memory: "update_memory";
|
|
337
|
+
web_search: "web_search";
|
|
299
338
|
write: "write";
|
|
300
339
|
write_todos: "write_todos";
|
|
301
340
|
}>;
|
|
@@ -320,8 +359,19 @@ export declare const agentConfigSchema: z.ZodObject<{
|
|
|
320
359
|
compactionReserveTokens: z.ZodNumber;
|
|
321
360
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
322
361
|
tools: z.ZodArray<z.ZodEnum<{
|
|
323
|
-
|
|
324
|
-
|
|
362
|
+
bash: "bash";
|
|
363
|
+
delete_memory: "delete_memory";
|
|
364
|
+
edit: "edit";
|
|
365
|
+
get_memory: "get_memory";
|
|
366
|
+
glob: "glob";
|
|
367
|
+
grep: "grep";
|
|
368
|
+
publish_artifacts: "publish_artifacts";
|
|
369
|
+
read: "read";
|
|
370
|
+
save_memory: "save_memory";
|
|
371
|
+
search_memories: "search_memories";
|
|
372
|
+
update_memory: "update_memory";
|
|
373
|
+
web_search: "web_search";
|
|
374
|
+
write: "write";
|
|
325
375
|
write_todos: "write_todos";
|
|
326
376
|
}>>;
|
|
327
377
|
instructions: z.ZodString;
|
|
@@ -352,6 +402,7 @@ export declare const createAgentBodySchema: z.ZodObject<{
|
|
|
352
402
|
save_memory: "save_memory";
|
|
353
403
|
search_memories: "search_memories";
|
|
354
404
|
update_memory: "update_memory";
|
|
405
|
+
web_search: "web_search";
|
|
355
406
|
write: "write";
|
|
356
407
|
write_todos: "write_todos";
|
|
357
408
|
}>;
|
|
@@ -391,6 +442,7 @@ export declare const createAgentBodySchema: z.ZodObject<{
|
|
|
391
442
|
save_memory: "save_memory";
|
|
392
443
|
search_memories: "search_memories";
|
|
393
444
|
update_memory: "update_memory";
|
|
445
|
+
web_search: "web_search";
|
|
394
446
|
write: "write";
|
|
395
447
|
write_todos: "write_todos";
|
|
396
448
|
}>;
|
|
@@ -420,8 +472,19 @@ export declare const createAgentBodySchema: z.ZodObject<{
|
|
|
420
472
|
compactionReserveTokens: z.ZodDefault<z.ZodNumber>;
|
|
421
473
|
memoryInjectionEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
422
474
|
tools: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
423
|
-
|
|
424
|
-
|
|
475
|
+
bash: "bash";
|
|
476
|
+
delete_memory: "delete_memory";
|
|
477
|
+
edit: "edit";
|
|
478
|
+
get_memory: "get_memory";
|
|
479
|
+
glob: "glob";
|
|
480
|
+
grep: "grep";
|
|
481
|
+
publish_artifacts: "publish_artifacts";
|
|
482
|
+
read: "read";
|
|
483
|
+
save_memory: "save_memory";
|
|
484
|
+
search_memories: "search_memories";
|
|
485
|
+
update_memory: "update_memory";
|
|
486
|
+
web_search: "web_search";
|
|
487
|
+
write: "write";
|
|
425
488
|
write_todos: "write_todos";
|
|
426
489
|
}>>>;
|
|
427
490
|
instructions: z.ZodDefault<z.ZodString>;
|
|
@@ -453,6 +516,7 @@ export declare const updateAgentBodySchema: z.ZodObject<{
|
|
|
453
516
|
save_memory: "save_memory";
|
|
454
517
|
search_memories: "search_memories";
|
|
455
518
|
update_memory: "update_memory";
|
|
519
|
+
web_search: "web_search";
|
|
456
520
|
write: "write";
|
|
457
521
|
write_todos: "write_todos";
|
|
458
522
|
}>;
|
|
@@ -492,6 +556,7 @@ export declare const updateAgentBodySchema: z.ZodObject<{
|
|
|
492
556
|
save_memory: "save_memory";
|
|
493
557
|
search_memories: "search_memories";
|
|
494
558
|
update_memory: "update_memory";
|
|
559
|
+
web_search: "web_search";
|
|
495
560
|
write: "write";
|
|
496
561
|
write_todos: "write_todos";
|
|
497
562
|
}>;
|
|
@@ -517,8 +582,19 @@ export declare const updateAgentBodySchema: z.ZodObject<{
|
|
|
517
582
|
compactionReserveTokens: z.ZodOptional<z.ZodNumber>;
|
|
518
583
|
memoryInjectionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
519
584
|
tools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
520
|
-
|
|
521
|
-
|
|
585
|
+
bash: "bash";
|
|
586
|
+
delete_memory: "delete_memory";
|
|
587
|
+
edit: "edit";
|
|
588
|
+
get_memory: "get_memory";
|
|
589
|
+
glob: "glob";
|
|
590
|
+
grep: "grep";
|
|
591
|
+
publish_artifacts: "publish_artifacts";
|
|
592
|
+
read: "read";
|
|
593
|
+
save_memory: "save_memory";
|
|
594
|
+
search_memories: "search_memories";
|
|
595
|
+
update_memory: "update_memory";
|
|
596
|
+
web_search: "web_search";
|
|
597
|
+
write: "write";
|
|
522
598
|
write_todos: "write_todos";
|
|
523
599
|
}>>>;
|
|
524
600
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -4,7 +4,7 @@ import { agentIdSchema, mcpConnectionIdSchema, providerIdSchema, tenantIdSchema,
|
|
|
4
4
|
import { DEFAULT_AGENTS_LIST_LIMIT, MAX_AGENT_INSTRUCTIONS_LENGTH, MAX_AGENT_NAME_LENGTH, MAX_AGENTS_LIST_LIMIT, MAX_MCP_CONNECTIONS_PER_AGENT, } from "../limitations.js";
|
|
5
5
|
import { atLeastOneFieldMessage, hasObjectKeys, hasUniqueValues, } from "../utils.js";
|
|
6
6
|
import { approvalPolicySchema } from "./agent-approval.js";
|
|
7
|
-
import {
|
|
7
|
+
import { agentToolNames } from "./agent-tools.js";
|
|
8
8
|
import { metadataSchema, userIdSchema } from "./attribution.js";
|
|
9
9
|
import { workspaceTierSchema } from "./workspaces.js";
|
|
10
10
|
const approvalFields = {
|
|
@@ -24,9 +24,9 @@ export const agentInstructionsSchema = z
|
|
|
24
24
|
/** Provider-native model id, passed through without interpretation. */
|
|
25
25
|
export const agentModelIdSchema = z.string().trim().min(1);
|
|
26
26
|
export const agentToolsSchema = z
|
|
27
|
-
.array(z.enum(
|
|
27
|
+
.array(z.enum(agentToolNames))
|
|
28
28
|
.refine(hasUniqueValues, {
|
|
29
|
-
message: "Tool
|
|
29
|
+
message: "Tool names must be unique.",
|
|
30
30
|
});
|
|
31
31
|
export const agentMcpConnectionIdsSchema = z
|
|
32
32
|
.array(mcpConnectionIdSchema)
|
|
@@ -60,6 +60,7 @@ export declare const sessionResponseSchema: z.ZodObject<{
|
|
|
60
60
|
save_memory: "save_memory";
|
|
61
61
|
search_memories: "search_memories";
|
|
62
62
|
update_memory: "update_memory";
|
|
63
|
+
web_search: "web_search";
|
|
63
64
|
write: "write";
|
|
64
65
|
write_todos: "write_todos";
|
|
65
66
|
}>;
|
|
@@ -99,6 +100,7 @@ export declare const sessionResponseSchema: z.ZodObject<{
|
|
|
99
100
|
save_memory: "save_memory";
|
|
100
101
|
search_memories: "search_memories";
|
|
101
102
|
update_memory: "update_memory";
|
|
103
|
+
web_search: "web_search";
|
|
102
104
|
write: "write";
|
|
103
105
|
write_todos: "write_todos";
|
|
104
106
|
}>;
|
|
@@ -123,8 +125,19 @@ export declare const sessionResponseSchema: z.ZodObject<{
|
|
|
123
125
|
compactionReserveTokens: z.ZodNumber;
|
|
124
126
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
125
127
|
tools: z.ZodArray<z.ZodEnum<{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
bash: "bash";
|
|
129
|
+
delete_memory: "delete_memory";
|
|
130
|
+
edit: "edit";
|
|
131
|
+
get_memory: "get_memory";
|
|
132
|
+
glob: "glob";
|
|
133
|
+
grep: "grep";
|
|
134
|
+
publish_artifacts: "publish_artifacts";
|
|
135
|
+
read: "read";
|
|
136
|
+
save_memory: "save_memory";
|
|
137
|
+
search_memories: "search_memories";
|
|
138
|
+
update_memory: "update_memory";
|
|
139
|
+
web_search: "web_search";
|
|
140
|
+
write: "write";
|
|
128
141
|
write_todos: "write_todos";
|
|
129
142
|
}>>;
|
|
130
143
|
instructions: z.ZodString;
|
|
@@ -249,6 +262,7 @@ export declare const toolApprovalStateSchema: z.ZodObject<{
|
|
|
249
262
|
save_memory: "save_memory";
|
|
250
263
|
search_memories: "search_memories";
|
|
251
264
|
update_memory: "update_memory";
|
|
265
|
+
web_search: "web_search";
|
|
252
266
|
write: "write";
|
|
253
267
|
write_todos: "write_todos";
|
|
254
268
|
}>;
|
|
@@ -300,6 +314,7 @@ export declare const toolApprovalsResponseSchema: z.ZodObject<{
|
|
|
300
314
|
save_memory: "save_memory";
|
|
301
315
|
search_memories: "search_memories";
|
|
302
316
|
update_memory: "update_memory";
|
|
317
|
+
web_search: "web_search";
|
|
303
318
|
write: "write";
|
|
304
319
|
write_todos: "write_todos";
|
|
305
320
|
}>;
|
|
@@ -290,6 +290,7 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
290
290
|
save_memory: "save_memory";
|
|
291
291
|
search_memories: "search_memories";
|
|
292
292
|
update_memory: "update_memory";
|
|
293
|
+
web_search: "web_search";
|
|
293
294
|
write: "write";
|
|
294
295
|
write_todos: "write_todos";
|
|
295
296
|
}>;
|
|
@@ -329,6 +330,7 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
329
330
|
save_memory: "save_memory";
|
|
330
331
|
search_memories: "search_memories";
|
|
331
332
|
update_memory: "update_memory";
|
|
333
|
+
web_search: "web_search";
|
|
332
334
|
write: "write";
|
|
333
335
|
write_todos: "write_todos";
|
|
334
336
|
}>;
|
|
@@ -353,8 +355,19 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
353
355
|
compactionReserveTokens: z.ZodNumber;
|
|
354
356
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
355
357
|
tools: z.ZodArray<z.ZodEnum<{
|
|
356
|
-
|
|
357
|
-
|
|
358
|
+
bash: "bash";
|
|
359
|
+
delete_memory: "delete_memory";
|
|
360
|
+
edit: "edit";
|
|
361
|
+
get_memory: "get_memory";
|
|
362
|
+
glob: "glob";
|
|
363
|
+
grep: "grep";
|
|
364
|
+
publish_artifacts: "publish_artifacts";
|
|
365
|
+
read: "read";
|
|
366
|
+
save_memory: "save_memory";
|
|
367
|
+
search_memories: "search_memories";
|
|
368
|
+
update_memory: "update_memory";
|
|
369
|
+
web_search: "web_search";
|
|
370
|
+
write: "write";
|
|
358
371
|
write_todos: "write_todos";
|
|
359
372
|
}>>;
|
|
360
373
|
instructions: z.ZodString;
|
|
@@ -411,6 +424,7 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
411
424
|
save_memory: "save_memory";
|
|
412
425
|
search_memories: "search_memories";
|
|
413
426
|
update_memory: "update_memory";
|
|
427
|
+
web_search: "web_search";
|
|
414
428
|
write: "write";
|
|
415
429
|
write_todos: "write_todos";
|
|
416
430
|
}>;
|
|
@@ -450,6 +464,7 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
450
464
|
save_memory: "save_memory";
|
|
451
465
|
search_memories: "search_memories";
|
|
452
466
|
update_memory: "update_memory";
|
|
467
|
+
web_search: "web_search";
|
|
453
468
|
write: "write";
|
|
454
469
|
write_todos: "write_todos";
|
|
455
470
|
}>;
|
|
@@ -474,8 +489,19 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
474
489
|
compactionReserveTokens: z.ZodNumber;
|
|
475
490
|
memoryInjectionEnabled: z.ZodBoolean;
|
|
476
491
|
tools: z.ZodArray<z.ZodEnum<{
|
|
477
|
-
|
|
478
|
-
|
|
492
|
+
bash: "bash";
|
|
493
|
+
delete_memory: "delete_memory";
|
|
494
|
+
edit: "edit";
|
|
495
|
+
get_memory: "get_memory";
|
|
496
|
+
glob: "glob";
|
|
497
|
+
grep: "grep";
|
|
498
|
+
publish_artifacts: "publish_artifacts";
|
|
499
|
+
read: "read";
|
|
500
|
+
save_memory: "save_memory";
|
|
501
|
+
search_memories: "search_memories";
|
|
502
|
+
update_memory: "update_memory";
|
|
503
|
+
web_search: "web_search";
|
|
504
|
+
write: "write";
|
|
479
505
|
write_todos: "write_todos";
|
|
480
506
|
}>>;
|
|
481
507
|
instructions: z.ZodString;
|
|
@@ -2,7 +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 {
|
|
5
|
+
export type { AgentToolCategoryId, AgentToolDefinition, AgentToolName, } from "./entities/agent-tools.ts";
|
|
6
|
+
export { AGENT_TOOL_CATEGORIES, AGENT_TOOLS, agentToolNames, chatFunctionNameSchema, } from "./entities/agent-tools.ts";
|
|
6
7
|
export { agentConfigSchema, agentResponseSchema, agentStatusSchema, agentsListQuerySchema, agentsResponseSchema, createAgentBodySchema, updateAgentBodySchema, } from "./entities/agents.ts";
|
|
7
8
|
export { artifactDownloadUrlResponseSchema, artifactListItemSchema, artifactsListResponseSchema, } from "./entities/artifacts.ts";
|
|
8
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 { chatFunctionNameSchema } from "./entities/agent-tools.js";
|
|
5
|
+
export { AGENT_TOOL_CATEGORIES, 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,6 +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 { AGENT_TOOL_CATEGORIES, AGENT_TOOLS, type AgentToolCategoryId, type AgentToolDefinition, type AgentToolName, } from "./contracts/entities/agent-tools.ts";
|
|
10
11
|
export type { Agent, AgentConfig, AgentResponse, AgentsListQuery, AgentsResponse, CreateAgentBody, UpdateAgentBody, } from "./contracts/entities/agents.ts";
|
|
11
12
|
export { agentConfigSchema } from "./contracts/entities/agents.ts";
|
|
12
13
|
export type { ArtifactDownloadUrlResponse, ArtifactListItem, ArtifactsListResponse, } from "./contracts/entities/artifacts.ts";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +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 { AGENT_TOOL_CATEGORIES, AGENT_TOOLS, } from "./contracts/entities/agent-tools.js";
|
|
9
10
|
export { agentConfigSchema } from "./contracts/entities/agents.js";
|
|
10
11
|
export { sessionResponseSchema } from "./contracts/entities/sessions.js";
|
|
11
12
|
export { nextSpendingLimitReset } from "./contracts/entities/spending-limits.js";
|