@dexto/tools-builtins 1.6.0 → 1.6.2
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/implementations/ask-user-tool.cjs +40 -9
- package/dist/implementations/ask-user-tool.d.ts +5 -5
- package/dist/implementations/ask-user-tool.d.ts.map +1 -1
- package/dist/implementations/ask-user-tool.js +41 -10
- package/dist/implementations/delegate-to-url-tool.cjs +6 -1
- package/dist/implementations/delegate-to-url-tool.d.ts.map +1 -1
- package/dist/implementations/delegate-to-url-tool.js +14 -2
- package/dist/implementations/delegate-to-url-tool.test.cjs +1 -0
- package/dist/implementations/delegate-to-url-tool.test.js +1 -0
- package/dist/implementations/exa-code-search-tool.cjs +6 -1
- package/dist/implementations/exa-code-search-tool.d.ts.map +1 -1
- package/dist/implementations/exa-code-search-tool.js +7 -2
- package/dist/implementations/exa-tools.test.cjs +1 -0
- package/dist/implementations/exa-tools.test.js +1 -0
- package/dist/implementations/exa-web-search-tool.cjs +6 -1
- package/dist/implementations/exa-web-search-tool.d.ts.map +1 -1
- package/dist/implementations/exa-web-search-tool.js +7 -2
- package/dist/implementations/get-resource-tool.cjs +9 -1
- package/dist/implementations/get-resource-tool.d.ts.map +1 -1
- package/dist/implementations/get-resource-tool.js +10 -2
- package/dist/implementations/http-request-tool.cjs +90 -40
- package/dist/implementations/http-request-tool.d.ts +5 -0
- package/dist/implementations/http-request-tool.d.ts.map +1 -1
- package/dist/implementations/http-request-tool.js +96 -40
- package/dist/implementations/http-request-tool.test.cjs +50 -0
- package/dist/implementations/http-request-tool.test.d.ts +2 -0
- package/dist/implementations/http-request-tool.test.d.ts.map +1 -0
- package/dist/implementations/http-request-tool.test.js +49 -0
- package/dist/implementations/invoke-skill-tool.cjs +45 -1
- package/dist/implementations/invoke-skill-tool.d.ts.map +1 -1
- package/dist/implementations/invoke-skill-tool.js +46 -2
- package/dist/implementations/list-resources-tool.cjs +12 -1
- package/dist/implementations/list-resources-tool.d.ts.map +1 -1
- package/dist/implementations/list-resources-tool.js +13 -2
- package/dist/implementations/sleep-tool.cjs +6 -1
- package/dist/implementations/sleep-tool.d.ts.map +1 -1
- package/dist/implementations/sleep-tool.js +7 -2
- package/dist/index.d.cts +19 -3
- package/package.json +4 -4
- package/dist/builtin-tools-factory.d.cts +0 -19
- package/dist/builtin-tools-factory.test.d.cts +0 -2
- package/dist/implementations/ask-user-tool.d.cts +0 -46
- package/dist/implementations/delegate-to-url-tool.d.cts +0 -27
- package/dist/implementations/delegate-to-url-tool.test.d.cts +0 -2
- package/dist/implementations/exa-code-search-tool.d.cts +0 -21
- package/dist/implementations/exa-mcp.d.cts +0 -24
- package/dist/implementations/exa-tools.test.d.cts +0 -2
- package/dist/implementations/exa-web-search-tool.d.cts +0 -30
- package/dist/implementations/get-resource-tool.d.cts +0 -22
- package/dist/implementations/http-request-tool.d.cts +0 -31
- package/dist/implementations/invoke-skill-tool.d.cts +0 -26
- package/dist/implementations/list-resources-tool.d.cts +0 -26
- package/dist/implementations/sleep-tool.d.cts +0 -16
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const AskUserInputSchema: z.ZodObject<{
|
|
5
|
-
question: z.ZodString;
|
|
6
|
-
schema: z.ZodObject<{
|
|
7
|
-
type: z.ZodLiteral<"object">;
|
|
8
|
-
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
11
|
-
type: z.ZodLiteral<"object">;
|
|
12
|
-
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
13
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
15
|
-
type: z.ZodLiteral<"object">;
|
|
16
|
-
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
17
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
19
|
-
}, "strict", z.ZodTypeAny, {
|
|
20
|
-
question: string;
|
|
21
|
-
schema: {
|
|
22
|
-
type: "object";
|
|
23
|
-
properties: Record<string, unknown>;
|
|
24
|
-
required?: string[] | undefined;
|
|
25
|
-
} & {
|
|
26
|
-
[k: string]: unknown;
|
|
27
|
-
};
|
|
28
|
-
}, {
|
|
29
|
-
question: string;
|
|
30
|
-
schema: {
|
|
31
|
-
type: "object";
|
|
32
|
-
properties: Record<string, unknown>;
|
|
33
|
-
required?: string[] | undefined;
|
|
34
|
-
} & {
|
|
35
|
-
[k: string]: unknown;
|
|
36
|
-
};
|
|
37
|
-
}>;
|
|
38
|
-
/**
|
|
39
|
-
* Create the `ask_user` tool.
|
|
40
|
-
*
|
|
41
|
-
* Uses the approval/elicitation channel to collect structured user input via a JSON Schema form.
|
|
42
|
-
* Requires `ToolExecutionContext.services.approval`.
|
|
43
|
-
*/
|
|
44
|
-
declare function createAskUserTool(): Tool<typeof AskUserInputSchema>;
|
|
45
|
-
|
|
46
|
-
export { createAskUserTool };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const DelegateToUrlInputSchema: z.ZodObject<{
|
|
5
|
-
url: z.ZodString;
|
|
6
|
-
message: z.ZodString;
|
|
7
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
-
}, "strict", z.ZodTypeAny, {
|
|
10
|
-
timeout: number;
|
|
11
|
-
message: string;
|
|
12
|
-
url: string;
|
|
13
|
-
sessionId?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
message: string;
|
|
16
|
-
url: string;
|
|
17
|
-
timeout?: number | undefined;
|
|
18
|
-
sessionId?: string | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Create the `delegate_to_url` tool.
|
|
22
|
-
*
|
|
23
|
-
* Delegates a message/task to another A2A-compliant agent URL via JSON-RPC and returns its response.
|
|
24
|
-
*/
|
|
25
|
-
declare function createDelegateToUrlTool(): Tool<typeof DelegateToUrlInputSchema>;
|
|
26
|
-
|
|
27
|
-
export { createDelegateToUrlTool };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const CodeSearchInputSchema: z.ZodObject<{
|
|
5
|
-
query: z.ZodString;
|
|
6
|
-
tokensNum: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
|
-
}, "strict", z.ZodTypeAny, {
|
|
8
|
-
query: string;
|
|
9
|
-
tokensNum: number;
|
|
10
|
-
}, {
|
|
11
|
-
query: string;
|
|
12
|
-
tokensNum?: number | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* Create the `code_search` tool.
|
|
16
|
-
*
|
|
17
|
-
* Finds relevant code snippets and documentation by calling Exa's MCP endpoint via the MCP SDK.
|
|
18
|
-
*/
|
|
19
|
-
declare function createCodeSearchTool(): Tool<typeof CodeSearchInputSchema>;
|
|
20
|
-
|
|
21
|
-
export { createCodeSearchTool };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@dexto/core';
|
|
2
|
-
|
|
3
|
-
type ExaToolName = 'web_search_exa' | 'get_code_context_exa';
|
|
4
|
-
/**
|
|
5
|
-
* Exa search tools are implemented as internal tools (not exposed as `mcp--...` tools).
|
|
6
|
-
*
|
|
7
|
-
* Why:
|
|
8
|
-
* - We want stable tool IDs and consistent display/approval UX.
|
|
9
|
-
* - We intentionally do NOT register Exa as an MCP server in the agent-wide MCPManager, because that would:
|
|
10
|
-
* - expose extra Exa MCP tools (e.g. company research) that we don't want in the tool surface
|
|
11
|
-
* - allow the model to bypass curated wrappers by calling `mcp--...` tools directly
|
|
12
|
-
*
|
|
13
|
-
* Implementation detail:
|
|
14
|
-
* - We still use the MCP SDK via Dexto's MCP client wrapper (no bespoke fetch/SSE parsing).
|
|
15
|
-
*/
|
|
16
|
-
declare function callExaTool(options: {
|
|
17
|
-
logger: Logger;
|
|
18
|
-
toolId: string;
|
|
19
|
-
toolName: ExaToolName;
|
|
20
|
-
args: Record<string, unknown>;
|
|
21
|
-
timeoutMs: number;
|
|
22
|
-
}): Promise<string>;
|
|
23
|
-
|
|
24
|
-
export { callExaTool };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const WebSearchInputSchema: z.ZodObject<{
|
|
5
|
-
query: z.ZodString;
|
|
6
|
-
numResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
|
-
livecrawl: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fallback", "preferred"]>>>;
|
|
8
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["auto", "fast"]>>>;
|
|
9
|
-
contextMaxCharacters: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
}, "strict", z.ZodTypeAny, {
|
|
11
|
-
type: "auto" | "fast";
|
|
12
|
-
query: string;
|
|
13
|
-
numResults: number;
|
|
14
|
-
livecrawl: "fallback" | "preferred";
|
|
15
|
-
contextMaxCharacters: number;
|
|
16
|
-
}, {
|
|
17
|
-
query: string;
|
|
18
|
-
type?: "auto" | "fast" | undefined;
|
|
19
|
-
numResults?: number | undefined;
|
|
20
|
-
livecrawl?: "fallback" | "preferred" | undefined;
|
|
21
|
-
contextMaxCharacters?: number | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* Create the `web_search` tool.
|
|
25
|
-
*
|
|
26
|
-
* Performs a web search by calling Exa's MCP endpoint via the MCP SDK.
|
|
27
|
-
*/
|
|
28
|
-
declare function createWebSearchTool(): Tool<typeof WebSearchInputSchema>;
|
|
29
|
-
|
|
30
|
-
export { createWebSearchTool };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const GetResourceInputSchema: z.ZodObject<{
|
|
5
|
-
reference: z.ZodString;
|
|
6
|
-
format: z.ZodDefault<z.ZodEnum<["url", "metadata"]>>;
|
|
7
|
-
}, "strict", z.ZodTypeAny, {
|
|
8
|
-
reference: string;
|
|
9
|
-
format: "url" | "metadata";
|
|
10
|
-
}, {
|
|
11
|
-
reference: string;
|
|
12
|
-
format?: "url" | "metadata" | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
* Create the `get_resource` tool.
|
|
16
|
-
*
|
|
17
|
-
* Retrieves resource metadata or a shareable URL for a stored blob resource.
|
|
18
|
-
* Requires `ToolExecutionContext.services.resources`.
|
|
19
|
-
*/
|
|
20
|
-
declare function createGetResourceTool(): Tool<typeof GetResourceInputSchema>;
|
|
21
|
-
|
|
22
|
-
export { createGetResourceTool };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const HttpRequestInputSchema: z.ZodObject<{
|
|
5
|
-
url: z.ZodString;
|
|
6
|
-
method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>>;
|
|
7
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
8
|
-
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
-
body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>>;
|
|
10
|
-
timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
-
}, "strict", z.ZodTypeAny, {
|
|
12
|
-
url: string;
|
|
13
|
-
method: "POST" | "GET" | "PUT" | "PATCH" | "DELETE";
|
|
14
|
-
timeoutMs: number;
|
|
15
|
-
headers?: Record<string, string> | undefined;
|
|
16
|
-
query?: Record<string, string> | undefined;
|
|
17
|
-
body?: string | unknown[] | Record<string, unknown> | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
url: string;
|
|
20
|
-
method?: "POST" | "GET" | "PUT" | "PATCH" | "DELETE" | undefined;
|
|
21
|
-
headers?: Record<string, string> | undefined;
|
|
22
|
-
query?: Record<string, string> | undefined;
|
|
23
|
-
body?: string | unknown[] | Record<string, unknown> | undefined;
|
|
24
|
-
timeoutMs?: number | undefined;
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Internal tool for basic HTTP requests.
|
|
28
|
-
*/
|
|
29
|
-
declare function createHttpRequestTool(): Tool<typeof HttpRequestInputSchema>;
|
|
30
|
-
|
|
31
|
-
export { createHttpRequestTool };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const InvokeSkillInputSchema: z.ZodObject<{
|
|
5
|
-
skill: z.ZodString;
|
|
6
|
-
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7
|
-
taskContext: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, "strict", z.ZodTypeAny, {
|
|
9
|
-
skill: string;
|
|
10
|
-
args?: Record<string, string> | undefined;
|
|
11
|
-
taskContext?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
skill: string;
|
|
14
|
-
args?: Record<string, string> | undefined;
|
|
15
|
-
taskContext?: string | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Create the `invoke_skill` tool.
|
|
19
|
-
*
|
|
20
|
-
* Loads an auto-invocable prompt (“skill”) via the PromptManager and returns its content, or
|
|
21
|
-
* forks the skill into a sub-agent when the skill is marked as `context: fork`.
|
|
22
|
-
* Requires `ToolExecutionContext.services.prompts` and, for forked skills, `services.taskForker`.
|
|
23
|
-
*/
|
|
24
|
-
declare function createInvokeSkillTool(): Tool<typeof InvokeSkillInputSchema>;
|
|
25
|
-
|
|
26
|
-
export { createInvokeSkillTool };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const ListResourcesInputSchema: z.ZodObject<{
|
|
5
|
-
source: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "tool", "user"]>>>;
|
|
6
|
-
kind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "image", "audio", "video", "binary"]>>>;
|
|
7
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
-
}, "strict", z.ZodTypeAny, {
|
|
9
|
-
kind: "all" | "image" | "audio" | "video" | "binary";
|
|
10
|
-
source: "all" | "user" | "tool";
|
|
11
|
-
limit: number;
|
|
12
|
-
}, {
|
|
13
|
-
kind?: "all" | "image" | "audio" | "video" | "binary" | undefined;
|
|
14
|
-
source?: "all" | "user" | "tool" | undefined;
|
|
15
|
-
limit?: number | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Create the `list_resources` tool.
|
|
19
|
-
*
|
|
20
|
-
* Lists stored resources (backed by the configured BlobStore) and returns references
|
|
21
|
-
* that can be passed to `get_resource`.
|
|
22
|
-
* Requires `ToolExecutionContext.services.resources`.
|
|
23
|
-
*/
|
|
24
|
-
declare function createListResourcesTool(): Tool<typeof ListResourcesInputSchema>;
|
|
25
|
-
|
|
26
|
-
export { createListResourcesTool };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Tool } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
declare const SleepInputSchema: z.ZodObject<{
|
|
5
|
-
ms: z.ZodNumber;
|
|
6
|
-
}, "strict", z.ZodTypeAny, {
|
|
7
|
-
ms: number;
|
|
8
|
-
}, {
|
|
9
|
-
ms: number;
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* Internal tool for sleeping/delaying execution.
|
|
13
|
-
*/
|
|
14
|
-
declare function createSleepTool(): Tool<typeof SleepInputSchema>;
|
|
15
|
-
|
|
16
|
-
export { createSleepTool };
|