agentfootprint 10.9.0 → 10.10.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/CAPABILITIES.md +2 -0
- package/dist/core/Agent.js +25 -29
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +12 -16
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +3 -17
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +1 -12
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/evidence/frames.js +3 -1
- package/dist/core/agent/evidence/frames.js.map +1 -1
- package/dist/core/agent/findings/context.js +163 -0
- package/dist/core/agent/findings/context.js.map +1 -0
- package/dist/core/agent/findings/instruction.js +26 -0
- package/dist/core/agent/findings/instruction.js.map +1 -0
- package/dist/core/agent/findings/offer.js +9 -57
- package/dist/core/agent/findings/offer.js.map +1 -1
- package/dist/core/agent/findings/reserved.js +12 -83
- package/dist/core/agent/findings/reserved.js.map +1 -1
- package/dist/core/agent/stages/callLLM.js +24 -25
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/seed.js +6 -20
- package/dist/core/agent/stages/seed.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +3 -24
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/core/Agent.js +10 -14
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +0 -8
- package/dist/esm/core/agent/AgentBuilder.js +7 -11
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.d.ts +3 -12
- package/dist/esm/core/agent/buildAgentChart.js +3 -17
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js +1 -12
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/evidence/frames.js +4 -2
- package/dist/esm/core/agent/evidence/frames.js.map +1 -1
- package/dist/esm/core/agent/findings/context.d.ts +13 -0
- package/dist/esm/core/agent/findings/context.js +158 -0
- package/dist/esm/core/agent/findings/context.js.map +1 -0
- package/dist/esm/core/agent/findings/instruction.d.ts +12 -0
- package/dist/esm/core/agent/findings/instruction.js +22 -0
- package/dist/esm/core/agent/findings/instruction.js.map +1 -0
- package/dist/esm/core/agent/findings/offer.d.ts +9 -57
- package/dist/esm/core/agent/findings/offer.js +9 -57
- package/dist/esm/core/agent/findings/offer.js.map +1 -1
- package/dist/esm/core/agent/findings/reserved.d.ts +7 -31
- package/dist/esm/core/agent/findings/reserved.js +12 -83
- package/dist/esm/core/agent/findings/reserved.js.map +1 -1
- package/dist/esm/core/agent/stages/callLLM.d.ts +1 -0
- package/dist/esm/core/agent/stages/callLLM.js +25 -26
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/seed.d.ts +1 -0
- package/dist/esm/core/agent/stages/seed.js +6 -20
- package/dist/esm/core/agent/stages/seed.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +7 -0
- package/dist/esm/core/slots/buildToolsSlot.d.ts +2 -10
- package/dist/esm/core/slots/buildToolsSlot.js +3 -24
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/lib/saidByPerson.d.ts +2 -0
- package/dist/esm/lib/saidByPerson.js +3 -0
- package/dist/esm/lib/saidByPerson.js.map +1 -1
- package/dist/esm/time-travel/servedView.d.ts +1 -1
- package/dist/esm/time-travel/servedView.js +44 -154
- package/dist/esm/time-travel/servedView.js.map +1 -1
- package/dist/esm/trace-toolpack/causeCapture.d.ts +17 -0
- package/dist/esm/trace-toolpack/causeCapture.js +96 -0
- package/dist/esm/trace-toolpack/causeCapture.js.map +1 -0
- package/dist/esm/trace-toolpack/causeControl.d.ts +6 -0
- package/dist/esm/trace-toolpack/causeControl.js +45 -0
- package/dist/esm/trace-toolpack/causeControl.js.map +1 -0
- package/dist/esm/trace-toolpack/causeReader.js +11 -9
- package/dist/esm/trace-toolpack/causeReader.js.map +1 -1
- package/dist/esm/trace-toolpack/causeResponse.d.ts +3 -2
- package/dist/esm/trace-toolpack/causeResponse.js +27 -7
- package/dist/esm/trace-toolpack/causeResponse.js.map +1 -1
- package/dist/esm/trace-toolpack/causeSnapshot.d.ts +6 -1
- package/dist/esm/trace-toolpack/causeSnapshot.js +26 -15
- package/dist/esm/trace-toolpack/causeSnapshot.js.map +1 -1
- package/dist/esm/trace-toolpack/causeTools.js +1 -1
- package/dist/esm/trace-toolpack/causeTools.js.map +1 -1
- package/dist/lib/saidByPerson.js +4 -1
- package/dist/lib/saidByPerson.js.map +1 -1
- package/dist/time-travel/servedView.js +44 -154
- package/dist/time-travel/servedView.js.map +1 -1
- package/dist/trace-toolpack/causeCapture.js +103 -0
- package/dist/trace-toolpack/causeCapture.js.map +1 -0
- package/dist/trace-toolpack/causeControl.js +49 -0
- package/dist/trace-toolpack/causeControl.js.map +1 -0
- package/dist/trace-toolpack/causeReader.js +11 -9
- package/dist/trace-toolpack/causeReader.js.map +1 -1
- package/dist/trace-toolpack/causeResponse.js +27 -7
- package/dist/trace-toolpack/causeResponse.js.map +1 -1
- package/dist/trace-toolpack/causeSnapshot.js +31 -20
- package/dist/trace-toolpack/causeSnapshot.js.map +1 -1
- package/dist/trace-toolpack/causeTools.js +1 -1
- package/dist/trace-toolpack/causeTools.js.map +1 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +0 -8
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +3 -12
- 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/evidence/frames.d.ts.map +1 -1
- package/dist/types/core/agent/findings/context.d.ts +14 -0
- package/dist/types/core/agent/findings/context.d.ts.map +1 -0
- package/dist/types/core/agent/findings/instruction.d.ts +13 -0
- package/dist/types/core/agent/findings/instruction.d.ts.map +1 -0
- package/dist/types/core/agent/findings/offer.d.ts +9 -57
- package/dist/types/core/agent/findings/offer.d.ts.map +1 -1
- package/dist/types/core/agent/findings/reserved.d.ts +7 -31
- package/dist/types/core/agent/findings/reserved.d.ts.map +1 -1
- package/dist/types/core/agent/stages/callLLM.d.ts +1 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/seed.d.ts +1 -0
- package/dist/types/core/agent/stages/seed.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/core/slots/buildToolsSlot.d.ts +2 -10
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/lib/saidByPerson.d.ts +2 -0
- package/dist/types/lib/saidByPerson.d.ts.map +1 -1
- package/dist/types/time-travel/servedView.d.ts +1 -1
- package/dist/types/time-travel/servedView.d.ts.map +1 -1
- package/dist/types/trace-toolpack/causeCapture.d.ts +18 -0
- package/dist/types/trace-toolpack/causeCapture.d.ts.map +1 -0
- package/dist/types/trace-toolpack/causeControl.d.ts +7 -0
- package/dist/types/trace-toolpack/causeControl.d.ts.map +1 -0
- package/dist/types/trace-toolpack/causeReader.d.ts.map +1 -1
- package/dist/types/trace-toolpack/causeResponse.d.ts +3 -2
- package/dist/types/trace-toolpack/causeResponse.d.ts.map +1 -1
- package/dist/types/trace-toolpack/causeSnapshot.d.ts +6 -1
- package/dist/types/trace-toolpack/causeSnapshot.d.ts.map +1 -1
- package/package.json +3 -2
package/CAPABILITIES.md
CHANGED
|
@@ -35,6 +35,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
|
|
|
35
35
|
| replaying Anthropic thinking in its original content order; refusing known unsafe active-tool replay, observing each permitted completed-turn omission before sending, and retaining that decision across checkpoints | `LLMMessage.replay` + `UnsafeThinkingReplayError` + `LLMCallHooks.onReplayPrepared` + `agentfootprint.agent.thinking_omitted` | `src/adapters/llm/anthropicThinkingReplay.ts` | 10.1.0 |
|
|
36
36
|
| keeping personal data out of an agent's saved records — snapshot, narrative, every event, recordings, bug reports, answer accounts, the exporters — while the model, the tools and the caller keep the real values; the library's own list of the names the conversation travels under (proven per feature), joined with the fields your tools name; it reaches compositions (members' policies adopted) and runs a tool starts (`ctx.redact`), and readers of the record say "kept out", never "not recorded" or "no tool ran" | `Agent.create({ redact })` (a footprintjs `RedactionPolicy`) + `conversationRedaction` + `ToolExecutionContext.redact` | `src/redaction/` | 9.140.0 |
|
|
37
37
|
| prompt caching that keeps hitting behind `withRetry`, `withFallback` or your own provider wrapper — the cache strategy chosen from what the adapter DECLARES (explicit breakpoints / automatic / none), never from its name, plus a moving breakpoint on the conversation tail so each call reads back what the last one sent | `LLMProvider.promptCaching` (`PromptCaching`) + `cacheStrategyFor` + `BreakpointCacheStrategy` / `AutomaticCacheStrategy` / `NoOpCacheStrategy` | `src/cache/cacheStrategyFor.ts` | 9.138.0 |
|
|
38
|
+
| findings with stable tool contracts and immutable instructions, bounded late DATA outside cached history, unchanged citation admission, and call-scoped saved/resumed layout evidence | `.findings({ maxContextBytes })` + `findingsContext` + `servedAt` / `findings-layout` | `src/core/agent/findings/context.ts` | 10.10.0 |
|
|
38
39
|
| Bedrock Converse prompt caching for exact verified models and geography profiles, field/TTL restrictions and four-checkpoint limit; cache read/write counts on both transports; model-aware capabilities through resilience decorators; one build warning and fixed run metadata when requested caching is unavailable; the meter accepts real engine events from `.watch()` | `bedrock` + `BedrockProvider` | `src/adapters/llm/BedrockProvider.ts` | 10.8.0 |
|
|
39
40
|
| reading a static or model-aware prompt-cache capability before inspecting its mode, with unknown models failing closed | `promptCachingFor` | `src/cache/cacheStrategyFor.ts` | 10.8.0 |
|
|
40
41
|
| asking a model to think in the shape THAT model takes — budget tokens on Claude 4.6 and earlier, adaptive on 4.7 and later (and on any id the table does not know), a build-time refusal for a model that cannot think; one table per wire, an adapter option for an id the table cannot read, forwarded by every wrapper, answered per side by `withFallback` | `.thinking({ budget })` + `LLMProvider.thinkingMode` + the adapters' `thinkingMode` option + `ThinkingMode` + `UnsupportedThinkingError` | `src/adapters/llm/anthropicModels.ts` | 9.141.0 |
|
|
@@ -95,6 +96,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
|
|
|
95
96
|
| a value that must say how it knows itself — an unknown count that can never render as zero | `Claim<T>` (`known`/`unknown`/`notApplicable`) | `src/lib/claim/claim.ts` | 9.58.0 |
|
|
96
97
|
| asking a debugging model "what did this run contradict itself about, and why?" — the Context Integrity findings, joined to the step that filed them | `find_context_errors` | `src/trace-toolpack/traceToolpack.ts` | 9.61.0 |
|
|
97
98
|
| reading abnormal nodes, recorded dependency roots and downstream impact with bounded public Foottrace queries, scoped proof IDs and explicit unknown coverage; optional host-authorized storage graph, including inner tool and subflow questions | `attention_list` / `root_cause` / `impact` + `TraceToolpackArtifacts.cause` + `TraceToolpackOptions.cause` | `src/trace-toolpack/causeTools.ts` | 10.7.0 |
|
|
99
|
+
| admitting a completed native root-log capture for read-only cause tools without a custom graph; partial, legacy, child and resumed coverage stays uncertain with fixed reasons | `assessCapture` | `src/trace-toolpack/causeCapture.ts` | 10.10.0 |
|
|
98
100
|
| the model inventing an id or a reading that no tool ever returned — a deterministic fabrication detector on the final answer, with a posture for how hard it pushes back | `.namesAndNumbersFromEvidence()` + `posture` (`'assist'` record+flag, the default / `'guard'` one revision then ship flagged / `'rails'` refuse instead) + `shapes` + `exempt` + `minDigits` (default 4) + `nudge` (default off) | `src/core/agent/evidence/` | 9.35.0 |
|
|
99
101
|
| plain decimal readings honestly rounded at the written precision (opt-in; one carried number only, no new unitless arithmetic), and exactly-two numeric range endpoints checked after declared ID shapes; short bare endpoints retain minDigits | `AgentBuilder.namesAndNumbersFromEvidence` + `NamesAndNumbersOptions` + `EvidenceVerdict` + `ComputedFigure` | `src/core/agent/evidence/` | 10.8.0 |
|
|
100
102
|
| counting a HUMAN-VERIFIED value as ground for the choice-seam check — the person clicked a row, the app verified the cells against the artifact, and the id the model takes from that selection is not fabricated; the source label travels onto the record | `externalGrounds` + `ExternalGround` + `external_ground_used` | `src/integrity/unsupported-argument/check.ts` | 9.72.0 |
|
package/dist/core/Agent.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Agent — ReAct primitive (LLM + tools + iteration loop).
|
|
4
|
-
*
|
|
5
|
-
* Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
|
|
6
|
-
* Role: Layer-5 primitive (core/). Assembles the 3-slot context
|
|
7
|
-
* pipeline + callLLM + route decider + tool-calls subflow +
|
|
8
|
-
* loopTo. Composition nestable anywhere that accepts a Runner.
|
|
9
|
-
* Emits: Via internal recorders:
|
|
10
|
-
* agentfootprint.agent.turn_start / turn_end
|
|
11
|
-
* agentfootprint.agent.iteration_start / iteration_end
|
|
12
|
-
* agentfootprint.agent.route_decided
|
|
13
|
-
* agentfootprint.stream.llm_start / llm_end
|
|
14
|
-
* agentfootprint.stream.tool_start / tool_end
|
|
15
|
-
* agentfootprint.context.* (via ContextRecorder)
|
|
16
|
-
*/
|
|
17
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
3
|
if (k2 === undefined) k2 = k;
|
|
19
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -39,6 +24,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
39
24
|
};
|
|
40
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
26
|
exports.Agent = exports.AgentBuilder = void 0;
|
|
27
|
+
const context_js_1 = require("./agent/findings/context.js");
|
|
28
|
+
/**
|
|
29
|
+
* Agent — ReAct primitive (LLM + tools + iteration loop).
|
|
30
|
+
*
|
|
31
|
+
* Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
|
|
32
|
+
* Role: Layer-5 primitive (core/). Assembles the 3-slot context
|
|
33
|
+
* pipeline + callLLM + route decider + tool-calls subflow +
|
|
34
|
+
* loopTo. Composition nestable anywhere that accepts a Runner.
|
|
35
|
+
* Emits: Via internal recorders:
|
|
36
|
+
* agentfootprint.agent.turn_start / turn_end
|
|
37
|
+
* agentfootprint.agent.iteration_start / iteration_end
|
|
38
|
+
* agentfootprint.agent.route_decided
|
|
39
|
+
* agentfootprint.stream.llm_start / llm_end
|
|
40
|
+
* agentfootprint.stream.tool_start / tool_end
|
|
41
|
+
* agentfootprint.context.* (via ContextRecorder)
|
|
42
|
+
*/
|
|
42
43
|
const footprintjs_1 = require("footprintjs");
|
|
43
44
|
const types_js_1 = require("../reliability/types.js");
|
|
44
45
|
const extractSequence_js_1 = require("../security/extractSequence.js");
|
|
@@ -867,7 +868,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
867
868
|
if (opts.toolArgValidation !== undefined)
|
|
868
869
|
this.toolArgValidation = opts.toolArgValidation;
|
|
869
870
|
if (opts.findings !== undefined)
|
|
870
|
-
this.findingsOptions =
|
|
871
|
+
this.findingsOptions = {
|
|
872
|
+
...opts.findings,
|
|
873
|
+
maxContextBytes: (0, context_js_1.findingsContextBytes)(opts.findings.maxContextBytes),
|
|
874
|
+
};
|
|
871
875
|
// The inputs layer's door (honesty layer 2): `true`, or `{ argumentSources }`
|
|
872
876
|
// — either form mounts the layer; the object form may also arm declared
|
|
873
877
|
// sources without the findings ledger.
|
|
@@ -1003,20 +1007,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1003
1007
|
if (opts.keepLedgerFacts !== undefined)
|
|
1004
1008
|
requireKeepLedgerFacts(opts.keepLedgerFacts, 'Agent');
|
|
1005
1009
|
if (this.findingsOptions !== undefined) {
|
|
1006
|
-
//
|
|
1007
|
-
//
|
|
1008
|
-
// name (`findings/offer.ts · offeredResultIds`, bound at the Tools
|
|
1009
|
-
// mount) — and on a hosted model that binding is what makes a standing
|
|
1010
|
-
// resolve at all (docs/design/2026-09-findings-ledger-real-model.md).
|
|
1011
|
-
// `reactMode: 'classic'` selects the Tools branch on turn 1 only, so an
|
|
1012
|
-
// armed classic agent would serve the offer-less base on every call and
|
|
1013
|
-
// file every standing as `unknownId`. Refused loud, here at build, the
|
|
1014
|
-
// `AgentBuilder.selfExplain` twin — never a silent degrade.
|
|
1010
|
+
// Keep the supported findings execution modes explicit. This change
|
|
1011
|
+
// restores prefix caching; it does not add findings support to classic.
|
|
1015
1012
|
if (this.reactMode === 'classic') {
|
|
1016
|
-
throw new Error("Agent: .findings()
|
|
1017
|
-
'caches the tools slot on turn 1, so the ids the model may name (bound into every ' +
|
|
1018
|
-
'served tool schema from the second call on) would never reach it and every standing ' +
|
|
1019
|
-
"would file as unknownId. Use the default 'dynamic' mode (or 'dynamic-grouped').");
|
|
1013
|
+
throw new Error("Agent: .findings() is supported in 'dynamic' and 'dynamic-grouped' modes only; reactMode 'classic' is not supported.");
|
|
1020
1014
|
}
|
|
1021
1015
|
this.keepLedgerFacts = resolveKeepLedgerFacts(this.findingsOptions.keepLedgerFacts ?? opts.keepLedgerFacts);
|
|
1022
1016
|
}
|
|
@@ -4204,6 +4198,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4204
4198
|
...(this.findingsOptions !== undefined && {
|
|
4205
4199
|
findings: true,
|
|
4206
4200
|
findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
|
|
4201
|
+
findingsContextBytes: this.findingsOptions.maxContextBytes,
|
|
4207
4202
|
// The answer-turn ask (9.103.0): VALUE-conditional inside the arm —
|
|
4208
4203
|
// the default `'none'` threads nothing and writes no key.
|
|
4209
4204
|
...(this.findingsOptions.answerAsk === 'quote-facts' && {
|
|
@@ -4706,6 +4701,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4706
4701
|
findings: true,
|
|
4707
4702
|
hasFindingsLedger: true,
|
|
4708
4703
|
findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
|
|
4704
|
+
findingsContextBytes: this.findingsOptions.maxContextBytes,
|
|
4709
4705
|
// The answer-turn ask (9.103.0): the same value seed records, so the
|
|
4710
4706
|
// wire and the rebuild append it from one fact; absent on `'none'`.
|
|
4711
4707
|
...(this.findingsOptions.answerAsk === 'quote-facts' && {
|