@agentionai/agents 0.12.0 → 0.14.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.
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webSearchTool = webSearchTool;
4
+ exports.bashTool = bashTool;
5
+ exports.textEditorTool = textEditorTool;
6
+ exports.builtInTool = builtInTool;
7
+ /**
8
+ * Anthropic's server-side web search tool.
9
+ * Claude decides when to search and the results are fetched and processed by Anthropic.
10
+ */
11
+ function webSearchTool(options = {}) {
12
+ const tool = {
13
+ type: "web_search_20250305",
14
+ name: "web_search",
15
+ };
16
+ if (options.maxUses !== undefined)
17
+ tool.max_uses = options.maxUses;
18
+ if (options.allowedDomains)
19
+ tool.allowed_domains = options.allowedDomains;
20
+ if (options.blockedDomains)
21
+ tool.blocked_domains = options.blockedDomains;
22
+ if (options.userLocation) {
23
+ tool.user_location = { type: "approximate", ...options.userLocation };
24
+ }
25
+ return tool;
26
+ }
27
+ /**
28
+ * Anthropic's server-side bash tool — gives Claude a persistent shell session.
29
+ * Requires a compatible model (e.g. Claude 4 / 3.7 Sonnet) and beta header support.
30
+ */
31
+ function bashTool() {
32
+ return { type: "bash_20250124", name: "bash" };
33
+ }
34
+ /**
35
+ * Anthropic's server-side text editor tool — lets Claude view and edit text files.
36
+ */
37
+ function textEditorTool(version = "20250728") {
38
+ const names = {
39
+ "20250124": "str_replace_editor",
40
+ "20250429": "str_replace_based_edit_tool",
41
+ "20250728": "str_replace_based_edit_tool",
42
+ };
43
+ return { type: `text_editor_${version}`, name: names[version] };
44
+ }
45
+ /**
46
+ * Define an arbitrary provider-defined / built-in tool by its raw definition.
47
+ * Use this to pass through tools not covered by the helpers above (or for
48
+ * other providers that support server-side tools).
49
+ */
50
+ function builtInTool(definition) {
51
+ return definition;
52
+ }
53
+ //# sourceMappingURL=BuiltInTool.js.map
@@ -2,7 +2,7 @@
2
2
  * Visualization event types and interfaces for agent monitoring.
3
3
  * These types define the contract between agention-lib and @agention/viz.
4
4
  */
5
- export type VizVendor = "anthropic" | "openai" | "mistral" | "gemini" | "ollama";
5
+ export type VizVendor = "anthropic" | "openai" | "mistral" | "gemini" | "ollama" | "llamacpp";
6
6
  export type VizEventType = "session.start" | "session.end" | "pipeline.start" | "pipeline.end" | "executor.start" | "executor.end" | "agent.start" | "agent.complete" | "agent.error" | "tool.start" | "tool.complete" | "tool.error" | "message.user" | "message.assistant";
7
7
  export type VizExecutorType = "sequential" | "parallel" | "map" | "voting" | "router";
8
8
  export type VizStopReason = "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "error";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agentionai/agents",
3
3
  "author": "Laurent Zuijdwijk",
4
- "version": "0.12.0",
4
+ "version": "0.14.0",
5
5
  "description": "Agent Library",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -34,6 +34,10 @@
34
34
  "types": "./dist/ollama.d.ts",
35
35
  "default": "./dist/ollama.js"
36
36
  },
37
+ "./llamacpp": {
38
+ "types": "./dist/llamacpp.d.ts",
39
+ "default": "./dist/llamacpp.js"
40
+ },
37
41
  "./embeddings": {
38
42
  "types": "./dist/embeddings/index.d.ts",
39
43
  "default": "./dist/embeddings/index.js"