agentfootprint 10.8.1 → 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 +3 -0
- package/dist/core/Agent.js +27 -30
- 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 +2 -12
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/composeRequest.js +5 -2
- package/dist/core/agent/composeRequest.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/admission.js +140 -0
- package/dist/core/agent/findings/admission.js.map +1 -0
- package/dist/core/agent/findings/answerAdmission.js +90 -0
- package/dist/core/agent/findings/answerAdmission.js.map +1 -0
- 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/ledger.js +17 -5
- package/dist/core/agent/findings/ledger.js.map +1 -1
- package/dist/core/agent/findings/offer.js +9 -57
- package/dist/core/agent/findings/offer.js.map +1 -1
- package/dist/core/agent/findings/peel.js +12 -1
- package/dist/core/agent/findings/peel.js.map +1 -1
- package/dist/core/agent/findings/refusal.js +68 -0
- package/dist/core/agent/findings/refusal.js.map +1 -0
- package/dist/core/agent/findings/reserved.js +12 -83
- package/dist/core/agent/findings/reserved.js.map +1 -1
- package/dist/core/agent/findings/serve.js +3 -10
- package/dist/core/agent/findings/serve.js.map +1 -1
- package/dist/core/agent/findings/ticket.js +13 -0
- package/dist/core/agent/findings/ticket.js.map +1 -0
- package/dist/core/agent/honesty/mounts.js +42 -26
- package/dist/core/agent/honesty/mounts.js.map +1 -1
- package/dist/core/agent/stages/callLLM.js +55 -47
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/reliabilityExecution.js +2 -0
- package/dist/core/agent/stages/reliabilityExecution.js.map +1 -1
- package/dist/core/agent/stages/route.js +29 -28
- package/dist/core/agent/stages/route.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/agent/stages/toolCalls.js +124 -73
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/runCheckpoint.js +4 -1
- package/dist/core/runCheckpoint.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 +12 -15
- 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 +2 -12
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/composeRequest.d.ts +2 -1
- package/dist/esm/core/agent/composeRequest.js +5 -2
- package/dist/esm/core/agent/composeRequest.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/admission.d.ts +26 -0
- package/dist/esm/core/agent/findings/admission.js +134 -0
- package/dist/esm/core/agent/findings/admission.js.map +1 -0
- package/dist/esm/core/agent/findings/answerAdmission.d.ts +13 -0
- package/dist/esm/core/agent/findings/answerAdmission.js +61 -0
- package/dist/esm/core/agent/findings/answerAdmission.js.map +1 -0
- 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/ledger.d.ts +4 -1
- package/dist/esm/core/agent/findings/ledger.js +17 -5
- package/dist/esm/core/agent/findings/ledger.js.map +1 -1
- 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/peel.d.ts +6 -1
- package/dist/esm/core/agent/findings/peel.js +12 -1
- package/dist/esm/core/agent/findings/peel.js.map +1 -1
- package/dist/esm/core/agent/findings/refusal.d.ts +15 -0
- package/dist/esm/core/agent/findings/refusal.js +63 -0
- package/dist/esm/core/agent/findings/refusal.js.map +1 -0
- 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/findings/serve.d.ts +2 -12
- package/dist/esm/core/agent/findings/serve.js +1 -8
- package/dist/esm/core/agent/findings/serve.js.map +1 -1
- package/dist/esm/core/agent/findings/ticket.d.ts +13 -0
- package/dist/esm/core/agent/findings/ticket.js +9 -0
- package/dist/esm/core/agent/findings/ticket.js.map +1 -0
- package/dist/esm/core/agent/findings/types.d.ts +1 -1
- package/dist/esm/core/agent/honesty/mounts.d.ts +2 -62
- package/dist/esm/core/agent/honesty/mounts.js +17 -1
- package/dist/esm/core/agent/honesty/mounts.js.map +1 -1
- package/dist/esm/core/agent/stages/callLLM.d.ts +1 -0
- package/dist/esm/core/agent/stages/callLLM.js +56 -48
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/reliabilityExecution.d.ts +2 -0
- package/dist/esm/core/agent/stages/reliabilityExecution.js +2 -0
- package/dist/esm/core/agent/stages/reliabilityExecution.js.map +1 -1
- package/dist/esm/core/agent/stages/route.d.ts +4 -1
- package/dist/esm/core/agent/stages/route.js +28 -27
- package/dist/esm/core/agent/stages/route.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/stages/toolCalls.d.ts +0 -51
- package/dist/esm/core/agent/stages/toolCalls.js +99 -48
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +12 -0
- package/dist/esm/core/runCheckpoint.js +4 -1
- package/dist/esm/core/runCheckpoint.js.map +1 -1
- 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/hosting/standingAgent.js +3 -0
- package/dist/esm/hosting/standingAgent.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/provider-contract/requestObserver.d.ts +9 -0
- package/dist/esm/provider-contract/requestObserver.js +39 -0
- package/dist/esm/provider-contract/requestObserver.js.map +1 -0
- package/dist/esm/provider-contract/types.d.ts +9 -0
- package/dist/esm/provider-contract/types.js.map +1 -1
- package/dist/esm/redaction/conversation.js +1 -0
- package/dist/esm/redaction/conversation.js.map +1 -1
- package/dist/esm/redaction/knownStrings.js +3 -0
- package/dist/esm/redaction/knownStrings.js.map +1 -1
- package/dist/esm/resilience/withFallback.js +37 -9
- package/dist/esm/resilience/withFallback.js.map +1 -1
- package/dist/esm/resilience/withRetry.js +16 -5
- package/dist/esm/resilience/withRetry.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/hosting/standingAgent.js +3 -0
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/lib/saidByPerson.js +4 -1
- package/dist/lib/saidByPerson.js.map +1 -1
- package/dist/provider-contract/requestObserver.js +44 -0
- package/dist/provider-contract/requestObserver.js.map +1 -0
- package/dist/provider-contract/types.js.map +1 -1
- package/dist/redaction/conversation.js +1 -0
- package/dist/redaction/conversation.js.map +1 -1
- package/dist/redaction/knownStrings.js +3 -0
- package/dist/redaction/knownStrings.js.map +1 -1
- package/dist/resilience/withFallback.js +37 -9
- package/dist/resilience/withFallback.js.map +1 -1
- package/dist/resilience/withRetry.js +16 -5
- package/dist/resilience/withRetry.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/composeRequest.d.ts +2 -1
- package/dist/types/core/agent/composeRequest.d.ts.map +1 -1
- package/dist/types/core/agent/evidence/frames.d.ts.map +1 -1
- package/dist/types/core/agent/findings/admission.d.ts +27 -0
- package/dist/types/core/agent/findings/admission.d.ts.map +1 -0
- package/dist/types/core/agent/findings/answerAdmission.d.ts +14 -0
- package/dist/types/core/agent/findings/answerAdmission.d.ts.map +1 -0
- 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/ledger.d.ts +4 -1
- package/dist/types/core/agent/findings/ledger.d.ts.map +1 -1
- 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/peel.d.ts +6 -1
- package/dist/types/core/agent/findings/peel.d.ts.map +1 -1
- package/dist/types/core/agent/findings/refusal.d.ts +16 -0
- package/dist/types/core/agent/findings/refusal.d.ts.map +1 -0
- 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/findings/serve.d.ts +2 -12
- package/dist/types/core/agent/findings/serve.d.ts.map +1 -1
- package/dist/types/core/agent/findings/ticket.d.ts +14 -0
- package/dist/types/core/agent/findings/ticket.d.ts.map +1 -0
- package/dist/types/core/agent/findings/types.d.ts +1 -1
- package/dist/types/core/agent/findings/types.d.ts.map +1 -1
- package/dist/types/core/agent/honesty/mounts.d.ts +2 -62
- package/dist/types/core/agent/honesty/mounts.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/reliabilityExecution.d.ts +2 -0
- package/dist/types/core/agent/stages/reliabilityExecution.d.ts.map +1 -1
- package/dist/types/core/agent/stages/route.d.ts +4 -1
- package/dist/types/core/agent/stages/route.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/stages/toolCalls.d.ts +0 -51
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +12 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/runCheckpoint.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/hosting/standingAgent.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/provider-contract/requestObserver.d.ts +10 -0
- package/dist/types/provider-contract/requestObserver.d.ts.map +1 -0
- package/dist/types/provider-contract/types.d.ts +9 -0
- package/dist/types/provider-contract/types.d.ts.map +1 -1
- package/dist/types/redaction/conversation.d.ts.map +1 -1
- package/dist/types/redaction/knownStrings.d.ts.map +1 -1
- package/dist/types/resilience/withFallback.d.ts.map +1 -1
- package/dist/types/resilience/withRetry.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 |
|
|
@@ -139,6 +141,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
|
|
|
139
141
|
| scoping a skill's tools so they reach the model only while it is active | `toolsFromActiveSkill` + a no-arg posture (default off) + the stamp `autoActivate: 'currentSkill'` (a default, never an override) | `src/core/agent/toolsFromActiveSkill.ts` | 9.36.0 |
|
|
140
142
|
| subscribing to every event in one domain at once | `DomainWildcard` | `src/events/dispatcher.ts` | 9.4.0 |
|
|
141
143
|
| pausing a run for a person and resuming it later | `checkInApproved` / `checkInDeclined` (`{ by, note?, value? }`; a decline is NOT an abort — the model gets a "declined by human" tool result and adapts in-loop) | `src/core/checkin.ts` | 7.5.0 |
|
|
144
|
+
| refusing unserved, ambiguous, malformed or known not-dispatched findings citations before host callbacks and tool execution, with request-local accepted-attempt evidence, bounded diagnostics and JSON-answer admission; no additional model call or cache-layout change | `captureFindingsRequest` + `findingsReferenceRefusal` (internal; enabled by `.findings()`) | `src/core/agent/findings/admission.ts` | 10.9.0 |
|
|
142
145
|
| a SECOND source judging every tool result — a calibrated classifier asked what a result is worth for the declared proposition (never why the tool was called), its distribution and cost on the record beside the model's own standing, never merged, never served in its place (policy A) | `.findings({ judge })` + `Classifier` / `typesafe` / `mockClassifier` (`agentfootprint/classify`) + `JudgmentRow` / `JudgmentErrorRow` + `classifierScorer` (the scored entry choice, `agentfootprint/skill-graph`) | `src/classify/` | 9.104.0 |
|
|
143
146
|
| a classifier's reading of WHICH TOOL beside every model call — the ranking, the pick and the cost on the record before the call, the model's call and the agreement after it; optionally the served list narrowed to the top-N plus the doors, on the committed record the receipt hashes and the served view rebuilds; a miss recorded and the full wire served next call, never a refusal, never an override | `.toolChoice({ classifier, serve, alwaysServe })` + `ToolChoiceRow` + `ToolChoiceOutcomeRow` + `ToolChoiceErrorRow` + `ALWAYS_SERVED_TOOLS` + `recordToolChoice` + `narrowServed` (events `agentfootprint.tool_choice.*`, bench `npm run bench:tool-choice`) | `src/core/agent/toolChoice/` | 9.105.0 |
|
|
144
147
|
| a MAP of the domain the model can reason over when a result holds nothing — what each term IS (meaning, unit), how terms RELATE, which SOURCE holds a term (with the author's coverage sentence) and which registered TOOL reads it from there; declared once, validated against the tool registry at build, on the record as one run constant, served as one request-only system piece per call, never a fetch path and never inferred from | `defineOntology` + `.ontology(map)` (`AgentOptions.ontology`) + `AgentState.ontology` + `ontologyPiece` / `ONTOLOGY_INSTRUCTION` (`agentfootprint/ontology`) + `agentfootprint.ontology.served` | `src/ontology/` | 9.106.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
|
}
|
|
@@ -3937,7 +3931,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3937
3931
|
// Message-boundary refusal (7.18+) — a `messageMiddleware` returned
|
|
3938
3932
|
// `deny`; a refusal must never be mistaken for an answer: at 'input' no
|
|
3939
3933
|
// model was asked, and at 'output' the middleware declined to release it.
|
|
3940
|
-
if (this.messageMiddleware.length > 0) {
|
|
3934
|
+
if (this.messageMiddleware.length > 0 || this.findingsOptions !== undefined) {
|
|
3941
3935
|
const denied = state;
|
|
3942
3936
|
if (denied.messageDeniedReason !== undefined) {
|
|
3943
3937
|
return {
|
|
@@ -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' && {
|
|
@@ -5220,6 +5216,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5220
5216
|
// the chain's rewrites (a rewritten fill is not what the call ran with).
|
|
5221
5217
|
...(inputsArmed && {
|
|
5222
5218
|
inputsLayer: {
|
|
5219
|
+
...(this.findingsOptions !== undefined && { findings: true }),
|
|
5223
5220
|
toolOf: (toolName) => resolveForLayer(toolName).tool,
|
|
5224
5221
|
...(this.toolMiddleware.length > 0 && { rewrites: true }),
|
|
5225
5222
|
// The time layer (step T5a): a tool whose period declares forms is filled from the
|