@agntk/core 0.3.3 → 1.0.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/advanced/index.d.ts +13 -22
- package/dist/advanced/index.d.ts.map +1 -1
- package/dist/advanced/index.js +10 -55
- package/dist/advanced/index.js.map +1 -1
- package/dist/agent.d.ts +2 -35
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +113 -111
- package/dist/agent.js.map +1 -1
- package/dist/config/defaults.d.ts +1 -5
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +1 -11
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts +5 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +7 -7
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +0 -40
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +3 -80
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +117 -788
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +52 -63
- package/dist/config/schema.js.map +1 -1
- package/dist/constants.d.ts +0 -11
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -17
- package/dist/constants.js.map +1 -1
- package/dist/evals/assertions.d.ts +0 -35
- package/dist/evals/assertions.d.ts.map +1 -1
- package/dist/evals/assertions.js +0 -51
- package/dist/evals/assertions.js.map +1 -1
- package/dist/evals/index.d.ts +0 -5
- package/dist/evals/index.d.ts.map +1 -1
- package/dist/evals/index.js +0 -5
- package/dist/evals/index.js.map +1 -1
- package/dist/evals/runner.d.ts +0 -27
- package/dist/evals/runner.d.ts.map +1 -1
- package/dist/evals/runner.js +3 -45
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/types.d.ts +0 -14
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/evals/types.js +0 -3
- package/dist/evals/types.js.map +1 -1
- package/dist/guardrails/built-ins.d.ts +0 -28
- package/dist/guardrails/built-ins.d.ts.map +1 -1
- package/dist/guardrails/built-ins.js +21 -47
- package/dist/guardrails/built-ins.js.map +1 -1
- package/dist/guardrails/index.d.ts +1 -4
- package/dist/guardrails/index.d.ts.map +1 -1
- package/dist/guardrails/index.js +1 -4
- package/dist/guardrails/index.js.map +1 -1
- package/dist/guardrails/runner.d.ts +0 -30
- package/dist/guardrails/runner.d.ts.map +1 -1
- package/dist/guardrails/runner.js +1 -46
- package/dist/guardrails/runner.js.map +1 -1
- package/dist/guardrails/types.d.ts +0 -35
- package/dist/guardrails/types.d.ts.map +1 -1
- package/dist/guardrails/types.js +4 -7
- package/dist/guardrails/types.js.map +1 -1
- package/dist/index.d.ts +4 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -31
- package/dist/index.js.map +1 -1
- package/dist/memory/loader.d.ts +0 -17
- package/dist/memory/loader.d.ts.map +1 -1
- package/dist/memory/loader.js +5 -27
- package/dist/memory/loader.js.map +1 -1
- package/dist/memory/store.d.ts +8 -16
- package/dist/memory/store.d.ts.map +1 -1
- package/dist/memory/store.js +101 -32
- package/dist/memory/store.js.map +1 -1
- package/dist/memory/types.d.ts +10 -30
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/memory/types.js +0 -6
- package/dist/memory/types.js.map +1 -1
- package/dist/models.d.ts +9 -32
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +25 -68
- package/dist/models.js.map +1 -1
- package/dist/observability/index.d.ts +0 -3
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +0 -3
- package/dist/observability/index.js.map +1 -1
- package/dist/observability/langfuse.d.ts +0 -38
- package/dist/observability/langfuse.d.ts.map +1 -1
- package/dist/observability/langfuse.js +6 -55
- package/dist/observability/langfuse.js.map +1 -1
- package/dist/observability/types.d.ts +0 -21
- package/dist/observability/types.d.ts.map +1 -1
- package/dist/observability/types.js +0 -3
- package/dist/observability/types.js.map +1 -1
- package/dist/presets/tool-preset-registry.d.ts +0 -21
- package/dist/presets/tool-preset-registry.d.ts.map +1 -1
- package/dist/presets/tool-preset-registry.js +15 -34
- package/dist/presets/tool-preset-registry.js.map +1 -1
- package/dist/presets/tools.d.ts +41 -39
- package/dist/presets/tools.d.ts.map +1 -1
- package/dist/presets/tools.js +46 -40
- package/dist/presets/tools.js.map +1 -1
- package/dist/prompts/context.d.ts +0 -4
- package/dist/prompts/context.d.ts.map +1 -1
- package/dist/prompts/context.js +21 -33
- package/dist/prompts/context.js.map +1 -1
- package/dist/prompts/template.d.ts +0 -11
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/prompts/template.js +4 -14
- package/dist/prompts/template.js.map +1 -1
- package/dist/provider-resolver.d.ts +0 -29
- package/dist/provider-resolver.d.ts.map +1 -1
- package/dist/provider-resolver.js +17 -61
- package/dist/provider-resolver.js.map +1 -1
- package/dist/reflection.d.ts +0 -34
- package/dist/reflection.d.ts.map +1 -1
- package/dist/reflection.js +0 -40
- package/dist/reflection.js.map +1 -1
- package/dist/skills/index.d.ts +0 -3
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +0 -3
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +0 -69
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +38 -130
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/types.d.ts +0 -36
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/skills/types.js +0 -4
- package/dist/skills/types.js.map +1 -1
- package/dist/system-detect.d.ts +0 -57
- package/dist/system-detect.d.ts.map +1 -1
- package/dist/system-detect.js +9 -114
- package/dist/system-detect.js.map +1 -1
- package/dist/tools/approval.d.ts +0 -47
- package/dist/tools/approval.d.ts.map +1 -1
- package/dist/tools/approval.js +0 -46
- package/dist/tools/approval.js.map +1 -1
- package/dist/tools/ast-grep/cli.d.ts.map +1 -1
- package/dist/tools/ast-grep/cli.js +10 -4
- package/dist/tools/ast-grep/cli.js.map +1 -1
- package/dist/tools/ast-grep/constants.d.ts.map +1 -1
- package/dist/tools/ast-grep/constants.js +7 -14
- package/dist/tools/ast-grep/constants.js.map +1 -1
- package/dist/tools/ast-grep/downloader.d.ts.map +1 -1
- package/dist/tools/ast-grep/downloader.js +1 -4
- package/dist/tools/ast-grep/downloader.js.map +1 -1
- package/dist/tools/ast-grep/index.d.ts +2 -2
- package/dist/tools/ast-grep/index.d.ts.map +1 -1
- package/dist/tools/ast-grep/index.js +1 -1
- package/dist/tools/ast-grep/index.js.map +1 -1
- package/dist/tools/ast-grep/tools.d.ts +4 -4
- package/dist/tools/ast-grep/tools.d.ts.map +1 -1
- package/dist/tools/ast-grep/tools.js +2 -8
- package/dist/tools/ast-grep/tools.js.map +1 -1
- package/dist/tools/browser/index.d.ts +4 -4
- package/dist/tools/browser/index.d.ts.map +1 -1
- package/dist/tools/browser/index.js +2 -3
- package/dist/tools/browser/index.js.map +1 -1
- package/dist/tools/browser/stream.d.ts +0 -32
- package/dist/tools/browser/stream.d.ts.map +1 -1
- package/dist/tools/browser/stream.js +0 -53
- package/dist/tools/browser/stream.js.map +1 -1
- package/dist/tools/browser/tool.d.ts +10 -15
- package/dist/tools/browser/tool.d.ts.map +1 -1
- package/dist/tools/browser/tool.js +2 -26
- package/dist/tools/browser/tool.js.map +1 -1
- package/dist/tools/browser/types.d.ts +31 -156
- package/dist/tools/browser/types.d.ts.map +1 -1
- package/dist/tools/browser/types.js +22 -17
- package/dist/tools/browser/types.js.map +1 -1
- package/dist/tools/deep-reasoning/constants.d.ts +0 -6
- package/dist/tools/deep-reasoning/constants.d.ts.map +1 -1
- package/dist/tools/deep-reasoning/constants.js +0 -6
- package/dist/tools/deep-reasoning/constants.js.map +1 -1
- package/dist/tools/deep-reasoning/engine.d.ts.map +1 -1
- package/dist/tools/deep-reasoning/engine.js +0 -1
- package/dist/tools/deep-reasoning/engine.js.map +1 -1
- package/dist/tools/deep-reasoning/index.d.ts +4 -0
- package/dist/tools/deep-reasoning/index.d.ts.map +1 -1
- package/dist/tools/deep-reasoning/index.js +4 -3
- package/dist/tools/deep-reasoning/index.js.map +1 -1
- package/dist/tools/deep-reasoning/tools.d.ts.map +1 -1
- package/dist/tools/deep-reasoning/tools.js +8 -1
- package/dist/tools/deep-reasoning/tools.js.map +1 -1
- package/dist/tools/deep-reasoning/types.d.ts +5 -30
- package/dist/tools/deep-reasoning/types.d.ts.map +1 -1
- package/dist/tools/deep-reasoning/types.js +10 -1
- package/dist/tools/deep-reasoning/types.js.map +1 -1
- package/dist/tools/file/index.d.ts +3 -5
- package/dist/tools/file/index.d.ts.map +1 -1
- package/dist/tools/file/index.js +2 -4
- package/dist/tools/file/index.js.map +1 -1
- package/dist/tools/file/tools.d.ts +8 -11
- package/dist/tools/file/tools.d.ts.map +1 -1
- package/dist/tools/file/tools.js +45 -59
- package/dist/tools/file/tools.js.map +1 -1
- package/dist/tools/glob/cli.d.ts.map +1 -1
- package/dist/tools/glob/cli.js +8 -6
- package/dist/tools/glob/cli.js.map +1 -1
- package/dist/tools/glob/tools.d.ts.map +1 -1
- package/dist/tools/glob/tools.js +7 -10
- package/dist/tools/glob/tools.js.map +1 -1
- package/dist/tools/grep/cli.d.ts.map +1 -1
- package/dist/tools/grep/cli.js +0 -2
- package/dist/tools/grep/cli.js.map +1 -1
- package/dist/tools/grep/constants.d.ts.map +1 -1
- package/dist/tools/grep/constants.js +3 -5
- package/dist/tools/grep/constants.js.map +1 -1
- package/dist/tools/grep/downloader.d.ts.map +1 -1
- package/dist/tools/grep/downloader.js +3 -3
- package/dist/tools/grep/downloader.js.map +1 -1
- package/dist/tools/grep/tools.d.ts +2 -2
- package/dist/tools/grep/tools.d.ts.map +1 -1
- package/dist/tools/grep/tools.js +8 -14
- package/dist/tools/grep/tools.js.map +1 -1
- package/dist/tools/index.d.ts +10 -11
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +9 -22
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/model-retry.d.ts +0 -40
- package/dist/tools/model-retry.d.ts.map +1 -1
- package/dist/tools/model-retry.js +1 -49
- package/dist/tools/model-retry.js.map +1 -1
- package/dist/tools/plan/constants.d.ts +0 -6
- package/dist/tools/plan/constants.d.ts.map +1 -1
- package/dist/tools/plan/constants.js +9 -6
- package/dist/tools/plan/constants.js.map +1 -1
- package/dist/tools/plan/index.d.ts +1 -1
- package/dist/tools/plan/index.d.ts.map +1 -1
- package/dist/tools/plan/index.js +1 -4
- package/dist/tools/plan/index.js.map +1 -1
- package/dist/tools/plan/tools.d.ts +2 -2
- package/dist/tools/plan/tools.d.ts.map +1 -1
- package/dist/tools/plan/tools.js +10 -11
- package/dist/tools/plan/tools.js.map +1 -1
- package/dist/tools/plan/types.d.ts +22 -32
- package/dist/tools/plan/types.d.ts.map +1 -1
- package/dist/tools/plan/types.js +11 -3
- package/dist/tools/plan/types.js.map +1 -1
- package/dist/tools/progress/index.d.ts +3 -22
- package/dist/tools/progress/index.d.ts.map +1 -1
- package/dist/tools/progress/index.js +19 -34
- package/dist/tools/progress/index.js.map +1 -1
- package/dist/tools/search-skills.d.ts +0 -23
- package/dist/tools/search-skills.d.ts.map +1 -1
- package/dist/tools/search-skills.js +3 -32
- package/dist/tools/search-skills.js.map +1 -1
- package/dist/tools/shell/background.d.ts +2 -18
- package/dist/tools/shell/background.d.ts.map +1 -1
- package/dist/tools/shell/background.js +45 -48
- package/dist/tools/shell/background.js.map +1 -1
- package/dist/tools/shell/constants.d.ts +0 -3
- package/dist/tools/shell/constants.d.ts.map +1 -1
- package/dist/tools/shell/constants.js +16 -6
- package/dist/tools/shell/constants.js.map +1 -1
- package/dist/tools/shell/index.d.ts +1 -1
- package/dist/tools/shell/index.d.ts.map +1 -1
- package/dist/tools/shell/index.js +1 -1
- package/dist/tools/shell/index.js.map +1 -1
- package/dist/tools/shell/tools.d.ts +3 -3
- package/dist/tools/shell/tools.d.ts.map +1 -1
- package/dist/tools/shell/tools.js +0 -2
- package/dist/tools/shell/tools.js.map +1 -1
- package/dist/tools/shell/types.d.ts +5 -13
- package/dist/tools/shell/types.d.ts.map +1 -1
- package/dist/tools/shell/types.js +10 -1
- package/dist/tools/shell/types.js.map +1 -1
- package/dist/tools/spawn-agent/check-agent.d.ts +45 -0
- package/dist/tools/spawn-agent/check-agent.d.ts.map +1 -0
- package/dist/tools/spawn-agent/check-agent.js +84 -0
- package/dist/tools/spawn-agent/check-agent.js.map +1 -0
- package/dist/tools/spawn-agent/index.d.ts +44 -51
- package/dist/tools/spawn-agent/index.d.ts.map +1 -1
- package/dist/tools/spawn-agent/index.js +196 -84
- package/dist/tools/spawn-agent/index.js.map +1 -1
- package/dist/tools/spawn-agent/registry.d.ts +36 -0
- package/dist/tools/spawn-agent/registry.d.ts.map +1 -0
- package/dist/tools/spawn-agent/registry.js +88 -0
- package/dist/tools/spawn-agent/registry.js.map +1 -0
- package/dist/tools/utils/errors.d.ts +2 -1
- package/dist/tools/utils/errors.d.ts.map +1 -1
- package/dist/tools/utils/errors.js +2 -1
- package/dist/tools/utils/errors.js.map +1 -1
- package/dist/tools/utils/shell.d.ts +0 -11
- package/dist/tools/utils/shell.d.ts.map +1 -1
- package/dist/tools/utils/shell.js +10 -78
- package/dist/tools/utils/shell.js.map +1 -1
- package/dist/tools/utils/tool-result.d.ts +0 -3
- package/dist/tools/utils/tool-result.d.ts.map +1 -1
- package/dist/tools/utils/tool-result.js +4 -4
- package/dist/tools/utils/tool-result.js.map +1 -1
- package/dist/tools/web-search/index.d.ts +4 -0
- package/dist/tools/web-search/index.d.ts.map +1 -0
- package/dist/tools/web-search/index.js +3 -0
- package/dist/tools/web-search/index.js.map +1 -0
- package/dist/tools/web-search/tools.d.ts +17 -0
- package/dist/tools/web-search/tools.d.ts.map +1 -0
- package/dist/tools/web-search/tools.js +81 -0
- package/dist/tools/web-search/tools.js.map +1 -0
- package/dist/tools/web-search/types.d.ts +16 -0
- package/dist/tools/web-search/types.d.ts.map +1 -0
- package/dist/tools/web-search/types.js +29 -0
- package/dist/tools/web-search/types.js.map +1 -0
- package/dist/tools/workspace-middleware.d.ts +14 -0
- package/dist/tools/workspace-middleware.d.ts.map +1 -0
- package/dist/tools/workspace-middleware.js +97 -0
- package/dist/tools/workspace-middleware.js.map +1 -0
- package/dist/types/agent.d.ts +1 -66
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/agent.js +0 -6
- package/dist/types/agent.js.map +1 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/lifecycle.d.ts +0 -141
- package/dist/types/lifecycle.d.ts.map +1 -1
- package/dist/types/lifecycle.js +4 -54
- package/dist/types/lifecycle.js.map +1 -1
- package/dist/types/streaming.d.ts +0 -4
- package/dist/types/streaming.d.ts.map +1 -1
- package/dist/types/streaming.js +0 -4
- package/dist/types/streaming.js.map +1 -1
- package/dist/usage-limits.d.ts +0 -37
- package/dist/usage-limits.d.ts.map +1 -1
- package/dist/usage-limits.js +1 -40
- package/dist/usage-limits.js.map +1 -1
- package/dist/workflow/durable-tool.d.ts +0 -84
- package/dist/workflow/durable-tool.d.ts.map +1 -1
- package/dist/workflow/durable-tool.js +2 -104
- package/dist/workflow/durable-tool.js.map +1 -1
- package/dist/workflow/hooks.d.ts +0 -215
- package/dist/workflow/hooks.d.ts.map +1 -1
- package/dist/workflow/hooks.js +15 -221
- package/dist/workflow/hooks.js.map +1 -1
- package/dist/workflow/index.d.ts +0 -9
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +0 -12
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/utils.d.ts +0 -24
- package/dist/workflow/utils.d.ts.map +1 -1
- package/dist/workflow/utils.js +1 -32
- package/dist/workflow/utils.js.map +1 -1
- package/dist/wrappers/best-of-n.d.ts +0 -35
- package/dist/wrappers/best-of-n.d.ts.map +1 -1
- package/dist/wrappers/best-of-n.js +4 -53
- package/dist/wrappers/best-of-n.js.map +1 -1
- package/dist/wrappers/refine-loop.d.ts +36 -0
- package/dist/wrappers/refine-loop.d.ts.map +1 -0
- package/dist/wrappers/refine-loop.js +135 -0
- package/dist/wrappers/refine-loop.js.map +1 -0
- package/package.json +14 -8
|
@@ -14,8 +14,8 @@ function findExecutable(name) {
|
|
|
14
14
|
return result.stdout.trim().split('\n')[0];
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
catch
|
|
18
|
-
|
|
17
|
+
catch {
|
|
18
|
+
void 0;
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
@@ -34,9 +34,7 @@ function getAgentBundledRg() {
|
|
|
34
34
|
const isWindows = process.platform === 'win32';
|
|
35
35
|
const rgName = isWindows ? 'rg.exe' : 'rg';
|
|
36
36
|
const candidates = [
|
|
37
|
-
// XDG data path (highest priority - where agent installs rg)
|
|
38
37
|
join(getDataDir(), 'agent', 'bin', rgName),
|
|
39
|
-
// Legacy paths relative to execPath
|
|
40
38
|
join(execDir, rgName),
|
|
41
39
|
join(execDir, 'bin', rgName),
|
|
42
40
|
join(execDir, '..', 'bin', rgName),
|
|
@@ -89,7 +87,7 @@ export async function resolveGrepCliWithAutoInstall() {
|
|
|
89
87
|
cachedCli = { path: rgPath, backend: 'rg' };
|
|
90
88
|
return cachedCli;
|
|
91
89
|
}
|
|
92
|
-
catch
|
|
90
|
+
catch {
|
|
93
91
|
return current;
|
|
94
92
|
}
|
|
95
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tools/grep/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,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G,IAAI,GAAG,IAAI,CAAC;AAEzD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa;IACb,eAAe;IACf,cAAc;IACd,eAAe;IACf,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloader.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/downloader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"downloader.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/downloader.ts"],"names":[],"mappings":"AA+IA,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,MAAM,CAAC,CAgDjE;AAED,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAGvD"}
|
|
@@ -31,7 +31,7 @@ function findFileRecursive(dir, filename) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
catch
|
|
34
|
+
catch {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
return null;
|
|
@@ -151,8 +151,8 @@ export async function downloadAndInstallRipgrep() {
|
|
|
151
151
|
try {
|
|
152
152
|
unlinkSync(archivePath);
|
|
153
153
|
}
|
|
154
|
-
catch
|
|
155
|
-
|
|
154
|
+
catch {
|
|
155
|
+
void 0;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloader.js","sourceRoot":"","sources":["../../../src/tools/grep/downloader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC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I,CAAC;QACH,MAAM,YAAY,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAErC,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,MAAM,YAAY,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YACjC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;YAAS,CAAC;QACT,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACH,UAAU,CAAC,WAAW,CAAC,CAAC;YAC1B,CAAC;YAAC,MAAM,CAAC;gBACP,KAAK,CAAC,CAAC;YACT,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const grepTool: import("ai").Tool<{
|
|
2
2
|
pattern: string;
|
|
3
|
-
path?: string | undefined;
|
|
4
3
|
include?: string | undefined;
|
|
4
|
+
path?: string | undefined;
|
|
5
5
|
context?: number | undefined;
|
|
6
6
|
caseSensitive?: boolean | undefined;
|
|
7
7
|
wholeWord?: boolean | undefined;
|
|
@@ -9,8 +9,8 @@ export declare const grepTool: import("ai").Tool<{
|
|
|
9
9
|
export declare function createGrepTool(): {
|
|
10
10
|
grep: import("ai").Tool<{
|
|
11
11
|
pattern: string;
|
|
12
|
-
path?: string | undefined;
|
|
13
12
|
include?: string | undefined;
|
|
13
|
+
path?: string | undefined;
|
|
14
14
|
context?: number | undefined;
|
|
15
15
|
caseSensitive?: boolean | undefined;
|
|
16
16
|
wholeWord?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/tools.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,QAAQ;;;;;;;UA8CnB,CAAC;AAEH,wBAAgB,cAAc;;;;;;;;;EAE7B"}
|
package/dist/tools/grep/tools.js
CHANGED
|
@@ -6,7 +6,6 @@ import { runRg } from './cli.js';
|
|
|
6
6
|
import { formatGrepResult } from './utils.js';
|
|
7
7
|
import { success, error } from '../utils/tool-result.js';
|
|
8
8
|
const log = createLogger('@agntk/core:grep');
|
|
9
|
-
// Get config values with fallbacks
|
|
10
9
|
function getGrepConfig() {
|
|
11
10
|
const config = getToolConfig('grep');
|
|
12
11
|
return {
|
|
@@ -16,26 +15,17 @@ function getGrepConfig() {
|
|
|
16
15
|
}
|
|
17
16
|
const grepInputSchema = z.object({
|
|
18
17
|
pattern: z.string().describe('Regex pattern to search for in file contents'),
|
|
19
|
-
include: z
|
|
20
|
-
.string()
|
|
21
|
-
.optional()
|
|
22
|
-
.describe('File pattern to include (e.g., "*.ts", "*.{js,jsx}")'),
|
|
18
|
+
include: z.string().optional().describe('File pattern to include (e.g., "*.ts", "*.{js,jsx}")'),
|
|
23
19
|
path: z
|
|
24
20
|
.string()
|
|
25
21
|
.optional()
|
|
26
22
|
.describe('Directory to search in. Defaults to current working directory.'),
|
|
27
|
-
context: z
|
|
28
|
-
.number()
|
|
29
|
-
.optional()
|
|
30
|
-
.describe('Number of context lines to show around matches'),
|
|
23
|
+
context: z.number().optional().describe('Number of context lines to show around matches'),
|
|
31
24
|
caseSensitive: z
|
|
32
25
|
.boolean()
|
|
33
26
|
.optional()
|
|
34
27
|
.describe('Enable case-sensitive matching (default: smart case)'),
|
|
35
|
-
wholeWord: z
|
|
36
|
-
.boolean()
|
|
37
|
-
.optional()
|
|
38
|
-
.describe('Match whole words only'),
|
|
28
|
+
wholeWord: z.boolean().optional().describe('Match whole words only'),
|
|
39
29
|
});
|
|
40
30
|
export const grepTool = tool({
|
|
41
31
|
description: 'Fast content search. ' +
|
|
@@ -61,7 +51,11 @@ export const grepTool = tool({
|
|
|
61
51
|
return error(result.error);
|
|
62
52
|
}
|
|
63
53
|
const output = formatGrepResult(result);
|
|
64
|
-
log.info('grep complete', {
|
|
54
|
+
log.info('grep complete', {
|
|
55
|
+
pattern: args.pattern,
|
|
56
|
+
matches: result.totalMatches,
|
|
57
|
+
files: result.filesSearched,
|
|
58
|
+
});
|
|
65
59
|
return success({
|
|
66
60
|
output,
|
|
67
61
|
matches: result.matches,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/tools/grep/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,GAAG,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAE7C,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../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B,CAAC;YAED,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;YACxC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE;gBACxB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,MAAM,CAAC,YAAY;gBAC5B,KAAK,EAAE,MAAM,CAAC,aAAa;aAC5B,CAAC,CAAC;YAEH,OAAO,OAAO,CAAC;gBACb,MAAM;gBACN,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAChE,OAAO,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Tools Module
|
|
3
|
-
*
|
|
4
|
-
* Central export for tool factory, provider, and utilities.
|
|
5
|
-
*/
|
|
6
1
|
export { globTool, createGlobTool, runRgFiles, formatGlobResult, type GlobOptions, type GlobResult, type FileMatch, } from './glob/index.js';
|
|
7
2
|
export { grepTool, createGrepTool, runRg, runRgCount, formatGrepResult, formatCountResult, downloadAndInstallRipgrep, type GrepOptions, type GrepMatch, type GrepResult, type CountResult, } from './grep/index.js';
|
|
8
3
|
export { astGrepSearchTool, astGrepReplaceTool, createAstGrepTools, runSg, ensureAstGrepBinary, formatSearchResult, formatReplaceResult, type CliLanguage, type CliMatch, type SgResult, type SearchMatch, } from './ast-grep/index.js';
|
|
9
|
-
export { createShellTool, shellTool, executeShellCommand, addToAllowlist, clearAllowlist, getAllowlist, SHELL_DESCRIPTION, DEFAULT_TIMEOUT, MAX_TIMEOUT, INTERACTIVE_COMMANDS, type ShellInput, type ShellResult, } from './shell/index.js';
|
|
4
|
+
export { createShellTool, shellTool, executeShellCommand, addToAllowlist, clearAllowlist, getAllowlist, SHELL_DESCRIPTION, DEFAULT_TIMEOUT, MAX_TIMEOUT, INTERACTIVE_COMMANDS, type ShellInput, type ShellResult, createBackgroundTool, clearBackgroundSessions, getBackgroundSessions, type BackgroundSession, } from './shell/index.js';
|
|
10
5
|
export { createPlanTool, createValidationTool, runTypeCheck, runTestCommand, MAX_PLAN_STEPS, DELEGATION_THRESHOLD, PLAN_DESCRIPTION, VALIDATION_DESCRIPTION, AVAILABLE_AGENTS, type Plan, type PlanStep, type PlanToolConfig, type ScopeAssessment, type PendingDecision, type PlanInput, type ValidationInput, type ValidationResult, } from './plan/index.js';
|
|
11
6
|
export { createDeepReasoningTool, DeepReasoningEngine, configureDeepReasoning, isDeepReasoningEnabled, getDeepReasoningEngine, resetDeepReasoningEngine, DEEP_REASONING_DESCRIPTION, UNRESTRICTED_MODE_DESCRIPTION, DEFAULT_MAX_HISTORY, DEFAULT_MAX_BRANCH_SIZE, type ThoughtData, type ReasoningResult, type DeepReasoningConfig, type DeepReasoningInput, } from './deep-reasoning/index.js';
|
|
12
|
-
export { createFileReadTool, createFileWriteTool, createFileEditTool, createFileCreateTool, createFileTools, } from './file/index.js';
|
|
13
|
-
export { createSpawnAgentTool } from './spawn-agent/index.js';
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
7
|
+
export { createFileReadTool, createFileWriteTool, createFileEditTool, createFileCreateTool, createFileTools, type FileToolOptions, } from './file/index.js';
|
|
8
|
+
export { createSpawnAgentTool, generateAgentId, spawnAgentParametersSchema, type SpawnAgentOptions, type SpawnAgentInput, type SpawnAgentResult, type SpawnAgentSyncResult, type SpawnAgentAsyncResult, type SubAgentStreamData, } from './spawn-agent/index.js';
|
|
9
|
+
export { createCheckAgentTool, checkAgentParametersSchema, type CheckAgentOptions, type CheckAgentResult, type CheckAgentEntry, type CheckAgentInput, } from './spawn-agent/check-agent.js';
|
|
10
|
+
export { AgentRegistry, type AgentRegistryEntry, type AgentStatus, type SpawnErrorType, } from './spawn-agent/registry.js';
|
|
11
|
+
export { ModelRetry, wrapToolWithRetry, wrapAllToolsWithRetry } from './model-retry.js';
|
|
12
|
+
export { wrapAllToolsWithWorkspace, type WorkspaceMiddlewareOptions } from './workspace-middleware.js';
|
|
13
|
+
export { createProgressTools, type FeatureStatus, type ProgressFeature, type SessionLogEntry, type ProgressData, type ProgressFileData, } from './progress/index.js';
|
|
14
|
+
export { createSearchSkillsTool, clearSkillsCache, type SearchSkillsToolConfig, } from './search-skills.js';
|
|
17
15
|
export type { MemoryStore, MemoryConfig } from '../memory/types.js';
|
|
18
16
|
export { MarkdownMemoryStore } from '../memory/store.js';
|
|
19
17
|
export { createBrowserTool, browserTool, executeBrowserCommand, buildCommand, isBrowserCliAvailable, resetCliAvailability, browserInputSchema, BROWSER_ACTIONS, BROWSER_TOOL_DESCRIPTION, type BrowserInput, type BrowserAction, type BrowserResult, type BrowserConfig, } from './browser/index.js';
|
|
18
|
+
export { createWebSearchTool, webSearchTool, webSearchInputSchema, WEB_SEARCH_DESCRIPTION, type WebSearchInput, } from './web-search/index.js';
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.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BAAiB,EACjB,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,31 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Tools Module
|
|
3
|
-
*
|
|
4
|
-
* Central export for tool factory, provider, and utilities.
|
|
5
|
-
*/
|
|
6
|
-
// Glob Tool
|
|
7
1
|
export { globTool, createGlobTool, runRgFiles, formatGlobResult, } from './glob/index.js';
|
|
8
|
-
// Grep Tool
|
|
9
2
|
export { grepTool, createGrepTool, runRg, runRgCount, formatGrepResult, formatCountResult, downloadAndInstallRipgrep, } from './grep/index.js';
|
|
10
|
-
// AST-Grep Tool
|
|
11
3
|
export { astGrepSearchTool, astGrepReplaceTool, createAstGrepTools, runSg, ensureAstGrepBinary, formatSearchResult, formatReplaceResult, } from './ast-grep/index.js';
|
|
12
|
-
|
|
13
|
-
export { createShellTool, shellTool, executeShellCommand, addToAllowlist, clearAllowlist, getAllowlist, SHELL_DESCRIPTION, DEFAULT_TIMEOUT, MAX_TIMEOUT, INTERACTIVE_COMMANDS, } from './shell/index.js';
|
|
14
|
-
// Plan Tool
|
|
4
|
+
export { createShellTool, shellTool, executeShellCommand, addToAllowlist, clearAllowlist, getAllowlist, SHELL_DESCRIPTION, DEFAULT_TIMEOUT, MAX_TIMEOUT, INTERACTIVE_COMMANDS, createBackgroundTool, clearBackgroundSessions, getBackgroundSessions, } from './shell/index.js';
|
|
15
5
|
export { createPlanTool, createValidationTool, runTypeCheck, runTestCommand, MAX_PLAN_STEPS, DELEGATION_THRESHOLD, PLAN_DESCRIPTION, VALIDATION_DESCRIPTION, AVAILABLE_AGENTS, } from './plan/index.js';
|
|
16
|
-
// Deep Reasoning Tool
|
|
17
6
|
export { createDeepReasoningTool, DeepReasoningEngine, configureDeepReasoning, isDeepReasoningEnabled, getDeepReasoningEngine, resetDeepReasoningEngine, DEEP_REASONING_DESCRIPTION, UNRESTRICTED_MODE_DESCRIPTION, DEFAULT_MAX_HISTORY, DEFAULT_MAX_BRANCH_SIZE, } from './deep-reasoning/index.js';
|
|
18
|
-
// File Tools
|
|
19
7
|
export { createFileReadTool, createFileWriteTool, createFileEditTool, createFileCreateTool, createFileTools, } from './file/index.js';
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
|
|
23
|
-
export { ModelRetry, wrapToolWithRetry, wrapAllToolsWithRetry
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
|
|
27
|
-
export { createMemoryTools } from '../memory/tools.js';
|
|
8
|
+
export { createSpawnAgentTool, generateAgentId, spawnAgentParametersSchema, } from './spawn-agent/index.js';
|
|
9
|
+
export { createCheckAgentTool, checkAgentParametersSchema, } from './spawn-agent/check-agent.js';
|
|
10
|
+
export { AgentRegistry, } from './spawn-agent/registry.js';
|
|
11
|
+
export { ModelRetry, wrapToolWithRetry, wrapAllToolsWithRetry } from './model-retry.js';
|
|
12
|
+
export { wrapAllToolsWithWorkspace } from './workspace-middleware.js';
|
|
13
|
+
export { createProgressTools, } from './progress/index.js';
|
|
14
|
+
export { createSearchSkillsTool, clearSkillsCache, } from './search-skills.js';
|
|
28
15
|
export { MarkdownMemoryStore } from '../memory/store.js';
|
|
29
|
-
// Browser Tool
|
|
30
16
|
export { createBrowserTool, browserTool, executeBrowserCommand, buildCommand, isBrowserCliAvailable, resetCliAvailability, browserInputSchema, BROWSER_ACTIONS, BROWSER_TOOL_DESCRIPTION, } from './browser/index.js';
|
|
17
|
+
export { createWebSearchTool, webSearchTool, webSearchInputSchema, WEB_SEARCH_DESCRIPTION, } from './web-search/index.js';
|
|
31
18
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,gBAAgB,GAIjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,GAK1B,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,EACL,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GAKpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,oBAAoB,EAGpB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAEtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GASjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,uBAAuB,GAKxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAEhB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,0BAA0B,GAO3B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAK3B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,aAAa,GAId,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,yBAAyB,EAAmC,MAAM,wBAAwB,CAAC;AAEpG,OAAO,EACL,mBAAmB,GAMpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,wBAAwB,GAKzB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,GAEvB,MAAM,cAAc,CAAC"}
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Model Retry
|
|
3
|
-
*
|
|
4
|
-
* Error class and tool wrapper for LLM-retryable tool errors.
|
|
5
|
-
* When a tool throws ModelRetry, the error message is fed back to
|
|
6
|
-
* the model as corrective instructions, allowing it to retry with
|
|
7
|
-
* better parameters.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Throw this error from a tool execute function to instruct the LLM
|
|
11
|
-
* to retry with corrective guidance.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* execute: async ({ query }) => {
|
|
16
|
-
* if (query.length < 3) {
|
|
17
|
-
* throw new ModelRetry('Query too short. Provide at least 3 characters.');
|
|
18
|
-
* }
|
|
19
|
-
* // ...
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
1
|
export declare class ModelRetry extends Error {
|
|
24
2
|
readonly name = "ModelRetry";
|
|
25
3
|
constructor(message: string);
|
|
@@ -30,25 +8,7 @@ interface ToolLike {
|
|
|
30
8
|
execute?: Function;
|
|
31
9
|
[key: string]: unknown;
|
|
32
10
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Wraps a tool's execute function to catch ModelRetry errors and
|
|
35
|
-
* return corrective instructions to the model instead of failing.
|
|
36
|
-
*
|
|
37
|
-
* After maxRetries consecutive ModelRetry errors, the last error
|
|
38
|
-
* message is returned as a final failure.
|
|
39
|
-
*
|
|
40
|
-
* @param tool - An AI SDK tool definition
|
|
41
|
-
* @param maxRetries - Maximum retries per invocation (default: 3)
|
|
42
|
-
* @returns A new tool with retry-aware execution
|
|
43
|
-
*/
|
|
44
11
|
export declare function wrapToolWithRetry<T extends ToolLike>(toolDef: T, maxRetries?: number): T;
|
|
45
|
-
/**
|
|
46
|
-
* Wrap all tools in a tool set with retry handling.
|
|
47
|
-
*
|
|
48
|
-
* @param tools - Record of tool name to tool definition
|
|
49
|
-
* @param maxRetries - Maximum retries per tool per invocation
|
|
50
|
-
* @returns New tools record with retry-aware execution
|
|
51
|
-
*/
|
|
52
12
|
export declare function wrapAllToolsWithRetry<T extends Record<string, ToolLike>>(tools: T, maxRetries?: number): T;
|
|
53
13
|
export {};
|
|
54
14
|
//# sourceMappingURL=model-retry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-retry.d.ts","sourceRoot":"","sources":["../../src/tools/model-retry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-retry.d.ts","sourceRoot":"","sources":["../../src/tools/model-retry.ts"],"names":[],"mappings":"AAIA,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAkB,IAAI,gBAAgB;gBAE1B,OAAO,EAAE,MAAM;CAG5B;AAID,UAAU,QAAQ;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,QAAQ,EAClD,OAAO,EAAE,CAAC,EACV,UAAU,GAAE,MAA4B,GACvC,CAAC,CAgDH;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACtE,KAAK,EAAE,CAAC,EACR,UAAU,GAAE,MAA4B,GACvC,CAAC,CAQH"}
|
|
@@ -1,51 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @agntk/core - Model Retry
|
|
3
|
-
*
|
|
4
|
-
* Error class and tool wrapper for LLM-retryable tool errors.
|
|
5
|
-
* When a tool throws ModelRetry, the error message is fed back to
|
|
6
|
-
* the model as corrective instructions, allowing it to retry with
|
|
7
|
-
* better parameters.
|
|
8
|
-
*/
|
|
9
1
|
import { createLogger } from '@agntk/logger';
|
|
10
2
|
const log = createLogger('@agntk/core:model-retry');
|
|
11
|
-
// ============================================================================
|
|
12
|
-
// ModelRetry Error
|
|
13
|
-
// ============================================================================
|
|
14
|
-
/**
|
|
15
|
-
* Throw this error from a tool execute function to instruct the LLM
|
|
16
|
-
* to retry with corrective guidance.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* execute: async ({ query }) => {
|
|
21
|
-
* if (query.length < 3) {
|
|
22
|
-
* throw new ModelRetry('Query too short. Provide at least 3 characters.');
|
|
23
|
-
* }
|
|
24
|
-
* // ...
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
3
|
export class ModelRetry extends Error {
|
|
29
4
|
name = 'ModelRetry';
|
|
30
5
|
constructor(message) {
|
|
31
6
|
super(message);
|
|
32
7
|
}
|
|
33
8
|
}
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// wrapToolWithRetry
|
|
36
|
-
// ============================================================================
|
|
37
9
|
const DEFAULT_MAX_RETRIES = 3;
|
|
38
|
-
/**
|
|
39
|
-
* Wraps a tool's execute function to catch ModelRetry errors and
|
|
40
|
-
* return corrective instructions to the model instead of failing.
|
|
41
|
-
*
|
|
42
|
-
* After maxRetries consecutive ModelRetry errors, the last error
|
|
43
|
-
* message is returned as a final failure.
|
|
44
|
-
*
|
|
45
|
-
* @param tool - An AI SDK tool definition
|
|
46
|
-
* @param maxRetries - Maximum retries per invocation (default: 3)
|
|
47
|
-
* @returns A new tool with retry-aware execution
|
|
48
|
-
*/
|
|
49
10
|
export function wrapToolWithRetry(toolDef, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
50
11
|
const originalExecute = toolDef.execute;
|
|
51
12
|
if (!originalExecute)
|
|
@@ -56,7 +17,7 @@ export function wrapToolWithRetry(toolDef, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
56
17
|
try {
|
|
57
18
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
58
19
|
const result = await originalExecute(...args);
|
|
59
|
-
retryCount = 0;
|
|
20
|
+
retryCount = 0;
|
|
60
21
|
return result;
|
|
61
22
|
}
|
|
62
23
|
catch (err) {
|
|
@@ -75,7 +36,6 @@ export function wrapToolWithRetry(toolDef, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
75
36
|
retryExhausted: true,
|
|
76
37
|
});
|
|
77
38
|
}
|
|
78
|
-
// Return corrective instructions to the model
|
|
79
39
|
return JSON.stringify({
|
|
80
40
|
success: false,
|
|
81
41
|
error: err.message,
|
|
@@ -84,7 +44,6 @@ export function wrapToolWithRetry(toolDef, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
84
44
|
instruction: `Please retry with corrected parameters. ${err.message}`,
|
|
85
45
|
});
|
|
86
46
|
}
|
|
87
|
-
// Non-retryable errors pass through
|
|
88
47
|
throw err;
|
|
89
48
|
}
|
|
90
49
|
};
|
|
@@ -93,13 +52,6 @@ export function wrapToolWithRetry(toolDef, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
93
52
|
execute: wrappedExecute,
|
|
94
53
|
};
|
|
95
54
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Wrap all tools in a tool set with retry handling.
|
|
98
|
-
*
|
|
99
|
-
* @param tools - Record of tool name to tool definition
|
|
100
|
-
* @param maxRetries - Maximum retries per tool per invocation
|
|
101
|
-
* @returns New tools record with retry-aware execution
|
|
102
|
-
*/
|
|
103
55
|
export function wrapAllToolsWithRetry(tools, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
104
56
|
const wrapped = {};
|
|
105
57
|
for (const [name, toolDef] of Object.entries(tools)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-retry.js","sourceRoot":"","sources":["../../src/tools/model-retry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"model-retry.js","sourceRoot":"","sources":["../../src/tools/model-retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,GAAG,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;AAEpD,MAAM,OAAO,UAAW,SAAQ,KAAK;IACjB,IAAI,GAAG,YAAY,CAAC;IAEtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAED,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAU9B,MAAM,UAAU,iBAAiB,CAC/B,OAAU,EACV,aAAqB,mBAAmB;IAExC,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IACxC,IAAI,CAAC,eAAe;QAAE,OAAO,OAAO,CAAC;IAErC,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,8DAA8D;IAC9D,MAAM,cAAc,GAAG,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,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,OAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plan tool constants
|
|
3
|
-
*/
|
|
4
1
|
export declare const MAX_PLAN_STEPS = 100;
|
|
5
2
|
export declare const DELEGATION_THRESHOLD = 5;
|
|
6
3
|
export declare const PLAN_DESCRIPTION = "Create and track a task checklist. Actions: create (title + steps), decide (for large plans: delegate or proceed), update_status, add_step, add_note, view. For plans with 5+ steps, you MUST call decide before continuing. LIMIT: Max 100 steps.";
|
|
7
4
|
export declare const VALIDATION_DESCRIPTION = "Validate code after making changes. Checks TypeScript types, runs tests, and verifies quality.";
|
|
8
5
|
export declare const AVAILABLE_AGENTS: readonly [{
|
|
9
|
-
readonly role: "coder";
|
|
10
6
|
readonly specialization: "Production-quality code, reading codebases, testing, debugging, git operations";
|
|
11
7
|
}, {
|
|
12
|
-
readonly role: "researcher";
|
|
13
8
|
readonly specialization: "Web search, documentation retrieval, fact verification, synthesizing information";
|
|
14
9
|
}, {
|
|
15
|
-
readonly role: "analyst";
|
|
16
10
|
readonly specialization: "Data analysis, pattern recognition, statistical reasoning, presenting findings";
|
|
17
11
|
}];
|
|
18
12
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/constants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,eAAO,MAAM,gBAAgB,uPAA2R,CAAC;AAEzT,eAAO,MAAM,sBAAsB,mGAC+D,CAAC;AAEnG,eAAO,MAAM,gBAAgB;;;;;;EAanB,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plan tool constants
|
|
3
|
-
*/
|
|
4
1
|
export const MAX_PLAN_STEPS = 100;
|
|
5
2
|
export const DELEGATION_THRESHOLD = 5;
|
|
6
3
|
export const PLAN_DESCRIPTION = `Create and track a task checklist. Actions: create (title + steps), decide (for large plans: delegate or proceed), update_status, add_step, add_note, view. For plans with ${DELEGATION_THRESHOLD}+ steps, you MUST call decide before continuing. LIMIT: Max ${MAX_PLAN_STEPS} steps.`;
|
|
7
4
|
export const VALIDATION_DESCRIPTION = 'Validate code after making changes. Checks TypeScript types, runs tests, and verifies quality.';
|
|
8
5
|
export const AVAILABLE_AGENTS = [
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
{
|
|
7
|
+
specialization: 'Production-quality code, reading codebases, testing, debugging, git operations',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
specialization: 'Web search, documentation retrieval, fact verification, synthesizing information',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
specialization: 'Data analysis, pattern recognition, statistical reasoning, presenting findings',
|
|
14
|
+
},
|
|
12
15
|
];
|
|
13
16
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tools/plan/constants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/tools/plan/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,8KAA8K,oBAAoB,+DAA+D,cAAc,SAAS,CAAC;AAEzT,MAAM,CAAC,MAAM,sBAAsB,GACjC,gGAAgG,CAAC;AAEnG,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,cAAc,EACZ,gFAAgF;KACnF;IACD;QACE,cAAc,EACZ,kFAAkF;KACrF;IACD;QACE,cAAc,EACZ,gFAAgF;KACnF;CACO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createPlanTool, createValidationTool
|
|
1
|
+
export { createPlanTool, createValidationTool } from './tools.js';
|
|
2
2
|
export { runTypeCheck, runTestCommand } from './utils.js';
|
|
3
3
|
export type { Plan, PlanStep, PlanToolConfig, ScopeAssessment, PendingDecision, PlanInput, ValidationInput, ValidationResult, } from './types.js';
|
|
4
4
|
export { MAX_PLAN_STEPS, DELEGATION_THRESHOLD, PLAN_DESCRIPTION, VALIDATION_DESCRIPTION, AVAILABLE_AGENTS, } from './constants.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEvD,YAAY,EACV,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,eAAe,EACf,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
|
package/dist/tools/plan/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { createPlanTool, createValidationTool, } from './tools.js';
|
|
3
|
-
// Utility exports
|
|
1
|
+
export { createPlanTool, createValidationTool } from './tools.js';
|
|
4
2
|
export { runTypeCheck, runTestCommand } from './utils.js';
|
|
5
|
-
// Constant exports
|
|
6
3
|
export { MAX_PLAN_STEPS, DELEGATION_THRESHOLD, PLAN_DESCRIPTION, VALIDATION_DESCRIPTION, AVAILABLE_AGENTS, } from './constants.js';
|
|
7
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/plan/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/plan/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAavD,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type PlanToolConfig } from './types.js';
|
|
2
2
|
export declare function createPlanTool(config?: PlanToolConfig): import("ai").Tool<{
|
|
3
3
|
action: "create" | "decide" | "update_status" | "add_note" | "add_step" | "view";
|
|
4
|
-
steps?: string[] | undefined;
|
|
5
4
|
title?: string | undefined;
|
|
6
|
-
|
|
5
|
+
steps?: string[] | undefined;
|
|
7
6
|
decision?: "delegate" | "proceed" | undefined;
|
|
8
7
|
stepName?: string | undefined;
|
|
8
|
+
status?: "blocked" | "completed" | "pending" | "in_progress" | undefined;
|
|
9
9
|
note?: string | undefined;
|
|
10
10
|
}, string>;
|
|
11
11
|
export declare function createValidationTool(): import("ai").Tool<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/plan/tools.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,cAAc,EAIpB,MAAM,SAAS,CAAC;AAgBjB,wBAAgB,cAAc,CAAC,MAAM,GAAE,cAAmB;;;;;;;;WAmMzD;AAED,wBAAgB,oBAAoB;;;;WA8BnC"}
|