eve 0.47.7 → 0.49.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/CHANGELOG.md +35 -0
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/delivery-metadata.d.ts +1 -0
- package/dist/src/channel/delivery-metadata.js +1 -1
- package/dist/src/channel/types.d.ts +20 -8
- package/dist/src/chunks/{use-eve-agent-Dg5S44kG.js → use-eve-agent-BZnOzAVd.js} +25 -5
- package/dist/src/chunks/{use-eve-agent-B5zw1dwj.js → use-eve-agent-Bgp6INfi.js} +25 -5
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +2 -1
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.d.ts +3 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/registry-metadata.d.ts +30 -0
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-package.d.ts +6 -0
- package/dist/src/cli/commands/registry-package.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +30 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.d.ts +12 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.js +6 -0
- package/dist/src/cli/commands/registry-recovery.d.ts +4 -0
- package/dist/src/cli/commands/registry-recovery.js +1 -1
- package/dist/src/cli/commands/registry.d.ts +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -0
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +17 -0
- package/dist/src/cli/dev/tui/registry-result-message.js +3 -0
- package/dist/src/cli/dev/tui/runner.d.ts +11 -4
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -3
- package/dist/src/cli/dev/tui/setup-commands.js +2 -3
- package/dist/src/cli/dev/tui/setup-flow.d.ts +15 -5
- package/dist/src/cli/dev/tui/setup-panel.d.ts +6 -1
- package/dist/src/cli/dev/tui/setup-panel.js +4 -4
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +1 -0
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +3 -4
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/client/agent-info-schema.d.ts +1 -0
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +7 -6
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +6 -0
- package/dist/src/compiled/@workflow/builders/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/builders/index.d.ts +62 -0
- package/dist/src/compiled/@workflow/builders/index.js +1 -0
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -4
- package/dist/src/compiled/@workflow/core/capabilities.d.ts +10 -9
- package/dist/src/compiled/@workflow/core/capture-stack.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +8 -8
- package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/describe-error.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/encryption.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +49 -14
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/global.d.ts +4 -2
- package/dist/src/compiled/@workflow/core/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/log-format.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +40 -78
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +13 -17
- package/dist/src/compiled/@workflow/core/runtime/compute-instance.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +27 -27
- package/dist/src/compiled/@workflow/core/runtime/count-step-started-events.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +30 -49
- package/dist/src/compiled/@workflow/core/runtime/quickjs-entrypoint.d.ts +21 -10
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +31 -15
- package/dist/src/compiled/@workflow/core/runtime/quickjs-serde.d.ts +10 -10
- package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/replay-recovery-reporter.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +20 -12
- package/dist/src/compiled/@workflow/core/runtime/resume-latency.d.ts +37 -30
- package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +22 -5
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +14 -14
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +42 -25
- package/dist/src/compiled/@workflow/core/runtime/step-ownership.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +38 -24
- package/dist/src/compiled/@workflow/core/runtime/unserializable-step.d.ts +34 -0
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +31 -9
- package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +20 -9
- package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/sealed-box.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +12 -11
- package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/format.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/serialization/hardened.d.ts +23 -22
- package/dist/src/compiled/@workflow/core/serialization/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/class-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/serialization/workflow-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization-format.d.ts +11 -11
- package/dist/src/compiled/@workflow/core/serialization.d.ts +18 -19
- package/dist/src/compiled/@workflow/core/source-map.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +71 -20
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +15 -3
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +9 -11
- package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +18 -18
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +3 -2
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +28 -0
- package/dist/src/compiled/@workflow/world/attributes.d.ts +8 -107
- package/dist/src/compiled/@workflow/world/env-config.d.ts +5 -5
- package/dist/src/compiled/@workflow/world/event-metadata.d.ts +132 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +42 -96
- package/dist/src/compiled/@workflow/world/hooks.d.ts +12 -11
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +94 -39
- package/dist/src/compiled/@workflow/world/queue.d.ts +29 -22
- package/dist/src/compiled/@workflow/world/runs.d.ts +20 -0
- package/dist/src/compiled/@workflow/world/slot-identity.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +82 -15
- package/dist/src/compiled/@workflow/world/ulid.d.ts +2 -2
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DXbpwBdw.js → attribute-changes-BwAadFfB.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/debug-log-CVPstO1D.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +40 -0
- package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +3 -0
- package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +3 -0
- package/dist/src/compiled/_chunks/workflow/global-singleton-BNinwFrL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/private-CZFMABEf.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-BToMtPbH.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +1 -0
- package/dist/src/compiled/_chunks/workflow/undici-DfxNX5og.js +95 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +15 -0
- package/dist/src/compiled/_chunks/workflow/ws-transport-PnVVxT0R.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +2 -2
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/keys.d.ts +3 -8
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +7 -7
- package/dist/src/execution/accepted-delivery-deployment.d.ts +7 -0
- package/dist/src/execution/accepted-delivery-deployment.js +1 -0
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +4 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +10 -0
- package/dist/src/execution/continuation-conflict-step.js +1 -0
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -31
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-start.d.ts +33 -0
- package/dist/src/execution/dispatch-runtime-actions-start.js +1 -0
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/dispatch-turn-step.js +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +2 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +1 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +25 -3
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/finalize-terminal-session.d.ts +17 -0
- package/dist/src/execution/finalize-terminal-session.js +1 -0
- package/dist/src/execution/inline-turn.d.ts +29 -0
- package/dist/src/execution/inline-turn.js +1 -0
- package/dist/src/execution/next-driver-action.d.ts +9 -4
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/pending-turn-state.d.ts +1 -0
- package/dist/src/execution/pending-turn-state.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/runtime-errors.d.ts +0 -12
- package/dist/src/execution/runtime-errors.js +1 -1
- package/dist/src/execution/session-command-token.d.ts +2 -0
- package/dist/src/execution/session-command-token.js +1 -1
- package/dist/src/execution/session-timeout-steps.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +12 -0
- package/dist/src/execution/stable-workflow-names.js +1 -0
- package/dist/src/execution/subagent-event-proxy-step.d.ts +3 -0
- package/dist/src/execution/subagent-event-proxy-step.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +2 -1
- package/dist/src/execution/subagent-hitl-proxy.js +1 -1
- package/dist/src/execution/subagent-start-local.js +1 -1
- package/dist/src/execution/subagent-start-remote.d.ts +2 -0
- package/dist/src/execution/subagent-start-remote.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +2 -0
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/run-parent.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +13 -0
- package/dist/src/execution/terminal-session-event.js +1 -0
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/tool-run/answer.d.ts +3 -0
- package/dist/src/execution/tool-run/answer.js +1 -0
- package/dist/src/execution/tool-run/background.d.ts +14 -0
- package/dist/src/execution/tool-run/background.js +1 -0
- package/dist/src/execution/tool-run/cancel.d.ts +7 -0
- package/dist/src/execution/tool-run/cancel.js +1 -0
- package/dist/src/execution/tool-run/dispatch.d.ts +24 -0
- package/dist/src/execution/tool-run/dispatch.js +1 -0
- package/dist/src/execution/tool-run/emit-run-report-step.d.ts +7 -0
- package/dist/src/execution/tool-run/emit-run-report-step.js +1 -0
- package/dist/src/execution/tool-run/messages.d.ts +70 -0
- package/dist/src/execution/tool-run/messages.js +1 -0
- package/dist/src/execution/tool-run/owner-channels.d.ts +29 -0
- package/dist/src/execution/tool-run/owner-channels.js +1 -0
- package/dist/src/execution/tool-run/owner-inbox.d.ts +11 -0
- package/dist/src/execution/tool-run/owner-inbox.js +1 -0
- package/dist/src/execution/tool-run/owner.d.ts +13 -0
- package/dist/src/execution/tool-run/owner.js +1 -0
- package/dist/src/execution/tool-run/resume-hook-step.d.ts +4 -0
- package/dist/src/execution/tool-run/resume-hook-step.js +1 -0
- package/dist/src/execution/tool-run/run-control.d.ts +18 -0
- package/dist/src/execution/tool-run/run-control.js +1 -0
- package/dist/src/execution/tool-run/start.d.ts +11 -0
- package/dist/src/execution/tool-run/start.js +1 -0
- package/dist/src/execution/tool-run/types.d.ts +21 -0
- package/dist/src/execution/tool-run/types.js +1 -0
- package/dist/src/execution/tool-run/workflow.d.ts +9 -0
- package/dist/src/execution/tool-run/workflow.js +1 -0
- package/dist/src/execution/tools/subagent/local.js +1 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +2 -0
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-control-receiver.js +1 -1
- package/dist/src/execution/turn-dispatch.d.ts +4 -2
- package/dist/src/execution/turn-dispatch.js +1 -1
- package/dist/src/execution/turn-execution-cursor.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
- package/dist/src/execution/wire/session-inbox-contract.js +1 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
- package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +480 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +1 -0
- package/dist/src/execution/workflow-entry-finalization.js +1 -1
- package/dist/src/execution/workflow-entry.d.ts +5 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-registry.d.ts +5 -0
- package/dist/src/execution/workflow-registry.js +1 -0
- package/dist/src/execution/workflow-runtime.d.ts +17 -19
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-webhook-route.d.ts +4 -0
- package/dist/src/execution/workflow-webhook-route.js +1 -0
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +10 -0
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/runtime-actions.d.ts +2 -0
- package/dist/src/harness/runtime-actions.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-runs.d.ts +21 -0
- package/dist/src/harness/tool-runs.js +1 -0
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/instrumentation/content-policy.d.ts +3 -1
- package/dist/src/instrumentation/content-policy.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +2 -2
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/attachments/errors.d.ts +3 -0
- package/dist/src/internal/authored-module-loader.d.ts +7 -1
- package/dist/src/internal/authored-module-loader.js +3 -3
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
- package/dist/src/internal/authored-runtime-modules.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +2 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +17 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +19 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -0
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +17 -2
- package/dist/src/internal/workflow-bundle/builder-support.js +4 -3
- package/dist/src/internal/workflow-bundle/builder.d.ts +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.d.ts +2 -0
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +6 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +7 -0
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +15 -1
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +4 -4
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/baggage.d.ts +6 -0
- package/dist/src/protocol/baggage.js +1 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +7 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/attachments.d.ts +2 -2
- package/dist/src/public/channels/teams/attachments.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/attachments.js +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +6 -3
- package/dist/src/public/workflow/index.d.ts +3 -0
- package/dist/src/public/workflow/index.js +1 -0
- package/dist/src/public/workflow-modules.d.js +1 -0
- package/dist/src/public/workflow-modules.d.ts +11 -0
- package/dist/src/runtime/actions/keys.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/setup/connection-connector.d.ts +4 -2
- package/dist/src/setup/connection-connector.js +2 -2
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/provider.d.ts +5 -0
- package/dist/src/setup/flows/provider.js +4 -4
- package/dist/src/setup/flows/registry-session.d.ts +24 -7
- package/dist/src/setup/flows/registry-session.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +35 -29
- package/dist/src/setup/flows/registry.js +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +0 -2
- package/dist/src/setup/integrations/web/setup.js +1 -1
- package/dist/src/setup/prompter.d.ts +24 -4
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/connections/catalog.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/dispatch-action.d.ts +6 -0
- package/dist/src/shared/forwarded-trace-policy.d.ts +28 -0
- package/dist/src/shared/forwarded-trace-policy.js +1 -0
- package/dist/src/shared/instrumentation-decision.d.ts +3 -0
- package/dist/src/shared/instrumentation-decision.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +6 -0
- package/dist/src/tools/definition.d.ts +39 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +5 -3
- package/dist/src/tracing/otel-registration.d.ts +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +6 -0
- package/docs/channels/eve.mdx +14 -6
- package/docs/channels/mcp.mdx +4 -1
- package/docs/channels/teams.mdx +6 -1
- package/docs/concepts/sessions-runs-and-streaming.md +4 -2
- package/docs/guides/auth-and-route-protection.md +5 -1
- package/docs/guides/client/messages.mdx +6 -0
- package/docs/guides/dev-tui.md +30 -18
- package/docs/guides/instrumentation.md +1 -1
- package/docs/guides/remote-agents.md +25 -0
- package/docs/install-integrations.mdx +2 -0
- package/docs/instructions.mdx +1 -1
- package/docs/memory/custom-provider.md +214 -0
- package/docs/memory/file.md +129 -0
- package/docs/memory/meta.json +5 -0
- package/docs/memory/overview.mdx +282 -0
- package/docs/patterns/multi-tenant-memory.md +12 -20
- package/docs/reference/cli.md +2 -2
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +7 -0
- package/docs/tools/workflows.mdx +288 -0
- package/package.json +18 -7
- package/dist/src/compiled/_chunks/workflow/dist-CqvWKNQv.js +0 -3
- package/dist/src/compiled/_chunks/workflow/dist-Dk0aQqFO.js +0 -40
- package/dist/src/compiled/_chunks/workflow/dist-DpYyXbJv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/env-config-L94XftKz.js +0 -1
- package/dist/src/compiled/_chunks/workflow/frames-Dl2Hcma4.js +0 -3
- package/dist/src/compiled/_chunks/workflow/private-CuQ4HTFC.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-E-Nkx8q_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-cIeex2KF.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CxFsdxB_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/undici-DznrXKcM.js +0 -95
- package/dist/src/compiled/_chunks/workflow/wait-until-BZHmJCAW.js +0 -15
- package/dist/src/compiled/_chunks/workflow/ws-transport-Ct6yyRWZ.js +0 -1
- package/dist/src/internal/authored-directive-prologue.d.ts +0 -4
- package/dist/src/internal/authored-directive-prologue.js +0 -1
- package/docs/memory.md +0 -408
package/docs/memory.md
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Memory"
|
|
3
|
-
description: "Connect scoped, cross-session context to built-in, third-party, or custom memory providers."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Memory is a provider-backed capability for context that outlives one session.
|
|
7
|
-
Each memory slot binds a provider to an eve-managed scope and visibility
|
|
8
|
-
policy. The provider decides how to retrieve relevant context, whether to
|
|
9
|
-
capture conversation history, and which model-facing operations to offer.
|
|
10
|
-
|
|
11
|
-
Breaking down the boundary between eve and the provider:
|
|
12
|
-
|
|
13
|
-
| eve owns | The provider owns |
|
|
14
|
-
| ---------------------------------------------------------------- | ------------------------------------------------------- |
|
|
15
|
-
| Path-derived slots and qualified provider-tool names | Storage and indexing |
|
|
16
|
-
| Namespace and trusted scope resolution | Retrieval, ranking, and formatting |
|
|
17
|
-
| Lifecycle timing, recalled-message attribution, and supersession | Capture and extraction |
|
|
18
|
-
| Recall visibility in model context | Retention, deletion, and model-facing memory operations |
|
|
19
|
-
|
|
20
|
-
This lets a bounded text file, a hosted semantic-memory service, or an
|
|
21
|
-
application-specific store participate in the same agent lifecycle without
|
|
22
|
-
sharing a storage model.
|
|
23
|
-
|
|
24
|
-
## Choose a provider
|
|
25
|
-
|
|
26
|
-
Every memory slot needs a provider. Choose one based on how the agent should
|
|
27
|
-
recall and maintain memory:
|
|
28
|
-
|
|
29
|
-
| Provider | Status | Use it for |
|
|
30
|
-
| --------------- | -------------- | ------------------------------------------------------------------------- |
|
|
31
|
-
| `fileMemory()` | Built into eve | A bounded, model-maintained list of durable facts and preferences |
|
|
32
|
-
| Supermemory | Third-party | Semantic recall, automatic capture, source extraction, and memory tools |
|
|
33
|
-
| Custom provider | Supported | Application-specific retrieval, capture, retention, or model-facing tools |
|
|
34
|
-
|
|
35
|
-
[Supermemory](https://github.com/supermemoryai/eve-supermemory#readme) is a
|
|
36
|
-
third-party provider that recalls relevant context before each turn, captures
|
|
37
|
-
completed turns, and supplies search, memory-management, and source-extraction
|
|
38
|
-
tools. Add it with `eve add memory/supermemory`. It requires a Supermemory API
|
|
39
|
-
key and a memory scope you choose; review its retention and data handling before
|
|
40
|
-
sending sensitive content to the service.
|
|
41
|
-
|
|
42
|
-
## Use file memory
|
|
43
|
-
|
|
44
|
-
`fileMemory()` keeps one indexed document for each resolved scope. The document
|
|
45
|
-
lives in the selected backend, not in the agent's sandbox filesystem. The
|
|
46
|
-
provider recalls it before each turn and after compaction, and gives the model
|
|
47
|
-
`save_memory` and `remove_memory` tools.
|
|
48
|
-
|
|
49
|
-
```ts title="agent/memory/profile.ts"
|
|
50
|
-
import { defineMemory } from "eve/memory";
|
|
51
|
-
import { byPrincipal } from "eve/memory/scope";
|
|
52
|
-
import { fileMemory } from "eve/memory/file";
|
|
53
|
-
|
|
54
|
-
export default defineMemory({
|
|
55
|
-
description: "Remember stable facts and preferences about the caller.",
|
|
56
|
-
provider: fileMemory(),
|
|
57
|
-
scope: byPrincipal,
|
|
58
|
-
});
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The filename creates the `profile` slot, so the provider tools are exposed as
|
|
62
|
-
`profile__save_memory` and `profile__remove_memory`. The slot description is
|
|
63
|
-
prepended to both tool descriptions to tell the model what belongs in this
|
|
64
|
-
slot.
|
|
65
|
-
|
|
66
|
-
File memory does not automatically extract facts from a conversation. The
|
|
67
|
-
model decides when to call its save and remove tools. Entries receive permanent
|
|
68
|
-
numeric indexes, and the provider recalls the document as one stable keyed
|
|
69
|
-
message so updated or empty documents replace stale context.
|
|
70
|
-
|
|
71
|
-
The provider rejects rather than truncates or evicts data. `maxCharacters`
|
|
72
|
-
defaults to 4,000 characters and caps the exact recalled message, including
|
|
73
|
-
its heading and removal guidance. Each normalized entry can contain up to
|
|
74
|
-
2,048 UTF-8 bytes, and the stored document can contain up to 65,536 bytes:
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
|
-
provider: fileMemory({ maxCharacters: 8_000 });
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Choose a file backend
|
|
81
|
-
|
|
82
|
-
With no `backend`, `fileMemory()` selects storage lazily:
|
|
83
|
-
|
|
84
|
-
| Environment | Backend |
|
|
85
|
-
| ----------------------------------------------------------------- | ---------------------------------------- |
|
|
86
|
-
| Vercel with Blob credentials (token, or attached store with OIDC) | Private Vercel Blob |
|
|
87
|
-
| Vercel without Blob configuration | Error asking you to attach a Blob store |
|
|
88
|
-
| `eve dev` | Shared process-local in-memory storage |
|
|
89
|
-
| Every other environment | Error asking you for an explicit backend |
|
|
90
|
-
|
|
91
|
-
`NODE_ENV=development` alone does not select in-memory storage, and a Blob
|
|
92
|
-
token outside Vercel does not select Blob. For tests, pass a fresh in-memory
|
|
93
|
-
backend explicitly:
|
|
94
|
-
|
|
95
|
-
```ts
|
|
96
|
-
import { fileMemory, inMemory } from "eve/memory/file";
|
|
97
|
-
|
|
98
|
-
provider: fileMemory({ backend: inMemory() });
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
`inMemory()` loses its contents when its backend instance or process is
|
|
102
|
-
replaced. For another durable document store, implement `MemoryDocumentBackend`
|
|
103
|
-
from `eve/memory/file`. Its `write()` method conditionally replaces the complete
|
|
104
|
-
document and must throw `MemoryDocumentConflictError` when `expectedVersion`
|
|
105
|
-
is stale. Use `vercelBlob()` from `eve/memory/file/vercel` to configure Vercel
|
|
106
|
-
Blob credentials or an object prefix explicitly.
|
|
107
|
-
|
|
108
|
-
A file backend changes where `fileMemory()` stores its document. It does not
|
|
109
|
-
change file memory's recall behavior or tools. Implement a memory provider
|
|
110
|
-
instead when you need semantic retrieval, automatic capture, or different
|
|
111
|
-
model-facing operations.
|
|
112
|
-
|
|
113
|
-
## Add a memory slot
|
|
114
|
-
|
|
115
|
-
Create `agent/memory.ts` for one slot named `memory`, or use
|
|
116
|
-
`agent/memory/<slot>.ts` for multiple named slots. The flat file and directory
|
|
117
|
-
forms are mutually exclusive:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
agent/
|
|
121
|
-
memory/
|
|
122
|
-
profile.ts
|
|
123
|
-
workspace.ts
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Each slot independently binds a provider, description, scope, namespace, and
|
|
127
|
-
visibility policy. The same provider can back several slots without merging
|
|
128
|
-
their recalled context or tools. The default namespace includes the slot name,
|
|
129
|
-
so `profile` and `workspace` remain separate even if both resolve the same
|
|
130
|
-
scope.
|
|
131
|
-
|
|
132
|
-
For example, `profile.ts` can use `fileMemory()` with `byPrincipal`, while
|
|
133
|
-
`workspace.ts` uses another `fileMemory()` instance with a trusted workspace
|
|
134
|
-
scope:
|
|
135
|
-
|
|
136
|
-
```ts title="agent/memory/workspace.ts"
|
|
137
|
-
import { defineMemory } from "eve/memory";
|
|
138
|
-
import { fileMemory } from "eve/memory/file";
|
|
139
|
-
|
|
140
|
-
export default defineMemory({
|
|
141
|
-
description: "Remember shared conventions for the authenticated workspace.",
|
|
142
|
-
provider: fileMemory(),
|
|
143
|
-
scope(ctx) {
|
|
144
|
-
const workspaceId = ctx.session.auth.current?.attributes.workspaceId;
|
|
145
|
-
return typeof workspaceId === "string" ? workspaceId : null;
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Choose a scope
|
|
151
|
-
|
|
152
|
-
`scope` decides who or what shares a slot's memory. Set it to a string or
|
|
153
|
-
`null`, or use a resolver that returns a string, a tuple of strings, or `null`.
|
|
154
|
-
Resolve tenant and caller identity from trusted authentication or channel
|
|
155
|
-
metadata, never from model input:
|
|
156
|
-
|
|
157
|
-
```ts title="agent/memory/account.ts"
|
|
158
|
-
import { defineMemory } from "eve/memory";
|
|
159
|
-
import { fileMemory } from "eve/memory/file";
|
|
160
|
-
|
|
161
|
-
export default defineMemory({
|
|
162
|
-
provider: fileMemory(),
|
|
163
|
-
scope(ctx) {
|
|
164
|
-
const caller = ctx.session.auth.current;
|
|
165
|
-
const tenantId = caller?.attributes.tenantId;
|
|
166
|
-
|
|
167
|
-
if (caller?.principalType !== "user" || typeof tenantId !== "string") {
|
|
168
|
-
return null;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return [tenantId, caller.principalId];
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Returning `null` disables the slot for that operation. eve does not call its
|
|
177
|
-
namespace resolver, provider, or tools, and it never falls back to a shared
|
|
178
|
-
scope. In `eve dev`, a diagnostic names the disabled slot and the resolver
|
|
179
|
-
that returned `null`, without logging the resolved value.
|
|
180
|
-
|
|
181
|
-
`byPrincipal` uses `auth.current`. It disables memory for anonymous and runtime
|
|
182
|
-
principals and returns the shared `local-dev` scope during local development.
|
|
183
|
-
Use a custom resolver when the boundary also needs a tenant, channel, or
|
|
184
|
-
conversation identifier. See [Multi-tenant memory](./patterns/multi-tenant-memory)
|
|
185
|
-
for a complete scoped setup.
|
|
186
|
-
|
|
187
|
-
eve validates and locks the namespace and scope before calling the provider.
|
|
188
|
-
Every provider operation receives:
|
|
189
|
-
|
|
190
|
-
- `memory.scope.key`: a versioned, opaque digest for storage lookup;
|
|
191
|
-
- `memory.scope.namespace`: the resolved namespace;
|
|
192
|
-
- `memory.scope.value`: the resolved string or tuple;
|
|
193
|
-
- `memory.slot`: the path-derived slot name.
|
|
194
|
-
|
|
195
|
-
Providers must use `memory.scope.key` as the partition key for every read and
|
|
196
|
-
write. The key preserves tuple boundaries and keeps raw scope components out of
|
|
197
|
-
eve's durable attribution.
|
|
198
|
-
|
|
199
|
-
## Choose visibility
|
|
200
|
-
|
|
201
|
-
`visibility` controls which previously recalled records eve includes in model
|
|
202
|
-
context after a slot's scope changes. It does not change the scope passed to
|
|
203
|
-
the provider.
|
|
204
|
-
|
|
205
|
-
| Value | Behavior after a scope change |
|
|
206
|
-
| ------------------- | ------------------------------------------------------------------ |
|
|
207
|
-
| `"scope"` (default) | Hide recalled records from the slot's earlier scope |
|
|
208
|
-
| `"session"` | Keep earlier recalled records visible within the current namespace |
|
|
209
|
-
|
|
210
|
-
Use `"session"` only when every scope that can appear in the session belongs
|
|
211
|
-
to one trusted audience:
|
|
212
|
-
|
|
213
|
-
```ts
|
|
214
|
-
export default defineMemory({
|
|
215
|
-
provider: fileMemory(),
|
|
216
|
-
scope: byPrincipal,
|
|
217
|
-
visibility: "session",
|
|
218
|
-
});
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Namespace remains an isolation boundary in both modes. Applications that need
|
|
222
|
-
hard isolation between participants must use separate sessions; visibility
|
|
223
|
-
cannot undo information already included in an assistant response.
|
|
224
|
-
|
|
225
|
-
## Choose a namespace
|
|
226
|
-
|
|
227
|
-
The namespace separates an application's memory domains before scope is
|
|
228
|
-
applied. Omit `namespace` to use `defaultNamespace`, which includes the graph
|
|
229
|
-
node and slot plus a deployment-aware identity:
|
|
230
|
-
|
|
231
|
-
- Production and other Vercel environments use the project and environment.
|
|
232
|
-
- Preview also uses the branch or deployment identity.
|
|
233
|
-
- Local development uses a digest of the application root, never the raw path.
|
|
234
|
-
|
|
235
|
-
Redeployments keep the same production namespace, while unrelated Preview
|
|
236
|
-
branches do not share memory accidentally. Set a string or resolver when you
|
|
237
|
-
need an explicit application domain:
|
|
238
|
-
|
|
239
|
-
```ts
|
|
240
|
-
export default defineMemory({
|
|
241
|
-
namespace: "acme-support-v1",
|
|
242
|
-
provider: fileMemory(),
|
|
243
|
-
scope: byPrincipal,
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
A custom namespace is complete; eve adds no hidden suffix. Returning `null`
|
|
248
|
-
disables the slot. Scope resolves first, so a disabled scope never invokes the
|
|
249
|
-
namespace resolver.
|
|
250
|
-
|
|
251
|
-
## Build a custom provider
|
|
252
|
-
|
|
253
|
-
Build a provider when the available providers do not match your storage or
|
|
254
|
-
retrieval model. Most application authors do not need this layer: a provider
|
|
255
|
-
package should expose a `MemoryProvider` or a configured provider factory that
|
|
256
|
-
you pass to `defineMemory()`.
|
|
257
|
-
|
|
258
|
-
A provider can implement three surfaces:
|
|
259
|
-
|
|
260
|
-
| Surface | Responsibility |
|
|
261
|
-
| --------- | ------------------------------------------------------------------------ |
|
|
262
|
-
| `recall` | Return relevant messages at turn start and, optionally, after compaction |
|
|
263
|
-
| `capture` | Observe settled history after a turn or before compaction |
|
|
264
|
-
| `tools` | Return model-facing operations bound to the same locked scope |
|
|
265
|
-
|
|
266
|
-
Each helper
|
|
267
|
-
deliberately throws until you connect it to a database or memory-service SDK:
|
|
268
|
-
|
|
269
|
-
```ts title="agent/lib/semantic-memory-provider.ts"
|
|
270
|
-
import {
|
|
271
|
-
defineMemoryProvider,
|
|
272
|
-
type MemoryOperationContext,
|
|
273
|
-
type MemoryRecallResult,
|
|
274
|
-
type MemoryToolsContext,
|
|
275
|
-
type MemoryToolSet,
|
|
276
|
-
} from "eve/memory";
|
|
277
|
-
|
|
278
|
-
async function recallFromYourService(_ctx: MemoryOperationContext): Promise<MemoryRecallResult> {
|
|
279
|
-
throw new Error("Replace with retrieval from your memory service.");
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
async function captureWithYourService(_ctx: MemoryOperationContext): Promise<void> {
|
|
283
|
-
throw new Error("Replace with capture into your memory service.");
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
async function createToolsForYourService(_ctx: MemoryToolsContext): Promise<MemoryToolSet | null> {
|
|
287
|
-
throw new Error("Replace with tools backed by your memory service.");
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export const semanticMemoryProvider = defineMemoryProvider({
|
|
291
|
-
recall: {
|
|
292
|
-
"turn.started": recallFromYourService,
|
|
293
|
-
"compaction.completed": recallFromYourService,
|
|
294
|
-
},
|
|
295
|
-
capture: {
|
|
296
|
-
"turn.completed": captureWithYourService,
|
|
297
|
-
"compaction.requested": captureWithYourService,
|
|
298
|
-
},
|
|
299
|
-
tools: createToolsForYourService,
|
|
300
|
-
});
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Omit any optional handler that the provider does not need. For example,
|
|
304
|
-
`fileMemory()` implements recall and tools but no automatic capture. After
|
|
305
|
-
replacing the stubs, bind the provider to a slot like any other provider:
|
|
306
|
-
|
|
307
|
-
```ts title="agent/memory/profile.ts"
|
|
308
|
-
import { defineMemory } from "eve/memory";
|
|
309
|
-
import { byPrincipal } from "eve/memory/scope";
|
|
310
|
-
import { semanticMemoryProvider } from "../lib/semantic-memory-provider";
|
|
311
|
-
|
|
312
|
-
export default defineMemory({
|
|
313
|
-
provider: semanticMemoryProvider,
|
|
314
|
-
scope: byPrincipal,
|
|
315
|
-
});
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
Provider tools are ordinary `defineTool()` values, so schemas, approvals, and
|
|
319
|
-
`toModelOutput` work normally. eve qualifies each returned key with the slot
|
|
320
|
-
name and keeps its callback replayable after a process restart or deployment.
|
|
321
|
-
|
|
322
|
-
## Recall behavior
|
|
323
|
-
|
|
324
|
-
`recall["turn.started"]` is required and runs before the model.
|
|
325
|
-
`recall["compaction.completed"]` is optional and runs after a compaction
|
|
326
|
-
checkpoint. A recall handler returns `{ messages }`, `null`, or `undefined`.
|
|
327
|
-
Each recalled item becomes an untrusted user-role message; provider content is
|
|
328
|
-
never promoted to system instructions.
|
|
329
|
-
|
|
330
|
-
```ts
|
|
331
|
-
return {
|
|
332
|
-
messages: [
|
|
333
|
-
{ id: "preferred-language", content: "The user prefers Spanish." },
|
|
334
|
-
{ content: "A relevant note without a stable identity." },
|
|
335
|
-
],
|
|
336
|
-
};
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
Use stable `id` values for replaceable facts. A later item with the same ID in
|
|
340
|
-
the same slot, namespace, and scope supersedes the earlier value. An identical
|
|
341
|
-
value is a no-op. Items without IDs accumulate, even when their content is
|
|
342
|
-
identical. Omitting an earlier item from a later result does not delete it.
|
|
343
|
-
|
|
344
|
-
All active slots lock their scopes before any recall runs. They see the same
|
|
345
|
-
pre-recall history, and eve commits their validated results atomically. Each
|
|
346
|
-
call receives a stable `operationId`; providers can use it as an idempotency
|
|
347
|
-
key for writes performed by capture handlers.
|
|
348
|
-
|
|
349
|
-
## Lifecycle and compaction
|
|
350
|
-
|
|
351
|
-
| Phase | Provider handler | Context |
|
|
352
|
-
| ---------------------- | --------------------------------- | ---------------------------------------------------------- |
|
|
353
|
-
| `turn.started` | `recall["turn.started"]` | History before recall; current delivery is in `turn.input` |
|
|
354
|
-
| `turn.completed` | `capture["turn.completed"]` | Settled, projected history after a successful turn |
|
|
355
|
-
| `compaction.requested` | `capture["compaction.requested"]` | Projected history before the checkpoint changes |
|
|
356
|
-
| `compaction.completed` | `recall["compaction.completed"]` | The checkpoint plus canonical recalled records |
|
|
357
|
-
|
|
358
|
-
Compaction excludes recalled records from the summarizer, preserves only the
|
|
359
|
-
latest keyed values plus unkeyed values, then recalls again against the new
|
|
360
|
-
checkpoint. This keeps provider context attributable and prevents a summary
|
|
361
|
-
from turning it into ordinary conversation history.
|
|
362
|
-
|
|
363
|
-
If raw superseded records exceed 512 entries or 256 KiB, eve can canonicalize
|
|
364
|
-
them without waiting for the normal token threshold. This folds superseded
|
|
365
|
-
records without changing the provider's external storage.
|
|
366
|
-
|
|
367
|
-
`clear()` removes conversation history, recalled records, locked scopes, and
|
|
368
|
-
memory replay bookkeeping from the session. It does not delete data in the
|
|
369
|
-
provider's external store. A later turn can recall that data again.
|
|
370
|
-
|
|
371
|
-
## Failure behavior
|
|
372
|
-
|
|
373
|
-
- A throwing or invalid turn-start recall fails before the model call. No
|
|
374
|
-
slot's recall results are committed.
|
|
375
|
-
- A pre-compaction capture failure leaves history unchanged.
|
|
376
|
-
- A post-compaction recall failure fails an automatic turn. Standalone
|
|
377
|
-
compaction reports a diagnostic and returns the session to waiting because
|
|
378
|
-
the checkpoint has already been written.
|
|
379
|
-
- An invalid or throwing `tools()` result is diagnosed and omitted for that
|
|
380
|
-
turn.
|
|
381
|
-
- A completed-turn capture failure is diagnosed after the response and does
|
|
382
|
-
not rewrite the completed turn.
|
|
383
|
-
|
|
384
|
-
Provider operations should be idempotent, enforce their own size and retention
|
|
385
|
-
policies, and treat recalled content as user-controlled data.
|
|
386
|
-
|
|
387
|
-
## Limits and overrides
|
|
388
|
-
|
|
389
|
-
Namespaces, scope components, and provider item IDs are limited to 1,024 UTF-8
|
|
390
|
-
bytes. Scope tuples accept at most 16 non-empty components, and the combined
|
|
391
|
-
canonical namespace and scope input is limited to 4,096 bytes. Provider tool
|
|
392
|
-
names must satisfy the normal tool-name grammar after the `<slot>__` prefix is
|
|
393
|
-
added.
|
|
394
|
-
|
|
395
|
-
An application-owned `agent/tools/<slot>.ts` replaces the generated
|
|
396
|
-
provider-tool wrapper; export `disableTool()` there to remove it. Extensions
|
|
397
|
-
cannot contribute memory slots because scope and lifecycle ownership remain
|
|
398
|
-
with the consuming agent or subagent.
|
|
399
|
-
|
|
400
|
-
## What to read next
|
|
401
|
-
|
|
402
|
-
- [Multi-tenant memory](./patterns/multi-tenant-memory): isolate any provider by
|
|
403
|
-
authenticated tenant and caller.
|
|
404
|
-
- [State](./concepts/state): keep durable working data inside one session.
|
|
405
|
-
- [Default harness](./concepts/default-harness): understand compaction and
|
|
406
|
-
context controls.
|
|
407
|
-
- [Dynamic capabilities](./guides/dynamic-capabilities): understand the
|
|
408
|
-
ordinary dynamic-tool lifecycle used by provider tools.
|