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
package/dist/core/Agent.js
CHANGED
|
@@ -24,23 +24,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Agent = exports.AgentBuilder = void 0;
|
|
27
|
+
const resumeAnswer_js_1 = require("./agent/resumeAnswer.js");
|
|
28
|
+
const hostTurn_js_1 = require("./agent/hostTurn.js");
|
|
29
|
+
const componentResources_js_1 = require("./agent/componentResources.js");
|
|
30
|
+
const resumeCheckpoint_js_1 = require("./agent/resumeCheckpoint.js");
|
|
31
|
+
const pauseOwnership_js_1 = require("./agent/pauseOwnership.js");
|
|
32
|
+
const runnerLive_js_1 = require("./runnerLive.js");
|
|
33
|
+
const componentObservers_js_1 = require("./agent/componentObservers.js");
|
|
34
|
+
const runRedaction_js_1 = require("../redaction/runRedaction.js");
|
|
35
|
+
const runValues_js_1 = require("./agent/runValues.js");
|
|
36
|
+
const runnerExecution_js_1 = require("./runnerExecution.js");
|
|
27
37
|
const context_js_1 = require("./agent/findings/context.js");
|
|
28
|
-
/**
|
|
29
|
-
* Agent — ReAct primitive (LLM + tools + iteration loop).
|
|
30
|
-
*
|
|
31
|
-
* Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
|
|
32
|
-
* Role: Layer-5 primitive (core/). Assembles the 3-slot context
|
|
33
|
-
* pipeline + callLLM + route decider + tool-calls subflow +
|
|
34
|
-
* loopTo. Composition nestable anywhere that accepts a Runner.
|
|
35
|
-
* Emits: Via internal recorders:
|
|
36
|
-
* agentfootprint.agent.turn_start / turn_end
|
|
37
|
-
* agentfootprint.agent.iteration_start / iteration_end
|
|
38
|
-
* agentfootprint.agent.route_decided
|
|
39
|
-
* agentfootprint.stream.llm_start / llm_end
|
|
40
|
-
* agentfootprint.stream.tool_start / tool_end
|
|
41
|
-
* agentfootprint.context.* (via ContextRecorder)
|
|
42
|
-
*/
|
|
43
|
-
const footprintjs_1 = require("footprintjs");
|
|
44
38
|
const types_js_1 = require("../reliability/types.js");
|
|
45
39
|
const extractSequence_js_1 = require("../security/extractSequence.js");
|
|
46
40
|
const PolicyHaltError_js_1 = require("../security/PolicyHaltError.js");
|
|
@@ -80,15 +74,12 @@ const ToolsRecorder_js_1 = require("../recorders/core/ToolsRecorder.js");
|
|
|
80
74
|
const ReliabilityRecorder_js_1 = require("../recorders/core/ReliabilityRecorder.js");
|
|
81
75
|
const ResilienceRecorder_js_1 = require("../recorders/core/ResilienceRecorder.js");
|
|
82
76
|
const CheckInRecorder_js_1 = require("../recorders/core/CheckInRecorder.js");
|
|
83
|
-
const CompactionMeter_js_1 = require("../recorders/core/CompactionMeter.js");
|
|
84
77
|
const policy_js_1 = require("../redaction/policy.js");
|
|
85
|
-
const runRedaction_js_1 = require("../redaction/runRedaction.js");
|
|
86
78
|
const coverage_js_1 = require("../redaction/coverage.js");
|
|
87
79
|
const conversation_js_1 = require("./conversation.js");
|
|
80
|
+
const privateCheckpoint_js_1 = require("../redaction/privateCheckpoint.js");
|
|
88
81
|
const declared_js_1 = require("../redaction/declared.js");
|
|
89
82
|
const conversation_js_2 = require("../redaction/conversation.js");
|
|
90
|
-
const evictedTurns_js_1 = require("./agent/window/evictedTurns.js");
|
|
91
|
-
const receiptDigests_js_1 = require("./agent/receipt/receiptDigests.js");
|
|
92
83
|
const recordingPack_js_1 = require("../recorders/observability/recordingPack.js");
|
|
93
84
|
const durabilityBarrier_js_1 = require("./durabilityBarrier.js");
|
|
94
85
|
const toolSessions_js_1 = require("../tools/toolSessions.js");
|
|
@@ -97,60 +88,20 @@ const callerIdentity_js_1 = require("./agent/callerIdentity.js");
|
|
|
97
88
|
const servingConversation_js_1 = require("./agent/servingConversation.js");
|
|
98
89
|
const runManifest_js_1 = require("./agent/runManifest.js");
|
|
99
90
|
const lifecycle_js_1 = require("../integrity/disposition/lifecycle.js");
|
|
100
|
-
/**
|
|
101
|
-
* The pseudo-stage a tool-teardown event is stamped with.
|
|
102
|
-
*
|
|
103
|
-
* `session_closed` and `session_close_failed` fire after the run's last stage
|
|
104
|
-
* has committed — there is no runtimeStageId to inherit, and inventing one that
|
|
105
|
-
* looked like a real stage would put a fictitious node in every consumer's step
|
|
106
|
-
* strip. This says plainly where it came from, the way `'<stageId>#paused'`
|
|
107
|
-
* does at the pause boundary. Their two siblings, `session_started` and
|
|
108
|
-
* `session_reused`, happen inside a real stage and carry its real id.
|
|
109
|
-
*/
|
|
110
|
-
const TOOL_TEARDOWN_STAGE_ID = 'tool-teardown#0';
|
|
111
|
-
/**
|
|
112
|
-
* The pseudo-stage a LATE artifact fact is stamped with — one that lands after
|
|
113
|
-
* the run its binding was made in had ended (a tool's floating upload). Its
|
|
114
|
-
* stage is long gone; like the teardown events it says plainly where it came
|
|
115
|
-
* from, and carries the run it belongs to rather than the one that is live.
|
|
116
|
-
*/
|
|
117
|
-
const LATE_ARTIFACT_FACT_STAGE_ID = 'artifact-late#0';
|
|
118
|
-
/**
|
|
119
|
-
* The pseudo-stage the run-configuration manifest is stamped with (9.41.0).
|
|
120
|
-
*
|
|
121
|
-
* Same reasoning as the teardown id above, at the other end of the run: the
|
|
122
|
-
* manifest is dispatched before the chart starts, so there is no stage to
|
|
123
|
-
* inherit and inventing a plausible one would put a node in every step strip
|
|
124
|
-
* that no traversal ever visited. This says plainly where it came from.
|
|
125
|
-
*/
|
|
126
|
-
const RUN_MANIFEST_STAGE_ID = 'run-configured#0';
|
|
127
|
-
/**
|
|
128
|
-
* Pseudo-stage for `agentfootprint.integrity.disposition` (9.60.0) — the
|
|
129
|
-
* ledger is filed at the run boundary, after the last stage committed, so it
|
|
130
|
-
* states where it came from exactly as the teardown id above does.
|
|
131
|
-
*/
|
|
132
|
-
const INTEGRITY_DISPOSITION_STAGE_ID = 'integrity-disposition#0';
|
|
133
|
-
/**
|
|
134
|
-
* Pseudo-stage for `agentfootprint.skill.graph_declared` (9.50.0) — same
|
|
135
|
-
* reasoning as the manifest id directly above: dispatched before the chart
|
|
136
|
-
* starts, so it states where it came from instead of inheriting a stage no
|
|
137
|
-
* traversal visited.
|
|
138
|
-
*/
|
|
139
|
-
const GRAPH_DECLARED_STAGE_ID = 'graph-declared#0';
|
|
140
91
|
const EmitBridge_js_1 = require("../recorders/core/EmitBridge.js");
|
|
141
92
|
const window_js_1 = require("./agent/stages/window.js");
|
|
142
93
|
const options_js_1 = require("./agent/window/options.js");
|
|
143
94
|
const deliver_js_1 = require("./agent/stages/deliver.js");
|
|
144
95
|
const providerTargets_js_1 = require("./agent/providerTargets.js");
|
|
145
|
-
const
|
|
96
|
+
const injectionDelivery_js_1 = require("./agent/run/injectionDelivery.js");
|
|
146
97
|
const errors_js_1 = require("./agent/window/errors.js");
|
|
147
98
|
const checkin_js_1 = require("./checkin.js");
|
|
148
99
|
const cost_js_1 = require("./cost.js");
|
|
149
|
-
const evidenceRecorder_js_1 = require("../memory/causal/evidenceRecorder.js");
|
|
150
100
|
const buildSystemPromptSlot_js_1 = require("./slots/buildSystemPromptSlot.js");
|
|
151
101
|
const buildMessagesSlot_js_1 = require("./slots/buildMessagesSlot.js");
|
|
152
102
|
const buildToolsSlot_js_1 = require("./slots/buildToolsSlot.js");
|
|
153
|
-
const
|
|
103
|
+
const discoverTools_js_1 = require("./slots/discoverTools.js");
|
|
104
|
+
const footprintjs_1 = require("footprintjs");
|
|
154
105
|
const skillTools_js_1 = require("../injection-engine/skillTools.js");
|
|
155
106
|
const skillSteps_js_1 = require("../injection-engine/skillSteps.js");
|
|
156
107
|
const stepNudge_js_1 = require("./agent/stages/stepNudge.js");
|
|
@@ -174,7 +125,7 @@ const conversation_js_3 = require("./conversation.js");
|
|
|
174
125
|
const inputRequest_js_1 = require("../tools/inputRequest.js");
|
|
175
126
|
const outputSchema_js_1 = require("../answer-validation/outputSchema.js");
|
|
176
127
|
const runInput_js_1 = require("./runInput.js");
|
|
177
|
-
|
|
128
|
+
require("../time/rows.js");
|
|
178
129
|
const clock_js_1 = require("../time/clock.js");
|
|
179
130
|
const outputRetry_js_1 = require("./agent/stages/outputRetry.js");
|
|
180
131
|
const RunnerBase_js_1 = require("./RunnerBase.js");
|
|
@@ -189,7 +140,7 @@ const answerCoverage_js_1 = require("./agent/stages/answerCoverage.js");
|
|
|
189
140
|
const index_js_1 = require("../answer-validation/index.js");
|
|
190
141
|
const seed_js_1 = require("./agent/stages/seed.js");
|
|
191
142
|
const callLLM_js_1 = require("./agent/stages/callLLM.js");
|
|
192
|
-
const
|
|
143
|
+
const index_js_2 = require("./agent/stages/toolCalls/index.js");
|
|
193
144
|
const toolResolver_js_1 = require("./agent/stages/toolResolver.js");
|
|
194
145
|
const route_js_2 = require("./agent/stages/route.js");
|
|
195
146
|
const declare_js_1 = require("../tools/declare.js");
|
|
@@ -207,39 +158,14 @@ const AgentBuilder_js_1 = require("./agent/AgentBuilder.js");
|
|
|
207
158
|
Object.defineProperty(exports, "AgentBuilder", { enumerable: true, get: function () { return AgentBuilder_js_1.AgentBuilder; } });
|
|
208
159
|
const buildThinkingSubflow_js_1 = require("./slots/buildThinkingSubflow.js");
|
|
209
160
|
const dispatch_js_1 = require("../thinking/dispatch.js");
|
|
161
|
+
const eventStageIds_js_1 = require("./agent/run/eventStageIds.js");
|
|
162
|
+
const ledgerFacts_js_1 = require("./agent/run/ledgerFacts.js");
|
|
163
|
+
const withoutTime_js_1 = require("./agent/run/withoutTime.js");
|
|
164
|
+
const resumeRedaction_js_1 = require("./agent/run/resumeRedaction.js");
|
|
165
|
+
const clocks_js_1 = require("./agent/run/clocks.js");
|
|
210
166
|
// Public types (AgentOptions, AgentInput, AgentOutput) extracted to
|
|
211
167
|
// ./agent/types.ts and re-exported above (v2.11.1).
|
|
212
168
|
// AgentState extracted to ./agent/types.ts (v2.11.1).
|
|
213
|
-
/**
|
|
214
|
-
* The ledger-fact hold's default ceiling (9.102.0): how many fact turns the
|
|
215
|
-
* window holds beyond `keepRecentTurns` when `.findings()` and a window
|
|
216
|
-
* strategy are both configured and nobody named a number. Resolved in the
|
|
217
|
-
* constructor, ONCE, and threaded to `buildWindowStage` as a plain number —
|
|
218
|
-
* the stage applies no default of its own (absent = unarmed = no hold), so a
|
|
219
|
-
* reader has one place to look. `window/options.ts ·
|
|
220
|
-
* DEFAULT_KEEP_LAST_TOOL_RESULTS` is the pin's twin of this constant.
|
|
221
|
-
*/
|
|
222
|
-
const DEFAULT_KEEP_LEDGER_FACTS = 4;
|
|
223
|
-
/**
|
|
224
|
-
* Validate the `keepLedgerFacts` dial — `window/options.ts ·
|
|
225
|
-
* requireKeepLastToolResults`'s twin: the same rule, the same moment.
|
|
226
|
-
* Refused at construction, never mid-run.
|
|
227
|
-
*/
|
|
228
|
-
function requireKeepLedgerFacts(value, label) {
|
|
229
|
-
if (value === false)
|
|
230
|
-
return;
|
|
231
|
-
if (!Number.isInteger(value) || value < 0) {
|
|
232
|
-
throw new Error(`${label}: keepLedgerFacts must be a whole number >= 0, or false, got ` +
|
|
233
|
-
`${String(value)}. It is how many fact turns the window holds beyond ` +
|
|
234
|
-
`keepRecentTurns under .findings(); 0 and false both switch the hold off.`);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
/** `false` → `0`; a number as named; nothing named → the default. */
|
|
238
|
-
function resolveKeepLedgerFacts(named) {
|
|
239
|
-
if (named === false)
|
|
240
|
-
return 0;
|
|
241
|
-
return named ?? DEFAULT_KEEP_LEDGER_FACTS;
|
|
242
|
-
}
|
|
243
169
|
class Agent extends RunnerBase_js_1.RunnerBase {
|
|
244
170
|
name;
|
|
245
171
|
id;
|
|
@@ -342,7 +268,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
342
268
|
skillGraphCascade;
|
|
343
269
|
/** Side channel for the conversation's inherited skill cursor (SG-C) —
|
|
344
270
|
* stashed by `applyContinuation`, consumed-and-cleared by seed. */
|
|
345
|
-
pendingResumeSkillCursor;
|
|
346
271
|
pricingTable;
|
|
347
272
|
/** Normalized at construction: a bare number is `{ usd, onExceed: 'warn' }`. */
|
|
348
273
|
costBudget;
|
|
@@ -409,18 +334,15 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
409
334
|
* cleared when `run()` ends, so a later turn this agent did not start (its
|
|
410
335
|
* chart mounted in a composition) never stamps a clock nobody declared for
|
|
411
336
|
* it (`seedClockDraft`). */
|
|
412
|
-
runClockDraft;
|
|
413
337
|
/** The incoming request each of this agent's OWN scopes serves — recorded
|
|
414
338
|
* by the executor that made the scope (`createExecutor`), so a scope keeps
|
|
415
339
|
* ITS run's request for as long as it lives: a stage still running after
|
|
416
340
|
* its run was aborted can never be served the next run's request. A stage
|
|
417
341
|
* mounted in another runner's executor reads its run's request by link
|
|
418
342
|
* (`memberRun.ts`). Never written to scope. */
|
|
419
|
-
scopeRequests = new WeakMap();
|
|
420
343
|
/** The `time` the CURRENT resume passed, as read — TAKEN once by the first
|
|
421
344
|
* ToolCalls pass of the resumed leg (`ToolCallsHandlerDeps.time`), and
|
|
422
345
|
* cleared when `run()` or `resume()` ends. */
|
|
423
|
-
resumePassedTime;
|
|
424
346
|
/** Tool choice by classifier (9.105.0, `.toolChoice()`): the classifier,
|
|
425
347
|
* the serve dial and the app's own doors. Threaded to the tools slot (the
|
|
426
348
|
* pick and the narrowing), to call-llm (`toolChoice: true`, the outcome
|
|
@@ -464,13 +386,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
464
386
|
/** The message chain (`.messageMiddleware()`), in declaration order. Empty
|
|
465
387
|
* keeps seed synchronous and prepare-final untouched. */
|
|
466
388
|
messageMiddleware;
|
|
467
|
-
/** The instrument the window stage reads mid-run (adapter-reported usage +
|
|
468
|
-
* per-message provenance). Only ever created alongside a strategy. */
|
|
469
|
-
compactionMeterHandle;
|
|
470
|
-
/** The window stage's seam to the receipt (9.93.0): what left the window at
|
|
471
|
-
* this iteration's head, read by the call-llm mint in the same iteration.
|
|
472
|
-
* Only ever created alongside a strategy, like the meter. */
|
|
473
|
-
evictedTurnsHandle;
|
|
474
389
|
/** Snapshot read-tracking policy (#18/#14) — forwarded to the internal
|
|
475
390
|
* executor. Agent default is `'summary'` (cheap markers), NOT
|
|
476
391
|
* footprintjs's `'full'`. See AgentOptions.readTracking. */
|
|
@@ -520,9 +435,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
520
435
|
* plumbing, never scope state). `run()` resets it; the run boundary
|
|
521
436
|
* files its report and clears it.
|
|
522
437
|
*/
|
|
523
|
-
integrityLedgerHolder = {
|
|
524
|
-
current: undefined,
|
|
525
|
-
};
|
|
526
438
|
/** Set at chart build: whether any tool in the FULL declared catalog
|
|
527
439
|
* (static registry + skill-carried tools) declared `argumentsFrom`. */
|
|
528
440
|
integrityDanglingPresent = false;
|
|
@@ -557,9 +469,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
557
469
|
* every `run()` / `resume()` so one run can never raise on another's block,
|
|
558
470
|
* and cleared per service the moment that credential is issued.
|
|
559
471
|
*/
|
|
560
|
-
consentOutstanding = new Map();
|
|
561
|
-
/** Evidence bridge (#5) — present iff a CAUSAL memory is mounted. */
|
|
562
|
-
causalEvidence;
|
|
563
472
|
/** Observer delivery tier (RFC-001 Block 10). `'inline'` (default) is
|
|
564
473
|
* byte-identical to pre-10 releases; `'deferred'` routes the bridge
|
|
565
474
|
* recorders + consumer attachments through footprintjs's bounded
|
|
@@ -578,11 +487,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
578
487
|
appName;
|
|
579
488
|
commentaryTemplates;
|
|
580
489
|
thinkingTemplates;
|
|
581
|
-
currentRunContext = {
|
|
582
|
-
runStartMs: 0,
|
|
583
|
-
runId: 'pending',
|
|
584
|
-
compositionPath: [],
|
|
585
|
-
};
|
|
586
490
|
/**
|
|
587
491
|
* The typed ask the CURRENT run's resume answered — set by
|
|
588
492
|
* `resume()` when a person's answer completed an `awaitingInput`, cleared
|
|
@@ -591,8 +495,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
591
495
|
* `ToolCallsHandlerDeps.answeredAsk`. The count crosses checkpoints on the
|
|
592
496
|
* awaiting-input shape itself (`repeat.count`), not here.
|
|
593
497
|
*/
|
|
594
|
-
answeredAsk;
|
|
595
|
-
// `lastExecutor` is now inherited as a protected field from RunnerBase
|
|
596
498
|
// (single canonical source for footprintjs snapshot access across all
|
|
597
499
|
// runners). Agent's `getLastSnapshot()` delegates to the inherited
|
|
598
500
|
// implementation but is kept here for the JSDoc + clearer return type.
|
|
@@ -636,28 +538,21 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
636
538
|
* instead of starting fresh, and appends this turn's user entry when
|
|
637
539
|
* `appendsUserTurn` says so. Cleared on first read so subsequent runs
|
|
638
540
|
* start clean. */
|
|
639
|
-
pendingResumeHistory;
|
|
640
541
|
/** Retried request's repair state; never inherited by a new human turn. */
|
|
641
|
-
pendingEvidenceRecovery;
|
|
642
542
|
/** Its sibling for the folded spans. A restored conversation that dropped
|
|
643
543
|
* them would carry summaries nobody could unpack — the evidence would be
|
|
644
544
|
* destroyed by the act of continuing, which is the one thing retention
|
|
645
545
|
* exists to prevent. Cleared on first read, exactly like the history. */
|
|
646
|
-
pendingResumeFolded;
|
|
647
546
|
/** Its sibling for the findings ledger (9.101.0) — the model's standings
|
|
648
547
|
* on results this process never saw, carried by the checkpoint and
|
|
649
548
|
* restored as a stored record. Cleared on first read, like the history. */
|
|
650
|
-
pendingResumeFindingsLedger;
|
|
651
549
|
/** The last completed run's final answer — see `checkpoint()` for why it is
|
|
652
550
|
* kept here rather than read back from the recording. Undefined after a run
|
|
653
551
|
* that failed or paused. */
|
|
654
|
-
lastRunAnswer;
|
|
655
552
|
/** Last run's checkpoint owner, including explicit replay edits from a failed child stage. */
|
|
656
|
-
checkpointTracker;
|
|
657
553
|
/** Whether any run on this instance got past input admission — so a
|
|
658
554
|
* refused FIRST turn is reported as 'never-run', never as "continue from
|
|
659
555
|
* your earlier accepted checkpoint" when there is none. */
|
|
660
|
-
hadAdmittedRun = false;
|
|
661
556
|
/** The id the CONSUMER chose, or undefined when they took the default.
|
|
662
557
|
* `this.id` cannot answer that question — it is `'agent'` either way — and
|
|
663
558
|
* the stored-conversation fingerprint refuses only on ids somebody picked
|
|
@@ -673,28 +568,22 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
673
568
|
* paused run's own record (`agent/callerIdentity.ts · callerIdentityOf`).
|
|
674
569
|
* A resume that inherited it instead stored another person's identity on
|
|
675
570
|
* a shared agent and none on a rebuilt pooled one. */
|
|
676
|
-
lastRunIdentity;
|
|
677
571
|
/** Run ids this instance minted, most recent last (bounded) — evidence that a
|
|
678
572
|
* checkpoint's `{ conversationId: '<runId>' }` is the per-run default
|
|
679
573
|
* (`agent/callerIdentity.ts`). */
|
|
680
|
-
mintedRunIds = new Set();
|
|
681
574
|
/** The self-explain evidence key of the run in flight (or served last):
|
|
682
575
|
* its session, else a host's per-request key, else undefined
|
|
683
576
|
* (`agent/servingConversation.ts`). */
|
|
684
|
-
servingConversation;
|
|
685
577
|
/** How long ONE tool teardown may take before the runner stops waiting.
|
|
686
578
|
* See `AgentOptions.toolTeardownTimeoutMs`. */
|
|
687
579
|
toolTeardownTimeoutMs;
|
|
688
580
|
/** The run in flight, by id — the whole of the one-turn-at-a-time guard.
|
|
689
581
|
* Set before the executor is built and cleared in `finally`, so a run that
|
|
690
582
|
* throws does not leave the agent permanently refusing. */
|
|
691
|
-
inFlightRunId;
|
|
692
583
|
/** The scopes this agent's OWN executors made — see the `isOwnRun` seed dep. */
|
|
693
|
-
ownScopes = new WeakSet();
|
|
694
584
|
/** The question a person still owes this agent an answer to. Set when a run
|
|
695
585
|
* ends paused, cleared by `resume()`, `abandonPause()`, or a run that
|
|
696
586
|
* completes. Read by the `run()` guard — see `PendingQuestionError`. */
|
|
697
|
-
pendingQuestion;
|
|
698
587
|
/** The `.selfExplain()` binding, when the builder mounted one. Held so
|
|
699
588
|
* `canExplain()` can answer the same question the trace tools answer, from
|
|
700
589
|
* the same fact. Undefined on every agent that never called `.selfExplain()`. */
|
|
@@ -767,9 +656,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
767
656
|
/** `AgentOptions.recordReceipt` (9.88.0) — ON by default. `false` declines
|
|
768
657
|
* the mint at `callLLM`; nothing else about the run changes. */
|
|
769
658
|
recordReceiptValue = true;
|
|
770
|
-
/** The receipt memo every call of a run mints through — one per agent,
|
|
771
|
-
* rebinding itself to each run id (`core/agent/receipt/receiptDigests.ts`). */
|
|
772
|
-
receiptDigests = (0, receiptDigests_js_1.createReceiptDigests)();
|
|
773
659
|
answerValidationConfig;
|
|
774
660
|
negativeClaimsConfig;
|
|
775
661
|
typedNegativeClaimsConfig;
|
|
@@ -779,11 +665,15 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
779
665
|
// Which conversation this instance's self-explain evidence belongs to —
|
|
780
666
|
// held in a module registry, not on the class, so it is not public API
|
|
781
667
|
// (`agent/servingConversation.ts`).
|
|
782
|
-
(0, servingConversation_js_1.registerServingConversation)(this, () =>
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
668
|
+
(0, servingConversation_js_1.registerServingConversation)(this, () => {
|
|
669
|
+
const selected = this.runExecution().selected();
|
|
670
|
+
const conversation = selected?.value.servingConversation;
|
|
671
|
+
return {
|
|
672
|
+
conversation,
|
|
673
|
+
runId: selected?.context.runId ?? 'pending',
|
|
674
|
+
...(conversation?.startsWith('hosted:') === true && { oneShot: true }),
|
|
675
|
+
};
|
|
676
|
+
});
|
|
787
677
|
this.negativeClaimsConfig = negativeClaimsConfig;
|
|
788
678
|
this.typedNegativeClaimsConfig =
|
|
789
679
|
negativeClaimsConfig?.mode === 'typed' ? negativeClaimsConfig : undefined;
|
|
@@ -876,20 +766,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
876
766
|
// Eager validation: memory ids must be unique so per-id scope keys
|
|
877
767
|
// (`memoryInjection_${id}`) don't collide.
|
|
878
768
|
(0, validators_js_1.validateMemoryIdUniqueness)(memories);
|
|
879
|
-
// Evidence bridge (#5): a CAUSAL memory gets a run-scoped harvest recorder
|
|
880
|
-
// (decisions/toolCalls/iterations/duration/tokens). Attached per run below;
|
|
881
|
-
// its `collect` is threaded into the write mount via chartDeps.
|
|
882
|
-
if (memories.some((m) => m.type === 'causal')) {
|
|
883
|
-
const evidence = (0, evidenceRecorder_js_1.causalEvidenceRecorder)();
|
|
884
|
-
this.causalEvidence = evidence;
|
|
885
|
-
// A causal memory is working state: its store keeps what a later run
|
|
886
|
-
// replays to the MODEL, so its tool calls are read on the real-value
|
|
887
|
-
// path, never off the served events — a policy keeps a run's records
|
|
888
|
-
// clean, never what the agent will compute on (`src/redaction/`). The
|
|
889
|
-
// decisions it keeps come from footprintjs's flow channel, which serves
|
|
890
|
-
// them under the policy (a named limit in `src/redaction/README.md`).
|
|
891
|
-
this.dispatcher.onRealEvent((event) => evidence.onEmit({ name: event.type, payload: event.payload }));
|
|
892
|
-
}
|
|
893
769
|
// A dial without its switch — refused rather than run as a no-op (8.13.0).
|
|
894
770
|
// Same policy as `observerDeliveryOptions` below; the message and the check
|
|
895
771
|
// are shared with LLMCall, which takes the identical pair.
|
|
@@ -984,20 +860,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
984
860
|
// (attached per run, cleared between runs like every other recorder)
|
|
985
861
|
// because the window stage closes over it at chart-build time — and the
|
|
986
862
|
// chart is built once.
|
|
987
|
-
if (windowStrategy !== undefined)
|
|
863
|
+
if (windowStrategy !== undefined)
|
|
988
864
|
this.windowStrategy = windowStrategy;
|
|
989
|
-
const meter = (0, CompactionMeter_js_1.compactionMeter)();
|
|
990
|
-
this.compactionMeterHandle = meter;
|
|
991
|
-
this.evictedTurnsHandle = (0, evictedTurns_js_1.createEvictedTurnsHandle)();
|
|
992
|
-
// The provider's token count is a MEASUREMENT the window decides on, so
|
|
993
|
-
// the meter reads it on the real-value path, never off the served event:
|
|
994
|
-
// a redaction pattern that happens to match `input` must not switch
|
|
995
|
-
// compaction off (`src/redaction/runRedaction.ts`).
|
|
996
|
-
this.dispatcher.onRealEvent((event) => {
|
|
997
|
-
if (event.type === 'agentfootprint.stream.llm_end')
|
|
998
|
-
meter.noteLlmEnd(event.payload);
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
865
|
// The two governance chains. Empty arrays (not undefined) so every read
|
|
1002
866
|
// site is a plain `.length > 0` test rather than an optional dance.
|
|
1003
867
|
this.toolMiddleware = toolMiddleware ?? [];
|
|
@@ -1067,14 +931,14 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1067
931
|
// accepted and does nothing — the keepLastToolResults-without-a-window
|
|
1068
932
|
// precedent.
|
|
1069
933
|
if (opts.keepLedgerFacts !== undefined)
|
|
1070
|
-
requireKeepLedgerFacts(opts.keepLedgerFacts, 'Agent');
|
|
934
|
+
(0, ledgerFacts_js_1.requireKeepLedgerFacts)(opts.keepLedgerFacts, 'Agent');
|
|
1071
935
|
if (this.findingsOptions !== undefined) {
|
|
1072
936
|
// Keep the supported findings execution modes explicit. This change
|
|
1073
937
|
// restores prefix caching; it does not add findings support to classic.
|
|
1074
938
|
if (this.reactMode === 'classic') {
|
|
1075
939
|
throw new Error("Agent: .findings() is supported in 'dynamic' and 'dynamic-grouped' modes only; reactMode 'classic' is not supported.");
|
|
1076
940
|
}
|
|
1077
|
-
this.keepLedgerFacts = resolveKeepLedgerFacts(this.findingsOptions.keepLedgerFacts ?? opts.keepLedgerFacts);
|
|
941
|
+
this.keepLedgerFacts = (0, ledgerFacts_js_1.resolveKeepLedgerFacts)(this.findingsOptions.keepLedgerFacts ?? opts.keepLedgerFacts);
|
|
1078
942
|
}
|
|
1079
943
|
// Tool choice by classifier (9.105.0) needs the same per-call recomposition
|
|
1080
944
|
// the ledger does — the pick is made where the served list is built, and
|
|
@@ -1226,20 +1090,60 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1226
1090
|
this.appName = voice.appName;
|
|
1227
1091
|
this.commentaryTemplates = voice.commentaryTemplates;
|
|
1228
1092
|
this.thinkingTemplates = voice.thinkingTemplates;
|
|
1229
|
-
//
|
|
1230
|
-
//
|
|
1231
|
-
//
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1093
|
+
// Build the chart once. Private executable tool catalogs and their domain
|
|
1094
|
+
// handlers are initialized in the actual native component, shared with
|
|
1095
|
+
// its internal charts and isolated from other mounts and admissions.
|
|
1096
|
+
this.initChart(() => this.buildChart(), {
|
|
1097
|
+
runnerId: this.id,
|
|
1098
|
+
compositionPath: [`Agent:${this.id}`],
|
|
1099
|
+
initialize: () => {
|
|
1100
|
+
const values = (0, runValues_js_1.createAgentRunValues)({ window: this.windowStrategy !== undefined });
|
|
1101
|
+
this.beginIntegrityLedger(values);
|
|
1102
|
+
return values;
|
|
1103
|
+
},
|
|
1104
|
+
options: {
|
|
1105
|
+
readTracking: this.readTracking,
|
|
1106
|
+
commitValues: this.commitValues,
|
|
1107
|
+
writeProvenance: this.writeProvenance,
|
|
1108
|
+
},
|
|
1109
|
+
componentSetup: (component, value, entry) => {
|
|
1110
|
+
value.resources = (0, componentResources_js_1.componentResources)(component, () => this.toolSessions());
|
|
1111
|
+
if (entry?.kind === 'resume')
|
|
1112
|
+
value.resources.expectAnswer();
|
|
1113
|
+
const observers = (0, componentObservers_js_1.agentComponentObservers)(component, value, entry, {
|
|
1114
|
+
causal: this.memories.some((memory) => memory.type === 'causal'),
|
|
1115
|
+
window: this.windowStrategy !== undefined,
|
|
1116
|
+
});
|
|
1117
|
+
return {
|
|
1118
|
+
recorder: observers.recorder,
|
|
1119
|
+
bindScope: (scope) => {
|
|
1120
|
+
const run = this.runExecution().forScope(scope);
|
|
1121
|
+
value.resources?.bindReporter((status) => (0, runRedaction_js_1.captureLateEmitter)(scope, eventStageIds_js_1.TOOL_TEARDOWN_STAGE_ID)?.('agentfootprint.tools.resource_restore', status));
|
|
1122
|
+
(0, runRedaction_js_1.bindScopeComputation)(scope, {
|
|
1123
|
+
owner: component,
|
|
1124
|
+
retired: () => run.retired,
|
|
1125
|
+
emit: observers.emit,
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
1128
|
+
};
|
|
1129
|
+
},
|
|
1130
|
+
});
|
|
1131
|
+
const live = (0, runnerLive_js_1.runnerLive)(this);
|
|
1132
|
+
if (live === undefined)
|
|
1133
|
+
throw new TypeError('Agent live taps were not initialized');
|
|
1134
|
+
(0, runnerLive_js_1.registerRunnerLive)(this, {
|
|
1135
|
+
...live,
|
|
1136
|
+
turn: (0, hostTurn_js_1.hostedTurns)(this.runExecution(), {
|
|
1137
|
+
run: (run, input, options) => this.runOwned(run, input, options),
|
|
1138
|
+
resume: (run, checkpoint, input, options) => this.resumeOwned(run, checkpoint, input, options),
|
|
1139
|
+
prepareResume: (checkpoint) => this.noteResumeTakenUp(checkpoint),
|
|
1140
|
+
checkpoint: (run) => this.checkpointFor(run),
|
|
1141
|
+
}),
|
|
1142
|
+
pause: {
|
|
1143
|
+
capture: (outcome) => (0, pauseOwnership_js_1.capturePauseOwnership)(this.runExecution().selected()?.value, outcome),
|
|
1144
|
+
abandon: (checkpoint) => this.runExecution().withRun(() => (0, pauseOwnership_js_1.abandonStoredPause)(checkpoint, () => this.toolSessions())),
|
|
1145
|
+
},
|
|
1146
|
+
});
|
|
1243
1147
|
}
|
|
1244
1148
|
static create(opts) {
|
|
1245
1149
|
return new AgentBuilder_js_1.AgentBuilder(opts);
|
|
@@ -1285,13 +1189,26 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1285
1189
|
* The one difference is the timeline's filter: a recording filed FOR a
|
|
1286
1190
|
* person keeps only the events of that person's run.
|
|
1287
1191
|
*/
|
|
1288
|
-
startRunRecording() {
|
|
1192
|
+
startRunRecording(invocation) {
|
|
1289
1193
|
if (this.artifactRecordings === undefined || this.artifactStore === undefined)
|
|
1290
1194
|
return undefined;
|
|
1291
1195
|
// Only THIS run's events: on an instance serving several sessions, the
|
|
1292
1196
|
// hosting door emits facts for other sessions while this run is in flight,
|
|
1293
1197
|
// and a recording is redeemable by the person it was filed for.
|
|
1294
|
-
|
|
1198
|
+
const recording = (0, recordRun_js_1.recordRunWhere)(this, (event) => invocation.run.origin !== undefined && (0, eventMeta_js_1.eventBelongsToRun)(event.meta, invocation.context()));
|
|
1199
|
+
let outcome;
|
|
1200
|
+
// Registered before component setup. Native reverse finalization joins
|
|
1201
|
+
// resource cleanup first, then files this recording, then detaches it.
|
|
1202
|
+
invocation.run.onFinalize(() => recording.stop());
|
|
1203
|
+
invocation.run.onFinalize(async () => {
|
|
1204
|
+
if (outcome !== undefined)
|
|
1205
|
+
await this.fileRunRecording(invocation, recording, outcome);
|
|
1206
|
+
});
|
|
1207
|
+
return {
|
|
1208
|
+
complete(value) {
|
|
1209
|
+
outcome = value;
|
|
1210
|
+
},
|
|
1211
|
+
};
|
|
1295
1212
|
}
|
|
1296
1213
|
/**
|
|
1297
1214
|
* Does `event` belong to the run this agent is serving (or served last)? The
|
|
@@ -1302,13 +1219,14 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1302
1219
|
* @internal
|
|
1303
1220
|
*/
|
|
1304
1221
|
ownsEvent(event) {
|
|
1305
|
-
|
|
1222
|
+
const selected = this.runExecution().selected();
|
|
1223
|
+
return selected !== undefined && (0, eventMeta_js_1.eventBelongsToRun)(event.meta, selected.context);
|
|
1306
1224
|
}
|
|
1307
1225
|
/**
|
|
1308
1226
|
* File the finished recording into the artifact store.
|
|
1309
1227
|
*
|
|
1310
1228
|
* ── When ────────────────────────────────────────────────────────────────
|
|
1311
|
-
* After the answer
|
|
1229
|
+
* After the answer and joined component resource cleanup, only for a run that COMPLETED. A pause
|
|
1312
1230
|
* is not a finished run (the turn continues, and the resume mints its own);
|
|
1313
1231
|
* a throw never reaches here at all.
|
|
1314
1232
|
*
|
|
@@ -1332,14 +1250,14 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1332
1250
|
* The recording is FROZEN before the mint, so it can never contain the
|
|
1333
1251
|
* `artifacts.minted` event describing itself.
|
|
1334
1252
|
*/
|
|
1335
|
-
async fileRunRecording(recorder, outcome) {
|
|
1253
|
+
async fileRunRecording(invocation, recorder, outcome) {
|
|
1336
1254
|
const store = this.artifactStore;
|
|
1337
1255
|
if (recorder === undefined || store === undefined || this.artifactRecordings === undefined) {
|
|
1338
1256
|
return;
|
|
1339
1257
|
}
|
|
1340
1258
|
if ((0, pause_js_1.isPaused)(outcome))
|
|
1341
1259
|
return;
|
|
1342
|
-
const runId =
|
|
1260
|
+
const runId = invocation.context().runId;
|
|
1343
1261
|
let input;
|
|
1344
1262
|
try {
|
|
1345
1263
|
const recording = recorder.toRecording();
|
|
@@ -1355,7 +1273,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1355
1273
|
return;
|
|
1356
1274
|
}
|
|
1357
1275
|
try {
|
|
1358
|
-
const result = await store.put(this.runArtifactScope(), input);
|
|
1276
|
+
const result = await store.put(this.runArtifactScope(invocation), input);
|
|
1359
1277
|
// Sweeps ride the put result, so retention that evicted an older
|
|
1360
1278
|
// recording to make room says so on the record — the same law a tool's
|
|
1361
1279
|
// own mint follows.
|
|
@@ -1399,14 +1317,14 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1399
1317
|
* the one the run's tools used, and a recording filed in a different scope
|
|
1400
1318
|
* from the artifacts it describes is a recording nobody can find.
|
|
1401
1319
|
*/
|
|
1402
|
-
runArtifactScope() {
|
|
1403
|
-
const identity =
|
|
1320
|
+
runArtifactScope(invocation) {
|
|
1321
|
+
const identity = invocation.view.snapshot()?.sharedState
|
|
1404
1322
|
?.runIdentity;
|
|
1405
1323
|
if (identity === undefined) {
|
|
1406
1324
|
// No state to read means no run happened, which this path cannot reach —
|
|
1407
1325
|
// but a scope is required and inventing a tenant would be worse than a
|
|
1408
1326
|
// conversation id that names the run itself.
|
|
1409
|
-
return { conversationId:
|
|
1327
|
+
return { conversationId: invocation.context().runId };
|
|
1410
1328
|
}
|
|
1411
1329
|
return {
|
|
1412
1330
|
conversationId: identity.conversationId,
|
|
@@ -1452,14 +1370,13 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1452
1370
|
* read or write of a selected key reads `[REDACTED]`, and an `[emit]` line
|
|
1453
1371
|
* shows the event's served payload (`src/redaction/runRedaction.ts`).
|
|
1454
1372
|
*/
|
|
1373
|
+
/** Empty during preparation before native origin; capture prior entries before the next call. */
|
|
1455
1374
|
getLastNarrativeEntries() {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
// nothing — its narrative was written under no rule anyone knows.
|
|
1460
|
-
if ((0, runRedaction_js_1.coverageOfExecutor)(this.lastExecutor).state === 'unknown')
|
|
1375
|
+
const selected = this.runExecution().selected();
|
|
1376
|
+
const coverage = selected?.value.redaction?.coverage;
|
|
1377
|
+
if (selected === undefined || coverage === undefined || coverage.state === 'unknown')
|
|
1461
1378
|
return [];
|
|
1462
|
-
return
|
|
1379
|
+
return selected.view.getNarrativeEntries();
|
|
1463
1380
|
}
|
|
1464
1381
|
/**
|
|
1465
1382
|
* The FlowChart compiled for the most recent run (or a freshly-built
|
|
@@ -1544,7 +1461,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1544
1461
|
* `OutputSchemaError` — hand it to the 3-tier fallback. The one settle for
|
|
1545
1462
|
* `parseOutputAsync`'s parse failure and `runTyped`'s native stop failure.
|
|
1546
1463
|
*/
|
|
1547
|
-
async settleTypedFailure(raw, err) {
|
|
1464
|
+
async settleTypedFailure(raw, err, invocation) {
|
|
1548
1465
|
const parser = this.outputSchemaParser;
|
|
1549
1466
|
if (!this.outputFallbackCfg || !(err instanceof outputSchema_js_1.OutputSchemaError))
|
|
1550
1467
|
throw err;
|
|
@@ -1560,13 +1477,16 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1560
1477
|
type: eventType,
|
|
1561
1478
|
timestamp: Date.now(),
|
|
1562
1479
|
payload,
|
|
1480
|
+
...(invocation !== undefined && {
|
|
1481
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: '__typed_output__' }, invocation.context()),
|
|
1482
|
+
}),
|
|
1563
1483
|
});
|
|
1564
1484
|
}
|
|
1565
1485
|
catch {
|
|
1566
1486
|
/* observability errors must not poison the fallback path */
|
|
1567
1487
|
}
|
|
1568
1488
|
};
|
|
1569
|
-
return (0, outputFallback_js_1.applyOutputFallback)(raw, parser, this.outputFallbackCfg, emit, err, this.
|
|
1489
|
+
return (0, outputFallback_js_1.applyOutputFallback)(raw, parser, this.outputFallbackCfg, emit, err, invocation === undefined ? undefined : this.retriesSpent(invocation));
|
|
1570
1490
|
}
|
|
1571
1491
|
/**
|
|
1572
1492
|
* Corrective re-asks the agent's LAST run paid for, read off its own ledger.
|
|
@@ -1575,8 +1495,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1575
1495
|
* any string, including one that never came from this agent, and reporting
|
|
1576
1496
|
* `0` for "I do not know" would be an invented fact in an event payload.
|
|
1577
1497
|
*/
|
|
1578
|
-
|
|
1579
|
-
const state =
|
|
1498
|
+
retriesSpent(invocation) {
|
|
1499
|
+
const state = invocation.view.snapshot()?.sharedState;
|
|
1580
1500
|
if (state === undefined)
|
|
1581
1501
|
return undefined;
|
|
1582
1502
|
return Math.max(0, (state.outputAttempts?.length ?? 1) - 1);
|
|
@@ -1597,36 +1517,43 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1597
1517
|
* `agent.answerCoverage()`.
|
|
1598
1518
|
*/
|
|
1599
1519
|
async runTyped(input, options) {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
`Agent.
|
|
1603
|
-
|
|
1604
|
-
const out = await this.run(input, options);
|
|
1605
|
-
if (typeof out !== 'string') {
|
|
1606
|
-
throw new Error('Agent.runTyped: run paused — typed mode does not support pauses. ' +
|
|
1607
|
-
'Use agent.run() + agent.parseOutput(...) after resume.');
|
|
1608
|
-
}
|
|
1609
|
-
// `strategy: 'native'`: an answer whose last attempt failed on a refusal
|
|
1610
|
-
// or truncation stop is refused here even when its text parses — the
|
|
1611
|
-
// format did not hold for it (outputEnforcement.ts · nativeStopFailure).
|
|
1612
|
-
// FIRST, before any delivery path. It takes the same path a parse failure
|
|
1613
|
-
// takes, `.outputFallback()` included.
|
|
1614
|
-
const stopped = this.outputEnforcement?.outputFormat !== undefined ? this.outputContractUnmet() : undefined;
|
|
1615
|
-
if (stopped?.stopReason !== undefined) {
|
|
1616
|
-
return this.settleTypedFailure(out, new outputSchema_js_1.OutputSchemaError(stopped.error, { rawOutput: out, stage: stopped.stage }));
|
|
1617
|
-
}
|
|
1618
|
-
if (this.answerValidationConfig !== undefined) {
|
|
1619
|
-
// The validator judged the schema's JSON output. Do not run a transforming
|
|
1620
|
-
// or stateful parser again and hand back a value the validator never saw.
|
|
1621
|
-
if (this.answerValidation()?.schemaAccepted !== true) {
|
|
1622
|
-
throw new outputSchema_js_1.OutputSchemaError('Answer validation could not establish a JSON schema result.', {
|
|
1623
|
-
rawOutput: out,
|
|
1624
|
-
stage: 'schema-validate',
|
|
1625
|
-
});
|
|
1520
|
+
return this.runExecution().withRun(async (invocation) => {
|
|
1521
|
+
if (!this.outputSchemaParser) {
|
|
1522
|
+
throw new Error(`Agent.runTyped: this agent has no outputSchema. Use ` +
|
|
1523
|
+
`Agent.create({...}).outputSchema(parser).build() to enable typed output.`);
|
|
1626
1524
|
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1525
|
+
const out = await this.runOwned(invocation, input, options);
|
|
1526
|
+
if (typeof out !== 'string') {
|
|
1527
|
+
throw new Error('Agent.runTyped: run paused — typed mode does not support pauses. ' +
|
|
1528
|
+
'Use agent.run() + agent.parseOutput(...) after resume.');
|
|
1529
|
+
}
|
|
1530
|
+
// `strategy: 'native'`: an answer whose last attempt failed on a refusal
|
|
1531
|
+
// or truncation stop is refused here even when its text parses — the
|
|
1532
|
+
// format did not hold for it (outputEnforcement.ts · nativeStopFailure).
|
|
1533
|
+
// FIRST, before any delivery path. It takes the same path a parse failure
|
|
1534
|
+
// takes, `.outputFallback()` included.
|
|
1535
|
+
const stopped = this.outputEnforcement?.outputFormat !== undefined ? this.outputContractUnmet() : undefined;
|
|
1536
|
+
if (stopped?.stopReason !== undefined) {
|
|
1537
|
+
return this.settleTypedFailure(out, new outputSchema_js_1.OutputSchemaError(stopped.error, { rawOutput: out, stage: stopped.stage }), invocation);
|
|
1538
|
+
}
|
|
1539
|
+
if (this.answerValidationConfig !== undefined) {
|
|
1540
|
+
// The validator judged the schema's JSON output. Do not run a transforming
|
|
1541
|
+
// or stateful parser again and hand back a value the validator never saw.
|
|
1542
|
+
if (this.answerValidation()?.schemaAccepted !== true) {
|
|
1543
|
+
throw new outputSchema_js_1.OutputSchemaError('Answer validation could not establish a JSON schema result.', {
|
|
1544
|
+
rawOutput: out,
|
|
1545
|
+
stage: 'schema-validate',
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
return (0, outputSchema_js_1.applyOutputSchema)(out, { parse: (value) => value });
|
|
1549
|
+
}
|
|
1550
|
+
try {
|
|
1551
|
+
return (0, outputSchema_js_1.applyOutputSchema)(out, this.outputSchemaParser);
|
|
1552
|
+
}
|
|
1553
|
+
catch (error) {
|
|
1554
|
+
return this.settleTypedFailure(out, error, invocation);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1630
1557
|
}
|
|
1631
1558
|
/**
|
|
1632
1559
|
* Answer one turn.
|
|
@@ -1666,6 +1593,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1666
1593
|
* ```
|
|
1667
1594
|
*/
|
|
1668
1595
|
async run(input, options) {
|
|
1596
|
+
return this.runExecution().withRun((invocation) => this.runOwned(invocation, input, options));
|
|
1597
|
+
}
|
|
1598
|
+
async runOwned(invocation, input, options) {
|
|
1599
|
+
invocation.value.hadAdmitted = invocation.previous?.value.hadAdmitted === true;
|
|
1669
1600
|
// Normalize or refuse BEFORE anything is created. A bare string is the
|
|
1670
1601
|
// message; anything that is not a message is named and refused here
|
|
1671
1602
|
// rather than becoming `content: undefined` inside the messages slot.
|
|
@@ -1695,13 +1626,12 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1695
1626
|
// never on the server's zone.
|
|
1696
1627
|
const clockDraft = this.clockDraftFor(runInput.time ?? options?.time, 'Agent.run');
|
|
1697
1628
|
// The engine's options; the run's signal (and its deadline) is armed just
|
|
1698
|
-
// before
|
|
1699
|
-
const engineOptions = withoutTime(options);
|
|
1629
|
+
// before native execution, whose lifecycle releases it.
|
|
1630
|
+
const engineOptions = (0, withoutTime_js_1.withoutTime)(options);
|
|
1700
1631
|
// Timing next, and before the executor exists: both of these refuse a call
|
|
1701
1632
|
// that would have SUCCEEDED into corrupted per-instance state or an
|
|
1702
1633
|
// orphaned human question. See ./conversation.ts for why they are throws.
|
|
1703
|
-
this.
|
|
1704
|
-
this.assertNoPendingQuestion('Agent.run');
|
|
1634
|
+
this.assertNoPendingQuestion('Agent.run', invocation.previous?.value);
|
|
1705
1635
|
// A conversation handed in continues through the same side channel
|
|
1706
1636
|
// `resumeOnError` uses — one restoration path, so the two doors cannot
|
|
1707
1637
|
// drift about what "continue" means. This turn's message IS appended:
|
|
@@ -1710,97 +1640,98 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1710
1640
|
let continued;
|
|
1711
1641
|
if (runInput.continueFrom !== undefined) {
|
|
1712
1642
|
continued = (0, runCheckpoint_js_1.validateCheckpoint)(runInput.continueFrom);
|
|
1713
|
-
this.applyContinuation(continued, 'Agent.run({ continueFrom })', true);
|
|
1643
|
+
this.applyContinuation(invocation.value, continued, 'Agent.run({ continueFrom })', true);
|
|
1714
1644
|
}
|
|
1715
1645
|
// Only an EXPLICIT identity is remembered for `checkpoint()`; see the
|
|
1716
1646
|
// field's note. `input.identity` wins over `options.identity` because the
|
|
1717
1647
|
// input bag is where a caller looks first, and both win over the stored
|
|
1718
1648
|
// conversation's — but the conversation's is used when neither was given,
|
|
1719
1649
|
// so a continued turn stays in the namespace it started in.
|
|
1720
|
-
|
|
1650
|
+
invocation.value.identity =
|
|
1721
1651
|
runInput.identity ?? options?.identity ?? (continued ? continued.identity : undefined);
|
|
1722
1652
|
// Recordings-as-artifacts (9.26.0). BEFORE `createExecutor`, because
|
|
1723
1653
|
// `attach()` collects recorders for the executor that has not been built
|
|
1724
1654
|
// yet — a recording started one line later would be missing its
|
|
1725
1655
|
// boundaries, which is the failure mode `recordRun` exists to prevent.
|
|
1726
1656
|
// Returns `undefined` (and touches nothing) unless the dial is on.
|
|
1727
|
-
const recording = this.startRunRecording();
|
|
1657
|
+
const recording = this.startRunRecording(invocation);
|
|
1728
1658
|
// (helper used in the catch block below — module-private function
|
|
1729
1659
|
// declared at file end via hoisting)
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
const
|
|
1733
|
-
this.inFlightRunId = this.currentRunContext.runId;
|
|
1660
|
+
invocation.value.answeredAsk = undefined;
|
|
1661
|
+
invocation.value.resumePassedTime = undefined;
|
|
1662
|
+
const prepared = this.prepareAgentRun(invocation, engineOptions, runRequest);
|
|
1734
1663
|
// One disposition ledger per run (9.60.0) — registration mirrors what
|
|
1735
1664
|
// this agent's configuration makes applicable; dev posture runs the
|
|
1736
1665
|
// canaries here, BEFORE any real work, so a dead check is named first.
|
|
1737
|
-
this.beginIntegrityLedger();
|
|
1738
1666
|
// Auto-checkpoint at iteration boundaries — captures the latest
|
|
1739
1667
|
// conversation history into a per-run tracker. On error, we
|
|
1740
1668
|
// wrap the underlying error in `RunCheckpointError` carrying
|
|
1741
1669
|
// this checkpoint so `agent.resumeOnError(checkpoint)` can
|
|
1742
1670
|
// continue from the last good iteration.
|
|
1743
1671
|
const tracker = {
|
|
1744
|
-
|
|
1672
|
+
get runId() {
|
|
1673
|
+
return invocation.context().runId;
|
|
1674
|
+
},
|
|
1745
1675
|
originalInput: { message: runInput.message },
|
|
1746
1676
|
history: [],
|
|
1747
1677
|
lastCompletedIteration: 0,
|
|
1748
1678
|
};
|
|
1749
|
-
|
|
1750
|
-
const stopTracking = this.installCheckpointTracker(tracker);
|
|
1679
|
+
invocation.value.checkpointTracker = tracker;
|
|
1751
1680
|
// The answer this run produces is the only place the final assistant turn
|
|
1752
1681
|
// exists (nothing writes it back into `scope.history`), so `checkpoint()`
|
|
1753
1682
|
// keeps it. Cleared here so a failed or paused run cannot hand back the
|
|
1754
1683
|
// previous run's answer.
|
|
1755
|
-
|
|
1684
|
+
invocation.value.answer = undefined;
|
|
1756
1685
|
// One run can never raise on another run's consent block.
|
|
1757
|
-
|
|
1686
|
+
invocation.value.consentOutstanding.clear();
|
|
1758
1687
|
// Set here, beside the `try` whose `finally` clears it, so no exit path
|
|
1759
1688
|
// can leave it behind for a turn this `run()` did not start.
|
|
1760
|
-
|
|
1689
|
+
invocation.value.clockDraft = clockDraft;
|
|
1761
1690
|
// Armed here, beside the `try` whose `finally` releases it: no refused
|
|
1762
1691
|
// call above can leave a deadline running.
|
|
1763
|
-
const runSignal = (0, RunnerBase_js_1.runSignalOf)(engineOptions);
|
|
1764
1692
|
try {
|
|
1765
|
-
const result = await
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1693
|
+
const result = await invocation.execute({
|
|
1694
|
+
kind: 'run',
|
|
1695
|
+
options: {
|
|
1696
|
+
input: {
|
|
1697
|
+
message: runInput.message,
|
|
1698
|
+
...(invocation.value.identity !== undefined && {
|
|
1699
|
+
identity: invocation.value.identity,
|
|
1700
|
+
}),
|
|
1701
|
+
// A composed message reaches seed only on an agent that reads it
|
|
1702
|
+
// (declared sources, or the time layer's reader) — every other run's
|
|
1703
|
+
// input is the bytes it was.
|
|
1704
|
+
...(messageFrom === 'composed' &&
|
|
1705
|
+
(this.argumentSourcesArmed === true || this.timeOptions?.reader !== undefined) && {
|
|
1706
|
+
messageFrom: 'composed',
|
|
1707
|
+
}),
|
|
1708
|
+
},
|
|
1709
|
+
// Co-engineered boundary (#16): the engine's loop-iteration limit
|
|
1710
|
+
// (footprintjs 9 default 1000) must never fire BELOW the agent's own
|
|
1711
|
+
// budget — give it headroom (×2 + 10 covers double-hop loop shapes).
|
|
1712
|
+
// Consumer-provided options win.
|
|
1713
|
+
maxIterations: this.maxIterations * 2 + 10,
|
|
1714
|
+
...(engineOptions ?? {}),
|
|
1776
1715
|
},
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
// budget — give it headroom (×2 + 10 covers double-hop loop shapes).
|
|
1780
|
-
// Consumer-provided options win.
|
|
1781
|
-
maxIterations: this.maxIterations * 2 + 10,
|
|
1782
|
-
...(runSignal.options ?? {}),
|
|
1783
|
-
});
|
|
1784
|
-
const finalized = this.finalizeResult(executor, result);
|
|
1716
|
+
}, prepared.setup, prepared.binding);
|
|
1717
|
+
const finalized = this.finalizeResult(invocation, result);
|
|
1785
1718
|
if (typeof finalized === 'string')
|
|
1786
|
-
|
|
1787
|
-
this.recordPendingQuestion(finalized);
|
|
1788
|
-
await this.endRunToolSessions(finalized);
|
|
1719
|
+
invocation.value.answer = finalized;
|
|
1720
|
+
this.recordPendingQuestion(invocation.value, finalized);
|
|
1789
1721
|
// The answer is FINISHED before this line and cannot be changed by it.
|
|
1790
1722
|
// The liveness theorems (9.60.0, dev posture only) — a run that would
|
|
1791
1723
|
// return green while its registered checkers demonstrably never ran
|
|
1792
1724
|
// fails HERE instead, before the recording is filed. A finished run is
|
|
1793
1725
|
// itself the proof work existed: the loop cannot finish without at
|
|
1794
1726
|
// least one model call.
|
|
1795
|
-
this.assertIntegrityAlive();
|
|
1727
|
+
this.assertIntegrityAlive(invocation);
|
|
1796
1728
|
// See `fileRunRecording` for why the write is awaited rather than left
|
|
1797
1729
|
// in flight, and why it can never fail the run.
|
|
1798
|
-
|
|
1730
|
+
recording?.complete(finalized);
|
|
1799
1731
|
return finalized;
|
|
1800
1732
|
}
|
|
1801
1733
|
catch (cause) {
|
|
1802
1734
|
// A THROWN pause is still a pause — see `endRunToolSessions`.
|
|
1803
|
-
await this.endRunToolSessions(cause);
|
|
1804
1735
|
// Wrap recoverable errors with the last-known-good checkpoint.
|
|
1805
1736
|
// Don't wrap intentional terminal signals — let them propagate as
|
|
1806
1737
|
// their typed shapes so callers can `instanceof` them:
|
|
@@ -1839,7 +1770,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1839
1770
|
// 9.60.0 — a dead checker is a WIRING verdict on this build, not a
|
|
1840
1771
|
// recoverable run state: resuming would run the same dead wiring.
|
|
1841
1772
|
cause.name === 'CheckerDeadError');
|
|
1842
|
-
if (cause instanceof Error &&
|
|
1773
|
+
if (cause instanceof Error &&
|
|
1774
|
+
!isTerminalTypedError &&
|
|
1775
|
+
!invocation.value.checkpointObservationFailed &&
|
|
1776
|
+
tracker.history.length > 0) {
|
|
1843
1777
|
// Observation beats the heuristic: if a bracket was open, it says
|
|
1844
1778
|
// exactly what the run was doing. `classifyFailurePhase` only decides
|
|
1845
1779
|
// when nothing was — a failure between brackets, where the error's own
|
|
@@ -1861,7 +1795,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1861
1795
|
// resuming after a crash would be the one path that still lost the
|
|
1862
1796
|
// identity, and the memory written after the recovery would land
|
|
1863
1797
|
// where nothing could read it.
|
|
1864
|
-
this.conversationOwner(),
|
|
1798
|
+
this.conversationOwner(invocation.value),
|
|
1865
1799
|
// …and the same graph cursor (SG-C), from the same snapshot reader —
|
|
1866
1800
|
// one reader, two carriers, so neither can lose what the other keeps.
|
|
1867
1801
|
this.continuityCursorOf(this.liveSnapshot()?.sharedState), this.evidenceRecoveryOf(this.liveSnapshot()?.sharedState),
|
|
@@ -1878,32 +1812,28 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1878
1812
|
throw cause;
|
|
1879
1813
|
}
|
|
1880
1814
|
finally {
|
|
1881
|
-
//
|
|
1882
|
-
runSignal.release();
|
|
1815
|
+
// Native admission owns deadlines, signal links and final joining.
|
|
1883
1816
|
// The time layer's per-run inputs end with the run: a stale draft would
|
|
1884
1817
|
// be stamped by the next seed this agent did not start (a composition
|
|
1885
1818
|
// mounting its chart) as if the app had declared it.
|
|
1886
|
-
|
|
1887
|
-
|
|
1819
|
+
invocation.value.clockDraft = undefined;
|
|
1820
|
+
invocation.value.resumePassedTime = undefined;
|
|
1888
1821
|
// The run's disposition rows, on EVERY path — success, failure, pause —
|
|
1889
1822
|
// and BEFORE the recording stops, so a recording carries its run's
|
|
1890
1823
|
// checker accounting (9.60.0).
|
|
1891
|
-
this.fileIntegrityDisposition();
|
|
1824
|
+
this.fileIntegrityDisposition(invocation);
|
|
1892
1825
|
// Always released: a recording left subscribed would keep listening
|
|
1893
1826
|
// through the next run and grow a tail nobody reads.
|
|
1894
|
-
this.noteAdmittedRun();
|
|
1895
|
-
recording?.stop();
|
|
1896
|
-
stopTracking();
|
|
1897
|
-
this.inFlightRunId = undefined;
|
|
1827
|
+
this.noteAdmittedRun(invocation);
|
|
1898
1828
|
// `seed` consumes the restored conversation on its way past. A run that
|
|
1899
1829
|
// died BEFORE seed never did, and a history left armed here would be
|
|
1900
1830
|
// picked up by the next run — which would then continue a conversation
|
|
1901
1831
|
// nobody asked it to. One run, one continuation.
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1832
|
+
invocation.value.pendingResumeHistory = undefined;
|
|
1833
|
+
invocation.value.pendingResumeFolded = undefined;
|
|
1834
|
+
invocation.value.pendingResumeFindingsLedger = undefined;
|
|
1835
|
+
invocation.value.pendingResumeSkillCursor = undefined;
|
|
1836
|
+
invocation.value.pendingEvidenceRecovery = undefined;
|
|
1907
1837
|
}
|
|
1908
1838
|
}
|
|
1909
1839
|
/**
|
|
@@ -1939,17 +1869,24 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1939
1869
|
* ```
|
|
1940
1870
|
*/
|
|
1941
1871
|
async followUp(message, options) {
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1872
|
+
return this.runExecution().withRun(async (invocation) => {
|
|
1873
|
+
(0, callerIdentity_js_1.assertIdentityShape)(options?.identity, 'Agent.followUp');
|
|
1874
|
+
// A continuation must exist before any history can be selected.
|
|
1875
|
+
if (invocation.previous?.view.snapshot() === undefined ||
|
|
1876
|
+
(this.lastInputRefused(invocation.previous?.view) &&
|
|
1877
|
+
!invocation.previous?.value.hadAdmitted)) {
|
|
1878
|
+
throw new conversation_js_3.NoConversationError('Agent.followUp', 'never-run');
|
|
1879
|
+
}
|
|
1880
|
+
const conversation = this.checkpointFor(invocation.previous);
|
|
1881
|
+
if (conversation === undefined || conversation.history.length === 0) {
|
|
1882
|
+
throw new conversation_js_3.NoConversationError('Agent.followUp', this.lastInputRefused(invocation.previous?.view)
|
|
1883
|
+
? 'last-input-refused'
|
|
1884
|
+
: 'last-run-unfinished');
|
|
1885
|
+
}
|
|
1886
|
+
if (conversation.identity !== undefined)
|
|
1887
|
+
(0, resumeAnswer_js_1.refuseFollowUpIdentity)(options?.identity, conversation.identity);
|
|
1888
|
+
return this.runOwned(invocation, { message, continueFrom: conversation }, options);
|
|
1889
|
+
});
|
|
1953
1890
|
}
|
|
1954
1891
|
/**
|
|
1955
1892
|
* Drop the question this agent's last run paused to ask, on the record.
|
|
@@ -1966,10 +1903,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1966
1903
|
* does not touch the paused run's checkpoint: if you still hold that, it
|
|
1967
1904
|
* remains resumable.
|
|
1968
1905
|
*/
|
|
1969
|
-
abandonPause() {
|
|
1970
|
-
|
|
1971
|
-
this.pendingQuestion = undefined;
|
|
1972
|
-
return dropped;
|
|
1906
|
+
async abandonPause() {
|
|
1907
|
+
return this.runExecution().withRun((invocation) => (0, pauseOwnership_js_1.abandonPendingQuestion)(invocation.previous?.value));
|
|
1973
1908
|
}
|
|
1974
1909
|
/**
|
|
1975
1910
|
* Whether {@link Agent.selfExplain}'s why-questions have a run to answer
|
|
@@ -2037,32 +1972,33 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2037
1972
|
* ```
|
|
2038
1973
|
*/
|
|
2039
1974
|
async resumeOnError(checkpoint, options) {
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
1975
|
+
return this.runExecution().withRun(async (invocation) => {
|
|
1976
|
+
const cp = (0, runCheckpoint_js_1.validateCheckpoint)(checkpoint);
|
|
1977
|
+
// The timing guards run HERE, not only inside `run()`, because the line
|
|
1978
|
+
// below writes the side channel: a refusal after that write would leave a
|
|
1979
|
+
// restored history armed and the NEXT run would silently continue somebody
|
|
1980
|
+
// else's conversation.
|
|
1981
|
+
this.assertNoPendingQuestion('Agent.resumeOnError', invocation.previous?.value);
|
|
1982
|
+
// A request `run()` would refuse is refused HERE, before the side channel
|
|
1983
|
+
// below is armed — a refusal after it would leave the restored history for
|
|
1984
|
+
// the next, unrelated run.
|
|
1985
|
+
(0, requestOfRun_js_1.requestOf)(options, 'Agent.resumeOnError');
|
|
1986
|
+
// Stash the checkpointed history on the side channel; the seed function
|
|
1987
|
+
// reads + clears it before scope.history initializes. No message is
|
|
1988
|
+
// appended — the failing run's message is already the last user turn in
|
|
1989
|
+
// that history, and adding it again would ask twice.
|
|
1990
|
+
this.applyContinuation(invocation.value, cp, 'Agent.resumeOnError', false);
|
|
1991
|
+
return this.runOwned(invocation, {
|
|
1992
|
+
message: cp.originalInput.message,
|
|
1993
|
+
// The conversation's own identity, unless this call named one. Until
|
|
1994
|
+
// 9.2.0 there was no way to pass either, so a recovered run silently
|
|
1995
|
+
// re-namespaced its memory under a fresh runId and wrote turn two
|
|
1996
|
+
// where turn three could not read it.
|
|
1997
|
+
...(this.identityFor(options, cp) !== undefined && {
|
|
1998
|
+
identity: this.identityFor(options, cp),
|
|
1999
|
+
}),
|
|
2000
|
+
}, options);
|
|
2001
|
+
});
|
|
2066
2002
|
}
|
|
2067
2003
|
/**
|
|
2068
2004
|
* Which identity a continued turn runs under: the caller's if they named
|
|
@@ -2073,141 +2009,21 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2073
2009
|
identityFor(options, cp) {
|
|
2074
2010
|
return options?.identity ?? cp.identity;
|
|
2075
2011
|
}
|
|
2076
|
-
/**
|
|
2077
|
-
* A run's `time`, read into the turn's clock draft (the time layer) — or
|
|
2078
|
-
* refused, before the turn starts: `time` on an agent without `.time()` or
|
|
2079
|
-
* a malformed value. No zone anywhere (the run's, else the builder's) is no
|
|
2080
|
-
* refusal: the zone is UNKNOWN (`zoneSource: 'unknown'`, G15) — never the
|
|
2081
|
-
* server's, never guessed; the person is asked it before any time they
|
|
2082
|
-
* wrote is read. `undefined` on an agent without the layer.
|
|
2083
|
-
*
|
|
2084
|
-
* @internal
|
|
2085
|
-
*/
|
|
2086
2012
|
clockDraftFor(time, runner) {
|
|
2087
|
-
|
|
2088
|
-
if (this.timeOptions === undefined)
|
|
2089
|
-
return undefined;
|
|
2090
|
-
return (0, clock_js_1.draftClock)(passed, this.timeOptions);
|
|
2013
|
+
return (0, clocks_js_1.draftAgentClock)(time, runner, this.timeOptions);
|
|
2091
2014
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
* for a turn this agent's `run()` did not start (its chart mounted in a
|
|
2095
|
-
* composition, which passes no `time`), the builder's fallback zone with
|
|
2096
|
-
* the turn's start as `now` (`zoneSource: 'builder'`, `nowSource:
|
|
2097
|
-
* 'default'` — the same record a `run()` with no `time` files). With no
|
|
2098
|
-
* fallback zone that turn's zone is unknown, as a `run()`'s is (G15): the
|
|
2099
|
-
* server's zone is never used.
|
|
2100
|
-
*
|
|
2101
|
-
* @internal
|
|
2102
|
-
*/
|
|
2103
|
-
seedClockDraft() {
|
|
2104
|
-
if (this.runClockDraft !== undefined)
|
|
2105
|
-
return this.runClockDraft;
|
|
2106
|
-
return (0, clock_js_1.draftClock)(undefined, this.timeOptions ?? {});
|
|
2015
|
+
seedClockDraft(values) {
|
|
2016
|
+
return (0, clocks_js_1.clockForSeed)(values, this.timeOptions);
|
|
2107
2017
|
}
|
|
2108
|
-
/**
|
|
2109
|
-
* A `time` passed to a run or a resume, read — or refused by name: passed to
|
|
2110
|
-
* an agent without `.time()` (a door that ignored it would look configured
|
|
2111
|
-
* and do nothing), or malformed.
|
|
2112
|
-
*
|
|
2113
|
-
* @internal
|
|
2114
|
-
*/
|
|
2115
2018
|
passedTimeFor(time, runner) {
|
|
2116
|
-
|
|
2117
|
-
return undefined;
|
|
2118
|
-
if (this.timeOptions === undefined) {
|
|
2119
|
-
throw new runInput_js_1.InvalidRunInputError({
|
|
2120
|
-
runner,
|
|
2121
|
-
received: 'time',
|
|
2122
|
-
hint: 'this agent reads no clock — arm the time layer with .time() to pass time',
|
|
2123
|
-
});
|
|
2124
|
-
}
|
|
2125
|
-
const read = (0, clock_js_1.readRunTime)(time);
|
|
2126
|
-
if ('problem' in read) {
|
|
2127
|
-
throw new runInput_js_1.InvalidRunInputError({ runner, received: 'a malformed time', hint: read.problem });
|
|
2128
|
-
}
|
|
2129
|
-
return read.value;
|
|
2130
|
-
}
|
|
2131
|
-
/**
|
|
2132
|
-
* Install a per-run checkpoint tracker. Listens for the agent's own
|
|
2133
|
-
* iteration and stream brackets and snapshots the conversation history into
|
|
2134
|
-
* the tracker. Returns a stop function.
|
|
2135
|
-
*
|
|
2136
|
-
* It listens on the REAL-value path (`EventDispatcher · onRealEvent`), never
|
|
2137
|
-
* on the served one: the crash checkpoint it builds is what
|
|
2138
|
-
* `resumeOnError` replays to the model, and a resume checkpoint keeps real
|
|
2139
|
-
* values — a redaction policy that names `history` must not turn the
|
|
2140
|
-
* conversation a crash resumes into placeholders (`src/redaction/`).
|
|
2141
|
-
*
|
|
2142
|
-
* @internal
|
|
2143
|
-
*/
|
|
2144
|
-
installCheckpointTracker(tracker) {
|
|
2145
|
-
return this.dispatcher.onRealEvent((event) => {
|
|
2146
|
-
switch (event.type) {
|
|
2147
|
-
case 'agentfootprint.agent.iteration_start': {
|
|
2148
|
-
const p = event.payload;
|
|
2149
|
-
if (typeof p?.iterIndex === 'number')
|
|
2150
|
-
tracker.inFlightIteration = p.iterIndex;
|
|
2151
|
-
return;
|
|
2152
|
-
}
|
|
2153
|
-
// Phase OBSERVATION (8.14.0) — the run's own stream brackets. A crash
|
|
2154
|
-
// inside one of these is attributable without asking the error to
|
|
2155
|
-
// describe itself. `'call-llm'` is a literal and `toolName` is a name
|
|
2156
|
-
// the app declared: no URL, no credential, no payload ever reaches the
|
|
2157
|
-
// checkpoint.
|
|
2158
|
-
case 'agentfootprint.stream.llm_start':
|
|
2159
|
-
tracker.inFlightPhase = { phase: 'llm', stage: 'call-llm' };
|
|
2160
|
-
return;
|
|
2161
|
-
case 'agentfootprint.stream.llm_end':
|
|
2162
|
-
tracker.inFlightPhase = undefined;
|
|
2163
|
-
return;
|
|
2164
|
-
// A bracket carrying `notDispatched` (9.113.0) is a call a paused batch
|
|
2165
|
-
// never dispatched: nothing of it was ever in flight, so it neither
|
|
2166
|
-
// opens nor clears the phase. Nothing observable depends on this today
|
|
2167
|
-
// — the settlement emits both halves back to back with no await between
|
|
2168
|
-
// them (`toolCalls.ts` · `bracketSettled`), so a crash can never land
|
|
2169
|
-
// inside one — it keeps the phase true to the marker should that ever
|
|
2170
|
-
// change.
|
|
2171
|
-
case 'agentfootprint.stream.tool_start': {
|
|
2172
|
-
const p = event.payload;
|
|
2173
|
-
if (p?.notDispatched !== undefined)
|
|
2174
|
-
return;
|
|
2175
|
-
const name = p?.toolName;
|
|
2176
|
-
tracker.inFlightPhase = {
|
|
2177
|
-
phase: 'tool',
|
|
2178
|
-
stage: typeof name === 'string' ? name : 'tool',
|
|
2179
|
-
};
|
|
2180
|
-
return;
|
|
2181
|
-
}
|
|
2182
|
-
case 'agentfootprint.stream.tool_end': {
|
|
2183
|
-
const p = event.payload;
|
|
2184
|
-
if (p?.notDispatched !== undefined)
|
|
2185
|
-
return;
|
|
2186
|
-
tracker.inFlightPhase = undefined;
|
|
2187
|
-
return;
|
|
2188
|
-
}
|
|
2189
|
-
case 'agentfootprint.agent.iteration_end': {
|
|
2190
|
-
const p = event.payload;
|
|
2191
|
-
if (typeof p?.iterIndex === 'number')
|
|
2192
|
-
tracker.lastCompletedIteration = p.iterIndex;
|
|
2193
|
-
if (Array.isArray(p?.history)) {
|
|
2194
|
-
tracker.history = p.history;
|
|
2195
|
-
}
|
|
2196
|
-
tracker.inFlightIteration = undefined;
|
|
2197
|
-
tracker.inFlightPhase = undefined;
|
|
2198
|
-
return;
|
|
2199
|
-
}
|
|
2200
|
-
default:
|
|
2201
|
-
return;
|
|
2202
|
-
}
|
|
2203
|
-
});
|
|
2019
|
+
return (0, clocks_js_1.readAgentTime)(time, runner, this.timeOptions);
|
|
2204
2020
|
}
|
|
2205
2021
|
/**
|
|
2206
2022
|
* Continue a run that paused to ask a person something, with their answer.
|
|
2207
2023
|
*
|
|
2208
2024
|
* WHO the resumed run is for is the paused run's caller, read off the
|
|
2209
2025
|
* checkpoint (`agent/callerIdentity.ts`) — never whatever this instance ran
|
|
2210
|
-
* last;
|
|
2026
|
+
* last; the session is the paused run's. A supplied `sessionId` must match. A
|
|
2211
2027
|
* checkpoint names who it is for; it is not proof: a host that lets
|
|
2212
2028
|
* checkpoints leave its trust boundary signs them or keeps them
|
|
2213
2029
|
* server-side, and passes the identity it verified as `options.identity`.
|
|
@@ -2230,11 +2046,15 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2230
2046
|
* ```
|
|
2231
2047
|
*/
|
|
2232
2048
|
async resume(checkpoint, input, options) {
|
|
2049
|
+
this.noteResumeTakenUp(checkpoint);
|
|
2050
|
+
return this.runExecution().withRun((invocation) => (0, pauseOwnership_js_1.preservePendingQuestion)(invocation.previous?.value, () => invocation.value.resources?.answer.consumed === true, () => this.resumeOwned(invocation, checkpoint, input, options)));
|
|
2051
|
+
}
|
|
2052
|
+
async resumeOwned(invocation, checkpoint, input, options) {
|
|
2233
2053
|
// Taken up, before anything can refuse: from here every use of a consent
|
|
2234
2054
|
// decision passes through the one spend a door watching this pause sees
|
|
2235
2055
|
// (`consentRequest.ts` · `watchDecisionUse`) — so a resume that fails
|
|
2236
2056
|
// without reaching it, refused or aborted, used nothing.
|
|
2237
|
-
(0,
|
|
2057
|
+
(0, resumeCheckpoint_js_1.resumeStateOf)(checkpoint);
|
|
2238
2058
|
// ── A consent gate is answered with a DECISION (8.13.0) ─────────────
|
|
2239
2059
|
// Refused HERE, before the engine is handed the checkpoint, so nothing
|
|
2240
2060
|
// executes and the checkpoint is unchanged — the caller can answer the same
|
|
@@ -2252,8 +2072,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2252
2072
|
// The incoming request is the RESUMING caller's — never the paused one's:
|
|
2253
2073
|
// a checkpoint carries no request, and a resume without one serves none.
|
|
2254
2074
|
const resumeRequest = (0, requestOfRun_js_1.requestOf)(options, 'Agent.resume');
|
|
2255
|
-
// Native guard lands with the new checkpoint protocol, before its runtime
|
|
2256
|
-
// opt-in is mounted. Until then no Agent is armed to consume this carrier.
|
|
2257
2075
|
(0, verificationCheckpoint_js_1.requireVerificationOnResume)(checkpoint.sharedState ?? {}, false);
|
|
2258
2076
|
if (this.negativeClaimsConfig !== undefined) {
|
|
2259
2077
|
const prior = (0, checkpoint_js_1.negativeCheckpointOf)(checkpoint.sharedState ?? {});
|
|
@@ -2266,16 +2084,17 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2266
2084
|
// The policy the paused run was covered by, carried in its own state
|
|
2267
2085
|
// (`runRedaction`) — it covers this leg too, joined with any the caller
|
|
2268
2086
|
// adds now. Read, or refused, before anything moves (`resumeRedactionOf`).
|
|
2269
|
-
const carriedRedaction = resumeRedactionOf(checkpoint, [
|
|
2087
|
+
const carriedRedaction = (0, resumeRedaction_js_1.resumeRedactionOf)(checkpoint, [
|
|
2270
2088
|
(0, declared_js_1.redactionDeclaredBy)(this),
|
|
2271
2089
|
options?.redact,
|
|
2272
2090
|
(0, conversation_js_2.conversationRedaction)(),
|
|
2273
2091
|
]);
|
|
2092
|
+
Object.assign(invocation.value, (0, privateCheckpoint_js_1.privateResumeOf)(checkpoint));
|
|
2274
2093
|
// A resume's `time` (the time layer) is read or refused before anything
|
|
2275
2094
|
// moves; it is never applied — the paused turn's clock is kept, and a
|
|
2276
2095
|
// differing value is recorded by the ToolCalls resume door.
|
|
2277
2096
|
const passedTime = this.passedTimeFor(options?.time, 'Agent.resume');
|
|
2278
|
-
options = withoutTime(options);
|
|
2097
|
+
options = (0, withoutTime_js_1.withoutTime)(options);
|
|
2279
2098
|
// One run, one identity — refused before anything moves, and before the
|
|
2280
2099
|
// answer is read at all: a caller this run is not for learns nothing about
|
|
2281
2100
|
// what it is waiting on (its gate, its tool, its request). The paused run's
|
|
@@ -2285,10 +2104,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2285
2104
|
// principal and stored ownership. A checkpoint names who it is for; it is
|
|
2286
2105
|
// not proof — a host that lets checkpoints leave its trust boundary signs
|
|
2287
2106
|
// them or keeps them server-side, and passes the identity it verified here.
|
|
2288
|
-
const pausedFor = (0, callerIdentity_js_1.callerIdentityOf)(checkpoint.sharedState
|
|
2289
|
-
...(this.lastRunIdentity !== undefined && { named: this.lastRunIdentity }),
|
|
2290
|
-
minted: this.mintedRunIds,
|
|
2291
|
-
});
|
|
2107
|
+
const pausedFor = (0, callerIdentity_js_1.callerIdentityOf)(checkpoint.sharedState);
|
|
2292
2108
|
// The identity the run's memory namespace and credentials are restored
|
|
2293
2109
|
// from, WHATEVER its source (a caller's, the session rung, the per-run
|
|
2294
2110
|
// default). One run, one identity: a call that names an identity must
|
|
@@ -2301,6 +2117,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2301
2117
|
(restored === undefined || !(0, callerIdentity_js_1.sameIdentity)(options.identity, restored)))) {
|
|
2302
2118
|
throw new conversation_js_3.ResumeIdentityConflictError();
|
|
2303
2119
|
}
|
|
2120
|
+
const sessionId = (0, resumeCheckpoint_js_1.resumeSessionOf)(checkpoint);
|
|
2121
|
+
if (options?.sessionId !== undefined && options.sessionId !== sessionId)
|
|
2122
|
+
throw new conversation_js_3.ResumeIdentityConflictError('session');
|
|
2304
2123
|
// …and the decision must be for THIS request and this exact call
|
|
2305
2124
|
// (`core/consentRequest.ts`): refused here, before anything moves, when it
|
|
2306
2125
|
// names no request, another request, a call the checkpoint no longer
|
|
@@ -2313,11 +2132,12 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2313
2132
|
// A request minted under a ledger that can prove is spent only there.
|
|
2314
2133
|
this.decisionLedger ?? (0, consentRequest_js_1.processDecisionLedger)());
|
|
2315
2134
|
}
|
|
2135
|
+
if (gate !== undefined)
|
|
2136
|
+
await (0, resumeAnswer_js_1.refuseKnownSpentAnswer)(this.decisionLedger ?? (0, consentRequest_js_1.processDecisionLedger)(), input, gate, options?.signal, options?.env?.signal);
|
|
2316
2137
|
// Typed data collection is not consent. Validate before changing any run state.
|
|
2317
2138
|
const awaitingInput = gate === undefined ? (0, inputRequest_js_1.readAwaitingInput)(checkpoint.pauseData) : undefined;
|
|
2318
2139
|
let answeredAsk;
|
|
2319
2140
|
if (awaitingInput !== undefined) {
|
|
2320
|
-
this.assertNotRunning('Agent.resume');
|
|
2321
2141
|
const answered = (0, inputRequest_js_1.applyInputResponse)(awaitingInput, input, this.timeAnswerContextOf(checkpoint.sharedState));
|
|
2322
2142
|
if ('cancel' in answered) {
|
|
2323
2143
|
throw new TypeError('[input request] Cancel a hosted request through its host, or abandonPause() before starting another run.');
|
|
@@ -2334,7 +2154,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2334
2154
|
pauseData,
|
|
2335
2155
|
awaitingInput: answered,
|
|
2336
2156
|
};
|
|
2337
|
-
this.recordPendingQuestion(outcome);
|
|
2157
|
+
this.recordPendingQuestion(invocation.value, outcome);
|
|
2338
2158
|
return outcome;
|
|
2339
2159
|
}
|
|
2340
2160
|
answeredAsk = {
|
|
@@ -2355,77 +2175,62 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2355
2175
|
// the same door and before any state moves, because a resume that has begun
|
|
2356
2176
|
// is a resume that has already used the value.
|
|
2357
2177
|
(0, pause_js_1.assertDecisionIsNotStale)(checkpoint.pauseData, input);
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
//
|
|
2361
|
-
|
|
2362
|
-
//
|
|
2363
|
-
|
|
2364
|
-
//
|
|
2365
|
-
//
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
this.pendingQuestion = undefined;
|
|
2369
|
-
// WHO this resumed run is for — set BEFORE the executor exists, because the
|
|
2370
|
-
// run context's principal (every event's `EventMeta.principal`), a tool's
|
|
2371
|
-
// `ctx.identity` and `checkpoint()` all read it: the identity the PAUSED
|
|
2372
|
-
// run's caller named (a named `options.identity` was checked equal to the
|
|
2373
|
-
// restored one at the top of this method) — never the identity of whatever
|
|
2374
|
-
// this instance ran last, which on a shared or pooled agent is another
|
|
2375
|
-
// person's, or nobody's (`callerIdentity.ts`).
|
|
2376
|
-
this.lastRunIdentity = options?.identity ?? pausedFor;
|
|
2377
|
-
// …and WHICH session: the call's, else the one the paused run recorded in
|
|
2378
|
-
// its own state (`runSessionId`, or the session rung's) — one source, no
|
|
2379
|
-
// instance memory — so a host that resumes without repeating the session
|
|
2380
|
-
// does not file the resumed turn (its tool teardown, its events, its
|
|
2381
|
-
// self-explain evidence) as sessionless.
|
|
2382
|
-
const sessionId = options?.sessionId ?? (0, callerIdentity_js_1.pausedSessionOf)(checkpoint.sharedState);
|
|
2178
|
+
if (gate === undefined && awaitingInput === undefined)
|
|
2179
|
+
(0, resumeAnswer_js_1.refuseMissingPlainAnswer)(checkpoint, input);
|
|
2180
|
+
// A native-admitted answer settles the old question even if its leg fails.
|
|
2181
|
+
// The outer pause-ownership boundary restores pre-origin refusals; named
|
|
2182
|
+
// unanswered refusals after origin are restored below.
|
|
2183
|
+
const questionBefore = invocation.previous?.value.pendingQuestion;
|
|
2184
|
+
// Capture this paused conversation's identity before native origin; selected readers
|
|
2185
|
+
// on a shared instance can belong to another conversation (`callerIdentity.ts`).
|
|
2186
|
+
invocation.value.identity = options?.identity ?? pausedFor;
|
|
2187
|
+
// Resume retains the paused transport session; an override was checked equal above.
|
|
2383
2188
|
const sessionResumeOptions = sessionId !== undefined && options?.sessionId === undefined
|
|
2384
2189
|
? { ...options, sessionId }
|
|
2385
2190
|
: options;
|
|
2386
2191
|
// The leg's policy — the carried one, the caller's, and the paused leg's
|
|
2387
2192
|
// marks — comes back from the emitter and goes to THIS leg's executor
|
|
2388
|
-
// (
|
|
2193
|
+
// (native setup → `prepareRunRedaction`); nothing per-run is held on the instance.
|
|
2389
2194
|
const resumeLeg = this.emitPauseResume(checkpoint, input, (0, policy_js_1.unionRedactionPolicies)(carriedRedaction, sessionResumeOptions?.redact));
|
|
2390
2195
|
const resumeOptions = resumeLeg === sessionResumeOptions?.redact
|
|
2391
2196
|
? sessionResumeOptions
|
|
2392
2197
|
: { ...sessionResumeOptions, redact: resumeLeg };
|
|
2393
|
-
// Fresh
|
|
2394
|
-
//
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
// covers the RESUMED run, which is what the recorder saw. A turn that
|
|
2399
|
-
// paused and resumed is two runs, and each mints its own recording when
|
|
2400
|
-
// (and only when) it completes.
|
|
2401
|
-
const recording = this.startRunRecording();
|
|
2402
|
-
this.answeredAsk = answeredAsk;
|
|
2403
|
-
const executor = this.createExecutor(resumeOptions, resumeRequest);
|
|
2198
|
+
// Fresh native execution restores its checkpoint; no paused executor is retained.
|
|
2199
|
+
// Each resumed native leg files its own recording when it completes.
|
|
2200
|
+
const recording = this.startRunRecording(invocation);
|
|
2201
|
+
invocation.value.answeredAsk = answeredAsk;
|
|
2202
|
+
const prepared = this.prepareAgentRun(invocation, resumeOptions, resumeRequest);
|
|
2404
2203
|
// The leg's WHOLE policy rides its own state too (`runRedaction`), so a
|
|
2405
2204
|
// later pause carries what this leg was covered by — names the resume
|
|
2406
2205
|
// added included — and a third leg is never less covered than this one.
|
|
2407
2206
|
// `createExecutor` opened this executor's run; one it did not is refused
|
|
2408
2207
|
// before anything is held or runs — a leg whose policy nothing knows must
|
|
2409
2208
|
// not start.
|
|
2410
|
-
const legCoverage =
|
|
2209
|
+
const legCoverage = invocation.value.redaction?.coverage;
|
|
2210
|
+
if (legCoverage === undefined)
|
|
2211
|
+
throw new conversation_js_1.ResumeRedactionError('unreadable');
|
|
2411
2212
|
if (legCoverage.state === 'unknown')
|
|
2412
2213
|
throw new conversation_js_1.ResumeRedactionError('unreadable');
|
|
2413
2214
|
const leg = { policy: (0, coverage_js_1.policyOfCoverage)(legCoverage) };
|
|
2414
|
-
this.inFlightRunId = this.currentRunContext.runId;
|
|
2415
2215
|
// A resumed turn is two runs, and each keeps its own ledger — exactly
|
|
2416
2216
|
// the recording's terms one comment up.
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2217
|
+
invocation.value.answer = undefined;
|
|
2218
|
+
const resumedMessage = checkpoint.sharedState.userMessage;
|
|
2219
|
+
invocation.value.checkpointTracker =
|
|
2220
|
+
typeof resumedMessage === 'string'
|
|
2221
|
+
? {
|
|
2222
|
+
get runId() {
|
|
2223
|
+
return invocation.context().runId;
|
|
2224
|
+
},
|
|
2225
|
+
originalInput: { message: resumedMessage },
|
|
2226
|
+
history: [],
|
|
2227
|
+
lastCompletedIteration: 0,
|
|
2228
|
+
}
|
|
2229
|
+
: undefined;
|
|
2425
2230
|
// One run can never raise on another run's consent block.
|
|
2426
|
-
|
|
2231
|
+
invocation.value.consentOutstanding.clear();
|
|
2427
2232
|
// Beside the `try` whose `finally` clears it (the fresh-run path's terms).
|
|
2428
|
-
|
|
2233
|
+
invocation.value.resumePassedTime = passedTime;
|
|
2429
2234
|
const legCheckpoint = leg.policy === undefined
|
|
2430
2235
|
? checkpoint
|
|
2431
2236
|
: {
|
|
@@ -2435,81 +2240,38 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2435
2240
|
runRedaction: (0, conversation_js_2.carriedRunPolicy)(leg.policy),
|
|
2436
2241
|
},
|
|
2437
2242
|
};
|
|
2438
|
-
//
|
|
2439
|
-
// the `finally` below.
|
|
2440
|
-
const runSignal = (0, RunnerBase_js_1.runSignalOf)(resumeOptions);
|
|
2243
|
+
// The native resumed leg owns its signal and deadline.
|
|
2441
2244
|
try {
|
|
2442
|
-
const result = await
|
|
2443
|
-
const finalized = this.finalizeResult(
|
|
2245
|
+
const result = await invocation.execute({ kind: 'resume', mode: 'fresh', checkpoint: legCheckpoint, input, options: resumeOptions }, prepared.setup, prepared.binding);
|
|
2246
|
+
const finalized = this.finalizeResult(invocation, result);
|
|
2444
2247
|
if (typeof finalized === 'string')
|
|
2445
|
-
|
|
2248
|
+
invocation.value.answer = finalized;
|
|
2446
2249
|
// The question this resume answered is settled; a resume that paused
|
|
2447
2250
|
// AGAIN has asked a new one, and that one is outstanding from here.
|
|
2448
|
-
this.recordPendingQuestion(finalized);
|
|
2449
|
-
await this.endRunToolSessions(finalized);
|
|
2251
|
+
this.recordPendingQuestion(invocation.value, finalized);
|
|
2450
2252
|
// Same liveness gate the fresh-run path applies (9.60.0).
|
|
2451
|
-
this.assertIntegrityAlive();
|
|
2452
|
-
|
|
2253
|
+
this.assertIntegrityAlive(invocation);
|
|
2254
|
+
recording?.complete(finalized);
|
|
2453
2255
|
return finalized;
|
|
2454
2256
|
}
|
|
2455
|
-
catch (cause) {
|
|
2456
|
-
// An answer the run refused ran nothing and answered nothing: the
|
|
2457
|
-
// question this agent was waiting on (if any) is still outstanding, and
|
|
2458
|
-
// no tool session ended — a replayed decision must not tear down the
|
|
2459
|
-
// sandbox a live pause is holding.
|
|
2460
|
-
if (cause instanceof pause_js_1.ResumeDecisionError || cause instanceof pause_js_1.DecisionRequiredError) {
|
|
2461
|
-
this.pendingQuestion = questionBefore;
|
|
2462
|
-
throw cause;
|
|
2463
|
-
}
|
|
2464
|
-
await this.endRunToolSessions(cause);
|
|
2465
|
-
throw cause;
|
|
2466
|
-
}
|
|
2467
2257
|
finally {
|
|
2468
|
-
|
|
2258
|
+
if (invocation.value.resources?.answer.consumed === true) {
|
|
2259
|
+
if (invocation.previous !== undefined)
|
|
2260
|
+
invocation.previous.value.pendingQuestion = undefined;
|
|
2261
|
+
}
|
|
2262
|
+
else {
|
|
2263
|
+
invocation.value.pendingQuestion = questionBefore;
|
|
2264
|
+
if (invocation.previous !== undefined)
|
|
2265
|
+
invocation.previous.value.pendingQuestion = questionBefore;
|
|
2266
|
+
}
|
|
2469
2267
|
// A resume's passed `time` ends with the resume (the fresh-run path's terms).
|
|
2470
|
-
|
|
2268
|
+
invocation.value.resumePassedTime = undefined;
|
|
2471
2269
|
// Same terms as the fresh-run path: rows on every exit, before the
|
|
2472
2270
|
// recording stops (9.60.0).
|
|
2473
|
-
this.fileIntegrityDisposition();
|
|
2474
|
-
this.noteAdmittedRun();
|
|
2475
|
-
recording?.stop();
|
|
2476
|
-
this.inFlightRunId = undefined;
|
|
2271
|
+
this.fileIntegrityDisposition(invocation);
|
|
2272
|
+
this.noteAdmittedRun(invocation);
|
|
2477
2273
|
}
|
|
2478
2274
|
}
|
|
2479
|
-
/**
|
|
2480
|
-
* Fire `'run'`-scoped tool teardown — IF this run really ended.
|
|
2481
|
-
*
|
|
2482
|
-
* **Not on `finally`, and that is the whole point.** `finally` runs on every
|
|
2483
|
-
* exit including a pause, and a pause exits TWO ways: a returned
|
|
2484
|
-
* `RunnerPauseOutcome` and a thrown `PauseSignal`. A check-in on a
|
|
2485
|
-
* code-interpreter call pauses the run so a person can approve the code —
|
|
2486
|
-
* tearing the sandbox down there destroys the exact state the resume needs,
|
|
2487
|
-
* and it fails QUIETLY, as a resumed run that "just re-ran everything".
|
|
2488
|
-
* Both shapes are discriminated here and both are skipped.
|
|
2489
|
-
*
|
|
2490
|
-
* An error IS a terminal: the run is over, nobody is coming back, and a
|
|
2491
|
-
* sandbox held by a run that crashed is the clearest kind of leak. Only a
|
|
2492
|
-
* pause survives.
|
|
2493
|
-
*
|
|
2494
|
-
* Fired for the TURN, not for `currentRunContext.runId` — `resume()` mints a
|
|
2495
|
-
* fresh run id, so a pause and its resume are one turn across two runs, and
|
|
2496
|
-
* filtering on the id would leave everything a paused turn opened alive
|
|
2497
|
-
* forever. Hosted turns are scoped to their session, preserving other pauses. See `ToolSessionTier.fireRun`.
|
|
2498
|
-
*
|
|
2499
|
-
* @param outcome what `run()`/`resume()` is about to return, or about to throw.
|
|
2500
|
-
*/
|
|
2501
|
-
async endRunToolSessions(outcome) {
|
|
2502
|
-
if (!this.toolSessionTier)
|
|
2503
|
-
return;
|
|
2504
|
-
if ((0, pause_js_1.isPaused)(outcome))
|
|
2505
|
-
return;
|
|
2506
|
-
if (outcome instanceof Error && outcome.name === 'PauseSignal')
|
|
2507
|
-
return;
|
|
2508
|
-
if (this.currentRunContext.sessionId !== undefined)
|
|
2509
|
-
await this.toolSessionTier.fireSessionRuns(this.currentRunContext.sessionId);
|
|
2510
|
-
else
|
|
2511
|
-
await this.toolSessionTier.fireRun();
|
|
2512
|
-
}
|
|
2513
2275
|
/**
|
|
2514
2276
|
* The conversation this agent's LAST completed run leaves behind, packed as
|
|
2515
2277
|
* the same `AgentRunCheckpoint` that `resumeOnError(...)` accepts. Store it,
|
|
@@ -2564,35 +2326,39 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2564
2326
|
* // it does not rewrite entries manually appended to that history.
|
|
2565
2327
|
* ```
|
|
2566
2328
|
*/
|
|
2329
|
+
/** During preparation before native origin this is undefined; capture before the next call. */
|
|
2567
2330
|
checkpoint() {
|
|
2568
|
-
|
|
2331
|
+
return this.checkpointFor(this.runExecution().selected());
|
|
2332
|
+
}
|
|
2333
|
+
checkpointFor(selected) {
|
|
2334
|
+
const snapshot = selected?.view.snapshot();
|
|
2569
2335
|
if (!snapshot)
|
|
2570
2336
|
return undefined;
|
|
2571
2337
|
const state = snapshot.sharedState;
|
|
2572
2338
|
// Admission is decided by seed, before any conversation state is written.
|
|
2573
2339
|
// Do not manufacture a blank replay carrier for an unadmitted attempt.
|
|
2574
|
-
if (this.lastInputRefused())
|
|
2340
|
+
if (this.lastInputRefused(selected?.view))
|
|
2575
2341
|
return undefined;
|
|
2576
2342
|
const recorded = (state?.history ?? []);
|
|
2577
2343
|
const history = [...recorded];
|
|
2578
|
-
if (
|
|
2579
|
-
(
|
|
2344
|
+
if (selected.value.answer !== undefined &&
|
|
2345
|
+
(selected.value.answer.length > 0 || state?.llmLatestReplay !== undefined)) {
|
|
2580
2346
|
history.push({
|
|
2581
2347
|
role: 'assistant',
|
|
2582
|
-
content:
|
|
2348
|
+
content: selected.value.answer,
|
|
2583
2349
|
...(0, assistantReplay_js_1.assistantReplayFields)(state ?? {}),
|
|
2584
2350
|
});
|
|
2585
2351
|
}
|
|
2586
2352
|
const folded = this.foldedSpansOf(state);
|
|
2587
|
-
const owner = this.conversationOwner();
|
|
2353
|
+
const owner = this.conversationOwner(selected.value);
|
|
2588
2354
|
const skillCursor = this.continuityCursorOf(state);
|
|
2589
2355
|
const evidenceRecovery = this.evidenceRecoveryOf(state);
|
|
2590
2356
|
const findingsLedger = this.findingsLedgerOf(state);
|
|
2591
2357
|
const turnNumber = this.turnNumberOf(state);
|
|
2592
2358
|
return {
|
|
2593
2359
|
version: 1,
|
|
2594
|
-
runId:
|
|
2595
|
-
history: structuredClone((0, runCheckpoint_js_1.checkpointReplayHistory)(history,
|
|
2360
|
+
runId: selected.context.runId,
|
|
2361
|
+
history: structuredClone((0, runCheckpoint_js_1.checkpointReplayHistory)(history, selected.value.checkpointTracker)),
|
|
2596
2362
|
lastCompletedIteration: typeof state?.iteration === 'number' ? state.iteration : 0,
|
|
2597
2363
|
originalInput: { message: typeof state?.userMessage === 'string' ? state.userMessage : '' },
|
|
2598
2364
|
checkpointedAt: Date.now(),
|
|
@@ -2620,9 +2386,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2620
2386
|
};
|
|
2621
2387
|
}
|
|
2622
2388
|
/** Called as each run/resume ends: remember a run that got past input admission. */
|
|
2623
|
-
noteAdmittedRun() {
|
|
2624
|
-
if (
|
|
2625
|
-
|
|
2389
|
+
noteAdmittedRun(invocation) {
|
|
2390
|
+
if (invocation.view.snapshot() !== undefined && !this.lastInputRefused(invocation.view)) {
|
|
2391
|
+
invocation.value.hadAdmitted = true;
|
|
2626
2392
|
}
|
|
2627
2393
|
}
|
|
2628
2394
|
/**
|
|
@@ -2636,8 +2402,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2636
2402
|
this.evidenceGate?.toolsOffAfterRevision === true);
|
|
2637
2403
|
}
|
|
2638
2404
|
/** Whether input middleware refused the last run's message — the one reading both doors ask. */
|
|
2639
|
-
lastInputRefused() {
|
|
2640
|
-
const state =
|
|
2405
|
+
lastInputRefused(view) {
|
|
2406
|
+
const state = view?.snapshot()?.sharedState;
|
|
2641
2407
|
return state?.messageDeniedPhase === 'input';
|
|
2642
2408
|
}
|
|
2643
2409
|
/** Both checkpoint doors keep the repair budget separately from conversation text. */
|
|
@@ -2694,27 +2460,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2694
2460
|
return undefined;
|
|
2695
2461
|
return structuredClone(spans);
|
|
2696
2462
|
}
|
|
2697
|
-
/**
|
|
2698
|
-
* What the resume door checks a time field's answer with (the time design
|
|
2699
|
-
* § 6.2, step T4): the paused turn's clock zone — the kept `clock` row, so
|
|
2700
|
-
* a resume that passes another `time` changes nothing — and the app's
|
|
2701
|
-
* catalog overrides. `undefined` without `.time()`: a `format` field is
|
|
2702
|
-
* then judged for shape, order and offset only, in the default words.
|
|
2703
|
-
*
|
|
2704
|
-
* @internal
|
|
2705
|
-
*/
|
|
2706
2463
|
timeAnswerContextOf(state) {
|
|
2707
|
-
|
|
2708
|
-
return undefined;
|
|
2709
|
-
const ledger = state?.findingsLedger;
|
|
2710
|
-
const clock = (0, rows_js_1.clockOf)(Array.isArray(ledger) ? ledger : undefined);
|
|
2711
|
-
// An unknown zone (G15) judges no wall time: `zone` is then only the UTC spelling.
|
|
2712
|
-
const zone = clock?.zoneSource === 'unknown' ? undefined : clock?.zone;
|
|
2713
|
-
const messages = this.timeOptions.messages;
|
|
2714
|
-
return {
|
|
2715
|
-
...(zone !== undefined && { zone }),
|
|
2716
|
-
...(messages !== undefined && { messages }),
|
|
2717
|
-
};
|
|
2464
|
+
return (0, clocks_js_1.agentTimeAnswerContext)(state, this.timeOptions);
|
|
2718
2465
|
}
|
|
2719
2466
|
/**
|
|
2720
2467
|
* The findings ledger for a checkpoint (9.101.0) — `foldedSpansOf`'s twin:
|
|
@@ -2758,9 +2505,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2758
2505
|
*
|
|
2759
2506
|
* @internal
|
|
2760
2507
|
*/
|
|
2761
|
-
conversationOwner() {
|
|
2508
|
+
conversationOwner(values) {
|
|
2762
2509
|
return {
|
|
2763
|
-
...(
|
|
2510
|
+
...(values.identity !== undefined && { identity: values.identity }),
|
|
2764
2511
|
...(this.explicitId !== undefined && { agentId: this.explicitId }),
|
|
2765
2512
|
};
|
|
2766
2513
|
}
|
|
@@ -2787,12 +2534,12 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2787
2534
|
*
|
|
2788
2535
|
* @internal
|
|
2789
2536
|
*/
|
|
2790
|
-
applyContinuation(cp, door, appendsUserTurn) {
|
|
2537
|
+
applyContinuation(values, cp, door, appendsUserTurn) {
|
|
2791
2538
|
(0, runCheckpoint_js_1.assertContinuable)(cp, this.explicitId, door);
|
|
2792
2539
|
(0, verificationCheckpoint_js_1.requireVerificationOnResume)(cp, false);
|
|
2793
2540
|
if (this.negativeClaimsConfig === undefined && (0, checkpoint_js_1.negativeCheckpointOf)(cp) !== undefined)
|
|
2794
2541
|
throw new TypeError('Continuation requires the negative-claims setting used by the recording agent.');
|
|
2795
|
-
|
|
2542
|
+
values.pendingResumeHistory = {
|
|
2796
2543
|
history: cp.history,
|
|
2797
2544
|
appendsUserTurn,
|
|
2798
2545
|
// The turn the stored history ends on (honesty layers) — seed continues
|
|
@@ -2803,36 +2550,30 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2803
2550
|
// The folded spans beside it. A conversation stored before 8.2 has none,
|
|
2804
2551
|
// and `undefined` is the right answer there — it means "this conversation
|
|
2805
2552
|
// recorded no folds", which is exactly true.
|
|
2806
|
-
|
|
2553
|
+
values.pendingResumeFolded = cp.folded;
|
|
2807
2554
|
// The findings ledger beside it (9.101.0). Stashed whether or not THIS
|
|
2808
2555
|
// agent is armed: seed restores it only under `.findings()` (the deps
|
|
2809
2556
|
// gate), and an unarmed continuation consumes and ignores it — exactly
|
|
2810
2557
|
// like a `folded` field on an agent that never folds.
|
|
2811
|
-
|
|
2558
|
+
values.pendingResumeFindingsLedger = cp.findingsLedger;
|
|
2812
2559
|
// The conversation's skill cursor (SG-C). Stashed unconditionally —
|
|
2813
2560
|
// whether it is HONORED is seed's `restoreSkillCursor` gate, which reads
|
|
2814
2561
|
// the mounted graph's `continuity` declaration; a checkpoint written by a
|
|
2815
2562
|
// continuity graph and continued on a `'turn'` one is consumed and
|
|
2816
2563
|
// ignored, exactly like a `folded` field on an agent that never folds.
|
|
2817
|
-
|
|
2564
|
+
values.pendingResumeSkillCursor = cp.skillCursor;
|
|
2818
2565
|
// Same failed request retains its single repair budget. A new user turn
|
|
2819
2566
|
// receives neither the rejected draft nor a spent retry allowance.
|
|
2820
|
-
|
|
2567
|
+
values.pendingEvidenceRecovery =
|
|
2821
2568
|
!appendsUserTurn && cp.evidenceRecovery !== undefined
|
|
2822
2569
|
? structuredClone(cp.evidenceRecovery)
|
|
2823
2570
|
: undefined;
|
|
2824
2571
|
}
|
|
2825
|
-
/** One turn at a time — see `RunInFlightError`. @internal */
|
|
2826
|
-
assertNotRunning(door) {
|
|
2827
|
-
if (this.inFlightRunId !== undefined) {
|
|
2828
|
-
throw new conversation_js_3.RunInFlightError(door, this.id, this.inFlightRunId);
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
2831
2572
|
/** A person's unanswered question outranks a new message — see
|
|
2832
2573
|
* `PendingQuestionError`. @internal */
|
|
2833
|
-
assertNoPendingQuestion(door) {
|
|
2834
|
-
if (
|
|
2835
|
-
throw new conversation_js_3.PendingQuestionError(door,
|
|
2574
|
+
assertNoPendingQuestion(door, values) {
|
|
2575
|
+
if (values?.pendingQuestion !== undefined) {
|
|
2576
|
+
throw new conversation_js_3.PendingQuestionError(door, values.pendingQuestion);
|
|
2836
2577
|
}
|
|
2837
2578
|
}
|
|
2838
2579
|
/**
|
|
@@ -2845,17 +2586,14 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2845
2586
|
*
|
|
2846
2587
|
* @internal
|
|
2847
2588
|
*/
|
|
2848
|
-
recordPendingQuestion(outcome) {
|
|
2589
|
+
recordPendingQuestion(values, outcome) {
|
|
2849
2590
|
if (typeof outcome === 'string') {
|
|
2850
|
-
|
|
2591
|
+
values.pauseOutcome = undefined;
|
|
2592
|
+
values.pendingQuestion = undefined;
|
|
2851
2593
|
return;
|
|
2852
2594
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
...(typeof data?.toolName === 'string' && { toolName: data.toolName }),
|
|
2856
|
-
...(typeof data?.toolCallId === 'string' && { toolCallId: data.toolCallId }),
|
|
2857
|
-
...(typeof data?.question === 'string' && { question: data.question }),
|
|
2858
|
-
};
|
|
2595
|
+
values.pauseOutcome = outcome;
|
|
2596
|
+
values.pendingQuestion = (0, pauseOwnership_js_1.pendingQuestionOf)(outcome.pauseData);
|
|
2859
2597
|
}
|
|
2860
2598
|
/**
|
|
2861
2599
|
* Hand the `.selfExplain()` binding to the agent that owns it.
|
|
@@ -2923,21 +2661,21 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2923
2661
|
* is withheld here for that reason — `sessionId` beside it is the fact the
|
|
2924
2662
|
* transport really delivered.
|
|
2925
2663
|
*/
|
|
2926
|
-
toolRunFacts() {
|
|
2664
|
+
toolRunFacts(run) {
|
|
2927
2665
|
return {
|
|
2928
|
-
runContext: { ...
|
|
2929
|
-
runId:
|
|
2930
|
-
...(
|
|
2931
|
-
sessionId:
|
|
2666
|
+
runContext: { ...run.context },
|
|
2667
|
+
runId: run.context.runId,
|
|
2668
|
+
...(run.context.sessionId !== undefined && {
|
|
2669
|
+
sessionId: run.context.sessionId,
|
|
2932
2670
|
}),
|
|
2933
|
-
...(
|
|
2671
|
+
...(run.value.identity !== undefined && { identity: run.value.identity }),
|
|
2934
2672
|
};
|
|
2935
2673
|
}
|
|
2936
2674
|
/**
|
|
2937
|
-
* The teardown tier, built on
|
|
2675
|
+
* The existing teardown tier, built on first component resource admission.
|
|
2938
2676
|
*
|
|
2939
|
-
*
|
|
2940
|
-
*
|
|
2677
|
+
* Admission precedes tool resource effects so restored owners cannot be
|
|
2678
|
+
* borrowed concurrently. Components without tool admission do not allocate it.
|
|
2941
2679
|
*/
|
|
2942
2680
|
toolSessions() {
|
|
2943
2681
|
if (!this.toolSessionTier) {
|
|
@@ -2972,21 +2710,25 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2972
2710
|
dispatcher.dispatch({
|
|
2973
2711
|
type,
|
|
2974
2712
|
payload,
|
|
2975
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: LATE_ARTIFACT_FACT_STAGE_ID }, runContext),
|
|
2713
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: eventStageIds_js_1.LATE_ARTIFACT_FACT_STAGE_ID }, runContext),
|
|
2976
2714
|
});
|
|
2977
2715
|
}
|
|
2978
2716
|
emitToolSessionReport(report, origin) {
|
|
2979
2717
|
const type = report.kind === 'closed'
|
|
2980
2718
|
? 'agentfootprint.tools.session_closed'
|
|
2981
2719
|
: 'agentfootprint.tools.session_close_failed';
|
|
2720
|
+
const { kind: _kind, ...payload } = report;
|
|
2721
|
+
if (origin.emit !== undefined) {
|
|
2722
|
+
origin.emit(type, payload);
|
|
2723
|
+
return;
|
|
2724
|
+
}
|
|
2982
2725
|
const dispatcher = this.getDispatcher();
|
|
2983
2726
|
if (!dispatcher.hasListenersFor(type))
|
|
2984
2727
|
return;
|
|
2985
|
-
const { kind: _kind, ...payload } = report;
|
|
2986
2728
|
dispatcher.dispatch({
|
|
2987
2729
|
type,
|
|
2988
2730
|
payload,
|
|
2989
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: TOOL_TEARDOWN_STAGE_ID }, origin.runContext ??
|
|
2731
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: eventStageIds_js_1.TOOL_TEARDOWN_STAGE_ID }, origin.runContext ?? { runId: 'consumer-scope', runStartMs: 0, compositionPath: [] }),
|
|
2990
2732
|
});
|
|
2991
2733
|
}
|
|
2992
2734
|
openSkillIds() {
|
|
@@ -3036,7 +2778,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3036
2778
|
return undefined;
|
|
3037
2779
|
let graphMenu = this.skillGraphReachable;
|
|
3038
2780
|
if (graphMenu && this.reactMode === 'classic') {
|
|
3039
|
-
if ((0,
|
|
2781
|
+
if ((0, footprintjs_1.isDevMode)()) {
|
|
3040
2782
|
// eslint-disable-next-line no-console
|
|
3041
2783
|
console.warn("agentfootprint Agent: read_skill's menu is built at turn 1 under " +
|
|
3042
2784
|
"reactMode: 'classic', which caches the tools slot — so it lists every " +
|
|
@@ -3117,7 +2859,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3117
2859
|
return async (scope) => {
|
|
3118
2860
|
// The caller of THIS run: the instance's caller on its own run, the
|
|
3119
2861
|
// member's run (never the instance's last caller) on a mount.
|
|
3120
|
-
const
|
|
2862
|
+
const run = this.runExecution().forScope(scope);
|
|
2863
|
+
const identity = run.own ? run.value.identity : (0, memberRun_js_1.memberIdentityIn)(scope);
|
|
3121
2864
|
const hidden = [];
|
|
3122
2865
|
for (const id of skillIds) {
|
|
3123
2866
|
let allowed = false;
|
|
@@ -3144,27 +2887,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3144
2887
|
};
|
|
3145
2888
|
}
|
|
3146
2889
|
assertDeliverableRoles() {
|
|
3147
|
-
|
|
3148
|
-
for (const inj of this.injections) {
|
|
3149
|
-
for (const msg of inj.inject?.messages ?? []) {
|
|
3150
|
-
(0, deliver_js_1.assertDeliverableRole)(providers, msg.role, `Agent injection '${inj.id}'`);
|
|
3151
|
-
// Content, judged at the same funnel as role (8.18.0). The named
|
|
3152
|
-
// factories refuse empty content; a hand-built Injection reached the
|
|
3153
|
-
// delivery stage unchecked and put a contentless turn on the wire.
|
|
3154
|
-
const content = msg.content;
|
|
3155
|
-
if (typeof content !== 'string' || content.trim() === '') {
|
|
3156
|
-
throw new Error((0, messagesSlotRefusal_js_1.messagesContentRefusal)({
|
|
3157
|
-
site: `Agent injection '${inj.id}'`,
|
|
3158
|
-
role: msg.role,
|
|
3159
|
-
received: typeof content !== 'string'
|
|
3160
|
-
? content === undefined
|
|
3161
|
-
? 'missing'
|
|
3162
|
-
: `a ${content === null ? 'null' : typeof content}`
|
|
3163
|
-
: 'empty',
|
|
3164
|
-
}));
|
|
3165
|
-
}
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
2890
|
+
(0, injectionDelivery_js_1.assertInjectionDelivery)(this.injections, (0, providerTargets_js_1.providerTargets)(this.provider, this.model, this.reliabilityConfig?.providers).map((target) => target.provider));
|
|
3168
2891
|
}
|
|
3169
2892
|
/**
|
|
3170
2893
|
* Refuse, at run start, a `'tool-forced'` output strategy on a provider
|
|
@@ -3232,7 +2955,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3232
2955
|
`not in this release. Use { strategy: 'instruct', retries: N } on this provider — it ` +
|
|
3233
2956
|
`works on every wire — or run the native strategy on a provider that declares it.`);
|
|
3234
2957
|
}
|
|
3235
|
-
|
|
2958
|
+
prepareAgentRun(invocation, runOptions, request) {
|
|
3236
2959
|
this.assertDeliverableRoles();
|
|
3237
2960
|
this.assertForcedToolChoiceSupported();
|
|
3238
2961
|
this.assertNativeOutputSchemaSupported();
|
|
@@ -3254,71 +2977,33 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3254
2977
|
// is exactly the string an auditor must not read as "who did this".
|
|
3255
2978
|
// `conversationId` is deliberately not carried: it is a thread, not a
|
|
3256
2979
|
// person, and `sessionId` beside it is the fact the transport delivered.
|
|
3257
|
-
const actor = runOptions?.identity ??
|
|
2980
|
+
const actor = runOptions?.identity ?? invocation.value.identity;
|
|
2981
|
+
invocation.value.request = request;
|
|
3258
2982
|
// A fresh run starts with no evictions filed — the previous run's last
|
|
3259
2983
|
// visit must not be read as this run's (`window/evictedTurns.ts`).
|
|
3260
|
-
this.evictedTurnsHandle?.clear();
|
|
3261
|
-
const runId = (0, RunnerBase_js_1.makeRunId)();
|
|
3262
|
-
this.mintedRunIds.add(runId);
|
|
3263
|
-
boundInsertionOrder(this.mintedRunIds, MAX_REMEMBERED_RUNS);
|
|
3264
2984
|
const hosted = (0, servingConversation_js_1.hostedConversationOf)(runOptions);
|
|
3265
|
-
|
|
2985
|
+
invocation.value.servingConversation =
|
|
3266
2986
|
sessionId !== undefined
|
|
3267
2987
|
? (0, servingConversation_js_1.sessionConversationKey)(sessionId)
|
|
3268
2988
|
: hosted !== undefined
|
|
3269
2989
|
? (0, servingConversation_js_1.hostedConversationKey)(hosted)
|
|
3270
2990
|
: undefined;
|
|
3271
|
-
|
|
3272
|
-
runStartMs: Date.now(),
|
|
3273
|
-
runId,
|
|
2991
|
+
const metadata = {
|
|
3274
2992
|
compositionPath: [`Agent:${this.id}`],
|
|
3275
2993
|
...(correlationId !== undefined && { correlationId }),
|
|
3276
2994
|
...(traceId !== undefined && { traceId }),
|
|
3277
|
-
// Session identity rides beside runId, not instead of it: one session
|
|
3278
|
-
// produces many runs, and an event needs to say which of each it is.
|
|
3279
2995
|
...(sessionId !== undefined && { sessionId }),
|
|
3280
2996
|
...(actor?.principal !== undefined && { principal: actor.principal }),
|
|
3281
2997
|
...(actor?.tenant !== undefined && { tenant: actor.tenant }),
|
|
3282
2998
|
};
|
|
3283
|
-
const getRunCtx = () =>
|
|
2999
|
+
const getRunCtx = () => invocation.context();
|
|
3284
3000
|
// The run's redaction (`src/redaction/`): this agent's `redact` joined
|
|
3285
3001
|
// with any policy the caller handed down for this run (a tool's
|
|
3286
3002
|
// `ctx.redact`). Opened for EVERY run — with no policy the serving is the
|
|
3287
3003
|
// identity, but the stages' scopes still feed the real-value path the
|
|
3288
3004
|
// crash checkpoint and the window's meter read.
|
|
3289
|
-
const redaction = this.
|
|
3290
|
-
|
|
3291
|
-
// The Agent's executor dials: readTracking (#18/#14, snapshot stageReads),
|
|
3292
|
-
// commitValues (#13c-B, commit-log value encoding) and writeProvenance
|
|
3293
|
-
// (#P1, per-write read provenance — the exact-dataflow debugging dial).
|
|
3294
|
-
const spec = this.getSpec();
|
|
3295
|
-
// Every scope THIS executor makes is marked as the agent's own, so a stage
|
|
3296
|
-
// can tell its own run from a mount in another runner's executor
|
|
3297
|
-
// (`memberRun.ts`) — per scope, never by instance state.
|
|
3298
|
-
const scopeFactory = redaction.scopeFactoryFor(spec);
|
|
3299
|
-
const ownScopes = this.ownScopes;
|
|
3300
|
-
const scopeRequests = this.scopeRequests;
|
|
3301
|
-
const executor = new footprintjs_1.FlowChartExecutor(spec, {
|
|
3302
|
-
readTracking: this.readTracking,
|
|
3303
|
-
commitValues: this.commitValues,
|
|
3304
|
-
writeProvenance: this.writeProvenance,
|
|
3305
|
-
scopeFactory: (...args) => {
|
|
3306
|
-
const scope = scopeFactory(...args);
|
|
3307
|
-
if (scope !== null && typeof scope === 'object') {
|
|
3308
|
-
ownScopes.add(scope);
|
|
3309
|
-
// THIS executor's request, bound to the scope for its whole life.
|
|
3310
|
-
if (request !== undefined)
|
|
3311
|
-
scopeRequests.set(scope, request);
|
|
3312
|
-
}
|
|
3313
|
-
return scope;
|
|
3314
|
-
},
|
|
3315
|
-
});
|
|
3316
|
-
redaction.applyTo(executor);
|
|
3317
|
-
// Enable structured narrative so `getLastNarrativeEntries()` can
|
|
3318
|
-
// hand a populated array to consumer Trace views (ExplainableShell).
|
|
3319
|
-
// Cheap when no consumer reads it; the recorder accumulates only.
|
|
3320
|
-
executor.enableNarrative();
|
|
3321
|
-
this.lastExecutor = executor;
|
|
3005
|
+
const redaction = this.prepareRunRedaction(invocation, runOptions?.redact);
|
|
3006
|
+
const attachments = redaction.recorders.map((recorder) => ({ recorder }));
|
|
3322
3007
|
const dispatcher = this.getDispatcher();
|
|
3323
3008
|
// RFC-001 Block 10 — observer delivery tier. With 'deferred', every
|
|
3324
3009
|
// bridge below is attached onto footprintjs's bounded capture queue
|
|
@@ -3330,35 +3015,11 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3330
3015
|
? { delivery: 'deferred', ...this.observerDeliveryOptions }
|
|
3331
3016
|
: undefined;
|
|
3332
3017
|
const attachObserver = (rec) => {
|
|
3333
|
-
|
|
3334
|
-
executor.attachCombinedRecorder(rec, deferredOpts);
|
|
3335
|
-
else
|
|
3336
|
-
executor.attachCombinedRecorder(rec);
|
|
3018
|
+
attachments.push({ recorder: rec, ...(deferredOpts && { options: deferredOpts }) });
|
|
3337
3019
|
};
|
|
3338
3020
|
attachObserver(new ContextRecorder_js_1.ContextRecorder({ dispatcher, getRunContext: getRunCtx, realWrites: redaction }));
|
|
3339
|
-
//
|
|
3340
|
-
|
|
3341
|
-
// write stage consumes its accumulators MID-run (`collect()` via
|
|
3342
|
-
// `evidenceSource`, mountMemoryPipeline). Deferred delivery would run
|
|
3343
|
-
// `collect()` before the queue flushed the turn's tool/token/decision
|
|
3344
|
-
// events, persisting an incomplete causal snapshot.
|
|
3345
|
-
if (this.causalEvidence) {
|
|
3346
|
-
// Its emits arrive on the real-value path (constructor); the executor
|
|
3347
|
-
// feeds it the flow channel's decisions and the per-run reset only.
|
|
3348
|
-
const evidence = this.causalEvidence;
|
|
3349
|
-
executor.attachCombinedRecorder({
|
|
3350
|
-
id: evidence.id,
|
|
3351
|
-
onDecision: (event) => evidence.onDecision(event),
|
|
3352
|
-
onSelected: (event) => evidence.onSelected(event),
|
|
3353
|
-
clear: () => evidence.clear(),
|
|
3354
|
-
});
|
|
3355
|
-
}
|
|
3356
|
-
// Compaction's instrument. ALWAYS INLINE, for the same reason the evidence
|
|
3357
|
-
// bridge is: the compaction stage reads it MID-run, at the loop head, to
|
|
3358
|
-
// decide whether this iteration's window is over budget. A measurement
|
|
3359
|
-
// delivered one beat behind would be a measurement of the wrong window.
|
|
3360
|
-
if (this.compactionMeterHandle) {
|
|
3361
|
-
executor.attachCombinedRecorder(this.compactionMeterHandle);
|
|
3021
|
+
// Computational observers belong to native component setup, always inline.
|
|
3022
|
+
if (this.windowStrategy !== undefined) {
|
|
3362
3023
|
// Folds speak the context vocabulary consumers already subscribe to
|
|
3363
3024
|
// (`context.evicted` / `context.budget_pressure`) — no new event types.
|
|
3364
3025
|
// ContextRecorder only dispatches those from writes INSIDE a slot
|
|
@@ -3515,17 +3176,30 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3515
3176
|
// `{ id, delivery: 'inline', ...hooks }` stays inline under an
|
|
3516
3177
|
// observerDelivery: 'deferred' agent, and vice versa.
|
|
3517
3178
|
if (r.delivery !== undefined)
|
|
3518
|
-
|
|
3179
|
+
attachments.push({ recorder: r });
|
|
3519
3180
|
else
|
|
3520
3181
|
attachObserver(r);
|
|
3521
3182
|
}
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3183
|
+
return {
|
|
3184
|
+
setup: {
|
|
3185
|
+
redaction: redaction.recordPolicy,
|
|
3186
|
+
narrative: {},
|
|
3187
|
+
attachments,
|
|
3188
|
+
onOrigin: () => {
|
|
3189
|
+
// Native is the only ID/clock authority. Remaining domain consumers
|
|
3190
|
+
// still migrate to captured component values; no private ID is minted.
|
|
3191
|
+
this.bindRunServing(invocation);
|
|
3192
|
+
this.emitRunManifest(invocation.context());
|
|
3193
|
+
this.emitSkillGraphDeclared(invocation.context());
|
|
3194
|
+
},
|
|
3195
|
+
},
|
|
3196
|
+
binding: {
|
|
3197
|
+
metadata,
|
|
3198
|
+
bindScope: (scope, context) => {
|
|
3199
|
+
redaction.bindScope(scope, context);
|
|
3200
|
+
},
|
|
3201
|
+
},
|
|
3202
|
+
};
|
|
3529
3203
|
}
|
|
3530
3204
|
/**
|
|
3531
3205
|
* File the run-configuration manifest (9.41.0) — which adapters and
|
|
@@ -3553,8 +3227,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3553
3227
|
* with `'*'` before the run starts, so every recording carries one.
|
|
3554
3228
|
*/
|
|
3555
3229
|
/** Fresh per-run ledger — see AgentOptions.integrityPosture (9.60.0). */
|
|
3556
|
-
beginIntegrityLedger() {
|
|
3557
|
-
|
|
3230
|
+
beginIntegrityLedger(values) {
|
|
3231
|
+
values.integrityLedger.current = (0, lifecycle_js_1.beginIntegrityRun)({
|
|
3558
3232
|
wire: true,
|
|
3559
3233
|
composeInvariant: this.mapsPlan !== undefined,
|
|
3560
3234
|
dangling: this.integrityDanglingPresent,
|
|
@@ -3580,11 +3254,11 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3580
3254
|
* uncaught. Called on the SUCCESS path before the recording files, so the
|
|
3581
3255
|
* failure is the run's result, never a masked afterthought.
|
|
3582
3256
|
*/
|
|
3583
|
-
assertIntegrityAlive() {
|
|
3257
|
+
assertIntegrityAlive(invocation) {
|
|
3584
3258
|
if (this.integrityPosture !== 'dev')
|
|
3585
3259
|
return;
|
|
3586
|
-
|
|
3587
|
-
workExisted: this.integrityWorkExisted(),
|
|
3260
|
+
invocation.value.integrityLedger.current?.assertAlive({
|
|
3261
|
+
workExisted: this.integrityWorkExisted(invocation),
|
|
3588
3262
|
});
|
|
3589
3263
|
}
|
|
3590
3264
|
/**
|
|
@@ -3599,8 +3273,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3599
3273
|
* circular: an unhooked check would report "no work existed" and silence
|
|
3600
3274
|
* the very alarm it should be tripping.
|
|
3601
3275
|
*/
|
|
3602
|
-
integrityWorkExisted() {
|
|
3603
|
-
const state =
|
|
3276
|
+
integrityWorkExisted(invocation) {
|
|
3277
|
+
const state = invocation.view.snapshot()?.sharedState;
|
|
3604
3278
|
return state !== undefined && state.llmLatestContent !== undefined;
|
|
3605
3279
|
}
|
|
3606
3280
|
/**
|
|
@@ -3609,9 +3283,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3609
3283
|
* before the recording stops. Listener-gated like every typed event, and
|
|
3610
3284
|
* deliberately throw-proof: accounting must never change a run's outcome.
|
|
3611
3285
|
*/
|
|
3612
|
-
fileIntegrityDisposition() {
|
|
3613
|
-
const ledger =
|
|
3614
|
-
|
|
3286
|
+
fileIntegrityDisposition(invocation) {
|
|
3287
|
+
const ledger = invocation.value.integrityLedger.current;
|
|
3288
|
+
invocation.value.integrityLedger.current = undefined;
|
|
3615
3289
|
if (ledger === undefined)
|
|
3616
3290
|
return;
|
|
3617
3291
|
try {
|
|
@@ -3623,17 +3297,17 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3623
3297
|
type,
|
|
3624
3298
|
payload: {
|
|
3625
3299
|
posture: this.integrityPosture,
|
|
3626
|
-
workExisted: this.integrityWorkExisted(),
|
|
3300
|
+
workExisted: this.integrityWorkExisted(invocation),
|
|
3627
3301
|
rows: ledger.report(),
|
|
3628
3302
|
},
|
|
3629
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: INTEGRITY_DISPOSITION_STAGE_ID },
|
|
3303
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: eventStageIds_js_1.INTEGRITY_DISPOSITION_STAGE_ID }, invocation.context()),
|
|
3630
3304
|
});
|
|
3631
3305
|
}
|
|
3632
3306
|
catch {
|
|
3633
3307
|
// Recorder/dispatcher failures never abort a run — the house rule.
|
|
3634
3308
|
}
|
|
3635
3309
|
}
|
|
3636
|
-
emitRunManifest() {
|
|
3310
|
+
emitRunManifest(context) {
|
|
3637
3311
|
const type = 'agentfootprint.agent.run_configured';
|
|
3638
3312
|
const dispatcher = this.getDispatcher();
|
|
3639
3313
|
if (!dispatcher.hasListenersFor(type))
|
|
@@ -3684,7 +3358,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3684
3358
|
},
|
|
3685
3359
|
}),
|
|
3686
3360
|
}),
|
|
3687
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: RUN_MANIFEST_STAGE_ID },
|
|
3361
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: eventStageIds_js_1.RUN_MANIFEST_STAGE_ID }, context),
|
|
3688
3362
|
});
|
|
3689
3363
|
}
|
|
3690
3364
|
/**
|
|
@@ -3703,7 +3377,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3703
3377
|
* No graph, or a graph that could not state its map ⇒ no event — absent,
|
|
3704
3378
|
* never guessed.
|
|
3705
3379
|
*/
|
|
3706
|
-
emitSkillGraphDeclared() {
|
|
3380
|
+
emitSkillGraphDeclared(context) {
|
|
3707
3381
|
if (this.skillGraphDeclared === undefined)
|
|
3708
3382
|
return;
|
|
3709
3383
|
const type = 'agentfootprint.skill.graph_declared';
|
|
@@ -3713,7 +3387,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3713
3387
|
dispatcher.dispatch({
|
|
3714
3388
|
type,
|
|
3715
3389
|
payload: this.skillGraphDeclared,
|
|
3716
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: GRAPH_DECLARED_STAGE_ID },
|
|
3390
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: eventStageIds_js_1.GRAPH_DECLARED_STAGE_ID }, context),
|
|
3717
3391
|
});
|
|
3718
3392
|
}
|
|
3719
3393
|
/**
|
|
@@ -3737,9 +3411,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3737
3411
|
* ```
|
|
3738
3412
|
*/
|
|
3739
3413
|
drainObservers(opts) {
|
|
3740
|
-
|
|
3414
|
+
const view = this.runExecution().view();
|
|
3415
|
+
if (view === undefined)
|
|
3741
3416
|
return Promise.resolve({ done: 0, failed: 0, pending: 0 });
|
|
3742
|
-
return
|
|
3417
|
+
return view.drainObservers(opts);
|
|
3743
3418
|
}
|
|
3744
3419
|
/**
|
|
3745
3420
|
* Did the last turn stop because a LIMIT cut it short — and if so, which?
|
|
@@ -3985,15 +3660,16 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
3985
3660
|
* ```
|
|
3986
3661
|
*/
|
|
3987
3662
|
async assessment(declarations) {
|
|
3988
|
-
const
|
|
3663
|
+
const selected = this.runExecution().selected();
|
|
3664
|
+
const snapshot = selected?.view.snapshot();
|
|
3989
3665
|
if (snapshot === undefined)
|
|
3990
3666
|
return undefined;
|
|
3991
3667
|
// Settled before the fold, which cannot tell a crash from its committed state: an answer
|
|
3992
3668
|
// this run RETURNED (`lastRunAnswer`, cleared at every run's start), or a pause — the fold
|
|
3993
3669
|
// reads that one from the committed state itself. Read BEFORE the import resolves, so a
|
|
3994
3670
|
// run started meanwhile cannot change which run is assessed.
|
|
3995
|
-
const paused =
|
|
3996
|
-
if (!paused &&
|
|
3671
|
+
const paused = selected?.view.isPaused() === true;
|
|
3672
|
+
if (!paused && selected?.value.answer === undefined)
|
|
3997
3673
|
return undefined;
|
|
3998
3674
|
// Loaded on first use, off the default graph (the findings/peel.ts precedent).
|
|
3999
3675
|
// The live state, read as values — never as a served record (`assess.ts` · `assessLive`).
|
|
@@ -4128,11 +3804,13 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4128
3804
|
}
|
|
4129
3805
|
return undefined;
|
|
4130
3806
|
}
|
|
4131
|
-
finalizeResult(
|
|
4132
|
-
const paused = this.detectPause(
|
|
3807
|
+
finalizeResult(invocation, result) {
|
|
3808
|
+
const paused = this.detectPause(invocation, result);
|
|
4133
3809
|
if (paused)
|
|
4134
3810
|
return paused;
|
|
4135
|
-
const snap =
|
|
3811
|
+
const snap = invocation.view.snapshot();
|
|
3812
|
+
if (snap === undefined)
|
|
3813
|
+
throw new TypeError('The native execution has no ready snapshot');
|
|
4136
3814
|
const state = snap.sharedState;
|
|
4137
3815
|
const refusal = this.refusalVerdictOf(state);
|
|
4138
3816
|
if (refusal !== undefined) {
|
|
@@ -4148,7 +3826,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4148
3826
|
stage: '__output_admission__',
|
|
4149
3827
|
scope: 'run',
|
|
4150
3828
|
},
|
|
4151
|
-
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: '__output_admission__' },
|
|
3829
|
+
meta: (0, eventMeta_js_1.buildEventMeta)({ runtimeStageId: '__output_admission__' }, invocation.context()),
|
|
4152
3830
|
});
|
|
4153
3831
|
}
|
|
4154
3832
|
// The verdict was decoded from the LIVE state above; the snapshot a
|
|
@@ -4169,10 +3847,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4169
3847
|
// `'pause'` this is unreachable for the first block (the run pauses and
|
|
4170
3848
|
// `detectPause` returned above); it still fires if a RESUME found consent
|
|
4171
3849
|
// ungranted and the model then finished the turn on its own.
|
|
4172
|
-
if (
|
|
4173
|
-
const [record] = [...
|
|
3850
|
+
if (invocation.value.consentOutstanding.size > 0) {
|
|
3851
|
+
const [record] = [...invocation.value.consentOutstanding.values()];
|
|
4174
3852
|
if (record) {
|
|
4175
|
-
|
|
3853
|
+
invocation.value.consentOutstanding.clear();
|
|
4176
3854
|
throw new CredentialConsentRequiredError_js_1.CredentialConsentRequiredError(record);
|
|
4177
3855
|
}
|
|
4178
3856
|
}
|
|
@@ -4253,163 +3931,177 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4253
3931
|
// keep them. Negative-claim observations also persist independently of those
|
|
4254
3932
|
// layers. Still value-conditional inside seed (only when rows exist).
|
|
4255
3933
|
let ledgerRestoreArmed = this.findingsOptions !== undefined || this.negativeClaimsConfig !== undefined;
|
|
4256
|
-
const
|
|
4257
|
-
const
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
get toolWantsByName() {
|
|
4274
|
-
return seededToolWants;
|
|
4275
|
-
},
|
|
4276
|
-
get ruledTools() {
|
|
4277
|
-
return seededRuledTools;
|
|
4278
|
-
},
|
|
4279
|
-
get honestyLayers() {
|
|
4280
|
-
return seededHonestyLayers;
|
|
4281
|
-
},
|
|
4282
|
-
// The time layer's clock: the draft `run()` read (refusing a run with no
|
|
4283
|
-
// zone), stamped by seed as the turn's one `clock` row. Absent → the
|
|
4284
|
-
// deps object seed always had.
|
|
4285
|
-
// The caller's clock belongs to the agent's OWN run: a member (another
|
|
4286
|
-
// runner's executor) gets the builder's fallback, never a concurrent
|
|
4287
|
-
// direct caller's `time` (`memberRun.ts`).
|
|
4288
|
-
...(this.timeOptions !== undefined && {
|
|
4289
|
-
timeClock: (scope) => this.ownScopes.has(scope)
|
|
4290
|
-
? this.seedClockDraft()
|
|
4291
|
-
: (0, clock_js_1.draftClock)(undefined, this.timeOptions ?? {}),
|
|
4292
|
-
}),
|
|
4293
|
-
// The time layer's reader: seed reads the person's words once per turn,
|
|
4294
|
-
// after the clock. Absent → nothing is read.
|
|
4295
|
-
...(this.timeOptions?.reader !== undefined &&
|
|
4296
|
-
this.timeOptions.policy !== undefined && {
|
|
4297
|
-
timeReader: { reader: this.timeOptions.reader, policy: this.timeOptions.policy },
|
|
4298
|
-
}),
|
|
4299
|
-
// Declared sources (honesty layer 2): the seed twin plants `_findings.from`
|
|
4300
|
-
// on ruled tools, and the run's `messageFrom` constant is written — only
|
|
4301
|
-
// under the arm (refused at build without the inputs layer).
|
|
4302
|
-
...(this.argumentSourcesArmed === true && { argumentSources: true }),
|
|
4303
|
-
// The answer check's tool-call ledger — value-conditional, so an agent
|
|
4304
|
-
// without answer validation or negative claims keeps its prior shape.
|
|
4305
|
-
...((this.answerValidationConfig !== undefined ||
|
|
4306
|
-
this.negativeClaimsConfig !== undefined) && { toolCallLedger: true }),
|
|
4307
|
-
...(this.negativeClaimsConfig !== undefined && { negativeClaimsArmed: true }),
|
|
4308
|
-
get consumePendingResumeFindingsLedger() {
|
|
4309
|
-
return ledgerRestoreArmed ? consumeResumeLedger : undefined;
|
|
4310
|
-
},
|
|
4311
|
-
consumePendingResumeHistory: () => {
|
|
4312
|
-
const h = this.pendingResumeHistory;
|
|
4313
|
-
this.pendingResumeHistory = undefined;
|
|
4314
|
-
return h;
|
|
4315
|
-
},
|
|
4316
|
-
...(this.evidenceGate !== undefined &&
|
|
4317
|
-
this.evidenceGate.posture !== 'assist' && {
|
|
4318
|
-
consumePendingEvidenceRecovery: () => {
|
|
4319
|
-
const recovery = this.pendingEvidenceRecovery;
|
|
4320
|
-
this.pendingEvidenceRecovery = undefined;
|
|
4321
|
-
return recovery;
|
|
3934
|
+
const seedFor = (run) => {
|
|
3935
|
+
const consumeResumeLedger = () => {
|
|
3936
|
+
const l = run.value.pendingResumeFindingsLedger;
|
|
3937
|
+
run.value.pendingResumeFindingsLedger = undefined;
|
|
3938
|
+
return l;
|
|
3939
|
+
};
|
|
3940
|
+
return (0, seed_js_1.buildSeedStage)({
|
|
3941
|
+
maxIterations,
|
|
3942
|
+
// The forced-output tool's name (9.88.0) — a build-time constant, put on
|
|
3943
|
+
// the record once so a rebuild can name it without reading a receipt.
|
|
3944
|
+
...(this.outputEnforcement?.schemaTool !== undefined && {
|
|
3945
|
+
forcedOutputToolName: this.outputEnforcement.schemaTool.name,
|
|
3946
|
+
}),
|
|
3947
|
+
cachingDisabled,
|
|
3948
|
+
...(costBudget !== undefined && { costBudgetOnExceed: costBudget.onExceed }),
|
|
3949
|
+
get toolSchemas() {
|
|
3950
|
+
return toolSchemasResolved;
|
|
4322
3951
|
},
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
3952
|
+
get toolWantsByName() {
|
|
3953
|
+
return seededToolWants;
|
|
3954
|
+
},
|
|
3955
|
+
get ruledTools() {
|
|
3956
|
+
return seededRuledTools;
|
|
3957
|
+
},
|
|
3958
|
+
get honestyLayers() {
|
|
3959
|
+
return seededHonestyLayers;
|
|
3960
|
+
},
|
|
3961
|
+
// The time layer's clock: the draft `run()` read (refusing a run with no
|
|
3962
|
+
// zone), stamped by seed as the turn's one `clock` row. Absent → the
|
|
3963
|
+
// deps object seed always had.
|
|
3964
|
+
// The caller's clock belongs to the agent's OWN run: a member (another
|
|
3965
|
+
// runner's executor) gets the builder's fallback, never a concurrent
|
|
3966
|
+
// direct caller's `time` (`memberRun.ts`).
|
|
3967
|
+
...(this.timeOptions !== undefined && {
|
|
3968
|
+
timeClock: () => run.own
|
|
3969
|
+
? this.seedClockDraft(run.value)
|
|
3970
|
+
: (0, clock_js_1.draftClock)(undefined, this.timeOptions ?? {}),
|
|
4342
3971
|
}),
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
},
|
|
4361
|
-
restoreSkillCursor: this.skillGraphCascade?.continuity === 'conversation',
|
|
4362
|
-
// Steps (9.18.0): gate the per-run stepPointer/stepNudgeSpent reset on
|
|
4363
|
-
// the feature, so every other agent seeds exactly the keys it always did.
|
|
4364
|
-
...(stepPlanFor !== undefined && { hasSteps: true }),
|
|
4365
|
-
// Escalation (9.19.0): same gate discipline — the per-run counter/flip
|
|
4366
|
-
// reset exists only when the policy does (de-escalation IS the seed).
|
|
4367
|
-
...(this.skillBrains?.escalation !== undefined && { hasEscalation: true }),
|
|
4368
|
-
// The evidence gate's one bounded revision (9.35.0) — a per-turn budget,
|
|
4369
|
-
// reset here. Only a posture that can revise writes the key.
|
|
4370
|
-
...((this.typedNegativeClaimsConfig !== undefined ||
|
|
4371
|
-
(this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
|
|
4372
|
-
hasEvidenceRevision: true,
|
|
4373
|
-
}),
|
|
4374
|
-
// Under an enforcing answer validation the tools stay off for a run
|
|
4375
|
-
// resumed after its revision was asked (`toolsOffAfterRevision`).
|
|
4376
|
-
...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
|
|
4377
|
-
getCurrentRunId: () => this.currentRunContext?.runId,
|
|
4378
|
-
// WHO this run is for, when the caller named nobody (9.10.0). Seed uses
|
|
4379
|
-
// it for exactly one rung of the identity ladder — see `seedFrom` — and
|
|
4380
|
-
// an explicit identity outranks it there. Read through an accessor for
|
|
4381
|
-
// the same reason the runId is: the chart is built once, and this
|
|
4382
|
-
// changes every run.
|
|
4383
|
-
getCurrentSessionId: () => this.currentRunContext?.sessionId,
|
|
4384
|
-
// Whether this stage runs in THIS agent's own executor, or inside another
|
|
4385
|
-
// runner's (a composition, a chart a caller built) — where the accessors
|
|
4386
|
-
// above describe some other run (`memberRun.ts`). Asked per scope.
|
|
4387
|
-
isOwnRun: (scope) => this.ownScopes.has(scope),
|
|
4388
|
-
// WHICH TURN THIS IS (9.6.0). Only memories that WRITE the conversation
|
|
4389
|
-
// are consulted: they are the ones whose entry ids are turn-stamped, and
|
|
4390
|
-
// a corpus (`.rag(...)`, which reads under its own namespace) has no
|
|
4391
|
-
// turns at all. Empty list → seed stays synchronous and makes no store
|
|
4392
|
-
// call, so an agent without memory is unchanged.
|
|
4393
|
-
...(conversationStores.length > 0 && { conversationStores }),
|
|
4394
|
-
// The `'input'` half of the message chain, run BEFORE `userMessage` and
|
|
4395
|
-
// `history` are committed — see SeedStageDeps.messageMiddleware.
|
|
4396
|
-
...(this.messageMiddleware.length > 0 && { messageMiddleware: this.messageMiddleware }),
|
|
4397
|
-
// `.configure()` — seed is where run-level facts are decided and
|
|
4398
|
-
// committed, so the resolver rides that commit. The closure supplies
|
|
4399
|
-
// the build-time defaults so a resolver can decide RELATIVE to them
|
|
4400
|
-
// ("upgrade the model when the message is long") instead of having to
|
|
4401
|
-
// restate them.
|
|
4402
|
-
...(this.runConfigFn && {
|
|
4403
|
-
resolveRunConfig: (input) => {
|
|
4404
|
-
const ctx = {
|
|
4405
|
-
message: input.message,
|
|
4406
|
-
...(input.identity !== undefined && { identity: input.identity }),
|
|
4407
|
-
runId: this.currentRunContext?.runId ?? 'unknown',
|
|
4408
|
-
defaults: { model, instructions: systemPromptValue },
|
|
4409
|
-
};
|
|
4410
|
-
return this.runConfigFn?.(ctx);
|
|
3972
|
+
// The time layer's reader: seed reads the person's words once per turn,
|
|
3973
|
+
// after the clock. Absent → nothing is read.
|
|
3974
|
+
...(this.timeOptions?.reader !== undefined &&
|
|
3975
|
+
this.timeOptions.policy !== undefined && {
|
|
3976
|
+
timeReader: { reader: this.timeOptions.reader, policy: this.timeOptions.policy },
|
|
3977
|
+
}),
|
|
3978
|
+
// Declared sources (honesty layer 2): the seed twin plants `_findings.from`
|
|
3979
|
+
// on ruled tools, and the run's `messageFrom` constant is written — only
|
|
3980
|
+
// under the arm (refused at build without the inputs layer).
|
|
3981
|
+
...(this.argumentSourcesArmed === true && { argumentSources: true }),
|
|
3982
|
+
// The answer check's tool-call ledger — value-conditional, so an agent
|
|
3983
|
+
// without answer validation or negative claims keeps its prior shape.
|
|
3984
|
+
...((this.answerValidationConfig !== undefined ||
|
|
3985
|
+
this.negativeClaimsConfig !== undefined) && { toolCallLedger: true }),
|
|
3986
|
+
...(this.negativeClaimsConfig !== undefined && { negativeClaimsArmed: true }),
|
|
3987
|
+
get consumePendingResumeFindingsLedger() {
|
|
3988
|
+
return ledgerRestoreArmed ? consumeResumeLedger : undefined;
|
|
4411
3989
|
},
|
|
4412
|
-
|
|
3990
|
+
consumePendingResumeHistory: () => {
|
|
3991
|
+
const h = run.value.pendingResumeHistory;
|
|
3992
|
+
run.value.pendingResumeHistory = undefined;
|
|
3993
|
+
return h;
|
|
3994
|
+
},
|
|
3995
|
+
...(this.evidenceGate !== undefined &&
|
|
3996
|
+
this.evidenceGate.posture !== 'assist' && {
|
|
3997
|
+
consumePendingEvidenceRecovery: () => {
|
|
3998
|
+
const recovery = run.value.pendingEvidenceRecovery;
|
|
3999
|
+
run.value.pendingEvidenceRecovery = undefined;
|
|
4000
|
+
return recovery;
|
|
4001
|
+
},
|
|
4002
|
+
}),
|
|
4003
|
+
consumePendingResumeFolded: () => {
|
|
4004
|
+
const f = run.value.pendingResumeFolded;
|
|
4005
|
+
run.value.pendingResumeFolded = undefined;
|
|
4006
|
+
return f;
|
|
4007
|
+
},
|
|
4008
|
+
// The findings ledger (9.101.0): the arm, the serve mode it puts on the
|
|
4009
|
+
// record (the `forcedOutputToolName` precedent — a build-time constant
|
|
4010
|
+
// the rebuild reads instead of the receipt), and the continued
|
|
4011
|
+
// conversation's rows, all under the one gate — an unarmed agent hands
|
|
4012
|
+
// seed exactly the deps object it always did.
|
|
4013
|
+
...(this.findingsOptions !== undefined && {
|
|
4014
|
+
findings: true,
|
|
4015
|
+
findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
|
|
4016
|
+
findingsContextBytes: this.findingsOptions.maxContextBytes,
|
|
4017
|
+
// The answer-turn ask (9.103.0): VALUE-conditional inside the arm —
|
|
4018
|
+
// the default `'none'` threads nothing and writes no key.
|
|
4019
|
+
...(this.findingsOptions.answerAsk === 'quote-facts' && {
|
|
4020
|
+
findingsAnswerAsk: 'quote-facts',
|
|
4021
|
+
}),
|
|
4022
|
+
}),
|
|
4023
|
+
// The declared ontology (9.106.0): the whole frozen map, which seed
|
|
4024
|
+
// writes ONCE as the run constant `ontology` — the `findingsServe`
|
|
4025
|
+
// precedent, a build-time fact the rebuild reads from the RECORD. An
|
|
4026
|
+
// unarmed agent hands seed exactly the deps object it always did.
|
|
4027
|
+
...(this.ontology !== undefined && {
|
|
4028
|
+
ontology: this.ontology,
|
|
4029
|
+
ontologyTools: () => this.ontologyTools,
|
|
4030
|
+
}),
|
|
4031
|
+
// The conversation's inherited skill cursor (SG-C). Consumed (cleared)
|
|
4032
|
+
// on every run; HONORED only when the mounted graph declared
|
|
4033
|
+
// `continuity: 'conversation'` — the same one-option-one-behavior gate
|
|
4034
|
+
// the write side (`checkpoint()`) applies.
|
|
4035
|
+
consumePendingResumeSkillCursor: () => {
|
|
4036
|
+
const c = run.value.pendingResumeSkillCursor;
|
|
4037
|
+
run.value.pendingResumeSkillCursor = undefined;
|
|
4038
|
+
return c;
|
|
4039
|
+
},
|
|
4040
|
+
restoreSkillCursor: this.skillGraphCascade?.continuity === 'conversation',
|
|
4041
|
+
// Steps (9.18.0): gate the per-run stepPointer/stepNudgeSpent reset on
|
|
4042
|
+
// the feature, so every other agent seeds exactly the keys it always did.
|
|
4043
|
+
...(stepPlanFor !== undefined && { hasSteps: true }),
|
|
4044
|
+
// Escalation (9.19.0): same gate discipline — the per-run counter/flip
|
|
4045
|
+
// reset exists only when the policy does (de-escalation IS the seed).
|
|
4046
|
+
...(this.skillBrains?.escalation !== undefined && { hasEscalation: true }),
|
|
4047
|
+
// The evidence gate's one bounded revision (9.35.0) — a per-turn budget,
|
|
4048
|
+
// reset here. Only a posture that can revise writes the key.
|
|
4049
|
+
...((this.typedNegativeClaimsConfig !== undefined ||
|
|
4050
|
+
(this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
|
|
4051
|
+
hasEvidenceRevision: true,
|
|
4052
|
+
}),
|
|
4053
|
+
// Under an enforcing answer validation the tools stay off for a run
|
|
4054
|
+
// resumed after its revision was asked (`toolsOffAfterRevision`).
|
|
4055
|
+
...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
|
|
4056
|
+
getCurrentRunId: () => run.context.runId,
|
|
4057
|
+
// WHO this run is for, when the caller named nobody (9.10.0). Seed uses
|
|
4058
|
+
// it for exactly one rung of the identity ladder — see `seedFrom` — and
|
|
4059
|
+
// an explicit identity outranks it there. Read through an accessor for
|
|
4060
|
+
// the same reason the runId is: the chart is built once, and this
|
|
4061
|
+
// changes every run.
|
|
4062
|
+
getCurrentSessionId: () => run.context.sessionId,
|
|
4063
|
+
// Whether this stage runs in THIS agent's own executor, or inside another
|
|
4064
|
+
// runner's (a composition, a chart a caller built) — where the accessors
|
|
4065
|
+
// above describe some other run (`memberRun.ts`). Asked per scope.
|
|
4066
|
+
isOwnRun: () => run.own,
|
|
4067
|
+
// WHICH TURN THIS IS (9.6.0). Only memories that WRITE the conversation
|
|
4068
|
+
// are consulted: they are the ones whose entry ids are turn-stamped, and
|
|
4069
|
+
// a corpus (`.rag(...)`, which reads under its own namespace) has no
|
|
4070
|
+
// turns at all. Empty list → seed stays synchronous and makes no store
|
|
4071
|
+
// call, so an agent without memory is unchanged.
|
|
4072
|
+
...(conversationStores.length > 0 && { conversationStores }),
|
|
4073
|
+
// The `'input'` half of the message chain, run BEFORE `userMessage` and
|
|
4074
|
+
// `history` are committed — see SeedStageDeps.messageMiddleware.
|
|
4075
|
+
...(this.messageMiddleware.length > 0 && { messageMiddleware: this.messageMiddleware }),
|
|
4076
|
+
// `.configure()` — seed is where run-level facts are decided and
|
|
4077
|
+
// committed, so the resolver rides that commit. The closure supplies
|
|
4078
|
+
// the build-time defaults so a resolver can decide RELATIVE to them
|
|
4079
|
+
// ("upgrade the model when the message is long") instead of having to
|
|
4080
|
+
// restate them.
|
|
4081
|
+
...(this.runConfigFn && {
|
|
4082
|
+
resolveRunConfig: (input) => {
|
|
4083
|
+
const ctx = {
|
|
4084
|
+
message: input.message,
|
|
4085
|
+
...(input.identity !== undefined && { identity: input.identity }),
|
|
4086
|
+
runId: run.context.runId ?? 'unknown',
|
|
4087
|
+
defaults: { model, instructions: systemPromptValue },
|
|
4088
|
+
};
|
|
4089
|
+
return this.runConfigFn?.(ctx);
|
|
4090
|
+
},
|
|
4091
|
+
}),
|
|
4092
|
+
});
|
|
4093
|
+
};
|
|
4094
|
+
const seed = (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (scope) => {
|
|
4095
|
+
run.value.resources?.seed(scope);
|
|
4096
|
+
// Mounted runs have no Agent.run() admission. Seed's actual input is
|
|
4097
|
+
// their original message; never read another run's selected values.
|
|
4098
|
+
run.value.checkpointTracker ??= {
|
|
4099
|
+
runId: run.context.runId,
|
|
4100
|
+
originalInput: { message: scope.$getArgs().message },
|
|
4101
|
+
history: [],
|
|
4102
|
+
lastCompletedIteration: 0,
|
|
4103
|
+
};
|
|
4104
|
+
return (run.value.seed ??= seedFor(run))(scope);
|
|
4413
4105
|
});
|
|
4414
4106
|
// Tool registry composition extracted to ./agent/buildToolRegistry.ts.
|
|
4415
4107
|
// Composes static .tool() registry + auto-attached read_skill (+ the
|
|
@@ -4425,6 +4117,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4425
4117
|
// plants `_findings.from` on it and its sentences name that argument.
|
|
4426
4118
|
...(this.argumentSourcesArmed === true && { argumentSources: true }),
|
|
4427
4119
|
});
|
|
4120
|
+
if ([...registryByName.values()].some(toolShownArgs_js_1.carriesArgumentView))
|
|
4121
|
+
(0, declared_js_1.declarePrivateFields)(this);
|
|
4428
4122
|
// The declared ontology's tool edges (9.106.0): every name a node's `via`
|
|
4429
4123
|
// names must be a tool this registry can dispatch — the static registry,
|
|
4430
4124
|
// the framework's doors and every skill's tools, `registryByName` being
|
|
@@ -4496,7 +4190,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4496
4190
|
if (registryByName.has(ingredient))
|
|
4497
4191
|
continue;
|
|
4498
4192
|
if (this.externalToolProvider !== undefined) {
|
|
4499
|
-
if ((0,
|
|
4193
|
+
if ((0, footprintjs_1.isDevMode)()) {
|
|
4500
4194
|
// eslint-disable-next-line no-console
|
|
4501
4195
|
console.warn(`[agentfootprint] tool '${composedName}' declares composedOf ingredient ` +
|
|
4502
4196
|
`'${ingredient}', which is not in the static catalog. A ToolProvider is ` +
|
|
@@ -4672,44 +4366,22 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4672
4366
|
const messagesSubflow = (0, buildMessagesSlot_js_1.buildMessagesSlot)({
|
|
4673
4367
|
...(budget?.messages !== undefined && { budgetCap: budget.messages }),
|
|
4674
4368
|
});
|
|
4675
|
-
//
|
|
4676
|
-
|
|
4677
|
-
// Tool[] from `provider.list(ctx)` so dispatch doesn't re-invoke `list()`
|
|
4678
|
-
// — vital for async network providers.
|
|
4679
|
-
//
|
|
4680
|
-
// LIFETIME, stated correctly (9.92.0): the chart is built ONCE, at
|
|
4681
|
-
// construction (`initChart`), and reused by every `run()` and `resume()`
|
|
4682
|
-
// of this Agent — so this cache and the record below outlive a run. They
|
|
4683
|
-
// are safe because one Agent runs one turn at a time and the slot
|
|
4684
|
-
// overwrites them every iteration before dispatch reads them. What that
|
|
4685
|
-
// does NOT cover is a resume in a FRESH instance, whose closure is empty
|
|
4686
|
-
// and whose Compose never re-runs before the resumed dispatch — which is
|
|
4687
|
-
// why the pause paths carry `pausedToolParty` on the checkpoint.
|
|
4688
|
-
const providerToolCache = { current: [] };
|
|
4689
|
-
// Who put each name on the wire (9.92.0) — the same closure-shared shape,
|
|
4690
|
-
// written by the tools slot's merge and read by dispatch so the party
|
|
4691
|
-
// whose contract the model read is the party that answers. `lastServed`
|
|
4692
|
-
// is the run's memory of the same fact, for a name that left the wire.
|
|
4693
|
-
const servedTools = { current: new Map(), lastServed: new Map() };
|
|
4694
|
-
// THE ONE DISPATCH RESOLVER, for the inputs layer (honesty layer 2): built
|
|
4695
|
-
// from the SAME deps objects the dispatch handler builds its own from, so
|
|
4696
|
-
// the layer reads a call's rules off the implementation that will answer.
|
|
4697
|
-
const resolveForLayer = (0, toolResolver_js_1.buildToolResolver)({
|
|
4369
|
+
// Every reader binds the same native component's private catalog.
|
|
4370
|
+
const resolverForValues = (values) => (0, toolResolver_js_1.buildToolResolver)({
|
|
4698
4371
|
registryByName,
|
|
4699
4372
|
...(this.externalToolProvider && { externalToolProvider: this.externalToolProvider }),
|
|
4700
|
-
...(this.externalToolProvider && { providerToolCache }),
|
|
4701
|
-
servedTools,
|
|
4373
|
+
...(this.externalToolProvider && { providerToolCache: values.providerToolCache }),
|
|
4374
|
+
servedTools: values.servedTools,
|
|
4702
4375
|
toolClaimants,
|
|
4703
|
-
notServed:
|
|
4376
|
+
notServed: index_js_2.notServedResult,
|
|
4704
4377
|
});
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
// the one rule (`lib/displayName.ts` · `readDisplayName`), so a value nobody vetted
|
|
4708
|
-
// is never printed. Wired only where a tool can declare one: on every other agent
|
|
4709
|
-
// the final branch is the one it always was.
|
|
4710
|
-
const displayNameOf = this.externalToolProvider !== undefined ||
|
|
4378
|
+
const resolveForLayer = (scope) => resolverForValues(this.runExecution().forScope(scope).value);
|
|
4379
|
+
const displayNameOfFor = this.externalToolProvider !== undefined ||
|
|
4711
4380
|
[...registryByName.values()].some((tool) => tool.displayName !== undefined)
|
|
4712
|
-
? (
|
|
4381
|
+
? (scope) => {
|
|
4382
|
+
const resolve = resolveForLayer(scope);
|
|
4383
|
+
return (toolName) => (0, displayName_js_1.readDisplayName)(resolve(toolName).tool?.displayName);
|
|
4384
|
+
}
|
|
4713
4385
|
: undefined;
|
|
4714
4386
|
const readSkillFor = this.readSkillOfferFor();
|
|
4715
4387
|
// Per-role skill visibility. The Injection Engine resolves the ids once per
|
|
@@ -4718,9 +4390,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4718
4390
|
// mount. Since 9.86.0 the description is NOT the only reader — the read_skill gate's refusals, the
|
|
4719
4391
|
// `skill.rejected` payload, the propose-transition refusal and the dispatch
|
|
4720
4392
|
// roster all filter through that published set
|
|
4721
|
-
// (`stages/toolCalls.ts` ·
|
|
4393
|
+
// (`stages/toolCalls/routing/readSkillRoute.ts` · `applyReadSkillRoute` the gate, `toolCalls/routing/effectsOperations.ts` ·
|
|
4722
4394
|
// "── THE REFUSAL SPEAKS WITH THE FILTERED SETS" the propose-transition refusal,
|
|
4723
|
-
// `toolCalls.ts` · `dispatchRoster`). Nothing is cached here: an
|
|
4395
|
+
// `toolCalls/execution/catalogOperations.ts` · `dispatchRoster`). Nothing is cached here: an
|
|
4724
4396
|
// earlier draft of 9.84.0 cached the resolved ids so the gate could filter
|
|
4725
4397
|
// the self-call notice's move offer through them; the notice no longer names
|
|
4726
4398
|
// a destination at all (see `selfCallNotice`), so there is nothing left to
|
|
@@ -4788,17 +4460,20 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4788
4460
|
...(this.mapsPlan !== undefined && {
|
|
4789
4461
|
mountedMaps: this.mapsPlan.maps.map((m) => ({ id: m.id, toolNames: m.toolNames })),
|
|
4790
4462
|
}),
|
|
4791
|
-
|
|
4463
|
+
runtime: (scope) => {
|
|
4464
|
+
const value = this.runExecution().forScope(scope).value;
|
|
4465
|
+
return { ...value, integrityLedger: value.integrityLedger };
|
|
4466
|
+
},
|
|
4792
4467
|
...(this.externalToolProvider && { toolProvider: this.externalToolProvider }),
|
|
4793
|
-
...(this.externalToolProvider && { providerToolCache }),
|
|
4794
4468
|
// The caller of THIS run, for `ToolDispatchContext.callerIdentity`: the
|
|
4795
4469
|
// instance's caller on its own run, the member's run on a mount — never a
|
|
4796
4470
|
// derived identity (the `hiddenSkillIdsNow` precedent).
|
|
4797
4471
|
...(this.externalToolProvider && {
|
|
4798
|
-
callerIdentity: (scope) => this.
|
|
4472
|
+
callerIdentity: (scope) => this.runExecution().forScope(scope).own
|
|
4473
|
+
? this.runExecution().forScope(scope).value.identity
|
|
4474
|
+
: (0, memberRun_js_1.memberIdentityIn)(scope),
|
|
4799
4475
|
}),
|
|
4800
4476
|
toolClaimants,
|
|
4801
|
-
servedTools,
|
|
4802
4477
|
...(readSkillFor && { readSkillFor }),
|
|
4803
4478
|
...(budget?.tools !== undefined && { budgetCap: budget.tools }),
|
|
4804
4479
|
// Steps (9.18.0): per-step narrowing + banner + the skip_step offer.
|
|
@@ -4841,11 +4516,11 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4841
4516
|
});
|
|
4842
4517
|
// callLLM extracted to ./agent/stages/callLLM.ts (v2.11.2). Same
|
|
4843
4518
|
// late-binding pattern as seed for toolSchemas (computed below).
|
|
4844
|
-
const
|
|
4519
|
+
const callLLMFor = (run) => (0, callLLM_js_1.buildCallLLMStage)({
|
|
4845
4520
|
onReplayPrepared: (preparation) => {
|
|
4846
|
-
if (
|
|
4847
|
-
|
|
4848
|
-
(0, runCheckpoint_js_1.retainReplayRetirements)(
|
|
4521
|
+
if (run.value.checkpointTracker !== undefined &&
|
|
4522
|
+
run.context.runId === run.value.checkpointTracker.runId)
|
|
4523
|
+
(0, runCheckpoint_js_1.retainReplayRetirements)(run.value.checkpointTracker, preparation);
|
|
4849
4524
|
},
|
|
4850
4525
|
...((this.typedNegativeClaimsConfig !== undefined ||
|
|
4851
4526
|
(this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
|
|
@@ -4891,17 +4566,19 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4891
4566
|
// layer). Step T8: the same line carries the turn's time limits.
|
|
4892
4567
|
...(this.timeOptions !== undefined && { timeLine: true }),
|
|
4893
4568
|
// The receipt's salt (9.88.0) — read per call, like seed's own accessor.
|
|
4894
|
-
getRunId: () =>
|
|
4569
|
+
getRunId: () => run.context.runId,
|
|
4895
4570
|
// …and its off switch. Value-conditional, so an agent on the default
|
|
4896
4571
|
// hands `callLLM` exactly the dep bag it always did.
|
|
4897
4572
|
...(this.recordReceiptValue === false && { recordReceipt: false }),
|
|
4898
4573
|
// …and the window's evictions for `omittedForAttention` (9.93.0) — only
|
|
4899
4574
|
// an agent with a window strategy has any, and only it hands the seam.
|
|
4900
|
-
...(
|
|
4575
|
+
...(run.value.evictedTurnsHandle !== undefined && {
|
|
4576
|
+
evictedTurns: run.value.evictedTurnsHandle,
|
|
4577
|
+
}),
|
|
4901
4578
|
// …and the receipt memo, so a run hashes each message once rather than
|
|
4902
4579
|
// once per call (`core/agent/receipt/receiptDigests.ts`). Only where a
|
|
4903
4580
|
// receipt is minted at all.
|
|
4904
|
-
...(this.recordReceiptValue !== false && { receiptDigests:
|
|
4581
|
+
...(this.recordReceiptValue !== false && { receiptDigests: run.value.receiptDigests }),
|
|
4905
4582
|
provider,
|
|
4906
4583
|
model,
|
|
4907
4584
|
...(temperature !== undefined && { temperature }),
|
|
@@ -4934,7 +4611,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4934
4611
|
// was called this response" not-applicable notes.
|
|
4935
4612
|
...(this.checkColumnTypes !== 'off' &&
|
|
4936
4613
|
toolColumns.size > 0 && { columnDeclaringTools: new Set(toolColumns.keys()) }),
|
|
4937
|
-
integrityLedger:
|
|
4614
|
+
integrityLedger: run.value.integrityLedger,
|
|
4938
4615
|
...(this.reliabilityConfig !== undefined && { reliability: this.reliabilityConfig }),
|
|
4939
4616
|
...(this.outputSchemaParser !== undefined && {
|
|
4940
4617
|
outputSchemaParser: this.outputSchemaParser,
|
|
@@ -4981,18 +4658,20 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
4981
4658
|
// it becomes the ReAct loop target (see the chart builders), so it runs
|
|
4982
4659
|
// once per iteration boundary with the previous call's adapter-reported
|
|
4983
4660
|
// usage already measured by the meter.
|
|
4984
|
-
const
|
|
4661
|
+
const callLLM = (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (run.value.callLLM ??= callLLMFor(run)));
|
|
4662
|
+
const configuredWindow = this.windowStrategy;
|
|
4663
|
+
const windowStage = configuredWindow
|
|
4985
4664
|
? {
|
|
4986
4665
|
strategyName: this.windowStrategy.name,
|
|
4987
|
-
run: (0, window_js_1.buildWindowStage)({
|
|
4988
|
-
strategy:
|
|
4989
|
-
meter:
|
|
4990
|
-
...(
|
|
4991
|
-
evictedTurns:
|
|
4666
|
+
run: (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (run.value.window ??= (0, window_js_1.buildWindowStage)({
|
|
4667
|
+
strategy: configuredWindow,
|
|
4668
|
+
meter: run.value.compactionMeter,
|
|
4669
|
+
...(run.value.evictedTurnsHandle !== undefined && {
|
|
4670
|
+
evictedTurns: run.value.evictedTurnsHandle,
|
|
4992
4671
|
}),
|
|
4993
4672
|
agentModel: model,
|
|
4994
4673
|
providerName: provider.name,
|
|
4995
|
-
getRunId: () =>
|
|
4674
|
+
getRunId: () => run.context.runId,
|
|
4996
4675
|
// Value-conditional (the `repeatedCallNudge` precedent): an
|
|
4997
4676
|
// agent on the default hands the stage exactly the deps object
|
|
4998
4677
|
// it always did.
|
|
@@ -5011,7 +4690,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5011
4690
|
}),
|
|
5012
4691
|
...(pricingTable !== undefined && { pricingTable }),
|
|
5013
4692
|
...(costBudget !== undefined && { costBudget }),
|
|
5014
|
-
}),
|
|
4693
|
+
}))),
|
|
5015
4694
|
}
|
|
5016
4695
|
: undefined;
|
|
5017
4696
|
// routeDecider extracted to ./agent/stages/route.ts (v2.11.2).
|
|
@@ -5042,82 +4721,87 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5042
4721
|
// question a build-time mount can answer.
|
|
5043
4722
|
const canCallTools = registryByName.size > 0 || this.externalToolProvider !== undefined;
|
|
5044
4723
|
const hasWrapUp = canCallTools && this.wrapUpAtMaxIterations !== false;
|
|
5045
|
-
const baseRouteDecider = (0, route_js_1.buildRouteDeciderStage)(this.messageMiddleware, this.outputEnforcement, stepPlanFor, this.evidenceGate, hasWrapUp, this.claimContract, this.integrityLedgerHolder,
|
|
5046
|
-
// THE CLAIM SEAM'S RECENCY READ (9.83.0). Value-conditional on both
|
|
5047
|
-
// halves, so an agent that armed neither hands the decider builder
|
|
5048
|
-
// exactly the arguments it always did — and `buildRouteDeciderStage`'s
|
|
5049
|
-
// no-judge fast path still returns the very function reference every
|
|
5050
|
-
// pre-9.83.0 chart was given.
|
|
5051
|
-
this.noticePriorTurnEvidence && this.evidenceGate !== undefined ? true : undefined,
|
|
5052
|
-
// THE ANSWER TURN'S STANDINGS (9.101.0) — the same value-conditional
|
|
5053
|
-
// trailing positional, for the same reason: an unarmed agent hands the
|
|
5054
|
-
// builder exactly the arguments it always did.
|
|
5055
|
-
this.findingsOptions !== undefined ? true : undefined,
|
|
5056
|
-
// THE INPUTS LAYER (honesty layer 2) — the same value-conditional
|
|
5057
|
-
// trailing positional: the rows this decider files carry the turn
|
|
5058
|
-
// stamp, and with the evidence gate armed too, the gate's exempt corpus
|
|
5059
|
-
// gains this turn's assumed values, read from the tools' declarations,
|
|
5060
|
-
// and the values the person gave the layer's batch ask (step 4). The
|
|
5061
|
-
// results layer (step 7b) arms the stamp alone — "while any layer is
|
|
5062
|
-
// armed, the one writer stamps the turn" — and nothing else.
|
|
5063
|
-
inputsArmed || resultsArmed
|
|
5064
|
-
? {
|
|
5065
|
-
...(inputsArmed &&
|
|
5066
|
-
this.evidenceGate !== undefined && {
|
|
5067
|
-
declaredDefaults: (0, route_js_2.declaredDefaultsFrom)((toolName, argument) => {
|
|
5068
|
-
const rules = (0, declare_js_1.rulesOf)(resolveForLayer(toolName).tool);
|
|
5069
|
-
if (rules === undefined || (0, declare_js_1.isRefused)(rules))
|
|
5070
|
-
return undefined;
|
|
5071
|
-
return rules.ruled.find((r) => r.argument === argument)?.assume;
|
|
5072
|
-
}),
|
|
5073
|
-
answeredValues: route_js_2.answeredValuesOf,
|
|
5074
|
-
// Under `.time()` (step T7): the turn's time spellings by
|
|
5075
|
-
// lineage — said ones exempt, derived ones filed, not flagged.
|
|
5076
|
-
...(this.timeOptions !== undefined && { timeLineage: true }),
|
|
5077
|
-
}),
|
|
5078
|
-
}
|
|
5079
|
-
: undefined,
|
|
5080
|
-
// THE ANSWER LAYER (honesty layer 4) — the same value-conditional
|
|
5081
|
-
// trailing positional: the judges file the answer's witness rows, and
|
|
5082
|
-
// every row this decider files carries the turn stamp.
|
|
5083
|
-
answerArmed ? true : undefined);
|
|
5084
|
-
const validatedRouteDecider = this.answerValidationConfig === undefined
|
|
5085
|
-
? baseRouteDecider
|
|
5086
|
-
: (0, answerValidation_js_1.withAnswerValidation)(baseRouteDecider, this.answerValidationConfig, this.outputSchemaParser, artifactStore, () => this.consentOutstanding.size > 0, this.outputEnforcement?.outputFormat !== undefined,
|
|
5087
|
-
// Read only when `agentChecks` lists 'claims' (the agent's own rows).
|
|
5088
|
-
this.claimContract, this.typedNegativeClaimsConfig === undefined
|
|
5089
|
-
? undefined
|
|
5090
|
-
: {
|
|
5091
|
-
config: this.typedNegativeClaimsConfig,
|
|
5092
|
-
phrases: this.typedNegativeClaimsConfig.phrases,
|
|
5093
|
-
applicationValidation: this.applicationAnswerValidation,
|
|
5094
|
-
runId: () => this.currentRunContext.runId,
|
|
5095
|
-
});
|
|
5096
|
-
const routeDecider = this.negativeClaimsConfig?.mode === 'prose'
|
|
5097
|
-
? (0, observe_js_1.withNegativeProse)(validatedRouteDecider, {
|
|
5098
|
-
runId: () => this.currentRunContext.runId,
|
|
5099
|
-
hasOutstandingConsent: () => this.consentOutstanding.size > 0,
|
|
5100
|
-
structured: this.outputSchemaParser !== undefined,
|
|
5101
|
-
phrases: this.negativeClaimsConfig.phrases,
|
|
5102
|
-
})
|
|
5103
|
-
: validatedRouteDecider;
|
|
5104
|
-
// `.limitsTravelWithTheAnswer()` on a TYPED answer — decided once, here.
|
|
5105
|
-
// An output schema makes the answer JSON, and the appended block would
|
|
5106
|
-
// make it JSON followed by prose, which `runTyped()` cannot parse. So the
|
|
5107
|
-
// limits travel as DATA: the Route decider's terminal decision commits the
|
|
5108
|
-
// fold (`withAnswerCoverage`) and the Final branch projects it onto
|
|
5109
|
-
// `turn_end`. A prose answer keeps the block; an agent that asked for
|
|
5110
|
-
// neither is handed the decider it always had.
|
|
5111
4724
|
const limitsAsData = this.limitsTravelWithTheAnswerValue && this.outputSchemaParser !== undefined;
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
4725
|
+
const routeFor = (run) => {
|
|
4726
|
+
const resolve = resolverForValues(run.value);
|
|
4727
|
+
const baseRouteDecider = (0, route_js_1.buildRouteDeciderStage)(this.messageMiddleware, this.outputEnforcement, stepPlanFor, this.evidenceGate, hasWrapUp, this.claimContract, run.value.integrityLedger,
|
|
4728
|
+
// THE CLAIM SEAM'S RECENCY READ (9.83.0). Value-conditional on both
|
|
4729
|
+
// halves, so an agent that armed neither hands the decider builder
|
|
4730
|
+
// exactly the arguments it always did — and `buildRouteDeciderStage`'s
|
|
4731
|
+
// no-judge fast path still returns the very function reference every
|
|
4732
|
+
// pre-9.83.0 chart was given.
|
|
4733
|
+
this.noticePriorTurnEvidence && this.evidenceGate !== undefined ? true : undefined,
|
|
4734
|
+
// THE ANSWER TURN'S STANDINGS (9.101.0) — the same value-conditional
|
|
4735
|
+
// trailing positional, for the same reason: an unarmed agent hands the
|
|
4736
|
+
// builder exactly the arguments it always did.
|
|
4737
|
+
this.findingsOptions !== undefined ? true : undefined,
|
|
4738
|
+
// THE INPUTS LAYER (honesty layer 2) — the same value-conditional
|
|
4739
|
+
// trailing positional: the rows this decider files carry the turn
|
|
4740
|
+
// stamp, and with the evidence gate armed too, the gate's exempt corpus
|
|
4741
|
+
// gains this turn's assumed values, read from the tools' declarations,
|
|
4742
|
+
// and the values the person gave the layer's batch ask (step 4). The
|
|
4743
|
+
// results layer (step 7b) arms the stamp alone — "while any layer is
|
|
4744
|
+
// armed, the one writer stamps the turn" — and nothing else.
|
|
4745
|
+
inputsArmed || resultsArmed
|
|
4746
|
+
? {
|
|
4747
|
+
...(inputsArmed &&
|
|
4748
|
+
this.evidenceGate !== undefined && {
|
|
4749
|
+
declaredDefaults: (0, route_js_2.declaredDefaultsFrom)((toolName, argument) => {
|
|
4750
|
+
const rules = (0, declare_js_1.rulesOf)(resolve(toolName).tool);
|
|
4751
|
+
if (rules === undefined || (0, declare_js_1.isRefused)(rules))
|
|
4752
|
+
return undefined;
|
|
4753
|
+
return rules.ruled.find((r) => r.argument === argument)?.assume;
|
|
4754
|
+
}),
|
|
4755
|
+
answeredValues: route_js_2.answeredValuesOf,
|
|
4756
|
+
// Under `.time()` (step T7): the turn's time spellings by
|
|
4757
|
+
// lineage — said ones exempt, derived ones filed, not flagged.
|
|
4758
|
+
...(this.timeOptions !== undefined && { timeLineage: true }),
|
|
4759
|
+
}),
|
|
4760
|
+
}
|
|
4761
|
+
: undefined,
|
|
4762
|
+
// THE ANSWER LAYER (honesty layer 4) — the same value-conditional
|
|
4763
|
+
// trailing positional: the judges file the answer's witness rows, and
|
|
4764
|
+
// every row this decider files carries the turn stamp.
|
|
4765
|
+
answerArmed ? true : undefined);
|
|
4766
|
+
const validatedRouteDecider = this.answerValidationConfig === undefined
|
|
4767
|
+
? baseRouteDecider
|
|
4768
|
+
: (0, answerValidation_js_1.withAnswerValidation)(baseRouteDecider, this.answerValidationConfig, this.outputSchemaParser, artifactStore, () => run.value.consentOutstanding.size > 0, this.outputEnforcement?.outputFormat !== undefined,
|
|
4769
|
+
// Read only when `agentChecks` lists 'claims' (the agent's own rows).
|
|
4770
|
+
this.claimContract, this.typedNegativeClaimsConfig === undefined
|
|
4771
|
+
? undefined
|
|
4772
|
+
: {
|
|
4773
|
+
config: this.typedNegativeClaimsConfig,
|
|
4774
|
+
phrases: this.typedNegativeClaimsConfig.phrases,
|
|
4775
|
+
applicationValidation: this.applicationAnswerValidation,
|
|
4776
|
+
runId: () => run.context.runId,
|
|
4777
|
+
});
|
|
4778
|
+
const routeDecider = this.negativeClaimsConfig?.mode === 'prose'
|
|
4779
|
+
? (0, observe_js_1.withNegativeProse)(validatedRouteDecider, {
|
|
4780
|
+
runId: () => run.context.runId,
|
|
4781
|
+
hasOutstandingConsent: () => run.value.consentOutstanding.size > 0,
|
|
4782
|
+
structured: this.outputSchemaParser !== undefined,
|
|
4783
|
+
phrases: this.negativeClaimsConfig.phrases,
|
|
4784
|
+
})
|
|
4785
|
+
: validatedRouteDecider;
|
|
4786
|
+
// `.limitsTravelWithTheAnswer()` on a TYPED answer — decided once, here.
|
|
4787
|
+
// An output schema makes the answer JSON, and the appended block would
|
|
4788
|
+
// make it JSON followed by prose, which `runTyped()` cannot parse. So the
|
|
4789
|
+
// limits travel as DATA: the Route decider's terminal decision commits the
|
|
4790
|
+
// fold (`withAnswerCoverage`) and the Final branch projects it onto
|
|
4791
|
+
// `turn_end`. A prose answer keeps the block; an agent that asked for
|
|
4792
|
+
// neither is handed the decider it always had.
|
|
4793
|
+
// With the inputs layer armed, the typed answer's limits carry this
|
|
4794
|
+
// turn's assumed values too — the same rows the prose "Assumed" block
|
|
4795
|
+
// prints (`withAnswerCoverage`'s second argument); a rewrite by a
|
|
4796
|
+
// before-tool chain is read only when the agent has one.
|
|
4797
|
+
const terminalRouteDecider = limitsAsData
|
|
4798
|
+
? (0, answerCoverage_js_1.withAnswerCoverage)(routeDecider, inputsArmed ? { rewrites: this.toolMiddleware.length > 0 } : undefined)
|
|
4799
|
+
: routeDecider;
|
|
4800
|
+
// toolCallsHandler extracted to ./agent/stages/toolCalls/index.ts (v2.11.2).
|
|
4801
|
+
return terminalRouteDecider;
|
|
4802
|
+
};
|
|
4803
|
+
const terminalRouteDecider = (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (run.value.route ??= routeFor(run)));
|
|
4804
|
+
const toolCallsFor = (run) => (0, index_js_2.buildToolCallsHandler)({
|
|
5121
4805
|
registryByName,
|
|
5122
4806
|
// WHICH SKILLS DECLARE EACH TOOL NAME (9.86.0) — read by the unknown-tool
|
|
5123
4807
|
// roster so a role that may not see a skill is not told the names of the
|
|
@@ -5172,7 +4856,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5172
4856
|
...(this.noticeEmptyLookups &&
|
|
5173
4857
|
toolGrounding.size > 0 && {
|
|
5174
4858
|
emptyLookupGrounding: toolGrounding,
|
|
5175
|
-
integrityLedger:
|
|
4859
|
+
integrityLedger: run.value.integrityLedger,
|
|
5176
4860
|
}),
|
|
5177
4861
|
// THE WRITE SEAM'S other check (9.78.0) — the column-type contract.
|
|
5178
4862
|
// Value-conditional on both halves for the same reason, so an agent
|
|
@@ -5182,11 +4866,21 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5182
4866
|
toolColumns.size > 0 && {
|
|
5183
4867
|
columnDeclarations: toolColumns,
|
|
5184
4868
|
columnCheckMode: this.checkColumnTypes,
|
|
5185
|
-
integrityLedger:
|
|
4869
|
+
integrityLedger: run.value.integrityLedger,
|
|
5186
4870
|
}),
|
|
5187
4871
|
...(this.externalToolProvider && { externalToolProvider: this.externalToolProvider }),
|
|
5188
|
-
...(this.externalToolProvider && {
|
|
5189
|
-
|
|
4872
|
+
...(this.externalToolProvider && {
|
|
4873
|
+
providerToolCache: run.value.providerToolCache,
|
|
4874
|
+
prepareProviderTools: (scope) => (0, discoverTools_js_1.ensureDiscoveredTools)(scope, {
|
|
4875
|
+
provider: this.externalToolProvider,
|
|
4876
|
+
cache: run.value.providerToolCache,
|
|
4877
|
+
callerIdentity: run.own ? run.value.identity : (0, memberRun_js_1.memberIdentityIn)(scope),
|
|
4878
|
+
get iteration() {
|
|
4879
|
+
return scope.iteration ?? 1;
|
|
4880
|
+
},
|
|
4881
|
+
}),
|
|
4882
|
+
}),
|
|
4883
|
+
servedTools: run.value.servedTools,
|
|
5190
4884
|
toolClaimants,
|
|
5191
4885
|
...(permissionChecker && { permissionChecker }),
|
|
5192
4886
|
...(credentialProvider && { credentialProvider }),
|
|
@@ -5194,7 +4888,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5194
4888
|
// or — on a mount — the run its link names (`memberRun.ts`). An accessor,
|
|
5195
4889
|
// because the chart is built once and the request is per run.
|
|
5196
4890
|
...(credentialProvider && {
|
|
5197
|
-
currentRequest: (scope) =>
|
|
4891
|
+
currentRequest: (scope) => (run.own ? run.value.request : (0, memberRun_js_1.memberRequestIn)(scope)),
|
|
5198
4892
|
}),
|
|
5199
4893
|
// The claim-check store (9.21.0). Absent → not one new line runs in
|
|
5200
4894
|
// dispatch: `ctx.artifacts` is the fail-closed teacher and no artifact
|
|
@@ -5268,7 +4962,8 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5268
4962
|
// injections exist; nothing runs until a tool returns an effect.
|
|
5269
4963
|
...(this.injections.length > 0 && {
|
|
5270
4964
|
leaseTargets: new Map(this.injections.map((inj) => {
|
|
5271
|
-
const surfaceMode = inj.metadata
|
|
4965
|
+
const surfaceMode = inj.metadata
|
|
4966
|
+
?.surfaceMode;
|
|
5272
4967
|
return [inj.id, { ...(surfaceMode !== undefined && { surfaceMode }) }];
|
|
5273
4968
|
})),
|
|
5274
4969
|
}),
|
|
@@ -5291,19 +4986,20 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5291
4986
|
// at construction, and a captured value would be run #1's forever. The
|
|
5292
4987
|
// tier one is lazy on top of that — an agent whose tools hold no sessions
|
|
5293
4988
|
// never allocates it.
|
|
5294
|
-
currentRun: () => this.toolRunFacts(),
|
|
5295
|
-
|
|
5296
|
-
|
|
4989
|
+
currentRun: () => this.toolRunFacts(run),
|
|
4990
|
+
isRunRetired: () => run.retired,
|
|
4991
|
+
isOwnRun: () => run.own,
|
|
4992
|
+
answeredAsk: () => run.value.answeredAsk,
|
|
5297
4993
|
// The time layer: each dispatched call files its `call` row, and the
|
|
5298
4994
|
// resume door compares a resume's passed `time` with the kept clock.
|
|
5299
4995
|
...(this.timeOptions !== undefined && {
|
|
5300
4996
|
time: {
|
|
5301
|
-
takePassedOnResume: (
|
|
4997
|
+
takePassedOnResume: () => {
|
|
5302
4998
|
// Only the agent's own resumed leg takes it — never a member's.
|
|
5303
|
-
if (!
|
|
4999
|
+
if (!run.own)
|
|
5304
5000
|
return undefined;
|
|
5305
|
-
const passed =
|
|
5306
|
-
|
|
5001
|
+
const passed = run.value.resumePassedTime;
|
|
5002
|
+
run.value.resumePassedTime = undefined;
|
|
5307
5003
|
return passed;
|
|
5308
5004
|
},
|
|
5309
5005
|
...(this.timeOptions.zone !== undefined && { appZone: this.timeOptions.zone }),
|
|
@@ -5320,7 +5016,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5320
5016
|
},
|
|
5321
5017
|
}),
|
|
5322
5018
|
emitForRun: (type, payload, runContext) => this.emitLateFact(type, payload, runContext),
|
|
5323
|
-
|
|
5019
|
+
resources: run.value.resources,
|
|
5324
5020
|
// 8.6.0 — what a run does when a declared credential needs 3LO consent.
|
|
5325
5021
|
onAuthorizationRequired: this.onAuthorizationRequired,
|
|
5326
5022
|
// The `'tell-model'` consent record travels OFF tracked state (a tracked
|
|
@@ -5328,10 +5024,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5328
5024
|
// these two callbacks are its whole route to the caller. Cleared at the
|
|
5329
5025
|
// top of every run; read in `finalizeResult`.
|
|
5330
5026
|
reportConsentOutstanding: (record) => {
|
|
5331
|
-
|
|
5027
|
+
run.value.consentOutstanding.set(record.service, record);
|
|
5332
5028
|
},
|
|
5333
5029
|
clearConsentOutstanding: (service) => {
|
|
5334
|
-
|
|
5030
|
+
run.value.consentOutstanding.delete(service);
|
|
5335
5031
|
},
|
|
5336
5032
|
});
|
|
5337
5033
|
// v2.14 — Build the NormalizeThinking sub-subflow only when a
|
|
@@ -5339,6 +5035,11 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5339
5035
|
// explicitly set via .thinkingHandler()). Conditional mount ensures
|
|
5340
5036
|
// zero overhead for non-thinking agents — the chart has zero extra
|
|
5341
5037
|
// stages when undefined.
|
|
5038
|
+
const handlerFor = (run) => (run.value.toolCalls ??= toolCallsFor(run));
|
|
5039
|
+
const toolCallsHandler = {
|
|
5040
|
+
execute: (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (scope) => handlerFor(run).execute(scope)),
|
|
5041
|
+
resume: (0, runnerExecution_js_1.bindRunnerStage)((scope) => this.runExecution().forScope(scope), (run) => (scope, input) => handlerFor(run).resume(scope, input)),
|
|
5042
|
+
};
|
|
5342
5043
|
const thinkingSubflow = this.thinkingHandler
|
|
5343
5044
|
? (0, buildThinkingSubflow_js_1.buildThinkingSubflow)(this.thinkingHandler, this.provider.name)
|
|
5344
5045
|
: undefined;
|
|
@@ -5348,7 +5049,9 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5348
5049
|
const chartDeps = {
|
|
5349
5050
|
memories: this.memories,
|
|
5350
5051
|
// Evidence bridge (#5): closure hand-off to the CAUSAL write mounts.
|
|
5351
|
-
...(this.
|
|
5052
|
+
...(this.memories.some((memory) => memory.type === 'causal') && {
|
|
5053
|
+
causalEvidenceSource: (binding) => (0, componentObservers_js_1.componentEvidence)(this.runExecution().forScope(binding).value, binding),
|
|
5054
|
+
}),
|
|
5352
5055
|
systemPromptCachePolicy,
|
|
5353
5056
|
maxIterations,
|
|
5354
5057
|
seed,
|
|
@@ -5412,7 +5115,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5412
5115
|
// Route's sixth dispatch value, read only by an agent whose revision
|
|
5413
5116
|
// turns the tools off (an enforcing answer validation).
|
|
5414
5117
|
...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
|
|
5415
|
-
|
|
5118
|
+
toolOfFor: (scope) => {
|
|
5119
|
+
const resolve = resolveForLayer(scope);
|
|
5120
|
+
return (toolName) => resolve(toolName).tool;
|
|
5121
|
+
},
|
|
5416
5122
|
...(this.toolMiddleware.length > 0 && { rewrites: true }),
|
|
5417
5123
|
// The time layer (step T5a): a tool whose period declares forms is filled from the
|
|
5418
5124
|
// turn's one window, bound to the person's window, or recorded as the model's.
|
|
@@ -5450,7 +5156,12 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5450
5156
|
// head, in both builders through one helper, reading each call's
|
|
5451
5157
|
// `ToolPeriod` off the implementation that answered it; absent → untouched.
|
|
5452
5158
|
...(resultsArmed && {
|
|
5453
|
-
resultsLayer: {
|
|
5159
|
+
resultsLayer: {
|
|
5160
|
+
toolOfFor: (scope) => {
|
|
5161
|
+
const resolve = resolveForLayer(scope);
|
|
5162
|
+
return (toolName) => resolve(toolName).tool;
|
|
5163
|
+
},
|
|
5164
|
+
},
|
|
5454
5165
|
}),
|
|
5455
5166
|
// The answer layer (honesty layer 4): its stage heads the final branch
|
|
5456
5167
|
// in both builders through one helper, reading only the committed keys
|
|
@@ -5468,11 +5179,11 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
5468
5179
|
standingLine: this.answerLayerOption.standingLine,
|
|
5469
5180
|
}),
|
|
5470
5181
|
...(this.answerValidationConfig !== undefined && { validated: true }),
|
|
5471
|
-
...(
|
|
5182
|
+
...(displayNameOfFor !== undefined && { displayNameOfFor }),
|
|
5472
5183
|
},
|
|
5473
5184
|
}),
|
|
5474
5185
|
// The prose limits block names an item's calls in the app's words — under the same wiring.
|
|
5475
|
-
...(
|
|
5186
|
+
...(displayNameOfFor !== undefined && { displayNameOfFor }),
|
|
5476
5187
|
// Tool choice by classifier (9.105.0): the mount args on the Tools
|
|
5477
5188
|
// branch and the key across the sf-llm-call boundary, under the arm.
|
|
5478
5189
|
...(this.toolChoiceOptions !== undefined && { hasToolChoice: true }),
|
|
@@ -5563,60 +5274,4 @@ exports.Agent = Agent;
|
|
|
5563
5274
|
// AgentBuilder extracted to ./agent/AgentBuilder.ts (v2.11.2).
|
|
5564
5275
|
// Re-export so the 28+ existing import sites continue to work unchanged.
|
|
5565
5276
|
// Validators + helpers extracted to ./agent/validators.ts (v2.11.1).
|
|
5566
|
-
/** How many run ids one instance remembers. */
|
|
5567
|
-
const MAX_REMEMBERED_RUNS = 256;
|
|
5568
|
-
/** Drop the oldest entries of an insertion-ordered Set or Map past `max`. */
|
|
5569
|
-
function boundInsertionOrder(held, max) {
|
|
5570
|
-
while (held.size > max) {
|
|
5571
|
-
const oldest = held.keys().next();
|
|
5572
|
-
if (oldest.done === true)
|
|
5573
|
-
return;
|
|
5574
|
-
held.delete(oldest.value);
|
|
5575
|
-
}
|
|
5576
|
-
}
|
|
5577
|
-
/**
|
|
5578
|
-
* The run options without the time layer's `time` — what the engine is handed.
|
|
5579
|
-
* The SAME object when it carries no `time` key, so a run that passed none
|
|
5580
|
-
* hands the executor exactly the options it always did.
|
|
5581
|
-
*/
|
|
5582
|
-
function withoutTime(options) {
|
|
5583
|
-
if (options === undefined || !('time' in options))
|
|
5584
|
-
return options;
|
|
5585
|
-
const { time: _time, ...rest } = options;
|
|
5586
|
-
void _time;
|
|
5587
|
-
return rest;
|
|
5588
|
-
}
|
|
5589
|
-
/**
|
|
5590
|
-
* The policy a paused agent run was covered by, read off its own checkpoint
|
|
5591
|
-
* (`AgentState.runRedaction`, committed by seed and by every resumed leg) —
|
|
5592
|
-
* FAIL CLOSED: a value this library did not write, or a checkpoint whose run
|
|
5593
|
-
* kept names out of its records (`redactionMarks`) but carries no policy,
|
|
5594
|
-
* refuses the resume (`ResumeRedactionError`) before anything moves. A leg its
|
|
5595
|
-
* policy could not keep covered must never start.
|
|
5596
|
-
*/
|
|
5597
|
-
function resumeRedactionOf(checkpoint, trusted) {
|
|
5598
|
-
const state = checkpoint.sharedState;
|
|
5599
|
-
let carried;
|
|
5600
|
-
try {
|
|
5601
|
-
// A carried pattern is a reference to one the resuming side holds — never
|
|
5602
|
-
// compiled from the checkpoint (`redaction/policy.ts` · `policyFromCarried`).
|
|
5603
|
-
carried = (0, policy_js_1.policyFromCarried)(state?.runRedaction, 'Agent.resume', trusted);
|
|
5604
|
-
// A policy built under ANOTHER vocabulary version is joined with the
|
|
5605
|
-
// current list — the leg is never covered by an older list alone.
|
|
5606
|
-
carried = (0, conversation_js_2.withCurrentVocabulary)(carried, (0, policy_js_1.carriedVocabularyOf)(state?.runRedaction));
|
|
5607
|
-
}
|
|
5608
|
-
catch (refusal) {
|
|
5609
|
-
throw new conversation_js_1.ResumeRedactionError(refusal instanceof policy_js_1.CarriedPolicyError && refusal.refusal === 'unknown-pattern'
|
|
5610
|
-
? 'unknown-pattern'
|
|
5611
|
-
: 'unreadable');
|
|
5612
|
-
}
|
|
5613
|
-
// Every leg of a covered run writes its policy into its checkpoint's state
|
|
5614
|
-
// (seed, and `resume` for a resumed leg), so a checkpoint whose run kept
|
|
5615
|
-
// names out but carries none was altered — refused even when the resume
|
|
5616
|
-
// names a policy, which cannot stand in for the one the run was covered by.
|
|
5617
|
-
if (carried === undefined && (0, policy_js_1.policyOfMarks)(checkpoint.redactionMarks) !== undefined) {
|
|
5618
|
-
throw new conversation_js_1.ResumeRedactionError('missing');
|
|
5619
|
-
}
|
|
5620
|
-
return carried;
|
|
5621
|
-
}
|
|
5622
5277
|
//# sourceMappingURL=Agent.js.map
|