agentfootprint 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CAPABILITIES.md +2 -2
- package/README.md +7 -3
- package/ai-instructions/claude-code/SKILL.md +1 -1
- package/ai-instructions/setup.sh +0 -0
- package/bin/agentfootprint-index.mjs +0 -0
- package/bin/agentfootprint-lint-tools.mjs +0 -0
- package/dist/adapters/observability/auditShapes.js +9 -31
- package/dist/adapters/observability/auditShapes.js.map +1 -1
- package/dist/bridge/eventMeta.js +1 -1
- package/dist/bridge/eventMeta.js.map +1 -1
- package/dist/context-bisect/ablation.js +1 -1
- package/dist/context-bisect/ablation.js.map +1 -1
- package/dist/context-bisect/arms/probe.js +1 -1
- package/dist/context-bisect/arms/probe.js.map +1 -1
- package/dist/context-bisect/restoration.js +1 -1
- package/dist/context-bisect/restoration.js.map +1 -1
- package/dist/core/Agent.js +799 -1144
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/LLMCall.js +47 -86
- package/dist/core/LLMCall.js.map +1 -1
- package/dist/core/RunnerBase.js +139 -213
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/arguments/answerRows.js +85 -0
- package/dist/core/agent/arguments/answerRows.js.map +1 -0
- package/dist/core/agent/arguments/ask.js +28 -91
- package/dist/core/agent/arguments/ask.js.map +1 -1
- package/dist/core/agent/arguments/dispatch.js +26 -9
- package/dist/core/agent/arguments/dispatch.js.map +1 -1
- package/dist/core/agent/arguments/kept.js +1 -1
- package/dist/core/agent/arguments/partialWindow.js +1 -1
- package/dist/core/agent/arguments/partialWindow.js.map +1 -1
- package/dist/core/agent/arguments/pendingPrivateAsk.js +123 -0
- package/dist/core/agent/arguments/pendingPrivateAsk.js.map +1 -0
- package/dist/core/agent/arguments/privateAnswers.js +213 -0
- package/dist/core/agent/arguments/privateAnswers.js.map +1 -0
- package/dist/core/agent/arguments/resolutionRows.js +175 -0
- package/dist/core/agent/arguments/resolutionRows.js.map +1 -0
- package/dist/core/agent/arguments/resolve.js +8 -144
- package/dist/core/agent/arguments/resolve.js.map +1 -1
- package/dist/core/agent/arguments/serve.js +3 -13
- package/dist/core/agent/arguments/serve.js.map +1 -1
- package/dist/core/agent/arguments/subflow.js +7 -1
- package/dist/core/agent/arguments/subflow.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildToolRegistry.js +1 -1
- package/dist/core/agent/callerIdentity.js +21 -106
- package/dist/core/agent/callerIdentity.js.map +1 -1
- package/dist/core/agent/chartContract.js +4 -0
- package/dist/core/agent/chartContract.js.map +1 -0
- package/dist/core/agent/checkpointDomain.js +59 -0
- package/dist/core/agent/checkpointDomain.js.map +1 -0
- package/dist/core/agent/componentObservers.js +134 -0
- package/dist/core/agent/componentObservers.js.map +1 -0
- package/dist/core/agent/componentResources.js +114 -0
- package/dist/core/agent/componentResources.js.map +1 -0
- package/dist/core/agent/evidence/evidenceIndex.js +1 -1
- package/dist/core/agent/evidence/evidenceIndex.js.map +1 -1
- package/dist/core/agent/evidence/frames.js +2 -1
- package/dist/core/agent/evidence/frames.js.map +1 -1
- package/dist/core/agent/evidence/servedJson.js +1 -1
- package/dist/core/agent/findings/contingent.js +1 -1
- package/dist/core/agent/findings/judge.js +1 -1
- package/dist/core/agent/findings/unsettled.js +3 -3
- package/dist/core/agent/honesty/inputsMountContract.js +3 -0
- package/dist/core/agent/honesty/inputsMountContract.js.map +1 -0
- package/dist/core/agent/honesty/mounts.js +42 -30
- package/dist/core/agent/honesty/mounts.js.map +1 -1
- package/dist/core/agent/hostTurn.js +40 -0
- package/dist/core/agent/hostTurn.js.map +1 -0
- package/dist/core/agent/pauseOwnership.js +105 -0
- package/dist/core/agent/pauseOwnership.js.map +1 -0
- package/dist/core/agent/presentTool.js +1 -1
- package/dist/core/agent/resultCeiling.js +1 -1
- package/dist/core/agent/resumeAnswer.js +49 -0
- package/dist/core/agent/resumeAnswer.js.map +1 -0
- package/dist/core/agent/resumeCheckpoint.js +40 -0
- package/dist/core/agent/resumeCheckpoint.js.map +1 -0
- package/dist/core/agent/resumeError.js +15 -0
- package/dist/core/agent/resumeError.js.map +1 -0
- package/dist/core/agent/run/clocks.js +88 -0
- package/dist/core/agent/run/clocks.js.map +1 -0
- package/dist/core/agent/run/commitRunRedaction.js +16 -0
- package/dist/core/agent/run/commitRunRedaction.js.map +1 -0
- package/dist/core/agent/run/eventStageIds.js +44 -0
- package/dist/core/agent/run/eventStageIds.js.map +1 -0
- package/dist/core/agent/run/injectionDelivery.js +30 -0
- package/dist/core/agent/run/injectionDelivery.js.map +1 -0
- package/dist/core/agent/run/ledgerFacts.js +36 -0
- package/dist/core/agent/run/ledgerFacts.js.map +1 -0
- package/dist/core/agent/run/resumeRedaction.js +41 -0
- package/dist/core/agent/run/resumeRedaction.js.map +1 -0
- package/dist/core/agent/run/withoutTime.js +17 -0
- package/dist/core/agent/run/withoutTime.js.map +1 -0
- package/dist/core/agent/runValues.js +18 -0
- package/dist/core/agent/runValues.js.map +1 -0
- package/dist/core/agent/scripts/rows.js +1 -1
- package/dist/core/agent/selfCallNotice.js +1 -1
- package/dist/core/agent/selfCallNotice.js.map +1 -1
- package/dist/core/agent/stages/argumentAsk.js +39 -10
- package/dist/core/agent/stages/argumentAsk.js.map +1 -1
- package/dist/core/agent/stages/argumentParties.js +54 -0
- package/dist/core/agent/stages/argumentParties.js.map +1 -0
- package/dist/core/agent/stages/batchParties.js +88 -0
- package/dist/core/agent/stages/batchParties.js.map +1 -0
- package/dist/core/agent/stages/callLLM.js +3 -3
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/finalStageContract.js +4 -0
- package/dist/core/agent/stages/finalStageContract.js.map +1 -0
- package/dist/core/agent/stages/prepareFinal.js +10 -1
- package/dist/core/agent/stages/prepareFinal.js.map +1 -1
- package/dist/core/agent/stages/searchCoverage.js +1 -1
- package/dist/core/agent/stages/seed.js +16 -32
- package/dist/core/agent/stages/seed.js.map +1 -1
- package/dist/core/agent/stages/servedParties.js +220 -0
- package/dist/core/agent/stages/servedParties.js.map +1 -0
- package/dist/core/agent/stages/timeLayer.js +2 -2
- package/dist/core/agent/stages/toolCallShape.js +22 -0
- package/dist/core/agent/stages/toolCallShape.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/argumentGate.js +48 -0
- package/dist/core/agent/stages/toolCalls/access/argumentGate.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/argumentValidation.js +33 -0
- package/dist/core/agent/stages/toolCalls/access/argumentValidation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/bindings.js +98 -0
- package/dist/core/agent/stages/toolCalls/access/bindings.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/callState.js +79 -0
- package/dist/core/agent/stages/toolCalls/access/callState.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/capabilityQuestion.js +81 -0
- package/dist/core/agent/stages/toolCalls/access/capabilityQuestion.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/checkInAdmission.js +144 -0
- package/dist/core/agent/stages/toolCalls/access/checkInAdmission.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/heldAnswer.js +39 -0
- package/dist/core/agent/stages/toolCalls/access/heldAnswer.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/middlewareAdmission.js +141 -0
- package/dist/core/agent/stages/toolCalls/access/middlewareAdmission.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/access/toolPermission.js +103 -0
- package/dist/core/agent/stages/toolCalls/access/toolPermission.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/completion.js +28 -0
- package/dist/core/agent/stages/toolCalls/batch/completion.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/dispatchContext.js +137 -0
- package/dist/core/agent/stages/toolCalls/batch/dispatchContext.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/execute.js +181 -0
- package/dist/core/agent/stages/toolCalls/batch/execute.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/findingsAdmission.js +52 -0
- package/dist/core/agent/stages/toolCalls/batch/findingsAdmission.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/inputResolutions.js +22 -0
- package/dist/core/agent/stages/toolCalls/batch/inputResolutions.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/paused.js +93 -0
- package/dist/core/agent/stages/toolCalls/batch/paused.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/refusal.js +36 -0
- package/dist/core/agent/stages/toolCalls/batch/refusal.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/settle.js +69 -0
- package/dist/core/agent/stages/toolCalls/batch/settle.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/batch/settlementOperations.js +107 -0
- package/dist/core/agent/stages/toolCalls/batch/settlementOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/compose.js +353 -0
- package/dist/core/agent/stages/toolCalls/compose.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/access.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/access.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/artifacts.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/artifacts.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/batchCall.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/batchCall.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/callCells.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/callCells.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/callFacts.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/callFacts.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/catalog.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/catalog.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/dispatchBatch.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/dispatchBatch.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/dispatchCall.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/dispatchCall.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/evidence.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/evidence.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/handlerDeps.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/handlerDeps.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/inputsDispatch.js +10 -0
- package/dist/core/agent/stages/toolCalls/contracts/inputsDispatch.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/invocationInputs.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/invocationInputs.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/observation.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/observation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/artifacts.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/artifacts.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/catalog.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/catalog.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/context.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/context.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/coverage.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/coverage.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/credentials.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/credentials.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/effects.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/effects.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/integrity.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/integrity.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/limits.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/limits.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/middleware.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/middleware.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/observations.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/observations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/progress.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/progress.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/resources.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/resources.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/scripts.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/scripts.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/semantics.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/semantics.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/settlement.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/settlement.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/steps.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/operations/steps.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/resources.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/resources.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/results.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/results.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/resumeFrames.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/resumeFrames.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/contracts/routing.js +3 -0
- package/dist/core/agent/stages/toolCalls/contracts/routing.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/decorators/limitsOperations.js +84 -0
- package/dist/core/agent/stages/toolCalls/decorators/limitsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/decorators/middlewareOperations.js +87 -0
- package/dist/core/agent/stages/toolCalls/decorators/middlewareOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/decorators/reportingCredentials.js +53 -0
- package/dist/core/agent/stages/toolCalls/decorators/reportingCredentials.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/coverageOperations.js +236 -0
- package/dist/core/agent/stages/toolCalls/evidence/coverageOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/integrityOperations.js +141 -0
- package/dist/core/agent/stages/toolCalls/evidence/integrityOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/judgeLanded.js +59 -0
- package/dist/core/agent/stages/toolCalls/evidence/judgeLanded.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/madeInRun.js +7 -0
- package/dist/core/agent/stages/toolCalls/evidence/madeInRun.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/producerCorpus.js +38 -0
- package/dist/core/agent/stages/toolCalls/evidence/producerCorpus.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/scriptsOperations.js +160 -0
- package/dist/core/agent/stages/toolCalls/evidence/scriptsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/semanticsOperations.js +94 -0
- package/dist/core/agent/stages/toolCalls/evidence/semanticsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/sourceClock.js +22 -0
- package/dist/core/agent/stages/toolCalls/evidence/sourceClock.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/evidence/towers.js +42 -0
- package/dist/core/agent/stages/toolCalls/evidence/towers.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/artifactsOperations.js +265 -0
- package/dist/core/agent/stages/toolCalls/execution/artifactsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/callStart.js +107 -0
- package/dist/core/agent/stages/toolCalls/execution/callStart.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/catalogOperations.js +200 -0
- package/dist/core/agent/stages/toolCalls/execution/catalogOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/contextOperations.js +190 -0
- package/dist/core/agent/stages/toolCalls/execution/contextOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/credentialAdmission.js +128 -0
- package/dist/core/agent/stages/toolCalls/execution/credentialAdmission.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/credentialsOperations.js +15 -0
- package/dist/core/agent/stages/toolCalls/execution/credentialsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js +172 -0
- package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/dispatchCall.js +515 -0
- package/dist/core/agent/stages/toolCalls/execution/dispatchCall.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/initialInvocation.js +368 -0
- package/dist/core/agent/stages/toolCalls/execution/initialInvocation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/resourcesOperations.js +90 -0
- package/dist/core/agent/stages/toolCalls/execution/resourcesOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js +429 -0
- package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/execution/wantedArguments.js +18 -0
- package/dist/core/agent/stages/toolCalls/execution/wantedArguments.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/dedupeIds.js +10 -0
- package/dist/core/agent/stages/toolCalls/helpers/dedupeIds.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/dispatchRefusals.js +83 -0
- package/dist/core/agent/stages/toolCalls/helpers/dispatchRefusals.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/mountedCursor.js +46 -0
- package/dist/core/agent/stages/toolCalls/helpers/mountedCursor.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/periodWarnings.js +60 -0
- package/dist/core/agent/stages/toolCalls/helpers/periodWarnings.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/readSkillRefusal.js +141 -0
- package/dist/core/agent/stages/toolCalls/helpers/readSkillRefusal.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/sourceNote.js +10 -0
- package/dist/core/agent/stages/toolCalls/helpers/sourceNote.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/helpers/unscopedRun.js +15 -0
- package/dist/core/agent/stages/toolCalls/helpers/unscopedRun.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/index.js +33 -0
- package/dist/core/agent/stages/toolCalls/index.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/observation/callSettlement.js +48 -0
- package/dist/core/agent/stages/toolCalls/observation/callSettlement.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/observation/observationsOperations.js +61 -0
- package/dist/core/agent/stages/toolCalls/observation/observationsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/observation/progressOperations.js +32 -0
- package/dist/core/agent/stages/toolCalls/observation/progressOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/resume/ask.js +427 -0
- package/dist/core/agent/stages/toolCalls/resume/ask.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/resume/checkIn.js +193 -0
- package/dist/core/agent/stages/toolCalls/resume/checkIn.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/resume/credential.js +139 -0
- package/dist/core/agent/stages/toolCalls/resume/credential.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/resume/handler.js +175 -0
- package/dist/core/agent/stages/toolCalls/resume/handler.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/resume/plain.js +144 -0
- package/dist/core/agent/stages/toolCalls/resume/plain.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/routing/effectsOperations.js +264 -0
- package/dist/core/agent/stages/toolCalls/routing/effectsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/routing/policyHalt.js +40 -0
- package/dist/core/agent/stages/toolCalls/routing/policyHalt.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/routing/readSkillRoute.js +238 -0
- package/dist/core/agent/stages/toolCalls/routing/readSkillRoute.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/routing/skillActivation.js +52 -0
- package/dist/core/agent/stages/toolCalls/routing/skillActivation.js.map +1 -0
- package/dist/core/agent/stages/toolCalls/routing/stepsOperations.js +149 -0
- package/dist/core/agent/stages/toolCalls/routing/stepsOperations.js.map +1 -0
- package/dist/core/agent/stages/toolResolver.js +84 -38
- package/dist/core/agent/stages/toolResolver.js.map +1 -1
- package/dist/core/agent/toolChoice/pick.js +1 -1
- package/dist/core/agent/toolResultCap.js +0 -0
- package/dist/core/agent/types.js +0 -3
- package/dist/core/agent/types.js.map +1 -1
- package/dist/core/agent/window/toolNames.js +3 -3
- package/dist/core/answerConsumption.js +16 -0
- package/dist/core/answerConsumption.js.map +1 -0
- package/dist/core/checkin.js +1 -1
- package/dist/core/codeRunnerTool.js +1 -1
- package/dist/core/consentLedger.js +124 -0
- package/dist/core/consentLedger.js.map +1 -0
- package/dist/core/consentRequest.js +38 -156
- package/dist/core/consentRequest.js.map +1 -1
- package/dist/core/conversation.js +15 -48
- package/dist/core/conversation.js.map +1 -1
- package/dist/core/memberRun.js +2 -1
- package/dist/core/memberRun.js.map +1 -1
- package/dist/core/pause.js +5 -5
- package/dist/core/pauseRecord.js +23 -0
- package/dist/core/pauseRecord.js.map +1 -0
- package/dist/core/runEntry.js +30 -0
- package/dist/core/runEntry.js.map +1 -0
- package/dist/core/runnerCoreValues.js +3 -0
- package/dist/core/runnerCoreValues.js.map +1 -0
- package/dist/core/runnerExecution.js +175 -0
- package/dist/core/runnerExecution.js.map +1 -0
- package/dist/core/runnerLive.js.map +1 -1
- package/dist/core/slots/buildThinkingSubflow.js +2 -2
- package/dist/core/slots/buildThinkingSubflow.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +25 -102
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/core/slots/discoverTools.js +99 -0
- package/dist/core/slots/discoverTools.js.map +1 -0
- package/dist/core-flow/Conditional.js +25 -72
- package/dist/core-flow/Conditional.js.map +1 -1
- package/dist/core-flow/Graph.js +63 -120
- package/dist/core-flow/Graph.js.map +1 -1
- package/dist/core-flow/Loop.js +28 -82
- package/dist/core-flow/Loop.js.map +1 -1
- package/dist/core-flow/Parallel.js +58 -148
- package/dist/core-flow/Parallel.js.map +1 -1
- package/dist/core-flow/Sequence.js +25 -73
- package/dist/core-flow/Sequence.js.map +1 -1
- package/dist/core-flow/Workflow.js +24 -72
- package/dist/core-flow/Workflow.js.map +1 -1
- package/dist/esm/adapters/observability/auditShapes.d.ts +5 -31
- package/dist/esm/adapters/observability/auditShapes.js +9 -31
- package/dist/esm/adapters/observability/auditShapes.js.map +1 -1
- package/dist/esm/adapters/observability/otel.d.ts +1 -1
- package/dist/esm/bridge/eventMeta.d.ts +2 -0
- package/dist/esm/bridge/eventMeta.js +1 -1
- package/dist/esm/bridge/eventMeta.js.map +1 -1
- package/dist/esm/context-bisect/ablation.js +1 -1
- package/dist/esm/context-bisect/ablation.js.map +1 -1
- package/dist/esm/context-bisect/arms/probe.js +1 -1
- package/dist/esm/context-bisect/arms/probe.js.map +1 -1
- package/dist/esm/context-bisect/restoration.js +1 -1
- package/dist/esm/context-bisect/restoration.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +18 -121
- package/dist/esm/core/Agent.js +800 -1145
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/LLMCall.d.ts +1 -4
- package/dist/esm/core/LLMCall.js +49 -88
- package/dist/esm/core/LLMCall.js.map +1 -1
- package/dist/esm/core/RunnerBase.d.ts +42 -114
- package/dist/esm/core/RunnerBase.js +140 -210
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/arguments/answerRows.d.ts +26 -0
- package/dist/esm/core/agent/arguments/answerRows.js +78 -0
- package/dist/esm/core/agent/arguments/answerRows.js.map +1 -0
- package/dist/esm/core/agent/arguments/ask.d.ts +5 -11
- package/dist/esm/core/agent/arguments/ask.js +24 -87
- package/dist/esm/core/agent/arguments/ask.js.map +1 -1
- package/dist/esm/core/agent/arguments/dispatch.d.ts +4 -4
- package/dist/esm/core/agent/arguments/dispatch.js +27 -10
- package/dist/esm/core/agent/arguments/dispatch.js.map +1 -1
- package/dist/esm/core/agent/arguments/kept.d.ts +1 -1
- package/dist/esm/core/agent/arguments/kept.js +1 -1
- package/dist/esm/core/agent/arguments/partialWindow.d.ts +2 -1
- package/dist/esm/core/agent/arguments/partialWindow.js +1 -1
- package/dist/esm/core/agent/arguments/partialWindow.js.map +1 -1
- package/dist/esm/core/agent/arguments/pendingPrivateAsk.d.ts +37 -0
- package/dist/esm/core/agent/arguments/pendingPrivateAsk.js +114 -0
- package/dist/esm/core/agent/arguments/pendingPrivateAsk.js.map +1 -0
- package/dist/esm/core/agent/arguments/privateAnswers.d.ts +46 -0
- package/dist/esm/core/agent/arguments/privateAnswers.js +198 -0
- package/dist/esm/core/agent/arguments/privateAnswers.js.map +1 -0
- package/dist/esm/core/agent/arguments/resolutionRows.d.ts +29 -0
- package/dist/esm/core/agent/arguments/resolutionRows.js +171 -0
- package/dist/esm/core/agent/arguments/resolutionRows.js.map +1 -0
- package/dist/esm/core/agent/arguments/resolve.d.ts +2 -13
- package/dist/esm/core/agent/arguments/resolve.js +8 -144
- package/dist/esm/core/agent/arguments/resolve.js.map +1 -1
- package/dist/esm/core/agent/arguments/serve.d.ts +0 -5
- package/dist/esm/core/agent/arguments/serve.js +3 -12
- package/dist/esm/core/agent/arguments/serve.js.map +1 -1
- package/dist/esm/core/agent/arguments/subflow.js +7 -1
- package/dist/esm/core/agent/arguments/subflow.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.d.ts +3 -326
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildToolRegistry.d.ts +1 -1
- package/dist/esm/core/agent/buildToolRegistry.js +1 -1
- package/dist/esm/core/agent/callerIdentity.d.ts +9 -64
- package/dist/esm/core/agent/callerIdentity.js +21 -106
- package/dist/esm/core/agent/callerIdentity.js.map +1 -1
- package/dist/esm/core/agent/chartContract.d.ts +327 -0
- package/dist/esm/core/agent/chartContract.js +3 -0
- package/dist/esm/core/agent/chartContract.js.map +1 -0
- package/dist/esm/core/agent/checkpointDomain.d.ts +11 -0
- package/dist/esm/core/agent/checkpointDomain.js +53 -0
- package/dist/esm/core/agent/checkpointDomain.js.map +1 -0
- package/dist/esm/core/agent/componentObservers.d.ts +14 -0
- package/dist/esm/core/agent/componentObservers.js +129 -0
- package/dist/esm/core/agent/componentObservers.js.map +1 -0
- package/dist/esm/core/agent/componentResources.d.ts +39 -0
- package/dist/esm/core/agent/componentResources.js +110 -0
- package/dist/esm/core/agent/componentResources.js.map +1 -0
- package/dist/esm/core/agent/evidence/evidenceIndex.js +1 -1
- package/dist/esm/core/agent/evidence/evidenceIndex.js.map +1 -1
- package/dist/esm/core/agent/evidence/frames.js +3 -2
- package/dist/esm/core/agent/evidence/frames.js.map +1 -1
- package/dist/esm/core/agent/evidence/servedJson.d.ts +1 -1
- package/dist/esm/core/agent/evidence/servedJson.js +1 -1
- package/dist/esm/core/agent/findings/contingent.d.ts +1 -1
- package/dist/esm/core/agent/findings/contingent.js +1 -1
- package/dist/esm/core/agent/findings/judge.d.ts +1 -1
- package/dist/esm/core/agent/findings/judge.js +1 -1
- package/dist/esm/core/agent/findings/types.d.ts +1 -1
- package/dist/esm/core/agent/findings/unsettled.d.ts +3 -3
- package/dist/esm/core/agent/findings/unsettled.js +3 -3
- package/dist/esm/core/agent/honesty/inputsMountContract.d.ts +66 -0
- package/dist/esm/core/agent/honesty/inputsMountContract.js +2 -0
- package/dist/esm/core/agent/honesty/inputsMountContract.js.map +1 -0
- package/dist/esm/core/agent/honesty/mounts.d.ts +4 -66
- package/dist/esm/core/agent/honesty/mounts.js +42 -30
- package/dist/esm/core/agent/honesty/mounts.js.map +1 -1
- package/dist/esm/core/agent/hostTurn.d.ts +17 -0
- package/dist/esm/core/agent/hostTurn.js +36 -0
- package/dist/esm/core/agent/hostTurn.js.map +1 -0
- package/dist/esm/core/agent/pauseOwnership.d.ts +24 -0
- package/dist/esm/core/agent/pauseOwnership.js +97 -0
- package/dist/esm/core/agent/pauseOwnership.js.map +1 -0
- package/dist/esm/core/agent/presentTool.d.ts +1 -1
- package/dist/esm/core/agent/presentTool.js +1 -1
- package/dist/esm/core/agent/resultCeiling.d.ts +1 -1
- package/dist/esm/core/agent/resultCeiling.js +1 -1
- package/dist/esm/core/agent/resumeAnswer.d.ts +10 -0
- package/dist/esm/core/agent/resumeAnswer.js +43 -0
- package/dist/esm/core/agent/resumeAnswer.js.map +1 -0
- package/dist/esm/core/agent/resumeCheckpoint.d.ts +12 -0
- package/dist/esm/core/agent/resumeCheckpoint.js +34 -0
- package/dist/esm/core/agent/resumeCheckpoint.js.map +1 -0
- package/dist/esm/core/agent/resumeError.d.ts +8 -0
- package/dist/esm/core/agent/resumeError.js +11 -0
- package/dist/esm/core/agent/resumeError.js.map +1 -0
- package/dist/esm/core/agent/run/clocks.d.ts +44 -0
- package/dist/esm/core/agent/run/clocks.js +81 -0
- package/dist/esm/core/agent/run/clocks.js.map +1 -0
- package/dist/esm/core/agent/run/commitRunRedaction.d.ts +4 -0
- package/dist/esm/core/agent/run/commitRunRedaction.js +12 -0
- package/dist/esm/core/agent/run/commitRunRedaction.js.map +1 -0
- package/dist/esm/core/agent/run/eventStageIds.d.ts +40 -0
- package/dist/esm/core/agent/run/eventStageIds.js +41 -0
- package/dist/esm/core/agent/run/eventStageIds.js.map +1 -0
- package/dist/esm/core/agent/run/injectionDelivery.d.ts +4 -0
- package/dist/esm/core/agent/run/injectionDelivery.js +26 -0
- package/dist/esm/core/agent/run/injectionDelivery.js.map +1 -0
- package/dist/esm/core/agent/run/ledgerFacts.d.ts +8 -0
- package/dist/esm/core/agent/run/ledgerFacts.js +31 -0
- package/dist/esm/core/agent/run/ledgerFacts.js.map +1 -0
- package/dist/esm/core/agent/run/resumeRedaction.d.ts +6 -0
- package/dist/esm/core/agent/run/resumeRedaction.js +36 -0
- package/dist/esm/core/agent/run/resumeRedaction.js.map +1 -0
- package/dist/esm/core/agent/run/withoutTime.d.ts +8 -0
- package/dist/esm/core/agent/run/withoutTime.js +13 -0
- package/dist/esm/core/agent/run/withoutTime.js.map +1 -0
- package/dist/esm/core/agent/runValues.d.ts +71 -0
- package/dist/esm/core/agent/runValues.js +14 -0
- package/dist/esm/core/agent/runValues.js.map +1 -0
- package/dist/esm/core/agent/scripts/rows.d.ts +1 -1
- package/dist/esm/core/agent/scripts/rows.js +1 -1
- package/dist/esm/core/agent/scripts/types.d.ts +1 -1
- package/dist/esm/core/agent/selfCallNotice.js +1 -1
- package/dist/esm/core/agent/selfCallNotice.js.map +1 -1
- package/dist/esm/core/agent/stages/argumentAsk.d.ts +7 -1
- package/dist/esm/core/agent/stages/argumentAsk.js +39 -10
- package/dist/esm/core/agent/stages/argumentAsk.js.map +1 -1
- package/dist/esm/core/agent/stages/argumentParties.d.ts +3 -0
- package/dist/esm/core/agent/stages/argumentParties.js +50 -0
- package/dist/esm/core/agent/stages/argumentParties.js.map +1 -0
- package/dist/esm/core/agent/stages/batchParties.d.ts +21 -0
- package/dist/esm/core/agent/stages/batchParties.js +81 -0
- package/dist/esm/core/agent/stages/batchParties.js.map +1 -0
- package/dist/esm/core/agent/stages/callLLM.js +3 -3
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/finalStageContract.d.ts +45 -0
- package/dist/esm/core/agent/stages/finalStageContract.js +3 -0
- package/dist/esm/core/agent/stages/finalStageContract.js.map +1 -0
- package/dist/esm/core/agent/stages/prepareFinal.d.ts +2 -45
- package/dist/esm/core/agent/stages/prepareFinal.js +9 -0
- package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
- package/dist/esm/core/agent/stages/searchCoverage.d.ts +1 -1
- package/dist/esm/core/agent/stages/searchCoverage.js +1 -1
- package/dist/esm/core/agent/stages/seed.js +15 -31
- package/dist/esm/core/agent/stages/seed.js.map +1 -1
- package/dist/esm/core/agent/stages/servedParties.d.ts +39 -0
- package/dist/esm/core/agent/stages/servedParties.js +214 -0
- package/dist/esm/core/agent/stages/servedParties.js.map +1 -0
- package/dist/esm/core/agent/stages/timeLayer.d.ts +3 -3
- package/dist/esm/core/agent/stages/timeLayer.js +2 -2
- package/dist/esm/core/agent/stages/toolCallShape.d.ts +7 -0
- package/dist/esm/core/agent/stages/toolCallShape.js +18 -0
- package/dist/esm/core/agent/stages/toolCallShape.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.d.ts +21 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.js +44 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.d.ts +10 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.js +29 -0
- package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/bindings.d.ts +61 -0
- package/dist/esm/core/agent/stages/toolCalls/access/bindings.js +88 -0
- package/dist/esm/core/agent/stages/toolCalls/access/bindings.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/callState.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/access/callState.js +75 -0
- package/dist/esm/core/agent/stages/toolCalls/access/callState.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts +28 -0
- package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.js +77 -0
- package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.d.ts +44 -0
- package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.js +140 -0
- package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.d.ts +8 -0
- package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.js +35 -0
- package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts +50 -0
- package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.js +137 -0
- package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.d.ts +24 -0
- package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.js +99 -0
- package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/completion.d.ts +18 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/completion.js +24 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/completion.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.d.ts +36 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.js +133 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/execute.d.ts +7 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/execute.js +154 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/execute.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts +18 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.js +48 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.d.ts +6 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.js +18 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/paused.d.ts +65 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/paused.js +88 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/paused.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/refusal.d.ts +5 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/refusal.js +32 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/refusal.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settle.d.ts +66 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settle.js +63 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settle.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.d.ts +17 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.js +103 -0
- package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/compose.d.ts +239 -0
- package/dist/esm/core/agent/stages/toolCalls/compose.js +349 -0
- package/dist/esm/core/agent/stages/toolCalls/compose.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/access.d.ts +110 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/access.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/access.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.d.ts +26 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.d.ts +8 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.d.ts +43 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.d.ts +50 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.d.ts +56 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts +17 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.d.ts +211 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.js +9 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/observation.d.ts +24 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/observation.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/observation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts +37 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts +31 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts +23 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts +5 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts +16 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.d.ts +19 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts +25 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.d.ts +8 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.d.ts +12 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts +30 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts +40 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts +10 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts +13 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.d.ts +26 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resources.d.ts +67 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resources.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resources.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/results.d.ts +26 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/results.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/results.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/routing.d.ts +114 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/routing.js +2 -0
- package/dist/esm/core/agent/stages/toolCalls/contracts/routing.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.js +80 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.js +83 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts +29 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.js +48 -0
- package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts +9 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.js +232 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.js +137 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts +29 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.js +32 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.d.ts +6 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.js +3 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts +22 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.js +34 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.js +156 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.js +90 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.js +18 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/towers.d.ts +18 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/towers.js +38 -0
- package/dist/esm/core/agent/stages/toolCalls/evidence/towers.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts +12 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.js +261 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/callStart.d.ts +35 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/callStart.js +103 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/callStart.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.d.ts +17 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.js +173 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.d.ts +15 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.js +186 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts +48 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.js +124 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts +9 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.js +11 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.d.ts +40 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js +168 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.d.ts +5 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.js +511 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.d.ts +70 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.js +341 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts +9 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.js +86 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts +42 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js +402 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.d.ts +19 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.js +14 -0
- package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts +3 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.js +6 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts +61 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.js +78 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts +41 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.js +42 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts +23 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.js +54 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts +87 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.js +137 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +8 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.js +7 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts +11 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.js +12 -0
- package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/index.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls/index.js +21 -0
- package/dist/esm/core/agent/stages/toolCalls/index.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.d.ts +29 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.js +44 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.js +57 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.d.ts +7 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.js +28 -0
- package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/ask.d.ts +44 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/ask.js +400 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/ask.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.d.ts +39 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.js +189 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/credential.d.ts +37 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/credential.js +135 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/credential.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/handler.d.ts +6 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/handler.js +148 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/handler.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/plain.d.ts +32 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/plain.js +140 -0
- package/dist/esm/core/agent/stages/toolCalls/resume/plain.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.js +260 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.d.ts +17 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.js +36 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts +20 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.js +234 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.d.ts +15 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.js +48 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.js.map +1 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.d.ts +4 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.js +145 -0
- package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.js.map +1 -0
- package/dist/esm/core/agent/stages/toolResolver.d.ts +3 -2
- package/dist/esm/core/agent/stages/toolResolver.js +84 -38
- package/dist/esm/core/agent/stages/toolResolver.js.map +1 -1
- package/dist/esm/core/agent/toolChoice/pick.d.ts +1 -1
- package/dist/esm/core/agent/toolChoice/pick.js +1 -1
- package/dist/esm/core/agent/toolResultCap.d.ts +1 -1
- package/dist/esm/core/agent/toolResultCap.js +0 -0
- package/dist/esm/core/agent/types.d.ts +16 -27
- package/dist/esm/core/agent/types.js +0 -3
- package/dist/esm/core/agent/types.js.map +1 -1
- package/dist/esm/core/agent/window/toolNames.d.ts +3 -3
- package/dist/esm/core/agent/window/toolNames.js +3 -3
- package/dist/esm/core/answerConsumption.d.ts +7 -0
- package/dist/esm/core/answerConsumption.js +12 -0
- package/dist/esm/core/answerConsumption.js.map +1 -0
- package/dist/esm/core/checkin.d.ts +1 -1
- package/dist/esm/core/checkin.js +1 -1
- package/dist/esm/core/codeRunnerTool.d.ts +1 -1
- package/dist/esm/core/codeRunnerTool.js +1 -1
- package/dist/esm/core/consentLedger.d.ts +21 -0
- package/dist/esm/core/consentLedger.js +116 -0
- package/dist/esm/core/consentLedger.js.map +1 -0
- package/dist/esm/core/consentRequest.d.ts +35 -54
- package/dist/esm/core/consentRequest.js +34 -153
- package/dist/esm/core/consentRequest.js.map +1 -1
- package/dist/esm/core/conversation.d.ts +8 -29
- package/dist/esm/core/conversation.js +14 -47
- package/dist/esm/core/conversation.js.map +1 -1
- package/dist/esm/core/memberRun.d.ts +1 -0
- package/dist/esm/core/memberRun.js +1 -1
- package/dist/esm/core/memberRun.js.map +1 -1
- package/dist/esm/core/pause.d.ts +5 -5
- package/dist/esm/core/pause.js +5 -5
- package/dist/esm/core/pauseRecord.d.ts +13 -0
- package/dist/esm/core/pauseRecord.js +19 -0
- package/dist/esm/core/pauseRecord.js.map +1 -0
- package/dist/esm/core/runEntry.d.ts +8 -0
- package/dist/esm/core/runEntry.js +26 -0
- package/dist/esm/core/runEntry.js.map +1 -0
- package/dist/esm/core/runnerCoreValues.d.ts +16 -0
- package/dist/esm/core/runnerCoreValues.js +2 -0
- package/dist/esm/core/runnerCoreValues.js.map +1 -0
- package/dist/esm/core/runnerExecution.d.ts +71 -0
- package/dist/esm/core/runnerExecution.js +170 -0
- package/dist/esm/core/runnerExecution.js.map +1 -0
- package/dist/esm/core/runnerLive.d.ts +32 -1
- package/dist/esm/core/runnerLive.js.map +1 -1
- package/dist/esm/core/slots/buildThinkingSubflow.d.ts +1 -1
- package/dist/esm/core/slots/buildThinkingSubflow.js +2 -2
- package/dist/esm/core/slots/buildThinkingSubflow.js.map +1 -1
- package/dist/esm/core/slots/buildToolsSlot.d.ts +27 -56
- package/dist/esm/core/slots/buildToolsSlot.js +25 -102
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/core/slots/discoverTools.d.ts +21 -0
- package/dist/esm/core/slots/discoverTools.js +94 -0
- package/dist/esm/core/slots/discoverTools.js.map +1 -0
- package/dist/esm/core-flow/Conditional.d.ts +0 -2
- package/dist/esm/core-flow/Conditional.js +28 -75
- package/dist/esm/core-flow/Conditional.js.map +1 -1
- package/dist/esm/core-flow/Graph.d.ts +18 -23
- package/dist/esm/core-flow/Graph.js +66 -123
- package/dist/esm/core-flow/Graph.js.map +1 -1
- package/dist/esm/core-flow/Loop.d.ts +0 -2
- package/dist/esm/core-flow/Loop.js +29 -83
- package/dist/esm/core-flow/Loop.js.map +1 -1
- package/dist/esm/core-flow/Parallel.d.ts +11 -40
- package/dist/esm/core-flow/Parallel.js +61 -151
- package/dist/esm/core-flow/Parallel.js.map +1 -1
- package/dist/esm/core-flow/Sequence.d.ts +0 -2
- package/dist/esm/core-flow/Sequence.js +28 -76
- package/dist/esm/core-flow/Sequence.js.map +1 -1
- package/dist/esm/core-flow/Workflow.d.ts +0 -2
- package/dist/esm/core-flow/Workflow.js +27 -75
- package/dist/esm/core-flow/Workflow.js.map +1 -1
- package/dist/esm/events/dispatcher.d.ts +2 -2
- package/dist/esm/events/dispatcher.js +2 -2
- package/dist/esm/events/payloads/access.d.ts +88 -0
- package/dist/esm/events/payloads/access.js +2 -0
- package/dist/esm/events/payloads/access.js.map +1 -0
- package/dist/esm/events/payloads/agent.d.ts +241 -0
- package/dist/esm/events/payloads/agent.js +2 -0
- package/dist/esm/events/payloads/agent.js.map +1 -0
- package/dist/esm/events/payloads/answer.d.ts +95 -0
- package/dist/esm/events/payloads/answer.js +2 -0
- package/dist/esm/events/payloads/answer.js.map +1 -0
- package/dist/esm/events/payloads/artifacts.d.ts +139 -0
- package/dist/esm/events/payloads/artifacts.js +2 -0
- package/dist/esm/events/payloads/artifacts.js.map +1 -0
- package/dist/esm/events/payloads/consent.d.ts +86 -0
- package/dist/esm/events/payloads/consent.js +2 -0
- package/dist/esm/events/payloads/consent.js.map +1 -0
- package/dist/esm/events/payloads/context.d.ts +276 -0
- package/dist/esm/events/payloads/context.js +2 -0
- package/dist/esm/events/payloads/context.js.map +1 -0
- package/dist/esm/events/payloads/cost.d.ts +40 -0
- package/dist/esm/events/payloads/cost.js +2 -0
- package/dist/esm/events/payloads/cost.js.map +1 -0
- package/dist/esm/events/payloads/dependencyTypes.d.ts +18 -0
- package/dist/esm/events/payloads/dependencyTypes.js +2 -0
- package/dist/esm/events/payloads/dependencyTypes.js.map +1 -0
- package/dist/esm/events/payloads/evaluation.d.ts +297 -0
- package/dist/esm/events/payloads/evaluation.js +2 -0
- package/dist/esm/events/payloads/evaluation.js.map +1 -0
- package/dist/esm/events/payloads/fallback.d.ts +6 -0
- package/dist/esm/events/payloads/fallback.js +2 -0
- package/dist/esm/events/payloads/fallback.js.map +1 -0
- package/dist/esm/events/payloads/findings.d.ts +243 -0
- package/dist/esm/events/payloads/findings.js +2 -0
- package/dist/esm/events/payloads/findings.js.map +1 -0
- package/dist/esm/events/payloads/flow.d.ts +68 -0
- package/dist/esm/events/payloads/flow.js +2 -0
- package/dist/esm/events/payloads/flow.js.map +1 -0
- package/dist/esm/events/payloads/integrity.d.ts +48 -0
- package/dist/esm/events/payloads/integrity.js +3 -0
- package/dist/esm/events/payloads/integrity.js.map +1 -0
- package/dist/esm/events/payloads/maps.d.ts +47 -0
- package/dist/esm/events/payloads/maps.js +3 -0
- package/dist/esm/events/payloads/maps.js.map +1 -0
- package/dist/esm/events/payloads/mcpRequests.d.ts +327 -0
- package/dist/esm/events/payloads/mcpRequests.js +3 -0
- package/dist/esm/events/payloads/mcpRequests.js.map +1 -0
- package/dist/esm/events/payloads/memory.d.ts +117 -0
- package/dist/esm/events/payloads/memory.js +3 -0
- package/dist/esm/events/payloads/memory.js.map +1 -0
- package/dist/esm/events/payloads/reliability.d.ts +149 -0
- package/dist/esm/events/payloads/reliability.js +2 -0
- package/dist/esm/events/payloads/reliability.js.map +1 -0
- package/dist/esm/events/payloads/runConfiguration.d.ts +224 -0
- package/dist/esm/events/payloads/runConfiguration.js +2 -0
- package/dist/esm/events/payloads/runConfiguration.js.map +1 -0
- package/dist/esm/events/payloads/skills.d.ts +359 -0
- package/dist/esm/events/payloads/skills.js +2 -0
- package/dist/esm/events/payloads/skills.js.map +1 -0
- package/dist/esm/events/payloads/stream.d.ts +230 -0
- package/dist/esm/events/payloads/stream.js +2 -0
- package/dist/esm/events/payloads/stream.js.map +1 -0
- package/dist/esm/events/payloads/thinking.d.ts +118 -0
- package/dist/esm/events/payloads/thinking.js +2 -0
- package/dist/esm/events/payloads/thinking.js.map +1 -0
- package/dist/esm/events/payloads/toolCatalog.d.ts +157 -0
- package/dist/esm/events/payloads/toolCatalog.js +2 -0
- package/dist/esm/events/payloads/toolCatalog.js.map +1 -0
- package/dist/esm/events/payloads/toolChoice.d.ts +65 -0
- package/dist/esm/events/payloads/toolChoice.js +2 -0
- package/dist/esm/events/payloads/toolChoice.js.map +1 -0
- package/dist/esm/events/payloads/toolEffects.d.ts +329 -0
- package/dist/esm/events/payloads/toolEffects.js +2 -0
- package/dist/esm/events/payloads/toolEffects.js.map +1 -0
- package/dist/esm/events/payloads/toolSemantics.d.ts +68 -0
- package/dist/esm/events/payloads/toolSemantics.js +2 -0
- package/dist/esm/events/payloads/toolSemantics.js.map +1 -0
- package/dist/esm/events/payloads/toolSessionPayloads.d.ts +50 -0
- package/dist/esm/events/payloads/toolSessionPayloads.js +17 -0
- package/dist/esm/events/payloads/toolSessionPayloads.js.map +1 -0
- package/dist/esm/events/payloads/validation.d.ts +29 -0
- package/dist/esm/events/payloads/validation.js +2 -0
- package/dist/esm/events/payloads/validation.js.map +1 -0
- package/dist/esm/events/payloads.d.ts +26 -3888
- package/dist/esm/events/registry.d.ts +8 -15
- package/dist/esm/events/registry.js +5 -15
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/hosting/answeredPause.d.ts +9 -23
- package/dist/esm/hosting/answeredPause.js +15 -27
- package/dist/esm/hosting/answeredPause.js.map +1 -1
- package/dist/esm/hosting/durability.d.ts +10 -7
- package/dist/esm/hosting/durability.js +10 -8
- package/dist/esm/hosting/durability.js.map +1 -1
- package/dist/esm/hosting/standingAgent.d.ts +4 -14
- package/dist/esm/hosting/standingAgent.js +73 -109
- package/dist/esm/hosting/standingAgent.js.map +1 -1
- package/dist/esm/hosting/stream.d.ts +3 -3
- package/dist/esm/hosting/stream.js +2 -5
- package/dist/esm/hosting/stream.js.map +1 -1
- package/dist/esm/hosting/streamHandler.js +5 -5
- package/dist/esm/hosting/streamHandler.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +2 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/influence-core/attribute.js +1 -1
- package/dist/esm/influence-core/attribute.js.map +1 -1
- package/dist/esm/influence-core/contrastive.js +1 -1
- package/dist/esm/influence-core/contrastive.js.map +1 -1
- package/dist/esm/influence-core/margin.js +1 -1
- package/dist/esm/influence-core/margin.js.map +1 -1
- package/dist/esm/influence-core/signals.js +1 -1
- package/dist/esm/influence-core/signals.js.map +1 -1
- package/dist/esm/influence-core/similarity.js +1 -1
- package/dist/esm/influence-core/similarity.js.map +1 -1
- package/dist/esm/injection-engine/buildInjectionEngineSubflow.js +1 -1
- package/dist/esm/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/esm/injection-engine/devWarn.d.ts +3 -2
- package/dist/esm/injection-engine/devWarn.js +3 -2
- package/dist/esm/injection-engine/devWarn.js.map +1 -1
- package/dist/esm/injection-engine/entryScorer.js +1 -1
- package/dist/esm/injection-engine/entryScorer.js.map +1 -1
- package/dist/esm/injection-engine/hostContract.d.ts +3 -3
- package/dist/esm/injection-engine/skillExamples.d.ts +1 -1
- package/dist/esm/injection-engine/skillGraph/cursorEvidence.d.ts +48 -0
- package/dist/esm/injection-engine/skillGraph/cursorEvidence.js +54 -0
- package/dist/esm/injection-engine/skillGraph/cursorEvidence.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/cursorResolution.d.ts +4 -0
- package/dist/esm/injection-engine/skillGraph/cursorResolution.js +241 -0
- package/dist/esm/injection-engine/skillGraph/cursorResolution.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/decision.d.ts +21 -0
- package/dist/esm/injection-engine/skillGraph/decision.js +10 -0
- package/dist/esm/injection-engine/skillGraph/decision.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/entryScores.d.ts +14 -0
- package/dist/esm/injection-engine/skillGraph/entryScores.js +30 -0
- package/dist/esm/injection-engine/skillGraph/entryScores.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/entrySuppression.d.ts +23 -0
- package/dist/esm/injection-engine/skillGraph/entrySuppression.js +46 -0
- package/dist/esm/injection-engine/skillGraph/entrySuppression.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/graphConfig.d.ts +39 -0
- package/dist/esm/injection-engine/skillGraph/graphConfig.js +2 -0
- package/dist/esm/injection-engine/skillGraph/graphConfig.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/graphContracts.d.ts +479 -0
- package/dist/esm/injection-engine/skillGraph/graphContracts.js +14 -0
- package/dist/esm/injection-engine/skillGraph/graphContracts.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/graphCursor.d.ts +125 -0
- package/dist/esm/injection-engine/skillGraph/graphCursor.js +2 -0
- package/dist/esm/injection-engine/skillGraph/graphCursor.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/graphDrawing.d.ts +2 -0
- package/dist/esm/injection-engine/skillGraph/graphDrawing.js +31 -0
- package/dist/esm/injection-engine/skillGraph/graphDrawing.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/graphRoutes.d.ts +269 -0
- package/dist/esm/injection-engine/skillGraph/graphRoutes.js +2 -0
- package/dist/esm/injection-engine/skillGraph/graphRoutes.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/passMemo.d.ts +24 -0
- package/dist/esm/injection-engine/skillGraph/passMemo.js +37 -0
- package/dist/esm/injection-engine/skillGraph/passMemo.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/reachability.d.ts +71 -0
- package/dist/esm/injection-engine/skillGraph/reachability.js +62 -0
- package/dist/esm/injection-engine/skillGraph/reachability.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/routePredicates.d.ts +36 -0
- package/dist/esm/injection-engine/skillGraph/routePredicates.js +57 -0
- package/dist/esm/injection-engine/skillGraph/routePredicates.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/routingView.d.ts +3 -0
- package/dist/esm/injection-engine/skillGraph/routingView.js +24 -0
- package/dist/esm/injection-engine/skillGraph/routingView.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/treeCompilation.d.ts +38 -0
- package/dist/esm/injection-engine/skillGraph/treeCompilation.js +153 -0
- package/dist/esm/injection-engine/skillGraph/treeCompilation.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph/triggerCompilation.d.ts +16 -0
- package/dist/esm/injection-engine/skillGraph/triggerCompilation.js +75 -0
- package/dist/esm/injection-engine/skillGraph/triggerCompilation.js.map +1 -0
- package/dist/esm/injection-engine/skillGraph.d.ts +12 -948
- package/dist/esm/injection-engine/skillGraph.js +22 -816
- package/dist/esm/injection-engine/skillGraph.js.map +1 -1
- package/dist/esm/injection-engine/skillIntent.d.ts +1 -1
- package/dist/esm/injection-engine/skillMatch.d.ts +2 -1
- package/dist/esm/injection-engine/skillMatch.js +2 -1
- package/dist/esm/injection-engine/skillMatch.js.map +1 -1
- package/dist/esm/injection-engine/skillToolDescriptors.js +2 -2
- package/dist/esm/injection-engine/skillToolDescriptors.js.map +1 -1
- package/dist/esm/injection-engine/startRuleClaim.d.ts +1 -1
- package/dist/esm/injection-engine/types.d.ts +1 -1
- package/dist/esm/lib/cosine.js.map +1 -0
- package/dist/esm/lib/iterationBudget.d.ts +3 -0
- package/dist/esm/lib/iterationBudget.js +7 -0
- package/dist/esm/lib/iterationBudget.js.map +1 -1
- package/dist/esm/lib/saidByPerson.d.ts +1 -0
- package/dist/esm/lib/saidByPerson.js +2 -0
- package/dist/esm/lib/saidByPerson.js.map +1 -1
- package/dist/esm/lib/spokenIds.js +2 -2
- package/dist/esm/lib/spokenIds.js.map +1 -1
- package/dist/esm/lib/toolBytes.d.ts +1 -1
- package/dist/esm/lib/toolBytes.js +2 -2
- package/dist/esm/lib/toolBytes.js.map +1 -1
- package/dist/esm/maps/engagement/lease.js +1 -1
- package/dist/esm/maps/engagement/lease.js.map +1 -1
- package/dist/esm/memory/causal/evidenceRecorder.d.ts +8 -56
- package/dist/esm/memory/causal/evidenceRecorder.js +221 -213
- package/dist/esm/memory/causal/evidenceRecorder.js.map +1 -1
- package/dist/esm/memory/causal/loadSnapshot.js +16 -59
- package/dist/esm/memory/causal/loadSnapshot.js.map +1 -1
- package/dist/esm/memory/causal/observation.d.ts +72 -0
- package/dist/esm/memory/causal/observation.js +13 -0
- package/dist/esm/memory/causal/observation.js.map +1 -0
- package/dist/esm/memory/causal/snapshotProjection.d.ts +5 -0
- package/dist/esm/memory/causal/snapshotProjection.js +61 -0
- package/dist/esm/memory/causal/snapshotProjection.js.map +1 -0
- package/dist/esm/memory/causal/snapshotSchema.d.ts +8 -0
- package/dist/esm/memory/causal/snapshotSchema.js +168 -0
- package/dist/esm/memory/causal/snapshotSchema.js.map +1 -0
- package/dist/esm/memory/causal/types.d.ts +5 -82
- package/dist/esm/memory/causal/types.js +0 -18
- package/dist/esm/memory/causal/types.js.map +1 -1
- package/dist/esm/memory/causal/writeSnapshot.js +17 -14
- package/dist/esm/memory/causal/writeSnapshot.js.map +1 -1
- package/dist/esm/memory/embedding/index.d.ts +1 -1
- package/dist/esm/memory/embedding/index.js +1 -1
- package/dist/esm/memory/embedding/index.js.map +1 -1
- package/dist/esm/memory/stages/types.d.ts +1 -1
- package/dist/esm/memory/store/InMemoryStore.js +1 -1
- package/dist/esm/memory/store/InMemoryStore.js.map +1 -1
- package/dist/esm/memory/store/staticVectorStore.js +1 -1
- package/dist/esm/memory/store/staticVectorStore.js.map +1 -1
- package/dist/esm/memory/wire/mountMemoryPipeline.d.ts +7 -7
- package/dist/esm/memory/wire/mountMemoryPipeline.js +8 -2
- package/dist/esm/memory/wire/mountMemoryPipeline.js.map +1 -1
- package/dist/esm/patterns/LlmRouter.d.ts +11 -149
- package/dist/esm/patterns/LlmRouter.js +51 -179
- package/dist/esm/patterns/LlmRouter.js.map +1 -1
- package/dist/esm/patterns/LlmSwarm.d.ts +5 -49
- package/dist/esm/patterns/LlmSwarm.js +7 -70
- package/dist/esm/patterns/LlmSwarm.js.map +1 -1
- package/dist/esm/patterns/MapReduce.js +33 -23
- package/dist/esm/patterns/MapReduce.js.map +1 -1
- package/dist/esm/patterns/Swarm.d.ts +14 -45
- package/dist/esm/patterns/Swarm.js +230 -76
- package/dist/esm/patterns/Swarm.js.map +1 -1
- package/dist/esm/patterns/index.d.ts +1 -1
- package/dist/esm/patterns/index.js.map +1 -1
- package/dist/esm/patterns/routing.d.ts +15 -0
- package/dist/esm/patterns/routing.js +18 -0
- package/dist/esm/patterns/routing.js.map +1 -0
- package/dist/esm/provider-contract/types.d.ts +5 -5
- package/dist/esm/recorders/core/CompactionMeter.d.ts +1 -1
- package/dist/esm/recorders/observability/BoundaryRecorder.d.ts +13 -427
- package/dist/esm/recorders/observability/BoundaryRecorder.js +7 -283
- package/dist/esm/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.d.ts +13 -0
- package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.js +58 -0
- package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.d.ts +210 -0
- package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.js +2 -0
- package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.d.ts +11 -0
- package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.js +77 -0
- package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.d.ts +12 -0
- package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.js +2 -0
- package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/leanContent.d.ts +52 -0
- package/dist/esm/recorders/observability/boundaryRecorder/leanContent.js +52 -0
- package/dist/esm/recorders/observability/boundaryRecorder/leanContent.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/options.d.ts +95 -0
- package/dist/esm/recorders/observability/boundaryRecorder/options.js +2 -0
- package/dist/esm/recorders/observability/boundaryRecorder/options.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.d.ts +33 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.js +39 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.js.map +1 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rollups.d.ts +53 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rollups.js +69 -0
- package/dist/esm/recorders/observability/boundaryRecorder/rollups.js.map +1 -0
- package/dist/esm/recorders/observability/fileRecordingSink.d.ts +2 -4
- package/dist/esm/recorders/observability/fileRecordingSink.js +2 -4
- package/dist/esm/recorders/observability/fileRecordingSink.js.map +1 -1
- package/dist/esm/recorders/observability/recordingEnvelope.d.ts +6 -10
- package/dist/esm/recorders/observability/recordingEnvelope.js +6 -10
- package/dist/esm/recorders/observability/recordingEnvelope.js.map +1 -1
- package/dist/esm/redaction/coverage.d.ts +5 -3
- package/dist/esm/redaction/coverage.js +5 -3
- package/dist/esm/redaction/coverage.js.map +1 -1
- package/dist/esm/redaction/declared.d.ts +4 -0
- package/dist/esm/redaction/declared.js +15 -2
- package/dist/esm/redaction/declared.js.map +1 -1
- package/dist/esm/redaction/knownStrings.d.ts +5 -34
- package/dist/esm/redaction/knownStrings.js +10 -34
- package/dist/esm/redaction/knownStrings.js.map +1 -1
- package/dist/esm/redaction/marker.d.ts +1 -1
- package/dist/esm/redaction/marker.js +1 -1
- package/dist/esm/redaction/privateCaller.d.ts +43 -0
- package/dist/esm/redaction/privateCaller.js +74 -0
- package/dist/esm/redaction/privateCaller.js.map +1 -0
- package/dist/esm/redaction/privateCheckpoint.d.ts +22 -0
- package/dist/esm/redaction/privateCheckpoint.js +89 -0
- package/dist/esm/redaction/privateCheckpoint.js.map +1 -0
- package/dist/esm/redaction/privateFields.d.ts +28 -0
- package/dist/esm/redaction/privateFields.js +152 -0
- package/dist/esm/redaction/privateFields.js.map +1 -0
- package/dist/esm/redaction/privateRun.d.ts +32 -0
- package/dist/esm/redaction/privateRun.js +105 -0
- package/dist/esm/redaction/privateRun.js.map +1 -0
- package/dist/esm/redaction/runRedaction.d.ts +47 -41
- package/dist/esm/redaction/runRedaction.js +134 -91
- package/dist/esm/redaction/runRedaction.js.map +1 -1
- package/dist/esm/redaction/served.d.ts +10 -4
- package/dist/esm/redaction/served.js +28 -7
- package/dist/esm/redaction/served.js.map +1 -1
- package/dist/esm/resilience/withCircuitBreaker.d.ts +1 -1
- package/dist/esm/resilience/withCircuitBreaker.js +1 -1
- package/dist/esm/security/extractSequence.js +1 -1
- package/dist/esm/semantics/coverage/answer.js +1 -1
- package/dist/esm/semantics/coverage/answer.js.map +1 -1
- package/dist/esm/semantics/coverage/composedCoverage.d.ts +1 -1
- package/dist/esm/semantics/coverage/composedCoverage.js +1 -1
- package/dist/esm/semantics/coverage/items.d.ts +1 -1
- package/dist/esm/semantics/coverage/items.js +1 -1
- package/dist/esm/semantics/coverage/read.d.ts +3 -3
- package/dist/esm/semantics/coverage/read.js +3 -3
- package/dist/esm/semantics/types.d.ts +1 -1
- package/dist/esm/semantics/types.js +1 -1
- package/dist/esm/time/drift.d.ts +1 -1
- package/dist/esm/time/drift.js +1 -1
- package/dist/esm/time-travel/servedView/assembly.d.ts +4 -0
- package/dist/esm/time-travel/servedView/assembly.js +44 -0
- package/dist/esm/time-travel/servedView/assembly.js.map +1 -0
- package/dist/esm/time-travel/servedView/conversation.d.ts +8 -0
- package/dist/esm/time-travel/servedView/conversation.js +30 -0
- package/dist/esm/time-travel/servedView/conversation.js.map +1 -0
- package/dist/esm/time-travel/servedView/findings.d.ts +11 -0
- package/dist/esm/time-travel/servedView/findings.js +68 -0
- package/dist/esm/time-travel/servedView/findings.js.map +1 -0
- package/dist/esm/time-travel/servedView/gaps.d.ts +76 -0
- package/dist/esm/time-travel/servedView/gaps.js +476 -0
- package/dist/esm/time-travel/servedView/gaps.js.map +1 -0
- package/dist/esm/time-travel/servedView/ontology.d.ts +4 -0
- package/dist/esm/time-travel/servedView/ontology.js +60 -0
- package/dist/esm/time-travel/servedView/ontology.js.map +1 -0
- package/dist/esm/time-travel/servedView/recordReads.d.ts +44 -0
- package/dist/esm/time-travel/servedView/recordReads.js +73 -0
- package/dist/esm/time-travel/servedView/recordReads.js.map +1 -0
- package/dist/esm/time-travel/servedView/requestOnly.d.ts +6 -0
- package/dist/esm/time-travel/servedView/requestOnly.js +67 -0
- package/dist/esm/time-travel/servedView/requestOnly.js.map +1 -0
- package/dist/esm/time-travel/servedView/system.d.ts +15 -0
- package/dist/esm/time-travel/servedView/system.js +36 -0
- package/dist/esm/time-travel/servedView/system.js.map +1 -0
- package/dist/esm/time-travel/servedView/tools.d.ts +9 -0
- package/dist/esm/time-travel/servedView/tools.js +36 -0
- package/dist/esm/time-travel/servedView/tools.js.map +1 -0
- package/dist/esm/time-travel/servedView/value.d.ts +38 -0
- package/dist/esm/time-travel/servedView/value.js +57 -0
- package/dist/esm/time-travel/servedView/value.js.map +1 -0
- package/dist/esm/time-travel/servedView.d.ts +5 -65
- package/dist/esm/time-travel/servedView.js +155 -877
- package/dist/esm/time-travel/servedView.js.map +1 -1
- package/dist/esm/tools/displayName.d.ts +6 -0
- package/dist/esm/tools/displayName.js +15 -0
- package/dist/esm/tools/displayName.js.map +1 -0
- package/dist/esm/tools/finiteLabel.d.ts +16 -0
- package/dist/esm/tools/finiteLabel.js +28 -0
- package/dist/esm/tools/finiteLabel.js.map +1 -0
- package/dist/esm/tools/inputRequest.d.ts +1 -1
- package/dist/esm/tools/inputRequest.js +2 -2
- package/dist/esm/tools/toolParty.d.ts +17 -0
- package/dist/esm/tools/toolParty.js +40 -0
- package/dist/esm/tools/toolParty.js.map +1 -0
- package/dist/esm/tools/toolProvider.d.ts +1 -0
- package/dist/esm/tools/toolResourceOwner.d.ts +27 -0
- package/dist/esm/tools/toolResourceOwner.js +79 -0
- package/dist/esm/tools/toolResourceOwner.js.map +1 -0
- package/dist/esm/tools/toolSessions/contracts.d.ts +130 -0
- package/dist/esm/tools/toolSessions/contracts.js +7 -0
- package/dist/esm/tools/toolSessions/contracts.js.map +1 -0
- package/dist/esm/tools/toolSessions/keys.d.ts +53 -0
- package/dist/esm/tools/toolSessions/keys.js +113 -0
- package/dist/esm/tools/toolSessions/keys.js.map +1 -0
- package/dist/esm/tools/toolSessions/localStatus.d.ts +7 -0
- package/dist/esm/tools/toolSessions/localStatus.js +9 -0
- package/dist/esm/tools/toolSessions/localStatus.js.map +1 -0
- package/dist/esm/tools/toolSessions.d.ts +30 -178
- package/dist/esm/tools/toolSessions.js +138 -119
- package/dist/esm/tools/toolSessions.js.map +1 -1
- package/dist/esm/tools/tools.d.ts +6 -8
- package/dist/esm/tools/tools.js +5 -15
- package/dist/esm/tools/tools.js.map +1 -1
- package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.d.ts +15 -0
- package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.js +14 -0
- package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/backtrackView.d.ts +17 -0
- package/dist/esm/trace-toolpack/traceToolpack/backtrackView.js +117 -0
- package/dist/esm/trace-toolpack/traceToolpack/backtrackView.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/contextErrors.d.ts +43 -0
- package/dist/esm/trace-toolpack/traceToolpack/contextErrors.js +354 -0
- package/dist/esm/trace-toolpack/traceToolpack/contextErrors.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/findInTrace.d.ts +26 -0
- package/dist/esm/trace-toolpack/traceToolpack/findInTrace.js +178 -0
- package/dist/esm/trace-toolpack/traceToolpack/findInTrace.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.d.ts +73 -0
- package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.js +176 -0
- package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/innerRecords.d.ts +11 -0
- package/dist/esm/trace-toolpack/traceToolpack/innerRecords.js +88 -0
- package/dist/esm/trace-toolpack/traceToolpack/innerRecords.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/narrativeView.d.ts +3 -0
- package/dist/esm/trace-toolpack/traceToolpack/narrativeView.js +44 -0
- package/dist/esm/trace-toolpack/traceToolpack/narrativeView.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/navigationHints.d.ts +6 -0
- package/dist/esm/trace-toolpack/traceToolpack/navigationHints.js +42 -0
- package/dist/esm/trace-toolpack/traceToolpack/navigationHints.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/nodeView.d.ts +5 -0
- package/dist/esm/trace-toolpack/traceToolpack/nodeView.js +130 -0
- package/dist/esm/trace-toolpack/traceToolpack/nodeView.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/packIndex.d.ts +69 -0
- package/dist/esm/trace-toolpack/traceToolpack/packIndex.js +155 -0
- package/dist/esm/trace-toolpack/traceToolpack/packIndex.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.d.ts +10 -0
- package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.js +36 -0
- package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.d.ts +40 -0
- package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.js +392 -0
- package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/runOverview.d.ts +5 -0
- package/dist/esm/trace-toolpack/traceToolpack/runOverview.js +114 -0
- package/dist/esm/trace-toolpack/traceToolpack/runOverview.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/sliceView.d.ts +5 -0
- package/dist/esm/trace-toolpack/traceToolpack/sliceView.js +87 -0
- package/dist/esm/trace-toolpack/traceToolpack/sliceView.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.d.ts +41 -0
- package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.js +44 -0
- package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.d.ts +105 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js +384 -0
- package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueLines.d.ts +29 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueLines.js +52 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueLines.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueQueries.d.ts +6 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueQueries.js +122 -0
- package/dist/esm/trace-toolpack/traceToolpack/valueQueries.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack/writerHints.d.ts +13 -0
- package/dist/esm/trace-toolpack/traceToolpack/writerHints.js +43 -0
- package/dist/esm/trace-toolpack/traceToolpack/writerHints.js.map +1 -0
- package/dist/esm/trace-toolpack/traceToolpack.d.ts +15 -40
- package/dist/esm/trace-toolpack/traceToolpack.js +15 -2452
- package/dist/esm/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/events/dispatcher.js +2 -2
- package/dist/events/payloads/access.js +3 -0
- package/dist/events/payloads/access.js.map +1 -0
- package/dist/events/payloads/agent.js +3 -0
- package/dist/events/payloads/agent.js.map +1 -0
- package/dist/events/payloads/answer.js +3 -0
- package/dist/events/payloads/answer.js.map +1 -0
- package/dist/events/payloads/artifacts.js +3 -0
- package/dist/events/payloads/artifacts.js.map +1 -0
- package/dist/events/payloads/consent.js +3 -0
- package/dist/events/payloads/consent.js.map +1 -0
- package/dist/events/payloads/context.js +3 -0
- package/dist/events/payloads/context.js.map +1 -0
- package/dist/events/payloads/cost.js +3 -0
- package/dist/events/payloads/cost.js.map +1 -0
- package/dist/events/payloads/dependencyTypes.js +3 -0
- package/dist/events/payloads/dependencyTypes.js.map +1 -0
- package/dist/events/payloads/evaluation.js +3 -0
- package/dist/events/payloads/evaluation.js.map +1 -0
- package/dist/events/payloads/fallback.js +3 -0
- package/dist/events/payloads/fallback.js.map +1 -0
- package/dist/events/payloads/findings.js +3 -0
- package/dist/events/payloads/findings.js.map +1 -0
- package/dist/events/payloads/flow.js +3 -0
- package/dist/events/payloads/flow.js.map +1 -0
- package/dist/events/payloads/integrity.js +4 -0
- package/dist/events/payloads/integrity.js.map +1 -0
- package/dist/events/payloads/maps.js +4 -0
- package/dist/events/payloads/maps.js.map +1 -0
- package/dist/events/payloads/mcpRequests.js +4 -0
- package/dist/events/payloads/mcpRequests.js.map +1 -0
- package/dist/events/payloads/memory.js +4 -0
- package/dist/events/payloads/memory.js.map +1 -0
- package/dist/events/payloads/reliability.js +3 -0
- package/dist/events/payloads/reliability.js.map +1 -0
- package/dist/events/payloads/runConfiguration.js +3 -0
- package/dist/events/payloads/runConfiguration.js.map +1 -0
- package/dist/events/payloads/skills.js +3 -0
- package/dist/events/payloads/skills.js.map +1 -0
- package/dist/events/payloads/stream.js +3 -0
- package/dist/events/payloads/stream.js.map +1 -0
- package/dist/events/payloads/thinking.js +3 -0
- package/dist/events/payloads/thinking.js.map +1 -0
- package/dist/events/payloads/toolCatalog.js +3 -0
- package/dist/events/payloads/toolCatalog.js.map +1 -0
- package/dist/events/payloads/toolChoice.js +3 -0
- package/dist/events/payloads/toolChoice.js.map +1 -0
- package/dist/events/payloads/toolEffects.js +3 -0
- package/dist/events/payloads/toolEffects.js.map +1 -0
- package/dist/events/payloads/toolSemantics.js +3 -0
- package/dist/events/payloads/toolSemantics.js.map +1 -0
- package/dist/events/payloads/toolSessionPayloads.js +18 -0
- package/dist/events/payloads/toolSessionPayloads.js.map +1 -0
- package/dist/events/payloads/validation.js +3 -0
- package/dist/events/payloads/validation.js.map +1 -0
- package/dist/events/registry.js +5 -15
- package/dist/events/registry.js.map +1 -1
- package/dist/hosting/answeredPause.js +16 -28
- package/dist/hosting/answeredPause.js.map +1 -1
- package/dist/hosting/durability.js +10 -8
- package/dist/hosting/durability.js.map +1 -1
- package/dist/hosting/standingAgent.js +72 -108
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/hosting/stream.js +2 -5
- package/dist/hosting/stream.js.map +1 -1
- package/dist/hosting/streamHandler.js +5 -5
- package/dist/hosting/streamHandler.js.map +1 -1
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/dist/influence-core/attribute.js +1 -1
- package/dist/influence-core/attribute.js.map +1 -1
- package/dist/influence-core/contrastive.js +1 -1
- package/dist/influence-core/contrastive.js.map +1 -1
- package/dist/influence-core/margin.js +1 -1
- package/dist/influence-core/margin.js.map +1 -1
- package/dist/influence-core/signals.js +1 -1
- package/dist/influence-core/signals.js.map +1 -1
- package/dist/influence-core/similarity.js +1 -1
- package/dist/influence-core/similarity.js.map +1 -1
- package/dist/injection-engine/buildInjectionEngineSubflow.js +1 -1
- package/dist/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/injection-engine/devWarn.js +3 -2
- package/dist/injection-engine/devWarn.js.map +1 -1
- package/dist/injection-engine/entryScorer.js +1 -1
- package/dist/injection-engine/entryScorer.js.map +1 -1
- package/dist/injection-engine/skillGraph/cursorEvidence.js +58 -0
- package/dist/injection-engine/skillGraph/cursorEvidence.js.map +1 -0
- package/dist/injection-engine/skillGraph/cursorResolution.js +245 -0
- package/dist/injection-engine/skillGraph/cursorResolution.js.map +1 -0
- package/dist/injection-engine/skillGraph/decision.js +15 -0
- package/dist/injection-engine/skillGraph/decision.js.map +1 -0
- package/dist/injection-engine/skillGraph/entryScores.js +34 -0
- package/dist/injection-engine/skillGraph/entryScores.js.map +1 -0
- package/dist/injection-engine/skillGraph/entrySuppression.js +50 -0
- package/dist/injection-engine/skillGraph/entrySuppression.js.map +1 -0
- package/dist/injection-engine/skillGraph/graphConfig.js +3 -0
- package/dist/injection-engine/skillGraph/graphConfig.js.map +1 -0
- package/dist/injection-engine/skillGraph/graphContracts.js +17 -0
- package/dist/injection-engine/skillGraph/graphContracts.js.map +1 -0
- package/dist/injection-engine/skillGraph/graphCursor.js +3 -0
- package/dist/injection-engine/skillGraph/graphCursor.js.map +1 -0
- package/dist/injection-engine/skillGraph/graphDrawing.js +35 -0
- package/dist/injection-engine/skillGraph/graphDrawing.js.map +1 -0
- package/dist/injection-engine/skillGraph/graphRoutes.js +3 -0
- package/dist/injection-engine/skillGraph/graphRoutes.js.map +1 -0
- package/dist/injection-engine/skillGraph/passMemo.js +42 -0
- package/dist/injection-engine/skillGraph/passMemo.js.map +1 -0
- package/dist/injection-engine/skillGraph/reachability.js +67 -0
- package/dist/injection-engine/skillGraph/reachability.js.map +1 -0
- package/dist/injection-engine/skillGraph/routePredicates.js +66 -0
- package/dist/injection-engine/skillGraph/routePredicates.js.map +1 -0
- package/dist/injection-engine/skillGraph/routingView.js +28 -0
- package/dist/injection-engine/skillGraph/routingView.js.map +1 -0
- package/dist/injection-engine/skillGraph/treeCompilation.js +158 -0
- package/dist/injection-engine/skillGraph/treeCompilation.js.map +1 -0
- package/dist/injection-engine/skillGraph/triggerCompilation.js +79 -0
- package/dist/injection-engine/skillGraph/triggerCompilation.js.map +1 -0
- package/dist/injection-engine/skillGraph.js +40 -832
- package/dist/injection-engine/skillGraph.js.map +1 -1
- package/dist/injection-engine/skillMatch.js +2 -1
- package/dist/injection-engine/skillMatch.js.map +1 -1
- package/dist/injection-engine/skillToolDescriptors.js +2 -2
- package/dist/injection-engine/skillToolDescriptors.js.map +1 -1
- package/dist/lib/cosine.js.map +1 -0
- package/dist/lib/iterationBudget.js +9 -1
- package/dist/lib/iterationBudget.js.map +1 -1
- package/dist/lib/saidByPerson.js +3 -1
- package/dist/lib/saidByPerson.js.map +1 -1
- package/dist/lib/spokenIds.js +2 -2
- package/dist/lib/spokenIds.js.map +1 -1
- package/dist/lib/toolBytes.js +2 -2
- package/dist/lib/toolBytes.js.map +1 -1
- package/dist/maps/engagement/lease.js +1 -1
- package/dist/maps/engagement/lease.js.map +1 -1
- package/dist/memory/causal/evidenceRecorder.js +221 -213
- package/dist/memory/causal/evidenceRecorder.js.map +1 -1
- package/dist/memory/causal/loadSnapshot.js +16 -59
- package/dist/memory/causal/loadSnapshot.js.map +1 -1
- package/dist/memory/causal/observation.js +16 -0
- package/dist/memory/causal/observation.js.map +1 -0
- package/dist/memory/causal/snapshotProjection.js +65 -0
- package/dist/memory/causal/snapshotProjection.js.map +1 -0
- package/dist/memory/causal/snapshotSchema.js +172 -0
- package/dist/memory/causal/snapshotSchema.js.map +1 -0
- package/dist/memory/causal/types.js +0 -18
- package/dist/memory/causal/types.js.map +1 -1
- package/dist/memory/causal/writeSnapshot.js +17 -14
- package/dist/memory/causal/writeSnapshot.js.map +1 -1
- package/dist/memory/embedding/index.js +1 -1
- package/dist/memory/embedding/index.js.map +1 -1
- package/dist/memory/store/InMemoryStore.js +1 -1
- package/dist/memory/store/InMemoryStore.js.map +1 -1
- package/dist/memory/store/staticVectorStore.js +1 -1
- package/dist/memory/store/staticVectorStore.js.map +1 -1
- package/dist/memory/wire/mountMemoryPipeline.js +8 -2
- package/dist/memory/wire/mountMemoryPipeline.js.map +1 -1
- package/dist/patterns/LlmRouter.js +49 -177
- package/dist/patterns/LlmRouter.js.map +1 -1
- package/dist/patterns/LlmSwarm.js +7 -70
- package/dist/patterns/LlmSwarm.js.map +1 -1
- package/dist/patterns/MapReduce.js +30 -20
- package/dist/patterns/MapReduce.js.map +1 -1
- package/dist/patterns/Swarm.js +233 -79
- package/dist/patterns/Swarm.js.map +1 -1
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/routing.js +22 -0
- package/dist/patterns/routing.js.map +1 -0
- package/dist/recorders/observability/BoundaryRecorder.js +23 -299
- package/dist/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/recorders/observability/boundaryRecorder/agentInternal.js +61 -0
- package/dist/recorders/observability/boundaryRecorder/agentInternal.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/domainEvents.js +3 -0
- package/dist/recorders/observability/boundaryRecorder/domainEvents.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/eventBuilders.js +84 -0
- package/dist/recorders/observability/boundaryRecorder/eventBuilders.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/flowEvents.js +3 -0
- package/dist/recorders/observability/boundaryRecorder/flowEvents.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/leanContent.js +55 -0
- package/dist/recorders/observability/boundaryRecorder/leanContent.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/options.js +3 -0
- package/dist/recorders/observability/boundaryRecorder/options.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/rangeLabels.js +43 -0
- package/dist/recorders/observability/boundaryRecorder/rangeLabels.js.map +1 -0
- package/dist/recorders/observability/boundaryRecorder/rollups.js +72 -0
- package/dist/recorders/observability/boundaryRecorder/rollups.js.map +1 -0
- package/dist/recorders/observability/fileRecordingSink.js +2 -4
- package/dist/recorders/observability/fileRecordingSink.js.map +1 -1
- package/dist/recorders/observability/recordingEnvelope.js +6 -10
- package/dist/recorders/observability/recordingEnvelope.js.map +1 -1
- package/dist/redaction/coverage.js +5 -3
- package/dist/redaction/coverage.js.map +1 -1
- package/dist/redaction/declared.js +18 -3
- package/dist/redaction/declared.js.map +1 -1
- package/dist/redaction/knownStrings.js +10 -34
- package/dist/redaction/knownStrings.js.map +1 -1
- package/dist/redaction/marker.js +1 -1
- package/dist/redaction/privateCaller.js +84 -0
- package/dist/redaction/privateCaller.js.map +1 -0
- package/dist/redaction/privateCheckpoint.js +99 -0
- package/dist/redaction/privateCheckpoint.js.map +1 -0
- package/dist/redaction/privateFields.js +159 -0
- package/dist/redaction/privateFields.js.map +1 -0
- package/dist/redaction/privateRun.js +112 -0
- package/dist/redaction/privateRun.js.map +1 -0
- package/dist/redaction/runRedaction.js +141 -93
- package/dist/redaction/runRedaction.js.map +1 -1
- package/dist/redaction/served.js +28 -7
- package/dist/redaction/served.js.map +1 -1
- package/dist/resilience/withCircuitBreaker.js +1 -1
- package/dist/security/extractSequence.js +1 -1
- package/dist/semantics/coverage/answer.js +1 -1
- package/dist/semantics/coverage/answer.js.map +1 -1
- package/dist/semantics/coverage/composedCoverage.js +1 -1
- package/dist/semantics/coverage/items.js +1 -1
- package/dist/semantics/coverage/read.js +3 -3
- package/dist/semantics/types.js +1 -1
- package/dist/time/drift.js +1 -1
- package/dist/time-travel/servedView/assembly.js +48 -0
- package/dist/time-travel/servedView/assembly.js.map +1 -0
- package/dist/time-travel/servedView/conversation.js +34 -0
- package/dist/time-travel/servedView/conversation.js.map +1 -0
- package/dist/time-travel/servedView/findings.js +72 -0
- package/dist/time-travel/servedView/findings.js.map +1 -0
- package/dist/time-travel/servedView/gaps.js +480 -0
- package/dist/time-travel/servedView/gaps.js.map +1 -0
- package/dist/time-travel/servedView/ontology.js +64 -0
- package/dist/time-travel/servedView/ontology.js.map +1 -0
- package/dist/time-travel/servedView/recordReads.js +79 -0
- package/dist/time-travel/servedView/recordReads.js.map +1 -0
- package/dist/time-travel/servedView/requestOnly.js +71 -0
- package/dist/time-travel/servedView/requestOnly.js.map +1 -0
- package/dist/time-travel/servedView/system.js +41 -0
- package/dist/time-travel/servedView/system.js.map +1 -0
- package/dist/time-travel/servedView/tools.js +40 -0
- package/dist/time-travel/servedView/tools.js.map +1 -0
- package/dist/time-travel/servedView/value.js +62 -0
- package/dist/time-travel/servedView/value.js.map +1 -0
- package/dist/time-travel/servedView.js +161 -882
- package/dist/time-travel/servedView.js.map +1 -1
- package/dist/tools/displayName.js +19 -0
- package/dist/tools/displayName.js.map +1 -0
- package/dist/tools/finiteLabel.js +36 -0
- package/dist/tools/finiteLabel.js.map +1 -0
- package/dist/tools/inputRequest.js +2 -2
- package/dist/tools/toolParty.js +45 -0
- package/dist/tools/toolParty.js.map +1 -0
- package/dist/tools/toolResourceOwner.js +87 -0
- package/dist/tools/toolResourceOwner.js.map +1 -0
- package/dist/tools/toolSessions/contracts.js +10 -0
- package/dist/tools/toolSessions/contracts.js.map +1 -0
- package/dist/tools/toolSessions/keys.js +120 -0
- package/dist/tools/toolSessions/keys.js.map +1 -0
- package/dist/tools/toolSessions/localStatus.js +13 -0
- package/dist/tools/toolSessions/localStatus.js.map +1 -0
- package/dist/tools/toolSessions.js +151 -127
- package/dist/tools/toolSessions.js.map +1 -1
- package/dist/tools/tools.js +18 -17
- package/dist/tools/tools.js.map +1 -1
- package/dist/trace-toolpack/traceToolpack/artifactFacts.js +18 -0
- package/dist/trace-toolpack/traceToolpack/artifactFacts.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/backtrackView.js +120 -0
- package/dist/trace-toolpack/traceToolpack/backtrackView.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/contextErrors.js +357 -0
- package/dist/trace-toolpack/traceToolpack/contextErrors.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/findInTrace.js +181 -0
- package/dist/trace-toolpack/traceToolpack/findInTrace.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/findingEvidence.js +189 -0
- package/dist/trace-toolpack/traceToolpack/findingEvidence.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/innerRecords.js +94 -0
- package/dist/trace-toolpack/traceToolpack/innerRecords.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/narrativeView.js +47 -0
- package/dist/trace-toolpack/traceToolpack/narrativeView.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/navigationHints.js +47 -0
- package/dist/trace-toolpack/traceToolpack/navigationHints.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/nodeView.js +133 -0
- package/dist/trace-toolpack/traceToolpack/nodeView.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/packIndex.js +160 -0
- package/dist/trace-toolpack/traceToolpack/packIndex.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/parameterSchemas.js +40 -0
- package/dist/trace-toolpack/traceToolpack/parameterSchemas.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/recursiveFactory.js +397 -0
- package/dist/trace-toolpack/traceToolpack/recursiveFactory.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/runOverview.js +117 -0
- package/dist/trace-toolpack/traceToolpack/runOverview.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/sliceView.js +90 -0
- package/dist/trace-toolpack/traceToolpack/sliceView.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/structuralLimits.js +71 -0
- package/dist/trace-toolpack/traceToolpack/structuralLimits.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/toolCallJournal.js +388 -0
- package/dist/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/valueLines.js +60 -0
- package/dist/trace-toolpack/traceToolpack/valueLines.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/valueQueries.js +126 -0
- package/dist/trace-toolpack/traceToolpack/valueQueries.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack/writerHints.js +47 -0
- package/dist/trace-toolpack/traceToolpack/writerHints.js.map +1 -0
- package/dist/trace-toolpack/traceToolpack.js +18 -2455
- package/dist/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/types/adapters/observability/auditShapes.d.ts +5 -31
- package/dist/types/adapters/observability/auditShapes.d.ts.map +1 -1
- package/dist/types/adapters/observability/otel.d.ts +1 -1
- package/dist/types/bridge/eventMeta.d.ts +2 -0
- package/dist/types/bridge/eventMeta.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +18 -121
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/LLMCall.d.ts +1 -4
- package/dist/types/core/LLMCall.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts +42 -114
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/answerRows.d.ts +27 -0
- package/dist/types/core/agent/arguments/answerRows.d.ts.map +1 -0
- package/dist/types/core/agent/arguments/ask.d.ts +5 -11
- package/dist/types/core/agent/arguments/ask.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/dispatch.d.ts +4 -4
- package/dist/types/core/agent/arguments/dispatch.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/kept.d.ts +1 -1
- package/dist/types/core/agent/arguments/partialWindow.d.ts +2 -1
- package/dist/types/core/agent/arguments/partialWindow.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts +38 -0
- package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts.map +1 -0
- package/dist/types/core/agent/arguments/privateAnswers.d.ts +47 -0
- package/dist/types/core/agent/arguments/privateAnswers.d.ts.map +1 -0
- package/dist/types/core/agent/arguments/resolutionRows.d.ts +30 -0
- package/dist/types/core/agent/arguments/resolutionRows.d.ts.map +1 -0
- package/dist/types/core/agent/arguments/resolve.d.ts +2 -13
- package/dist/types/core/agent/arguments/resolve.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/serve.d.ts +0 -5
- package/dist/types/core/agent/arguments/serve.d.ts.map +1 -1
- package/dist/types/core/agent/arguments/subflow.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +3 -326
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildToolRegistry.d.ts +1 -1
- package/dist/types/core/agent/callerIdentity.d.ts +9 -64
- package/dist/types/core/agent/callerIdentity.d.ts.map +1 -1
- package/dist/types/core/agent/chartContract.d.ts +328 -0
- package/dist/types/core/agent/chartContract.d.ts.map +1 -0
- package/dist/types/core/agent/checkpointDomain.d.ts +12 -0
- package/dist/types/core/agent/checkpointDomain.d.ts.map +1 -0
- package/dist/types/core/agent/componentObservers.d.ts +15 -0
- package/dist/types/core/agent/componentObservers.d.ts.map +1 -0
- package/dist/types/core/agent/componentResources.d.ts +40 -0
- package/dist/types/core/agent/componentResources.d.ts.map +1 -0
- package/dist/types/core/agent/evidence/frames.d.ts.map +1 -1
- package/dist/types/core/agent/evidence/servedJson.d.ts +1 -1
- package/dist/types/core/agent/findings/contingent.d.ts +1 -1
- package/dist/types/core/agent/findings/judge.d.ts +1 -1
- package/dist/types/core/agent/findings/types.d.ts +1 -1
- package/dist/types/core/agent/findings/unsettled.d.ts +3 -3
- package/dist/types/core/agent/honesty/inputsMountContract.d.ts +67 -0
- package/dist/types/core/agent/honesty/inputsMountContract.d.ts.map +1 -0
- package/dist/types/core/agent/honesty/mounts.d.ts +4 -66
- package/dist/types/core/agent/honesty/mounts.d.ts.map +1 -1
- package/dist/types/core/agent/hostTurn.d.ts +18 -0
- package/dist/types/core/agent/hostTurn.d.ts.map +1 -0
- package/dist/types/core/agent/pauseOwnership.d.ts +25 -0
- package/dist/types/core/agent/pauseOwnership.d.ts.map +1 -0
- package/dist/types/core/agent/presentTool.d.ts +1 -1
- package/dist/types/core/agent/resultCeiling.d.ts +1 -1
- package/dist/types/core/agent/resumeAnswer.d.ts +11 -0
- package/dist/types/core/agent/resumeAnswer.d.ts.map +1 -0
- package/dist/types/core/agent/resumeCheckpoint.d.ts +13 -0
- package/dist/types/core/agent/resumeCheckpoint.d.ts.map +1 -0
- package/dist/types/core/agent/resumeError.d.ts +9 -0
- package/dist/types/core/agent/resumeError.d.ts.map +1 -0
- package/dist/types/core/agent/run/clocks.d.ts +45 -0
- package/dist/types/core/agent/run/clocks.d.ts.map +1 -0
- package/dist/types/core/agent/run/commitRunRedaction.d.ts +5 -0
- package/dist/types/core/agent/run/commitRunRedaction.d.ts.map +1 -0
- package/dist/types/core/agent/run/eventStageIds.d.ts +41 -0
- package/dist/types/core/agent/run/eventStageIds.d.ts.map +1 -0
- package/dist/types/core/agent/run/injectionDelivery.d.ts +5 -0
- package/dist/types/core/agent/run/injectionDelivery.d.ts.map +1 -0
- package/dist/types/core/agent/run/ledgerFacts.d.ts +9 -0
- package/dist/types/core/agent/run/ledgerFacts.d.ts.map +1 -0
- package/dist/types/core/agent/run/resumeRedaction.d.ts +7 -0
- package/dist/types/core/agent/run/resumeRedaction.d.ts.map +1 -0
- package/dist/types/core/agent/run/withoutTime.d.ts +9 -0
- package/dist/types/core/agent/run/withoutTime.d.ts.map +1 -0
- package/dist/types/core/agent/runValues.d.ts +72 -0
- package/dist/types/core/agent/runValues.d.ts.map +1 -0
- package/dist/types/core/agent/scripts/rows.d.ts +1 -1
- package/dist/types/core/agent/scripts/types.d.ts +1 -1
- package/dist/types/core/agent/stages/argumentAsk.d.ts +7 -1
- package/dist/types/core/agent/stages/argumentAsk.d.ts.map +1 -1
- package/dist/types/core/agent/stages/argumentParties.d.ts +4 -0
- package/dist/types/core/agent/stages/argumentParties.d.ts.map +1 -0
- package/dist/types/core/agent/stages/batchParties.d.ts +22 -0
- package/dist/types/core/agent/stages/batchParties.d.ts.map +1 -0
- package/dist/types/core/agent/stages/finalStageContract.d.ts +46 -0
- package/dist/types/core/agent/stages/finalStageContract.d.ts.map +1 -0
- package/dist/types/core/agent/stages/prepareFinal.d.ts +2 -45
- package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
- package/dist/types/core/agent/stages/searchCoverage.d.ts +1 -1
- package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
- package/dist/types/core/agent/stages/servedParties.d.ts +40 -0
- package/dist/types/core/agent/stages/servedParties.d.ts.map +1 -0
- package/dist/types/core/agent/stages/timeLayer.d.ts +3 -3
- package/dist/types/core/agent/stages/timeLayer.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCallShape.d.ts +8 -0
- package/dist/types/core/agent/stages/toolCallShape.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/argumentGate.d.ts +22 -0
- package/dist/types/core/agent/stages/toolCalls/access/argumentGate.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/argumentValidation.d.ts +11 -0
- package/dist/types/core/agent/stages/toolCalls/access/argumentValidation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/bindings.d.ts +62 -0
- package/dist/types/core/agent/stages/toolCalls/access/bindings.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/callState.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/access/callState.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts +29 -0
- package/dist/types/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/checkInAdmission.d.ts +45 -0
- package/dist/types/core/agent/stages/toolCalls/access/checkInAdmission.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/heldAnswer.d.ts +9 -0
- package/dist/types/core/agent/stages/toolCalls/access/heldAnswer.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts +51 -0
- package/dist/types/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/access/toolPermission.d.ts +25 -0
- package/dist/types/core/agent/stages/toolCalls/access/toolPermission.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/completion.d.ts +19 -0
- package/dist/types/core/agent/stages/toolCalls/batch/completion.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/dispatchContext.d.ts +37 -0
- package/dist/types/core/agent/stages/toolCalls/batch/dispatchContext.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/execute.d.ts +8 -0
- package/dist/types/core/agent/stages/toolCalls/batch/execute.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts +19 -0
- package/dist/types/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/inputResolutions.d.ts +7 -0
- package/dist/types/core/agent/stages/toolCalls/batch/inputResolutions.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/paused.d.ts +66 -0
- package/dist/types/core/agent/stages/toolCalls/batch/paused.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/refusal.d.ts +6 -0
- package/dist/types/core/agent/stages/toolCalls/batch/refusal.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/settle.d.ts +67 -0
- package/dist/types/core/agent/stages/toolCalls/batch/settle.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/batch/settlementOperations.d.ts +18 -0
- package/dist/types/core/agent/stages/toolCalls/batch/settlementOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/compose.d.ts +240 -0
- package/dist/types/core/agent/stages/toolCalls/compose.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/access.d.ts +111 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/access.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/artifacts.d.ts +27 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/artifacts.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/batchCall.d.ts +9 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/batchCall.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/callCells.d.ts +44 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/callCells.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/callFacts.d.ts +51 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/callFacts.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/catalog.d.ts +57 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/catalog.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts +18 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/evidence.d.ts +212 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/evidence.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts +3 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/observation.d.ts +25 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/observation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts +38 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts +32 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/context.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/context.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts +24 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts +6 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/effects.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/effects.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts +17 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/limits.d.ts +20 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/limits.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts +26 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/observations.d.ts +9 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/observations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/progress.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/progress.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/resources.d.ts +13 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/resources.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts +31 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts +41 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts +11 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts +14 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/steps.d.ts +27 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/operations/steps.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/resources.d.ts +68 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/resources.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/results.d.ts +27 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/results.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/routing.d.ts +115 -0
- package/dist/types/core/agent/stages/toolCalls/contracts/routing.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts +30 -0
- package/dist/types/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts +10 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts +30 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/madeInRun.d.ts +7 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/madeInRun.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts +23 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/sourceClock.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/sourceClock.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/towers.d.ts +19 -0
- package/dist/types/core/agent/stages/toolCalls/evidence/towers.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts +13 -0
- package/dist/types/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/callStart.d.ts +36 -0
- package/dist/types/core/agent/stages/toolCalls/execution/callStart.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/catalogOperations.d.ts +18 -0
- package/dist/types/core/agent/stages/toolCalls/execution/catalogOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/contextOperations.d.ts +16 -0
- package/dist/types/core/agent/stages/toolCalls/execution/contextOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts +49 -0
- package/dist/types/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts +10 -0
- package/dist/types/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/deliveredResult.d.ts +41 -0
- package/dist/types/core/agent/stages/toolCalls/execution/deliveredResult.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/dispatchCall.d.ts +6 -0
- package/dist/types/core/agent/stages/toolCalls/execution/dispatchCall.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/initialInvocation.d.ts +71 -0
- package/dist/types/core/agent/stages/toolCalls/execution/initialInvocation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts +10 -0
- package/dist/types/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts +43 -0
- package/dist/types/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/execution/wantedArguments.d.ts +20 -0
- package/dist/types/core/agent/stages/toolCalls/execution/wantedArguments.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts +4 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts +62 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts +42 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts +24 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts +88 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +9 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/sourceNote.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts +12 -0
- package/dist/types/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/index.d.ts +15 -0
- package/dist/types/core/agent/stages/toolCalls/index.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/observation/callSettlement.d.ts +30 -0
- package/dist/types/core/agent/stages/toolCalls/observation/callSettlement.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/observation/observationsOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/observation/observationsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/observation/progressOperations.d.ts +8 -0
- package/dist/types/core/agent/stages/toolCalls/observation/progressOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/resume/ask.d.ts +45 -0
- package/dist/types/core/agent/stages/toolCalls/resume/ask.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/resume/checkIn.d.ts +40 -0
- package/dist/types/core/agent/stages/toolCalls/resume/checkIn.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/resume/credential.d.ts +38 -0
- package/dist/types/core/agent/stages/toolCalls/resume/credential.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/resume/handler.d.ts +7 -0
- package/dist/types/core/agent/stages/toolCalls/resume/handler.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/resume/plain.d.ts +33 -0
- package/dist/types/core/agent/stages/toolCalls/resume/plain.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/routing/effectsOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/routing/effectsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/routing/policyHalt.d.ts +18 -0
- package/dist/types/core/agent/stages/toolCalls/routing/policyHalt.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts +21 -0
- package/dist/types/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/routing/skillActivation.d.ts +16 -0
- package/dist/types/core/agent/stages/toolCalls/routing/skillActivation.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolCalls/routing/stepsOperations.d.ts +5 -0
- package/dist/types/core/agent/stages/toolCalls/routing/stepsOperations.d.ts.map +1 -0
- package/dist/types/core/agent/stages/toolResolver.d.ts +3 -2
- package/dist/types/core/agent/stages/toolResolver.d.ts.map +1 -1
- package/dist/types/core/agent/toolChoice/pick.d.ts +1 -1
- package/dist/types/core/agent/toolResultCap.d.ts +1 -1
- package/dist/types/core/agent/types.d.ts +16 -27
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/agent/window/toolNames.d.ts +3 -3
- package/dist/types/core/answerConsumption.d.ts +8 -0
- package/dist/types/core/answerConsumption.d.ts.map +1 -0
- package/dist/types/core/checkin.d.ts +1 -1
- package/dist/types/core/codeRunnerTool.d.ts +1 -1
- package/dist/types/core/consentLedger.d.ts +22 -0
- package/dist/types/core/consentLedger.d.ts.map +1 -0
- package/dist/types/core/consentRequest.d.ts +35 -54
- package/dist/types/core/consentRequest.d.ts.map +1 -1
- package/dist/types/core/conversation.d.ts +8 -29
- package/dist/types/core/conversation.d.ts.map +1 -1
- package/dist/types/core/memberRun.d.ts +1 -0
- package/dist/types/core/memberRun.d.ts.map +1 -1
- package/dist/types/core/pause.d.ts +5 -5
- package/dist/types/core/pauseRecord.d.ts +14 -0
- package/dist/types/core/pauseRecord.d.ts.map +1 -0
- package/dist/types/core/runEntry.d.ts +9 -0
- package/dist/types/core/runEntry.d.ts.map +1 -0
- package/dist/types/core/runnerCoreValues.d.ts +17 -0
- package/dist/types/core/runnerCoreValues.d.ts.map +1 -0
- package/dist/types/core/runnerExecution.d.ts +72 -0
- package/dist/types/core/runnerExecution.d.ts.map +1 -0
- package/dist/types/core/runnerLive.d.ts +32 -1
- package/dist/types/core/runnerLive.d.ts.map +1 -1
- package/dist/types/core/slots/buildThinkingSubflow.d.ts +1 -1
- package/dist/types/core/slots/buildToolsSlot.d.ts +27 -56
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/core/slots/discoverTools.d.ts +22 -0
- package/dist/types/core/slots/discoverTools.d.ts.map +1 -0
- package/dist/types/core-flow/Conditional.d.ts +0 -2
- package/dist/types/core-flow/Conditional.d.ts.map +1 -1
- package/dist/types/core-flow/Graph.d.ts +18 -23
- package/dist/types/core-flow/Graph.d.ts.map +1 -1
- package/dist/types/core-flow/Loop.d.ts +0 -2
- package/dist/types/core-flow/Loop.d.ts.map +1 -1
- package/dist/types/core-flow/Parallel.d.ts +11 -40
- package/dist/types/core-flow/Parallel.d.ts.map +1 -1
- package/dist/types/core-flow/Sequence.d.ts +0 -2
- package/dist/types/core-flow/Sequence.d.ts.map +1 -1
- package/dist/types/core-flow/Workflow.d.ts +0 -2
- package/dist/types/core-flow/Workflow.d.ts.map +1 -1
- package/dist/types/events/dispatcher.d.ts +2 -2
- package/dist/types/events/payloads/access.d.ts +89 -0
- package/dist/types/events/payloads/access.d.ts.map +1 -0
- package/dist/types/events/payloads/agent.d.ts +242 -0
- package/dist/types/events/payloads/agent.d.ts.map +1 -0
- package/dist/types/events/payloads/answer.d.ts +96 -0
- package/dist/types/events/payloads/answer.d.ts.map +1 -0
- package/dist/types/events/payloads/artifacts.d.ts +140 -0
- package/dist/types/events/payloads/artifacts.d.ts.map +1 -0
- package/dist/types/events/payloads/consent.d.ts +87 -0
- package/dist/types/events/payloads/consent.d.ts.map +1 -0
- package/dist/types/events/payloads/context.d.ts +277 -0
- package/dist/types/events/payloads/context.d.ts.map +1 -0
- package/dist/types/events/payloads/cost.d.ts +41 -0
- package/dist/types/events/payloads/cost.d.ts.map +1 -0
- package/dist/types/events/payloads/dependencyTypes.d.ts +19 -0
- package/dist/types/events/payloads/dependencyTypes.d.ts.map +1 -0
- package/dist/types/events/payloads/evaluation.d.ts +298 -0
- package/dist/types/events/payloads/evaluation.d.ts.map +1 -0
- package/dist/types/events/payloads/fallback.d.ts +7 -0
- package/dist/types/events/payloads/fallback.d.ts.map +1 -0
- package/dist/types/events/payloads/findings.d.ts +244 -0
- package/dist/types/events/payloads/findings.d.ts.map +1 -0
- package/dist/types/events/payloads/flow.d.ts +69 -0
- package/dist/types/events/payloads/flow.d.ts.map +1 -0
- package/dist/types/events/payloads/integrity.d.ts +49 -0
- package/dist/types/events/payloads/integrity.d.ts.map +1 -0
- package/dist/types/events/payloads/maps.d.ts +48 -0
- package/dist/types/events/payloads/maps.d.ts.map +1 -0
- package/dist/types/events/payloads/mcpRequests.d.ts +328 -0
- package/dist/types/events/payloads/mcpRequests.d.ts.map +1 -0
- package/dist/types/events/payloads/memory.d.ts +118 -0
- package/dist/types/events/payloads/memory.d.ts.map +1 -0
- package/dist/types/events/payloads/reliability.d.ts +150 -0
- package/dist/types/events/payloads/reliability.d.ts.map +1 -0
- package/dist/types/events/payloads/runConfiguration.d.ts +225 -0
- package/dist/types/events/payloads/runConfiguration.d.ts.map +1 -0
- package/dist/types/events/payloads/skills.d.ts +360 -0
- package/dist/types/events/payloads/skills.d.ts.map +1 -0
- package/dist/types/events/payloads/stream.d.ts +231 -0
- package/dist/types/events/payloads/stream.d.ts.map +1 -0
- package/dist/types/events/payloads/thinking.d.ts +119 -0
- package/dist/types/events/payloads/thinking.d.ts.map +1 -0
- package/dist/types/events/payloads/toolCatalog.d.ts +158 -0
- package/dist/types/events/payloads/toolCatalog.d.ts.map +1 -0
- package/dist/types/events/payloads/toolChoice.d.ts +66 -0
- package/dist/types/events/payloads/toolChoice.d.ts.map +1 -0
- package/dist/types/events/payloads/toolEffects.d.ts +330 -0
- package/dist/types/events/payloads/toolEffects.d.ts.map +1 -0
- package/dist/types/events/payloads/toolSemantics.d.ts +69 -0
- package/dist/types/events/payloads/toolSemantics.d.ts.map +1 -0
- package/dist/types/events/payloads/toolSessionPayloads.d.ts +51 -0
- package/dist/types/events/payloads/toolSessionPayloads.d.ts.map +1 -0
- package/dist/types/events/payloads/validation.d.ts +30 -0
- package/dist/types/events/payloads/validation.d.ts.map +1 -0
- package/dist/types/events/payloads.d.ts +26 -3888
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +8 -15
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/hosting/answeredPause.d.ts +9 -23
- package/dist/types/hosting/answeredPause.d.ts.map +1 -1
- package/dist/types/hosting/durability.d.ts +10 -7
- package/dist/types/hosting/durability.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent.d.ts +4 -14
- package/dist/types/hosting/standingAgent.d.ts.map +1 -1
- package/dist/types/hosting/stream.d.ts +3 -3
- package/dist/types/hosting/stream.d.ts.map +1 -1
- package/dist/types/hosting/streamHandler.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/injection-engine/devWarn.d.ts +3 -2
- package/dist/types/injection-engine/devWarn.d.ts.map +1 -1
- package/dist/types/injection-engine/hostContract.d.ts +3 -3
- package/dist/types/injection-engine/skillExamples.d.ts +1 -1
- package/dist/types/injection-engine/skillGraph/cursorEvidence.d.ts +49 -0
- package/dist/types/injection-engine/skillGraph/cursorEvidence.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/cursorResolution.d.ts +5 -0
- package/dist/types/injection-engine/skillGraph/cursorResolution.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/decision.d.ts +22 -0
- package/dist/types/injection-engine/skillGraph/decision.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/entryScores.d.ts +15 -0
- package/dist/types/injection-engine/skillGraph/entryScores.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/entrySuppression.d.ts +24 -0
- package/dist/types/injection-engine/skillGraph/entrySuppression.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/graphConfig.d.ts +40 -0
- package/dist/types/injection-engine/skillGraph/graphConfig.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/graphContracts.d.ts +480 -0
- package/dist/types/injection-engine/skillGraph/graphContracts.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/graphCursor.d.ts +126 -0
- package/dist/types/injection-engine/skillGraph/graphCursor.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/graphDrawing.d.ts +3 -0
- package/dist/types/injection-engine/skillGraph/graphDrawing.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/graphRoutes.d.ts +270 -0
- package/dist/types/injection-engine/skillGraph/graphRoutes.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/passMemo.d.ts +25 -0
- package/dist/types/injection-engine/skillGraph/passMemo.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/reachability.d.ts +72 -0
- package/dist/types/injection-engine/skillGraph/reachability.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/routePredicates.d.ts +37 -0
- package/dist/types/injection-engine/skillGraph/routePredicates.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/routingView.d.ts +4 -0
- package/dist/types/injection-engine/skillGraph/routingView.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/treeCompilation.d.ts +39 -0
- package/dist/types/injection-engine/skillGraph/treeCompilation.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph/triggerCompilation.d.ts +17 -0
- package/dist/types/injection-engine/skillGraph/triggerCompilation.d.ts.map +1 -0
- package/dist/types/injection-engine/skillGraph.d.ts +12 -948
- package/dist/types/injection-engine/skillGraph.d.ts.map +1 -1
- package/dist/types/injection-engine/skillIntent.d.ts +1 -1
- package/dist/types/injection-engine/skillIntent.d.ts.map +1 -1
- package/dist/types/injection-engine/skillMatch.d.ts +2 -1
- package/dist/types/injection-engine/skillMatch.d.ts.map +1 -1
- package/dist/types/injection-engine/startRuleClaim.d.ts +1 -1
- package/dist/types/injection-engine/types.d.ts +1 -1
- package/dist/types/lib/cosine.d.ts.map +1 -0
- package/dist/types/lib/iterationBudget.d.ts +3 -0
- package/dist/types/lib/iterationBudget.d.ts.map +1 -1
- package/dist/types/lib/saidByPerson.d.ts +1 -0
- package/dist/types/lib/saidByPerson.d.ts.map +1 -1
- package/dist/types/lib/toolBytes.d.ts +1 -1
- package/dist/types/memory/causal/evidenceRecorder.d.ts +8 -56
- package/dist/types/memory/causal/evidenceRecorder.d.ts.map +1 -1
- package/dist/types/memory/causal/loadSnapshot.d.ts.map +1 -1
- package/dist/types/memory/causal/observation.d.ts +73 -0
- package/dist/types/memory/causal/observation.d.ts.map +1 -0
- package/dist/types/memory/causal/snapshotProjection.d.ts +6 -0
- package/dist/types/memory/causal/snapshotProjection.d.ts.map +1 -0
- package/dist/types/memory/causal/snapshotSchema.d.ts +9 -0
- package/dist/types/memory/causal/snapshotSchema.d.ts.map +1 -0
- package/dist/types/memory/causal/types.d.ts +5 -82
- package/dist/types/memory/causal/types.d.ts.map +1 -1
- package/dist/types/memory/causal/writeSnapshot.d.ts.map +1 -1
- package/dist/types/memory/embedding/index.d.ts +1 -1
- package/dist/types/memory/embedding/index.d.ts.map +1 -1
- package/dist/types/memory/stages/types.d.ts +1 -1
- package/dist/types/memory/wire/mountMemoryPipeline.d.ts +7 -7
- package/dist/types/memory/wire/mountMemoryPipeline.d.ts.map +1 -1
- package/dist/types/patterns/LlmRouter.d.ts +11 -149
- package/dist/types/patterns/LlmRouter.d.ts.map +1 -1
- package/dist/types/patterns/LlmSwarm.d.ts +5 -49
- package/dist/types/patterns/LlmSwarm.d.ts.map +1 -1
- package/dist/types/patterns/MapReduce.d.ts.map +1 -1
- package/dist/types/patterns/Swarm.d.ts +14 -45
- package/dist/types/patterns/Swarm.d.ts.map +1 -1
- package/dist/types/patterns/index.d.ts +1 -1
- package/dist/types/patterns/index.d.ts.map +1 -1
- package/dist/types/patterns/routing.d.ts +16 -0
- package/dist/types/patterns/routing.d.ts.map +1 -0
- package/dist/types/provider-contract/types.d.ts +5 -5
- package/dist/types/recorders/core/CompactionMeter.d.ts +1 -1
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts +13 -427
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/boundaryRecorder/agentInternal.d.ts +14 -0
- package/dist/types/recorders/observability/boundaryRecorder/agentInternal.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts +211 -0
- package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/eventBuilders.d.ts +12 -0
- package/dist/types/recorders/observability/boundaryRecorder/eventBuilders.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/flowEvents.d.ts +13 -0
- package/dist/types/recorders/observability/boundaryRecorder/flowEvents.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/leanContent.d.ts +53 -0
- package/dist/types/recorders/observability/boundaryRecorder/leanContent.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/options.d.ts +96 -0
- package/dist/types/recorders/observability/boundaryRecorder/options.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/rangeLabels.d.ts +34 -0
- package/dist/types/recorders/observability/boundaryRecorder/rangeLabels.d.ts.map +1 -0
- package/dist/types/recorders/observability/boundaryRecorder/rollups.d.ts +54 -0
- package/dist/types/recorders/observability/boundaryRecorder/rollups.d.ts.map +1 -0
- package/dist/types/recorders/observability/fileRecordingSink.d.ts +2 -4
- package/dist/types/recorders/observability/fileRecordingSink.d.ts.map +1 -1
- package/dist/types/recorders/observability/recordingEnvelope.d.ts +6 -10
- package/dist/types/recorders/observability/recordingEnvelope.d.ts.map +1 -1
- package/dist/types/redaction/coverage.d.ts +5 -3
- package/dist/types/redaction/coverage.d.ts.map +1 -1
- package/dist/types/redaction/declared.d.ts +4 -0
- package/dist/types/redaction/declared.d.ts.map +1 -1
- package/dist/types/redaction/knownStrings.d.ts +5 -34
- package/dist/types/redaction/knownStrings.d.ts.map +1 -1
- package/dist/types/redaction/marker.d.ts +1 -1
- package/dist/types/redaction/privateCaller.d.ts +44 -0
- package/dist/types/redaction/privateCaller.d.ts.map +1 -0
- package/dist/types/redaction/privateCheckpoint.d.ts +23 -0
- package/dist/types/redaction/privateCheckpoint.d.ts.map +1 -0
- package/dist/types/redaction/privateFields.d.ts +29 -0
- package/dist/types/redaction/privateFields.d.ts.map +1 -0
- package/dist/types/redaction/privateRun.d.ts +33 -0
- package/dist/types/redaction/privateRun.d.ts.map +1 -0
- package/dist/types/redaction/runRedaction.d.ts +47 -41
- package/dist/types/redaction/runRedaction.d.ts.map +1 -1
- package/dist/types/redaction/served.d.ts +10 -4
- package/dist/types/redaction/served.d.ts.map +1 -1
- package/dist/types/resilience/withCircuitBreaker.d.ts +1 -1
- package/dist/types/semantics/coverage/composedCoverage.d.ts +1 -1
- package/dist/types/semantics/coverage/items.d.ts +1 -1
- package/dist/types/semantics/coverage/read.d.ts +3 -3
- package/dist/types/semantics/types.d.ts +1 -1
- package/dist/types/time/drift.d.ts +1 -1
- package/dist/types/time-travel/servedView/assembly.d.ts +5 -0
- package/dist/types/time-travel/servedView/assembly.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/conversation.d.ts +9 -0
- package/dist/types/time-travel/servedView/conversation.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/findings.d.ts +12 -0
- package/dist/types/time-travel/servedView/findings.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/gaps.d.ts +77 -0
- package/dist/types/time-travel/servedView/gaps.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/ontology.d.ts +5 -0
- package/dist/types/time-travel/servedView/ontology.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/recordReads.d.ts +45 -0
- package/dist/types/time-travel/servedView/recordReads.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/requestOnly.d.ts +7 -0
- package/dist/types/time-travel/servedView/requestOnly.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/system.d.ts +16 -0
- package/dist/types/time-travel/servedView/system.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/tools.d.ts +10 -0
- package/dist/types/time-travel/servedView/tools.d.ts.map +1 -0
- package/dist/types/time-travel/servedView/value.d.ts +39 -0
- package/dist/types/time-travel/servedView/value.d.ts.map +1 -0
- package/dist/types/time-travel/servedView.d.ts +5 -65
- package/dist/types/time-travel/servedView.d.ts.map +1 -1
- package/dist/types/tools/displayName.d.ts +7 -0
- package/dist/types/tools/displayName.d.ts.map +1 -0
- package/dist/types/tools/finiteLabel.d.ts +17 -0
- package/dist/types/tools/finiteLabel.d.ts.map +1 -0
- package/dist/types/tools/inputRequest.d.ts +1 -1
- package/dist/types/tools/toolParty.d.ts +18 -0
- package/dist/types/tools/toolParty.d.ts.map +1 -0
- package/dist/types/tools/toolProvider.d.ts +1 -0
- package/dist/types/tools/toolProvider.d.ts.map +1 -1
- package/dist/types/tools/toolResourceOwner.d.ts +28 -0
- package/dist/types/tools/toolResourceOwner.d.ts.map +1 -0
- package/dist/types/tools/toolSessions/contracts.d.ts +131 -0
- package/dist/types/tools/toolSessions/contracts.d.ts.map +1 -0
- package/dist/types/tools/toolSessions/keys.d.ts +54 -0
- package/dist/types/tools/toolSessions/keys.d.ts.map +1 -0
- package/dist/types/tools/toolSessions/localStatus.d.ts +8 -0
- package/dist/types/tools/toolSessions/localStatus.d.ts.map +1 -0
- package/dist/types/tools/toolSessions.d.ts +30 -178
- package/dist/types/tools/toolSessions.d.ts.map +1 -1
- package/dist/types/tools/tools.d.ts +6 -8
- package/dist/types/tools/tools.d.ts.map +1 -1
- package/dist/types/trace-toolpack/traceToolpack/artifactFacts.d.ts +16 -0
- package/dist/types/trace-toolpack/traceToolpack/artifactFacts.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/backtrackView.d.ts +18 -0
- package/dist/types/trace-toolpack/traceToolpack/backtrackView.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/contextErrors.d.ts +44 -0
- package/dist/types/trace-toolpack/traceToolpack/contextErrors.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/findInTrace.d.ts +27 -0
- package/dist/types/trace-toolpack/traceToolpack/findInTrace.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/findingEvidence.d.ts +74 -0
- package/dist/types/trace-toolpack/traceToolpack/findingEvidence.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/innerRecords.d.ts +12 -0
- package/dist/types/trace-toolpack/traceToolpack/innerRecords.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/narrativeView.d.ts +4 -0
- package/dist/types/trace-toolpack/traceToolpack/narrativeView.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/navigationHints.d.ts +7 -0
- package/dist/types/trace-toolpack/traceToolpack/navigationHints.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/nodeView.d.ts +6 -0
- package/dist/types/trace-toolpack/traceToolpack/nodeView.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/packIndex.d.ts +70 -0
- package/dist/types/trace-toolpack/traceToolpack/packIndex.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/parameterSchemas.d.ts +11 -0
- package/dist/types/trace-toolpack/traceToolpack/parameterSchemas.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/recursiveFactory.d.ts +41 -0
- package/dist/types/trace-toolpack/traceToolpack/recursiveFactory.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/runOverview.d.ts +6 -0
- package/dist/types/trace-toolpack/traceToolpack/runOverview.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/sliceView.d.ts +6 -0
- package/dist/types/trace-toolpack/traceToolpack/sliceView.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/structuralLimits.d.ts +42 -0
- package/dist/types/trace-toolpack/traceToolpack/structuralLimits.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts +106 -0
- package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/valueLines.d.ts +30 -0
- package/dist/types/trace-toolpack/traceToolpack/valueLines.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/valueQueries.d.ts +7 -0
- package/dist/types/trace-toolpack/traceToolpack/valueQueries.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack/writerHints.d.ts +14 -0
- package/dist/types/trace-toolpack/traceToolpack/writerHints.d.ts.map +1 -0
- package/dist/types/trace-toolpack/traceToolpack.d.ts +15 -40
- package/dist/types/trace-toolpack/traceToolpack.d.ts.map +1 -1
- package/package.json +7 -6
- package/dist/core/agent/stages/toolCalls.js +0 -6194
- package/dist/core/agent/stages/toolCalls.js.map +0 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +0 -895
- package/dist/esm/core/agent/stages/toolCalls.js +0 -6159
- package/dist/esm/core/agent/stages/toolCalls.js.map +0 -1
- package/dist/esm/memory/embedding/cosine.js.map +0 -1
- package/dist/memory/embedding/cosine.js.map +0 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +0 -896
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +0 -1
- package/dist/types/memory/embedding/cosine.d.ts.map +0 -1
- /package/dist/esm/{memory/embedding → lib}/cosine.d.ts +0 -0
- /package/dist/esm/{memory/embedding → lib}/cosine.js +0 -0
- /package/dist/{memory/embedding → lib}/cosine.js +0 -0
- /package/dist/types/{memory/embedding → lib}/cosine.d.ts +0 -0
|
@@ -7,3892 +7,30 @@
|
|
|
7
7
|
* Role: Contract layer of Event-Driven Hexagonal Architecture.
|
|
8
8
|
* Emits: (types only).
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* the exit moment can reference the same human-readable identity
|
|
37
|
-
* used at entry — no name-cache required across the start/stop
|
|
38
|
-
* pair. Optional for back-compat with pre-v2.14.5 emitters. */
|
|
39
|
-
readonly name?: string;
|
|
40
|
-
readonly status: 'ok' | 'err' | 'break' | 'budget_exhausted';
|
|
41
|
-
readonly durationMs: number;
|
|
42
|
-
}
|
|
43
|
-
export interface ParallelForkStartPayload {
|
|
44
|
-
readonly parentId: string;
|
|
45
|
-
readonly branches: readonly {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
}[];
|
|
49
|
-
}
|
|
50
|
-
export interface ParallelBranchCompletePayload {
|
|
51
|
-
readonly parentId: string;
|
|
52
|
-
readonly branchId: string;
|
|
53
|
-
readonly status: 'ok' | 'err';
|
|
54
|
-
readonly durationMs: number;
|
|
55
|
-
}
|
|
56
|
-
export interface ParallelMergeEndPayload {
|
|
57
|
-
readonly parentId: string;
|
|
58
|
-
/**
|
|
59
|
-
* Which merge strategy ran. `'fn'` = `mergeWithFn` (strict, plain
|
|
60
|
-
* results map). `'llm'` = `mergeWithLLM` (strict, LLM synthesis).
|
|
61
|
-
* `'outcomes-fn'` = `mergeOutcomesWithFn` (tolerant, full
|
|
62
|
-
* `BranchOutcome` map). Distinct values so consumers can render
|
|
63
|
-
* tolerant vs strict merges differently in dashboards.
|
|
64
|
-
*/
|
|
65
|
-
readonly strategy: 'llm' | 'fn' | 'outcomes-fn';
|
|
66
|
-
readonly resultSummary: string;
|
|
67
|
-
/** Number of branches whose result FED the merge — i.e., succeeded
|
|
68
|
-
* (or, in tolerant mode, those the merge fn actually consumed as
|
|
69
|
-
* `{ok: true}`). Failing branches are counted in `totalBranchCount
|
|
70
|
-
* - mergedBranchCount`. */
|
|
71
|
-
readonly mergedBranchCount: number;
|
|
72
|
-
/** Total number of branches declared on the Parallel — equals
|
|
73
|
-
* `mergedBranchCount` on all-success runs, larger on partial. */
|
|
74
|
-
readonly totalBranchCount: number;
|
|
75
|
-
}
|
|
76
|
-
export interface ConditionalRouteDecidedPayload {
|
|
77
|
-
readonly conditionalId: string;
|
|
78
|
-
readonly chosen: string;
|
|
79
|
-
readonly rationale?: string;
|
|
80
|
-
readonly evidence?: unknown;
|
|
81
|
-
}
|
|
82
|
-
export interface LoopIterationStartPayload {
|
|
83
|
-
readonly loopId: string;
|
|
84
|
-
readonly iteration: number;
|
|
85
|
-
}
|
|
86
|
-
export interface LoopIterationExitPayload {
|
|
87
|
-
readonly loopId: string;
|
|
88
|
-
readonly iteration: number;
|
|
89
|
-
readonly reason: 'budget' | 'guard_false' | 'break' | 'body_complete';
|
|
90
|
-
}
|
|
91
|
-
export interface AgentTurnStartPayload {
|
|
92
|
-
readonly turnIndex: number;
|
|
93
|
-
readonly userPrompt: string;
|
|
94
|
-
}
|
|
95
|
-
export interface AgentTurnEndPayload {
|
|
96
|
-
readonly turnIndex: number;
|
|
97
|
-
readonly finalContent: string;
|
|
98
|
-
readonly totalInputTokens: number;
|
|
99
|
-
readonly totalOutputTokens: number;
|
|
100
|
-
readonly iterationCount: number;
|
|
101
|
-
readonly durationMs: number;
|
|
102
|
-
/**
|
|
103
|
-
* Why the loop stopped before the model said it was done (9.56.0) — present
|
|
104
|
-
* ONLY on a turn a limit cut short, absent on every normal finish.
|
|
105
|
-
*
|
|
106
|
-
* It rides `turn_end` because that is the event a consumer already reads to
|
|
107
|
-
* render an outcome: the moment the answer exists. Reading `finalContent`
|
|
108
|
-
* without it, a dashboard cannot tell a finished answer from the fragment a
|
|
109
|
-
* loop stopped in the middle of — which is exactly how a half-sentence gets
|
|
110
|
-
* shown to a person under a green tick.
|
|
111
|
-
*
|
|
112
|
-
* `wrappedUp` says which of the two this is. `true` = the run spent one more
|
|
113
|
-
* call with the tools withheld and `finalContent` is that summary; absent =
|
|
114
|
-
* the turn ended on whatever the last call produced. Mirrors the committed
|
|
115
|
-
* `stoppedEarly` record (`agent.stoppedEarly()`), never a second source of
|
|
116
|
-
* it.
|
|
117
|
-
*/
|
|
118
|
-
readonly stoppedEarly?: {
|
|
119
|
-
readonly reason: 'max-iterations' | 'cost-budget';
|
|
120
|
-
readonly iteration: number;
|
|
121
|
-
readonly pendingToolCalls: number;
|
|
122
|
-
readonly wrappedUp?: true;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* The limits of a TYPED answer, as data — present ONLY when the agent has an
|
|
126
|
-
* output schema and `.limitsTravelWithTheAnswer()`, and the run's tools
|
|
127
|
-
* declared something; absent on every other turn.
|
|
128
|
-
*
|
|
129
|
-
* A prose answer carries its limits as a block appended to `finalContent`.
|
|
130
|
-
* A typed answer cannot: it is JSON, and JSON followed by prose is not JSON.
|
|
131
|
-
* So `finalContent` stays the model's answer and the same limits ride here —
|
|
132
|
-
* what the tools `checked`, did not check and can never cover, folded across
|
|
133
|
-
* the run (duplicates said once, every entry kept). Mirrors the committed
|
|
134
|
-
* `answerCoverage` record (`agent.answerCoverage()`), never a second source
|
|
135
|
-
* of it.
|
|
136
|
-
*/
|
|
137
|
-
readonly answerCoverage?: {
|
|
138
|
-
readonly checked: readonly CoverageItemPayload[];
|
|
139
|
-
readonly notChecked: readonly CoverageItemPayload[];
|
|
140
|
-
readonly cannotCover: readonly CoverageItemPayload[];
|
|
141
|
-
/**
|
|
142
|
-
* The periods the calls' results declared (honesty step 7b) — one per
|
|
143
|
-
* declaring call, as declared; present only when one did. The data twin of
|
|
144
|
-
* a prose answer's `Period:` lines.
|
|
145
|
-
*/
|
|
146
|
-
readonly periods?: readonly (PeriodPayload & {
|
|
147
|
-
readonly toolName: string;
|
|
148
|
-
readonly toolCallId?: string;
|
|
149
|
-
})[];
|
|
150
|
-
/**
|
|
151
|
-
* What the calls' reads found still running — its outcome not known yet —
|
|
152
|
-
* one entry per declaring call, as declared; present only when one did.
|
|
153
|
-
* The data twin of a prose answer's "In progress" lines.
|
|
154
|
-
*/
|
|
155
|
-
readonly inProgress?: readonly {
|
|
156
|
-
readonly toolName: string;
|
|
157
|
-
readonly toolCallId?: string;
|
|
158
|
-
readonly items: readonly InProgressItemPayload[];
|
|
159
|
-
}[];
|
|
160
|
-
/**
|
|
161
|
-
* The values a tool's `assume` rule filled this turn (the inputs layer,
|
|
162
|
-
* honesty layer 2) — the SAME rows, read the same way, that the prose
|
|
163
|
-
* answer's "Assumed" block prints (`arguments/serve.ts` ·
|
|
164
|
-
* `assumedLinesFor`): one entry per distinct (tool, argument, value), a
|
|
165
|
-
* row a before-tool rewrite superseded left out. `value` is the tool's
|
|
166
|
-
* own argument view; `'REDACTED'` with `hidden` when that view hides it.
|
|
167
|
-
* Present only when a value was assumed.
|
|
168
|
-
*/
|
|
169
|
-
readonly assumed?: readonly {
|
|
170
|
-
readonly toolName: string;
|
|
171
|
-
readonly argument: string;
|
|
172
|
-
readonly value: string;
|
|
173
|
-
readonly hidden: boolean;
|
|
174
|
-
}[];
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* The answer's standing, as data — present ONLY on an agent with
|
|
178
|
-
* `.answerLayer()` (honesty layer 4), and then on every turn that ends in
|
|
179
|
-
* an answer. The same projection `agentfootprint.answer.assessed` carries
|
|
180
|
-
* ({@link AnswerAssessmentPayload}): the value, its rendering, the reason
|
|
181
|
-
* kinds and the checks that ran; never a value or a quote. It rides
|
|
182
|
-
* `turn_end` because that is the event a consumer already reads to render
|
|
183
|
-
* an outcome — including a composition that mounts the agent, whose
|
|
184
|
-
* dispatcher carries the agent's `turn_end` but not the `answer.*` domain.
|
|
185
|
-
*/
|
|
186
|
-
readonly answerAssessment?: AnswerAssessmentPayload;
|
|
187
|
-
/**
|
|
188
|
-
* The app's words the appended standing line named calls in — registered
|
|
189
|
-
* tool name → the tool's declared `displayName`. Present ONLY when the line
|
|
190
|
-
* (`.answerLayer({ standingLine: true })`) named a reason's calls by a
|
|
191
|
-
* declared name, so every other turn emits the exact payload it always did.
|
|
192
|
-
* The words are the app's own, already in `finalContent`; the record keeps
|
|
193
|
-
* them so a reader rebuilds the very line from the record.
|
|
194
|
-
*/
|
|
195
|
-
readonly standingLineNames?: Readonly<Record<string, string>>;
|
|
196
|
-
/** Runtime-composed typed negatives, with verification and delivery kept separate. */
|
|
197
|
-
readonly answerNegatives?: AnswerNegativesPayload;
|
|
198
|
-
/**
|
|
199
|
-
* The scripts the library attached to the answer — present ONLY under
|
|
200
|
-
* `.scriptTravelsWithTheAnswer()`, on every answer. Each `shown` entry is
|
|
201
|
-
* the program a call SUBMITTED to a declared code-running tool, read from
|
|
202
|
-
* the run record (never retyped by the model), with the call's label read
|
|
203
|
-
* from its execution record: `exitCode` only when the runner supplied one,
|
|
204
|
-
* `truncated` when the text is cut at `maxBytes`. `omitted` counts the
|
|
205
|
-
* calls not attached (the cap, a program over the bound, a call past the
|
|
206
|
-
* per-turn rows). A prose answer also carries them as text after its `---`
|
|
207
|
-
* separator; a typed answer carries them here only. `text` is a
|
|
208
|
-
* model-written string: under any redaction policy it is served as the
|
|
209
|
-
* placeholder, and the label and the counts survive.
|
|
210
|
-
*/
|
|
211
|
-
readonly scripts?: TurnEndScripts;
|
|
212
|
-
/**
|
|
213
|
-
* The answer was REFUSED — present ONLY then. Under the evidence gate's
|
|
214
|
-
* `'rails'` posture (`.namesAndNumbersFromEvidence()`), an answer stating
|
|
215
|
-
* values no tool result carried is not delivered: `run()` raises
|
|
216
|
-
* `UnsupportedValuesError`. `finalContent` stays for the record (the answer
|
|
217
|
-
* account explains the refusal from it), but it is NOT the agent's answer —
|
|
218
|
-
* a consumer rendering an outcome shows the refusal, never this text.
|
|
219
|
-
*/
|
|
220
|
-
readonly refused?: {
|
|
221
|
-
readonly by: 'evidence-rails';
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* A turn's budget ran out while the model was still working (9.56.0).
|
|
226
|
-
*
|
|
227
|
-
* Fires ONCE per turn, from the Route decider, at the boundary that refused to
|
|
228
|
-
* run the tool calls the model just asked for — the same moment
|
|
229
|
-
* `cost.limit_hit { kind: 'max_iterations' }` fires, and beside it rather than
|
|
230
|
-
* instead of it: that event reports a LIMIT being crossed, this one reports
|
|
231
|
-
* what the run then DID about it.
|
|
232
|
-
*
|
|
233
|
-
* `action` is the whole point. `'wrapped-up'` means one more call went out with
|
|
234
|
-
* the tools withheld and its answer is the turn's answer; `'cut-short'` means
|
|
235
|
-
* the turn ended on whatever text rode the last call — a fragment, mid-task,
|
|
236
|
-
* more often than not. A consumer that only ever sees `'wrapped-up'` is
|
|
237
|
-
* looking at a healthy default; one seeing `'cut-short'` is looking at a turn
|
|
238
|
-
* whose answer nobody should trust as complete.
|
|
239
|
-
*/
|
|
240
|
-
export interface AgentBudgetExhaustedPayload {
|
|
241
|
-
/** Which budget ran out. Only `'max-iterations'` is ever wrapped up. */
|
|
242
|
-
readonly reason: 'max-iterations' | 'cost-budget';
|
|
243
|
-
/** The iteration the budget ran out on. */
|
|
244
|
-
readonly iteration: number;
|
|
245
|
-
/**
|
|
246
|
-
* The budget itself — present ONLY for `'max-iterations'`, where it is
|
|
247
|
-
* `maxIterations`.
|
|
248
|
-
*
|
|
249
|
-
* Absent for `'cost-budget'`, deliberately: the run's committed state carries
|
|
250
|
-
* the cumulative SPEND, not the cap, and reporting spend as `limit` is the
|
|
251
|
-
* exact mistake `cost.limit_hit` documents and avoids. The real USD cap rides
|
|
252
|
-
* that event, emitted the moment the budget was crossed.
|
|
253
|
-
*/
|
|
254
|
-
readonly limit?: number;
|
|
255
|
-
/** How many tool calls the model asked for that will never run. */
|
|
256
|
-
readonly pendingToolCalls: number;
|
|
257
|
-
/** What the run did about it. */
|
|
258
|
-
readonly action: 'wrapped-up' | 'cut-short';
|
|
259
|
-
}
|
|
260
|
-
export interface AgentIterationStartPayload {
|
|
261
|
-
readonly turnIndex: number;
|
|
262
|
-
readonly iterIndex: number;
|
|
263
|
-
}
|
|
264
|
-
export interface AgentIterationEndPayload {
|
|
265
|
-
readonly turnIndex: number;
|
|
266
|
-
readonly iterIndex: number;
|
|
267
|
-
/**
|
|
268
|
-
* On the main loop, the calls the turn proposed. On a resume leg (9.113.0),
|
|
269
|
-
* the brackets THAT leg closed: the paused call plus each sibling the batch
|
|
270
|
-
* settlement answered — so a batch of three paused on its middle call
|
|
271
|
-
* reports 2, and the calls before the pause are counted by no
|
|
272
|
-
* `iteration_end` (their brackets closed on the leg that paused). For the
|
|
273
|
-
* batch's size, read `tool_start.parallelCount`. See `src/core/README.md` ·
|
|
274
|
-
* "A batch that pauses settles its un-dispatched siblings".
|
|
275
|
-
*/
|
|
276
|
-
readonly toolCallCount: number;
|
|
277
|
-
/** Conversation history (LLM messages) at the END of this
|
|
278
|
-
* iteration. Captured by `agent.run()` for fault-tolerant
|
|
279
|
-
* resume — `RunCheckpointError.checkpoint` snapshots this so
|
|
280
|
-
* `agent.resumeOnError(...)` can replay from the last good
|
|
281
|
-
* iteration. Optional for back-compat with v2.x recorders that
|
|
282
|
-
* subscribed without expecting this field. Typed as the messages it
|
|
283
|
-
* holds, so its field names and roles are the library's own words on a
|
|
284
|
-
* redacted record (`redaction/knownStrings.ts`). */
|
|
285
|
-
readonly history?: ReadonlyArray<LLMMessage>;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* The `route_decided` rationales that are FIXED sentences — the library's own
|
|
289
|
-
* words, so a redacted record keeps them (`redaction/knownStrings.ts`). A
|
|
290
|
-
* rationale composed per turn (a count of calls, a skill's name) is a free
|
|
291
|
-
* string there, kept out under a policy like any other.
|
|
292
|
-
*/
|
|
293
|
-
export type FixedRouteRationale = 'LLM produced no tool calls — final answer' | 'maxIterations reached — forcing final' | 'costBudget reached (onExceed: halt) — forcing final' | 'tools are off after the evidence revision (answer validation enforces) — forcing final';
|
|
294
|
-
/**
|
|
295
|
-
* The `pause.request` reason the library writes when the pause carries none —
|
|
296
|
-
* the library's own words (`redaction/knownStrings.ts`). A reason the pause
|
|
297
|
-
* carries is a free string.
|
|
298
|
-
*/
|
|
299
|
-
export type FixedPauseReason = 'stage requested pause';
|
|
300
|
-
export interface AgentRouteDecidedPayload {
|
|
301
|
-
readonly turnIndex: number;
|
|
302
|
-
readonly iterIndex: number;
|
|
303
|
-
/**
|
|
304
|
-
* The branch the turn took. `'output-retry'` (7.26) appears only on an
|
|
305
|
-
* agent built with `.outputSchema(parser, { retries })`, and only on a
|
|
306
|
-
* turn whose answer failed the schema with retries left — the loop is
|
|
307
|
-
* about to ask again rather than finish. `'step-nudge'` (9.18.0) appears
|
|
308
|
-
* only on an agent with a stepped skill, and only on a turn whose
|
|
309
|
-
* would-be-final answer left declared steps unrun with the one teaching
|
|
310
|
-
* nudge still unspent. `'evidence-recheck'` (9.35.0) appears only on an
|
|
311
|
-
* agent built with `.namesAndNumbersFromEvidence({ posture: 'guard' |
|
|
312
|
-
* 'rails' })`, and only on a turn whose would-be-final answer stated values
|
|
313
|
-
* no tool result carried, with the one revision still unspent. `'wrap-up'`
|
|
314
|
-
* (9.56.0) appears only on a turn whose `maxIterations` ran out while the
|
|
315
|
-
* model was still asking for tools, on an agent that did not set
|
|
316
|
-
* `wrapUpAtMaxIterations: false` — the loop is about to spend one last call
|
|
317
|
-
* with the tools withheld so the turn ends with a summary.
|
|
318
|
-
*/
|
|
319
|
-
readonly chosen: 'tool-calls' | 'final' | 'output-retry' | 'step-nudge' | 'evidence-recheck' | 'negative-recheck' | 'wrap-up';
|
|
320
|
-
readonly rationale?: FixedRouteRationale | (string & Record<never, never>);
|
|
321
|
-
}
|
|
322
|
-
export interface AgentHandoffPayload {
|
|
323
|
-
readonly fromAgentId: string;
|
|
324
|
-
readonly toAgentId: string;
|
|
325
|
-
readonly reason?: string;
|
|
326
|
-
readonly viaProtocol?: 'native' | 'mcp' | 'http';
|
|
327
|
-
}
|
|
328
|
-
export interface LLMStartPayload {
|
|
329
|
-
readonly iteration: number;
|
|
330
|
-
readonly provider: LLMProviderName;
|
|
331
|
-
readonly model: string;
|
|
332
|
-
readonly systemPromptChars: number;
|
|
333
|
-
/**
|
|
334
|
-
* The ASSEMBLED system prompt, verbatim as sent to the provider (9.50.0) —
|
|
335
|
-
* every injection piece joined exactly the way the wire saw it. **OPT-IN,
|
|
336
|
-
* default OFF**: present only when the run was built with
|
|
337
|
-
* `recordSystemPrompt: true` (`AgentOptions` / `LLMCallOptions`).
|
|
338
|
-
*
|
|
339
|
-
* PRIVACY: the assembled prompt routinely carries what its pieces carry —
|
|
340
|
-
* skill bodies, RAG passages, memory recalls, per-user instructions. With
|
|
341
|
-
* the dial on, all of it lands in every event sink and every recording
|
|
342
|
-
* (`recordRun` → `persistRecording`), so treat those artifacts as being as
|
|
343
|
-
* sensitive as the prompt itself. Absent, the event keeps its exact prior
|
|
344
|
-
* bytes: only `systemPromptChars` (the length) is recorded, and the
|
|
345
|
-
* assembled string is honestly NOT in the recording.
|
|
346
|
-
*/
|
|
347
|
-
readonly systemPromptText?: string;
|
|
348
|
-
readonly messagesCount: number;
|
|
349
|
-
readonly toolsCount: number;
|
|
350
|
-
/**
|
|
351
|
-
* The tool CATALOG the model saw for this call — what was at its disposal when
|
|
352
|
-
* it chose (the menu behind its tool-selection reasoning). One `{ name,
|
|
353
|
-
* description }` per tool sent to the provider, in request order. Absent when
|
|
354
|
-
* the call had no tools. The structured "what the model saw" payload: pair it
|
|
355
|
-
* with the iteration's reasoning to debug WHY a tool was (or wasn't) picked.
|
|
356
|
-
* Names + descriptions only — full input schemas live in the snapshot.
|
|
357
|
-
*/
|
|
358
|
-
readonly tools?: readonly {
|
|
359
|
-
readonly name: string;
|
|
360
|
-
readonly description?: string;
|
|
361
|
-
}[];
|
|
362
|
-
readonly estimatedPromptTokens?: number;
|
|
363
|
-
readonly temperature?: number;
|
|
364
|
-
readonly providerRequestRef?: string;
|
|
365
|
-
/**
|
|
366
|
-
* WHICH BRAIN answered, when a brain rung won (9.19.0 — "the cursor picks
|
|
367
|
-
* the brain"). `via: 'skill'` = the active skill's declared brain served
|
|
368
|
-
* this call (`skillId` names the tenure); `via: 'escalation'` = the turn
|
|
369
|
-
* crossed its declared refusal threshold and the escalation brain is
|
|
370
|
-
* serving the rest of it. ABSENT whenever the agent's own configured /
|
|
371
|
-
* default model answered — an agent without brains keeps its exact prior
|
|
372
|
-
* event bytes. `provider` + `model` above always report what was actually
|
|
373
|
-
* called, whichever rung supplied them.
|
|
374
|
-
*/
|
|
375
|
-
readonly brain?: {
|
|
376
|
-
readonly via: 'skill' | 'escalation';
|
|
377
|
-
readonly skillId?: string;
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
export interface LLMEndPayload {
|
|
381
|
-
readonly iteration: number;
|
|
382
|
-
/** Draft text, or an empty string when contentWithheld is true. */
|
|
383
|
-
readonly content: string;
|
|
384
|
-
/** An output policy withheld draft text. This does not mean the model returned no text. */
|
|
385
|
-
readonly contentWithheld?: true;
|
|
386
|
-
readonly toolCallCount: number;
|
|
387
|
-
readonly usage: {
|
|
388
|
-
readonly input: number;
|
|
389
|
-
readonly output: number;
|
|
390
|
-
readonly cacheRead?: number;
|
|
391
|
-
readonly cacheWrite?: number;
|
|
392
|
-
/**
|
|
393
|
-
* 9.29.0 — reasoning tokens the model spent on this call, when the
|
|
394
|
-
* provider reports them (`LLMResponse.usage.thinking`).
|
|
395
|
-
*
|
|
396
|
-
* This field is the fix for a gap a field trial found by walking into it:
|
|
397
|
-
* a 256-token Gemini stream produced ONE visible chunk, and the run only
|
|
398
|
-
* made sense once the numbers were read — `input 21, output 9,
|
|
399
|
-
* thinking 243`. The provider had been reporting that third number all
|
|
400
|
-
* along and this payload's type dropped it, so the event that a consumer
|
|
401
|
-
* actually subscribes to could not explain its own run.
|
|
402
|
-
*
|
|
403
|
-
* **Not inside `output`.** On Gemini `candidatesTokenCount` counts visible
|
|
404
|
-
* tokens only; thinking is a separate, billed line item. A cost estimate
|
|
405
|
-
* built from `input + output` under-counts a thinking model by whatever it
|
|
406
|
-
* thought. `cost.tick` deliberately does NOT fold it in — `PricingTable`
|
|
407
|
-
* prices four kinds and thinking is not one of them, and inventing a rate
|
|
408
|
-
* would be this library guessing at somebody's invoice.
|
|
409
|
-
*
|
|
410
|
-
* Undefined when the provider does not report thinking tokens, which is
|
|
411
|
-
* most calls.
|
|
412
|
-
*/
|
|
413
|
-
readonly thinking?: number;
|
|
414
|
-
};
|
|
415
|
-
readonly stopReason: string;
|
|
416
|
-
readonly durationMs: number;
|
|
417
|
-
readonly providerResponseRef?: string;
|
|
418
|
-
}
|
|
419
|
-
export interface LLMTokenPayload {
|
|
420
|
-
readonly iteration: number;
|
|
421
|
-
readonly tokenIndex: number;
|
|
422
|
-
readonly content: string;
|
|
423
|
-
}
|
|
424
|
-
export interface ToolStartPayload {
|
|
425
|
-
readonly toolName: string;
|
|
426
|
-
readonly toolCallId: string;
|
|
427
|
-
readonly args: Readonly<Record<string, unknown>>;
|
|
428
|
-
readonly parallelCount?: number;
|
|
429
|
-
readonly protocol?: ToolProtocol;
|
|
430
|
-
/**
|
|
431
|
-
* 9.113.0 — present only on the bracket of a call that was NEVER
|
|
432
|
-
* DISPATCHED: a batch paused on an earlier call, and the resume answered
|
|
433
|
-
* this one with a fixed sentence instead of running it
|
|
434
|
-
* (`core/agent/stages/toolCalls.ts` · `bracketSettled`, the one stamping
|
|
435
|
-
* site). `pausedCall` names the call in the same batch the run paused on.
|
|
436
|
-
* No gate judged this call and no tool ran; `args` are the ones it would
|
|
437
|
-
* have run with.
|
|
438
|
-
*
|
|
439
|
-
* The same fact, the same shape, as the history message's marker — typed off
|
|
440
|
-
* `LLMMessage.notDispatched`, so there is one definition. Read it rather than
|
|
441
|
-
* inferring anything from the bracket's `durationMs: 0` or its sentence.
|
|
442
|
-
*
|
|
443
|
-
* Absent on every other bracket.
|
|
444
|
-
*/
|
|
445
|
-
readonly notDispatched?: LLMMessage['notDispatched'];
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* One progress report from inside a still-running tool call (9.52.0) — filed
|
|
449
|
-
* by `ctx.progress(payload)` from within `tool.execute`, in call order, always
|
|
450
|
-
* BETWEEN this call's `stream.tool_start` and its `stream.tool_end`.
|
|
451
|
-
*
|
|
452
|
-
* The split is deliberate: the three identity fields are stamped by the
|
|
453
|
-
* FRAMEWORK from the dispatch it is already holding (a tool cannot claim to be
|
|
454
|
-
* another call, another tool, or another iteration), and `payload` is the tool
|
|
455
|
-
* author's data forwarded verbatim. Nothing here is ever shown to the model —
|
|
456
|
-
* this is the telemetry channel, not the result channel.
|
|
457
|
-
*
|
|
458
|
-
* Absent entirely for every tool that never reports: a run whose tools call
|
|
459
|
-
* nothing files no `tool_progress` events at all.
|
|
460
|
-
*/
|
|
461
|
-
export interface ToolProgressPayload {
|
|
462
|
-
/** The invocation this report belongs to — matches `stream.tool_start.toolCallId`. */
|
|
463
|
-
readonly toolCallId: string;
|
|
464
|
-
/** The tool that reported. */
|
|
465
|
-
readonly toolName: string;
|
|
466
|
-
/** The ReAct iteration this call was dispatched on (`0` where there is no loop). */
|
|
467
|
-
readonly iteration: number;
|
|
468
|
-
/**
|
|
469
|
-
* The tool author's payload, verbatim — whatever shape they chose
|
|
470
|
-
* (`{ done: 3, total: 12 }`, a status string, a partial row). The library
|
|
471
|
-
* neither reads it nor normalizes it; it must survive `structuredClone`,
|
|
472
|
-
* because it lands in every event sink and every recording.
|
|
473
|
-
*/
|
|
474
|
-
readonly payload: unknown;
|
|
475
|
-
}
|
|
476
|
-
export interface ToolEndPayload {
|
|
477
|
-
readonly toolCallId: string;
|
|
478
|
-
readonly result: unknown;
|
|
479
|
-
readonly error?: boolean;
|
|
480
|
-
readonly durationMs: number;
|
|
481
|
-
/**
|
|
482
|
-
* The tool's OWN declared outcome (9.19.0) — present only when the tool
|
|
483
|
-
* returned a result envelope carrying `status`. Normalized vocabulary
|
|
484
|
-
* (`'denied'` must never read like `'success'`); route edges key on it
|
|
485
|
-
* via `onToolStatus`. Absent for every tool that never opted in.
|
|
486
|
-
*/
|
|
487
|
-
readonly status?: ToolResultStatus;
|
|
488
|
-
/**
|
|
489
|
-
* 9.113.0 — present only when this call was NEVER DISPATCHED: the batch
|
|
490
|
-
* settlement closed its bracket (`core/agent/stages/toolCalls.ts` ·
|
|
491
|
-
* `bracketSettled`). `result` is then the library's fixed sentence (the one
|
|
492
|
-
* the model read), `durationMs` is `0`, and `error` is ABSENT.
|
|
493
|
-
*
|
|
494
|
-
* `error` says a call FAILED — the tool threw or reported a failure, or the
|
|
495
|
-
* call could not run as written (an args-validation rejection, a `wants`
|
|
496
|
-
* block, a consent the tool needed and did not get, an unknown tool). A
|
|
497
|
-
* settled call did not fail: the library decided not to dispatch it, the
|
|
498
|
-
* way it decides for a call a permission policy denies or halts, whose
|
|
499
|
-
* brackets carry no `error` either. This field is the owner of WHY there is
|
|
500
|
-
* no result, and a reader that counts outcomes reads it: a bracket that
|
|
501
|
-
* carries it is neither a success nor a failure of the tool.
|
|
502
|
-
*
|
|
503
|
-
* Same shape as `ToolStartPayload.notDispatched` and as the history
|
|
504
|
-
* message's marker (typed off `LLMMessage.notDispatched`). Absent on every
|
|
505
|
-
* other bracket.
|
|
506
|
-
*/
|
|
507
|
-
readonly notDispatched?: LLMMessage['notDispatched'];
|
|
508
|
-
/**
|
|
509
|
-
* What the MODEL read for this call, when it differs from `result`: an
|
|
510
|
-
* `onToolResult` link rewrote or denied it, the `maxToolResultChars` cap
|
|
511
|
-
* cut the model's channel alone, or the library removed the record-only
|
|
512
|
-
* coverage fields (`short`, `kind` — see `CoverageItem`) from a coverage
|
|
513
|
-
* envelope before serving it. `result` stays the tool's own answer — this
|
|
514
|
-
* is the other half of that split, which until now lived only in history.
|
|
515
|
-
* Absent when the model read `result` itself (the common case; the two
|
|
516
|
-
* channels are then one reference). Stamped on all five dispatch paths.
|
|
517
|
-
*
|
|
518
|
-
* Cost, stated: a call whose tool declares `short` or `kind` carries its
|
|
519
|
-
* envelope twice here (`result` + `modelResult`), so the extra bytes are
|
|
520
|
-
* the size of that envelope — about 4 KB for a typical absence, and as
|
|
521
|
-
* large as the payload a ledger wraps. Under result PLACEMENT a difference
|
|
522
|
-
* that is only this strip counts as one value: both channels carry the one
|
|
523
|
-
* ticket and nothing is stamped. A tool that declares neither gets no stamp
|
|
524
|
-
* and no new byte.
|
|
525
|
-
*/
|
|
526
|
-
readonly modelResult?: unknown;
|
|
527
|
-
/**
|
|
528
|
-
* The NAMES of the argument keys whose value the tool ran with differs from
|
|
529
|
-
* the proposal `stream.tool_start` carried: set, rewritten or removed by an
|
|
530
|
-
* `onToolCall` link, or hidden by the tool's own redaction policy
|
|
531
|
-
* (`flowchartAsTool({ redact })`, `runbookAsTool({ redact })` —
|
|
532
|
-
* `core/toolShownArgs.ts` · `shownArgsOf`). Names only, never values: a
|
|
533
|
-
* link may ADD a value (a server-side key) the model never saw, and an event
|
|
534
|
-
* goes to every sink attached, each serializing what it gets. Taken BEFORE
|
|
535
|
-
* the tool runs, so nothing the tool writes into its arguments reaches it.
|
|
536
|
-
* A reader exporting the call's arguments shows these keys' values as
|
|
537
|
-
* withheld. Absent when the tool ran with the proposal as it was.
|
|
538
|
-
*
|
|
539
|
-
* Stamped on the batch-dispatch bracket only — the one whose `tool_start`
|
|
540
|
-
* precedes it in the same run.
|
|
541
|
-
*/
|
|
542
|
-
readonly changedArgKeys?: readonly string[];
|
|
543
|
-
/**
|
|
544
|
-
* A configured RULE refused the call, so the tool never ran: a permission
|
|
545
|
-
* policy denied or halted it, or an `onToolCall` link denied it. `result` is
|
|
546
|
-
* then the refusal the model read, and `error` is absent — this field is
|
|
547
|
-
* what tells such a bracket from a tool that ran and answered.
|
|
548
|
-
*
|
|
549
|
-
* NOT a general "never ran" marker, and its absence proves nothing: a call
|
|
550
|
-
* that could not run with no rule involved (an unknown tool name, an args
|
|
551
|
-
* rejection, a `wants` or credential block) carries `error: true` instead,
|
|
552
|
-
* a settled bracket carries `notDispatched`, and a resumed leg's bracket
|
|
553
|
-
* carries neither. Batch-dispatch bracket only.
|
|
554
|
-
*/
|
|
555
|
-
readonly notExecuted?: true;
|
|
556
|
-
}
|
|
557
|
-
export interface ContextInjectedPayload {
|
|
558
|
-
readonly contentSummary: string;
|
|
559
|
-
readonly contentHash: string;
|
|
560
|
-
readonly rawContent?: string;
|
|
561
|
-
readonly slot: ContextSlot;
|
|
562
|
-
readonly asRole?: ContextRole;
|
|
563
|
-
readonly asRecency?: ContextRecency;
|
|
564
|
-
readonly position?: number;
|
|
565
|
-
readonly sectionTag?: string;
|
|
566
|
-
readonly source: ContextSource;
|
|
567
|
-
readonly sourceId?: string;
|
|
568
|
-
readonly upstreamRef?: string;
|
|
569
|
-
readonly reason: string;
|
|
570
|
-
readonly retrievalScore?: number;
|
|
571
|
-
readonly rankPosition?: number;
|
|
572
|
-
readonly threshold?: number;
|
|
573
|
-
readonly budgetSpent?: {
|
|
574
|
-
readonly tokens: number;
|
|
575
|
-
readonly fractionOfCap: number;
|
|
576
|
-
};
|
|
577
|
-
readonly expiresAfter?: ContextLifetime;
|
|
578
|
-
}
|
|
579
|
-
export interface ContextEvictedPayload {
|
|
580
|
-
readonly slot: ContextSlot;
|
|
581
|
-
readonly contentHash: string;
|
|
582
|
-
readonly reason: 'budget' | 'stale' | 'low_score' | 'policy' | 'user_revoked';
|
|
583
|
-
readonly survivalMs: number;
|
|
584
|
-
}
|
|
585
|
-
export interface ContextSlotComposedPayload {
|
|
586
|
-
readonly slot: ContextSlot;
|
|
587
|
-
readonly iteration: number;
|
|
588
|
-
readonly budget: {
|
|
589
|
-
readonly cap: number;
|
|
590
|
-
readonly used: number;
|
|
591
|
-
readonly headroomChars: number;
|
|
592
|
-
};
|
|
593
|
-
readonly sourceBreakdown: Readonly<Partial<Record<ContextSource, {
|
|
594
|
-
readonly chars: number;
|
|
595
|
-
readonly count: number;
|
|
596
|
-
}>>>;
|
|
597
|
-
readonly orderingStrategy?: string;
|
|
598
|
-
readonly droppedCount: number;
|
|
599
|
-
readonly droppedSummaries: readonly string[];
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* Fired when a budget is exceeded — by a context SLOT composing over its
|
|
603
|
-
* `budgetCap`, or by a window STRATEGY measuring the window over its
|
|
604
|
-
* `thresholdTokens`.
|
|
605
|
-
*
|
|
606
|
-
* ## Read `unit` before you read a number (8.14.0)
|
|
607
|
-
*
|
|
608
|
-
* Two emitters share this event name and the `slot: 'messages'` value, and
|
|
609
|
-
* **they do not count in the same unit**:
|
|
610
|
-
*
|
|
611
|
-
* | emitter | what it measures | `unit` |
|
|
612
|
-
* |---|---|---|
|
|
613
|
-
* | the three context slots (`contextBudget`) | `String.length` of what it composed | `'chars'` |
|
|
614
|
-
* | a window strategy (`.window()` / `.compaction()`) | the provider's reported input tokens | `'tokens'` |
|
|
615
|
-
*
|
|
616
|
-
* Since `contextBudget` is on by default, one subscriber routinely receives
|
|
617
|
-
* both — and before 8.14.0 nothing in the payload told them apart, so
|
|
618
|
-
* "cap 200, projected 258" could be 258 characters or 258 tokens. `unit` is
|
|
619
|
-
* the answer; `cap` and `projected` are the same two numbers under names that
|
|
620
|
-
* do not assert an untrue one.
|
|
621
|
-
*
|
|
622
|
-
* `planAction: 'none'` means no mitigation was performed — nothing was
|
|
623
|
-
* evicted or truncated and the full content still went to the LLM. That
|
|
624
|
-
* is what the built-in slots report: they never truncate, so the event is
|
|
625
|
-
* the signal that the budget is not being respected.
|
|
626
|
-
*/
|
|
627
|
-
export interface ContextBudgetPressurePayload {
|
|
628
|
-
readonly slot: ContextSlot;
|
|
629
|
-
/** How far over the cap, in {@link unit}. Never carried a unit in its name. */
|
|
630
|
-
readonly overflowBy: number;
|
|
631
|
-
readonly planAction: 'evict' | 'summarize' | 'abort' | 'none';
|
|
632
|
-
/**
|
|
633
|
-
* What {@link cap}, {@link projected} and {@link overflowBy} are counted in
|
|
634
|
-
* (8.14.0). `'chars'` from a context slot, `'tokens'` from a window
|
|
635
|
-
* strategy. Branch on this before comparing any of the three numbers to
|
|
636
|
-
* anything.
|
|
637
|
-
*/
|
|
638
|
-
readonly unit: 'chars' | 'tokens';
|
|
639
|
-
/**
|
|
640
|
-
* The budget that was exceeded, in {@link unit}.
|
|
641
|
-
*
|
|
642
|
-
* Called `capTokens` until 9.0.0 — a name that asserted tokens on a channel
|
|
643
|
-
* that is CHARS half the time, since `contextBudget` is on by default and a
|
|
644
|
-
* slot counts `String.length`. Both spellings shipped through 8.x with the
|
|
645
|
-
* identical value; 9.0.0 keeps only this one.
|
|
646
|
-
*/
|
|
647
|
-
readonly cap: number;
|
|
648
|
-
/** What was measured, in {@link unit}. Called `projectedTokens` until 9.0.0
|
|
649
|
-
* — see {@link cap}. */
|
|
650
|
-
readonly projected: number;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* Fired once per iteration by the Injection Engine after it evaluates every
|
|
654
|
-
* Injection's trigger — BEFORE the Context fork routes the survivors into the
|
|
655
|
-
* three slots. This is the "what was considered, what won, what was skipped
|
|
656
|
-
* and why" signal; `context.slot_composed` is its downstream counterpart
|
|
657
|
-
* ("what actually landed in each slot"). Pure observability — no flow stage
|
|
658
|
-
* reads it.
|
|
659
|
-
*/
|
|
660
|
-
/** A guard threshold value as the record carries it — plain data only. */
|
|
661
|
-
export type SkillGuardValueRecord = string | number | boolean | null | ReadonlyArray<string | number | boolean | null>;
|
|
662
|
-
/**
|
|
663
|
-
* One route-edge guard evaluation, as `cursorMove.guard` / `guardsClosed`
|
|
664
|
-
* carry it (9.51.0): the guarded edge, the tool result it judged, the
|
|
665
|
-
* verdict, and per-condition evidence — each declared condition
|
|
666
|
-
* (`key`/`op`/`value`), the summarized value it was judged against (bounded
|
|
667
|
-
* to 80 chars — evidence, not a transcript), and whether it passed. The
|
|
668
|
-
* operator vocabulary deliberately mirrors footprintjs's `WhereFilter`
|
|
669
|
-
* (`eq/ne/gt/gte/lt/lte/in/notIn`).
|
|
670
|
-
*/
|
|
671
|
-
export interface SkillGuardEvaluationRecord {
|
|
672
|
-
readonly from: string;
|
|
673
|
-
readonly to: string;
|
|
674
|
-
readonly toolName: string;
|
|
675
|
-
readonly toolCallId?: string;
|
|
676
|
-
readonly verdict: boolean;
|
|
677
|
-
readonly conditions: ReadonlyArray<{
|
|
678
|
-
readonly key: string;
|
|
679
|
-
readonly op: string;
|
|
680
|
-
readonly value: SkillGuardValueRecord;
|
|
681
|
-
readonly actualSummary: string;
|
|
682
|
-
readonly passed: boolean;
|
|
683
|
-
}>;
|
|
684
|
-
}
|
|
685
|
-
export interface ContextEvaluatedPayload {
|
|
686
|
-
readonly iteration: number;
|
|
687
|
-
/** Number of injections active this iteration. */
|
|
688
|
-
readonly activeCount: number;
|
|
689
|
-
/** Number skipped (predicate false counts as neither — only errors/unknown land here). */
|
|
690
|
-
readonly skippedCount: number;
|
|
691
|
-
/** Total injections evaluated (the full declared list). */
|
|
692
|
-
readonly evaluatedTotal: number;
|
|
693
|
-
/** Ids of the active injections, in evaluation order. */
|
|
694
|
-
readonly activeIds: readonly string[];
|
|
695
|
-
/** Why each skipped injection was skipped (errors / unknown trigger kinds). */
|
|
696
|
-
readonly skippedDetails: readonly {
|
|
697
|
-
readonly id: string;
|
|
698
|
-
/** `'unknown-fact'` (9.57.0): a templated instruction named a run-time
|
|
699
|
-
* fact this evaluation could not supply, so it was skipped whole.
|
|
700
|
-
* `'parked'` (9.58.0): a member of a map the mount kernel parked —
|
|
701
|
-
* served without corroboration for the grace window; the map's own
|
|
702
|
-
* cursor is untouched and evidence re-engages it.
|
|
703
|
-
* `'hidden'`: a skill the caller's role may not see (`skill_read`),
|
|
704
|
-
* refused whatever tried to activate it. */
|
|
705
|
-
readonly reason: 'predicate-threw' | 'unknown-trigger-kind' | 'unknown-fact' | 'parked' | 'hidden';
|
|
706
|
-
readonly error?: string;
|
|
707
|
-
}[];
|
|
708
|
-
/** Count of active injections by trigger kind (always / rule / on-tool-return / llm-activated). */
|
|
709
|
-
readonly triggerKindCounts: Readonly<Record<string, number>>;
|
|
710
|
-
/**
|
|
711
|
-
* The Skill CATALOG the LLM was offered this turn — every registered Skill's
|
|
712
|
-
* `id` + `description` (the same text that lands in the `read_skill` tool
|
|
713
|
-
* description). Lets observers pair "what was offered" against "what the LLM
|
|
714
|
-
* chose" (`read_skill` → `activatedInjectionIds`) when debugging a missed or
|
|
715
|
-
* wrong activation. Empty when no Skills are registered. Static across turns.
|
|
716
|
-
*/
|
|
717
|
-
readonly skillCatalog: readonly {
|
|
718
|
-
readonly id: string;
|
|
719
|
-
readonly description: string;
|
|
720
|
-
}[];
|
|
721
|
-
/**
|
|
722
|
-
* Routing PROVENANCE for the active injections that came from a `skillGraph()`
|
|
723
|
-
* — *why* each was reached. One entry per active skill-graph injection (a
|
|
724
|
-
* decision-tree leaf, a flat entry, or a route edge); absent when no active
|
|
725
|
-
* injection carries skill-graph metadata. The structured counterpart to the
|
|
726
|
-
* `context.routed` commentary line — lets the lens show the decision path, the
|
|
727
|
-
* matched predicate, and the tools a route unlocked. Structural shape (mirrors
|
|
728
|
-
* `SkillRouting` from the injection engine; events stay decoupled from it).
|
|
729
|
-
*/
|
|
730
|
-
readonly routing?: readonly {
|
|
731
|
-
readonly injectionId: string;
|
|
732
|
-
readonly flavor: string;
|
|
733
|
-
/** `'tree' | 'entry' | 'route' | 'model'`. */
|
|
734
|
-
readonly via: string;
|
|
735
|
-
/** Decision path (tree only): predicates root→leaf + branch taken. */
|
|
736
|
-
readonly path?: readonly {
|
|
737
|
-
readonly label: string;
|
|
738
|
-
readonly branch: string;
|
|
739
|
-
}[];
|
|
740
|
-
/** Entry/route edge caption. */
|
|
741
|
-
readonly label?: string;
|
|
742
|
-
/** Source skill id (route only). */
|
|
743
|
-
readonly from?: string;
|
|
744
|
-
/** Compiled trigger kind for a route. */
|
|
745
|
-
readonly triggerKind?: string;
|
|
746
|
-
/** Tool names this injection unlocked. */
|
|
747
|
-
readonly tools?: readonly string[];
|
|
748
|
-
}[];
|
|
749
|
-
/**
|
|
750
|
-
* How the skill-graph CURSOR moved on THIS iteration — the winning clause of the
|
|
751
|
-
* graph's one cursor resolver, reported by it (8.5.0). Present only for an agent
|
|
752
|
-
* built with `.skillGraph()` (and a graph new enough to explain itself).
|
|
753
|
-
*
|
|
754
|
-
* Distinct from `routing[]` above, and the distinction is the point: `routing[]`
|
|
755
|
-
* is per-SKILL build-time provenance ("how is this skill reachable"), while this
|
|
756
|
-
* is per-HOP runtime truth ("what moved us, this turn"). `by: 'model-pick'` is the
|
|
757
|
-
* case the two disagree on — a `read_skill` pick the gate accepted, into a skill
|
|
758
|
-
* that also has a declared edge whose predicate never fired.
|
|
759
|
-
*/
|
|
760
|
-
readonly cursorMove?: {
|
|
761
|
-
readonly from?: string;
|
|
762
|
-
readonly to?: string;
|
|
763
|
-
/** `'entry' | 'route' | 'model-pick' | 'intent' | 'continuity' | 'stay' | 'none'`. */
|
|
764
|
-
readonly by: string;
|
|
765
|
-
/** The turn-start MENU this model pick resolved (SG-C) — present only on
|
|
766
|
-
* the iteration an accepted pick closed an outstanding menu. */
|
|
767
|
-
readonly offered?: readonly string[];
|
|
768
|
-
/** The accepted pick was reachable but NOT on the offered menu — the
|
|
769
|
-
* model's divergence, on the record (data under `'assist'`, a refusal
|
|
770
|
-
* under `'guard'`/`'rails'`, which never reach here). */
|
|
771
|
-
readonly declinedOffer?: boolean;
|
|
772
|
-
/** WHAT the message said that routed this hop (9.28.0) — present only for a
|
|
773
|
-
* `by: 'entry'` move a DATA matcher (`match:` — RegExp / `{ keywords }` /
|
|
774
|
-
* `{ all }`) decided. `text` is the matched substring of the USER message,
|
|
775
|
-
* whitespace-collapsed and bounded to 80 characters (ellipsis included);
|
|
776
|
-
* `keyword` names WHICH declared keyword hit, for the keywords arm.
|
|
777
|
-
* Absent for `when` predicates (opaque code), unconditional entries, and
|
|
778
|
-
* every scorer verdict (whose evidence is its scores). */
|
|
779
|
-
readonly witness?: {
|
|
780
|
-
readonly text: string;
|
|
781
|
-
readonly keyword?: string;
|
|
782
|
-
};
|
|
783
|
-
/**
|
|
784
|
-
* The EVIDENCE the winning data GUARD routed on (9.51.0) — present only
|
|
785
|
-
* for a `by: 'route'` move whose firing edge declared a `guard:`. The
|
|
786
|
-
* full per-condition evaluation (verdict `true`): which edge, which tool
|
|
787
|
-
* result it judged, and every declared condition with the summarized
|
|
788
|
-
* value it saw. Structural shape (mirrors the graph's `GuardEvaluation`;
|
|
789
|
-
* events stay decoupled from it).
|
|
790
|
-
*/
|
|
791
|
-
readonly guard?: SkillGuardEvaluationRecord;
|
|
792
|
-
/**
|
|
793
|
-
* The data guards that REFUSED this iteration (9.51.0) — guarded edges
|
|
794
|
-
* out of the cursor whose other declared conditions a tool result met
|
|
795
|
-
* and whose guard said no (verdict `false`; at most one record per
|
|
796
|
-
* edge). Rides whatever move resulted — including a `'stay'`, where it
|
|
797
|
-
* answers "why didn't my guarded edge fire?" with the conditions and
|
|
798
|
-
* values that closed it. Absent when no guard decided anything.
|
|
799
|
-
*/
|
|
800
|
-
readonly guardsClosed?: readonly SkillGuardEvaluationRecord[];
|
|
801
|
-
/**
|
|
802
|
-
* The REACHABLE set from the cursor this move landed on (9.50.0) — the
|
|
803
|
-
* skill ids the `read_skill` gate will admit on THIS iteration: declared
|
|
804
|
-
* hops out of the landed cursor plus the open skills (`llm-activated`
|
|
805
|
-
* skills the graph wires no edge to). It is the same set, from the same
|
|
806
|
-
* two resolvers, that builds the `read_skill` offer prose and any
|
|
807
|
-
* `skill.rejected.allowed` list this iteration — as DATA, so no consumer
|
|
808
|
-
* has to parse the menu sentence back into ids. `[]` is a fact (a dead
|
|
809
|
-
* end: no hop and no open skill is admissible); ABSENT means the graph
|
|
810
|
-
* predates `reachableSkills` and the set was not on the record.
|
|
811
|
-
*/
|
|
812
|
-
readonly reachable?: readonly string[];
|
|
813
|
-
};
|
|
814
|
-
/**
|
|
815
|
-
* Skill-graph entries whose own `when` matched this iteration and which the cursor
|
|
816
|
-
* law kept OFF the wire (8.15.0). A conditional entry is active exactly while the
|
|
817
|
-
* cursor is on it — `when` says where a turn STARTS, not what stays loaded — so an
|
|
818
|
-
* entry whose rule still matches while the graph is elsewhere is suppressed.
|
|
819
|
-
*
|
|
820
|
-
* Read it beside `cursorMove`, which names where the graph went instead: together
|
|
821
|
-
* they answer "why isn't my entry loading?" without re-running a predicate to
|
|
822
|
-
* guess. Absent when nothing was suppressed, and for every non-skill-graph run.
|
|
823
|
-
*
|
|
824
|
-
* Distinct from `agentfootprint.skill.reroute_superseded`, which reports a DISCRETE
|
|
825
|
-
* broken promise (a `read_skill` pick the gate accepted and a declared edge
|
|
826
|
-
* outranked). This is a CONTINUOUS condition — an entry whose rule stays true while
|
|
827
|
-
* the cursor is parked elsewhere is suppressed on every iteration — so it rides the
|
|
828
|
-
* per-iteration event.
|
|
829
|
-
*/
|
|
830
|
-
readonly supersededIds?: readonly string[];
|
|
831
|
-
}
|
|
832
|
-
export interface ErrorFatalPayload {
|
|
833
|
-
readonly error: string;
|
|
834
|
-
readonly stage: string;
|
|
835
|
-
readonly scope: string;
|
|
836
|
-
}
|
|
837
|
-
export interface PauseRequestPayload {
|
|
838
|
-
readonly reason: FixedPauseReason | (string & Record<never, never>);
|
|
839
|
-
readonly questionPayload: Readonly<Record<string, unknown>>;
|
|
840
|
-
}
|
|
841
|
-
export interface PauseResumePayload {
|
|
842
|
-
/**
|
|
843
|
-
* The reply the run resumed with. For the inputs layer's own ask
|
|
844
|
-
* (`awaitingInput.context.agentfootprint.ask === 'arguments'`) every
|
|
845
|
-
* answered value reads `'REDACTED'` — the reply's shape (request id, field
|
|
846
|
-
* ids) travels, the person's values do not, because they fill arguments a
|
|
847
|
-
* tool's view may hide; the `answered` argument rows carry what each tool's
|
|
848
|
-
* view allows.
|
|
849
|
-
*/
|
|
850
|
-
readonly resumeInput: Readonly<Record<string, unknown>>;
|
|
851
|
-
readonly pausedDurationMs: number;
|
|
852
|
-
/** The registered component the paused ask nominated to collect its answer
|
|
853
|
-
* (9.24.0) — read from the checkpoint's own pause payload, whichever pause
|
|
854
|
-
* kind carried it. Absent when the ask was prose-only. */
|
|
855
|
-
readonly componentId?: string;
|
|
856
|
-
}
|
|
857
|
-
/** A tool declared `checkIn` and it tripped — the run paused to ask a human,
|
|
858
|
-
* with the evidence pack riding the ask. Emitted BEFORE the tool executes. */
|
|
859
|
-
export interface CheckInRequestPayload {
|
|
860
|
-
readonly toolName: string;
|
|
861
|
-
readonly toolCallId: string;
|
|
862
|
-
readonly iteration: number;
|
|
863
|
-
/** The typed ask + evidence pack (`CheckInRequest`). JSON/clone-safe. */
|
|
864
|
-
readonly request: Readonly<Record<string, unknown>>;
|
|
865
|
-
}
|
|
866
|
-
/** A human answered a pending check-in. Emitted on resume, BEFORE the tool
|
|
867
|
-
* runs (approve) or the decline result lands. */
|
|
868
|
-
export interface CheckInDecisionPayload {
|
|
869
|
-
readonly toolName: string;
|
|
870
|
-
readonly toolCallId: string;
|
|
871
|
-
readonly iteration: number;
|
|
872
|
-
/** The request the decision answered — `CheckInRequest.id` of the ask it
|
|
873
|
-
* closes, so the record joins each decision to the one request it was for. */
|
|
874
|
-
readonly requestId: string;
|
|
875
|
-
readonly approved: boolean;
|
|
876
|
-
readonly by: string;
|
|
877
|
-
readonly note?: string;
|
|
878
|
-
/** The registered component that COLLECTED this decision (9.24.0) — the
|
|
879
|
-
* `componentId` the ask carried. Absent when the ask was prose-only. The
|
|
880
|
-
* decision itself is unchanged: a structured fact, never parsed from the
|
|
881
|
-
* words a screen rendered. */
|
|
882
|
-
readonly componentId?: string;
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* One link of a `toolMiddleware` / `messageMiddleware` chain answered.
|
|
886
|
-
*
|
|
887
|
-
* Its own domain rather than a `permission.check` with a different label:
|
|
888
|
-
* a middleware decision is not a permission check, and reporting it as one
|
|
889
|
-
* would make every consumer reading that channel believe a checker they
|
|
890
|
-
* never configured had fired.
|
|
891
|
-
*
|
|
892
|
-
* Deliberately carries no `before` / `after` — the values live in the
|
|
893
|
-
* committed `middlewareDecisions` ledger, under whatever redaction the run
|
|
894
|
-
* configured. An event stream is a fan-out to sinks we do not control, and
|
|
895
|
-
* a scrubbed value should not leave the run through it.
|
|
896
|
-
*/
|
|
897
|
-
export interface MiddlewareDecisionPayload {
|
|
898
|
-
readonly middleware: string;
|
|
899
|
-
/** Where in the loop this happened — the vocabulary `.act()` is keyed on. */
|
|
900
|
-
readonly moment: LoopMoment;
|
|
901
|
-
/** The 7.18 spelling of the same fact. Narrow on `moment`. */
|
|
902
|
-
readonly at: 'tool' | 'message';
|
|
903
|
-
readonly phase?: 'input' | 'output';
|
|
904
|
-
readonly toolName?: string;
|
|
905
|
-
readonly toolCallId?: string;
|
|
906
|
-
readonly iteration: number;
|
|
907
|
-
readonly outcome: 'allow' | 'deny' | 'ask';
|
|
908
|
-
/** True when this link changed the value the chain carries forward. */
|
|
909
|
-
readonly changed: boolean;
|
|
910
|
-
/** The transform's `why`, the denial's `reason`, or the ask's `question`. */
|
|
911
|
-
readonly why?: string;
|
|
912
|
-
/** The registered component that COLLECTED this decision (9.24.0). Present
|
|
913
|
-
* only on the resume-side rows of an `ask` that carried one. */
|
|
914
|
-
readonly componentId?: string;
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* The model declared a BASIS for one tool call — `_findings.basis` peeled
|
|
918
|
-
* off the call's arguments before anything else read them (9.101.0).
|
|
919
|
-
*
|
|
920
|
-
* Identities, enums and counts ONLY, by the `MiddlewareDecisionPayload` law
|
|
921
|
-
* one screen up: the row itself lives in the committed `findingsLedger`
|
|
922
|
-
* key under whatever redaction the run configured, and an event stream is
|
|
923
|
-
* a fan-out to sinks we do not control. `malformed` counts the entries
|
|
924
|
-
* `splitFindings` dropped from this call's declaration — never coerced,
|
|
925
|
-
* never inferred — so a sink can see that the model tried and missed
|
|
926
|
-
* without seeing what it wrote.
|
|
927
|
-
*
|
|
928
|
-
* Fired by `recordFindings`, one per basis row, BEFORE `stream.tool_start`
|
|
929
|
-
* for the same `toolCallId`. Never fired on an agent without `.findings()`.
|
|
930
|
-
*/
|
|
931
|
-
export interface FindingsDeclaredPayload {
|
|
932
|
-
readonly toolName: string;
|
|
933
|
-
/** The provider's id for the call — what a reader joins to `tool_start`. */
|
|
934
|
-
readonly toolCallId: string;
|
|
935
|
-
readonly iteration: number;
|
|
936
|
-
readonly basis: Basis;
|
|
937
|
-
readonly expect?: Expect;
|
|
938
|
-
/**
|
|
939
|
-
* The call declared a `proposition` (what it tests) — a FLAG, never the
|
|
940
|
-
* text, by the same law as `malformed`: the line itself lives on the
|
|
941
|
-
* `BasisRow` in the committed key. Absent when none was declared.
|
|
942
|
-
*/
|
|
943
|
-
readonly hasProposition?: true;
|
|
944
|
-
/** Malformed `_findings` entries dropped from this call's declaration. */
|
|
945
|
-
readonly malformed?: number;
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* The model declared a STANDING for one PREVIOUS tool result — `fact`,
|
|
949
|
-
* `open`, `ruled-out` or `noise` — on its next tool call or as a top-level
|
|
950
|
-
* `_findings.previous` on a JSON answer (9.101.0).
|
|
951
|
-
*
|
|
952
|
-
* `toolCallId` names the RESULT being stood on, not the call that carried
|
|
953
|
-
* the declaration; `declaredOn` says which door the declaration came
|
|
954
|
-
* through. `assertionCount` is the number of assertions the row carries
|
|
955
|
-
* (always 0 for `noise`); the assertions themselves, `settles`, `line` and
|
|
956
|
-
* every other word the model wrote stay in the committed key — the same
|
|
957
|
-
* law as `FindingsDeclaredPayload`. `conflictKeys` lists the assertion keys
|
|
958
|
-
* whose conflict row THIS write created; a key that already had one is not
|
|
959
|
-
* repeated. `unknownId` marks a standing for an id the previous batch did
|
|
960
|
-
* not contain — recorded, never resolved.
|
|
961
|
-
*
|
|
962
|
-
* `agrees` (9.104.0, `.findings({ judge })`) compares this standing with the
|
|
963
|
-
* JUDGE's current judgment of the same result and is present exactly when
|
|
964
|
-
* a `JudgmentRow` exists for it: the judge files before the model call
|
|
965
|
-
* that declares, so this event is the one moment both readings exist. A
|
|
966
|
-
* comparison made for the sink, never written to the record, where the two
|
|
967
|
-
* sources stay two rows. Absent without a judge, after a failed judgment,
|
|
968
|
-
* and for an `unknownId`.
|
|
969
|
-
*
|
|
970
|
-
* Fired by `recordFindings`, one per standing row, in declaration order.
|
|
971
|
-
*/
|
|
972
|
-
export interface FindingsStandingPayload {
|
|
973
|
-
/** The id of the tool RESULT this standing is about. */
|
|
974
|
-
readonly toolCallId: string;
|
|
975
|
-
/** Absent when `unknownId` — the batch had no result to name. */
|
|
976
|
-
readonly toolName?: string;
|
|
977
|
-
/** The DECLARING iteration; the result's own stage is derivable from the
|
|
978
|
-
* commit log by `toolCallId`, never guessed here. */
|
|
979
|
-
readonly iteration: number;
|
|
980
|
-
readonly standing: Standing;
|
|
981
|
-
readonly declaredOn: 'tool-call' | 'answer';
|
|
982
|
-
readonly assertionCount: number;
|
|
983
|
-
/** Assertion keys whose conflict row this write created. */
|
|
984
|
-
readonly conflictKeys?: readonly string[];
|
|
985
|
-
/** The named id was not in the previous batch. */
|
|
986
|
-
readonly unknownId?: true;
|
|
987
|
-
/** Whether this standing equals the judge's current one for the result; present only when one exists. */
|
|
988
|
-
readonly agrees?: boolean;
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* A SECOND SOURCE judged one tool result (9.104.0, `.findings({ judge })`):
|
|
992
|
-
* the calibrated classifier's standing for the result against the call's
|
|
993
|
-
* declared proposition — or the user's question when none was declared —
|
|
994
|
-
* with its confidence and cost. The row (`JudgmentRow`) holds the whole
|
|
995
|
-
* distribution and the provider's model string in the committed
|
|
996
|
-
* `findingsLedger`; this payload carries identities, enums and NUMBERS only,
|
|
997
|
-
* never the state the judge read.
|
|
998
|
-
*
|
|
999
|
-
* No `agrees` here: the judge files BEFORE the model call that could
|
|
1000
|
-
* declare a standing on this result, so at this event the model's reading
|
|
1001
|
-
* does not exist yet. The comparison rides `FindingsStandingPayload.agrees`
|
|
1002
|
-
* instead, the one moment both readings exist. Fired by `recordFindings`,
|
|
1003
|
-
* one per judgment row, once the result's `toolResults` entry exists and
|
|
1004
|
-
* before the next model call. Never fired without a configured judge.
|
|
1005
|
-
*/
|
|
1006
|
-
export interface FindingsJudgedPayload {
|
|
1007
|
-
readonly toolCallId: string;
|
|
1008
|
-
readonly toolName: string;
|
|
1009
|
-
readonly iteration: number;
|
|
1010
|
-
readonly against: 'proposition' | 'question';
|
|
1011
|
-
readonly standing: Standing;
|
|
1012
|
-
readonly confidence: number;
|
|
1013
|
-
readonly latencyMs: number;
|
|
1014
|
-
readonly inputTokens?: number;
|
|
1015
|
-
readonly outputTokens?: number;
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
* The judge was asked about one tool result and produced no answer
|
|
1019
|
-
* (9.104.0): the provider's HTTP status when there was one, and the latency
|
|
1020
|
-
* spent. The error text lives on the `JudgmentErrorRow`; no standing is
|
|
1021
|
-
* guessed, and the run continues — the judge is advisory.
|
|
1022
|
-
*/
|
|
1023
|
-
export interface FindingsJudgeFailedPayload {
|
|
1024
|
-
readonly toolCallId: string;
|
|
1025
|
-
readonly toolName: string;
|
|
1026
|
-
readonly iteration: number;
|
|
1027
|
-
readonly status?: number;
|
|
1028
|
-
readonly latencyMs: number;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* The model USED a value that came only from results it had itself declared
|
|
1032
|
-
* `open`, `noise` or `ruled-out` (9.110.0, `.findings()` beside
|
|
1033
|
-
* `.namesAndNumbersFromEvidence()`): in its answer (`declaredOn: 'answer'`)
|
|
1034
|
-
* or as an argument of a later tool call (`'tool-call'`, with the call's
|
|
1035
|
-
* `toolCallId`). Declared standings plus the evidence corpus's provenance —
|
|
1036
|
-
* nothing inferred, no judge. The row (`ContingentRow`) holds the value and
|
|
1037
|
-
* every carrier with its standing in the committed `findingsLedger`; this
|
|
1038
|
-
* payload carries the moment, how many results carried the value, the
|
|
1039
|
-
* DISTINCT standings among them and the value's length — identities, enums
|
|
1040
|
-
* and numbers only, never the token. Fired by `recordFindings`, one per
|
|
1041
|
-
* contingent row: at the answer, after the evidence gate's verdict; at
|
|
1042
|
-
* dispatch, after the call's basis row and before `stream.tool_start`.
|
|
1043
|
-
* Never fired unless BOTH doors are armed.
|
|
1044
|
-
*/
|
|
1045
|
-
export interface FindingsContingentPayload {
|
|
1046
|
-
readonly iteration: number;
|
|
1047
|
-
readonly declaredOn: 'tool-call' | 'answer';
|
|
1048
|
-
/** The dispatching call, when the value rode its arguments; absent for the answer. */
|
|
1049
|
-
readonly toolCallId?: string;
|
|
1050
|
-
/** How many results carried the value — every one judged non-fact. */
|
|
1051
|
-
readonly carriers: number;
|
|
1052
|
-
/** The distinct standings among the carriers, in carrier order. */
|
|
1053
|
-
readonly standings: readonly Standing[];
|
|
1054
|
-
/** The length of the value as the row holds it. */
|
|
1055
|
-
readonly valueChars: number;
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
* The inputs layer's verdict on ONE ruled argument of ONE tool call (honesty
|
|
1059
|
-
* layer 2) — fired once per `argument` row the `sf-inputs` subflow files,
|
|
1060
|
-
* before the call dispatches. This version files `source: 'default'` (the
|
|
1061
|
-
* library filled the tool's declared `assume` value, or the model sent that
|
|
1062
|
-
* same value) and `source: 'model'` (the model sent another value the record
|
|
1063
|
-
* does not trace). Names, enums and counts only: never the value, a quote or
|
|
1064
|
-
* the model's proposal — those stay on the committed row, in the tool's own
|
|
1065
|
-
* argument view — and no `valueChars` when that view hides the argument. A
|
|
1066
|
-
* host counts "1 assumed" from these events. The standing fold never reads
|
|
1067
|
-
* them (it reads the committed rows).
|
|
1068
|
-
*/
|
|
1069
|
-
export interface FindingsArgumentPayload {
|
|
1070
|
-
readonly toolCallId: string;
|
|
1071
|
-
readonly toolName: string;
|
|
1072
|
-
readonly iteration: number;
|
|
1073
|
-
/** The conversation turn the row was filed in. */
|
|
1074
|
-
readonly turn: number;
|
|
1075
|
-
readonly argument: string;
|
|
1076
|
-
readonly rule?: 'ask' | 'assume';
|
|
1077
|
-
readonly period?: true;
|
|
1078
|
-
readonly source?: ArgumentSource;
|
|
1079
|
-
readonly asked?: ArgumentAsked;
|
|
1080
|
-
readonly claimed?: ArgumentClaim;
|
|
1081
|
-
readonly matched?: 'quote' | 'phrase' | 'spelling' | 'mention';
|
|
1082
|
-
readonly reading?: true;
|
|
1083
|
-
readonly earlier?: true;
|
|
1084
|
-
readonly setAside?: 'open' | 'noise' | 'ruled-out';
|
|
1085
|
-
readonly argumentsFrom?: 'listed' | 'unlisted';
|
|
1086
|
-
readonly coincides?: 'person' | 'result' | 'app';
|
|
1087
|
-
readonly free?: true;
|
|
1088
|
-
readonly failed?: ArgumentCheckFailed;
|
|
1089
|
-
readonly malformed?: number;
|
|
1090
|
-
/** The length of the value as the row holds it — absent when the tool's view hides it. */
|
|
1091
|
-
readonly valueChars?: number;
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
* The results layer's verdict on ONE call's period (honesty layer 3, step 7b)
|
|
1095
|
-
* — fired once per `period` row the `sf-results` subflow files at the loop
|
|
1096
|
-
* head, after the call ran. The tool's name, the call's id, the stamps and the
|
|
1097
|
-
* verdict word ONLY: never an instant (the declared period stays on the
|
|
1098
|
-
* committed coverage row). `undeclared` means the tool declares a period
|
|
1099
|
-
* argument and this result said nothing about what its read covered. A host
|
|
1100
|
-
* counts "1 read the store did not hold" from these events; the standing fold
|
|
1101
|
-
* never reads them (it reads the committed rows).
|
|
1102
|
-
*/
|
|
1103
|
-
export interface FindingsPeriodPayload {
|
|
1104
|
-
readonly toolCallId: string;
|
|
1105
|
-
readonly toolName: string;
|
|
1106
|
-
readonly iteration: number;
|
|
1107
|
-
/** The conversation turn the row was filed in. */
|
|
1108
|
-
readonly turn: number;
|
|
1109
|
-
readonly verdict: 'covered' | 'partly-held' | 'not-held' | 'unknown' | 'undeclared';
|
|
1110
|
-
/**
|
|
1111
|
-
* The time layer's result checks that hold on the row (step T8, under
|
|
1112
|
-
* `.time()` only) — their names, never a range: `period-differs-from-asked`,
|
|
1113
|
-
* `period-shifted`, `period-beyond-retention`, `partly-beyond-retention`.
|
|
1114
|
-
* Absent when none holds, and on every unarmed run.
|
|
1115
|
-
*/
|
|
1116
|
-
readonly timeChecks?: readonly ('period-differs-from-asked' | 'period-shifted' | 'period-beyond-retention' | 'partly-beyond-retention')[];
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* One observe-only prose finding, filed with the answer: a detected claim or
|
|
1120
|
-
* a unit the bounded grammar could not judge. This is a warning, never an
|
|
1121
|
-
* enforcement decision or proof that the remaining prose is true.
|
|
1122
|
-
*
|
|
1123
|
-
* Only locations, checker codes, phrase-pack identities and native result
|
|
1124
|
-
* references leave the ledger. No answer text, candidate entity labels,
|
|
1125
|
-
* tool values or stale-read dates are included. Codes are owned by the
|
|
1126
|
-
* checker, not duplicated in this low-level event contract.
|
|
1127
|
-
*/
|
|
1128
|
-
interface FindingsNegativeClaimLocation {
|
|
1129
|
-
readonly iteration: number;
|
|
1130
|
-
/** The conversation turn when stamped by the runtime. */
|
|
1131
|
-
readonly turn?: number;
|
|
1132
|
-
/** JSON pointer into the answer; at most 4,096 UTF-16 code units. */
|
|
1133
|
-
readonly field: string;
|
|
1134
|
-
readonly span: {
|
|
1135
|
-
readonly start: number;
|
|
1136
|
-
readonly end: number;
|
|
1137
|
-
};
|
|
1138
|
-
/** At most 128 UTF-16 code units. */
|
|
1139
|
-
readonly packVersion: string;
|
|
1140
|
-
/** At most 128 UTF-16 code units. */
|
|
1141
|
-
readonly phraseId?: string;
|
|
1142
|
-
/** Some metadata was shortened or omitted; references are not exhaustive. */
|
|
1143
|
-
readonly truncated?: true;
|
|
1144
|
-
}
|
|
1145
|
-
export type FindingsNegativeClaimPayload = FindingsNegativeClaimLocation & ({
|
|
1146
|
-
readonly kind: 'negative-claim';
|
|
1147
|
-
readonly claim: 'none' | 'complete';
|
|
1148
|
-
/** At most 32 checker codes, each at most 128 UTF-16 code units. */
|
|
1149
|
-
readonly notes: readonly string[];
|
|
1150
|
-
/** At most 32 native result ids, each at most 256 UTF-16 code units. */
|
|
1151
|
-
readonly results: readonly string[];
|
|
1152
|
-
} | {
|
|
1153
|
-
readonly kind: 'negative-claim-note';
|
|
1154
|
-
/** The checker's unread-unit code, at most 128 UTF-16 code units. */
|
|
1155
|
-
readonly code: string;
|
|
1156
|
-
});
|
|
1157
|
-
/**
|
|
1158
|
-
* A classifier picked a tool for one model call (9.105.0, `.toolChoice()`):
|
|
1159
|
-
* the provider's pick among the OFFERED tools (the merged wire minus the
|
|
1160
|
-
* always-served doors), its confidence, how many were offered and how many
|
|
1161
|
-
* were served, whether the served list was narrowed to the top-N, and the
|
|
1162
|
-
* cost. The row (`ToolChoiceRow`) holds the whole distribution and the
|
|
1163
|
-
* provider's model string in the committed `toolChoices`; this payload
|
|
1164
|
-
* carries identities (tool names), enums, numbers and a boolean — never the
|
|
1165
|
-
* descriptions the classifier read, never the user's message. Fired by
|
|
1166
|
-
* `recordToolChoice` from the tools slot, BEFORE the model call.
|
|
1167
|
-
*/
|
|
1168
|
-
export interface ToolChoicePickedPayload {
|
|
1169
|
-
readonly iteration: number;
|
|
1170
|
-
readonly chosen?: string;
|
|
1171
|
-
readonly confidence: number;
|
|
1172
|
-
readonly offered: number;
|
|
1173
|
-
readonly served: number;
|
|
1174
|
-
readonly narrowed: boolean;
|
|
1175
|
-
readonly narrowedSkipped?: 'unavailable' | 'too-few' | 'after-miss' | 'wrap-up' | 'evidence-revision';
|
|
1176
|
-
readonly latencyMs: number;
|
|
1177
|
-
readonly inputTokens?: number;
|
|
1178
|
-
readonly outputTokens?: number;
|
|
1179
|
-
}
|
|
1180
|
-
/**
|
|
1181
|
-
* What the model DID on the call the pick was made for (9.105.0): the tools
|
|
1182
|
-
* it called in order (empty on an answer), whether its first call is the
|
|
1183
|
-
* classifier's pick (`firstAgrees`, absent when either side is absent) and
|
|
1184
|
-
* the names it asked for outside a NARROWED served list (`missed`). Fired by
|
|
1185
|
-
* `recordToolChoice` from `callLLM`, after the reply.
|
|
1186
|
-
*/
|
|
1187
|
-
export interface ToolChoiceOutcomePayload {
|
|
1188
|
-
readonly iteration: number;
|
|
1189
|
-
readonly called: readonly string[];
|
|
1190
|
-
readonly firstAgrees?: boolean;
|
|
1191
|
-
readonly missed?: readonly string[];
|
|
1192
|
-
}
|
|
1193
|
-
/**
|
|
1194
|
-
* The classifier was asked which tool and produced no answer (9.105.0): the
|
|
1195
|
-
* provider's HTTP status when there was one and the latency spent. The
|
|
1196
|
-
* error text lives on the `ToolChoiceErrorRow`; the full tool set was served
|
|
1197
|
-
* (fail open, never fail narrow) and the run continues.
|
|
1198
|
-
*/
|
|
1199
|
-
export interface ToolChoiceFailedPayload {
|
|
1200
|
-
readonly iteration: number;
|
|
1201
|
-
readonly status?: number;
|
|
1202
|
-
readonly latencyMs: number;
|
|
1203
|
-
}
|
|
1204
|
-
/**
|
|
1205
|
-
* The declared ontology was served on one model call (9.106.0,
|
|
1206
|
-
* `.ontology()`): the map's identities (`id`, `version`, the declaration's
|
|
1207
|
-
* `hash`) and its three counts. The map itself is the run constant
|
|
1208
|
-
* `AgentState.ontology`; the served text is on the receipt and rebuilt by
|
|
1209
|
-
* `servedAt`. This payload carries identities and numbers only — never a
|
|
1210
|
-
* meaning, a coverage sentence or a node name. Fired by `callLLM` at
|
|
1211
|
-
* request assembly, once per call that served the piece.
|
|
1212
|
-
*/
|
|
1213
|
-
export interface OntologyServedPayload {
|
|
1214
|
-
readonly iteration: number;
|
|
1215
|
-
readonly id: string;
|
|
1216
|
-
readonly version: string;
|
|
1217
|
-
readonly hash: string;
|
|
1218
|
-
readonly nodes: number;
|
|
1219
|
-
readonly sources: number;
|
|
1220
|
-
readonly edges: number;
|
|
1221
|
-
}
|
|
1222
|
-
/**
|
|
1223
|
-
* The answer's standing as data — the SAME projection on
|
|
1224
|
-
* `agentfootprint.answer.assessed` and on `turn_end.answerAssessment`, built
|
|
1225
|
-
* by one function (`assessment/compose.ts` · `assessmentDataOf`) from the one
|
|
1226
|
-
* fold (`assessAnswer`) the answer layer runs at the head of the final
|
|
1227
|
-
* branch. Names, enums and counts only: the value, its rendering, the reason
|
|
1228
|
-
* KINDS and the checks that ran — never a value from the answer, a quote, a
|
|
1229
|
-
* witness pointer or the support's digest (those stay on the committed rows
|
|
1230
|
-
* `agent.assessment()` folds, with their pointers).
|
|
1231
|
-
*/
|
|
1232
|
-
export interface AnswerAssessmentPayload {
|
|
1233
|
-
/** The value: `known | unrefuted | unknown | not-applicable`. */
|
|
1234
|
-
readonly assessment: 'known' | 'unrefuted' | 'unknown' | 'not-applicable';
|
|
1235
|
-
/** The owner's words for it: known · consistent · not sure · ask · not assessed. */
|
|
1236
|
-
readonly standing: 'known' | 'consistent' | 'not-sure' | 'ask' | 'not-assessed';
|
|
1237
|
-
/** Every reason that fired, by kind, in the fold's order (the ask first, then by layer). */
|
|
1238
|
-
readonly reasons: readonly AssessmentReason[];
|
|
1239
|
-
/** What actually ran this turn, printed as it is — never a fixed list. */
|
|
1240
|
-
readonly checked: readonly {
|
|
1241
|
-
readonly layer: HonestyLayer;
|
|
1242
|
-
readonly check: AssessmentCheck;
|
|
1243
|
-
readonly ran: number;
|
|
1244
|
-
readonly of: number;
|
|
1245
|
-
}[];
|
|
1246
|
-
}
|
|
1247
|
-
/**
|
|
1248
|
-
* The answer layer assessed the turn's answer (honesty layer 4,
|
|
1249
|
-
* `.answerLayer()`): ONE event per answer, fired at the head of the final
|
|
1250
|
-
* branch — after the Route decider's checks filed their verdicts and before
|
|
1251
|
-
* the turn's payload is captured. It carries the standing as data
|
|
1252
|
-
* ({@link AnswerAssessmentPayload}) with the conversation turn and the
|
|
1253
|
-
* answer's iteration. The fold it reports reads committed rows only, so the
|
|
1254
|
-
* same recording read afterwards with `assessAnswer` folds the same value
|
|
1255
|
-
* (without app declarations — `assessAnswer(record, declarations)` with
|
|
1256
|
-
* `rowsAt` can say more than the run did).
|
|
1257
|
-
*
|
|
1258
|
-
* Where it reaches, and what it is about:
|
|
1259
|
-
* - the agent's own listeners only — a composition that mounts the agent
|
|
1260
|
-
* bridges the agent domain, not `answer.*`, so read
|
|
1261
|
-
* `turn_end.answerAssessment` there;
|
|
1262
|
-
* - the answer the run COMPOSED: under the evidence gate's `rails` posture a
|
|
1263
|
-
* refused answer is assessed too, and then the run throws (no answer is
|
|
1264
|
-
* delivered, and `agent.assessment()` returns `undefined`).
|
|
1265
|
-
*/
|
|
1266
|
-
export interface AnswerAssessedPayload extends AnswerAssessmentPayload {
|
|
1267
|
-
/** `AgentState.turnNumber` — the conversation turn. */
|
|
1268
|
-
readonly turn: number;
|
|
1269
|
-
/** The iteration whose answer was assessed. */
|
|
1270
|
-
readonly iteration: number;
|
|
1271
|
-
}
|
|
1272
|
-
export interface MemoryStrategyAppliedPayload {
|
|
1273
|
-
readonly strategyId: string;
|
|
1274
|
-
readonly strategyKind: 'sliding-window' | 'summarizing' | 'semantic' | 'fact-extraction' | 'hybrid';
|
|
1275
|
-
readonly reason: string;
|
|
1276
|
-
readonly scoreEvidence?: Readonly<Record<string, unknown>>;
|
|
1277
|
-
readonly inputMemoryCount: number;
|
|
1278
|
-
readonly outputMemoryCount: number;
|
|
1279
|
-
readonly droppedIds: readonly string[];
|
|
1280
|
-
readonly addedIds: readonly string[];
|
|
1281
|
-
}
|
|
1282
|
-
/**
|
|
1283
|
-
* One piece of stored content reached the prompt.
|
|
1284
|
-
*
|
|
1285
|
-
* Emitted once per admitted chunk by the memory formatter (8.8.0 — the
|
|
1286
|
-
* payload was declared in 2.x and nothing emitted it until then).
|
|
1287
|
-
* `memoryId` is the STORE ENTRY's id, which for an indexed corpus is the
|
|
1288
|
-
* chunk id you can cite. Which retriever produced it is
|
|
1289
|
-
* `meta.runtimeStageId` (`sf-memory-read-<id>/format-default#N`) — the
|
|
1290
|
-
* house rule is that events correlate by runtime stage id, not by
|
|
1291
|
-
* duplicating the owner into every payload.
|
|
1292
|
-
*/
|
|
1293
|
-
export interface MemoryAttachedPayload {
|
|
1294
|
-
readonly memoryId: string;
|
|
1295
|
-
readonly contentSummary: string;
|
|
1296
|
-
readonly score?: number;
|
|
1297
|
-
readonly rank?: number;
|
|
1298
|
-
readonly source: 'store' | 'auto-extract' | 'manual';
|
|
1299
|
-
readonly retriever?: 'pinecone' | 'weaviate' | 'qdrant' | 'chroma' | 'custom';
|
|
1300
|
-
}
|
|
1301
|
-
/** One candidate a retrieval considered, admitted or not. */
|
|
1302
|
-
export interface RetrievedCandidatePayload {
|
|
1303
|
-
readonly id: string;
|
|
1304
|
-
readonly score: number;
|
|
1305
|
-
readonly rank: number;
|
|
1306
|
-
readonly admitted: boolean;
|
|
1307
|
-
/**
|
|
1308
|
-
* Why it did not reach the prompt. `'over-char-budget'` (8.19.0) means it
|
|
1309
|
-
* cleared the score floor and the count rule, and the retriever's
|
|
1310
|
-
* `maxChars` budget was already spent by better-ranked passages.
|
|
1311
|
-
*/
|
|
1312
|
-
readonly reason?: 'below-threshold' | 'over-budget' | 'over-max-entries' | 'over-char-budget';
|
|
1313
|
-
readonly docUri?: string;
|
|
1314
|
-
readonly page?: number;
|
|
1315
|
-
readonly heading?: string;
|
|
1316
|
-
}
|
|
1317
|
-
/**
|
|
1318
|
-
* A retrieval happened — here is everything it considered (8.8.0).
|
|
1319
|
-
*
|
|
1320
|
-
* The event that makes "why did the agent NOT read that passage"
|
|
1321
|
-
* answerable. Until 8.8.0 the quality floor was applied inside the store,
|
|
1322
|
-
* so a rejected candidate never came back and a retrieval that injected
|
|
1323
|
-
* nothing left no trace of what it nearly injected.
|
|
1324
|
-
*
|
|
1325
|
-
* `candidates` absent means the store could not tell us (see
|
|
1326
|
-
* `candidatesOmittedReason`) — it never means there were none. That case
|
|
1327
|
-
* is `candidates: []` with `consideredCount: 0` and `corpusEmpty: true`.
|
|
1328
|
-
*/
|
|
1329
|
-
export interface MemoryRetrievedPayload {
|
|
1330
|
-
/**
|
|
1331
|
-
* Which rule ruled — the `RetrievalStrategy.name` that produced the verdicts
|
|
1332
|
-
* below, e.g. `'top-k'`. The port promises its name "appears in the
|
|
1333
|
-
* recording"; this is where. Without it a shipped `topK` and a consumer's own
|
|
1334
|
-
* re-ranker leave records that are identical except for the numbers they
|
|
1335
|
-
* disagree about.
|
|
1336
|
-
*/
|
|
1337
|
-
readonly strategy: string;
|
|
1338
|
-
/** Stable hash of the query text. The text itself is already in the recording once. */
|
|
1339
|
-
readonly queryHash: string;
|
|
1340
|
-
/** How many chunks the retriever was willing to admit. */
|
|
1341
|
-
readonly k: number;
|
|
1342
|
-
/** The quality floor, when the retriever set one. */
|
|
1343
|
-
readonly threshold?: number;
|
|
1344
|
-
/**
|
|
1345
|
-
* The character budget the admitted passages were spent against (8.19.0),
|
|
1346
|
-
* when the retriever set one. A count bound (`k`) is not a size bound;
|
|
1347
|
-
* this is the size bound, and the candidates it dropped carry
|
|
1348
|
-
* `reason: 'over-char-budget'`.
|
|
1349
|
-
*/
|
|
1350
|
-
readonly maxChars?: number;
|
|
1351
|
-
/**
|
|
1352
|
-
* Passage characters the admitted set spends. Present exactly when
|
|
1353
|
-
* `maxChars` is. Passage text only — the `<source …>` wrapper and the
|
|
1354
|
-
* block header are added later by the formatter.
|
|
1355
|
-
*/
|
|
1356
|
-
readonly charsUsed?: number;
|
|
1357
|
-
readonly embedderId?: string;
|
|
1358
|
-
/** Length of the query vector. */
|
|
1359
|
-
readonly dimensions?: number;
|
|
1360
|
-
readonly consideredCount: number;
|
|
1361
|
-
readonly admittedCount: number;
|
|
1362
|
-
readonly rejectedCount: number;
|
|
1363
|
-
readonly candidates?: readonly RetrievedCandidatePayload[];
|
|
1364
|
-
/**
|
|
1365
|
-
* Whether `candidates` is every candidate that existed, or only as far
|
|
1366
|
-
* as the requested pool reached. `false` never weakens the ADMITTED
|
|
1367
|
-
* set — only the rejected list is then a sample.
|
|
1368
|
-
*/
|
|
1369
|
-
readonly candidatesComplete: boolean;
|
|
1370
|
-
readonly candidatesOmittedReason?: string;
|
|
1371
|
-
/**
|
|
1372
|
-
* The namespace held nothing at all. Almost always means the corpus was
|
|
1373
|
-
* indexed under a different identity than the one being queried.
|
|
1374
|
-
*/
|
|
1375
|
-
readonly corpusEmpty: boolean;
|
|
1376
|
-
/** The namespace that was searched. */
|
|
1377
|
-
readonly namespace?: string;
|
|
1378
|
-
}
|
|
1379
|
-
export interface MemoryDetachedPayload {
|
|
1380
|
-
readonly memoryId: string;
|
|
1381
|
-
readonly reason: 'stale' | 'budget' | 'score_low' | 'policy';
|
|
1382
|
-
}
|
|
1383
|
-
export interface MemoryWrittenPayload {
|
|
1384
|
-
readonly memoryId: string;
|
|
1385
|
-
readonly contentSummary: string;
|
|
1386
|
-
readonly source: 'auto' | 'manual';
|
|
1387
|
-
readonly actor?: string;
|
|
1388
|
-
}
|
|
1389
|
-
export interface ToolsOfferedPayload {
|
|
1390
|
-
readonly availableIds: readonly string[];
|
|
1391
|
-
readonly withheldIds: readonly string[];
|
|
1392
|
-
readonly withheldReasons: Readonly<Record<string, 'permission' | 'skill_inactive' | 'gated' | 'cost_guard'>>;
|
|
1393
|
-
readonly reason: string;
|
|
1394
|
-
}
|
|
1395
|
-
export interface ToolsActivatedPayload {
|
|
1396
|
-
readonly toolId: string;
|
|
1397
|
-
readonly reason: 'skill_activated' | 'autoActivate' | 'permission_granted';
|
|
1398
|
-
readonly source?: string;
|
|
1399
|
-
}
|
|
1400
|
-
export interface ToolsDeactivatedPayload {
|
|
1401
|
-
readonly toolId: string;
|
|
1402
|
-
readonly reason: 'skill_deactivated' | 'permission_revoked';
|
|
1403
|
-
}
|
|
1404
|
-
/**
|
|
1405
|
-
* Emitted at the start of a `ToolProvider.list(ctx)` call inside the
|
|
1406
|
-
* Discover stage. Pairs with `tools.discovery_completed` (success) or
|
|
1407
|
-
* `tools.discovery_failed` (error). Use the pair to measure async-
|
|
1408
|
-
* provider latency per iteration without joining stages by hand.
|
|
1409
|
-
*/
|
|
1410
|
-
export interface ToolsDiscoveryStartedPayload {
|
|
1411
|
-
readonly providerId: string | undefined;
|
|
1412
|
-
readonly iteration: number;
|
|
1413
|
-
}
|
|
1414
|
-
/**
|
|
1415
|
-
* Emitted when `ToolProvider.list(ctx)` resolves successfully. The
|
|
1416
|
-
* `durationMs` is the wall-clock between `tools.discovery_started` and
|
|
1417
|
-
* resolution; `toolCount` is the size of the returned tool list. For
|
|
1418
|
-
* sync providers `durationMs` is ~0; for async hub-backed providers
|
|
1419
|
-
* this is your observability hook for catalog-fetch latency.
|
|
1420
|
-
*/
|
|
1421
|
-
export interface ToolsDiscoveryCompletedPayload {
|
|
1422
|
-
readonly providerId: string | undefined;
|
|
1423
|
-
readonly iteration: number;
|
|
1424
|
-
readonly durationMs: number;
|
|
1425
|
-
readonly toolCount: number;
|
|
1426
|
-
}
|
|
1427
|
-
/**
|
|
1428
|
-
* Emitted when a custom `ToolProvider.list(ctx)` throws or rejects.
|
|
1429
|
-
* The iteration is aborted; a configured `reliability` rule decides
|
|
1430
|
-
* whether to retry, fall back, or fail-fast. `providerId` lets
|
|
1431
|
-
* consumers route alerts to the right hub adapter (rube / mcp /
|
|
1432
|
-
* custom-discovery). `durationMs` measures how long the failed call
|
|
1433
|
-
* spent before throwing, so timeouts vs immediate rejections are
|
|
1434
|
-
* distinguishable.
|
|
1435
|
-
*/
|
|
1436
|
-
export interface ToolsDiscoveryFailedPayload {
|
|
1437
|
-
readonly providerId: string | undefined;
|
|
1438
|
-
readonly error: string;
|
|
1439
|
-
readonly errorName: string;
|
|
1440
|
-
readonly iteration: number;
|
|
1441
|
-
readonly durationMs: number;
|
|
1442
|
-
}
|
|
1443
|
-
/**
|
|
1444
|
-
* The parties that can put a tool name on the wire or answer to one — the
|
|
1445
|
-
* vocabulary `tools.shadowed` and `tools.claim_swallowed` name them in (9.92.0).
|
|
1446
|
-
*
|
|
1447
|
-
* • `registry` — a static `.tool()` registration;
|
|
1448
|
-
* • `provider` — a `ToolProvider` (`.toolProvider()`, MCP through `staticTools`,
|
|
1449
|
-
* `.selfExplain()`'s trace pack — its id says which);
|
|
1450
|
-
* • `skill` — a skill's `tools:[]`, always-visible or scoped;
|
|
1451
|
-
* • `framework` — an auto-attach the framework owns: `read_skill`, `present`,
|
|
1452
|
-
* `skip_step`.
|
|
1453
|
-
*/
|
|
1454
|
-
export type ToolNameChannel = 'provider' | 'registry' | 'skill' | 'framework';
|
|
1455
|
-
/**
|
|
1456
|
-
* Emitted, per iteration, for a tool name that two parties BOTH put forward
|
|
1457
|
-
* for the wire and only one could win (8.7.0; re-subjected 9.92.0).
|
|
1458
|
-
*
|
|
1459
|
-
* Until 9.92.0 the two halves of a call could come from different parties:
|
|
1460
|
-
* the tools slot merges `[static, provider, skill, step]` first-wins while the
|
|
1461
|
-
* dispatcher resolved a build-time map first, so the model read one contract
|
|
1462
|
-
* and called another implementation. Since 9.92.0 dispatch FOLLOWS THE OFFER —
|
|
1463
|
-
* the party whose contract is on the wire is the party that answers — so
|
|
1464
|
-
* `schemaFrom` and `dispatchTo` name the same party, and both are the wire's.
|
|
1465
|
-
* The event still fires because the collision is still real: the losing
|
|
1466
|
-
* party's contract was hidden behind the winner's on this iteration, and a
|
|
1467
|
-
* rename is still the fix. The loser is named by the companion
|
|
1468
|
-
* `tools.claim_swallowed`, which fires for every party that lost a name whether
|
|
1469
|
-
* or not its contract competed this iteration.
|
|
1470
|
-
*
|
|
1471
|
-
* Not an error event: the run continues and a tool really executes. It fires
|
|
1472
|
-
* once per contested name PER ITERATION, because a provider list is resolved
|
|
1473
|
-
* per iteration and a collision can begin mid-run.
|
|
1474
|
-
*
|
|
1475
|
-
* Carries names only — never args, never results, never a description body.
|
|
1476
|
-
*/
|
|
1477
|
-
export interface ToolsShadowedPayload {
|
|
1478
|
-
/** The contested tool name. */
|
|
1479
|
-
readonly toolName: string;
|
|
1480
|
-
readonly iteration: number;
|
|
1481
|
-
/** Which party's CONTRACT the model was shown — the wire's party. */
|
|
1482
|
-
readonly schemaFrom: ToolNameChannel;
|
|
1483
|
-
/** That party's id — the `ToolProvider.id` or the skill id, when it has one. */
|
|
1484
|
-
readonly schemaFromId?: string;
|
|
1485
|
-
/** Which party's IMPLEMENTATION answers a call to this name — since 9.92.0
|
|
1486
|
-
* always the wire's party, so it equals `schemaFrom`. Kept because a
|
|
1487
|
-
* consumer that branched on it keeps working and the sentence stays true. */
|
|
1488
|
-
readonly dispatchTo: ToolNameChannel;
|
|
1489
|
-
/** That party's id, when it has one. */
|
|
1490
|
-
readonly dispatchToId?: string;
|
|
1491
|
-
}
|
|
1492
|
-
/**
|
|
1493
|
-
* Emitted, per iteration, for a party whose claim to a tool name is DEAD on
|
|
1494
|
-
* that iteration: another party holds the name on the wire, and since dispatch
|
|
1495
|
-
* follows the offer the loser's implementation cannot be reached by any call
|
|
1496
|
-
* (9.92.0 — the `claim-swallowed` family of the divergence walk).
|
|
1497
|
-
*
|
|
1498
|
-
* It fires whether or not the loser's contract competed for the wire this
|
|
1499
|
-
* iteration — a provider tool whose name a static `.tool()` already holds, a
|
|
1500
|
-
* skill tool named after a framework auto-attach, a never-activated scoped
|
|
1501
|
-
* skill's tool whose name a provider serves. Silence about a dead claim is the
|
|
1502
|
-
* defect this event exists to end: the party registered a tool the model can
|
|
1503
|
-
* never reach, and the trace said nothing.
|
|
1504
|
-
*
|
|
1505
|
-
* Carries names only — never args, never results, never a description body.
|
|
1506
|
-
*/
|
|
1507
|
-
export interface ToolsClaimSwallowedPayload {
|
|
1508
|
-
/** The contested tool name. */
|
|
1509
|
-
readonly toolName: string;
|
|
1510
|
-
readonly iteration: number;
|
|
1511
|
-
/** The party whose claim is dead this iteration. */
|
|
1512
|
-
readonly lostBy: ToolNameChannel;
|
|
1513
|
-
/** That party's id — the `ToolProvider.id` or the skill id, when it has one. */
|
|
1514
|
-
readonly lostById?: string;
|
|
1515
|
-
/** The party holding the name on the wire — and therefore answering it. */
|
|
1516
|
-
readonly wonBy: ToolNameChannel;
|
|
1517
|
-
/** That party's id, when it has one. */
|
|
1518
|
-
readonly wonById?: string;
|
|
1519
|
-
}
|
|
1520
|
-
/**
|
|
1521
|
-
* Emitted when the dispatcher hands a call to a tool whose name was NOT on
|
|
1522
|
-
* this iteration's wire (9.92.0).
|
|
1523
|
-
*
|
|
1524
|
-
* The capability law keeps a registry-routed tool dispatchable after a
|
|
1525
|
-
* narrowing takes it off the offer — a later step's tool, a parked map's tool,
|
|
1526
|
-
* a scoped skill's tool named from a restored transcript — and that is
|
|
1527
|
-
* deliberate. What was missing was the record: a call answered by a tool the
|
|
1528
|
-
* model was not shown on THIS call looked exactly like one that was. This is
|
|
1529
|
-
* that record, once per such call. It fires ONLY when the answering party is
|
|
1530
|
-
* the one the model last read this name under (or the name's only claimant
|
|
1531
|
-
* when it was never served); a name whose last-served contract belonged to a
|
|
1532
|
-
* party that can no longer answer is refused as a recorded tool result
|
|
1533
|
-
* instead (`toolCalls.ts` · `notServedResult`), never handed to somebody else.
|
|
1534
|
-
*
|
|
1535
|
-
* Carries names only — never args, never results.
|
|
1536
|
-
*/
|
|
1537
|
-
export interface ToolsAnsweredOffWirePayload {
|
|
1538
|
-
readonly toolName: string;
|
|
1539
|
-
readonly toolCallId: string;
|
|
1540
|
-
readonly iteration: number;
|
|
1541
|
-
/** The party whose implementation answered. */
|
|
1542
|
-
readonly answeredBy: ToolNameChannel;
|
|
1543
|
-
/** That party's id — the skill id or the `ToolProvider.id`, when it has one. */
|
|
1544
|
-
readonly answeredById?: string;
|
|
1545
|
-
}
|
|
1546
|
-
/** Shared shape of the four `tools.session_*` payloads. */
|
|
1547
|
-
interface ToolSessionPayloadBase {
|
|
1548
|
-
/** The tool that registered the cleanup. */
|
|
1549
|
-
readonly tool: string;
|
|
1550
|
-
/** Which scope it asked for — how long it expected to live. */
|
|
1551
|
-
readonly scope: 'call' | 'run' | 'session' | 'shutdown';
|
|
1552
|
-
/** Digest of the isolation key. SHA-256 (12 hex chars) where `node:crypto`
|
|
1553
|
-
* resolves, FNV-1a in a browser bundle. NEVER the key. */
|
|
1554
|
-
readonly keyHash: string;
|
|
1555
|
-
/** The adapter holding the resource — `CodeRunner.id`, say. */
|
|
1556
|
-
readonly runnerId?: string;
|
|
1557
|
-
/** One fact the tool chose to state about what was opened (the language, the
|
|
1558
|
-
* browser profile). Never user data. */
|
|
1559
|
-
readonly label?: string;
|
|
1560
|
-
}
|
|
1561
|
-
/** A tool opened something and registered its cleanup. */
|
|
1562
|
-
export type ToolsSessionStartedPayload = ToolSessionPayloadBase;
|
|
1563
|
-
/**
|
|
1564
|
-
* A later call reused the session already held under this key.
|
|
1565
|
-
*
|
|
1566
|
-
* This is the payoff being measured: `calls` is how many dispatches have shared
|
|
1567
|
-
* one start-up. It is also the liveness signal the idle sweep and the LRU bound
|
|
1568
|
-
* read, which is why a tool re-registers on every execute rather than only once.
|
|
1569
|
-
*/
|
|
1570
|
-
export interface ToolsSessionReusedPayload extends ToolSessionPayloadBase {
|
|
1571
|
-
/** How many calls have now shared this session, including this one. */
|
|
1572
|
-
readonly calls: number;
|
|
1573
|
-
}
|
|
1574
|
-
/** The cleanup ran. `reason` says which firing site ran it. */
|
|
1575
|
-
export interface ToolsSessionClosedPayload extends ToolSessionPayloadBase {
|
|
1576
|
-
readonly reason: 'call-end' | 'run-end' | 'session-end' | 'shutdown' | 'idle' | 'evicted';
|
|
1577
|
-
/** Wall-clock from registration to close. */
|
|
1578
|
-
readonly durationMs: number;
|
|
1579
|
-
}
|
|
1580
|
-
/**
|
|
1581
|
-
* The cleanup threw, or outran `toolTeardownTimeoutMs`.
|
|
1582
|
-
*
|
|
1583
|
-
* Teardown never throws into the run — but it is never SILENT either, and this
|
|
1584
|
-
* event is the difference. A vendor `Stop` that fails leaves a live sandbox
|
|
1585
|
-
* somebody is still paying for; the run has no way to say so, so this does.
|
|
1586
|
-
* `errorClass` mirrors `credential.failed`'s 9.4.0 addition: routable without
|
|
1587
|
-
* parsing prose (`'ToolTeardownTimeoutError'` for the budget case).
|
|
1588
|
-
*/
|
|
1589
|
-
export interface ToolsSessionCloseFailedPayload extends ToolSessionPayloadBase {
|
|
1590
|
-
readonly reason: 'call-end' | 'run-end' | 'session-end' | 'shutdown' | 'idle' | 'evicted';
|
|
1591
|
-
readonly durationMs: number;
|
|
1592
|
-
readonly error: string;
|
|
1593
|
-
readonly errorClass?: string;
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
* Emitted when LLM-produced tool args fail validation against the tool's
|
|
1597
|
-
* declared `inputSchema` (backlog #9). Fires for BOTH modes that validate:
|
|
1598
|
-
* `enforced: true` means the call was rejected before dispatch and the
|
|
1599
|
-
* model received a structured retry message as the tool result;
|
|
1600
|
-
* `enforced: false` ('warn' mode) means the tool executed anyway.
|
|
1601
|
-
* `issues` name paths, expectations, and received TYPES — never the
|
|
1602
|
-
* supplied values (they can carry PII / injection payloads).
|
|
1603
|
-
*/
|
|
1604
|
-
export interface ValidationArgsInvalidPayload {
|
|
1605
|
-
readonly toolName: string;
|
|
1606
|
-
readonly toolCallId: string;
|
|
1607
|
-
readonly iteration: number;
|
|
1608
|
-
readonly issues: ReadonlyArray<{
|
|
1609
|
-
readonly path: string;
|
|
1610
|
-
readonly expected: string;
|
|
1611
|
-
readonly got: string;
|
|
1612
|
-
/**
|
|
1613
|
-
* A capped excerpt of the offending STRING — present on string-shape
|
|
1614
|
-
* issues (`pattern` / `minLength` / `maxLength`) only, where the
|
|
1615
|
-
* complaint IS the value's shape. Structural issues (type, enum,
|
|
1616
|
-
* required, additionalProperties) still carry no value at all.
|
|
1617
|
-
*/
|
|
1618
|
-
readonly value?: string;
|
|
1619
|
-
/** The parameter's own schema `description`, when it declares one. */
|
|
1620
|
-
readonly hint?: string;
|
|
1621
|
-
}>;
|
|
1622
|
-
readonly enforced: boolean;
|
|
1623
|
-
}
|
|
1624
|
-
/**
|
|
1625
|
-
* The turn-start routing verdict (SG-C) — one per turn on skill-graph agents
|
|
1626
|
-
* whose graph ran the cascade (`classify` configured, or
|
|
1627
|
-
* `continuity: 'conversation'` with something to decide). Fired by the
|
|
1628
|
-
* RouteTurn stage DURING traversal (collect-during-traversal; never rebuilt),
|
|
1629
|
-
* BEFORE iteration 1, so it precedes every `context.evaluated` of its turn.
|
|
1630
|
-
*
|
|
1631
|
-
* The LOSERS are on the record: `scores` ranks every candidate the tier-2
|
|
1632
|
-
* scorer judged (role-hidden skills are excluded before scoring — a hidden
|
|
1633
|
-
* capability is never named, not even to observers of this run); `offered`
|
|
1634
|
-
* names the menu the model was handed; `policy` stamps the exact thresholds
|
|
1635
|
-
* that judged the hop, so no observer has to guess which numbers decided.
|
|
1636
|
-
*/
|
|
1637
|
-
export interface SkillTurnRoutedPayload {
|
|
1638
|
-
/** The tier that decided the turn's start:
|
|
1639
|
-
* `'entry'` — a tier-1 rule (the recorded vocabulary for rule-won starts);
|
|
1640
|
-
* `'intent'` — the tier-2 scorer was decisive;
|
|
1641
|
-
* `'continuity'` — the inherited cursor held (incumbent won / near-tie /
|
|
1642
|
-
* sticky default / the decider picked STAY — `decider` says which);
|
|
1643
|
-
* `'menu'` — a menu was put in-band (near-tie or unmatched);
|
|
1644
|
-
* `'decider'` — the configured tier-3 decider resolved the menu
|
|
1645
|
-
* out-of-band (9.19.0; `decider` carries the pick);
|
|
1646
|
-
* `'none'` — the cascade decided nothing the loop may act on (a rails
|
|
1647
|
-
* menu — the offer is still recorded here — or a dropped resume). */
|
|
1648
|
-
readonly by: 'entry' | 'intent' | 'continuity' | 'menu' | 'decider' | 'none';
|
|
1649
|
-
/** The inherited cursor (continuity), when one existed. */
|
|
1650
|
-
readonly from?: string;
|
|
1651
|
-
/** Where the turn starts. Absent = menu pending / none. */
|
|
1652
|
-
readonly to?: string;
|
|
1653
|
-
/** `IntentScorer.name` / entry-scorer name, when tier 2 ran. */
|
|
1654
|
-
readonly scorer?: string;
|
|
1655
|
-
/** EVERY candidate, ranked best-first — the losers, with the numbers that
|
|
1656
|
-
* lost. `score` is raw (strategy-specific); `relevance` is the
|
|
1657
|
-
* full-softmax share. */
|
|
1658
|
-
readonly scores?: ReadonlyArray<{
|
|
1659
|
-
readonly id: string;
|
|
1660
|
-
readonly score: number;
|
|
1661
|
-
readonly relevance: number;
|
|
1662
|
-
}>;
|
|
1663
|
-
/** The top-vs-2nd PAIRWISE gap actually judged (count-independent — see
|
|
1664
|
-
* routingPolicy.ts; NOT the difference of two `relevance` shares). */
|
|
1665
|
-
readonly runnerUp?: {
|
|
1666
|
-
readonly id: string;
|
|
1667
|
-
readonly gap: number;
|
|
1668
|
-
};
|
|
1669
|
-
/** Whether tier 2 cleared the margin + floor. */
|
|
1670
|
-
readonly decisive?: boolean;
|
|
1671
|
-
/** WHAT the message said that won tier 1 (9.28.0) — present only on a
|
|
1672
|
-
* `by: 'entry'` verdict a DATA matcher (`match:` — RegExp / `{ keywords }` /
|
|
1673
|
-
* `{ all }`) decided. `text` is the matched substring of the USER message
|
|
1674
|
-
* (never tool or system text), whitespace-collapsed and bounded to 80
|
|
1675
|
-
* characters, ellipsis included; `keyword` names WHICH declared keyword hit
|
|
1676
|
-
* (keywords arm only). Absent for `when` predicates — opaque code the
|
|
1677
|
-
* library cannot quote — and for intent/scorer verdicts, whose evidence is
|
|
1678
|
-
* the `scores` above. */
|
|
1679
|
-
readonly witness?: {
|
|
1680
|
-
readonly text: string;
|
|
1681
|
-
readonly keyword?: string;
|
|
1682
|
-
};
|
|
1683
|
-
/** The tier-3 menu (near-tie cluster, or every entry when unmatched). */
|
|
1684
|
-
readonly offered?: readonly string[];
|
|
1685
|
-
/** STAY was a first-class option in that menu (mid-conversation). */
|
|
1686
|
-
readonly stayOffered?: boolean;
|
|
1687
|
-
/** The thresholds that judged this turn, verbatim. `floor` is the EFFECTIVE
|
|
1688
|
-
* floor (`policy.floor ?? scorer.floor`); absent = no floor, so
|
|
1689
|
-
* `unmatched` was unreachable and near-tie governed. */
|
|
1690
|
-
readonly policy: {
|
|
1691
|
-
readonly nearTieMargin: number;
|
|
1692
|
-
readonly menuSize: number;
|
|
1693
|
-
readonly floor?: number;
|
|
1694
|
-
};
|
|
1695
|
-
/** Prior conversational turns the scorer saw (its declared window). */
|
|
1696
|
-
readonly window?: number;
|
|
1697
|
-
/** A continuity cursor that could not be honored — the stored id is not a
|
|
1698
|
-
* node of the currently mounted graph (a deploy changed it). The turn
|
|
1699
|
-
* started cold instead, and says so. */
|
|
1700
|
-
readonly droppedResume?: {
|
|
1701
|
-
readonly id: string;
|
|
1702
|
-
readonly reason: 'unknown-skill';
|
|
1703
|
-
};
|
|
1704
|
-
/**
|
|
1705
|
-
* The tier-3 DECIDER's involvement (9.19.0) — present whenever one was
|
|
1706
|
-
* configured AND a menu verdict reached it. `picked` is the constrained
|
|
1707
|
-
* pick that resolved the menu (an offered id, or `'stay'`); ABSENT when
|
|
1708
|
-
* the decider declined (`'none'` / parse failure / a throw) and the
|
|
1709
|
-
* in-band envelope stood. Recorded on every outcome so the record always
|
|
1710
|
-
* says the decider was consulted — a resolver that ran and said nothing
|
|
1711
|
-
* is still a fact.
|
|
1712
|
-
*/
|
|
1713
|
-
readonly decider?: {
|
|
1714
|
-
readonly provider: string;
|
|
1715
|
-
readonly model?: string;
|
|
1716
|
-
readonly picked?: string;
|
|
1717
|
-
};
|
|
1718
|
-
}
|
|
1719
|
-
export interface SkillActivatedPayload {
|
|
1720
|
-
readonly skillId: string;
|
|
1721
|
-
readonly reason: 'autoActivate' | 'read_skill_result' | 'manual';
|
|
1722
|
-
readonly injectedTools?: readonly string[];
|
|
1723
|
-
readonly injectedSystemPromptChars?: number;
|
|
1724
|
-
}
|
|
1725
|
-
export interface SkillDeactivatedPayload {
|
|
1726
|
-
readonly skillId: string;
|
|
1727
|
-
readonly reason: string;
|
|
1728
|
-
}
|
|
1729
|
-
/**
|
|
1730
|
-
* Fired by the skill-graph read_skill GATE when the model tries to `read_skill`
|
|
1731
|
-
* a skill that is NOT reachable from the current cursor. The jump is rejected
|
|
1732
|
-
* (cursor/activations unchanged); the model gets a synthetic re-prompt naming
|
|
1733
|
-
* `allowed`. Powers the lens / Why-panel "it tried to leave the graph here".
|
|
1734
|
-
*/
|
|
1735
|
-
/**
|
|
1736
|
-
* Fired when a `read_skill` pick the gate ACCEPTED did not end up active — the
|
|
1737
|
-
* model was told "Skill 'X' activated for the next iteration" and something else
|
|
1738
|
-
* won. There is exactly one way to get here: a declared route edge fired on the
|
|
1739
|
-
* same turn (the model emitted a domain tool AND `read_skill` in one message, and
|
|
1740
|
-
* the tool's result matched the edge). The author's declared edge wins by design
|
|
1741
|
-
* (`D1 > D2`), so the pick is superseded — and reported here rather than silently
|
|
1742
|
-
* dropped. The next iteration shows the model where it actually is.
|
|
1743
|
-
*/
|
|
1744
|
-
export interface SkillRerouteSupersededPayload {
|
|
1745
|
-
/** The skill the model picked with `read_skill` (accepted, then superseded). */
|
|
1746
|
-
readonly volunteeredId: string;
|
|
1747
|
-
/** The skill the declared edge routed to instead (the cursor that won). */
|
|
1748
|
-
readonly wonId?: string;
|
|
1749
|
-
/** The cursor the hop started from. */
|
|
1750
|
-
readonly fromSkillId?: string;
|
|
1751
|
-
/** The ReAct iteration whose evaluation dropped the pick. */
|
|
1752
|
-
readonly iteration: number;
|
|
1753
|
-
/**
|
|
1754
|
-
* WHO volunteered the superseded move (9.19.0). Absent = the model's
|
|
1755
|
-
* `read_skill` pick, exactly as this event has always meant;
|
|
1756
|
-
* `'tool-proposal'` = an accepted `propose-transition` effect that a
|
|
1757
|
-
* same-batch declared edge outran (D1 wins over the proposal exactly as
|
|
1758
|
-
* it wins over a pick — the author's determinism is never overridden).
|
|
1759
|
-
*/
|
|
1760
|
-
readonly source?: 'tool-proposal';
|
|
1761
|
-
}
|
|
1762
|
-
/**
|
|
1763
|
-
* The DECLARED skill map, as the author drew it (9.50.0) — fired ONCE per run,
|
|
1764
|
-
* right after `agent.run_configured`, for every agent whose `.skillGraph()`
|
|
1765
|
-
* mount could state its map. Nodes and edges come from the BUILT graph
|
|
1766
|
-
* (`graph.nodes` / `graph.edges`), never inferred from runtime hops — so a
|
|
1767
|
-
* recording carries the complete authored topology, not the lower bound that
|
|
1768
|
-
* per-hop `routing[]` provenance names (an edge appears there only once it
|
|
1769
|
-
* FIRES). A consumer drawing the graph from a recording no longer has to say
|
|
1770
|
-
* "partial" or ask the caller to pass the built graph in.
|
|
1771
|
-
*
|
|
1772
|
-
* ABSENT (no event) when no graph is mounted, or when a structurally-typed
|
|
1773
|
-
* graph carries no `nodes` — the map is then honestly not on the record,
|
|
1774
|
-
* never guessed.
|
|
1775
|
-
*/
|
|
1776
|
-
export interface SkillGraphDeclaredPayload {
|
|
1777
|
-
/** The drawn nodes: `kind: 'skill'` boxes, plus `'predicate'` diamonds for a
|
|
1778
|
-
* decision `tree()`. `description` is the skill's catalog description,
|
|
1779
|
-
* verbatim (the text the model reads) — absent when the skill declares
|
|
1780
|
-
* none. `label` is the drawn caption (predicate nodes). */
|
|
1781
|
-
readonly nodes: ReadonlyArray<{
|
|
1782
|
-
readonly id: string;
|
|
1783
|
-
/** `'skill' | 'predicate'` (reported verbatim from the graph). */
|
|
1784
|
-
readonly kind: string;
|
|
1785
|
-
readonly description?: string;
|
|
1786
|
-
readonly label?: string;
|
|
1787
|
-
/** The skill's declared plain name for a person (`defineSkill({ title })`)
|
|
1788
|
-
* — "array estate report" for `array-inventory`. Absent when the skill
|
|
1789
|
-
* declares none (the label a graph draws for a skill node is its id, so
|
|
1790
|
-
* a reader wanting a plain name reads this, never `label`). The model
|
|
1791
|
-
* never reads it. */
|
|
1792
|
-
readonly title?: string;
|
|
1793
|
-
}>;
|
|
1794
|
-
/** The author's edges, verbatim. `from: null` is the synthetic START (an
|
|
1795
|
-
* entry edge — the lens's declared-edge consumers filter on
|
|
1796
|
-
* `from !== null`). `kind` is the declared `SkillEdgeKind`
|
|
1797
|
-
* (`'entry' | 'predicate' | 'on-tool-return' | 'on-tool-status' | 'guard'
|
|
1798
|
-
* | 'model'`). `guard` (9.51.0) is the edge's declared DATA guard,
|
|
1799
|
-
* verbatim — conditions in declaration order, all ANDed, the operator
|
|
1800
|
-
* vocabulary mirroring footprintjs's `WhereFilter` — so a recording's
|
|
1801
|
-
* SkillMap shows its guard conditions without anyone re-reading source. */
|
|
1802
|
-
readonly edges: ReadonlyArray<{
|
|
1803
|
-
readonly from: string | null;
|
|
1804
|
-
readonly to: string;
|
|
1805
|
-
readonly kind: string;
|
|
1806
|
-
readonly label?: string;
|
|
1807
|
-
readonly guard?: {
|
|
1808
|
-
readonly conditions: ReadonlyArray<{
|
|
1809
|
-
readonly key: string;
|
|
1810
|
-
readonly op: string;
|
|
1811
|
-
readonly value: SkillGuardValueRecord;
|
|
1812
|
-
}>;
|
|
1813
|
-
};
|
|
1814
|
-
}>;
|
|
1815
|
-
}
|
|
1816
|
-
export interface SkillRejectedPayload {
|
|
1817
|
-
/** The skill id the model requested via `read_skill`. */
|
|
1818
|
-
readonly requestedId: string;
|
|
1819
|
-
/** The cursor it was at (undefined = cold start, before any entry resolved). */
|
|
1820
|
-
readonly currentSkillId?: string;
|
|
1821
|
-
/**
|
|
1822
|
-
* What the model was TOLD it could reach — role-filtered (9.86.0).
|
|
1823
|
-
*
|
|
1824
|
-
* No longer the set the call was bounded to: admission still reads the
|
|
1825
|
-
* graph's raw set, and this is the SPEAKING set, so a skill the caller's
|
|
1826
|
-
* `PermissionChecker` hides never appears here. Empty is therefore two
|
|
1827
|
-
* different facts — nothing was reachable, or nothing reachable may be named
|
|
1828
|
-
* — and a reader that needs them apart wants the run's graph, not this row.
|
|
1829
|
-
*/
|
|
1830
|
-
readonly allowed: readonly string[];
|
|
1831
|
-
/** The ReAct iteration the rejection fired on. */
|
|
1832
|
-
readonly iteration: number;
|
|
1833
|
-
/** Present when a POSTURE, not reachability, refused (SG-C `strictness`):
|
|
1834
|
-
* `'guard'` — the pick was reachable but off the outstanding menu (or no
|
|
1835
|
-
* menu was outstanding); `'rails'` — routing picks are refused outright
|
|
1836
|
-
* (rules/scorer route turn starts; declared routes handle transitions).
|
|
1837
|
-
* Absent = today's reachability refusal, unchanged. */
|
|
1838
|
-
readonly posture?: 'guard' | 'rails';
|
|
1839
|
-
/** WHICH ARM of the gate answered (9.84.0) — optional, so every consumer
|
|
1840
|
-
* written against the older shape keeps working unchanged:
|
|
1841
|
-
*
|
|
1842
|
-
* • `'self-call'` — `requestedId === currentSkillId`. The model asked for
|
|
1843
|
-
* the skill it is already in; the cursor did not move because there was
|
|
1844
|
-
* nowhere to move it, and the tool result is an acknowledgement naming
|
|
1845
|
-
* the tools it can call, not a decline. Consumers that count refusals as
|
|
1846
|
-
* routing failures should read this one as a NAMING failure instead.
|
|
1847
|
-
* • `'unreachable'` — a genuine hop the cursor cannot make.
|
|
1848
|
-
* • `'posture'` — a reachable hop a declared `strictness` declined; pairs
|
|
1849
|
-
* with {@link SkillRejectedPayload.posture}, which names which one.
|
|
1850
|
-
*
|
|
1851
|
-
* Before this, telling a self-call from an unreachable hop meant comparing
|
|
1852
|
-
* `requestedId` against `currentSkillId` and knowing why that mattered. */
|
|
1853
|
-
readonly reason?: 'self-call' | 'unreachable' | 'posture';
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* Fired when two or more tool results of ONE parallel batch matched skill-graph
|
|
1857
|
-
* edges to DIFFERENT targets (9.16.0). The first match in call order wins the
|
|
1858
|
-
* cursor move; every later result matching another target is suppressed — and
|
|
1859
|
-
* reported here so the record explains the hop the run did not take. Before
|
|
1860
|
-
* 9.16.0 there was no conflict to report because there was no batch: only the
|
|
1861
|
-
* LAST call of a batch was consulted, and the earlier calls' routing
|
|
1862
|
-
* implications were silently dropped.
|
|
1863
|
-
*
|
|
1864
|
-
* Not fired for same-target matches (they all asked for the move that
|
|
1865
|
-
* happened), nor for batches where only one result matched. Distinct from
|
|
1866
|
-
* `skill.reroute_superseded`, which reports a declared edge outranking a
|
|
1867
|
-
* `read_skill` pick — this one is edge-vs-edge, inside one batch.
|
|
1868
|
-
*/
|
|
1869
|
-
export interface SkillRouteConflictPayload {
|
|
1870
|
-
/** The ReAct iteration whose evaluation resolved the batch. */
|
|
1871
|
-
readonly iteration: number;
|
|
1872
|
-
/** The cursor the winning hop started from. */
|
|
1873
|
-
readonly fromSkillId?: string;
|
|
1874
|
-
/** The call-order-first match — the one that moved the cursor. */
|
|
1875
|
-
readonly winner: {
|
|
1876
|
-
/** The provider's tool_use id for the winning call, when known. */
|
|
1877
|
-
readonly toolCallId?: string;
|
|
1878
|
-
readonly toolName: string;
|
|
1879
|
-
/** The skill the cursor moved to. */
|
|
1880
|
-
readonly target: string;
|
|
1881
|
-
};
|
|
1882
|
-
/** Later matches to other targets, in call order — the suppressed hops. */
|
|
1883
|
-
readonly losers: ReadonlyArray<{
|
|
1884
|
-
readonly toolCallId?: string;
|
|
1885
|
-
readonly toolName: string;
|
|
1886
|
-
/** The skill this result would have routed to. */
|
|
1887
|
-
readonly target: string;
|
|
1888
|
-
}>;
|
|
1889
|
-
/**
|
|
1890
|
-
* WHAT conflicted (9.19.0). Absent = declared route edges, exactly as
|
|
1891
|
-
* this event has always meant; `'tool-proposal'` = two or more accepted
|
|
1892
|
-
* `propose-transition` effects of one batch named different targets —
|
|
1893
|
-
* first accepted in call order wins, the rest are suppressed and
|
|
1894
|
-
* reported here under the same law.
|
|
1895
|
-
*/
|
|
1896
|
-
readonly source?: 'tool-proposal';
|
|
1897
|
-
}
|
|
1898
|
-
/**
|
|
1899
|
-
* A declared step completed: its tool returned (non-error) while it was
|
|
1900
|
-
* current (9.18.0). Fired at the tool-return boundary, in batch call order —
|
|
1901
|
-
* two adjacent steps naming the same tool advance twice in one batch, each
|
|
1902
|
-
* on the record. A skip is NOT a completion: a `skip_step` that moved the
|
|
1903
|
-
* pointer fires `step_skipped { policy: 'advance' }` alone.
|
|
1904
|
-
*/
|
|
1905
|
-
export interface SkillStepAdvancedPayload {
|
|
1906
|
-
readonly skillId: string;
|
|
1907
|
-
/** The step that just completed (or was skipped past). */
|
|
1908
|
-
readonly step: {
|
|
1909
|
-
readonly index: number;
|
|
1910
|
-
readonly total: number;
|
|
1911
|
-
readonly tool: string;
|
|
1912
|
-
readonly note: string;
|
|
1913
|
-
};
|
|
1914
|
-
readonly iteration: number;
|
|
1915
|
-
/** The provider's tool_use id for the completing call, when known. */
|
|
1916
|
-
readonly toolCallId?: string;
|
|
1917
|
-
/** Present on the LAST step: the procedure finished. */
|
|
1918
|
-
readonly completed?: true;
|
|
1919
|
-
}
|
|
1920
|
-
/**
|
|
1921
|
-
* The model declined a step, with its reason — the integrity condition, not
|
|
1922
|
-
* polish (9.18.0). The framework moved on or held per the skill's declared
|
|
1923
|
-
* `onSkip`; both facts are here. An empty reason never gets this far: the
|
|
1924
|
-
* tool-calls stage answers it with a teaching result and no event.
|
|
1925
|
-
*/
|
|
1926
|
-
export interface SkillStepSkippedPayload {
|
|
1927
|
-
readonly skillId: string;
|
|
1928
|
-
readonly step: SkillStepAdvancedPayload['step'];
|
|
1929
|
-
/** The model's own words. */
|
|
1930
|
-
readonly reason: string;
|
|
1931
|
-
readonly policy: 'advance' | 'hold';
|
|
1932
|
-
readonly iteration: number;
|
|
1933
|
-
readonly toolCallId?: string;
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* The turn is ending with steps unrun (9.18.0). `'nudged'` = the one
|
|
1937
|
-
* teaching re-ask went back (at most once per turn); `'accepted'` = the
|
|
1938
|
-
* model stopped again and the framework honored it — never a forced
|
|
1939
|
-
* continue; `'cut-short'` = a limit (max-iterations / cost-budget) ended
|
|
1940
|
-
* the turn, and a nudge would have spent an iteration the limit refused.
|
|
1941
|
-
*/
|
|
1942
|
-
export interface SkillStepsUnfinishedPayload {
|
|
1943
|
-
readonly skillId: string;
|
|
1944
|
-
readonly remaining: ReadonlyArray<{
|
|
1945
|
-
readonly index: number;
|
|
1946
|
-
readonly tool: string;
|
|
1947
|
-
readonly note: string;
|
|
1948
|
-
}>;
|
|
1949
|
-
readonly total: number;
|
|
1950
|
-
readonly action: 'nudged' | 'accepted' | 'cut-short';
|
|
1951
|
-
readonly iteration: number;
|
|
1952
|
-
}
|
|
1953
|
-
/**
|
|
1954
|
-
* The turn's refusal loop crossed the declared threshold and the rest of the
|
|
1955
|
-
* turn runs on the escalation brain (9.19.0). Fired ONCE per turn, at the
|
|
1956
|
-
* flip, from the gate that counted the refusals — escalation is always on
|
|
1957
|
-
* recorded evidence (`skill.rejected` — reachability, posture or a self-call,
|
|
1958
|
-
* all three refusal arms), never on
|
|
1959
|
-
* vibes. De-escalation is the next turn's seed; no event marks it.
|
|
1960
|
-
*/
|
|
1961
|
-
export interface SkillEscalatedPayload {
|
|
1962
|
-
/** The ReAct iteration whose refusal tripped the threshold. */
|
|
1963
|
-
readonly iteration: number;
|
|
1964
|
-
/** The declared threshold (`escalation.afterRefusals`). */
|
|
1965
|
-
readonly afterRefusals: number;
|
|
1966
|
-
/** The observed refusal count that tripped it (== afterRefusals at the
|
|
1967
|
-
* flip; the counter keeps counting but the event fires once). */
|
|
1968
|
-
readonly refusals: number;
|
|
1969
|
-
/** The brain that WAS serving — resolved by the same precedence chain
|
|
1970
|
-
* callLLM applies (skill brain > configured > default). */
|
|
1971
|
-
readonly from: {
|
|
1972
|
-
readonly provider: string;
|
|
1973
|
-
readonly model: string;
|
|
1974
|
-
};
|
|
1975
|
-
/** The declared escalation brain. `model` absent = it inherits down the
|
|
1976
|
-
* chain (same-provider escalations only; enforced at build). */
|
|
1977
|
-
readonly to: {
|
|
1978
|
-
readonly provider: string;
|
|
1979
|
-
readonly model?: string;
|
|
1980
|
-
};
|
|
1981
|
-
}
|
|
1982
|
-
/**
|
|
1983
|
-
* One typed tool effect was judged (9.19.0) — the effects channel's own
|
|
1984
|
-
* record, fired in batch call order from the stage that judged it.
|
|
1985
|
-
*
|
|
1986
|
-
* • `'accepted'` — a `propose-transition` passed the graph's reachability
|
|
1987
|
-
* law (the cursor moves at the next evaluation unless a same-batch
|
|
1988
|
-
* declared edge wins — that suppression is `skill.reroute_superseded
|
|
1989
|
-
* { source: 'tool-proposal' }`), or a `require-instruction` named a
|
|
1990
|
-
* registered instruction and its lease was granted.
|
|
1991
|
-
* • `'refused'` — the teaching refusal: unreachable target, no graph to
|
|
1992
|
-
* route, unknown instruction id, a body whose declared channel cannot
|
|
1993
|
-
* be pushed, or a malformed effect. `refusalReason` says which.
|
|
1994
|
-
* • `'superseded'` — an accepted transition proposal lost the batch to an
|
|
1995
|
-
* EARLIER accepted proposal naming a different target
|
|
1996
|
-
* (`skill.route_conflict { source: 'tool-proposal' }` reports the same
|
|
1997
|
-
* batch once, winner + losers).
|
|
1998
|
-
*
|
|
1999
|
-
* No effects = this event never fires (zero-cost-when-unused).
|
|
2000
|
-
*/
|
|
2001
|
-
export interface ToolEffectPayload {
|
|
2002
|
-
readonly kind: 'propose-transition' | 'require-instruction';
|
|
2003
|
-
readonly outcome: 'accepted' | 'refused' | 'superseded';
|
|
2004
|
-
/**
|
|
2005
|
-
* The accepted `propose-transition` named the skill the cursor was ALREADY
|
|
2006
|
-
* in — a STAY, accepted as a no-op (9.86.0).
|
|
2007
|
-
*
|
|
2008
|
-
* Nothing moved and nothing activated, because the run is already in the
|
|
2009
|
-
* state the proposal asked for; no `pendingToolTransition` was written and
|
|
2010
|
-
* the tool's result carries no refusal suffix. Before this the reachable set
|
|
2011
|
-
* — which filters the cursor out of its own successor set, correctly, for a
|
|
2012
|
-
* MOVE — made a stay look unreachable and the proposal was refused.
|
|
2013
|
-
*
|
|
2014
|
-
* An ADDITIVE optional field rather than a fourth `outcome`: a consumer
|
|
2015
|
-
* switching exhaustively over `outcome` must keep compiling. Read it to tell
|
|
2016
|
-
* a no-op stay from a hop that will actually move the cursor.
|
|
2017
|
-
*
|
|
2018
|
-
* A stay COMPETES for the batch's one transition slot like any other
|
|
2019
|
-
* accepted proposal (9.86.1): judged first, it holds the slot, and a later
|
|
2020
|
-
* sibling proposing a hop is `'superseded'` with the batch's
|
|
2021
|
-
* `skill.route_conflict` naming the stay as the winner; judged after an
|
|
2022
|
-
* accepted hop, the stay is the one superseded. 9.86.0 let a stay through
|
|
2023
|
-
* without claiming the slot, so two `'accepted'` events could land in one
|
|
2024
|
-
* batch while the cursor moved.
|
|
2025
|
-
*/
|
|
2026
|
-
readonly stay?: true;
|
|
2027
|
-
/** The tool whose result carried the effect. */
|
|
2028
|
-
readonly toolName: string;
|
|
2029
|
-
readonly toolCallId?: string;
|
|
2030
|
-
readonly iteration: number;
|
|
2031
|
-
/** propose-transition: the proposed cursor target. */
|
|
2032
|
-
readonly targetSkillId?: string;
|
|
2033
|
-
/** propose-transition: the effect's own declared reason. */
|
|
2034
|
-
readonly reason?: string;
|
|
2035
|
-
/** require-instruction: the registered injection id it pushes. */
|
|
2036
|
-
readonly instructionId?: string;
|
|
2037
|
-
/** require-instruction: the granted (or asked-for) lease. */
|
|
2038
|
-
readonly deliveryLease?: InstructionDeliveryLease;
|
|
2039
|
-
/** outcome `'refused'`: the teaching sentence, verbatim. */
|
|
2040
|
-
readonly refusalReason?: string;
|
|
2041
|
-
/** outcome `'superseded'`: what outran it. */
|
|
2042
|
-
readonly supersededBy?: 'earlier-proposal';
|
|
2043
|
-
}
|
|
2044
|
-
/**
|
|
2045
|
-
* A tool's result was refused for exceeding the tool's own declared
|
|
2046
|
-
* `resultCeiling` (9.20.0) — the record of the size the content channels never
|
|
2047
|
-
* carry. The model read a teaching refusal ("No data was returned", plus how
|
|
2048
|
-
* to narrow); the oversized payload entered NO channel — not history, not
|
|
2049
|
-
* `stream.tool_end`, not this event. The delivered result carries status
|
|
2050
|
-
* `'invalid'`, so `onToolStatus` edges can route the overflow.
|
|
2051
|
-
*
|
|
2052
|
-
* No `resultCeiling` on the tool = this event never fires
|
|
2053
|
-
* (zero-cost-when-unused).
|
|
2054
|
-
*/
|
|
2055
|
-
export interface ToolResultRefusedPayload {
|
|
2056
|
-
readonly toolName: string;
|
|
2057
|
-
readonly toolCallId: string;
|
|
2058
|
-
readonly iteration: number;
|
|
2059
|
-
/** The stringified result's TRUE length — the fact the refusal replaced. */
|
|
2060
|
-
readonly sizeChars: number;
|
|
2061
|
-
/** The tool's declared ceiling it exceeded. */
|
|
2062
|
-
readonly maxChars: number;
|
|
2063
|
-
/** The declared parameter names the refusal suggested narrowing by. */
|
|
2064
|
-
readonly narrowBy?: readonly string[];
|
|
2065
|
-
/** When the refused result was an effects envelope: the status the tool
|
|
2066
|
-
* DECLARED before delivery was refused (its declared effects were still
|
|
2067
|
-
* judged — a proposed transition does not die with an oversized payload). */
|
|
2068
|
-
readonly declaredStatus?: ToolResultStatus;
|
|
2069
|
-
}
|
|
2070
|
-
/**
|
|
2071
|
-
* A tool returned exactly what it returned before, for exactly the same
|
|
2072
|
-
* arguments (9.26.0) — and the model was told so.
|
|
2073
|
-
*
|
|
2074
|
-
* A NOTE was appended to that result; the call ran, the result is unchanged
|
|
2075
|
-
* beside the note, and nothing was refused. Payloads never ride this event:
|
|
2076
|
-
* `argsFingerprint` and `resultFingerprint` are short non-cryptographic
|
|
2077
|
-
* digests, which answer "is this the same?" and nothing else. See
|
|
2078
|
-
* `core/agent/repeatedCall.ts` for why the fingerprints and not the values.
|
|
2079
|
-
*/
|
|
2080
|
-
export interface ToolRepeatedCallPayload {
|
|
2081
|
-
readonly toolName: string;
|
|
2082
|
-
readonly toolCallId: string;
|
|
2083
|
-
readonly iteration: number;
|
|
2084
|
-
/** How many times this exact call+result has landed this turn, including
|
|
2085
|
-
* this one. The note fires on the threshold landing only. */
|
|
2086
|
-
readonly occurrences: number;
|
|
2087
|
-
/** Digest of the arguments — never the arguments. */
|
|
2088
|
-
readonly argsFingerprint: string;
|
|
2089
|
-
/** Digest of the result — never the result. */
|
|
2090
|
-
readonly resultFingerprint: string;
|
|
2091
|
-
/**
|
|
2092
|
-
* Which fingerprint decided the match, when it was not the usual pair
|
|
2093
|
-
* (9.62.0). `'arguments'` means this landing matched on the tool's
|
|
2094
|
-
* arguments ALONE — the tool declared `repeatedWhen: 'arguments'`
|
|
2095
|
-
* (`tools/tools.ts`), so `resultFingerprint` above is still a true digest
|
|
2096
|
-
* of what came back but played no part in deciding this was a repeat.
|
|
2097
|
-
*
|
|
2098
|
-
* Additive and default-omitted: every event this library emitted before
|
|
2099
|
-
* 9.62.0, and every event for a tool that has not opted in, carries no
|
|
2100
|
-
* `mode` key at all — not `mode: undefined` written out, the key simply
|
|
2101
|
-
* absent — so an existing payload-key-set assertion anywhere does not see
|
|
2102
|
-
* a new field appear under it.
|
|
2103
|
-
*/
|
|
2104
|
-
readonly mode?: 'arguments';
|
|
2105
|
-
}
|
|
2106
|
-
/**
|
|
2107
|
-
* A tool looked and found nothing, and said so with `absent(…)`.
|
|
2108
|
-
*
|
|
2109
|
-
* The event exists because the RECORD is where "we looked here and there was
|
|
2110
|
-
* nothing" has to survive: read off the answer alone, a clean run and a run
|
|
2111
|
-
* that searched an empty collector look identical. Carries the coverage the
|
|
2112
|
-
* tool declared — never the arguments the model passed, which are the model's
|
|
2113
|
-
* own words about what it wanted, not the tool's about what it covered.
|
|
2114
|
-
*/
|
|
2115
|
-
export interface ToolAbsentPayload {
|
|
2116
|
-
readonly toolName: string;
|
|
2117
|
-
readonly toolCallId: string;
|
|
2118
|
-
readonly iteration: number;
|
|
2119
|
-
/** What the tool says it was looking for (its own prose). */
|
|
2120
|
-
readonly lookedFor?: string;
|
|
2121
|
-
/** Ground the search DID cover. Non-empty by construction — `absent()`
|
|
2122
|
-
* refuses a declaration that names no coverage. */
|
|
2123
|
-
readonly checked: readonly CoverageItemPayload[];
|
|
2124
|
-
/** Ground this search did not reach — the absence proves nothing there. */
|
|
2125
|
-
readonly notChecked?: readonly CoverageItemPayload[];
|
|
2126
|
-
/** Ground no call to this tool can reach. No retry changes it. */
|
|
2127
|
-
readonly cannotCover?: readonly CoverageItemPayload[];
|
|
2128
|
-
/**
|
|
2129
|
-
* Where the tool said to go instead — its `tryInstead` sentence, trimmed as
|
|
2130
|
-
* `absent()` mints it (9.113.0; an envelope minted elsewhere may have
|
|
2131
|
-
* handed the model a padded copy). Prose for the model: never parse a tool
|
|
2132
|
-
* name out of it (a name found inside prose is an inference); read
|
|
2133
|
-
* {@link ToolAbsentPayload.tryInsteadTool}.
|
|
2134
|
-
*
|
|
2135
|
-
* Before 9.113.0 the suggestion was never on this event: it rode only
|
|
2136
|
-
* inside the raw tool result (`agentfootprint.stream.tool_end`'s `result`,
|
|
2137
|
-
* the tool turn in history), where a reader had to recognize the envelope
|
|
2138
|
-
* again to find it.
|
|
2139
|
-
*
|
|
2140
|
-
* Additive and default-omitted: an absence that suggests nothing carries no
|
|
2141
|
-
* `tryInstead` key at all (the `ToolRepeatedCallPayload.mode` precedent).
|
|
2142
|
-
*/
|
|
2143
|
-
readonly tryInstead?: string;
|
|
2144
|
-
/**
|
|
2145
|
-
* The other TOOL the suggestion points at, typed (9.113.0) — the tool's
|
|
2146
|
-
* `tryInsteadTool` as declared, copied. The name is not looked up: the tool
|
|
2147
|
-
* may be served by a provider, or never have been offered on this run.
|
|
2148
|
-
* Default-omitted like {@link ToolAbsentPayload.tryInstead}; either may
|
|
2149
|
-
* come without the other.
|
|
2150
|
-
*/
|
|
2151
|
-
readonly tryInsteadTool?: TryInsteadToolPayload;
|
|
2152
|
-
/**
|
|
2153
|
-
* Where the search looked and when that source was measured, as the tool
|
|
2154
|
-
* declared it (honesty step 7b) — `absent({ …, provenance })`, in the
|
|
2155
|
-
* record's camelCase form. Default-omitted: an absence that declares no
|
|
2156
|
-
* source carries no key, and one whose source the rule set refuses (an
|
|
2157
|
-
* envelope minted elsewhere) carries none either (dev-warned).
|
|
2158
|
-
*/
|
|
2159
|
-
readonly provenance?: ProvenancePayload;
|
|
2160
|
-
/**
|
|
2161
|
-
* What the search's READ covered in time, as the tool declared it (honesty
|
|
2162
|
-
* step 7b) — instants verbatim, camelCase like `lookedFor`. Default-omitted.
|
|
2163
|
-
*/
|
|
2164
|
-
readonly period?: PeriodPayload;
|
|
2165
|
-
/**
|
|
2166
|
-
* What the LIBRARY composed for a tool that declares its `search` — the
|
|
2167
|
-
* facets by reference, the gaps, `complete`. Present only for such a tool;
|
|
2168
|
-
* every other absence carries no key. Composed VALUES ride no event in any
|
|
2169
|
-
* mode: they live on the committed `coverageDeclared` row, under the run's
|
|
2170
|
-
* redaction policy. For a `checked: 'declared'` absence, `checked` above
|
|
2171
|
-
* holds the declaration's constants only (the source, the fixed
|
|
2172
|
-
* qualifiers) and may be empty.
|
|
2173
|
-
*/
|
|
2174
|
-
readonly composition?: CoverageCompositionPayload;
|
|
2175
|
-
/**
|
|
2176
|
-
* In place of `lookedFor` while `.negativeClaims()` is armed — a reference
|
|
2177
|
-
* to the committed row's field. Unarmed, `lookedFor` is today's bytes.
|
|
2178
|
-
*/
|
|
2179
|
-
readonly lookedForRef?: CoverageFieldReference;
|
|
2180
|
-
}
|
|
2181
|
-
/** Where a value an event leaves out lives: the row the result identity addresses. */
|
|
2182
|
-
export interface CoverageFieldReference {
|
|
2183
|
-
/** The row's address — `claim-result/<namespace>/<runId>/<ordinal>`. */
|
|
2184
|
-
readonly resultId: string;
|
|
2185
|
-
readonly field: 'lookedFor';
|
|
2186
|
-
}
|
|
2187
|
-
/**
|
|
2188
|
-
* One composed facet as it rides an event — a REFERENCE, never its value:
|
|
2189
|
-
* `{ resultId, argument }` names the committed row and the argument whose
|
|
2190
|
-
* value lives there.
|
|
2191
|
-
*/
|
|
2192
|
-
export interface CoverageFacetReferencePayload {
|
|
2193
|
-
readonly facet: 'source' | 'subject' | 'population' | 'filter' | 'period' | 'names';
|
|
2194
|
-
readonly from: 'call' | 'default' | 'host' | 'result';
|
|
2195
|
-
readonly ref: {
|
|
2196
|
-
readonly resultId: string;
|
|
2197
|
-
readonly argument?: string;
|
|
2198
|
-
};
|
|
2199
|
-
/** Omission narrowed nothing (`whenOmitted: { any: true }`) — no value to keep out. */
|
|
2200
|
-
readonly any?: true;
|
|
2201
|
-
}
|
|
2202
|
-
/** One typed gap as it rides an event — the words name arguments and verdicts, never a value. */
|
|
2203
|
-
export interface CoverageGapPayload {
|
|
2204
|
-
readonly kind: 'argument-unsent' | 'cap-reached' | 'paged' | 'period' | 'partial' | 'credential-limited' | 'match' | 'ranking' | 'scope' | 'prose';
|
|
2205
|
-
readonly what: string;
|
|
2206
|
-
readonly why?: string;
|
|
2207
|
-
readonly bears?: 'source' | 'population' | 'period' | 'completeness' | {
|
|
2208
|
-
readonly filter: string;
|
|
2209
|
-
readonly values?: readonly (string | number | boolean)[];
|
|
2210
|
-
};
|
|
2211
|
-
readonly argument?: string;
|
|
2212
|
-
}
|
|
2213
|
-
/** What the library composed for one call of a `search` tool, as an event carries it. */
|
|
2214
|
-
export interface CoverageCompositionPayload {
|
|
2215
|
-
/** `'remote'` — a declaration over MCP or from a ToolProvider; it establishes nothing. */
|
|
2216
|
-
readonly origin: 'local' | 'remote';
|
|
2217
|
-
/** The committed row's address. */
|
|
2218
|
-
readonly resultId: string;
|
|
2219
|
-
readonly complete: boolean;
|
|
2220
|
-
/** Each facet that came from the call, a default, the host or the result — by reference. */
|
|
2221
|
-
readonly facets: readonly CoverageFacetReferencePayload[];
|
|
2222
|
-
readonly gaps: readonly CoverageGapPayload[];
|
|
2223
|
-
}
|
|
2224
|
-
/** An absence's source and time as it rides an event — detached plain data. */
|
|
2225
|
-
export interface ProvenancePayload {
|
|
2226
|
-
readonly measuredAt: string;
|
|
2227
|
-
readonly source: string;
|
|
2228
|
-
readonly ageSeconds?: number;
|
|
2229
|
-
readonly sourceExportDate?: string;
|
|
2230
|
-
}
|
|
2231
|
-
/**
|
|
2232
|
-
* A declared period as it rides an event (honesty step 7b) — detached plain
|
|
2233
|
-
* data, the instants the tool declared, never parsed or reformatted.
|
|
2234
|
-
*/
|
|
2235
|
-
export interface PeriodPayload {
|
|
2236
|
-
readonly queried: {
|
|
2237
|
-
readonly from: string;
|
|
2238
|
-
readonly to: string;
|
|
2239
|
-
};
|
|
2240
|
-
/** What the store holds, or `'unknown'` — the tool said it cannot vouch for it. */
|
|
2241
|
-
readonly held: {
|
|
2242
|
-
readonly from: string;
|
|
2243
|
-
readonly to: string;
|
|
2244
|
-
} | 'unknown';
|
|
2245
|
-
readonly readAt?: string;
|
|
2246
|
-
}
|
|
2247
|
-
/** A suggestion to try another tool, as it rides an event: detached plain
|
|
2248
|
-
* data, copied out of the tool's own declaration. */
|
|
2249
|
-
export interface TryInsteadToolPayload {
|
|
2250
|
-
readonly tool: string;
|
|
2251
|
-
readonly why?: string;
|
|
2252
|
-
}
|
|
2253
|
-
/**
|
|
2254
|
-
* A tool returned a verdict WITH its own boundary — `coverage(result, …)`.
|
|
2255
|
-
*
|
|
2256
|
-
* The sibling of the evidence gate on the record: the gate's events say which
|
|
2257
|
-
* VALUES an answer could not support, this one says which LIMITS it did not
|
|
2258
|
-
* state. Fires per declaring call, whatever `.limitsTravelWithTheAnswer()`
|
|
2259
|
-
* is set to — the recording half is unconditional, only the appending half is
|
|
2260
|
-
* opt-in.
|
|
2261
|
-
*/
|
|
2262
|
-
/**
|
|
2263
|
-
* A code-runner tool ran a program the model wrote.
|
|
2264
|
-
*
|
|
2265
|
-
* **The code itself is deliberately NOT here.** Generated code quotes the data
|
|
2266
|
-
* it was given — a row, a serial, an address — so shipping it to every attached
|
|
2267
|
-
* exporter would put customer data on a wire nobody audited for it. This is the
|
|
2268
|
-
* same rule the session events already follow with `keyHash`, never the key.
|
|
2269
|
-
*
|
|
2270
|
-
* What travels instead is `shapeHash`: the program with its string literals,
|
|
2271
|
-
* numbers and identifier names stripped, leaving the CALL SHAPE — which
|
|
2272
|
-
* operations, in what order. Two runs that compute the same thing over
|
|
2273
|
-
* different data share a shape hash, which is exactly the grouping that makes
|
|
2274
|
-
* this useful: rank the shapes by how often they recur and the top of that list
|
|
2275
|
-
* is a backlog of tools somebody keeps having to write by hand.
|
|
2276
|
-
*/
|
|
2277
|
-
export interface ToolsCodeRunPayload {
|
|
2278
|
-
/** The name the model CALLED the code runner by, since an app may mount
|
|
2279
|
-
* more than one — the registered name, which differs from the runner's
|
|
2280
|
-
* own option name when a runner is re-exposed under another schema name. */
|
|
2281
|
-
readonly tool: string;
|
|
2282
|
-
/** The language the runner was configured for. */
|
|
2283
|
-
readonly language: string;
|
|
2284
|
-
/** How many declared artifact inputs were staged as files for this run. */
|
|
2285
|
-
readonly stagedInputs: number;
|
|
2286
|
-
/** Characters of stdout returned, AFTER the runner's cap. */
|
|
2287
|
-
readonly outputChars: number;
|
|
2288
|
-
/** True when the output hit `maxOutputChars` and was cut. */
|
|
2289
|
-
readonly truncated: boolean;
|
|
2290
|
-
/**
|
|
2291
|
-
* Whether the program ran to completion, as the code runner REPORTED it.
|
|
2292
|
-
* ABSENT when the runner reported neither an exit status nor an error —
|
|
2293
|
-
* the outcome is unknown, and an absent `ok` is never success. A `false`
|
|
2294
|
-
* is told apart by the three fields below.
|
|
2295
|
-
*/
|
|
2296
|
-
readonly ok?: boolean;
|
|
2297
|
-
/** The program's exit status — exactly when the code runner reported one;
|
|
2298
|
-
* never inferred, never defaulted. */
|
|
2299
|
-
readonly exitCode?: number;
|
|
2300
|
-
/** `true`: the code runner flagged an error and reported no exit status, so
|
|
2301
|
-
* whether the code ran is NOT confirmed — not a failed program. */
|
|
2302
|
-
readonly serviceError?: true;
|
|
2303
|
-
/** The signal that ended the process before it exited, when the code runner
|
|
2304
|
-
* knows it (`'SIGKILL'`): no exit status exists, and none is recorded. */
|
|
2305
|
-
readonly terminatedBy?: string;
|
|
2306
|
-
/** A stable hash of the normalized call shape. Never the code. */
|
|
2307
|
-
readonly shapeHash: string;
|
|
2308
|
-
}
|
|
2309
|
-
/**
|
|
2310
|
-
* One use of an `mcpClientPool` in a run — a listing (`at: 'list'`, filed by the
|
|
2311
|
-
* tools slot after `list(ctx)`) or a tool call (`at: 'call'`, filed by the
|
|
2312
|
-
* dispatch loop for that call). Ids, digests, evidence and outcomes only: never
|
|
2313
|
-
* an identity value, a remote session id or handle, a header value, an
|
|
2314
|
-
* argument, a result, a definition or a server's error text. Rides the
|
|
2315
|
-
* `agentfootprint.tools.` prefix: a new domain would need a new bridge and
|
|
2316
|
-
* wildcard (see the `tools.session_*` note above).
|
|
2317
|
-
*/
|
|
2318
|
-
export interface ToolsMcpClientPayload {
|
|
2319
|
-
/** The pool's name, which `Tool.source` also carries. */
|
|
2320
|
-
readonly server: string;
|
|
2321
|
-
readonly at: 'list' | 'call';
|
|
2322
|
-
/** At `'call'`. */
|
|
2323
|
-
readonly toolCallId?: string;
|
|
2324
|
-
/**
|
|
2325
|
-
* The tool-session digest of the conversation's key (`hashSessionKey`):
|
|
2326
|
-
* enough to join two rows, not enough to name anyone. Absent when the caller
|
|
2327
|
-
* named no identity, so there was no key.
|
|
2328
|
-
*/
|
|
2329
|
-
readonly keyHash?: string;
|
|
2330
|
-
/** The pool's own random id for the client touched; absent when none was. */
|
|
2331
|
-
readonly clientId?: string;
|
|
2332
|
-
/** 1 = the key's first client, 2 = its first replacement, … */
|
|
2333
|
-
readonly generation?: number;
|
|
2334
|
-
/** What happened to the conversation's client. */
|
|
2335
|
-
readonly client: 'opened' | 'joined' | 'reused' | 'not-needed' | 'refused' | 'expired' | 'handle-lost';
|
|
2336
|
-
/** Why the key's previous client left, when this use opened its replacement. */
|
|
2337
|
-
readonly previous?: 'idle' | 'evicted' | 'expired' | 'handle-lost' | 'terminated';
|
|
2338
|
-
/** With `'expired'` or `'handle-lost'`: what proves it. */
|
|
2339
|
-
readonly evidence?: 'server-404' | 'transport-forgot-handle';
|
|
2340
|
-
readonly refusal?: 'pool-full' | 'principal-full' | 'ending-full' | 'init-timeout' | 'init-failed' | 'no-identity' | 'incomplete-identity' | 'identity-mismatch' | 'stale-tools' | 'binding-changed' | 'request-unmatched' | 'lease-expired' | 'operations-full' | 'closed';
|
|
2341
|
-
/** Opened or joined: how long the open took. */
|
|
2342
|
-
readonly initMs?: number;
|
|
2343
|
-
/** At `'list'`: a shared entry, or the conversation's own client's list. */
|
|
2344
|
-
readonly definitions?: 'shared' | 'listed';
|
|
2345
|
-
/** When shared: the entry's age. */
|
|
2346
|
-
readonly definitionsAgeMs?: number;
|
|
2347
|
-
/** At `'call'`: the call met a replacement client and was checked against its fresh list. */
|
|
2348
|
-
readonly revalidated?: 'kept' | 'refused';
|
|
2349
|
-
}
|
|
2350
|
-
/**
|
|
2351
|
-
* What one attempt of an MCP request came to.
|
|
2352
|
-
*
|
|
2353
|
-
* - `'answered'` — an HTTP response arrived and no retry rule refused it. It
|
|
2354
|
-
* is delivered as it came, WHATEVER its status: a 503 is `answered` with
|
|
2355
|
-
* `status: 503`. A response received is not an operation that succeeded,
|
|
2356
|
-
* so nothing here is called success; read `status`. Nor is it the MCP
|
|
2357
|
-
* call's answer: it records the HTTP exchange. A `202 Accepted`, or a
|
|
2358
|
-
* stream that closes before the call's result, is `answered`, and the
|
|
2359
|
-
* JSON-RPC answer may still never come — the end's `mayHaveRun` says when
|
|
2360
|
-
* the call failed that way.
|
|
2361
|
-
* - `'refused'` — a response the retry policy recognises as a refusal
|
|
2362
|
-
* (`kind`): HTTP 429, or AgentCore Runtime's session-busy reply. It records
|
|
2363
|
-
* the response the server sent, not proof that nothing ran: a 429 says the
|
|
2364
|
-
* request was rate-limited, nothing more (RFC 6585 §4). `effect` says what
|
|
2365
|
-
* is known; `permission` says what allowed asking again.
|
|
2366
|
-
* - `'failed'` — the request threw before an answer arrived (a dropped
|
|
2367
|
-
* connection, a DNS failure). The server may have run it, so it is asked
|
|
2368
|
-
* again only when the app declared that for this tool (`replay`).
|
|
2369
|
-
* - `'timed-out'` — the call's deadline (`maxElapsedMs`) cut the request
|
|
2370
|
-
* while it was in flight.
|
|
2371
|
-
* - `'cut'` — the call was cancelled while the request was in flight: the
|
|
2372
|
-
* run's or the client's signal, the MCP SDK giving it up (its own timeout),
|
|
2373
|
-
* or the call settling first. The request WAS sent; the server may already
|
|
2374
|
-
* have received it and run it. A cut is never a "not run".
|
|
2375
|
-
*
|
|
2376
|
-
* The last three never had a response, so they carry `remote: 'unknown'`.
|
|
2377
|
-
*
|
|
2378
|
-
* Every request the series sent is a row, or is counted in `omitted`: the rows
|
|
2379
|
-
* and `omitted` together are the requests the series sent. A request that was
|
|
2380
|
-
* never sent — the next attempt after a cancelled wait, or anything after a
|
|
2381
|
-
* signal that was already aborted — has no row.
|
|
2382
|
-
*/
|
|
2383
|
-
export type ToolRequestAttemptOutcome = 'answered' | 'refused' | 'failed' | 'timed-out' | 'cut';
|
|
2384
|
-
/**
|
|
2385
|
-
* How an MCP request ended: its last attempt's outcome — or `'cancelled'`, when
|
|
2386
|
-
* the call was cancelled with NO request in flight: while it waited to ask
|
|
2387
|
-
* again, or before its first request. Nothing more was sent; every request
|
|
2388
|
-
* that was sent has its own row and its own outcome.
|
|
2389
|
-
*/
|
|
2390
|
-
export type ToolRequestOutcome = ToolRequestAttemptOutcome | 'cancelled';
|
|
2391
|
-
/**
|
|
2392
|
-
* Whether the server received and ran a request, when that is not known: the
|
|
2393
|
-
* attempt ended without a response (`failed`, `timed-out`, `cut`), so the
|
|
2394
|
-
* request may have reached the server and run there, or not. The library never
|
|
2395
|
-
* records such a request as not run.
|
|
2396
|
-
*/
|
|
2397
|
-
export type ToolRequestRemote = 'unknown';
|
|
2398
|
-
/**
|
|
2399
|
-
* Why the request went on after an attempt, or ended with it.
|
|
2400
|
-
*
|
|
2401
|
-
* - `'retryable'` — another attempt follows after `waitMs`; `permission`
|
|
2402
|
-
* says what allowed it. The only reason that is not an end.
|
|
2403
|
-
* - `'answered'` — answered; the response is delivered.
|
|
2404
|
-
* - `'exhausted'` — the request has made every attempt it may.
|
|
2405
|
-
* - `'wait-limit'` — the wait would pass the call's total waiting budget
|
|
2406
|
-
* (`maxWaitMs`). A stated `Retry-After` is never shortened to fit: the
|
|
2407
|
-
* refusal is delivered instead.
|
|
2408
|
-
* - `'no-time-left'` — the wait would pass the call's deadline; or the
|
|
2409
|
-
* deadline cut a request or a wait.
|
|
2410
|
-
* - `'not-replayable'` — the request's body cannot be sent twice.
|
|
2411
|
-
* - `'not-retryable'` — the attempt failed without an answer, and nothing
|
|
2412
|
-
* permits asking again after that failure: the app declared no repeat of
|
|
2413
|
-
* this tool on it (`replay`), or it is not a kind the series repeats.
|
|
2414
|
-
* - `'not-permitted'` — refused with a 429, and the policy in force does not
|
|
2415
|
-
* permit asking this tool again on it. Under `'app-authorized'`, only the
|
|
2416
|
-
* app's declaration does: a generic 429 does not prove the server ran
|
|
2417
|
-
* nothing.
|
|
2418
|
-
* - `'changes-without-key'` — the app declared this tool as making changes,
|
|
2419
|
-
* and the call carries no key the server is declared to deduplicate by. It
|
|
2420
|
-
* is never asked again automatically, under any policy.
|
|
2421
|
-
* - `'cancelled'` — the caller's signal ended the request.
|
|
2422
|
-
*/
|
|
2423
|
-
export type ToolRequestReason = 'retryable' | 'answered' | 'exhausted' | 'wait-limit' | 'no-time-left' | 'not-replayable' | 'not-retryable' | 'not-permitted' | 'changes-without-key' | 'cancelled';
|
|
2424
|
-
/** The refusals a retry rule recognises: HTTP 429, and AgentCore Runtime's session-busy reply. */
|
|
2425
|
-
export type ToolRequestRefusalKind = 'throttle' | 'session-busy';
|
|
2426
|
-
/**
|
|
2427
|
-
* What is known about whether an attempt took effect on the server —
|
|
2428
|
-
* footprintjs's effect law (`AttemptEffect`), read for an MCP request:
|
|
2429
|
-
*
|
|
2430
|
-
* - `'none'` — it ran nothing, and that is established: the request was
|
|
2431
|
-
* never sent (an `end` whose `attempts` is `0`). No reply establishes it.
|
|
2432
|
-
* A 429 says the request was rate-limited, and AgentCore's session-busy
|
|
2433
|
-
* body is matched by its code and words — a server behind the runtime can
|
|
2434
|
-
* answer with the same error after it ran the call.
|
|
2435
|
-
* - `'unknown'` — anything sent that did not complete: a 429, a session-busy
|
|
2436
|
-
* reply, a lost connection or a timeout after the request was sent, a cut,
|
|
2437
|
-
* a 5xx, a JSON-RPC error, a tool error (one can follow a write that
|
|
2438
|
-
* succeeded).
|
|
2439
|
-
* - `'applied'` — the call completed: the server answered it, and not with
|
|
2440
|
-
* an error. It is never proof that anything was written.
|
|
2441
|
-
*/
|
|
2442
|
-
export type ToolRequestEffect = 'none' | 'unknown' | 'applied';
|
|
2443
|
-
/** The failure kinds the app may declare a tool repeatable on (`replay.tools[name].on`). */
|
|
2444
|
-
export type ToolRequestReplayKind = 'throttle' | 'network';
|
|
2445
|
-
/**
|
|
2446
|
-
* What allowed the next attempt — present exactly when `reason` is
|
|
2447
|
-
* `'retryable'`. Permission and effect are separate facts: neither is ever
|
|
2448
|
-
* read from the other.
|
|
2449
|
-
*
|
|
2450
|
-
* - `by: 'declaration'` — the app's entry for this tool names the failure
|
|
2451
|
-
* kind (`on`).
|
|
2452
|
-
* - `by: 'adapter'` — the adapter the app chose retries this refusal as its
|
|
2453
|
-
* own policy: AgentCore Runtime's session-busy reply, which AWS documents
|
|
2454
|
-
* as a retryable conflict while a session starts or stops. It says what
|
|
2455
|
-
* it assumes in doing so (`assumes`).
|
|
2456
|
-
* - `by: 'compatibility'` — the compatibility policy, today's default: it
|
|
2457
|
-
* repeats a 429 for every tool, and says what it assumes in doing so
|
|
2458
|
-
* (`assumes`).
|
|
2459
|
-
*
|
|
2460
|
-
* An assumption is a policy, never evidence: the row's `effect` stays
|
|
2461
|
-
* `'unknown'`.
|
|
2462
|
-
*/
|
|
2463
|
-
export interface ToolRequestPermission {
|
|
2464
|
-
readonly by: 'declaration' | 'adapter' | 'compatibility';
|
|
2465
|
-
/** `declaration` only — the failure kind the app's entry names. */
|
|
2466
|
-
readonly on?: ToolRequestReplayKind;
|
|
2467
|
-
/** `adapter` and `compatibility` only — what the policy assumes of the refusal it repeats. */
|
|
2468
|
-
readonly assumes?: 'refused-before-execution';
|
|
2469
|
-
/**
|
|
2470
|
-
* The app declared this tool as making changes, so it was asked again only
|
|
2471
|
-
* because the server is declared to deduplicate by a key this call carries.
|
|
2472
|
-
* The key protects only if the server uses it.
|
|
2473
|
-
*/
|
|
2474
|
-
readonly deduplicated?: true;
|
|
2475
|
-
}
|
|
2476
|
-
/**
|
|
2477
|
-
* footprintjs's failure categories (`AttemptCategory`) — the one fixed set
|
|
2478
|
-
* every attempt record uses, so a saved request groups with every other.
|
|
2479
|
-
*/
|
|
2480
|
-
export type ToolRequestFailureCategory = 'timeout' | 'rate-limited' | 'server' | 'network' | 'auth' | 'permanent' | 'unknown';
|
|
2481
|
-
/**
|
|
2482
|
-
* A failure as the record keeps it: a fixed sentence and a code. The thrown
|
|
2483
|
-
* error's own message, name and fields are NEVER kept — a network or SDK
|
|
2484
|
-
* error's text can carry a URL with a token in it, a host's internal name or
|
|
2485
|
-
* a server's reply, and none of that is the library's to store.
|
|
2486
|
-
*/
|
|
2487
|
-
export interface ToolRequestError {
|
|
2488
|
-
readonly message: 'The request failed before an answer arrived. Its error is not kept.' | 'The call ran out of time before an answer arrived.';
|
|
2489
|
-
/** The failure's category — the same word as `failure`. */
|
|
2490
|
-
readonly code: ToolRequestFailureCategory;
|
|
2491
|
-
}
|
|
2492
|
-
/** One attempt of an MCP request, as its retry series recorded it. */
|
|
2493
|
-
export interface ToolRequestAttempt {
|
|
2494
|
-
/** 1-based. */
|
|
2495
|
-
readonly attempt: number;
|
|
2496
|
-
readonly outcome: ToolRequestAttemptOutcome;
|
|
2497
|
-
readonly reason: ToolRequestReason;
|
|
2498
|
-
/** The response's HTTP status — present when one arrived (`answered`, `refused`). */
|
|
2499
|
-
readonly status?: number;
|
|
2500
|
-
/** Which refusal a retry rule recognised — `refused` only. */
|
|
2501
|
-
readonly kind?: ToolRequestRefusalKind;
|
|
2502
|
-
/**
|
|
2503
|
-
* The failure's category (footprintjs's `AttemptCategory`) — absent for
|
|
2504
|
-
* `answered`. Named `failure`, not `category`: that key belongs to a retired
|
|
2505
|
-
* contract the redaction rule no longer treats as the library's own.
|
|
2506
|
-
*/
|
|
2507
|
-
readonly failure?: ToolRequestFailureCategory;
|
|
2508
|
-
/** The wait before the next attempt, in ms — present exactly when `reason` is `'retryable'`. */
|
|
2509
|
-
readonly waitMs?: number;
|
|
2510
|
-
/**
|
|
2511
|
-
* The wait the server stated in `Retry-After`, in ms — when it stated one.
|
|
2512
|
-
* Absent beside a `waitMs` means that wait was the library's own backoff.
|
|
2513
|
-
*/
|
|
2514
|
-
readonly retryAfterMs?: number;
|
|
2515
|
-
/** `failed` and `timed-out` only. */
|
|
2516
|
-
readonly error?: ToolRequestError;
|
|
2517
|
-
/**
|
|
2518
|
-
* `'unknown'` when the attempt ended without a response (`failed`,
|
|
2519
|
-
* `timed-out`, `cut`): it was sent, and whether the server received and ran
|
|
2520
|
-
* it is not known. Absent when a response arrived: the record keeps what the
|
|
2521
|
-
* server answered (`status`) — for a `refused` attempt that is the server's
|
|
2522
|
-
* own refusal, not proof that nothing ran.
|
|
2523
|
-
*/
|
|
2524
|
-
readonly remote?: ToolRequestRemote;
|
|
2525
|
-
/**
|
|
2526
|
-
* What is known about whether this attempt took effect (see
|
|
2527
|
-
* {@link ToolRequestEffect}). On every attempt the library files.
|
|
2528
|
-
*/
|
|
2529
|
-
readonly effect?: ToolRequestEffect;
|
|
2530
|
-
/** What allowed the next attempt — present exactly when `reason` is `'retryable'`. */
|
|
2531
|
-
readonly permission?: ToolRequestPermission;
|
|
2532
|
-
/** How long the attempt took, in ms, from sending to its end. On every attempt the library files. */
|
|
2533
|
-
readonly durationMs?: number;
|
|
2534
|
-
}
|
|
2535
|
-
/** How an MCP request ended. */
|
|
2536
|
-
export interface ToolRequestEnd {
|
|
2537
|
-
readonly outcome: ToolRequestOutcome;
|
|
2538
|
-
readonly reason: ToolRequestReason;
|
|
2539
|
-
/** The delivered response's HTTP status — `answered` and `refused`. */
|
|
2540
|
-
readonly status?: number;
|
|
2541
|
-
/** The refusal that was delivered — `refused` only. */
|
|
2542
|
-
readonly kind?: ToolRequestRefusalKind;
|
|
2543
|
-
/** The failure's category, as on an attempt. */
|
|
2544
|
-
readonly failure?: ToolRequestFailureCategory;
|
|
2545
|
-
/**
|
|
2546
|
-
* Present when the request was CUT, and says what it was doing then.
|
|
2547
|
-
* `'request'` — its LAST attempt was in flight (`cut`, `timed-out`): that
|
|
2548
|
-
* attempt was sent and is the last row, or, past 100 attempts, the last one
|
|
2549
|
-
* counted in `omitted`; whether the server ran it is unknown. `'wait'` — it
|
|
2550
|
-
* was waiting to ask again, so no request was in flight and the next one was
|
|
2551
|
-
* never sent: a cancellation cut the wait (`cancelled`), or the deadline left
|
|
2552
|
-
* no time to finish it and the last refusal was delivered (`refused`,
|
|
2553
|
-
* `no-time-left`). Absent when nothing was cut — and when the request was
|
|
2554
|
-
* cancelled before its first attempt, so that nothing was sent.
|
|
2555
|
-
*/
|
|
2556
|
-
readonly during?: 'request' | 'wait';
|
|
2557
|
-
/** `failed` and `timed-out` only. */
|
|
2558
|
-
readonly error?: ToolRequestError;
|
|
2559
|
-
/**
|
|
2560
|
-
* `'unknown'` when the request ended on an attempt with no response
|
|
2561
|
-
* (`failed`, `timed-out`, `cut`): whether the server ran that request is not
|
|
2562
|
-
* known.
|
|
2563
|
-
*/
|
|
2564
|
-
readonly remote?: ToolRequestRemote;
|
|
2565
|
-
/**
|
|
2566
|
-
* How many requests the series sent: `attempts.length + omitted`. On every
|
|
2567
|
-
* end the library files.
|
|
2568
|
-
*/
|
|
2569
|
-
readonly attempts?: number;
|
|
2570
|
-
/**
|
|
2571
|
-
* What is known about the series' effect as a whole. Uncertainty survives:
|
|
2572
|
-
* once any attempt's effect is `'unknown'`, so is the series' — a later
|
|
2573
|
-
* proven refusal does not resolve it, and a later success does not prove the
|
|
2574
|
-
* operation happened only once. `'applied'` only when the call completed and
|
|
2575
|
-
* no attempt's effect is unknown; `'none'` only when every attempt is proven
|
|
2576
|
-
* to have run nothing (or none was sent). On every end the library files.
|
|
2577
|
-
*/
|
|
2578
|
-
readonly effect?: ToolRequestEffect;
|
|
2579
|
-
/**
|
|
2580
|
-
* The call failed as "may have run" (footprintjs's `UnknownEffectError`, its
|
|
2581
|
-
* final error — a later refusal's, or the timeout — as the `cause`): under
|
|
2582
|
-
* the `'app-authorized'` policy, the call genuinely lacked an answer
|
|
2583
|
-
* somewhere and did not complete. Lacking an answer is not an unknown
|
|
2584
|
-
* effect: it is an attempt that got no response at all (`remote:
|
|
2585
|
-
* 'unknown'`), or a request accepted over HTTP (an `answered` 2xx) whose
|
|
2586
|
-
* JSON-RPC answer never came. A received refusal or error IS an answer —
|
|
2587
|
-
* its effect unknown, delivered as the server sent it — so a call whose
|
|
2588
|
-
* every attempt received one has no `mayHaveRun`. Absent under
|
|
2589
|
-
* `'compatibility'`, where the caller sees the error it always did, and
|
|
2590
|
-
* for a call its caller cancelled, which ends with the caller's reason.
|
|
2591
|
-
*/
|
|
2592
|
-
readonly mayHaveRun?: true;
|
|
2593
|
-
}
|
|
2594
|
-
/**
|
|
2595
|
-
* What one MCP request's retry series did: every attempt it made, why it went
|
|
2596
|
-
* on or stopped after each, how long it waited, and how the request ended.
|
|
2597
|
-
*
|
|
2598
|
-
* Filed by `mcpClient`'s retry series for a call the agent dispatched, ONCE per
|
|
2599
|
-
* request, when the call settles — so the last attempt's `effect` can say
|
|
2600
|
-
* whether the call completed — and at the moment of a cancellation, so a
|
|
2601
|
-
* run cancelled during a wait still carries it when it is saved. A call that
|
|
2602
|
-
* settles before its series (the MCP SDK's own timeout, say) cancels the series
|
|
2603
|
-
* there and then, inside the call, so it is never filed after its run, and no
|
|
2604
|
-
* request is sent after it. The framework stamps `toolCallId`, `toolName` and
|
|
2605
|
-
* `iteration` from the dispatch, so two calls, or two runs, sharing one MCP
|
|
2606
|
-
* connection never mix their attempts.
|
|
2607
|
-
*
|
|
2608
|
-
* ALLOW-LISTED, field by field: numbers, the library's own words, the
|
|
2609
|
-
* endpoint label the app declared, or else the endpoint's origin. Never the
|
|
2610
|
-
* URL's path, query or credentials, the call's arguments, the server's answer
|
|
2611
|
-
* or an error's text.
|
|
2612
|
-
*
|
|
2613
|
-
* Only a transport `mcpClient` builds runs a series that files this; with
|
|
2614
|
-
* retry off (`retryOnThrottle: false` on a plain transport) there is no series
|
|
2615
|
-
* and no event.
|
|
2616
|
-
*/
|
|
2617
|
-
export interface ToolsRequestAttemptsPayload {
|
|
2618
|
-
readonly toolCallId: string;
|
|
2619
|
-
readonly toolName: string;
|
|
2620
|
-
readonly iteration: number;
|
|
2621
|
-
/** The `endpointLabel` the app declared for this endpoint, when it declared one. */
|
|
2622
|
-
readonly endpoint?: string;
|
|
2623
|
-
/** Otherwise the endpoint's ORIGIN — scheme, host and port, nothing else. */
|
|
2624
|
-
readonly origin?: string;
|
|
2625
|
-
/**
|
|
2626
|
-
* The attempts, in order — at most 100. Every request the series sent is
|
|
2627
|
-
* here or counted in `omitted`, a cut one included: `attempts.length +
|
|
2628
|
-
* omitted` is the number of requests the series sent. A request it never
|
|
2629
|
-
* sent has no row.
|
|
2630
|
-
*/
|
|
2631
|
-
readonly attempts: readonly ToolRequestAttempt[];
|
|
2632
|
-
/** Attempts made past the first 100, counted and not listed. `0` when every attempt is listed. */
|
|
2633
|
-
readonly omitted: number;
|
|
2634
|
-
readonly end: ToolRequestEnd;
|
|
2635
|
-
}
|
|
2636
|
-
export interface ToolCoverageDeclaredPayload {
|
|
2637
|
-
readonly toolName: string;
|
|
2638
|
-
readonly toolCallId: string;
|
|
2639
|
-
readonly iteration: number;
|
|
2640
|
-
readonly checked?: readonly CoverageItemPayload[];
|
|
2641
|
-
readonly notChecked?: readonly CoverageItemPayload[];
|
|
2642
|
-
readonly cannotCover?: readonly CoverageItemPayload[];
|
|
2643
|
-
/**
|
|
2644
|
-
* What the read behind the value covered in time (honesty step 7b) — a
|
|
2645
|
-
* `coverage()`'s `period`, or a described result's (whose boundary this
|
|
2646
|
-
* event carries). Default-omitted.
|
|
2647
|
-
*/
|
|
2648
|
-
readonly period?: PeriodPayload;
|
|
2649
|
-
/**
|
|
2650
|
-
* What a `coverage()`'s read found still running — its outcome not known
|
|
2651
|
-
* yet — as the tool declared it (a copy). Default-omitted: present only when
|
|
2652
|
-
* the ledger declared a well-formed, non-empty `in_progress`.
|
|
2653
|
-
*/
|
|
2654
|
-
readonly inProgress?: readonly InProgressItemPayload[];
|
|
2655
|
-
/** What the library composed for a `search` tool — see {@link ToolAbsentPayload.composition}. */
|
|
2656
|
-
readonly composition?: CoverageCompositionPayload;
|
|
2657
|
-
}
|
|
2658
|
-
/** One thing a read found still running, as it rides an event: detached plain
|
|
2659
|
-
* data, copied out of the tool's own declaration. */
|
|
2660
|
-
export interface InProgressItemPayload {
|
|
2661
|
-
readonly what: string;
|
|
2662
|
-
readonly why?: string;
|
|
2663
|
-
/** RECORD-ONLY short form — the model was served the envelope without it. */
|
|
2664
|
-
readonly short?: string;
|
|
2665
|
-
/** How many things this entry stands for; absent = one. Served. */
|
|
2666
|
-
readonly count?: number;
|
|
2667
|
-
}
|
|
2668
|
-
/** One piece of declared ground, as it rides an event: detached plain data,
|
|
2669
|
-
* copied out of the tool's own declaration. */
|
|
2670
|
-
export interface CoverageItemPayload {
|
|
2671
|
-
readonly what: string;
|
|
2672
|
-
readonly why?: string;
|
|
2673
|
-
/** The item's short plain form, as the tool declared it — RECORD-ONLY: the
|
|
2674
|
-
* model was served the envelope without it. Absent when not declared (or
|
|
2675
|
-
* declared invalid by an envelope minted outside `absent()` / `coverage()`,
|
|
2676
|
-
* which is read, never repaired). */
|
|
2677
|
-
readonly short?: string;
|
|
2678
|
-
/** What kind of ground the item is (`'existence' | 'scope'`), on
|
|
2679
|
-
* `notChecked` / `cannotCover` only — RECORD-ONLY, like `short`. Absent =
|
|
2680
|
-
* not declared; never inferred from `what`. */
|
|
2681
|
-
readonly kind?: 'existence' | 'scope';
|
|
2682
|
-
}
|
|
2683
|
-
/**
|
|
2684
|
-
* A tool returned a semantic envelope (`describedResult(…)`) — typed
|
|
2685
|
-
* series/facts/edges with the caveats that make them honest (grain,
|
|
2686
|
-
* provenance, coverage) as data.
|
|
2687
|
-
*
|
|
2688
|
-
* The event carries the FULL envelope — render hints, the three-list
|
|
2689
|
-
* coverage detail, the marker, everything — because this is the channel
|
|
2690
|
-
* recordings and UIs read; the MODEL received only the compact
|
|
2691
|
-
* rendering-free projection (`semanticsForModel`). Emitted BEFORE the
|
|
2692
|
-
* result ceiling is measured, so grain and provenance survive to the record
|
|
2693
|
-
* even when the content itself was refused as oversized. Detached plain
|
|
2694
|
-
* data (structuredClone), never a live reference into the tool's own value.
|
|
2695
|
-
*/
|
|
2696
|
-
export interface ToolSemanticsDeclaredPayload {
|
|
2697
|
-
readonly toolName: string;
|
|
2698
|
-
readonly toolCallId: string;
|
|
2699
|
-
readonly iteration: number;
|
|
2700
|
-
readonly semantics: ToolSemantics;
|
|
2701
|
-
}
|
|
2702
|
-
export interface PermissionCheckPayload extends Partial<ToolCallEventIdentity> {
|
|
2703
|
-
/** 9.11.0 — the shared vocabulary, so the event cannot drift from the
|
|
2704
|
-
* request. `'skill_read'` joined it when skill activation became something
|
|
2705
|
-
* a policy can refuse. */
|
|
2706
|
-
readonly capability: PermissionCapability;
|
|
2707
|
-
readonly actor: string;
|
|
2708
|
-
readonly target?: string;
|
|
2709
|
-
readonly result: 'allow' | 'deny' | 'halt' | 'gate_open';
|
|
2710
|
-
readonly policyEngine?: 'opa' | 'cerbos' | 'custom';
|
|
2711
|
-
readonly policyRuleId?: string;
|
|
2712
|
-
readonly rationale?: string;
|
|
2713
|
-
/** v2.12 — telemetry tag carried through from PermissionDecision.reason. */
|
|
2714
|
-
readonly reason?: string;
|
|
2715
|
-
}
|
|
2716
|
-
export interface PermissionGateOpenedPayload {
|
|
2717
|
-
readonly gateId: string;
|
|
2718
|
-
readonly openedBy: string;
|
|
2719
|
-
readonly expiresAt?: number;
|
|
2720
|
-
}
|
|
2721
|
-
/** A tool's declared credential is being resolved before invocation. */
|
|
2722
|
-
export interface CredentialRequestedPayload extends Partial<ToolCallEventIdentity> {
|
|
2723
|
-
readonly service: string;
|
|
2724
|
-
readonly mode?: 'machine' | 'user';
|
|
2725
|
-
}
|
|
2726
|
-
/** A credential was issued. Carries the `kind` only — NEVER the token/secret. */
|
|
2727
|
-
export interface CredentialAcquiredPayload extends Partial<ToolCallEventIdentity> {
|
|
2728
|
-
readonly service: string;
|
|
2729
|
-
readonly kind: string;
|
|
2730
|
-
readonly expiresAt?: number;
|
|
2731
|
-
}
|
|
2732
|
-
/** 3-legged consent is required (the tool is not run until the user authorizes).
|
|
2733
|
-
* Carries `sessionId` for correlation, NOT the authorization URL. */
|
|
2734
|
-
export interface CredentialAuthorizationRequiredPayload extends Partial<ToolCallEventIdentity> {
|
|
2735
|
-
readonly service: string;
|
|
2736
|
-
readonly sessionId: string;
|
|
2737
|
-
}
|
|
2738
|
-
/**
|
|
2739
|
-
* Credential resolution failed — the provider threw, so the tool is not run
|
|
2740
|
-
* (fail-closed: never half-authed).
|
|
2741
|
-
*
|
|
2742
|
-
* **Never carries the credential, the token, or the authorization URL.** See
|
|
2743
|
-
* the security contract on `CredentialProvider`: `reason` is the provider's own
|
|
2744
|
-
* thrown message, so a provider must scrub secrets before throwing.
|
|
2745
|
-
*
|
|
2746
|
-
* `tool` and `errorClass` were added in 9.4.0, for the operator watching a
|
|
2747
|
-
* dashboard rather than reading a transcript. Without the tool name this event
|
|
2748
|
-
* says a service failed but not what stopped working; without the class every
|
|
2749
|
-
* distinct failure is one undifferentiated string. Both are optional because
|
|
2750
|
-
* neither is always knowable: `tool` is absent when the resolution was not made
|
|
2751
|
-
* on a tool's behalf, and `errorClass` is absent when what was thrown was not
|
|
2752
|
-
* an `Error`.
|
|
2753
|
-
*/
|
|
2754
|
-
export interface CredentialFailedPayload extends Partial<ToolCallEventIdentity> {
|
|
2755
|
-
/** The service id the tool declared (or asked for), never the credential. */
|
|
2756
|
-
readonly service: string;
|
|
2757
|
-
/** The provider's thrown message. */
|
|
2758
|
-
readonly reason: string;
|
|
2759
|
-
/** The tool whose call needed it — the thing that actually stopped working. */
|
|
2760
|
-
readonly tool?: string;
|
|
2761
|
-
/** Constructor name of what was thrown (e.g. `'TypeError'`, `'TimeoutError'`)
|
|
2762
|
-
* — the routable half of the failure, so alerts do not have to parse prose. */
|
|
2763
|
-
readonly errorClass?: string;
|
|
2764
|
-
}
|
|
2765
|
-
export interface PermissionGateClosedPayload {
|
|
2766
|
-
readonly gateId: string;
|
|
2767
|
-
readonly reason: string;
|
|
2768
|
-
}
|
|
2769
|
-
/**
|
|
2770
|
-
* Emitted (v2.12) when a `PermissionChecker.check()` returns
|
|
2771
|
-
* `{ result: 'halt', ... }`. Pairs with the typed `PolicyHaltError`
|
|
2772
|
-
* thrown by `Agent.run()` — the event is the OBSERVABILITY signal,
|
|
2773
|
-
* the error is the RUNTIME signal. Both carry the same `reason` for
|
|
2774
|
-
* routing (e.g. `'security:exfiltration'` → PagerDuty).
|
|
2775
|
-
*
|
|
2776
|
-
* Fires AFTER the synthetic tool_result has been written to scope.history
|
|
2777
|
-
* but BEFORE the run terminates, so observability adapters see the
|
|
2778
|
-
* halt while the conversation history is consistent for downstream
|
|
2779
|
-
* audit/replay.
|
|
2780
|
-
*/
|
|
2781
|
-
export interface PermissionHaltPayload extends Partial<ToolCallEventIdentity> {
|
|
2782
|
-
readonly checkerId?: string;
|
|
2783
|
-
readonly target: string;
|
|
2784
|
-
readonly reason: string;
|
|
2785
|
-
readonly tellLLM?: string;
|
|
2786
|
-
readonly iteration: number;
|
|
2787
|
-
readonly sequenceLength: number;
|
|
2788
|
-
}
|
|
2789
|
-
export interface FallbackTriggeredPayload {
|
|
2790
|
-
readonly kind: 'provider' | 'tool' | 'skill';
|
|
2791
|
-
readonly primary: string;
|
|
2792
|
-
readonly fallback: string;
|
|
2793
|
-
readonly reason: string;
|
|
2794
|
-
}
|
|
2795
|
-
export interface CostTickPayload {
|
|
2796
|
-
readonly scope: 'iteration' | 'turn' | 'run';
|
|
2797
|
-
/**
|
|
2798
|
-
* The model this money was spent on — the one `pricingTable.pricePerToken`
|
|
2799
|
-
* was asked about.
|
|
2800
|
-
*
|
|
2801
|
-
* Always present: a tick exists because a priced call happened, and a call
|
|
2802
|
-
* has a model. Without it the event said what was spent and not on what, so
|
|
2803
|
-
* a run that switched models mid-loop (a `'retry-other'` failover, a
|
|
2804
|
-
* summarizer on a cheaper model) produced a bill nothing could break down.
|
|
2805
|
-
*/
|
|
2806
|
-
readonly model: string;
|
|
2807
|
-
/**
|
|
2808
|
-
* The provider that billed it, by `LLMProvider.name` — the other half of
|
|
2809
|
-
* attribution, since one model name can be served by several providers
|
|
2810
|
-
* (Bedrock and Anthropic both answer to a Claude model id, at different
|
|
2811
|
-
* prices).
|
|
2812
|
-
*
|
|
2813
|
-
* Optional for ONE honest reason: a window/compaction strategy reports its
|
|
2814
|
-
* summarizer spend through `WindowStrategyResult.spend`, and the provider is
|
|
2815
|
-
* read from that strategy's `billing` declaration, which the seam leaves
|
|
2816
|
-
* optional. Every shipped strategy declares it. Absent therefore means "the
|
|
2817
|
-
* strategy that billed this did not say", never "the agent's provider".
|
|
2818
|
-
*/
|
|
2819
|
-
readonly provider?: string;
|
|
2820
|
-
readonly tokensInput: number;
|
|
2821
|
-
readonly tokensOutput: number;
|
|
2822
|
-
readonly estimatedUsd: number;
|
|
2823
|
-
readonly cumulative: {
|
|
2824
|
-
readonly tokensInput: number;
|
|
2825
|
-
readonly tokensOutput: number;
|
|
2826
|
-
readonly estimatedUsd: number;
|
|
2827
|
-
};
|
|
2828
|
-
}
|
|
2829
|
-
export interface CostLimitHitPayload {
|
|
2830
|
-
readonly kind: 'max_tokens' | 'max_cost' | 'max_iterations' | 'max_wallclock';
|
|
2831
|
-
readonly limit: number;
|
|
2832
|
-
readonly actual: number;
|
|
2833
|
-
readonly action: 'abort' | 'warn' | 'degrade';
|
|
2834
|
-
}
|
|
2835
|
-
export interface EvalScorePayload {
|
|
2836
|
-
readonly metricId: string;
|
|
2837
|
-
readonly value: number;
|
|
2838
|
-
readonly threshold?: number;
|
|
2839
|
-
readonly target: 'iteration' | 'turn' | 'run' | 'toolCall';
|
|
2840
|
-
/**
|
|
2841
|
-
* What the score is about: the run id (`event.meta.runId`) for `'run'` /
|
|
2842
|
-
* `'turn'`, the iteration index for `'iteration'`, the provider's call id
|
|
2843
|
-
* for `'toolCall'`. A NAME, not a capability: run ids are minted in
|
|
2844
|
-
* sequence and anyone can write one, so a host filing a score from user
|
|
2845
|
-
* input (a feedback button) checks the run is that user's before it emits.
|
|
2846
|
-
* `otelObservability` parents a score to a run only when the score's own
|
|
2847
|
-
* meta places it in that run's session; otherwise it rides a span of its
|
|
2848
|
-
* own that names the ref.
|
|
2849
|
-
*/
|
|
2850
|
-
readonly targetRef: string;
|
|
2851
|
-
readonly evaluator?: 'llm' | 'fn' | 'heuristic';
|
|
2852
|
-
readonly evidence?: Readonly<Record<string, unknown>>;
|
|
2853
|
-
/**
|
|
2854
|
-
* The evaluator's own reading of the score, in a small vocabulary it
|
|
2855
|
-
* documents — `'pass'` / `'fail'`, `'relevant'` / `'not_relevant'`.
|
|
2856
|
-
* Optional and never derived: a `threshold` does not say which
|
|
2857
|
-
* side of it passes, so no label is ever computed from one.
|
|
2858
|
-
* `otelObservability` exports it BY DEFAULT as
|
|
2859
|
-
* `gen_ai.evaluation.score.label` (the spec's "SHOULD have low
|
|
2860
|
-
* cardinality"), so it must be a word from that vocabulary — never a
|
|
2861
|
-
* judge's sentence, which belongs in {@link EvalScorePayload.explanation}.
|
|
2862
|
-
*/
|
|
2863
|
-
readonly label?: string;
|
|
2864
|
-
/**
|
|
2865
|
-
* The evaluator's free-form reason for the score. It is CONTENT —
|
|
2866
|
-
* a judge's reason can quote the answer it graded — so
|
|
2867
|
-
* `otelObservability` exports it (`gen_ai.evaluation.explanation`) only
|
|
2868
|
-
* under `captureContent`.
|
|
2869
|
-
*/
|
|
2870
|
-
readonly explanation?: string;
|
|
2871
|
-
}
|
|
2872
|
-
export interface EvalThresholdCrossedPayload {
|
|
2873
|
-
readonly metricId: string;
|
|
2874
|
-
readonly direction: 'above' | 'below';
|
|
2875
|
-
readonly value: number;
|
|
2876
|
-
readonly threshold: number;
|
|
2877
|
-
readonly actionTaken?: string;
|
|
2878
|
-
}
|
|
2879
|
-
/**
|
|
2880
|
-
* Emitted (v2.13) when the agent's final answer fails the agent's
|
|
2881
|
-
* configured `outputSchema` (the parser passed to
|
|
2882
|
-
* `Agent.create({...}).outputSchema(parser)`).
|
|
2883
|
-
*
|
|
2884
|
-
* Scope: ONLY agent-level final-answer validation. Tool-input validation
|
|
2885
|
-
* (`LLMToolSchema.inputSchema`) is a different concern handled by
|
|
2886
|
-
* provider-side type checks; this event does NOT fire for tool-arg
|
|
2887
|
-
* validation failures.
|
|
2888
|
-
*
|
|
2889
|
-
* Lives in the `agent.*` domain (parallel to `agent.turn_end`) because
|
|
2890
|
-
* final-answer validation is a turn-level concern, not a generic
|
|
2891
|
-
* evaluation metric.
|
|
2892
|
-
*
|
|
2893
|
-
* Pairs with `agentfootprint.error.retried` (when a reliability rule
|
|
2894
|
-
* routes the failure to retry with feedback) or
|
|
2895
|
-
* `agentfootprint.reliability.fail_fast` (when retries are exhausted).
|
|
2896
|
-
*
|
|
2897
|
-
* The event is the OBSERVABILITY signal — it fires on EVERY validation
|
|
2898
|
-
* failure, regardless of whether retries are configured. Use the
|
|
2899
|
-
* `attempt` + `cumulativeRetries` fields to drive operator dashboards
|
|
2900
|
-
* for retry-rate trending (a leading indicator for model drift).
|
|
2901
|
-
*
|
|
2902
|
-
* Fires BEFORE PostDecide rules evaluate, so observability sees the
|
|
2903
|
-
* failure even if a buggy rule routes to fail-fast or swallows it.
|
|
2904
|
-
*/
|
|
2905
|
-
/**
|
|
2906
|
-
* Emitted (7.26) once per failed final answer that the run is about to
|
|
2907
|
-
* ASK AGAIN about, on an agent built with
|
|
2908
|
-
* `.outputSchema(parser, { retries })`.
|
|
2909
|
-
*
|
|
2910
|
-
* Its sibling `agent.output_schema_validation_failed` reports a failure the
|
|
2911
|
-
* reliability gate is handling INSIDE one `call-llm` stage. This one reports
|
|
2912
|
-
* a failure the LOOP is handling: the corrective message named here joins the
|
|
2913
|
-
* conversation, the ReAct loop re-enters, and the next attempt arrives with
|
|
2914
|
-
* its own `stream.llm_start` / `stream.llm_end` bracket and its own
|
|
2915
|
-
* `cost.tick`. Subscribe to it to see how often a model needs a second ask —
|
|
2916
|
-
* a leading indicator of drift, and of a schema that is harder to hit than
|
|
2917
|
-
* its author thinks.
|
|
2918
|
-
*
|
|
2919
|
-
* Fires from the retry branch, after the corrective turn is committed, so a
|
|
2920
|
-
* consumer that reads `snapshot.sharedState.outputAttempts` finds the
|
|
2921
|
-
* matching row (joined by `correctiveMessageHash`) already there.
|
|
2922
|
-
*/
|
|
2923
|
-
/**
|
|
2924
|
-
* The run's answer does NOT satisfy its own `outputSchema` (8.18.0).
|
|
2925
|
-
*
|
|
2926
|
-
* Fires once, from the Route decider, on the run that hands back an answer the
|
|
2927
|
-
* contract rejects — including the default `retries: 0` case, where the first
|
|
2928
|
-
* answer is the only one. It is the event that was missing: `run()` returned
|
|
2929
|
-
* the failing string, `runTyped()` threw at a boundary the caller may not have
|
|
2930
|
-
* used, and nothing in between said a contract had been missed.
|
|
2931
|
-
*
|
|
2932
|
-
* Alert on it. A rise in `stage: 'json-parse'` is a model that stopped
|
|
2933
|
-
* honouring the instruction; a rise in `'schema-validate'` is drift against
|
|
2934
|
-
* the shape; any `brokenBy` at all is one of your own output rules.
|
|
2935
|
-
*/
|
|
2936
|
-
export interface AgentOutputContractUnmetPayload {
|
|
2937
|
-
/** Which half of validation failed. */
|
|
2938
|
-
readonly stage: 'json-parse' | 'schema-validate';
|
|
2939
|
-
/** The validator's own message, verbatim. DATA, not narrative. */
|
|
2940
|
-
readonly error: string;
|
|
2941
|
-
/** Failing field path when the parser exposes one (Zod-style issues). */
|
|
2942
|
-
readonly path?: string;
|
|
2943
|
-
/** Answers judged in this run, the first included. `1` under `retries: 0`. */
|
|
2944
|
-
readonly attempts: number;
|
|
2945
|
-
/** Corrective re-asks the run paid for. `0` under `retries: 0`. */
|
|
2946
|
-
readonly retriesSpent: number;
|
|
2947
|
-
/** True when `.outputFallback()` is configured — a tier `runTyped()` reaches
|
|
2948
|
-
* and `run()` does not. */
|
|
2949
|
-
readonly fallbackConfigured: boolean;
|
|
2950
|
-
/** The ReAct iteration that produced the answer. */
|
|
2951
|
-
readonly iteration: number;
|
|
2952
|
-
/** Present when an `act({ output })` middleware rewrote an answer that had
|
|
2953
|
-
* PASSED into one that fails — the name of that middleware. The run stops
|
|
2954
|
-
* re-asking when this is set: the model's answer was already right. */
|
|
2955
|
-
readonly brokenBy?: string;
|
|
2956
|
-
}
|
|
2957
|
-
export interface AgentOutputSchemaRetryPayload {
|
|
2958
|
-
/** 1-based attempt that just failed. `1` is the first answer. */
|
|
2959
|
-
readonly attempt: number;
|
|
2960
|
-
/** Corrective asks left AFTER this one. `0` means this is the last. */
|
|
2961
|
-
readonly retriesRemaining: number;
|
|
2962
|
-
/** The ReAct iteration the failed answer came from. A retry consumes an
|
|
2963
|
-
* iteration, so the next attempt reports `iteration + 1`. */
|
|
2964
|
-
readonly iteration: number;
|
|
2965
|
-
/** Which half of validation failed — `'json-parse'` (the model emitted
|
|
2966
|
-
* prose) vs `'schema-validate'` (JSON, wrong shape). They trend
|
|
2967
|
-
* differently under model drift. */
|
|
2968
|
-
readonly stage: 'json-parse' | 'schema-validate';
|
|
2969
|
-
/** The validator's own message, verbatim. DATA, not narrative: it is
|
|
2970
|
-
* quoted into the corrective message after an authored frame, and it is
|
|
2971
|
-
* quoted here the same way. */
|
|
2972
|
-
readonly error: string;
|
|
2973
|
-
/** Failing field path when the parser exposes one (Zod-style issues). */
|
|
2974
|
-
readonly path?: string;
|
|
2975
|
-
/** `fnv1a` of the corrective message that went back to the model — the
|
|
2976
|
-
* join to the message in `history` and to the `outputAttempts` row. */
|
|
2977
|
-
readonly correctiveMessageHash: string;
|
|
2978
|
-
}
|
|
2979
|
-
/**
|
|
2980
|
-
* One verdict from the evidence gate (`.namesAndNumbersFromEvidence()`,
|
|
2981
|
-
* 9.35.0) — fired once per would-be-final answer the gate judged, whatever
|
|
2982
|
-
* the posture and whatever the outcome.
|
|
2983
|
-
*
|
|
2984
|
-
* It rides the emit channel rather than a CommitBundle because it is a fact
|
|
2985
|
-
* about ONE attempt, not conversation state; the only thing that reaches the
|
|
2986
|
-
* commit log is the terminal verdict (`unsupportedValues`), which the boundary
|
|
2987
|
-
* needs.
|
|
2988
|
-
*
|
|
2989
|
-
* **What this event does NOT claim:** the check catches values that appear in
|
|
2990
|
-
* no tool result. It cannot see a false statement assembled from real values,
|
|
2991
|
-
* so `action: 'grounded'` means "every name and number was read from
|
|
2992
|
-
* somewhere", never "the answer is true".
|
|
2993
|
-
*/
|
|
2994
|
-
export interface AgentEvidenceCheckedPayload {
|
|
2995
|
-
/** The ReAct iteration that produced the judged answer. */
|
|
2996
|
-
readonly iteration: number;
|
|
2997
|
-
/** The posture in force — `'assist'` records only, `'guard'` may revise
|
|
2998
|
-
* once, `'rails'` may withhold the answer. */
|
|
2999
|
-
readonly posture: 'assist' | 'guard' | 'rails';
|
|
3000
|
-
/** How many distinct values the answer had to ground. `0` means the answer
|
|
3001
|
-
* asserted nothing the extractor treats as data. INCLUDES exempt values —
|
|
3002
|
-
* see {@link lookedUp}. */
|
|
3003
|
-
readonly candidates: number;
|
|
3004
|
-
/**
|
|
3005
|
-
* How many of `candidates` the gate actually looked up in the tool results:
|
|
3006
|
-
* the values found plus the values not found, before `unsupported` is
|
|
3007
|
-
* sliced. The rest were EXEMPT — the person's message, the conversation or
|
|
3008
|
-
* the app's own instructions (recalled memory included) already held them —
|
|
3009
|
-
* and were never looked up. Present on every row from the release that
|
|
3010
|
-
* added it; absent on a recording made before it, which therefore cannot
|
|
3011
|
-
* say how many values were looked up.
|
|
3012
|
-
*/
|
|
3013
|
-
readonly lookedUp?: number;
|
|
3014
|
-
/** The values that appear in no tool result, truncated to a readable list.
|
|
3015
|
-
* Empty when `action` is `'grounded'`. Under `code: 'match'` each says
|
|
3016
|
-
* where it sat: `'code'` when every occurrence was inside a fenced block
|
|
3017
|
-
* that matched no submission, `'prose'` otherwise. */
|
|
3018
|
-
readonly unsupported: readonly {
|
|
3019
|
-
readonly value: string;
|
|
3020
|
-
readonly shape: string;
|
|
3021
|
-
readonly region?: 'prose' | 'code';
|
|
3022
|
-
}[];
|
|
3023
|
-
/**
|
|
3024
|
-
* • `'grounded'` — every value was found; the answer stands.
|
|
3025
|
-
* • `'revision-asked'` — the values went back to the model for one more
|
|
3026
|
-
* turn (emitted by the EvidenceRecheck branch).
|
|
3027
|
-
* • `'flagged'` — the answer ships carrying them, on the record.
|
|
3028
|
-
* • `'refused'` — `'rails'`: the answer was withheld and the
|
|
3029
|
-
* boundary raises `UnsupportedValuesError`.
|
|
3030
|
-
*/
|
|
3031
|
-
readonly action: 'grounded' | 'flagged' | 'revision-asked' | 'refused';
|
|
3032
|
-
/** True when this judgement ran on an answer a revision already corrected —
|
|
3033
|
-
* which is how a reader tells "the revision fixed it" (`grounded`, after
|
|
3034
|
-
* revision) from "it did not" (`flagged`/`refused`, after revision). */
|
|
3035
|
-
readonly afterRevision: boolean;
|
|
3036
|
-
/** Set when the evidence index hit its ceiling and could not hold every
|
|
3037
|
-
* tool result. The gate then records its verdict WITHOUT acting on it —
|
|
3038
|
-
* a partial corpus can call a grounded value fabricated. */
|
|
3039
|
-
readonly evidenceTruncated?: boolean;
|
|
3040
|
-
/**
|
|
3041
|
-
* WHICH RESULTS OF THIS TURN THE ANSWER'S VALUES WERE READ FROM — on the
|
|
3042
|
-
* verdicts about an answer that ships (`'grounded'`, `'flagged'`,
|
|
3043
|
-
* `'refused'`), never on `'revision-asked'` (a draft). One entry per
|
|
3044
|
-
* `role: 'tool'` result of this turn that carried at least one of the
|
|
3045
|
-
* answer's names and numbers: `values` = how many, `only` = how many of
|
|
3046
|
-
* those no other result of this turn carried. A result of this turn that
|
|
3047
|
-
* is NOT listed carried none of them — a fact about tokens, not meaning:
|
|
3048
|
-
* read it as "the answer cites nothing from it", never "unused" (an answer
|
|
3049
|
-
* that states no value can still rest on a result). `[]` is a fact too:
|
|
3050
|
-
* no result of this turn carried any of them (an answer drawn from an
|
|
3051
|
-
* earlier turn, or one that states no value — `lookedUp` tells which).
|
|
3052
|
-
*
|
|
3053
|
-
* ABSENT when the list cannot be whole: the evidence index hit its ceiling,
|
|
3054
|
-
* or one value was carried by more results than the index keeps. Absent on
|
|
3055
|
-
* recordings made before the field existed. Identities and counts only,
|
|
3056
|
-
* never a value (`evidence/answerCarriers.ts`).
|
|
3057
|
-
*/
|
|
3058
|
-
readonly carriedBy?: readonly {
|
|
3059
|
-
readonly toolCallId: string;
|
|
3060
|
-
readonly values: number;
|
|
3061
|
-
readonly only: number;
|
|
3062
|
-
}[];
|
|
3063
|
-
/**
|
|
3064
|
-
* On `action: 'revision-asked'` only, and only when the turn held placed
|
|
3065
|
-
* artifact tickets a served `wants` tool can spend: the refs the
|
|
3066
|
-
* correction NAMED as the route to a grounded number. Absent otherwise —
|
|
3067
|
-
* including for every agent without a `wants`-declaring tool.
|
|
3068
|
-
*/
|
|
3069
|
-
readonly stagedRefs?: readonly {
|
|
3070
|
-
readonly ref: string;
|
|
3071
|
-
readonly kind: string;
|
|
3072
|
-
}[];
|
|
3073
|
-
/** The spender tools the correction named, beside {@link stagedRefs}. */
|
|
3074
|
-
readonly spenderTools?: readonly string[];
|
|
3075
|
-
/**
|
|
3076
|
-
* Under the figures dial (`namesAndNumbersFromEvidence({ figures: true })`),
|
|
3077
|
-
* on `'grounded'`, `'flagged'` and `'refused'`: the numbers no tool result
|
|
3078
|
-
* carried that ARE a declared derivation of the numbers the results carry —
|
|
3079
|
-
* each with its `derivation` (`rounded`, `unit-scale`, `column-sum`,
|
|
3080
|
-
* `column-ratio`, `column-difference`, `complement`) and `from` (the
|
|
3081
|
-
* operands, in the results' own keys). Not read and not invented: the model
|
|
3082
|
-
* computed them. Present (possibly `[]`) exactly when the dial is on, so its
|
|
3083
|
-
* presence says the derivation check ran; the `unsupported` numbers beside
|
|
3084
|
-
* it matched no value AND no derivation. Sliced like `unsupported`.
|
|
3085
|
-
*/
|
|
3086
|
-
readonly computed?: readonly {
|
|
3087
|
-
readonly value: string;
|
|
3088
|
-
readonly shape: string;
|
|
3089
|
-
readonly derivation: string;
|
|
3090
|
-
readonly from: string;
|
|
3091
|
-
}[];
|
|
3092
|
-
/**
|
|
3093
|
-
* Under `.namesAndNumbersFromEvidence({ code: 'match' })`, on a prose
|
|
3094
|
-
* answer: one verdict per fenced block the answer showed — a block equal,
|
|
3095
|
-
* byte for byte after removing only the Markdown wrapper, to a program a
|
|
3096
|
-
* call of THIS turn submitted to a declared code-running tool carries that
|
|
3097
|
-
* call's id, tool and label (`completed`, `outcome-unknown`, …) and was not
|
|
3098
|
-
* read for values; any other block is `unmatched` with a reason and was
|
|
3099
|
-
* read as prose. `earlierTurnRows` counts earlier turns' script rows (never
|
|
3100
|
-
* compared); `regionsDropped` the blocks past the cap. Never the code.
|
|
3101
|
-
*/
|
|
3102
|
-
readonly scripts?: ScriptsVerdict;
|
|
3103
|
-
}
|
|
3104
|
-
/**
|
|
3105
|
-
* The staged-refs nudge fired (`.namesAndNumbersFromEvidence({ nudge: true })`)
|
|
3106
|
-
* — one per iteration whose request gained the late line naming staged
|
|
3107
|
-
* artifact refs and the `wants` tool that spends them.
|
|
3108
|
-
*
|
|
3109
|
-
* The line itself is request-only (never history), so this event is the ONE
|
|
3110
|
-
* record that it existed: which refs, which spenders, which iteration. A run
|
|
3111
|
-
* where the nudge never armed emits none of these.
|
|
3112
|
-
*/
|
|
3113
|
-
export interface AgentGroundingNudgedPayload {
|
|
3114
|
-
/** The ReAct iteration whose request carried the line. */
|
|
3115
|
-
readonly iteration: number;
|
|
3116
|
-
/** The staged refs the line named — `ref` verbatim, `kind` as minted
|
|
3117
|
-
* (`Tool.resultKind` / `tool-result/<toolName>`). Capped; see
|
|
3118
|
-
* {@link refsOmitted}. */
|
|
3119
|
-
readonly refs: readonly {
|
|
3120
|
-
readonly ref: string;
|
|
3121
|
-
readonly kind: string;
|
|
3122
|
-
}[];
|
|
3123
|
-
/** Matched refs beyond the cap, stated rather than silently dropped.
|
|
3124
|
-
* Absent when every match was named. */
|
|
3125
|
-
readonly refsOmitted?: number;
|
|
3126
|
-
/** The spender tools named, by their registered names — the tools whose
|
|
3127
|
-
* declared `wants` matched a staged ref's kind, exact-string, never by
|
|
3128
|
-
* tool name. */
|
|
3129
|
-
readonly tools: readonly string[];
|
|
3130
|
-
}
|
|
3131
|
-
/**
|
|
3132
|
-
* The model this run STARTS with, and what may replace it mid-run.
|
|
3133
|
-
*
|
|
3134
|
-
* `model` is the agent's resolved default — the one `callLLM` sends unless
|
|
3135
|
-
* something overrides it. It is deliberately not the "final" model: a
|
|
3136
|
-
* `.configure()` resolver reads the run's input in the seed stage (AFTER this
|
|
3137
|
-
* event), and per-skill brains pick per iteration. Resolving `.configure()`
|
|
3138
|
-
* here to make this field "effective" would call a consumer's resolver twice
|
|
3139
|
-
* per run, and two calls can disagree — so the manifest names the starting
|
|
3140
|
-
* choice and {@link RunConfiguredLlmPayload.modelOverrides} names who is
|
|
3141
|
-
* allowed to change it. What each call REALLY used is on
|
|
3142
|
-
* `agentfootprint.stream.llm_start`, per call, as it always was.
|
|
3143
|
-
*/
|
|
3144
|
-
export interface RunConfiguredLlmPayload {
|
|
3145
|
-
/** `LLMProvider.name` — the effective provider, decorators included. */
|
|
3146
|
-
readonly provider: string;
|
|
3147
|
-
/** The agent's resolved default model. */
|
|
3148
|
-
readonly model: string;
|
|
3149
|
-
/**
|
|
3150
|
-
* Which mounted mechanisms may replace `model` during this run, by NAME —
|
|
3151
|
-
* `'configure'` (a `.configure()` resolver) and `'skill-brains'` (per-skill
|
|
3152
|
-
* providers/models, escalation included). Absent when nothing can: then
|
|
3153
|
-
* `model` is what every call of this run used, and an experiment can group
|
|
3154
|
-
* on it alone.
|
|
3155
|
-
*/
|
|
3156
|
-
readonly modelOverrides?: readonly ('configure' | 'skill-brains')[];
|
|
3157
|
-
}
|
|
3158
|
-
/**
|
|
3159
|
-
* One mounted memory, by the names it DECLARED.
|
|
3160
|
-
*
|
|
3161
|
-
* The store itself is not named: `MemoryStore` declares no id and no kind, so
|
|
3162
|
-
* naming which backend was in play would mean inventing a label (a class name
|
|
3163
|
-
* that survives no bundler, say) and an invented label is exactly what an arm
|
|
3164
|
-
* must not be grouped on. What IS declared is here.
|
|
3165
|
-
*/
|
|
3166
|
-
export interface RunConfiguredMemoryPayload {
|
|
3167
|
-
/** The `defineMemory({ id })` — the same id `memory.*` events carry. */
|
|
3168
|
-
readonly id: string;
|
|
3169
|
-
/** `'episodic' | 'semantic' | 'narrative' | 'causal'`. */
|
|
3170
|
-
readonly type: MemoryType;
|
|
3171
|
-
/** The strategy KIND it was compiled from (`'window'`, `'topK'`, …).
|
|
3172
|
-
* Absent for a hand-built definition, which declares none. */
|
|
3173
|
-
readonly strategy?: MemoryStrategyKind;
|
|
3174
|
-
/** `RetrievalStrategy.name`, when the memory was given a spelled-out
|
|
3175
|
-
* retrieval rule. Absent for the `{ topK, threshold }` shorthand — which
|
|
3176
|
-
* is a rule with no name, not the default one. */
|
|
3177
|
-
readonly retrieval?: string;
|
|
3178
|
-
/** The embedder in play, by its own `Embedder.id` (or the declared
|
|
3179
|
-
* `embedderId` when the store embeds server-side and no embedder was
|
|
3180
|
-
* passed). Absent when neither side named one. */
|
|
3181
|
-
readonly embedderId?: string;
|
|
3182
|
-
/** `'memory'` (conversation recall) or `'rag'` (corpus retrieval), when the
|
|
3183
|
-
* definition declared which claim it makes. */
|
|
3184
|
-
readonly flavor?: MemoryFlavor;
|
|
3185
|
-
}
|
|
3186
|
-
/**
|
|
3187
|
-
* The mounted skill graph's routing posture. The OBJECT's presence means a
|
|
3188
|
-
* graph is mounted; each absent field means that half was not declared.
|
|
3189
|
-
*/
|
|
3190
|
-
export interface RunConfiguredSkillGraphPayload {
|
|
3191
|
-
/** The mount's `strictness` — how much authority the graph has over the
|
|
3192
|
-
* model's own picks. Absent for a graph mounted without the turn-start
|
|
3193
|
-
* cascade options (routing then works exactly as it did in 9.16). */
|
|
3194
|
-
readonly routing?: 'assist' | 'guard' | 'rails';
|
|
3195
|
-
/** Whether the cursor survives the turn. Absent for the same reason. */
|
|
3196
|
-
readonly continuity?: 'turn' | 'conversation';
|
|
3197
|
-
/**
|
|
3198
|
-
* `IntentScorer.name` — the `.classify()` scorer that routes turn starts.
|
|
3199
|
-
* Absent when the graph declares no classifier, INCLUDING a graph routed by
|
|
3200
|
-
* `entryBy()` / `entryByRelevance()`: those hand the agent a bound
|
|
3201
|
-
* `scoreEntries` function and never the strategy that owns it, so there is
|
|
3202
|
-
* no name here to report. `skill.turn_routed.scorer` names the scorer that
|
|
3203
|
-
* really ran, whichever door it came through.
|
|
3204
|
-
*/
|
|
3205
|
-
readonly scorer?: string;
|
|
3206
|
-
}
|
|
3207
|
-
/**
|
|
3208
|
-
* The artifacts wiring. Presence means a store is configured; like
|
|
3209
|
-
* `MemoryStore`, `ArtifactStore` declares no id, so WHICH store is not named.
|
|
3210
|
-
*/
|
|
3211
|
-
export interface RunConfiguredArtifactsPayload {
|
|
3212
|
-
/** True when the placement dial is on — oversized tool results travel to
|
|
3213
|
-
* the model as a claim ticket instead of inline text. The threshold is a
|
|
3214
|
-
* number, not a name, so it is not carried. */
|
|
3215
|
-
readonly placement?: true;
|
|
3216
|
-
/** True when each run is filed as a recording artifact. */
|
|
3217
|
-
readonly recordings?: true;
|
|
3218
|
-
}
|
|
3219
|
-
/**
|
|
3220
|
-
* One applied recipe — the declared, versioned composition that produced part
|
|
3221
|
-
* of this agent (9.48.0).
|
|
3222
|
-
*
|
|
3223
|
-
* The pair is what makes the row worth reading: two runs of `support-desk` that
|
|
3224
|
-
* answered differently are a mystery until the record says one was `1.2.0` and
|
|
3225
|
-
* the other `1.3.0`. The recipe's `description` is deliberately not here — it
|
|
3226
|
-
* is prose about the composition, and the manifest carries what a consumer
|
|
3227
|
-
* BRANCHES on.
|
|
3228
|
-
*/
|
|
3229
|
-
export interface RunConfiguredRecipePayload {
|
|
3230
|
-
/** The composition's plain name, e.g. `'support-desk'`. */
|
|
3231
|
-
readonly id: string;
|
|
3232
|
-
/** Its SemVer version, e.g. `'1.2.0'`. Kept a SEPARATE field from `id` —
|
|
3233
|
-
* a composed `'support-desk@1.2.0'` would be one string that two different
|
|
3234
|
-
* pairs could produce as soon as either half may contain the separator. */
|
|
3235
|
-
readonly version: string;
|
|
3236
|
-
}
|
|
3237
|
-
/**
|
|
3238
|
-
* The run-configuration manifest — ONE event at run start naming which
|
|
3239
|
-
* adapters and strategies this run is about to use.
|
|
3240
|
-
*
|
|
3241
|
-
* ## Why it exists
|
|
3242
|
-
*
|
|
3243
|
-
* Swapping a strategy in this library is easy; ATTRIBUTING an outcome to it
|
|
3244
|
-
* was not. Every other event carries `meta.runId`, and the numbers are already
|
|
3245
|
-
* there (tokens, latency, iterations, routing, refusals, evidence verdicts) —
|
|
3246
|
-
* what was missing was the JOIN KEY that says which of them belong to the same
|
|
3247
|
-
* ARM. Two ports used to name what varied (`skill.turn_routed.scorer`,
|
|
3248
|
-
* `memory.retrieved.strategy`); everything else was anonymous, and grouping N
|
|
3249
|
-
* runs into labelled arms was the experimenter's own bookkeeping, differently
|
|
3250
|
-
* spelled in every study. Group by this payload and the arms name themselves.
|
|
3251
|
-
*
|
|
3252
|
-
* ## Names and ids ONLY — the hard rule
|
|
3253
|
-
*
|
|
3254
|
-
* No credentials, endpoints, connection strings, keys, tenants or principals,
|
|
3255
|
-
* and no config VALUE that could be one. A manifest that leaks an endpoint is
|
|
3256
|
-
* worse than no manifest: it travels into every recording, every vendor sink
|
|
3257
|
-
* and every shared trace, which is precisely where a secret must not be. When
|
|
3258
|
-
* the only handle on a component is a value (a directory, a URL, a table), the
|
|
3259
|
-
* component is reported as PRESENT and left unnamed. Pinned by test.
|
|
3260
|
-
*
|
|
3261
|
-
* ## Absence is a fact, never a guess
|
|
3262
|
-
*
|
|
3263
|
-
* An absent field means "not configured" or "the strategy did not say" — never
|
|
3264
|
-
* `'default'` or `'unknown'` filled in on a reader's behalf, the same
|
|
3265
|
-
* distinction `CostTickPayload.provider` already makes. `memories: []` is the
|
|
3266
|
-
* explicit "no memory is mounted".
|
|
3267
|
-
*
|
|
3268
|
-
* ## What it costs
|
|
3269
|
-
*
|
|
3270
|
-
* One small event per run, by design — the manifest of a run that emitted no
|
|
3271
|
-
* manifest cannot be recovered afterwards. It carries names, never lists that
|
|
3272
|
-
* grow with the workload (tool names ride `tools.offered`, injections ride
|
|
3273
|
-
* `context.injected`), so its size is bounded by the agent's CONFIGURATION and
|
|
3274
|
-
* not by the turn. Skipped entirely when nothing is listening.
|
|
3275
|
-
*
|
|
3276
|
-
* @example Group two runs into two arms
|
|
3277
|
-
* ```ts
|
|
3278
|
-
* const arms = new Map<string, string>(); // runId → arm label
|
|
3279
|
-
* agent.on('agentfootprint.agent.run_configured', (e) => {
|
|
3280
|
-
* arms.set(e.meta.runId, `${e.payload.llm.model}/${e.payload.memories[0]?.retrieval ?? 'no-retrieval'}`);
|
|
3281
|
-
* });
|
|
3282
|
-
* agent.on('agentfootprint.agent.turn_end', (e) => {
|
|
3283
|
-
* record(arms.get(e.meta.runId), e.payload.durationMs);
|
|
3284
|
-
* });
|
|
3285
|
-
* ```
|
|
3286
|
-
*/
|
|
3287
|
-
export interface AgentRunConfiguredPayload {
|
|
3288
|
-
/** The agent's stable id — the same one `meta.compositionPath` carries.
|
|
3289
|
-
* A study that runs two differently-configured agents groups on this. */
|
|
3290
|
-
readonly agentId: string;
|
|
3291
|
-
readonly llm: RunConfiguredLlmPayload;
|
|
3292
|
-
/** The configured cache strategy cannot apply the declared policy.
|
|
3293
|
-
* Configuration metadata only; absent when caching is off or supported. */
|
|
3294
|
-
readonly cache?: {
|
|
3295
|
-
readonly requested: 'explicit' | 'default';
|
|
3296
|
-
readonly strategy: 'none';
|
|
3297
|
-
readonly status: 'not-applicable';
|
|
3298
|
-
};
|
|
3299
|
-
/** Which chart shape ran the loop. A strategy choice with its own
|
|
3300
|
-
* behaviour, not a cosmetic one (see `AgentOptions.reactMode`). */
|
|
3301
|
-
readonly reactMode: 'classic' | 'dynamic' | 'dynamic-grouped';
|
|
3302
|
-
/** Every mounted memory, declaration order. `[]` means none is mounted —
|
|
3303
|
-
* stated rather than omitted, because "no memory" is itself an arm. */
|
|
3304
|
-
readonly memories: readonly RunConfiguredMemoryPayload[];
|
|
3305
|
-
/** `WindowStrategy.name` — the one strategy `.window()` or `.compaction()`
|
|
3306
|
-
* mounted (both doors set the same strategy). Absent = no window stage. */
|
|
3307
|
-
readonly window?: string;
|
|
3308
|
-
readonly skillGraph?: RunConfiguredSkillGraphPayload;
|
|
3309
|
-
/** The evidence gate's posture (`.namesAndNumbersFromEvidence()`).
|
|
3310
|
-
* Presence means the gate is on; absence means it is not mounted. */
|
|
3311
|
-
readonly evidenceGate?: 'assist' | 'guard' | 'rails';
|
|
3312
|
-
readonly artifacts?: RunConfiguredArtifactsPayload;
|
|
3313
|
-
/**
|
|
3314
|
-
* The recipes `.recipe()` applied, in declaration order — which declared,
|
|
3315
|
-
* versioned composition produced this agent (9.48.0).
|
|
3316
|
-
*
|
|
3317
|
-
* ABSENT when none was applied, and that is the one asymmetry with
|
|
3318
|
-
* {@link memories}: "no memory" is an arm a study compares against, while
|
|
3319
|
-
* "no recipe" is the state of every agent written before recipes existed,
|
|
3320
|
-
* and an empty list on all of them would be new bytes in every recording for
|
|
3321
|
-
* a feature nobody used.
|
|
3322
|
-
*/
|
|
3323
|
-
readonly recipes?: readonly RunConfiguredRecipePayload[];
|
|
3324
|
-
}
|
|
3325
|
-
export interface AgentOutputSchemaValidationFailedPayload {
|
|
3326
|
-
/** Validation error message (from Zod / parser), or a fixed sentence when
|
|
3327
|
-
* `draftWithheld` is true — parser text can quote the draft. */
|
|
3328
|
-
readonly message: string;
|
|
3329
|
-
/** Validation stage — JSON parse vs schema validate. Lets dashboards
|
|
3330
|
-
* distinguish "model emitted prose" (`json-parse`) from "model emitted
|
|
3331
|
-
* JSON but wrong shape" (`schema-validate`); they trend differently
|
|
3332
|
-
* under model drift. */
|
|
3333
|
-
readonly stage: 'json-parse' | 'schema-validate';
|
|
3334
|
-
/** Failing field path when the parser exposes one (e.g. `'amount.currency'`).
|
|
3335
|
-
* Only set when `stage === 'schema-validate'`. */
|
|
3336
|
-
readonly path?: string;
|
|
3337
|
-
/** The raw string output that failed — useful for narrative entries showing
|
|
3338
|
-
* "what the model actually said" alongside the validation error. Absent
|
|
3339
|
-
* when `draftWithheld` is true. */
|
|
3340
|
-
readonly rawOutput?: string;
|
|
3341
|
-
/** An output policy governs delivery, and this draft never passed output
|
|
3342
|
-
* admission: its text (`rawOutput`, and the parser's message) is withheld
|
|
3343
|
-
* from the event stream. Rules still read it on `validationError`. */
|
|
3344
|
-
readonly draftWithheld?: true;
|
|
3345
|
-
/** 1-indexed attempt counter. `1` for the first failure, `2` for the
|
|
3346
|
-
* retry that also failed, etc. */
|
|
3347
|
-
readonly attempt: number;
|
|
3348
|
-
/** Total output-schema failures in this gate execution. Same as
|
|
3349
|
-
* `validationErrorHistory.length`. Distinct from `attempt` because a
|
|
3350
|
-
* gate can also retry on non-validation errors (5xx, etc.) — this
|
|
3351
|
-
* counts ONLY the schema-driven failures. */
|
|
3352
|
-
readonly cumulativeRetries: number;
|
|
3353
|
-
}
|
|
3354
|
-
export interface ErrorRetriedPayload {
|
|
3355
|
-
readonly attempt: number;
|
|
3356
|
-
readonly maxAttempts: number;
|
|
3357
|
-
readonly lastError: string;
|
|
3358
|
-
/** How long the decorator waited before the attempt. */
|
|
3359
|
-
readonly backoffMs: number;
|
|
3360
|
-
readonly reason: string;
|
|
3361
|
-
/**
|
|
3362
|
-
* The wait the failure STATED (Retry-After, a gateway's "try again in N
|
|
3363
|
-
* seconds"), in ms. Absent when it stated none; `backoffMs` is max(the
|
|
3364
|
-
* schedule, this), capped by `maxDelayMs`.
|
|
3365
|
-
*/
|
|
3366
|
-
readonly statedWaitMs?: number;
|
|
3367
|
-
}
|
|
3368
|
-
export interface ErrorRecoveredPayload {
|
|
3369
|
-
readonly attempt: number;
|
|
3370
|
-
readonly totalDurationMs: number;
|
|
3371
|
-
}
|
|
3372
|
-
/**
|
|
3373
|
-
* v9.32 — `withCircuitBreaker` moved between states.
|
|
3374
|
-
*
|
|
3375
|
-
* The gap this fills, named: until 9.32 the breaker reported nothing at all
|
|
3376
|
-
* through the in-run channel. `onStateChange` was the only way to see a trip,
|
|
3377
|
-
* and that is a consumer-level callback where a run's correlation ids are not
|
|
3378
|
-
* available — so a breaker that opened mid-run was invisible in the trace
|
|
3379
|
-
* beside the tool calls it stopped. An independent reviewer (2026-08-13, on a
|
|
3380
|
-
* local harness of scripted failures) watched a breaker open after two
|
|
3381
|
-
* failures, serve the next request from fallback, half-open after cooldown and
|
|
3382
|
-
* close after two probes: every step correct, every step off the record.
|
|
3383
|
-
*
|
|
3384
|
-
* Transitions ONLY. A hundred requests rejected while the breaker is already
|
|
3385
|
-
* open produce zero events — a re-entry into the same state is not a change,
|
|
3386
|
-
* and reporting it would turn a state log into a request log.
|
|
3387
|
-
*
|
|
3388
|
-
* On the `error.*` domain because that is where the provider decorators
|
|
3389
|
-
* already report; `reliability.*` is the separate rules-based loop.
|
|
3390
|
-
*/
|
|
3391
|
-
export interface ErrorCircuitChangedPayload {
|
|
3392
|
-
/** The state entered. */
|
|
3393
|
-
readonly state: 'closed' | 'open' | 'half-open';
|
|
3394
|
-
/**
|
|
3395
|
-
* WHY, in the breaker's own words — `'3 consecutive failures'`,
|
|
3396
|
-
* `'cooldown elapsed'`, `'2 probe successes'`, `'half-open probe failed'`.
|
|
3397
|
-
*
|
|
3398
|
-
* Never an error's message: the failure that tripped it is reported by
|
|
3399
|
-
* whoever threw it, and copying it here would attribute one vendor's text to
|
|
3400
|
-
* a state machine that only counted.
|
|
3401
|
-
*/
|
|
3402
|
-
readonly reason: string;
|
|
3403
|
-
/** WHICH provider this breaker wraps — `inner.name`, not a composite chain
|
|
3404
|
-
* name. Two breakers under one fallback produce one stream, and this is
|
|
3405
|
-
* what tells them apart. */
|
|
3406
|
-
readonly providerName: string;
|
|
3407
|
-
}
|
|
3408
|
-
/**
|
|
3409
|
-
* Fired when the rules loop (or the reliability gate chart) gives up via
|
|
3410
|
-
* a `fail-fast` decision. Superset shape: `phase`/`kind`/`attempt` are
|
|
3411
|
-
* always present; the remaining fields are populated by whichever site
|
|
3412
|
-
* emits (the loop carries `label`/`providerUsed`/`errorKind`; the gate
|
|
3413
|
-
* chart carries `reason`).
|
|
3414
|
-
*/
|
|
3415
|
-
export interface ReliabilityFailFastPayload {
|
|
3416
|
-
readonly phase: 'pre-check' | 'post-decide';
|
|
3417
|
-
/** The matched rule's `kind` (machine-readable bucket). */
|
|
3418
|
-
readonly kind: string;
|
|
3419
|
-
/** 1-indexed attempt counter at the point of failure. */
|
|
3420
|
-
readonly attempt: number;
|
|
3421
|
-
/** Human-readable label of the matched rule (loop sites). */
|
|
3422
|
-
readonly label?: string;
|
|
3423
|
-
/** Free-form reason string (gate-chart sites). */
|
|
3424
|
-
readonly reason?: string;
|
|
3425
|
-
/** Provider in use when the loop failed fast. */
|
|
3426
|
-
readonly providerUsed?: string;
|
|
3427
|
-
/** Classification of the failure being failed-fast on. */
|
|
3428
|
-
readonly errorKind?: string;
|
|
3429
|
-
/** Originating error message, when present. Absent for a schema failure
|
|
3430
|
-
* under an output policy — the parser's message can quote the draft. */
|
|
3431
|
-
readonly errorMessage?: string;
|
|
3432
|
-
}
|
|
3433
|
-
/**
|
|
3434
|
-
* Fired each time the rules loop decides to RETRY after a failed attempt
|
|
3435
|
-
* — `action` distinguishes a same-provider retry from a provider failover.
|
|
3436
|
-
*/
|
|
3437
|
-
export interface ReliabilityRetriedPayload {
|
|
3438
|
-
/** 1-indexed counter of the attempt that just FAILED and is being retried. */
|
|
3439
|
-
readonly attempt: number;
|
|
3440
|
-
/** `retry` = same provider again; `retry-other` = switch provider. */
|
|
3441
|
-
readonly action: 'retry' | 'retry-other';
|
|
3442
|
-
/** Classification of the failure being retried. */
|
|
3443
|
-
readonly errorKind: string;
|
|
3444
|
-
/** Originating error message, when present. Absent for a schema failure
|
|
3445
|
-
* under an output policy — the parser's message can quote the draft. */
|
|
3446
|
-
readonly errorMessage?: string;
|
|
3447
|
-
/** Provider that just failed. */
|
|
3448
|
-
readonly fromProvider: string;
|
|
3449
|
-
/** Provider the NEXT attempt will use (equals `fromProvider` for `retry`). */
|
|
3450
|
-
readonly toProvider: string;
|
|
3451
|
-
}
|
|
3452
|
-
/**
|
|
3453
|
-
* Fired when the rules loop produces a successful response AFTER one or
|
|
3454
|
-
* more failed attempts (self-healed). `recoveredVia` names the mechanism
|
|
3455
|
-
* of the final successful step.
|
|
3456
|
-
*/
|
|
3457
|
-
export interface ReliabilityRecoveredPayload {
|
|
3458
|
-
/** 1-indexed attempt number that finally succeeded. */
|
|
3459
|
-
readonly attempt: number;
|
|
3460
|
-
/** How recovery happened. */
|
|
3461
|
-
readonly recoveredVia: 'retry' | 'retry-other' | 'fallback';
|
|
3462
|
-
/** How many attempts failed before this success. */
|
|
3463
|
-
readonly priorFailures: number;
|
|
3464
|
-
/** Classification of the LAST failure before recovery. */
|
|
3465
|
-
readonly errorKind: string;
|
|
3466
|
-
}
|
|
3467
|
-
/**
|
|
3468
|
-
* Tier 2 engaged: `parseOutput()` / `runTyped()` could not validate the
|
|
3469
|
-
* model's answer against `outputSchema`, and the consumer-supplied
|
|
3470
|
-
* `fallback` function is about to run. Fires BEFORE the fallback executes,
|
|
3471
|
-
* so it is a record of degradation starting — not of it succeeding.
|
|
3472
|
-
*/
|
|
3473
|
-
export interface ResilienceOutputFallbackTriggeredPayload {
|
|
3474
|
-
/** Which half of validation failed: bad JSON, or good JSON of the wrong shape. */
|
|
3475
|
-
readonly stage: 'json-parse' | 'schema-validate';
|
|
3476
|
-
/** First 200 chars of the model's raw answer. Truncated by construction —
|
|
3477
|
-
* never the whole output. */
|
|
3478
|
-
readonly rawOutputPreview: string;
|
|
3479
|
-
/** Message of the `OutputSchemaError` that opened the ladder. */
|
|
3480
|
-
readonly primaryErrorMessage: string;
|
|
3481
|
-
/** Corrective re-asks this run already paid for before the answer reached
|
|
3482
|
-
* the ladder (the `outputAttempts` ledger minus the first attempt).
|
|
3483
|
-
* ABSENT when the caller parsed a string that did not come from this
|
|
3484
|
-
* agent's last run — absent means unknown, never zero. */
|
|
3485
|
-
readonly retriesSpent?: number;
|
|
3486
|
-
}
|
|
3487
|
-
/**
|
|
3488
|
-
* Tier 3 engaged: the fallback function itself failed (threw, or returned a
|
|
3489
|
-
* value that also failed the schema) and the static `canned` value is being
|
|
3490
|
-
* returned instead. This is the event that says a run billed real tokens and
|
|
3491
|
-
* ended in a constant — with `canned` configured, `runTyped()` is
|
|
3492
|
-
* structurally unable to throw, so this event is the ONLY signal.
|
|
3493
|
-
*/
|
|
3494
|
-
export interface ResilienceOutputCannedUsedPayload {
|
|
3495
|
-
/** First 200 chars of the model's raw answer. Truncated by construction. */
|
|
3496
|
-
readonly rawOutputPreview: string;
|
|
3497
|
-
/** Why tier 2 did not hold — the fallback's own throw, or the validation
|
|
3498
|
-
* error its return value produced. */
|
|
3499
|
-
readonly fallbackErrorMessage: string;
|
|
3500
|
-
/** Corrective re-asks this run already paid for. ABSENT when unknown. */
|
|
3501
|
-
readonly retriesSpent?: number;
|
|
3502
|
-
}
|
|
3503
|
-
export interface EmbeddingGeneratedPayload {
|
|
3504
|
-
readonly model: string;
|
|
3505
|
-
readonly provider: 'openai' | 'cohere' | 'voyage' | 'local' | 'custom';
|
|
3506
|
-
readonly inputKind: 'query' | 'document';
|
|
3507
|
-
readonly dimension: number;
|
|
3508
|
-
readonly count: number;
|
|
3509
|
-
readonly durationMs: number;
|
|
3510
|
-
readonly tokensSpent?: number;
|
|
3511
|
-
}
|
|
3512
|
-
/**
|
|
3513
|
-
* Emitted (v2.14) per provider chunk that carries thinking-content
|
|
3514
|
-
* tokens. Lives in `stream.*` domain — parallel to `stream.token` for
|
|
3515
|
-
* visible-content tokens.
|
|
3516
|
-
*
|
|
3517
|
-
* **Provider behavior:**
|
|
3518
|
-
* - Anthropic: fires for every `content_block_delta` with
|
|
3519
|
-
* `delta.type === 'thinking_delta'`. May fire 100s of times per turn.
|
|
3520
|
-
* - OpenAI o1/o3: NEVER fires (OpenAI doesn't stream reasoning content
|
|
3521
|
-
* as of early 2026). Only `thinking_end` fires at response completion.
|
|
3522
|
-
* - Custom providers: fire when `ThinkingHandler.parseChunk()` returns
|
|
3523
|
-
* a non-empty `thinkingDelta`.
|
|
3524
|
-
*
|
|
3525
|
-
* **Default consumer behavior:** thinking_delta events are emitted but
|
|
3526
|
-
* not surfaced to end users unless a consumer explicitly subscribes to
|
|
3527
|
-
* this event (e.g. for reasoning-as-it-streams UIs).
|
|
3528
|
-
*
|
|
3529
|
-
* **Sensitive data:** `content` is raw model thinking text. Use
|
|
3530
|
-
* `RedactionPolicy.thinkingPatterns` (Phase 3) to scrub before audit-log
|
|
3531
|
-
* adapters fire. Same risk profile as `stream.token`.
|
|
3532
|
-
*/
|
|
3533
|
-
export interface StreamThinkingDeltaPayload {
|
|
3534
|
-
readonly iteration: number;
|
|
3535
|
-
readonly tokenIndex: number;
|
|
3536
|
-
/** Per-chunk delta text, NOT accumulated. ~10–50 chars typical. */
|
|
3537
|
-
readonly content: string;
|
|
3538
|
-
}
|
|
3539
|
-
/**
|
|
3540
|
-
* Emitted (v2.14) once per LLM call where thinking blocks were
|
|
3541
|
-
* produced. Pairs with the leading `stream.thinking_delta` events when
|
|
3542
|
-
* streaming, OR fires standalone for non-streaming providers (OpenAI).
|
|
3543
|
-
*
|
|
3544
|
-
* Use this event for live per-iteration UIs (chat-bubble reasoning
|
|
3545
|
-
* pills, retry-rate dashboards, telemetry). The `blocks` field carries
|
|
3546
|
-
* the same content that lands on `LLMMessage.thinkingBlocks` — read it
|
|
3547
|
-
* here for live display instead of post-walking `scope.history` after
|
|
3548
|
-
* the run completes (the framework's "collect during traversal" rule).
|
|
3549
|
-
*
|
|
3550
|
-
* **`tokens` field population:**
|
|
3551
|
-
* - Anthropic: `undefined` currently — Anthropic's `response.usage`
|
|
3552
|
-
* doesn't break out thinking tokens (bundled in `output_tokens`).
|
|
3553
|
-
* May change in future Anthropic API revisions.
|
|
3554
|
-
* - OpenAI o1/o3: populated from
|
|
3555
|
-
* `response.usage.completion_tokens_details.reasoning_tokens`.
|
|
3556
|
-
* - Custom providers: populated when handler computes it during
|
|
3557
|
-
* `normalize()`.
|
|
3558
|
-
*
|
|
3559
|
-
* **Sensitive data:** the `blocks` field carries reasoning content.
|
|
3560
|
-
* Same risk profile as `stream.token` — wildcard (`*`) recorders
|
|
3561
|
-
* piping to external sinks (Datadog, CloudWatch, OTel) will see this.
|
|
3562
|
-
* Treat thinking content with the same redaction posture you give
|
|
3563
|
-
* visible response tokens. `providerMeta` is already stripped by the
|
|
3564
|
-
* framework before persistence (Phase 6 invariant), so the blocks
|
|
3565
|
-
* here match the audit-log surface bytes-exactly.
|
|
3566
|
-
*/
|
|
3567
|
-
export interface StreamThinkingEndPayload {
|
|
3568
|
-
readonly iteration: number;
|
|
3569
|
-
readonly blockCount: number;
|
|
3570
|
-
readonly totalChars: number;
|
|
3571
|
-
readonly tokens?: number;
|
|
3572
|
-
/**
|
|
3573
|
-
* v2.14+ — the normalized thinking blocks for this LLM call.
|
|
3574
|
-
*
|
|
3575
|
-
* Same data the framework persists to `LLMMessage.thinkingBlocks`
|
|
3576
|
-
* (post-`providerMeta` strip). Lets live consumers render the
|
|
3577
|
-
* model's chain-of-thought per iteration without scope-walking
|
|
3578
|
-
* after the run.
|
|
3579
|
-
*
|
|
3580
|
-
* Empty / undefined when no thinking content was produced this
|
|
3581
|
-
* call (handler returned `[]`). Non-empty when at least one
|
|
3582
|
-
* thinking or redacted_thinking block landed.
|
|
3583
|
-
*/
|
|
3584
|
-
readonly blocks?: readonly ThinkingBlock[];
|
|
3585
|
-
}
|
|
3586
|
-
/**
|
|
3587
|
-
* Emitted (v2.14) when a `ThinkingHandler.normalize()` call throws.
|
|
3588
|
-
* The framework catches the throw, drops the thinking blocks (they
|
|
3589
|
-
* don't land on `LLMMessage.thinkingBlocks`), and continues the agent
|
|
3590
|
-
* run. Same graceful-failure pattern as v2.11.6
|
|
3591
|
-
* `tools.discovery_failed`.
|
|
3592
|
-
*
|
|
3593
|
-
* Lives in `agent.*` domain (NOT `stream.*`) because parse failure is
|
|
3594
|
-
* a turn-level error concern — recovery happens at the agent loop
|
|
3595
|
-
* level, not at the SDK call level.
|
|
3596
|
-
*
|
|
3597
|
-
* **Anti-pattern (provider authors):** sanitize error messages before
|
|
3598
|
-
* throwing. NEVER include raw unparsed thinking content in the error
|
|
3599
|
-
* — the message ends up in audit logs and can leak reasoning content
|
|
3600
|
-
* the consumer expected to be redacted. Same guidance as
|
|
3601
|
-
* `tools.discovery_failed.error`.
|
|
3602
|
-
*/
|
|
3603
|
-
export interface AgentThinkingParseFailedPayload {
|
|
3604
|
-
readonly providerName: string;
|
|
3605
|
-
readonly subflowId: string;
|
|
3606
|
-
readonly error: string;
|
|
3607
|
-
readonly errorName: string;
|
|
3608
|
-
readonly iteration: number;
|
|
3609
|
-
}
|
|
3610
|
-
/** One completed-turn thinking block omitted before a provider request. */
|
|
3611
|
-
export interface AgentThinkingOmittedPayload {
|
|
3612
|
-
readonly providerName: string;
|
|
3613
|
-
readonly model: string;
|
|
3614
|
-
readonly messageIndex: number;
|
|
3615
|
-
readonly blockIndex: number;
|
|
3616
|
-
readonly reason: import('../thinking/replay.js').ThinkingReplayReason;
|
|
3617
|
-
/** Preparation is observable even when the subsequent transport fails. */
|
|
3618
|
-
readonly phase: 'prepared';
|
|
3619
|
-
}
|
|
3620
|
-
/** A payload was checked in and the store minted its claim ticket — by a
|
|
3621
|
-
* tool (`tool` names it), or by no tool at all (see {@link tool}). */
|
|
3622
|
-
export interface ArtifactMintedPayload {
|
|
3623
|
-
readonly ref: string;
|
|
3624
|
-
/** Consumer vocabulary: 'dataset/rows', 'chart/spec', … */
|
|
3625
|
-
readonly kind: string;
|
|
3626
|
-
readonly mediaType: string;
|
|
3627
|
-
readonly bytes: number;
|
|
3628
|
-
readonly label?: string;
|
|
3629
|
-
/** `sha-256:<hex>` when the put asked for one. Metadata, never the key. */
|
|
3630
|
-
readonly digest?: string;
|
|
3631
|
-
/** Unix ms when the ref stops resolving — stated at mint, never sprung. */
|
|
3632
|
-
readonly expiresAt?: number;
|
|
3633
|
-
/** The join to the trace: the run and tool call that minted it. */
|
|
3634
|
-
readonly origin?: ArtifactOrigin;
|
|
3635
|
-
/** Derivation facts — validated at mint, so they cannot dangle at birth. */
|
|
3636
|
-
readonly parentRefs?: readonly string[];
|
|
3637
|
-
/** The rows' declared time axis — validated at mint (see `ArtifactMeta.timeAxis`). */
|
|
3638
|
-
readonly timeAxis?: DatasetTimeAxis;
|
|
3639
|
-
/** The tool whose execute minted it. ABSENT when no tool did — the run's own
|
|
3640
|
-
* recording (9.26.0, the `recordings` dial) or a host filing for its turn
|
|
3641
|
-
* through `HostReply.turnArtifacts`; the event's `meta.sessionId` then names
|
|
3642
|
-
* the session the host filed for. Typed as always-present until now, and
|
|
3643
|
-
* already absent at run time since 9.26.0 — the 9.23.0 `resolved` /
|
|
3644
|
-
* `refused` precedent. Naming a phantom tool would be an actor a dashboard
|
|
3645
|
-
* groups by that does not exist. */
|
|
3646
|
-
readonly tool?: string;
|
|
3647
|
-
}
|
|
3648
|
-
/** A ref was redeemed — described (`head`) or read (`get`) — under scope. */
|
|
3649
|
-
export interface ArtifactResolvedPayload {
|
|
3650
|
-
readonly ref: string;
|
|
3651
|
-
/** `head` is the render-by-ref decision; `get` pays for the payload. */
|
|
3652
|
-
readonly via: 'head' | 'get';
|
|
3653
|
-
readonly kind: string;
|
|
3654
|
-
readonly bytes: number;
|
|
3655
|
-
/** The tool that redeemed it. ABSENT when the redemption came through the
|
|
3656
|
-
* hosting door instead of a tool (9.23.0) — a screen resolving
|
|
3657
|
-
* `artifact-head` / `artifact-get` over the wire, under the requesting
|
|
3658
|
-
* session's identity. Stamping a phantom tool name there would be a
|
|
3659
|
-
* dashboard grouping by an actor that does not exist. */
|
|
3660
|
-
readonly tool?: string;
|
|
3661
|
-
}
|
|
3662
|
-
/** An artifact left the store without its owner asking — the calendar (ttl)
|
|
3663
|
-
* or a budget (max-bytes / max-count). Reported by the put that swept it. */
|
|
3664
|
-
export interface ArtifactExpiredPayload {
|
|
3665
|
-
readonly ref: string;
|
|
3666
|
-
/** One vocabulary, defined in `artifacts/` and imported here — the
|
|
3667
|
-
* PermissionCapability lesson: two copies of one union can drift. */
|
|
3668
|
-
readonly reason: ArtifactSweepReason;
|
|
3669
|
-
readonly kind: string;
|
|
3670
|
-
readonly bytes: number;
|
|
3671
|
-
/** The tool whose put discovered/forced the sweep. ABSENT when the put was
|
|
3672
|
-
* not a tool's — the run's own recording, or a host filing for its turn
|
|
3673
|
-
* (the {@link ArtifactMintedPayload.tool} rule). */
|
|
3674
|
-
readonly tool?: string;
|
|
3675
|
-
}
|
|
3676
|
-
/** An artifact verb refused — or answered "no data" — and said why. `no-store`
|
|
3677
|
-
* is the fail-closed capability teaching how to attach a store;
|
|
3678
|
-
* `missing-or-expired` keeps the API's deliberate ambiguity while the record
|
|
3679
|
-
* still shows a resolve that found nothing; `digest-mismatch` is integrity
|
|
3680
|
-
* refusing to deliver corrupt bytes as whole. Since 9.22.0, `op: 'dispatch'`
|
|
3681
|
-
* is the framework's own door: a tool's declared `wants` argument (or a
|
|
3682
|
-
* `present` call) that could not be delivered — the tool did not run and the
|
|
3683
|
-
* model read a teaching refusal listing what CAN resolve
|
|
3684
|
-
* (`kind-mismatch` names a ref that resolved to the wrong kind). */
|
|
3685
|
-
export interface ArtifactRefusedPayload {
|
|
3686
|
-
readonly op: ArtifactOp;
|
|
3687
|
-
readonly reason: ArtifactRefusalReason;
|
|
3688
|
-
readonly ref?: string;
|
|
3689
|
-
/** The refusal sentence, when one was thrown. */
|
|
3690
|
-
readonly detail?: string;
|
|
3691
|
-
/** The tool whose call was refused. ABSENT when the refusal answered the
|
|
3692
|
-
* hosting door instead of a tool (9.23.0) — a wire resolution that found
|
|
3693
|
-
* nothing (`missing-or-expired`: the one indistinguishable answer for
|
|
3694
|
-
* missing, expired and another-session's alike) or reached an agent with
|
|
3695
|
-
* no store (`no-store`). */
|
|
3696
|
-
readonly tool?: string;
|
|
3697
|
-
}
|
|
3698
|
-
/**
|
|
3699
|
-
* Why a turn's artifact hand-over (`HostReply.turnArtifacts`) did not go
|
|
3700
|
-
* cleanly — one vocabulary, shared by this event and the ingress record's
|
|
3701
|
-
* `turnArtifactsFailure`:
|
|
3702
|
-
*
|
|
3703
|
-
* - `'hook'` — the host's hook threw or rejected (and not merely by
|
|
3704
|
-
* re-throwing an operation's own failure, which is counted
|
|
3705
|
-
* once, as `'operation'`);
|
|
3706
|
-
* - `'operation'` — a verb started through the hand-over failed, awaited or
|
|
3707
|
-
* not: a store refusal, an I/O error;
|
|
3708
|
-
* - `'timeout'` — the hook and the operations it started outran the ceiling
|
|
3709
|
-
* (`turnArtifactsTimeoutMs`); the binding was revoked and the
|
|
3710
|
-
* reply delivered, and what was in flight may still land;
|
|
3711
|
-
* - `'abort'` — the request's own signal fired (the caller hung up) before
|
|
3712
|
-
* they settled; the same consequences;
|
|
3713
|
-
* - `'expired'` — a verb was called after its turn ended and was refused.
|
|
3714
|
-
*/
|
|
3715
|
-
export type ArtifactHandOverFailureCause = 'hook' | 'operation' | 'timeout' | 'abort' | 'expired';
|
|
3716
|
-
/**
|
|
3717
|
-
* A turn's artifact hand-over failed (the host's own filing — a story, the
|
|
3718
|
-
* person's clicks). The reply was delivered regardless: the hand-over never
|
|
3719
|
-
* decides it. Emitted on the serving agent for the session it was produced
|
|
3720
|
-
* for (`meta.sessionId`, and `meta.runId` = the turn's run when it had one).
|
|
3721
|
-
*
|
|
3722
|
-
* Class only, never the message: the error came from the host's own code or
|
|
3723
|
-
* its store, and either may carry anything — META ONLY, like every
|
|
3724
|
-
* `artifacts.*` payload. `errorClass` is routable without parsing prose (the
|
|
3725
|
-
* `tools.session_close_failed` precedent).
|
|
3726
|
-
*/
|
|
3727
|
-
export interface ArtifactHandOverFailedPayload {
|
|
3728
|
-
readonly cause: ArtifactHandOverFailureCause;
|
|
3729
|
-
/** The verb, for `'operation'` and `'expired'`. */
|
|
3730
|
-
readonly op?: ArtifactOp;
|
|
3731
|
-
/** Constructor name of what was thrown, when it was an `Error`. */
|
|
3732
|
-
readonly errorClass?: string;
|
|
3733
|
-
/** This package's (or the store's) own `code`, when the error carried one. */
|
|
3734
|
-
readonly errorCode?: string;
|
|
3735
|
-
}
|
|
3736
|
-
/** The model handed an artifact to the screen (9.22.0): `present({ ref, as,
|
|
3737
|
-
* label? })` resolved under the run's scope. `snapshot` is the description
|
|
3738
|
-
* the claim ticket carries at speak time — `{ kind, mediaType, bytes,
|
|
3739
|
-
* label }` — the same snapshot stored INSIDE the tool result so a reloaded
|
|
3740
|
-
* conversation can render an honest placeholder after the artifact expired.
|
|
3741
|
-
* `as` is the model's consumer vocabulary ('bar-chart', 'table', …), stored
|
|
3742
|
-
* as data — the component registry that would validate it is a later phase.
|
|
3743
|
-
* Meta only, never the payload: the screen redeems the ref itself, under
|
|
3744
|
-
* its own identity. */
|
|
3745
|
-
export interface ArtifactPresentedPayload {
|
|
3746
|
-
readonly ref: string;
|
|
3747
|
-
readonly as: string;
|
|
3748
|
-
readonly snapshot: {
|
|
3749
|
-
readonly kind: string;
|
|
3750
|
-
readonly mediaType: string;
|
|
3751
|
-
readonly bytes: number;
|
|
3752
|
-
readonly label?: string;
|
|
3753
|
-
};
|
|
3754
|
-
/** The presenting call — the join to the trace. */
|
|
3755
|
-
readonly toolCallId: string;
|
|
3756
|
-
readonly iteration: number;
|
|
3757
|
-
}
|
|
3758
|
-
/** A mounted map's contributions are riding the calls again (or for the
|
|
3759
|
-
* first time). `by` is the strength of the evidence the standing rests on
|
|
3760
|
-
* — `assumed`/`lexical`/`semantic` engagements decay without corroboration;
|
|
3761
|
-
* `structural`/`explicit` ones stand. `reengaged` marks a recovery from a
|
|
3762
|
-
* park; `upgraded` marks a guess that real evidence confirmed. The map's own
|
|
3763
|
-
* cursor is never touched by any of this: engagement is the kernel's axis,
|
|
3764
|
-
* position is the map's. */
|
|
3765
|
-
export interface MapEngagedPayload {
|
|
3766
|
-
readonly mapId: string;
|
|
3767
|
-
readonly iteration: number;
|
|
3768
|
-
readonly by: 'explicit' | 'structural' | 'semantic' | 'lexical' | 'assumed';
|
|
3769
|
-
/** The matched text that founded a guessed engagement (bounded upstream). */
|
|
3770
|
-
readonly witness?: string;
|
|
3771
|
-
readonly reengaged?: true;
|
|
3772
|
-
/** The standing was UPGRADED in place by corroborating evidence (9.59.0).
|
|
3773
|
-
* Emitted so the record shows the moment a guess became a fact instead of
|
|
3774
|
-
* silently rewriting `by` and leaving a reviewer to believe it was always
|
|
3775
|
-
* that strong. */
|
|
3776
|
-
readonly upgraded?: true;
|
|
3777
|
-
/** On an `upgraded` or `tenantChanged` change: the cause the engagement was
|
|
3778
|
-
* FOUNDED on, which never changes for the life of the record. */
|
|
3779
|
-
readonly foundedBy?: 'explicit' | 'structural' | 'semantic' | 'lexical' | 'assumed';
|
|
3780
|
-
/** The CURSOR moved to a different member of an already-engaged map (9.59.0)
|
|
3781
|
-
* — a TENANT CHANGE. Eligibility was re-derived from the new member's own
|
|
3782
|
-
* evidence rather than inherited from the old one's: a declared edge out of
|
|
3783
|
-
* an explicitly-requested skill does not hand the next skill a user request
|
|
3784
|
-
* it never received. `by` is the new member's strength; `foundedBy` still
|
|
3785
|
-
* names how the engagement began. */
|
|
3786
|
-
readonly tenantChanged?: true;
|
|
3787
|
-
/** The member the cursor moved to, on a `tenantChanged` change. */
|
|
3788
|
-
readonly at?: string;
|
|
3789
|
-
}
|
|
3790
|
-
/** A mounted map was PARKED: its contribution was served for `idleCalls`
|
|
3791
|
-
* consecutive passes in which none of its tools was called while the turn
|
|
3792
|
-
* went elsewhere — the measured shape of the recorded 30-call stuck turn,
|
|
3793
|
-
* and all three of those clauses are checked (9.59.0). Its prompt and tools
|
|
3794
|
-
* stop riding; its cursor stays exactly where the map put it; explicit or
|
|
3795
|
-
* structural evidence — including the model picking one of its skills by
|
|
3796
|
-
* name — re-engages it. */
|
|
3797
|
-
export interface MapParkedPayload {
|
|
3798
|
-
readonly mapId: string;
|
|
3799
|
-
readonly iteration: number;
|
|
3800
|
-
/** Strength of the evidence the parked engagement had rested on. */
|
|
3801
|
-
readonly by: 'explicit' | 'structural' | 'semantic' | 'lexical' | 'assumed';
|
|
3802
|
-
readonly idleCalls: number;
|
|
3803
|
-
readonly witness?: string;
|
|
3804
|
-
}
|
|
3805
|
-
/**
|
|
3806
|
-
* One detected context error, filed as a finding: two channels asserted
|
|
3807
|
-
* things that cannot both be true, an argument nothing served, an offered
|
|
3808
|
-
* action whose inputs left scope, a settled action re-executed, or a claim
|
|
3809
|
-
* the record does not support. The payload IS the finding — uniform across
|
|
3810
|
-
* seams so findings are a corpus; deduplicated by identity upstream, so
|
|
3811
|
-
* one defect is one event however many passes re-detect it. Synthetic
|
|
3812
|
-
* (canary) findings carry `synthetic` and are quarantined from real counts.
|
|
3813
|
-
*/
|
|
3814
|
-
export type IntegrityContextErrorPayload = import('../integrity/finding/types.js').ContextError & {
|
|
3815
|
-
/** The iteration the finding was filed on, when filed mid-loop. */
|
|
3816
|
-
readonly iteration?: number;
|
|
3817
|
-
};
|
|
3818
|
-
/**
|
|
3819
|
-
* One run's disposition accounting — one row per registered (check, seam),
|
|
3820
|
-
* filed ONCE at the run boundary. The rows answer the question a findings
|
|
3821
|
-
* stream cannot: did the checkers RUN? `checked` with zero `findings` is
|
|
3822
|
-
* health; a registered row with zero encounters while `workExisted` is the
|
|
3823
|
-
* wiring-rot signal `assertAlive` names in dev posture. Synthetic (canary)
|
|
3824
|
-
* counts ride each row quarantined from the real numbers.
|
|
3825
|
-
*/
|
|
3826
|
-
export interface IntegrityDispositionPayload {
|
|
3827
|
-
readonly posture: 'observe' | 'dev';
|
|
3828
|
-
/** Whether the run did any work a checker could have seen (≥1 LLM call). */
|
|
3829
|
-
readonly workExisted: boolean;
|
|
3830
|
-
readonly rows: readonly import('../integrity/disposition/types.js').CheckReport[];
|
|
3831
|
-
}
|
|
3832
|
-
/**
|
|
3833
|
-
* One argument value excused by an APP-ASSERTED external ground (9.72.0) —
|
|
3834
|
-
* the audit trail of the `externalGrounds` door. The choice-seam check found
|
|
3835
|
-
* the value in none of what the run served; the app's provider vouched for
|
|
3836
|
-
* it, so no finding was filed, and THIS event is the record of that excusal.
|
|
3837
|
-
* `source` is the app's own label ('viewer-selection'): the library records
|
|
3838
|
-
* what the app asserts — verifying the assertion was the app's duty at the
|
|
3839
|
-
* moment it yielded the entry. Fired per excused value per call, deliberately
|
|
3840
|
-
* NOT deduplicated the way findings are: a repeated call is a fresh choice.
|
|
3841
|
-
*/
|
|
3842
|
-
export interface IntegrityExternalGroundUsedPayload {
|
|
3843
|
-
readonly toolName: string;
|
|
3844
|
-
/** The provider's id for the call — what a reader joins to `tool_start`. */
|
|
3845
|
-
readonly toolCallId: string;
|
|
3846
|
-
/** Dot-path of the argument leaf the ground excused. */
|
|
3847
|
-
readonly path: string;
|
|
3848
|
-
readonly value: string;
|
|
3849
|
-
/** The app's label for where the verified value came from. */
|
|
3850
|
-
readonly source: string;
|
|
3851
|
-
readonly iteration: number;
|
|
3852
|
-
}
|
|
3853
|
-
/** One library-written negative statement, shared by delivery and its event. */
|
|
3854
|
-
export interface DeliveredNegative {
|
|
3855
|
-
readonly kind: 'none' | 'not-found' | 'complete' | 'unknown';
|
|
3856
|
-
/** The single public population value derived from admitted searches, never model wording.
|
|
3857
|
-
* Omitted for multiple or unknown subjects; their individual scopes remain in the statement. */
|
|
3858
|
-
readonly about?: string | number;
|
|
3859
|
-
readonly restsOn: readonly string[];
|
|
3860
|
-
readonly statement: string;
|
|
3861
|
-
readonly delivery: 'record-composed';
|
|
3862
|
-
readonly version: string;
|
|
3863
|
-
}
|
|
3864
|
-
/** Served negative statements. Codes and identities are diagnostics; the statement is library-written. */
|
|
3865
|
-
export interface AnswerNegativesPayload {
|
|
3866
|
-
readonly field: string;
|
|
3867
|
-
readonly version: string;
|
|
3868
|
-
readonly delivery: 'as-checked' | 'recorded' | 'fallback';
|
|
3869
|
-
readonly claims: readonly DeliveredNegative[];
|
|
3870
|
-
readonly checks: readonly {
|
|
3871
|
-
readonly id: string;
|
|
3872
|
-
readonly path: string;
|
|
3873
|
-
readonly index: number;
|
|
3874
|
-
readonly kind: 'none' | 'not-found' | 'complete' | 'unknown';
|
|
3875
|
-
/** Audit-only: none/not-found was normalized over an explicitly declared absence. */
|
|
3876
|
-
readonly notes?: readonly 'absence-kind-normalized'[];
|
|
3877
|
-
readonly code: string;
|
|
3878
|
-
readonly disposition: 'checked-fail' | 'not-applicable' | 'unreachable';
|
|
3879
|
-
readonly tools: readonly string[];
|
|
3880
|
-
readonly results: readonly string[];
|
|
3881
|
-
/** On a `'stale-turn'` check: the turn the cited result was read on, and when
|
|
3882
|
-
* the read ran (the library's own clock), when it was recorded. */
|
|
3883
|
-
readonly staleSince?: {
|
|
3884
|
-
readonly turn: number;
|
|
3885
|
-
readonly readAt?: string;
|
|
3886
|
-
};
|
|
3887
|
-
}[];
|
|
3888
|
-
readonly coverage: readonly {
|
|
3889
|
-
readonly tool: string;
|
|
3890
|
-
readonly checked: number;
|
|
3891
|
-
}[];
|
|
3892
|
-
readonly actions: readonly {
|
|
3893
|
-
readonly tool: string;
|
|
3894
|
-
readonly outcome: 'ok' | 'error' | 'not-run';
|
|
3895
|
-
}[];
|
|
3896
|
-
}
|
|
3897
|
-
export {};
|
|
10
|
+
export type { CompositionEnterPayload, CompositionExitPayload, ParallelForkStartPayload, ParallelBranchCompletePayload, ParallelMergeEndPayload, ConditionalRouteDecidedPayload, LoopIterationStartPayload, LoopIterationExitPayload, } from './payloads/flow.js';
|
|
11
|
+
export type { AgentTurnStartPayload, AgentTurnEndPayload, AgentBudgetExhaustedPayload, AgentIterationStartPayload, AgentIterationEndPayload, FixedRouteRationale, FixedPauseReason, AgentRouteDecidedPayload, AgentHandoffPayload, } from './payloads/agent.js';
|
|
12
|
+
export type { LLMStartPayload, LLMEndPayload, LLMTokenPayload, ToolStartPayload, ToolProgressPayload, ToolEndPayload, } from './payloads/stream.js';
|
|
13
|
+
export type { ContextInjectedPayload, ContextEvictedPayload, ContextSlotComposedPayload, ContextBudgetPressurePayload, SkillGuardValueRecord, SkillGuardEvaluationRecord, ContextEvaluatedPayload, } from './payloads/context.js';
|
|
14
|
+
export type { ErrorFatalPayload, PauseRequestPayload, PauseResumePayload, CheckInRequestPayload, CheckInDecisionPayload, MiddlewareDecisionPayload, } from './payloads/consent.js';
|
|
15
|
+
export type { FindingsDeclaredPayload, FindingsStandingPayload, FindingsJudgedPayload, FindingsJudgeFailedPayload, FindingsContingentPayload, FindingsArgumentPayload, FindingsPeriodPayload, FindingsNegativeClaimPayload, } from './payloads/findings.js';
|
|
16
|
+
export type { ToolChoicePickedPayload, ToolChoiceOutcomePayload, ToolChoiceFailedPayload, OntologyServedPayload, } from './payloads/toolChoice.js';
|
|
17
|
+
export type { AnswerAssessmentPayload, AnswerAssessedPayload, DeliveredNegative, AnswerNegativesPayload, } from './payloads/answer.js';
|
|
18
|
+
export type { MemoryStrategyAppliedPayload, MemoryAttachedPayload, RetrievedCandidatePayload, MemoryRetrievedPayload, MemoryDetachedPayload, MemoryWrittenPayload, } from './payloads/memory.js';
|
|
19
|
+
export type { ToolsOfferedPayload, ToolsActivatedPayload, ToolsDeactivatedPayload, ToolsDiscoveryStartedPayload, ToolsDiscoveryCompletedPayload, ToolsDiscoveryFailedPayload, ToolNameChannel, ToolsShadowedPayload, ToolsClaimSwallowedPayload, ToolsAnsweredOffWirePayload, } from './payloads/toolCatalog.js';
|
|
20
|
+
export type { ToolsSessionStartedPayload, ToolsSessionReusedPayload, ToolsSessionClosedPayload, ToolsSessionCloseFailedPayload, } from './payloads/toolSessionPayloads.js';
|
|
21
|
+
export type { ValidationArgsInvalidPayload } from './payloads/validation.js';
|
|
22
|
+
export type { SkillTurnRoutedPayload, SkillActivatedPayload, SkillDeactivatedPayload, SkillRerouteSupersededPayload, SkillGraphDeclaredPayload, SkillRejectedPayload, SkillRouteConflictPayload, SkillStepAdvancedPayload, SkillStepSkippedPayload, SkillStepsUnfinishedPayload, SkillEscalatedPayload, } from './payloads/skills.js';
|
|
23
|
+
export type { ToolEffectPayload, ToolResultRefusedPayload, ToolRepeatedCallPayload, ToolAbsentPayload, CoverageFieldReference, CoverageFacetReferencePayload, CoverageGapPayload, CoverageCompositionPayload, ProvenancePayload, PeriodPayload, TryInsteadToolPayload, ToolsCodeRunPayload, } from './payloads/toolEffects.js';
|
|
24
|
+
export type { ToolsMcpClientPayload, ToolRequestAttemptOutcome, ToolRequestOutcome, ToolRequestRemote, ToolRequestReason, ToolRequestRefusalKind, ToolRequestEffect, ToolRequestReplayKind, ToolRequestPermission, ToolRequestFailureCategory, ToolRequestError, ToolRequestAttempt, ToolRequestEnd, ToolsRequestAttemptsPayload, } from './payloads/mcpRequests.js';
|
|
25
|
+
export type { ToolCoverageDeclaredPayload, InProgressItemPayload, CoverageItemPayload, ToolSemanticsDeclaredPayload, } from './payloads/toolSemantics.js';
|
|
26
|
+
export type { PermissionCheckPayload, PermissionGateOpenedPayload, CredentialRequestedPayload, CredentialAcquiredPayload, CredentialAuthorizationRequiredPayload, CredentialFailedPayload, PermissionGateClosedPayload, PermissionHaltPayload, } from './payloads/access.js';
|
|
27
|
+
export type { FallbackTriggeredPayload } from './payloads/fallback.js';
|
|
28
|
+
export type { CostTickPayload, CostLimitHitPayload } from './payloads/cost.js';
|
|
29
|
+
export type { EvalScorePayload, EvalThresholdCrossedPayload, AgentOutputContractUnmetPayload, AgentOutputSchemaRetryPayload, AgentEvidenceCheckedPayload, AgentGroundingNudgedPayload, } from './payloads/evaluation.js';
|
|
30
|
+
export type { RunConfiguredLlmPayload, RunConfiguredMemoryPayload, RunConfiguredSkillGraphPayload, RunConfiguredArtifactsPayload, RunConfiguredRecipePayload, AgentRunConfiguredPayload, AgentOutputSchemaValidationFailedPayload, } from './payloads/runConfiguration.js';
|
|
31
|
+
export type { ErrorRetriedPayload, ErrorRecoveredPayload, ErrorCircuitChangedPayload, ReliabilityFailFastPayload, ReliabilityRetriedPayload, ReliabilityRecoveredPayload, ResilienceOutputFallbackTriggeredPayload, ResilienceOutputCannedUsedPayload, } from './payloads/reliability.js';
|
|
32
|
+
export type { EmbeddingGeneratedPayload, StreamThinkingDeltaPayload, StreamThinkingEndPayload, AgentThinkingParseFailedPayload, AgentThinkingOmittedPayload, } from './payloads/thinking.js';
|
|
33
|
+
export type { ArtifactMintedPayload, ArtifactResolvedPayload, ArtifactExpiredPayload, ArtifactRefusedPayload, ArtifactHandOverFailureCause, ArtifactHandOverFailedPayload, ArtifactPresentedPayload, } from './payloads/artifacts.js';
|
|
34
|
+
export type { MapEngagedPayload, MapParkedPayload } from './payloads/maps.js';
|
|
35
|
+
export type { IntegrityContextErrorPayload, IntegrityDispositionPayload, IntegrityExternalGroundUsedPayload, } from './payloads/integrity.js';
|
|
3898
36
|
//# sourceMappingURL=payloads.d.ts.map
|