agentfootprint 8.2.0 → 8.3.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/AGENTS.md +1 -1
- package/CLAUDE.md +3 -2
- package/ai-instructions/claude-code/SKILL.md +1 -1
- package/dist/core/agent/buildAgentChart.js +3 -0
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +6 -0
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/stages/seed.js +2 -0
- package/dist/core/agent/stages/seed.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +21 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.js +3 -0
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js +6 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/stages/seed.js +2 -0
- package/dist/esm/core/agent/stages/seed.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.js +21 -0
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +7 -0
- package/dist/esm/events/payloads.d.ts +19 -0
- package/dist/esm/events/registry.d.ts +3 -1
- package/dist/esm/events/registry.js +2 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +21 -1
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillGraph.d.ts +19 -8
- package/dist/esm/lib/injection-engine/skillGraph.js +99 -29
- package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/esm/lib/injection-engine/types.d.ts +14 -0
- package/dist/esm/lib/injection-engine/types.js.map +1 -1
- package/dist/esm/tool-providers/skillScopedTools.d.ts +24 -17
- package/dist/esm/tool-providers/skillScopedTools.js +24 -17
- package/dist/esm/tool-providers/skillScopedTools.js.map +1 -1
- package/dist/events/registry.js +2 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +21 -1
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/lib/injection-engine/skillGraph.js +99 -29
- package/dist/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/lib/injection-engine/types.js.map +1 -1
- package/dist/tool-providers/skillScopedTools.js +24 -17
- package/dist/tool-providers/skillScopedTools.js.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +7 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +19 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +3 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/buildInjectionEngineSubflow.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillGraph.d.ts +19 -8
- package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/types.d.ts +14 -0
- package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
- package/dist/types/tool-providers/skillScopedTools.d.ts +24 -17
- package/dist/types/tool-providers/skillScopedTools.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* skillScopedTools — ToolProvider that exposes a tool subset only
|
|
3
|
-
*
|
|
2
|
+
* skillScopedTools — ToolProvider that exposes a tool subset only while a
|
|
3
|
+
* specific Skill is the one the model most recently loaded.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* to
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* **You probably don't need this.** If the tools belong to the skill, hand them
|
|
6
|
+
* to the skill: `defineSkill({ tools: [...], autoActivate: 'currentSkill' })`
|
|
7
|
+
* already narrows the LLM's tool list to the active skill, with no provider
|
|
8
|
+
* wiring at all. This provider is for tools that CAN'T ride on the skill —
|
|
9
|
+
* a list assembled elsewhere, discovered at runtime, or owned by another module.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Three facts worth knowing before you wire it:
|
|
12
|
+
*
|
|
13
|
+
* 1. **`ctx.activeSkillId` is the last `read_skill` activation, not the graph
|
|
14
|
+
* cursor.** The runtime fills it from the tail of `scope.activatedInjectionIds`,
|
|
15
|
+
* which only `read_skill` ever appends to. A skill that activated because an
|
|
16
|
+
* entry RULE matched, or because a `skillGraph()` edge routed into it, does
|
|
17
|
+
* NOT set it — `list(ctx)` will return `[]` for that skill. Scope by graph
|
|
18
|
+
* position with the skill's own `tools:[]` instead.
|
|
19
|
+
* 2. **One ToolProvider per agent.** `AgentBuilder.toolProvider()` throws on the
|
|
20
|
+
* second call. Compose several scopes into ONE provider (see the example
|
|
21
|
+
* below) rather than calling it in a loop.
|
|
22
|
+
* 3. It is pure compute — no Agent-runtime dependency — so it is equally usable
|
|
23
|
+
* from a test or a design-time inspection.
|
|
13
24
|
*
|
|
14
25
|
* @example One skill's tools, scoped by activation
|
|
15
26
|
* const billingTools = skillScopedTools('billing', [refundTool, chargeTool]);
|
|
16
27
|
* billingTools.list({ iteration: 1, activeSkillId: 'billing' });
|
|
17
28
|
* // → [refundTool, chargeTool]
|
|
18
29
|
* billingTools.list({ iteration: 1, activeSkillId: 'refund' });
|
|
19
|
-
* // → [] (different skill
|
|
30
|
+
* // → [] (a different skill was loaded)
|
|
20
31
|
* billingTools.list({ iteration: 1 });
|
|
21
|
-
* // → [] (
|
|
32
|
+
* // → [] (nothing loaded via read_skill — see fact 1 above)
|
|
22
33
|
*
|
|
23
34
|
* @example Compose with baseline + multiple skills
|
|
24
35
|
* const baseline = staticTools([lookupOrderTool, listSkills, readSkill]);
|
|
25
36
|
* const billingTbx = skillScopedTools('billing', [refundTool, chargeTool]);
|
|
26
37
|
* const refundTbx = skillScopedTools('refund', [reverseTool]);
|
|
27
38
|
*
|
|
28
|
-
* //
|
|
29
|
-
* // OR build a small wrapper that concatenates list(ctx) outputs:
|
|
39
|
+
* // ONE provider for the agent (see fact 2) — concatenate the scopes:
|
|
30
40
|
* const provider: ToolProvider = {
|
|
31
41
|
* id: 'composite',
|
|
32
42
|
* list: (ctx) => [
|
|
@@ -35,10 +45,7 @@
|
|
|
35
45
|
* ...refundTbx.list(ctx),
|
|
36
46
|
* ],
|
|
37
47
|
* };
|
|
38
|
-
*
|
|
39
|
-
* Note: the runtime that POPULATES `ctx.activeSkillId` from
|
|
40
|
-
* `scope.activatedInjectionIds` lands in Block C / v2.5+. Today,
|
|
41
|
-
* consumers can drive it manually for tests + design-time inspection.
|
|
48
|
+
* Agent.create({ provider: llm, model }).toolProvider(provider).build();
|
|
42
49
|
*/
|
|
43
50
|
import type { Tool } from '../core/tools.js';
|
|
44
51
|
import type { ToolProvider } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillScopedTools.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/skillScopedTools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"skillScopedTools.d.ts","sourceRoot":"","sources":["../../../src/tool-providers/skillScopedTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,YAAY,CAAC;AAGpE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,YAAY,CAgBtF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|