agentfootprint 9.90.0 → 9.92.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +213 -0
  3. package/CLAUDE.md +1 -1
  4. package/ai-instructions/claude-code/SKILL.md +1 -1
  5. package/dist/core/Agent.js +23 -7
  6. package/dist/core/Agent.js.map +1 -1
  7. package/dist/core/LLMCall.js +62 -7
  8. package/dist/core/LLMCall.js.map +1 -1
  9. package/dist/core/agent/buildAgentMessageApiChart.js +36 -3
  10. package/dist/core/agent/buildAgentMessageApiChart.js.map +1 -1
  11. package/dist/core/agent/buildMessageApiChart.js +26 -3
  12. package/dist/core/agent/buildMessageApiChart.js.map +1 -1
  13. package/dist/core/agent/buildToolRegistry.js +90 -33
  14. package/dist/core/agent/buildToolRegistry.js.map +1 -1
  15. package/dist/core/agent/messageApiReceipt.js +77 -0
  16. package/dist/core/agent/messageApiReceipt.js.map +1 -0
  17. package/dist/core/agent/stages/callLLM.js +1 -5
  18. package/dist/core/agent/stages/callLLM.js.map +1 -1
  19. package/dist/core/agent/stages/toolCalls.js +176 -28
  20. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  21. package/dist/core/slots/buildToolsSlot.js +209 -62
  22. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  23. package/dist/esm/core/Agent.js +24 -8
  24. package/dist/esm/core/Agent.js.map +1 -1
  25. package/dist/esm/core/LLMCall.d.ts +18 -0
  26. package/dist/esm/core/LLMCall.js +63 -8
  27. package/dist/esm/core/LLMCall.js.map +1 -1
  28. package/dist/esm/core/agent/buildAgentMessageApiChart.d.ts +22 -0
  29. package/dist/esm/core/agent/buildAgentMessageApiChart.js +37 -4
  30. package/dist/esm/core/agent/buildAgentMessageApiChart.js.map +1 -1
  31. package/dist/esm/core/agent/buildMessageApiChart.d.ts +32 -0
  32. package/dist/esm/core/agent/buildMessageApiChart.js +27 -4
  33. package/dist/esm/core/agent/buildMessageApiChart.js.map +1 -1
  34. package/dist/esm/core/agent/buildToolRegistry.d.ts +80 -31
  35. package/dist/esm/core/agent/buildToolRegistry.js +90 -33
  36. package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
  37. package/dist/esm/core/agent/messageApiReceipt.d.ts +82 -0
  38. package/dist/esm/core/agent/messageApiReceipt.js +73 -0
  39. package/dist/esm/core/agent/messageApiReceipt.js.map +1 -0
  40. package/dist/esm/core/agent/stages/callLLM.js +3 -7
  41. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  42. package/dist/esm/core/agent/stages/toolCalls.d.ts +43 -5
  43. package/dist/esm/core/agent/stages/toolCalls.js +174 -27
  44. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  45. package/dist/esm/core/agent/types.d.ts +15 -0
  46. package/dist/esm/core/slots/buildToolsSlot.d.ts +100 -0
  47. package/dist/esm/core/slots/buildToolsSlot.js +207 -61
  48. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  49. package/dist/esm/events/payloads.d.ts +92 -18
  50. package/dist/esm/events/registry.d.ts +5 -1
  51. package/dist/esm/events/registry.js +4 -0
  52. package/dist/esm/events/registry.js.map +1 -1
  53. package/dist/esm/lib/time-travel/receipt.d.ts +45 -13
  54. package/dist/esm/lib/time-travel/receipt.js +41 -10
  55. package/dist/esm/lib/time-travel/receipt.js.map +1 -1
  56. package/dist/esm/lib/time-travel/servedView.d.ts +36 -35
  57. package/dist/esm/lib/time-travel/servedView.js +64 -43
  58. package/dist/esm/lib/time-travel/servedView.js.map +1 -1
  59. package/dist/events/registry.js +4 -0
  60. package/dist/events/registry.js.map +1 -1
  61. package/dist/lib/time-travel/receipt.js +43 -11
  62. package/dist/lib/time-travel/receipt.js.map +1 -1
  63. package/dist/lib/time-travel/servedView.js +64 -43
  64. package/dist/lib/time-travel/servedView.js.map +1 -1
  65. package/dist/types/core/Agent.d.ts.map +1 -1
  66. package/dist/types/core/LLMCall.d.ts +18 -0
  67. package/dist/types/core/LLMCall.d.ts.map +1 -1
  68. package/dist/types/core/agent/buildAgentMessageApiChart.d.ts +22 -0
  69. package/dist/types/core/agent/buildAgentMessageApiChart.d.ts.map +1 -1
  70. package/dist/types/core/agent/buildMessageApiChart.d.ts +32 -0
  71. package/dist/types/core/agent/buildMessageApiChart.d.ts.map +1 -1
  72. package/dist/types/core/agent/buildToolRegistry.d.ts +80 -31
  73. package/dist/types/core/agent/buildToolRegistry.d.ts.map +1 -1
  74. package/dist/types/core/agent/messageApiReceipt.d.ts +83 -0
  75. package/dist/types/core/agent/messageApiReceipt.d.ts.map +1 -0
  76. package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
  77. package/dist/types/core/agent/stages/toolCalls.d.ts +43 -5
  78. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  79. package/dist/types/core/agent/types.d.ts +15 -0
  80. package/dist/types/core/agent/types.d.ts.map +1 -1
  81. package/dist/types/core/slots/buildToolsSlot.d.ts +100 -0
  82. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  83. package/dist/types/events/payloads.d.ts +92 -18
  84. package/dist/types/events/payloads.d.ts.map +1 -1
  85. package/dist/types/events/registry.d.ts +5 -1
  86. package/dist/types/events/registry.d.ts.map +1 -1
  87. package/dist/types/lib/time-travel/receipt.d.ts +45 -13
  88. package/dist/types/lib/time-travel/receipt.d.ts.map +1 -1
  89. package/dist/types/lib/time-travel/servedView.d.ts +36 -35
  90. package/dist/types/lib/time-travel/servedView.d.ts.map +1 -1
  91. package/package.json +1 -1
@@ -857,18 +857,36 @@ export interface ToolsDiscoveryFailedPayload {
857
857
  readonly durationMs: number;
858
858
  }
859
859
  /**
860
- * Emitted when two sources claim ONE tool name and the source the model READS is not
861
- * the source that will RUN (8.7.0).
862
- *
863
- * Today that is exactly one pair: a `ToolProvider` and an active Skill's
864
- * `inject.tools`. The tools slot merges `[static, provider, skill]` first-wins, so the
865
- * provider's schema reaches the LLM; the dispatcher resolves `registryByName` first,
866
- * which holds every skill tool and no provider tool, so the skill's `execute` runs.
867
- * The model reads one description and calls a different function.
868
- *
869
- * Not an error event: the run continues, a tool really executes, and the fix is a
870
- * rename. It fires once per offending name PER ITERATION, because a provider list is
871
- * resolved per iteration and a shadow can begin mid-run.
860
+ * The parties that can put a tool name on the wire or answer to one — the
861
+ * vocabulary `tools.shadowed` and `tools.claim_swallowed` name them in (9.92.0).
862
+ *
863
+ * • `registry` — a static `.tool()` registration;
864
+ * • `provider` — a `ToolProvider` (`.toolProvider()`, MCP through `staticTools`,
865
+ * `.selfExplain()`'s trace pack — its id says which);
866
+ * • `skill` — a skill's `tools:[]`, always-visible or scoped;
867
+ * • `framework` — an auto-attach the framework owns: `read_skill`, `present`,
868
+ * `skip_step`.
869
+ */
870
+ export type ToolNameChannel = 'provider' | 'registry' | 'skill' | 'framework';
871
+ /**
872
+ * Emitted, per iteration, for a tool name that two parties BOTH put forward
873
+ * for the wire and only one could win (8.7.0; re-subjected 9.92.0).
874
+ *
875
+ * Until 9.92.0 the two halves of a call could come from different parties:
876
+ * the tools slot merges `[static, provider, skill, step]` first-wins while the
877
+ * dispatcher resolved a build-time map first, so the model read one contract
878
+ * and called another implementation. Since 9.92.0 dispatch FOLLOWS THE OFFER —
879
+ * the party whose contract is on the wire is the party that answers — so
880
+ * `schemaFrom` and `dispatchTo` name the same party, and both are the wire's.
881
+ * The event still fires because the collision is still real: the losing
882
+ * party's contract was hidden behind the winner's on this iteration, and a
883
+ * rename is still the fix. The loser is named by the companion
884
+ * `tools.claim_swallowed`, which fires for every party that lost a name whether
885
+ * or not its contract competed this iteration.
886
+ *
887
+ * Not an error event: the run continues and a tool really executes. It fires
888
+ * once per contested name PER ITERATION, because a provider list is resolved
889
+ * per iteration and a collision can begin mid-run.
872
890
  *
873
891
  * Carries names only — never args, never results, never a description body.
874
892
  */
@@ -876,15 +894,71 @@ export interface ToolsShadowedPayload {
876
894
  /** The contested tool name. */
877
895
  readonly toolName: string;
878
896
  readonly iteration: number;
879
- /** Which source's SCHEMA the model was shown. */
880
- readonly schemaFrom: 'provider' | 'registry' | 'skill';
881
- /** That source's id — the `ToolProvider.id`, when it has one. */
897
+ /** Which party's CONTRACT the model was shown — the wire's party. */
898
+ readonly schemaFrom: ToolNameChannel;
899
+ /** That party's id — the `ToolProvider.id` or the skill id, when it has one. */
882
900
  readonly schemaFromId?: string;
883
- /** Which source's IMPLEMENTATION the dispatcher will resolve. */
884
- readonly dispatchTo: 'provider' | 'registry' | 'skill';
885
- /** That source's id — the skill id, for the provider↔skill pair. */
901
+ /** Which party's IMPLEMENTATION answers a call to this name — since 9.92.0
902
+ * always the wire's party, so it equals `schemaFrom`. Kept because a
903
+ * consumer that branched on it keeps working and the sentence stays true. */
904
+ readonly dispatchTo: ToolNameChannel;
905
+ /** That party's id, when it has one. */
886
906
  readonly dispatchToId?: string;
887
907
  }
908
+ /**
909
+ * Emitted, per iteration, for a party whose claim to a tool name is DEAD on
910
+ * that iteration: another party holds the name on the wire, and since dispatch
911
+ * follows the offer the loser's implementation cannot be reached by any call
912
+ * (9.92.0 — the `claim-swallowed` family of the divergence walk).
913
+ *
914
+ * It fires whether or not the loser's contract competed for the wire this
915
+ * iteration — a provider tool whose name a static `.tool()` already holds, a
916
+ * skill tool named after a framework auto-attach, a never-activated scoped
917
+ * skill's tool whose name a provider serves. Silence about a dead claim is the
918
+ * defect this event exists to end: the party registered a tool the model can
919
+ * never reach, and the trace said nothing.
920
+ *
921
+ * Carries names only — never args, never results, never a description body.
922
+ */
923
+ export interface ToolsClaimSwallowedPayload {
924
+ /** The contested tool name. */
925
+ readonly toolName: string;
926
+ readonly iteration: number;
927
+ /** The party whose claim is dead this iteration. */
928
+ readonly lostBy: ToolNameChannel;
929
+ /** That party's id — the `ToolProvider.id` or the skill id, when it has one. */
930
+ readonly lostById?: string;
931
+ /** The party holding the name on the wire — and therefore answering it. */
932
+ readonly wonBy: ToolNameChannel;
933
+ /** That party's id, when it has one. */
934
+ readonly wonById?: string;
935
+ }
936
+ /**
937
+ * Emitted when the dispatcher hands a call to a tool whose name was NOT on
938
+ * this iteration's wire (9.92.0).
939
+ *
940
+ * The capability law keeps a registry-routed tool dispatchable after a
941
+ * narrowing takes it off the offer — a later step's tool, a parked map's tool,
942
+ * a scoped skill's tool named from a restored transcript — and that is
943
+ * deliberate. What was missing was the record: a call answered by a tool the
944
+ * model was not shown on THIS call looked exactly like one that was. This is
945
+ * that record, once per such call. It fires ONLY when the answering party is
946
+ * the one the model last read this name under (or the name's only claimant
947
+ * when it was never served); a name whose last-served contract belonged to a
948
+ * party that can no longer answer is refused as a recorded tool result
949
+ * instead (`toolCalls.ts` · `notServedResult`), never handed to somebody else.
950
+ *
951
+ * Carries names only — never args, never results.
952
+ */
953
+ export interface ToolsAnsweredOffWirePayload {
954
+ readonly toolName: string;
955
+ readonly toolCallId: string;
956
+ readonly iteration: number;
957
+ /** The party whose implementation answered. */
958
+ readonly answeredBy: ToolNameChannel;
959
+ /** That party's id — the skill id or the `ToolProvider.id`, when it has one. */
960
+ readonly answeredById?: string;
961
+ }
888
962
  /** Shared shape of the four `tools.session_*` payloads. */
889
963
  interface ToolSessionPayloadBase {
890
964
  /** The tool that registered the cleanup. */
@@ -16,7 +16,7 @@
16
16
  * major bump. See agentfootprint_v2_detailed_design.md for rules.
17
17
  */
18
18
  import type { AgentfootprintEventEnvelope } from './types.js';
19
- import type { AgentHandoffPayload, AgentIterationEndPayload, AgentIterationStartPayload, AgentBudgetExhaustedPayload, AgentRouteDecidedPayload, AgentTurnEndPayload, AgentTurnStartPayload, CompositionEnterPayload, CompositionExitPayload, ConditionalRouteDecidedPayload, ContextBudgetPressurePayload, ContextEvaluatedPayload, ContextEvictedPayload, ContextInjectedPayload, ContextSlotComposedPayload, CostLimitHitPayload, CostTickPayload, EmbeddingGeneratedPayload, ErrorCircuitChangedPayload, ErrorFatalPayload, ErrorRecoveredPayload, ErrorRetriedPayload, EvalScorePayload, EvalThresholdCrossedPayload, AgentOutputSchemaValidationFailedPayload, AgentOutputContractUnmetPayload, AgentOutputSchemaRetryPayload, AgentEvidenceCheckedPayload, AgentGroundingNudgedPayload, AgentRunConfiguredPayload, AgentThinkingParseFailedPayload, StreamThinkingDeltaPayload, StreamThinkingEndPayload, FallbackTriggeredPayload, LLMEndPayload, LLMStartPayload, LLMTokenPayload, LoopIterationExitPayload, LoopIterationStartPayload, MemoryAttachedPayload, MemoryDetachedPayload, MemoryRetrievedPayload, MemoryStrategyAppliedPayload, MemoryWrittenPayload, ParallelBranchCompletePayload, ParallelForkStartPayload, ParallelMergeEndPayload, PauseRequestPayload, PauseResumePayload, CheckInRequestPayload, CheckInDecisionPayload, PermissionCheckPayload, PermissionGateClosedPayload, PermissionHaltPayload, PermissionGateOpenedPayload, CredentialRequestedPayload, CredentialAcquiredPayload, CredentialAuthorizationRequiredPayload, CredentialFailedPayload, ReliabilityFailFastPayload, ReliabilityRetriedPayload, ReliabilityRecoveredPayload, ResilienceOutputFallbackTriggeredPayload, ResilienceOutputCannedUsedPayload, RiskFlaggedPayload, SkillActivatedPayload, SkillDeactivatedPayload, SkillEscalatedPayload, SkillGraphDeclaredPayload, SkillRejectedPayload, SkillRerouteSupersededPayload, SkillRouteConflictPayload, SkillStepAdvancedPayload, SkillStepSkippedPayload, SkillStepsUnfinishedPayload, SkillTurnRoutedPayload, ToolAbsentPayload, ToolCoverageDeclaredPayload, ToolSemanticsDeclaredPayload, ToolsCodeRunPayload, ToolEffectPayload, ToolRepeatedCallPayload, ToolResultRefusedPayload, ToolEndPayload, ToolsActivatedPayload, ToolsDeactivatedPayload, ToolsDiscoveryStartedPayload, ToolsDiscoveryCompletedPayload, ToolsDiscoveryFailedPayload, ToolsShadowedPayload, ToolsSessionStartedPayload, ToolsSessionReusedPayload, ToolsSessionClosedPayload, ToolsSessionCloseFailedPayload, ToolsOfferedPayload, ToolProgressPayload, ToolStartPayload, ValidationArgsInvalidPayload, MiddlewareDecisionPayload, ArtifactMintedPayload, ArtifactResolvedPayload, ArtifactExpiredPayload, ArtifactRefusedPayload, ArtifactPresentedPayload, MapEngagedPayload, MapParkedPayload, IntegrityContextErrorPayload, IntegrityDispositionPayload, IntegrityExternalGroundUsedPayload } from './payloads.js';
19
+ import type { AgentHandoffPayload, AgentIterationEndPayload, AgentIterationStartPayload, AgentBudgetExhaustedPayload, AgentRouteDecidedPayload, AgentTurnEndPayload, AgentTurnStartPayload, CompositionEnterPayload, CompositionExitPayload, ConditionalRouteDecidedPayload, ContextBudgetPressurePayload, ContextEvaluatedPayload, ContextEvictedPayload, ContextInjectedPayload, ContextSlotComposedPayload, CostLimitHitPayload, CostTickPayload, EmbeddingGeneratedPayload, ErrorCircuitChangedPayload, ErrorFatalPayload, ErrorRecoveredPayload, ErrorRetriedPayload, EvalScorePayload, EvalThresholdCrossedPayload, AgentOutputSchemaValidationFailedPayload, AgentOutputContractUnmetPayload, AgentOutputSchemaRetryPayload, AgentEvidenceCheckedPayload, AgentGroundingNudgedPayload, AgentRunConfiguredPayload, AgentThinkingParseFailedPayload, StreamThinkingDeltaPayload, StreamThinkingEndPayload, FallbackTriggeredPayload, LLMEndPayload, LLMStartPayload, LLMTokenPayload, LoopIterationExitPayload, LoopIterationStartPayload, MemoryAttachedPayload, MemoryDetachedPayload, MemoryRetrievedPayload, MemoryStrategyAppliedPayload, MemoryWrittenPayload, ParallelBranchCompletePayload, ParallelForkStartPayload, ParallelMergeEndPayload, PauseRequestPayload, PauseResumePayload, CheckInRequestPayload, CheckInDecisionPayload, PermissionCheckPayload, PermissionGateClosedPayload, PermissionHaltPayload, PermissionGateOpenedPayload, CredentialRequestedPayload, CredentialAcquiredPayload, CredentialAuthorizationRequiredPayload, CredentialFailedPayload, ReliabilityFailFastPayload, ReliabilityRetriedPayload, ReliabilityRecoveredPayload, ResilienceOutputFallbackTriggeredPayload, ResilienceOutputCannedUsedPayload, RiskFlaggedPayload, SkillActivatedPayload, SkillDeactivatedPayload, SkillEscalatedPayload, SkillGraphDeclaredPayload, SkillRejectedPayload, SkillRerouteSupersededPayload, SkillRouteConflictPayload, SkillStepAdvancedPayload, SkillStepSkippedPayload, SkillStepsUnfinishedPayload, SkillTurnRoutedPayload, ToolAbsentPayload, ToolCoverageDeclaredPayload, ToolSemanticsDeclaredPayload, ToolsCodeRunPayload, ToolEffectPayload, ToolRepeatedCallPayload, ToolResultRefusedPayload, ToolEndPayload, ToolsActivatedPayload, ToolsDeactivatedPayload, ToolsDiscoveryStartedPayload, ToolsDiscoveryCompletedPayload, ToolsDiscoveryFailedPayload, ToolsShadowedPayload, ToolsClaimSwallowedPayload, ToolsAnsweredOffWirePayload, ToolsSessionStartedPayload, ToolsSessionReusedPayload, ToolsSessionClosedPayload, ToolsSessionCloseFailedPayload, ToolsOfferedPayload, ToolProgressPayload, ToolStartPayload, ValidationArgsInvalidPayload, MiddlewareDecisionPayload, ArtifactMintedPayload, ArtifactResolvedPayload, ArtifactExpiredPayload, ArtifactRefusedPayload, ArtifactPresentedPayload, MapEngagedPayload, MapParkedPayload, IntegrityContextErrorPayload, IntegrityDispositionPayload, IntegrityExternalGroundUsedPayload } from './payloads.js';
20
20
  export declare const EVENT_NAMES: {
21
21
  readonly composition: {
22
22
  readonly enter: "agentfootprint.composition.enter";
@@ -76,6 +76,8 @@ export declare const EVENT_NAMES: {
76
76
  readonly discoveryCompleted: "agentfootprint.tools.discovery_completed";
77
77
  readonly discoveryFailed: "agentfootprint.tools.discovery_failed";
78
78
  readonly shadowed: "agentfootprint.tools.shadowed";
79
+ readonly claimSwallowed: "agentfootprint.tools.claim_swallowed";
80
+ readonly answeredOffWire: "agentfootprint.tools.answered_off_wire";
79
81
  readonly sessionStarted: "agentfootprint.tools.session_started";
80
82
  readonly sessionReused: "agentfootprint.tools.session_reused";
81
83
  readonly sessionClosed: "agentfootprint.tools.session_closed";
@@ -224,6 +226,8 @@ export interface AgentfootprintEventMap {
224
226
  'agentfootprint.tools.discovery_completed': AgentfootprintEventEnvelope<'agentfootprint.tools.discovery_completed', ToolsDiscoveryCompletedPayload>;
225
227
  'agentfootprint.tools.discovery_failed': AgentfootprintEventEnvelope<'agentfootprint.tools.discovery_failed', ToolsDiscoveryFailedPayload>;
226
228
  'agentfootprint.tools.shadowed': AgentfootprintEventEnvelope<'agentfootprint.tools.shadowed', ToolsShadowedPayload>;
229
+ 'agentfootprint.tools.claim_swallowed': AgentfootprintEventEnvelope<'agentfootprint.tools.claim_swallowed', ToolsClaimSwallowedPayload>;
230
+ 'agentfootprint.tools.answered_off_wire': AgentfootprintEventEnvelope<'agentfootprint.tools.answered_off_wire', ToolsAnsweredOffWirePayload>;
227
231
  'agentfootprint.tools.session_started': AgentfootprintEventEnvelope<'agentfootprint.tools.session_started', ToolsSessionStartedPayload>;
228
232
  'agentfootprint.tools.session_reused': AgentfootprintEventEnvelope<'agentfootprint.tools.session_reused', ToolsSessionReusedPayload>;
229
233
  'agentfootprint.tools.session_closed': AgentfootprintEventEnvelope<'agentfootprint.tools.session_closed', ToolsSessionClosedPayload>;
@@ -77,6 +77,8 @@ export const EVENT_NAMES = {
77
77
  discoveryCompleted: 'agentfootprint.tools.discovery_completed',
78
78
  discoveryFailed: 'agentfootprint.tools.discovery_failed',
79
79
  shadowed: 'agentfootprint.tools.shadowed',
80
+ claimSwallowed: 'agentfootprint.tools.claim_swallowed',
81
+ answeredOffWire: 'agentfootprint.tools.answered_off_wire',
80
82
  sessionStarted: 'agentfootprint.tools.session_started',
81
83
  sessionReused: 'agentfootprint.tools.session_reused',
82
84
  sessionClosed: 'agentfootprint.tools.session_closed',
@@ -229,6 +231,8 @@ export const ALL_EVENT_TYPES = [
229
231
  'agentfootprint.tools.discovery_completed',
230
232
  'agentfootprint.tools.discovery_failed',
231
233
  'agentfootprint.tools.shadowed',
234
+ 'agentfootprint.tools.claim_swallowed',
235
+ 'agentfootprint.tools.answered_off_wire',
232
236
  'agentfootprint.tools.session_started',
233
237
  'agentfootprint.tools.session_reused',
234
238
  'agentfootprint.tools.session_closed',
@@ -1 +1 @@
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IACnC,0BAA0B;IAC1B,+BAA+B;IAC/B,2BAA2B;IAC3B,uCAAuC;IACvC,8BAA8B;IAC9B,gCAAgC;IAChC,4BAA4B;IAC5B,sCAAsC;IACtC,sCAAsC;IACtC,oCAAoC;IACpC,sCAAsC;IACtC,qDAAqD;IACrD,8CAA8C;IAC9C,8BAA8B;IAC9B,6BAA6B;IAC7B,gCAAgC;IAChC,iCAAiC;IACjC,oCAAoC;IACpC,oCAAoC;IACpC,iCAAiC;IACjC,mCAAmC;IACnC,kCAAkC;IAClC,kCAAkC;IAClC,oCAAoC;IACpC,4BAA4B;IAC5B,2BAA2B;IAC3B,wCAAwC;IACxC,sCAAsC;IACtC,+CAA+C;CACvC,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/events/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAqHH,yEAAyE;AACzE,gEAAgE;AAChE,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,WAAW,EAAE;QACX,KAAK,EAAE,kCAAkC;QACzC,IAAI,EAAE,iCAAiC;QACvC,SAAS,EAAE,uCAAuC;QAClD,cAAc,EAAE,4CAA4C;QAC5D,QAAQ,EAAE,sCAAsC;QAChD,YAAY,EAAE,0CAA0C;QACxD,cAAc,EAAE,4CAA4C;QAC5D,aAAa,EAAE,2CAA2C;KAC3D;IACD,KAAK,EAAE;QACL,SAAS,EAAE,iCAAiC;QAC5C,OAAO,EAAE,+BAA+B;QACxC,cAAc,EAAE,sCAAsC;QACtD,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,oCAAoC;QAClD,OAAO,EAAE,8BAA8B;QACvC,4BAA4B,EAAE,sDAAsD;QACpF,iBAAiB,EAAE,0CAA0C;QAC7D,mBAAmB,EAAE,4CAA4C;QACjE,eAAe,EAAE,uCAAuC;QACxD,eAAe,EAAE,uCAAuC;QACxD,aAAa,EAAE,qCAAqC;QACpD,mBAAmB,EAAE,4CA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;IACvC,+BAA+B;IAC/B,sCAAsC;IACtC,wCAAwC;IACxC,sCAAsC;IACtC,qCAAqC;IACrC,qCAAqC;IACrC,2CAA2C;IAC3C,6BAA6B;IAC7B,qCAAqC;IACrC,oCAAoC;IACpC,6BAA6B;IAC7B,+BAA+B;IAC/B,wCAAwC;IACxC,yCAAyC;IACzC,wCAAwC;IACxC,gCAAgC;IAChC,qCAAqC;IACrC,kCAAkC;IAClC,+BAA+B;IAC/B,yCAAyC;IACzC,qCAAqC;IACrC,kCAAkC;IAClC,oCAAoC;IACpC,mCAAmC;IACnC,uCAAuC;IACvC,gCAAgC;IAChC,iCAAiC;IACjC,uCAAuC;IACvC,uCAAuC;IACvC,gCAAgC;IAChC,qCAAqC;IACrC,oCAAoC;IACpC,kDAAkD;IAClD,kCAAkC;IAClC,6BAA6B;IAC7B,mCAAmC;IACnC,0BAA0B;IAC1B,+BAA+B;IAC/B,2BAA2B;IAC3B,uCAAuC;IACvC,8BAA8B;IAC9B,gCAAgC;IAChC,4BAA4B;IAC5B,sCAAsC;IACtC,sCAAsC;IACtC,oCAAoC;IACpC,sCAAsC;IACtC,qDAAqD;IACrD,8CAA8C;IAC9C,8BAA8B;IAC9B,6BAA6B;IAC7B,gCAAgC;IAChC,iCAAiC;IACjC,oCAAoC;IACpC,oCAAoC;IACpC,iCAAiC;IACjC,mCAAmC;IACnC,kCAAkC;IAClC,kCAAkC;IAClC,oCAAoC;IACpC,4BAA4B;IAC5B,2BAA2B;IAC3B,wCAAwC;IACxC,sCAAsC;IACtC,+CAA+C;CACvC,CAAC"}
@@ -3,10 +3,10 @@
3
3
  * was handed it.
4
4
  *
5
5
  * Role: Fold. This module owns the receipt's SHAPE and the one function that
6
- * mints one (`buildReceipt`); the agent's request assembly calls it and
7
- * commits the result under the scope key `receipt`, so the record lands
8
- * in the call-llm bundle that already exists. Nothing here executes,
9
- * reads scope, or emits.
6
+ * mints one (`buildReceipt`); every chart's request assembly calls it
7
+ * and commits the result under the scope key `receipt`, so the record
8
+ * lands in the call-llm bundle that already exists. Nothing here
9
+ * executes, reads scope, or emits.
10
10
  * Reads: its arguments.
11
11
  * Emits: N/A.
12
12
  *
@@ -26,9 +26,10 @@
26
26
  * did it not know that?" needs to see it. Even there the summaries are hashed,
27
27
  * never quoted, for the same reason everything else on a receipt is.
28
28
  *
29
- * Measured on 9.88.0, NO chart shape supplies it: a slot writes its drops to
30
- * `slotCompositions` inside its own subflow and no boundary bubbles that record
31
- * out, so the agent's request assembly has nothing to pass. The field is on the
29
+ * Measured on 9.88.0 and re-measured on 9.91.0 across all four minting charts,
30
+ * NO chart shape supplies it: a slot writes its drops to `slotCompositions`
31
+ * inside its own subflow and no boundary bubbles that record out, so a chart's
32
+ * request assembly has nothing to pass. The field is on the
32
33
  * shape because `buildReceipt` is a pure exported mint a caller can hand the
33
34
  * fact to, and because the law it obeys is worth stating once rather than the
34
35
  * day the record starts crossing. What is NOT done is go looking for it: a
@@ -82,6 +83,13 @@
82
83
  */
83
84
  import type { LLMMessage, LLMToolSchema } from '../../adapters/types.js';
84
85
  import type { ContextRole, ContextSlot, ContextSource } from '../../events/types.js';
86
+ /** What {@link receiptPieces} needs from one committed injection record — the
87
+ * three fields a receipt keeps of a system piece, and none of the rest. */
88
+ export interface SystemPieceRecord {
89
+ readonly rawContent?: string;
90
+ readonly slot: ContextSlot;
91
+ readonly source: ContextSource;
92
+ }
85
93
  /**
86
94
  * What a digest input records in place of a value JSON cannot express — a
87
95
  * cycle, a `BigInt`, anything `stableJson` refuses. It is a MARK, not an empty
@@ -101,9 +109,11 @@ export declare const UNSERIALIZABLE = "\u001F<unserializable>";
101
109
  * screen is rarely the person who read the source. Print it beside the record.
102
110
  *
103
111
  * ── THE MECHANISM, WHICH THE PRINTED SENTENCE NO LONGER NAMES (9.88.0) ─────
104
- * `buildReceipt` is called from `stages/callLLM.ts` with the request about to
105
- * be passed to `LLMProvider.complete` — the PORT, this library's last sight of
106
- * it. Three things sit downstream of that call and none of them is on the
112
+ * `buildReceipt` is called with the request about to be passed to
113
+ * `LLMProvider.complete` — the PORT, this library's last sight of it. Four
114
+ * stages call it since 9.91.0: the agent charts' (`stages/callLLM.ts`),
115
+ * `LLMCall.ts` · `callLLM`, and the two message-API charts' through
116
+ * `messageApiReceipt.ts`. Three things sit downstream of that call and none of them is on the
107
117
  * record: a provider decorated by the consumer (`complete()` wrapping
108
118
  * `complete()`), a vendor adapter's own serializer, and the vendor's
109
119
  * server-side defaults. `test/lib/time-travel/receipt-conformance.test.ts`
@@ -299,9 +309,10 @@ export interface Receipt {
299
309
  /** The sampling knobs the call went out with — see {@link ReceiptParams}. */
300
310
  readonly params: ReceiptParams;
301
311
  /**
302
- * Absent when no slot reported a drop — which, measured on 9.88.0, is EVERY
303
- * run in both chart shapes: no boundary bubbles `slotCompositions` out of the
304
- * slot subflow that writes it, so request assembly has nothing to pass. It is
312
+ * Absent when no slot reported a drop — which, measured on 9.88.0 and again
313
+ * on 9.91.0 across every chart that mints, is EVERY run: no boundary bubbles
314
+ * `slotCompositions` out of the slot subflow that writes it, so request
315
+ * assembly has nothing to pass. It is
305
316
  * a key of `servedView.ts` · `UNGAPPED_FIELDS` for that reason: its absence
306
317
  * is universal and says nothing about any particular recording. Absent means
307
318
  * nobody recorded a drop, never that nothing was dropped.
@@ -480,6 +491,27 @@ export interface BuildReceiptInput {
480
491
  readonly summaries: readonly string[];
481
492
  };
482
493
  }
494
+ /**
495
+ * The system pieces a receipt records, off the injection records a slot
496
+ * committed — the SURVIVORS of the join, in the order they were joined.
497
+ *
498
+ * ONE OWNER, because there are now four mints (9.91.0): the agent's `call-llm`
499
+ * stage, `LLMCall`'s, and the two message-API charts'. Written out at each of
500
+ * them, this five-line map is four chances to disagree about which record was
501
+ * piece 2 — and `servedAt` proves piece 2 against the receipt's piece 2, so a
502
+ * disagreement here reads as a defect in the record.
503
+ *
504
+ * It calls `contributingPieces`, which is also what the join itself calls, so
505
+ * an empty record cannot be a piece on the receipt and a blank line in the
506
+ * string, or the other way round.
507
+ *
508
+ * @example
509
+ * ```ts
510
+ * receiptPieces([{ rawContent: 'You are a bot.', slot: 'systemPrompt', source: 'static' }]);
511
+ * // [{ text: 'You are a bot.', slot: 'systemPrompt', source: 'static' }]
512
+ * ```
513
+ */
514
+ export declare function receiptPieces(records: readonly SystemPieceRecord[]): BuildReceiptInput['systemPieces'];
483
515
  /**
484
516
  * Mint the receipt for one composed request.
485
517
  *
@@ -3,10 +3,10 @@
3
3
  * was handed it.
4
4
  *
5
5
  * Role: Fold. This module owns the receipt's SHAPE and the one function that
6
- * mints one (`buildReceipt`); the agent's request assembly calls it and
7
- * commits the result under the scope key `receipt`, so the record lands
8
- * in the call-llm bundle that already exists. Nothing here executes,
9
- * reads scope, or emits.
6
+ * mints one (`buildReceipt`); every chart's request assembly calls it
7
+ * and commits the result under the scope key `receipt`, so the record
8
+ * lands in the call-llm bundle that already exists. Nothing here
9
+ * executes, reads scope, or emits.
10
10
  * Reads: its arguments.
11
11
  * Emits: N/A.
12
12
  *
@@ -26,9 +26,10 @@
26
26
  * did it not know that?" needs to see it. Even there the summaries are hashed,
27
27
  * never quoted, for the same reason everything else on a receipt is.
28
28
  *
29
- * Measured on 9.88.0, NO chart shape supplies it: a slot writes its drops to
30
- * `slotCompositions` inside its own subflow and no boundary bubbles that record
31
- * out, so the agent's request assembly has nothing to pass. The field is on the
29
+ * Measured on 9.88.0 and re-measured on 9.91.0 across all four minting charts,
30
+ * NO chart shape supplies it: a slot writes its drops to `slotCompositions`
31
+ * inside its own subflow and no boundary bubbles that record out, so a chart's
32
+ * request assembly has nothing to pass. The field is on the
32
33
  * shape because `buildReceipt` is a pure exported mint a caller can hand the
33
34
  * fact to, and because the law it obeys is worth stating once rather than the
34
35
  * day the record starts crossing. What is NOT done is go looking for it: a
@@ -80,6 +81,7 @@
80
81
  * for a renderer to print, and `servedView.ts` · `SERVED_GAPS` names the two
81
82
  * places a reader is most likely to mistake it for wire-level proof.
82
83
  */
84
+ import { contributingPieces } from '../../core/agent/composeRequest.js';
83
85
  import { sha256Hex } from './sha256.js';
84
86
  /**
85
87
  * The separator between two fields inside one digest input — ASCII UNIT
@@ -116,9 +118,11 @@ export const UNSERIALIZABLE = '\u001F<unserializable>';
116
118
  * screen is rarely the person who read the source. Print it beside the record.
117
119
  *
118
120
  * ── THE MECHANISM, WHICH THE PRINTED SENTENCE NO LONGER NAMES (9.88.0) ─────
119
- * `buildReceipt` is called from `stages/callLLM.ts` with the request about to
120
- * be passed to `LLMProvider.complete` — the PORT, this library's last sight of
121
- * it. Three things sit downstream of that call and none of them is on the
121
+ * `buildReceipt` is called with the request about to be passed to
122
+ * `LLMProvider.complete` — the PORT, this library's last sight of it. Four
123
+ * stages call it since 9.91.0: the agent charts' (`stages/callLLM.ts`),
124
+ * `LLMCall.ts` · `callLLM`, and the two message-API charts' through
125
+ * `messageApiReceipt.ts`. Three things sit downstream of that call and none of them is on the
122
126
  * record: a provider decorated by the consumer (`complete()` wrapping
123
127
  * `complete()`), a vendor adapter's own serializer, and the vendor's
124
128
  * server-side defaults. `test/lib/time-travel/receipt-conformance.test.ts`
@@ -320,6 +324,33 @@ export function messageDigestInput(message) {
320
324
  : digestJson(message.thinkingBlocks),
321
325
  ].join(FIELD_SEP);
322
326
  }
327
+ /**
328
+ * The system pieces a receipt records, off the injection records a slot
329
+ * committed — the SURVIVORS of the join, in the order they were joined.
330
+ *
331
+ * ONE OWNER, because there are now four mints (9.91.0): the agent's `call-llm`
332
+ * stage, `LLMCall`'s, and the two message-API charts'. Written out at each of
333
+ * them, this five-line map is four chances to disagree about which record was
334
+ * piece 2 — and `servedAt` proves piece 2 against the receipt's piece 2, so a
335
+ * disagreement here reads as a defect in the record.
336
+ *
337
+ * It calls `contributingPieces`, which is also what the join itself calls, so
338
+ * an empty record cannot be a piece on the receipt and a blank line in the
339
+ * string, or the other way round.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * receiptPieces([{ rawContent: 'You are a bot.', slot: 'systemPrompt', source: 'static' }]);
344
+ * // [{ text: 'You are a bot.', slot: 'systemPrompt', source: 'static' }]
345
+ * ```
346
+ */
347
+ export function receiptPieces(records) {
348
+ return contributingPieces(records).map((record) => ({
349
+ text: record.rawContent,
350
+ slot: record.slot,
351
+ source: record.source,
352
+ }));
353
+ }
323
354
  /**
324
355
  * The sampling knobs off the request the port was handed.
325
356
  *
@@ -1 +1 @@
1
- {"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../../../src/lib/time-travel/receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,GAAG,GAAG,QAAQ,CAAC;AAErB,wEAAwE;AACxE,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B,yDAAyD;AACzD,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,uEAAuE;AACvE,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,wEAAwE;IACxE,0EAA0E;IAC1E,kBAAkB,CAAC;AAErB,oDAAoD;AACpD,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAErC;;;2CAG2C;AAC3C,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAE7D;;oCAEoC;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAoLrC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,OAAe;IACxD,OAAO,SAAS,CAAC,GAAG,KAAK,GAAG,GAAG,GAAG,OAAO,E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C,mBAAmB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,KAAK;gBACtC,MAAM,EAAE,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aAC5E;SACF,CAAC;QACJ,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACzB;KACF,CAAC;AACJ,CAAC"}
@@ -54,39 +54,39 @@
54
54
  * unproved, in wording a renderer prints verbatim, and leaves the rest
55
55
  * standing.
56
56
  *
57
- * ── A CHART THAT MINTS NO RECEIPT DECLARES, IT DOES NOT MINT ───────────────
58
- * `buildReceipt` is called from exactly one place: the agent charts' `call-llm`
59
- * stage (`stages/callLLM.ts`). `LLMCall` and the two message-API charts
60
- * (`buildMessageApiChart`, `buildAgentMessageApiChart`) run their own `call-llm`
61
- * stage, so `epochAt` locates their epochs and `servedAt` rebuilds their views
62
- * — but no receipt is minted there, `ServedView.basis` is dropped, and until
63
- * 9.88.0 nothing said why. That is the Lens denying: a reader saw a view with
64
- * no model on it and no sentence explaining the absence.
65
- *
66
- * MINTING was the other option and it was refused. The reason that holds is
67
- * narrow and applies to the two message-API charts alone: they are exported
68
- * chart BUILDERS run on a consumer's own executor and their deps carry no run
69
- * id, so their hashes could not be salted. It is NOT true of `LLMCall`, which
70
- * owns its executor and mints a run id exactly as `Agent` does — a paragraph
71
- * here said otherwise until 9.88.0, in a sentence a renderer printed verbatim.
72
- *
73
- * A SECOND REASON WAS RECORDED AT THE TIME AND DOES NOT HOLD, and it is left
74
- * here refuted rather than deleted so nobody argues it again:
75
- * `Receipt.cache.transform` was said to have no honest value on a chart that
76
- * runs no cache strategy, because `'unchanged'` would claim a strategy
77
- * returned what it was given when none ran. But `Agent` runs with no cache
78
- * strategy record exactly that today — `buildReceipt` compares the request it
79
- * was handed against itself and writes `'unchanged'` — and
80
- * `receipt-conformance.test.ts` asserts it and calls it correct. So NO
81
- * recorded reason survives for `LLMCall`: it has the salt and it needs no
82
- * fourth enum value. It runs its own `call-llm` (`LLMCall.ts` · `callLLM`),
83
- * that stage does not call `buildReceipt`, and until somebody makes it the
84
- * absence is DECLARED rather than argued away.
85
- *
86
- * So the absence is DECLARED: `no-receipt-on-chart` names the fields only a
57
+ * ── EVERY CHART THAT SERVES A MODEL MINTS, EXCEPT WHERE IT CANNOT SALT ─────
58
+ * Until 9.91.0 `buildReceipt` was called from exactly one place — the agent
59
+ * charts' `call-llm` stage (`stages/callLLM.ts`) — and the three other charts
60
+ * that hand a model a request (`LLMCall.ts` · `callLLM`,
61
+ * `buildMessageApiChart`, `buildAgentMessageApiChart`) left
62
+ * `no-receipt-on-chart` on every view they produced. Two reasons were recorded
63
+ * for that at the time. NEITHER survived.
64
+ *
65
+ * The first was the cache verdict: `Receipt.cache.transform` was said to have
66
+ * no honest value on a chart that runs no cache strategy, because
67
+ * `'unchanged'` would claim a strategy returned what it was given when none
68
+ * ran. But an `Agent` running a pass-through strategy records exactly that
69
+ * today — `buildReceipt` compares the request it was handed against itself —
70
+ * and `receipt-conformance.test.ts` asserts it and calls it correct. No fourth
71
+ * enum value was needed, and none was added.
72
+ *
73
+ * The second was the SALT, and it survives on exactly two of the three charts
74
+ * and not for the reason first written down. `LLMCall` owns its executor and
75
+ * mints a run id per run exactly as `Agent` does (a paragraph here said
76
+ * otherwise until 9.88.0, in a sentence a renderer printed verbatim), so it
77
+ * mints. The message-API charts are exported chart BUILDERS handed to an
78
+ * executor the CALLER owns, and nothing in a stage's scope carries that
79
+ * executor's run id — so their deps take one (`getRunId`), and they mint when
80
+ * they are given one. Given none they mint NOTHING rather than salting every
81
+ * hash with an empty string, because the salt is what makes shipping
82
+ * fingerprints in a recording safe (`receipt.ts`, the third law).
83
+ *
84
+ * So a receipt-less view is still a shape this library produces — a chart
85
+ * builder run without a run id, a run that declined with `recordReceipt:
86
+ * false`, a consumer's own `call-llm` stage, a recording made before 9.88.0 —
87
+ * and the absence is DECLARED: `no-receipt-on-chart` names the fields only a
87
88
  * receipt carries and says what follows for them. The rebuild never needed the
88
- * receipt to work, and `servedAt`'s own `@param` is true about `LLMCall`
89
- * because the view it returns declares what it has and what it has not.
89
+ * receipt to work; what it loses is the WITNESS.
90
90
  *
91
91
  * ── AND THE CAUSE IS A VALUE, NOT A LIST INSIDE A SENTENCE ────────────────
92
92
  * That gap's sentence used to end with the causes that produce it. That is
@@ -463,9 +463,10 @@ export interface ServedView {
463
463
  * named entry in `gaps`, never as a missing view and never as a confident
464
464
  * empty one.
465
465
  *
466
- * @param source a runner (`Agent`, `LLMCall`) or a snapshot. On `LLMCall` and
467
- * the message-API charts the rebuild is complete but UNCHECKED: those charts
468
- * mint no receipt, so `basis` is absent and `gaps` carries
466
+ * @param source a runner (`Agent`, `LLMCall`) or a snapshot. Where no receipt
467
+ * was minted — a message-API chart handed no run id, a run that declined with
468
+ * `recordReceipt: false`, a chart of the caller's own — the rebuild is
469
+ * complete but UNCHECKED: `basis` is absent and `gaps` carries
469
470
  * `no-receipt-on-chart` saying so.
470
471
  * @param epoch the iteration number, 1-based — the run's own count.
471
472
  *