@dexto/tools-builtins 1.6.26 → 1.7.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.
Files changed (32) hide show
  1. package/dist/builtin-tools-factory.d.ts +12 -8
  2. package/dist/builtin-tools-factory.d.ts.map +1 -1
  3. package/dist/implementations/ask-user-tool.cjs +6 -1
  4. package/dist/implementations/ask-user-tool.d.ts +4 -30
  5. package/dist/implementations/ask-user-tool.d.ts.map +1 -1
  6. package/dist/implementations/ask-user-tool.js +6 -1
  7. package/dist/implementations/ask-user-tool.test.cjs +45 -0
  8. package/dist/implementations/ask-user-tool.test.d.ts +2 -0
  9. package/dist/implementations/ask-user-tool.test.d.ts.map +1 -0
  10. package/dist/implementations/ask-user-tool.test.js +44 -0
  11. package/dist/implementations/delegate-to-url-tool.d.ts +1 -11
  12. package/dist/implementations/delegate-to-url-tool.d.ts.map +1 -1
  13. package/dist/implementations/exa-code-search-tool.d.ts +1 -7
  14. package/dist/implementations/exa-code-search-tool.d.ts.map +1 -1
  15. package/dist/implementations/exa-web-search-tool.d.ts +9 -15
  16. package/dist/implementations/exa-web-search-tool.d.ts.map +1 -1
  17. package/dist/implementations/get-resource-tool.d.ts +5 -8
  18. package/dist/implementations/get-resource-tool.d.ts.map +1 -1
  19. package/dist/implementations/http-request-tool.cjs +3 -3
  20. package/dist/implementations/http-request-tool.d.ts +9 -17
  21. package/dist/implementations/http-request-tool.d.ts.map +1 -1
  22. package/dist/implementations/http-request-tool.js +3 -3
  23. package/dist/implementations/invoke-skill-tool.cjs +1 -1
  24. package/dist/implementations/invoke-skill-tool.d.ts +1 -9
  25. package/dist/implementations/invoke-skill-tool.d.ts.map +1 -1
  26. package/dist/implementations/invoke-skill-tool.js +1 -1
  27. package/dist/implementations/list-resources-tool.d.ts +13 -11
  28. package/dist/implementations/list-resources-tool.d.ts.map +1 -1
  29. package/dist/implementations/sleep-tool.d.ts +1 -5
  30. package/dist/implementations/sleep-tool.d.ts.map +1 -1
  31. package/dist/index.d.cts +12 -8
  32. package/package.json +4 -4
@@ -4,14 +4,18 @@ export declare const BUILTIN_TOOL_NAMES: readonly ["ask_user", "delegate_to_url"
4
4
  export type BuiltinToolName = (typeof BUILTIN_TOOL_NAMES)[number];
5
5
  export declare const BuiltinToolsConfigSchema: z.ZodObject<{
6
6
  type: z.ZodLiteral<"builtin-tools">;
7
- enabledTools: z.ZodOptional<z.ZodArray<z.ZodEnum<["ask_user", "delegate_to_url", "list_resources", "get_resource", "invoke_skill", "http_request", "sleep", "web_search", "code_search"]>, "many">>;
8
- }, "strict", z.ZodTypeAny, {
9
- type: "builtin-tools";
10
- enabledTools?: ("ask_user" | "delegate_to_url" | "get_resource" | "invoke_skill" | "list_resources" | "http_request" | "sleep" | "web_search" | "code_search")[] | undefined;
11
- }, {
12
- type: "builtin-tools";
13
- enabledTools?: ("ask_user" | "delegate_to_url" | "get_resource" | "invoke_skill" | "list_resources" | "http_request" | "sleep" | "web_search" | "code_search")[] | undefined;
14
- }>;
7
+ enabledTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
8
+ ask_user: "ask_user";
9
+ delegate_to_url: "delegate_to_url";
10
+ get_resource: "get_resource";
11
+ invoke_skill: "invoke_skill";
12
+ list_resources: "list_resources";
13
+ http_request: "http_request";
14
+ sleep: "sleep";
15
+ web_search: "web_search";
16
+ code_search: "code_search";
17
+ }>>>;
18
+ }, z.core.$strict>;
15
19
  export type BuiltinToolsConfig = z.output<typeof BuiltinToolsConfigSchema>;
16
20
  export declare const builtinToolsFactory: ToolFactory<BuiltinToolsConfig>;
17
21
  //# sourceMappingURL=builtin-tools-factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-tools-factory.d.ts","sourceRoot":"","sources":["../src/builtin-tools-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYvD,eAAO,MAAM,kBAAkB,kJAUrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAIlE,eAAO,MAAM,wBAAwB;;;;;;;;;EAKxB,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AA6B3E,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,kBAAkB,CAW/D,CAAC"}
1
+ {"version":3,"file":"builtin-tools-factory.d.ts","sourceRoot":"","sources":["../src/builtin-tools-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYvD,eAAO,MAAM,kBAAkB,kJAUrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAIlE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;kBAKxB,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AA6B3E,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,kBAAkB,CAW/D,CAAC"}
@@ -29,7 +29,12 @@ const AskUserInputSchema = import_zod.z.object({
29
29
  ),
30
30
  schema: import_zod.z.object({
31
31
  type: import_zod.z.literal("object"),
32
- properties: import_zod.z.record(import_zod.z.string(), import_zod.z.record(import_zod.z.unknown())),
32
+ // JSON Schema properties can be object schemas or boolean schemas.
33
+ // enrichSchemaTitles and parseElicitationSchema both skip non-object entries safely.
34
+ properties: import_zod.z.record(
35
+ import_zod.z.string(),
36
+ import_zod.z.union([import_zod.z.boolean(), import_zod.z.record(import_zod.z.string(), import_zod.z.unknown())])
37
+ ),
33
38
  required: import_zod.z.array(import_zod.z.string()).optional()
34
39
  }).passthrough().describe(
35
40
  [
@@ -4,36 +4,10 @@ declare const AskUserInputSchema: z.ZodObject<{
4
4
  question: z.ZodString;
5
5
  schema: z.ZodObject<{
6
6
  type: z.ZodLiteral<"object">;
7
- properties: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8
- required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
10
- type: z.ZodLiteral<"object">;
11
- properties: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12
- required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14
- type: z.ZodLiteral<"object">;
15
- properties: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
16
- required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
- }, z.ZodTypeAny, "passthrough">>;
18
- }, "strict", z.ZodTypeAny, {
19
- question: string;
20
- schema: {
21
- type: "object";
22
- properties: Record<string, Record<string, unknown>>;
23
- required?: string[] | undefined;
24
- } & {
25
- [k: string]: unknown;
26
- };
27
- }, {
28
- question: string;
29
- schema: {
30
- type: "object";
31
- properties: Record<string, Record<string, unknown>>;
32
- required?: string[] | undefined;
33
- } & {
34
- [k: string]: unknown;
35
- };
36
- }>;
7
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
8
+ required: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ }, z.core.$loose>;
10
+ }, z.core.$strict>;
37
11
  /**
38
12
  * Create the `ask_user` tool.
39
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ask-user-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/ask-user-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BX,CAAC;AAiCd;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAiCnE"}
1
+ {"version":3,"file":"ask-user-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/ask-user-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,kBAAkB;;;;;;;kBAiCX,CAAC;AAiCd;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAiCnE"}
@@ -6,7 +6,12 @@ const AskUserInputSchema = z.object({
6
6
  ),
7
7
  schema: z.object({
8
8
  type: z.literal("object"),
9
- properties: z.record(z.string(), z.record(z.unknown())),
9
+ // JSON Schema properties can be object schemas or boolean schemas.
10
+ // enrichSchemaTitles and parseElicitationSchema both skip non-object entries safely.
11
+ properties: z.record(
12
+ z.string(),
13
+ z.union([z.boolean(), z.record(z.string(), z.unknown())])
14
+ ),
10
15
  required: z.array(z.string()).optional()
11
16
  }).passthrough().describe(
12
17
  [
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var import_vitest = require("vitest");
3
+ var import_ask_user_tool = require("./ask-user-tool.js");
4
+ (0, import_vitest.describe)("createAskUserTool", () => {
5
+ (0, import_vitest.it)("accepts boolean property schemas and leaves them untouched during title enrichment", async () => {
6
+ const tool = (0, import_ask_user_tool.createAskUserTool)();
7
+ const getElicitationData = import_vitest.vi.fn().mockResolvedValue({ ok: true });
8
+ const context = {
9
+ services: {
10
+ approval: {
11
+ getElicitationData
12
+ }
13
+ }
14
+ };
15
+ const input = tool.inputSchema.parse({
16
+ question: "Collect profile settings",
17
+ schema: {
18
+ type: "object",
19
+ properties: {
20
+ name: {
21
+ type: "string"
22
+ },
23
+ ignored: true
24
+ },
25
+ required: ["name"]
26
+ }
27
+ });
28
+ await tool.execute(input, context);
29
+ (0, import_vitest.expect)(getElicitationData).toHaveBeenCalledWith({
30
+ prompt: "Collect profile settings",
31
+ schema: {
32
+ type: "object",
33
+ properties: {
34
+ name: {
35
+ type: "string",
36
+ title: "Name"
37
+ },
38
+ ignored: true
39
+ },
40
+ required: ["name"]
41
+ },
42
+ serverName: "Dexto Agent"
43
+ });
44
+ });
45
+ });
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ask-user-tool.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-user-tool.test.d.ts","sourceRoot":"","sources":["../../src/implementations/ask-user-tool.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import { describe, expect, it, vi } from "vitest";
2
+ import { createAskUserTool } from "./ask-user-tool.js";
3
+ describe("createAskUserTool", () => {
4
+ it("accepts boolean property schemas and leaves them untouched during title enrichment", async () => {
5
+ const tool = createAskUserTool();
6
+ const getElicitationData = vi.fn().mockResolvedValue({ ok: true });
7
+ const context = {
8
+ services: {
9
+ approval: {
10
+ getElicitationData
11
+ }
12
+ }
13
+ };
14
+ const input = tool.inputSchema.parse({
15
+ question: "Collect profile settings",
16
+ schema: {
17
+ type: "object",
18
+ properties: {
19
+ name: {
20
+ type: "string"
21
+ },
22
+ ignored: true
23
+ },
24
+ required: ["name"]
25
+ }
26
+ });
27
+ await tool.execute(input, context);
28
+ expect(getElicitationData).toHaveBeenCalledWith({
29
+ prompt: "Collect profile settings",
30
+ schema: {
31
+ type: "object",
32
+ properties: {
33
+ name: {
34
+ type: "string",
35
+ title: "Name"
36
+ },
37
+ ignored: true
38
+ },
39
+ required: ["name"]
40
+ },
41
+ serverName: "Dexto Agent"
42
+ });
43
+ });
44
+ });
@@ -5,17 +5,7 @@ declare const DelegateToUrlInputSchema: z.ZodObject<{
5
5
  message: z.ZodString;
6
6
  sessionId: z.ZodOptional<z.ZodString>;
7
7
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8
- }, "strict", z.ZodTypeAny, {
9
- message: string;
10
- url: string;
11
- timeout: number;
12
- sessionId?: string | undefined;
13
- }, {
14
- message: string;
15
- url: string;
16
- sessionId?: string | undefined;
17
- timeout?: number | undefined;
18
- }>;
8
+ }, z.core.$strict>;
19
9
  /**
20
10
  * Create the `delegate_to_url` tool.
21
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"delegate-to-url-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/delegate-to-url-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAU9D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;EA0BjB,CAAC;AAsJd;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAAC,OAAO,wBAAwB,CAAC,CA+C/E"}
1
+ {"version":3,"file":"delegate-to-url-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/delegate-to-url-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAU9D,QAAA,MAAM,wBAAwB;;;;;kBA0BjB,CAAC;AAsJd;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAAC,OAAO,wBAAwB,CAAC,CA+C/E"}
@@ -3,13 +3,7 @@ import type { Tool } from '@dexto/core';
3
3
  declare const CodeSearchInputSchema: z.ZodObject<{
4
4
  query: z.ZodString;
5
5
  tokensNum: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6
- }, "strict", z.ZodTypeAny, {
7
- query: string;
8
- tokensNum: number;
9
- }, {
10
- query: string;
11
- tokensNum?: number | undefined;
12
- }>;
6
+ }, z.core.$strict>;
13
7
  /**
14
8
  * Create the `code_search` tool.
15
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"exa-code-search-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/exa-code-search-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAG9D,QAAA,MAAM,qBAAqB;;;;;;;;;EAiBd,CAAC;AACd;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAAC,OAAO,qBAAqB,CAAC,CA4BzE"}
1
+ {"version":3,"file":"exa-code-search-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/exa-code-search-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAG9D,QAAA,MAAM,qBAAqB;;;kBAiBd,CAAC;AACd;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAAC,OAAO,qBAAqB,CAAC,CA4BzE"}
@@ -3,22 +3,16 @@ import type { Tool } from '@dexto/core';
3
3
  declare const WebSearchInputSchema: z.ZodObject<{
4
4
  query: z.ZodString;
5
5
  numResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6
- livecrawl: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fallback", "preferred"]>>>;
7
- type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["auto", "fast"]>>>;
6
+ livecrawl: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
7
+ fallback: "fallback";
8
+ preferred: "preferred";
9
+ }>>>;
10
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
11
+ auto: "auto";
12
+ fast: "fast";
13
+ }>>>;
8
14
  contextMaxCharacters: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
- }, "strict", z.ZodTypeAny, {
10
- type: "auto" | "fast";
11
- query: string;
12
- numResults: number;
13
- livecrawl: "fallback" | "preferred";
14
- contextMaxCharacters: number;
15
- }, {
16
- query: string;
17
- type?: "auto" | "fast" | undefined;
18
- numResults?: number | undefined;
19
- livecrawl?: "fallback" | "preferred" | undefined;
20
- contextMaxCharacters?: number | undefined;
21
- }>;
15
+ }, z.core.$strict>;
22
16
  /**
23
17
  * Create the `web_search` tool.
24
18
  *
@@ -1 +1 @@
1
- {"version":3,"file":"exa-web-search-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/exa-web-search-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAG9D,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EA8Bb,CAAC;AACd;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAAC,OAAO,oBAAoB,CAAC,CA+BvE"}
1
+ {"version":3,"file":"exa-web-search-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/exa-web-search-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAG9D,QAAA,MAAM,oBAAoB;;;;;;;;;;;;kBA8Bb,CAAC;AACd;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAAC,OAAO,oBAAoB,CAAC,CA+BvE"}
@@ -2,14 +2,11 @@ import { z } from 'zod';
2
2
  import type { Tool } from '@dexto/core';
3
3
  declare const GetResourceInputSchema: z.ZodObject<{
4
4
  reference: z.ZodString;
5
- format: z.ZodDefault<z.ZodEnum<["url", "metadata"]>>;
6
- }, "strict", z.ZodTypeAny, {
7
- reference: string;
8
- format: "url" | "metadata";
9
- }, {
10
- reference: string;
11
- format?: "url" | "metadata" | undefined;
12
- }>;
5
+ format: z.ZodDefault<z.ZodEnum<{
6
+ metadata: "metadata";
7
+ url: "url";
8
+ }>>;
9
+ }, z.core.$strict>;
13
10
  /**
14
11
  * Create the `get_resource` tool.
15
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"get-resource-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/get-resource-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,sBAAsB;;;;;;;;;EAgBf,CAAC;AAEd;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAiH3E"}
1
+ {"version":3,"file":"get-resource-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/get-resource-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,sBAAsB;;;;;;kBAgBf,CAAC;AAEd;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAiH3E"}
@@ -31,9 +31,9 @@ var import_undici = require("undici");
31
31
  const HttpRequestInputSchema = import_zod.z.object({
32
32
  url: import_zod.z.string().url().describe("Absolute URL to request"),
33
33
  method: import_zod.z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").describe("HTTP method to use"),
34
- headers: import_zod.z.record(import_zod.z.string()).optional().describe("Optional request headers (string values only)"),
35
- query: import_zod.z.record(import_zod.z.string()).optional().describe("Optional query parameters to append to the URL"),
36
- body: import_zod.z.union([import_zod.z.string(), import_zod.z.record(import_zod.z.unknown()), import_zod.z.array(import_zod.z.unknown())]).optional().describe("Optional request body (string or JSON-serializable value)"),
34
+ headers: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).optional().describe("Optional request headers (string values only)"),
35
+ query: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).optional().describe("Optional query parameters to append to the URL"),
36
+ body: import_zod.z.union([import_zod.z.string(), import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()), import_zod.z.array(import_zod.z.unknown())]).optional().describe("Optional request body (string or JSON-serializable value)"),
37
37
  timeoutMs: import_zod.z.number().int().positive().optional().default(3e4).describe("Request timeout in milliseconds (default: 30000)")
38
38
  }).strict();
39
39
  function isJsonContentType(contentType) {
@@ -3,26 +3,18 @@ import type { Tool } from '@dexto/core';
3
3
  import { promises as dns, type LookupAddress, type LookupOptions } from 'node:dns';
4
4
  declare const HttpRequestInputSchema: z.ZodObject<{
5
5
  url: z.ZodString;
6
- method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>>;
6
+ method: z.ZodDefault<z.ZodEnum<{
7
+ POST: "POST";
8
+ GET: "GET";
9
+ PUT: "PUT";
10
+ PATCH: "PATCH";
11
+ DELETE: "DELETE";
12
+ }>>;
7
13
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8
14
  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">]>>;
15
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>;
10
16
  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
- }>;
17
+ }, z.core.$strict>;
26
18
  type LookupCallback = ((err: NodeJS.ErrnoException | null, address: string, family: number) => void) | ((err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void);
27
19
  export declare function createSafeLookup(config?: {
28
20
  dnsLookup?: typeof dns.lookup;
@@ -1 +1 @@
1
- {"version":3,"file":"http-request-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/http-request-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAS9D,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAKnF,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EA2Bf,CAAC;AA8Bd,KAAK,cAAc,GACb,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAC9E,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC,CAAC;AAoDhF,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE;IACtC,SAAS,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC;CACjC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CAyI/E;AA2FD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAuG3E"}
1
+ {"version":3,"file":"http-request-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/http-request-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAS9D,OAAO,EAAE,QAAQ,IAAI,GAAG,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAKnF,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;kBA2Bf,CAAC;AA8Bd,KAAK,cAAc,GACb,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAC9E,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC,CAAC;AAoDhF,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE;IACtC,SAAS,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC;CACjC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,KAAK,IAAI,CAyI/E;AA2FD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAuG3E"}
@@ -14,9 +14,9 @@ import { Agent } from "undici";
14
14
  const HttpRequestInputSchema = z.object({
15
15
  url: z.string().url().describe("Absolute URL to request"),
16
16
  method: z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").describe("HTTP method to use"),
17
- headers: z.record(z.string()).optional().describe("Optional request headers (string values only)"),
18
- query: z.record(z.string()).optional().describe("Optional query parameters to append to the URL"),
19
- body: z.union([z.string(), z.record(z.unknown()), z.array(z.unknown())]).optional().describe("Optional request body (string or JSON-serializable value)"),
17
+ headers: z.record(z.string(), z.string()).optional().describe("Optional request headers (string values only)"),
18
+ query: z.record(z.string(), z.string()).optional().describe("Optional query parameters to append to the URL"),
19
+ body: z.union([z.string(), z.record(z.string(), z.unknown()), z.array(z.unknown())]).optional().describe("Optional request body (string or JSON-serializable value)"),
20
20
  timeoutMs: z.number().int().positive().optional().default(3e4).describe("Request timeout in milliseconds (default: 30000)")
21
21
  }).strict();
22
22
  function isJsonContentType(contentType) {
@@ -27,7 +27,7 @@ const InvokeSkillInputSchema = import_zod.z.object({
27
27
  skill: import_zod.z.string().min(1, "Skill name is required").describe(
28
28
  'The name of the skill to invoke (e.g., "plugin-name:skill-name" or "skill-name")'
29
29
  ),
30
- args: import_zod.z.record(import_zod.z.string()).optional().describe("Optional arguments to pass to the skill"),
30
+ args: import_zod.z.record(import_zod.z.string(), import_zod.z.string()).optional().describe("Optional arguments to pass to the skill"),
31
31
  taskContext: import_zod.z.string().optional().describe(
32
32
  "Context about what task this skill should accomplish. Recommended for forked skills to provide context since they run in isolation without conversation history."
33
33
  )
@@ -4,15 +4,7 @@ declare const InvokeSkillInputSchema: z.ZodObject<{
4
4
  skill: z.ZodString;
5
5
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6
6
  taskContext: z.ZodOptional<z.ZodString>;
7
- }, "strict", z.ZodTypeAny, {
8
- skill: string;
9
- args?: Record<string, string> | undefined;
10
- taskContext?: string | undefined;
11
- }, {
12
- skill: string;
13
- args?: Record<string, string> | undefined;
14
- taskContext?: string | undefined;
15
- }>;
7
+ }, z.core.$strict>;
16
8
  /**
17
9
  * Create the `invoke_skill` tool.
18
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"invoke-skill-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/invoke-skill-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAIR,IAAI,EAEP,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAgBf,CAAC;AAEd;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAuK3E"}
1
+ {"version":3,"file":"invoke-skill-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/invoke-skill-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAIR,IAAI,EAEP,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,sBAAsB;;;;kBAmBf,CAAC;AAEd;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAuK3E"}
@@ -4,7 +4,7 @@ const InvokeSkillInputSchema = z.object({
4
4
  skill: z.string().min(1, "Skill name is required").describe(
5
5
  'The name of the skill to invoke (e.g., "plugin-name:skill-name" or "skill-name")'
6
6
  ),
7
- args: z.record(z.string()).optional().describe("Optional arguments to pass to the skill"),
7
+ args: z.record(z.string(), z.string()).optional().describe("Optional arguments to pass to the skill"),
8
8
  taskContext: z.string().optional().describe(
9
9
  "Context about what task this skill should accomplish. Recommended for forked skills to provide context since they run in isolation without conversation history."
10
10
  )
@@ -1,18 +1,20 @@
1
1
  import { z } from 'zod';
2
2
  import type { Tool } from '@dexto/core';
3
3
  declare const ListResourcesInputSchema: z.ZodObject<{
4
- source: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "tool", "user"]>>>;
5
- kind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "image", "audio", "video", "binary"]>>>;
4
+ source: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
5
+ user: "user";
6
+ tool: "tool";
7
+ all: "all";
8
+ }>>>;
9
+ kind: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
10
+ all: "all";
11
+ image: "image";
12
+ audio: "audio";
13
+ video: "video";
14
+ binary: "binary";
15
+ }>>>;
6
16
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7
- }, "strict", z.ZodTypeAny, {
8
- kind: "all" | "image" | "audio" | "video" | "binary";
9
- source: "user" | "tool" | "all";
10
- limit: number;
11
- }, {
12
- kind?: "all" | "image" | "audio" | "video" | "binary" | undefined;
13
- source?: "user" | "tool" | "all" | undefined;
14
- limit?: number | undefined;
15
- }>;
17
+ }, z.core.$strict>;
16
18
  /**
17
19
  * Create the `list_resources` tool.
18
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"list-resources-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/list-resources-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;EAoBjB,CAAC;AAYd;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAAC,OAAO,wBAAwB,CAAC,CA0F/E"}
1
+ {"version":3,"file":"list-resources-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/list-resources-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;kBAoBjB,CAAC;AAYd;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAAC,OAAO,wBAAwB,CAAC,CA0F/E"}
@@ -2,11 +2,7 @@ import { z } from 'zod';
2
2
  import type { Tool } from '@dexto/core';
3
3
  declare const SleepInputSchema: z.ZodObject<{
4
4
  ms: z.ZodNumber;
5
- }, "strict", z.ZodTypeAny, {
6
- ms: number;
7
- }, {
8
- ms: number;
9
- }>;
5
+ }, z.core.$strict>;
10
6
  /**
11
7
  * Internal tool for sleeping/delaying execution.
12
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sleep-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/sleep-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,gBAAgB;;;;;;EAST,CAAC;AAEd;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAkB/D"}
1
+ {"version":3,"file":"sleep-tool.d.ts","sourceRoot":"","sources":["../../src/implementations/sleep-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAwB,MAAM,aAAa,CAAC;AAE9D,QAAA,MAAM,gBAAgB;;kBAST,CAAC;AAEd;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAkB/D"}
package/dist/index.d.cts CHANGED
@@ -5,14 +5,18 @@ declare const BUILTIN_TOOL_NAMES: readonly ["ask_user", "delegate_to_url", "list
5
5
  type BuiltinToolName = (typeof BUILTIN_TOOL_NAMES)[number];
6
6
  declare const BuiltinToolsConfigSchema: z.ZodObject<{
7
7
  type: z.ZodLiteral<"builtin-tools">;
8
- enabledTools: z.ZodOptional<z.ZodArray<z.ZodEnum<["ask_user", "delegate_to_url", "list_resources", "get_resource", "invoke_skill", "http_request", "sleep", "web_search", "code_search"]>, "many">>;
9
- }, "strict", z.ZodTypeAny, {
10
- type: "builtin-tools";
11
- enabledTools?: ("ask_user" | "delegate_to_url" | "get_resource" | "invoke_skill" | "list_resources" | "http_request" | "sleep" | "web_search" | "code_search")[] | undefined;
12
- }, {
13
- type: "builtin-tools";
14
- enabledTools?: ("ask_user" | "delegate_to_url" | "get_resource" | "invoke_skill" | "list_resources" | "http_request" | "sleep" | "web_search" | "code_search")[] | undefined;
15
- }>;
8
+ enabledTools: z.ZodOptional<z.ZodArray<z.ZodEnum<{
9
+ ask_user: "ask_user";
10
+ delegate_to_url: "delegate_to_url";
11
+ get_resource: "get_resource";
12
+ invoke_skill: "invoke_skill";
13
+ list_resources: "list_resources";
14
+ http_request: "http_request";
15
+ sleep: "sleep";
16
+ web_search: "web_search";
17
+ code_search: "code_search";
18
+ }>>>;
19
+ }, z.core.$strict>;
16
20
  type BuiltinToolsConfig = z.output<typeof BuiltinToolsConfigSchema>;
17
21
  declare const builtinToolsFactory: ToolFactory<BuiltinToolsConfig>;
18
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/tools-builtins",
3
- "version": "1.6.26",
3
+ "version": "1.7.0",
4
4
  "description": "Built-in tools factory for Dexto agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "undici": "^7.24.6",
21
- "zod": "^3.25.0",
22
- "@dexto/agent-config": "1.6.26",
23
- "@dexto/core": "1.6.26"
21
+ "zod": "^4.3.6",
22
+ "@dexto/agent-config": "1.7.0",
23
+ "@dexto/core": "1.7.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "tsup": "^8.0.0",