@easynet/agent-tool-buildin 0.0.1

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 (62) hide show
  1. package/README.md +64 -0
  2. package/dist/CoreAdapter.d.ts +37 -0
  3. package/dist/CoreAdapter.d.ts.map +1 -0
  4. package/dist/CoreToolsModule.d.ts +48 -0
  5. package/dist/CoreToolsModule.d.ts.map +1 -0
  6. package/dist/chunk-BUSYA2B4.js +9 -0
  7. package/dist/chunk-BUSYA2B4.js.map +1 -0
  8. package/dist/context.d.ts +9 -0
  9. package/dist/context.d.ts.map +1 -0
  10. package/dist/exec/runCommand.d.ts +9 -0
  11. package/dist/exec/runCommand.d.ts.map +1 -0
  12. package/dist/fs/deletePath.d.ts +8 -0
  13. package/dist/fs/deletePath.d.ts.map +1 -0
  14. package/dist/fs/listDir.d.ts +8 -0
  15. package/dist/fs/listDir.d.ts.map +1 -0
  16. package/dist/fs/readText.d.ts +8 -0
  17. package/dist/fs/readText.d.ts.map +1 -0
  18. package/dist/fs/searchText.d.ts +8 -0
  19. package/dist/fs/searchText.d.ts.map +1 -0
  20. package/dist/fs/sha256.d.ts +8 -0
  21. package/dist/fs/sha256.d.ts.map +1 -0
  22. package/dist/fs/writeText.d.ts +8 -0
  23. package/dist/fs/writeText.d.ts.map +1 -0
  24. package/dist/http/downloadFile.d.ts +8 -0
  25. package/dist/http/downloadFile.d.ts.map +1 -0
  26. package/dist/http/duckduckgoSearch.d.ts +9 -0
  27. package/dist/http/duckduckgoSearch.d.ts.map +1 -0
  28. package/dist/http/fetchJson.d.ts +8 -0
  29. package/dist/http/fetchJson.d.ts.map +1 -0
  30. package/dist/http/fetchPageMainContent.d.ts +9 -0
  31. package/dist/http/fetchPageMainContent.d.ts.map +1 -0
  32. package/dist/http/fetchText.d.ts +8 -0
  33. package/dist/http/fetchText.d.ts.map +1 -0
  34. package/dist/http/head.d.ts +8 -0
  35. package/dist/http/head.d.ts.map +1 -0
  36. package/dist/index.cjs +3840 -0
  37. package/dist/index.cjs.map +1 -0
  38. package/dist/index.d.ts +14 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +1791 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/jmespath-6W7SK7AH.js +1514 -0
  43. package/dist/jmespath-6W7SK7AH.js.map +1 -0
  44. package/dist/mustache-CS7KHA4H.js +467 -0
  45. package/dist/mustache-CS7KHA4H.js.map +1 -0
  46. package/dist/security/sandbox.d.ts +9 -0
  47. package/dist/security/sandbox.d.ts.map +1 -0
  48. package/dist/security/ssrf.d.ts +12 -0
  49. package/dist/security/ssrf.d.ts.map +1 -0
  50. package/dist/types.d.ts +55 -0
  51. package/dist/types.d.ts.map +1 -0
  52. package/dist/util/hashText.d.ts +8 -0
  53. package/dist/util/hashText.d.ts.map +1 -0
  54. package/dist/util/jsonSelect.d.ts +8 -0
  55. package/dist/util/jsonSelect.d.ts.map +1 -0
  56. package/dist/util/now.d.ts +8 -0
  57. package/dist/util/now.d.ts.map +1 -0
  58. package/dist/util/templateRender.d.ts +8 -0
  59. package/dist/util/templateRender.d.ts.map +1 -0
  60. package/dist/util/truncate.d.ts +8 -0
  61. package/dist/util/truncate.d.ts.map +1 -0
  62. package/package.json +48 -0
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # @easynet/agent-tool-buildin
2
+
3
+ Built-in tools for [@easynet/agent-tool](https://github.com/easynet-world/agent-tool): FS, HTTP, util, security (sandbox, SSRF).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @easynet/agent-tool @easynet/agent-tool-buildin
9
+ ```
10
+
11
+ Peer dependency: `@easynet/agent-tool` (>=1.0.0).
12
+
13
+ ## Usage
14
+
15
+ Register with a ToolRegistry and PTCRuntime:
16
+
17
+ ```ts
18
+ import { ToolRegistry } from "@easynet/agent-tool";
19
+ import { PTCRuntime } from "@easynet/agent-tool";
20
+ import { registerCoreTools } from "@easynet/agent-tool-buildin";
21
+
22
+ const registry = new ToolRegistry();
23
+ registerCoreTools(registry, {
24
+ sandboxRoot: "/var/sandbox",
25
+ allowedHosts: ["api.github.com"],
26
+ });
27
+ const runtime = new PTCRuntime({ registry });
28
+ // Invoke: core/fs.readText, core/http.fetchText, etc.
29
+ ```
30
+
31
+ ## Tools
32
+
33
+ | Namespace | Tools |
34
+ |-----------|-------|
35
+ | **core/fs** | readText, writeText, listDir, searchText, sha256, deletePath |
36
+ | **core/http** | fetchText, fetchJson, head, downloadFile, duckduckgoSearch, fetchPageMainContent |
37
+ | **core/util** | jsonSelect, truncate, hashText, now, templateRender |
38
+ | **core/exec** | runCommand |
39
+ | **security** | sandbox, SSRF validation |
40
+
41
+ ## Agent YAML
42
+
43
+ Reference tools via npm descriptor:
44
+
45
+ ```yaml
46
+ tools:
47
+ - npm:@easynet/agent-tool-buildin#fs.readText
48
+ - npm:@easynet/agent-tool-buildin#http.fetchText
49
+ ```
50
+
51
+ ## Build
52
+
53
+ ```bash
54
+ npm install
55
+ npm run build
56
+ ```
57
+
58
+ ## Release (npmjs.org)
59
+
60
+ Releases are published to [npmjs.org](https://www.npmjs.com/package/@easynet/agent-tool-buildin) via GitHub Actions on push to `master`. Add **NPM_TOKEN** (npm Automation or Publish token for @easynet) in repo Settings → Secrets and variables → Actions.
61
+
62
+ ## License
63
+
64
+ MIT
@@ -0,0 +1,37 @@
1
+ import type { ToolAdapter, ToolSpec } from "@easynet/agent-tool";
2
+ import type { ExecContext } from "@easynet/agent-tool";
3
+ import type { CoreToolHandler, CoreToolsConfig } from "./types.js";
4
+ /**
5
+ * Adapter for core tools (kind="core").
6
+ * Dispatches to registered handler functions by tool name.
7
+ *
8
+ * Core tools are local, atomic operations (filesystem, HTTP, utilities)
9
+ * that enforce their own security constraints (sandbox, SSRF) in addition
10
+ * to the PolicyEngine capability gating.
11
+ */
12
+ export declare class CoreAdapter implements ToolAdapter {
13
+ readonly kind: "core";
14
+ private readonly handlers;
15
+ private readonly config;
16
+ constructor(config: CoreToolsConfig);
17
+ /**
18
+ * Register a handler for a specific core tool name.
19
+ */
20
+ registerHandler(toolName: string, handler: CoreToolHandler): void;
21
+ /**
22
+ * Unregister a handler.
23
+ */
24
+ unregisterHandler(toolName: string): boolean;
25
+ /**
26
+ * List registered core tool names.
27
+ */
28
+ getRegisteredTools(): string[];
29
+ /**
30
+ * Invoke dispatches to the appropriate handler by spec.name.
31
+ */
32
+ invoke(spec: ToolSpec, args: unknown, ctx: ExecContext): Promise<{
33
+ result: unknown;
34
+ raw?: unknown;
35
+ }>;
36
+ }
37
+ //# sourceMappingURL=CoreAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreAdapter.d.ts","sourceRoot":"","sources":["../CoreAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAmB,eAAe,EAAE,MAAM,YAAY,CAAC;AAGpF;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsC;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;gBAE7B,MAAM,EAAE,eAAe;IAInC;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAIjE;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI5C;;OAEG;IACH,kBAAkB,IAAI,MAAM,EAAE;IAI9B;;OAEG;IACG,MAAM,CACV,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAsB/C"}
@@ -0,0 +1,48 @@
1
+ import { CoreAdapter } from "./CoreAdapter.js";
2
+ import type { ToolRegistry } from "@easynet/agent-tool";
3
+ import type { CoreToolsConfig } from "./types.js";
4
+ /** Specs generated from manifest (for re-export / backward compatibility). */
5
+ export declare const readTextSpec: import("@easynet/agent-tool").ToolSpec;
6
+ export declare const writeTextSpec: import("@easynet/agent-tool").ToolSpec;
7
+ export declare const listDirSpec: import("@easynet/agent-tool").ToolSpec;
8
+ export declare const searchTextSpec: import("@easynet/agent-tool").ToolSpec;
9
+ export declare const sha256Spec: import("@easynet/agent-tool").ToolSpec;
10
+ export declare const deletePathSpec: import("@easynet/agent-tool").ToolSpec;
11
+ export declare const fetchTextSpec: import("@easynet/agent-tool").ToolSpec;
12
+ export declare const fetchJsonSpec: import("@easynet/agent-tool").ToolSpec;
13
+ export declare const downloadFileSpec: import("@easynet/agent-tool").ToolSpec;
14
+ export declare const headSpec: import("@easynet/agent-tool").ToolSpec;
15
+ export declare const jsonSelectSpec: import("@easynet/agent-tool").ToolSpec;
16
+ export declare const truncateSpec: import("@easynet/agent-tool").ToolSpec;
17
+ export declare const hashTextSpec: import("@easynet/agent-tool").ToolSpec;
18
+ export declare const nowSpec: import("@easynet/agent-tool").ToolSpec;
19
+ export declare const templateRenderSpec: import("@easynet/agent-tool").ToolSpec;
20
+ export declare const runCommandSpec: import("@easynet/agent-tool").ToolSpec;
21
+ export declare const duckduckgoSearchSpec: import("@easynet/agent-tool").ToolSpec;
22
+ export declare const fetchPageMainContentSpec: import("@easynet/agent-tool").ToolSpec;
23
+ /**
24
+ * User-provided config for registerCoreTools.
25
+ * `sandboxRoot` and `allowedHosts` are required; the rest have defaults.
26
+ */
27
+ export type CoreToolsUserConfig = Pick<CoreToolsConfig, "sandboxRoot" | "allowedHosts"> & Partial<Omit<CoreToolsConfig, "sandboxRoot" | "allowedHosts">>;
28
+ /** Builtin tool groups: fs, http, util, exec (name prefix core/fs., core/http., core/util., core/exec.). */
29
+ export type CoreToolsGroup = "fs" | "http" | "util" | "exec";
30
+ export interface RegisterCoreToolsOptions {
31
+ /** Restrict to these groups (e.g. ["fs", "http"]). Ignored if only is set. */
32
+ groups?: CoreToolsGroup[];
33
+ /** Restrict to these tool names (e.g. ["core/fs.readText"]). Takes precedence over groups. */
34
+ only?: string[];
35
+ }
36
+ /**
37
+ * Register core tools with a ToolRegistry and return the configured CoreAdapter.
38
+ * Optionally restrict to groups or exact tool names.
39
+ *
40
+ * Usage:
41
+ * ```ts
42
+ * const coreAdapter = registerCoreTools(registry, config);
43
+ * const coreAdapterFsOnly = registerCoreTools(registry, config, { groups: ["fs"] });
44
+ * const coreAdapterNamed = registerCoreTools(registry, config, { only: ["core/fs.readText"] });
45
+ * ```
46
+ */
47
+ export declare function registerCoreTools(registry: ToolRegistry, userConfig: CoreToolsUserConfig, options?: RegisterCoreToolsOptions): CoreAdapter;
48
+ //# sourceMappingURL=CoreToolsModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreToolsModule.d.ts","sourceRoot":"","sources":["../CoreToolsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAwMlD,8EAA8E;AAC9E,eAAO,MAAM,YAAY,wCAAyC,CAAC;AACnE,eAAO,MAAM,aAAa,wCAAyC,CAAC;AACpE,eAAO,MAAM,WAAW,wCAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,wCAAyC,CAAC;AACrE,eAAO,MAAM,UAAU,wCAAyC,CAAC;AACjE,eAAO,MAAM,cAAc,wCAAyC,CAAC;AACrE,eAAO,MAAM,aAAa,wCAAyC,CAAC;AACpE,eAAO,MAAM,aAAa,wCAAyC,CAAC;AACpE,eAAO,MAAM,gBAAgB,wCAAyC,CAAC;AACvE,eAAO,MAAM,QAAQ,wCAAyC,CAAC;AAC/D,eAAO,MAAM,cAAc,wCAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,wCAA0C,CAAC;AACpE,eAAO,MAAM,YAAY,wCAA0C,CAAC;AACpE,eAAO,MAAM,OAAO,wCAA0C,CAAC;AAC/D,eAAO,MAAM,kBAAkB,wCAA0C,CAAC;AAC1E,eAAO,MAAM,cAAc,wCAA0C,CAAC;AACtE,eAAO,MAAM,oBAAoB,wCAA0C,CAAC;AAC5E,eAAO,MAAM,wBAAwB,wCAA0C,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,cAAc,CAAC,GACrF,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC;AAEjE,4GAA4G;AAC5G,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAS7D,MAAM,WAAW,wBAAwB;IACvC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,mBAAmB,EAC/B,OAAO,CAAC,EAAE,wBAAwB,GACjC,WAAW,CA0Bb"}
@@ -0,0 +1,9 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ export {
7
+ __commonJS
8
+ };
9
+ //# sourceMappingURL=chunk-BUSYA2B4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Run context for builtin-tools: config + execCtx injected by the adapter before each invoke.
3
+ * Handlers use getBuiltinContext() so they stay @tool-signature (args only) for scan.
4
+ */
5
+ import type { CoreToolContext } from "./types.js";
6
+ export declare function setBuiltinContext(ctx: CoreToolContext): void;
7
+ export declare function getBuiltinContext(): CoreToolContext;
8
+ export declare function runWithBuiltinContext<T>(ctx: CoreToolContext, fn: () => Promise<T>): Promise<T>;
9
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CAE5D;AAED,wBAAgB,iBAAiB,IAAI,eAAe,CAInD;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAE/F"}
@@ -0,0 +1,9 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Run a Linux command in the sandbox with an allowlist and timeout.
4
+ * Uses spawn (no shell) to avoid injection; command and args are separate.
5
+ * @tool
6
+ * @effect local_write
7
+ */
8
+ export declare const runCommandHandler: CoreToolHandler;
9
+ //# sourceMappingURL=runCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCommand.d.ts","sourceRoot":"","sources":["../../exec/runCommand.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAmIxB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Delete a file or directory in the sandbox (dangerous, requires explicit confirmation).
4
+ * @tool
5
+ * @effect destructive
6
+ */
7
+ export declare const deletePathHandler: CoreToolHandler;
8
+ //# sourceMappingURL=deletePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deletePath.d.ts","sourceRoot":"","sources":["../../fs/deletePath.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EA0DxB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * List directory contents in the sandbox.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const listDirHandler: CoreToolHandler;
8
+ //# sourceMappingURL=listDir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listDir.d.ts","sourceRoot":"","sources":["../../fs/listDir.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAWnD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EA4CrB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Read a UTF-8 text file from the sandbox.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const readTextHandler: CoreToolHandler;
8
+ //# sourceMappingURL=readText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readText.d.ts","sourceRoot":"","sources":["../../fs/readText.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAoCtB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Search for text patterns in files within the sandbox.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const searchTextHandler: CoreToolHandler;
8
+ //# sourceMappingURL=searchText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchText.d.ts","sourceRoot":"","sources":["../../fs/searchText.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAUnD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAoExB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Compute SHA-256 hash of a file in the sandbox.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const sha256Handler: CoreToolHandler;
8
+ //# sourceMappingURL=sha256.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../../fs/sha256.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EA8BpB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Write UTF-8 text to a file in the sandbox.
4
+ * @tool
5
+ * @effect local_write
6
+ */
7
+ export declare const writeTextHandler: CoreToolHandler;
8
+ //# sourceMappingURL=writeText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeText.d.ts","sourceRoot":"","sources":["../../fs/writeText.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EA0DvB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Download a file from a URL to the sandbox.
4
+ * @tool
5
+ * @effect local_write
6
+ */
7
+ export declare const downloadFileHandler: CoreToolHandler;
8
+ //# sourceMappingURL=downloadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadFile.d.ts","sourceRoot":"","sources":["../../http/downloadFile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAMnD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAwI1B,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Search DuckDuckGo via the Instant Answer API (no API key).
4
+ * Requires api.duckduckgo.com in allowedHosts.
5
+ * @tool
6
+ * @effect none
7
+ */
8
+ export declare const duckduckgoSearchHandler: CoreToolHandler;
9
+ //# sourceMappingURL=duckduckgoSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duckduckgoSearch.d.ts","sourceRoot":"","sources":["../../http/duckduckgoSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6BnD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EA8G9B,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Fetch a URL and return the response as parsed JSON.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const fetchJsonHandler: CoreToolHandler;
8
+ //# sourceMappingURL=fetchJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchJson.d.ts","sourceRoot":"","sources":["../../http/fetchJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAoGvB,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Fetch a URL and return only the main content (main/article/body text), not full HTML.
4
+ * For HTML responses, extracts main content; for non-HTML, returns raw text.
5
+ * @tool
6
+ * @effect none
7
+ */
8
+ export declare const fetchPageMainContentHandler: CoreToolHandler;
9
+ //# sourceMappingURL=fetchPageMainContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchPageMainContent.d.ts","sourceRoot":"","sources":["../../http/fetchPageMainContent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqDnD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAgGlC,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Fetch a URL and return the response as text.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const fetchTextHandler: CoreToolHandler;
8
+ //# sourceMappingURL=fetchText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchText.d.ts","sourceRoot":"","sources":["../../http/fetchText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAqFvB,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { CoreToolHandler } from "../types.js";
2
+ /**
3
+ * Send a HEAD request to get response headers without body.
4
+ * @tool
5
+ * @effect none
6
+ */
7
+ export declare const headHandler: CoreToolHandler;
8
+ //# sourceMappingURL=head.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"head.d.ts","sourceRoot":"","sources":["../../http/head.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAgElB,eAAe,CAAC"}