@animalabs/agent-framework 0.22.2 → 0.22.4
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/README.md +3 -1
- package/dist/src/agent.d.ts +77 -12
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +143 -41
- package/dist/src/agent.js.map +1 -1
- package/dist/src/api/mcp-server-core.js +1 -1
- package/dist/src/api/mcp-server-core.js.map +1 -1
- package/dist/src/api/server.d.ts.map +1 -1
- package/dist/src/api/server.js +5 -1
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/api/types.d.ts +1 -1
- package/dist/src/api/types.d.ts.map +1 -1
- package/dist/src/branch-names.d.ts +14 -0
- package/dist/src/branch-names.d.ts.map +1 -0
- package/dist/src/branch-names.js +22 -0
- package/dist/src/branch-names.js.map +1 -0
- package/dist/src/closest-names.d.ts +28 -0
- package/dist/src/closest-names.d.ts.map +1 -0
- package/dist/src/closest-names.js +98 -0
- package/dist/src/closest-names.js.map +1 -0
- package/dist/src/code-execution/py-runner.d.ts +16 -5
- package/dist/src/code-execution/py-runner.d.ts.map +1 -1
- package/dist/src/code-execution/py-runner.js +186 -74
- package/dist/src/code-execution/py-runner.js.map +1 -1
- package/dist/src/code-execution/runtime-py.d.ts.map +1 -1
- package/dist/src/code-execution/runtime-py.js +49 -3
- package/dist/src/code-execution/runtime-py.js.map +1 -1
- package/dist/src/code-execution/tool-definition.d.ts +12 -1
- package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
- package/dist/src/code-execution/tool-definition.js +21 -3
- package/dist/src/code-execution/tool-definition.js.map +1 -1
- package/dist/src/config-checks.d.ts +28 -0
- package/dist/src/config-checks.d.ts.map +1 -0
- package/dist/src/config-checks.js +52 -0
- package/dist/src/config-checks.js.map +1 -0
- package/dist/src/deadline-timer.d.ts +21 -0
- package/dist/src/deadline-timer.d.ts.map +1 -0
- package/dist/src/deadline-timer.js +43 -0
- package/dist/src/deadline-timer.js.map +1 -0
- package/dist/src/error-message.d.ts +30 -0
- package/dist/src/error-message.d.ts.map +1 -0
- package/dist/src/error-message.js +50 -0
- package/dist/src/error-message.js.map +1 -0
- package/dist/src/framework.d.ts +828 -88
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +5011 -1326
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +8 -0
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +27 -3
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +144 -6
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +424 -263
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.d.ts +21 -1
- package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.js +91 -30
- package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
- package/dist/src/mcpl/conversation-router.d.ts +19 -3
- package/dist/src/mcpl/conversation-router.d.ts.map +1 -1
- package/dist/src/mcpl/conversation-router.js +23 -8
- package/dist/src/mcpl/conversation-router.js.map +1 -1
- package/dist/src/mcpl/convert-block.d.ts +20 -0
- package/dist/src/mcpl/convert-block.d.ts.map +1 -0
- package/dist/src/mcpl/convert-block.js +89 -0
- package/dist/src/mcpl/convert-block.js.map +1 -0
- package/dist/src/mcpl/errors.d.ts +13 -0
- package/dist/src/mcpl/errors.d.ts.map +1 -1
- package/dist/src/mcpl/errors.js +28 -0
- package/dist/src/mcpl/errors.js.map +1 -1
- package/dist/src/mcpl/hook-orchestrator.d.ts +23 -0
- package/dist/src/mcpl/hook-orchestrator.d.ts.map +1 -1
- package/dist/src/mcpl/hook-orchestrator.js +83 -72
- package/dist/src/mcpl/hook-orchestrator.js.map +1 -1
- package/dist/src/mcpl/inbound-source.d.ts +114 -0
- package/dist/src/mcpl/inbound-source.d.ts.map +1 -0
- package/dist/src/mcpl/inbound-source.js +83 -0
- package/dist/src/mcpl/inbound-source.js.map +1 -0
- package/dist/src/mcpl/index.d.ts +3 -1
- package/dist/src/mcpl/index.d.ts.map +1 -1
- package/dist/src/mcpl/index.js +3 -1
- package/dist/src/mcpl/index.js.map +1 -1
- package/dist/src/mcpl/inference-router.d.ts +15 -11
- package/dist/src/mcpl/inference-router.d.ts.map +1 -1
- package/dist/src/mcpl/inference-router.js +153 -84
- package/dist/src/mcpl/inference-router.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +33 -11
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +52 -20
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.d.ts +16 -9
- package/dist/src/mcpl/push-handler.d.ts.map +1 -1
- package/dist/src/mcpl/push-handler.js +18 -83
- package/dist/src/mcpl/push-handler.js.map +1 -1
- package/dist/src/mcpl/reference-fetcher.d.ts +14 -2
- package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
- package/dist/src/mcpl/reference-fetcher.js +72 -30
- package/dist/src/mcpl/reference-fetcher.js.map +1 -1
- package/dist/src/mcpl/references.d.ts +47 -12
- package/dist/src/mcpl/references.d.ts.map +1 -1
- package/dist/src/mcpl/references.js +74 -21
- package/dist/src/mcpl/references.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +89 -10
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +405 -129
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/server-registry.d.ts +10 -1
- package/dist/src/mcpl/server-registry.d.ts.map +1 -1
- package/dist/src/mcpl/server-registry.js +14 -3
- package/dist/src/mcpl/server-registry.js.map +1 -1
- package/dist/src/mcpl/skip-reply-wake.d.ts +36 -0
- package/dist/src/mcpl/skip-reply-wake.d.ts.map +1 -0
- package/dist/src/mcpl/skip-reply-wake.js +55 -0
- package/dist/src/mcpl/skip-reply-wake.js.map +1 -0
- package/dist/src/mcpl/transport.d.ts +51 -2
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +114 -20
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +14 -3
- package/dist/src/mcpl/types.d.ts.map +1 -1
- package/dist/src/mcpl/types.js.map +1 -1
- package/dist/src/mcpl/visible-content.d.ts +15 -0
- package/dist/src/mcpl/visible-content.d.ts.map +1 -1
- package/dist/src/mcpl/visible-content.js +25 -0
- package/dist/src/mcpl/visible-content.js.map +1 -1
- package/dist/src/module-registry.d.ts +19 -1
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +54 -25
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/api/index.js +1 -1
- package/dist/src/modules/api/index.js.map +1 -1
- package/dist/src/modules/discord/discord-js-client.d.ts +1 -0
- package/dist/src/modules/discord/discord-js-client.d.ts.map +1 -1
- package/dist/src/modules/discord/discord-js-client.js +25 -9
- package/dist/src/modules/discord/discord-js-client.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts +29 -3
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +379 -143
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/discord/types.d.ts +14 -1
- package/dist/src/modules/discord/types.d.ts.map +1 -1
- package/dist/src/modules/health/index.d.ts.map +1 -1
- package/dist/src/modules/health/index.js +2 -1
- package/dist/src/modules/health/index.js.map +1 -1
- package/dist/src/modules/history/index.d.ts +3 -1
- package/dist/src/modules/history/index.d.ts.map +1 -1
- package/dist/src/modules/history/index.js +359 -127
- package/dist/src/modules/history/index.js.map +1 -1
- package/dist/src/modules/history/semantic.d.ts +28 -1
- package/dist/src/modules/history/semantic.d.ts.map +1 -1
- package/dist/src/modules/history/semantic.js +177 -32
- package/dist/src/modules/history/semantic.js.map +1 -1
- package/dist/src/modules/unknown-tool.d.ts +10 -0
- package/dist/src/modules/unknown-tool.d.ts.map +1 -0
- package/dist/src/modules/unknown-tool.js +17 -0
- package/dist/src/modules/unknown-tool.js.map +1 -0
- package/dist/src/modules/workspace/disk-agreement.d.ts +32 -2
- package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +30 -2
- package/dist/src/modules/workspace/disk-agreement.js.map +1 -1
- package/dist/src/modules/workspace/effects.d.ts +64 -6
- package/dist/src/modules/workspace/effects.d.ts.map +1 -1
- package/dist/src/modules/workspace/effects.js +291 -44
- package/dist/src/modules/workspace/effects.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +119 -23
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +793 -247
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +75 -8
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +174 -14
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/reconcile.d.ts +58 -7
- package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
- package/dist/src/modules/workspace/reconcile.js +521 -56
- package/dist/src/modules/workspace/reconcile.js.map +1 -1
- package/dist/src/modules/workspace/types.d.ts +18 -4
- package/dist/src/modules/workspace/types.d.ts.map +1 -1
- package/dist/src/modules/workspace/types.js.map +1 -1
- package/dist/src/modules/workspace/watcher.d.ts +7 -2
- package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
- package/dist/src/modules/workspace/watcher.js +28 -4
- package/dist/src/modules/workspace/watcher.js.map +1 -1
- package/dist/src/prose-drafts.d.ts +240 -0
- package/dist/src/prose-drafts.d.ts.map +1 -0
- package/dist/src/prose-drafts.js +362 -0
- package/dist/src/prose-drafts.js.map +1 -0
- package/dist/src/prose-segments.d.ts +21 -2
- package/dist/src/prose-segments.d.ts.map +1 -1
- package/dist/src/prose-segments.js +46 -9
- package/dist/src/prose-segments.js.map +1 -1
- package/dist/src/recovery/offline-branch.d.ts +1 -0
- package/dist/src/recovery/offline-branch.d.ts.map +1 -1
- package/dist/src/recovery/offline-branch.js +3 -1
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/safe-slice.d.ts +5 -1
- package/dist/src/safe-slice.d.ts.map +1 -1
- package/dist/src/safe-slice.js +9 -1
- package/dist/src/safe-slice.js.map +1 -1
- package/dist/src/thinking-token-stamp.d.ts +12 -0
- package/dist/src/thinking-token-stamp.d.ts.map +1 -1
- package/dist/src/thinking-token-stamp.js +34 -3
- package/dist/src/thinking-token-stamp.js.map +1 -1
- package/dist/src/tool-image-ledger.d.ts +87 -19
- package/dist/src/tool-image-ledger.d.ts.map +1 -1
- package/dist/src/tool-image-ledger.js +135 -32
- package/dist/src/tool-image-ledger.js.map +1 -1
- package/dist/src/tool-presentation.d.ts +9 -0
- package/dist/src/tool-presentation.d.ts.map +1 -1
- package/dist/src/tool-presentation.js +257 -60
- package/dist/src/tool-presentation.js.map +1 -1
- package/dist/src/tool-result-guard.d.ts.map +1 -1
- package/dist/src/tool-result-guard.js +7 -10
- package/dist/src/tool-result-guard.js.map +1 -1
- package/dist/src/tool-result-history.d.ts +32 -3
- package/dist/src/tool-result-history.d.ts.map +1 -1
- package/dist/src/tool-result-history.js +106 -19
- package/dist/src/tool-result-history.js.map +1 -1
- package/dist/src/tune-out/coordinator.d.ts +25 -1
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +260 -65
- package/dist/src/tune-out/coordinator.js.map +1 -1
- package/dist/src/types/agent.d.ts +17 -5
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +17 -0
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +21 -5
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/inference-log.d.ts +1 -1
- package/dist/src/types/inference-log.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +23 -4
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +95 -6
- package/dist/src/types/trace.d.ts.map +1 -1
- package/dist/src/usage/usage-tracker.d.ts +5 -0
- package/dist/src/usage/usage-tracker.d.ts.map +1 -1
- package/dist/src/usage/usage-tracker.js +35 -8
- package/dist/src/usage/usage-tracker.js.map +1 -1
- package/package.json +6 -4
- package/src/agent.ts +169 -41
- package/src/api/mcp-server-core.ts +1 -1
- package/src/api/server.ts +4 -1
- package/src/api/types.ts +1 -1
- package/src/branch-names.ts +19 -0
- package/src/closest-names.ts +94 -0
- package/src/code-execution/py-runner.ts +200 -76
- package/src/code-execution/runtime-py.ts +49 -3
- package/src/code-execution/tool-definition.ts +28 -4
- package/src/config-checks.ts +48 -0
- package/src/deadline-timer.ts +44 -0
- package/src/error-message.ts +48 -0
- package/src/framework.ts +5352 -1388
- package/src/gate/event-gate.ts +28 -3
- package/src/index.ts +11 -2
- package/src/mcpl/channel-registry.ts +517 -286
- package/src/mcpl/checkpoint-manager.ts +104 -29
- package/src/mcpl/conversation-router.ts +28 -8
- package/src/mcpl/convert-block.ts +97 -0
- package/src/mcpl/errors.ts +28 -0
- package/src/mcpl/hook-orchestrator.ts +84 -77
- package/src/mcpl/inbound-source.ts +156 -0
- package/src/mcpl/index.ts +10 -1
- package/src/mcpl/inference-router.ts +174 -99
- package/src/mcpl/push-coalescer.ts +60 -24
- package/src/mcpl/push-handler.ts +20 -90
- package/src/mcpl/reference-fetcher.ts +71 -26
- package/src/mcpl/references.ts +81 -22
- package/src/mcpl/server-connection.ts +427 -132
- package/src/mcpl/server-registry.ts +15 -4
- package/src/mcpl/skip-reply-wake.ts +73 -0
- package/src/mcpl/transport.ts +120 -18
- package/src/mcpl/types.ts +14 -3
- package/src/mcpl/visible-content.ts +27 -0
- package/src/module-registry.ts +58 -23
- package/src/modules/api/index.ts +1 -1
- package/src/modules/discord/discord-js-client.ts +26 -10
- package/src/modules/discord/index.ts +391 -158
- package/src/modules/discord/types.ts +15 -2
- package/src/modules/health/index.ts +2 -1
- package/src/modules/history/index.ts +410 -120
- package/src/modules/history/semantic.ts +189 -32
- package/src/modules/unknown-tool.ts +16 -0
- package/src/modules/workspace/disk-agreement.ts +51 -3
- package/src/modules/workspace/effects.ts +279 -35
- package/src/modules/workspace/index.ts +810 -260
- package/src/modules/workspace/observe.ts +194 -20
- package/src/modules/workspace/reconcile.ts +619 -64
- package/src/modules/workspace/types.ts +18 -4
- package/src/modules/workspace/watcher.ts +27 -4
- package/src/prose-drafts.ts +481 -0
- package/src/prose-segments.ts +51 -8
- package/src/recovery/offline-branch.ts +4 -1
- package/src/safe-slice.ts +9 -1
- package/src/thinking-token-stamp.ts +34 -3
- package/src/tool-image-ledger.ts +153 -34
- package/src/tool-presentation.ts +224 -40
- package/src/tool-result-guard.ts +7 -8
- package/src/tool-result-history.ts +124 -20
- package/src/tune-out/coordinator.ts +259 -65
- package/src/types/agent.ts +17 -7
- package/src/types/events.ts +17 -0
- package/src/types/framework.ts +21 -5
- package/src/types/inference-log.ts +1 -1
- package/src/types/module.ts +24 -4
- package/src/types/trace.ts +101 -6
- package/src/usage/usage-tracker.ts +32 -8
- package/dist/test/activation-request-sanitize.test.d.ts +0 -2
- package/dist/test/activation-request-sanitize.test.d.ts.map +0 -1
- package/dist/test/activation-request-sanitize.test.js +0 -89
- package/dist/test/activation-request-sanitize.test.js.map +0 -1
- package/dist/test/agent-cache-ttl.test.d.ts +0 -2
- package/dist/test/agent-cache-ttl.test.d.ts.map +0 -1
- package/dist/test/agent-cache-ttl.test.js +0 -41
- package/dist/test/agent-cache-ttl.test.js.map +0 -1
- package/dist/test/agent-runtime-settings.test.d.ts +0 -2
- package/dist/test/agent-runtime-settings.test.d.ts.map +0 -1
- package/dist/test/agent-runtime-settings.test.js +0 -1598
- package/dist/test/agent-runtime-settings.test.js.map +0 -1
- package/dist/test/api-admin-gate.test.d.ts +0 -2
- package/dist/test/api-admin-gate.test.d.ts.map +0 -1
- package/dist/test/api-admin-gate.test.js +0 -116
- package/dist/test/api-admin-gate.test.js.map +0 -1
- package/dist/test/assistant-persist-refusal.test.d.ts +0 -2
- package/dist/test/assistant-persist-refusal.test.d.ts.map +0 -1
- package/dist/test/assistant-persist-refusal.test.js +0 -63
- package/dist/test/assistant-persist-refusal.test.js.map +0 -1
- package/dist/test/batched-wake-locus.test.d.ts +0 -2
- package/dist/test/batched-wake-locus.test.d.ts.map +0 -1
- package/dist/test/batched-wake-locus.test.js +0 -166
- package/dist/test/batched-wake-locus.test.js.map +0 -1
- package/dist/test/busy-agent-scheduler.test.d.ts +0 -2
- package/dist/test/busy-agent-scheduler.test.d.ts.map +0 -1
- package/dist/test/busy-agent-scheduler.test.js +0 -92
- package/dist/test/busy-agent-scheduler.test.js.map +0 -1
- package/dist/test/channel-incoming-targeting.test.d.ts +0 -2
- package/dist/test/channel-incoming-targeting.test.d.ts.map +0 -1
- package/dist/test/channel-incoming-targeting.test.js +0 -81
- package/dist/test/channel-incoming-targeting.test.js.map +0 -1
- package/dist/test/channel-label-history.test.d.ts +0 -2
- package/dist/test/channel-label-history.test.d.ts.map +0 -1
- package/dist/test/channel-label-history.test.js +0 -424
- package/dist/test/channel-label-history.test.js.map +0 -1
- package/dist/test/channel-lifecycle-provenance.test.d.ts +0 -2
- package/dist/test/channel-lifecycle-provenance.test.d.ts.map +0 -1
- package/dist/test/channel-lifecycle-provenance.test.js +0 -47
- package/dist/test/channel-lifecycle-provenance.test.js.map +0 -1
- package/dist/test/channel-registry-routing.test.d.ts +0 -2
- package/dist/test/channel-registry-routing.test.d.ts.map +0 -1
- package/dist/test/channel-registry-routing.test.js +0 -446
- package/dist/test/channel-registry-routing.test.js.map +0 -1
- package/dist/test/channel-registry-typing.test.d.ts +0 -2
- package/dist/test/channel-registry-typing.test.d.ts.map +0 -1
- package/dist/test/channel-registry-typing.test.js +0 -91
- package/dist/test/channel-registry-typing.test.js.map +0 -1
- package/dist/test/channels-changed-respond-first.test.d.ts +0 -2
- package/dist/test/channels-changed-respond-first.test.d.ts.map +0 -1
- package/dist/test/channels-changed-respond-first.test.js +0 -74
- package/dist/test/channels-changed-respond-first.test.js.map +0 -1
- package/dist/test/checkpoint-attribution.test.d.ts +0 -2
- package/dist/test/checkpoint-attribution.test.d.ts.map +0 -1
- package/dist/test/checkpoint-attribution.test.js +0 -200
- package/dist/test/checkpoint-attribution.test.js.map +0 -1
- package/dist/test/code-execution.test.d.ts +0 -11
- package/dist/test/code-execution.test.d.ts.map +0 -1
- package/dist/test/code-execution.test.js +0 -1272
- package/dist/test/code-execution.test.js.map +0 -1
- package/dist/test/component-defaults.test.d.ts +0 -2
- package/dist/test/component-defaults.test.d.ts.map +0 -1
- package/dist/test/component-defaults.test.js +0 -54
- package/dist/test/component-defaults.test.js.map +0 -1
- package/dist/test/conversation-fork-injection-scoping.test.d.ts +0 -2
- package/dist/test/conversation-fork-injection-scoping.test.d.ts.map +0 -1
- package/dist/test/conversation-fork-injection-scoping.test.js +0 -200
- package/dist/test/conversation-fork-injection-scoping.test.js.map +0 -1
- package/dist/test/conversation-router.test.d.ts +0 -2
- package/dist/test/conversation-router.test.d.ts.map +0 -1
- package/dist/test/conversation-router.test.js +0 -174
- package/dist/test/conversation-router.test.js.map +0 -1
- package/dist/test/conversation-routing.test.d.ts +0 -7
- package/dist/test/conversation-routing.test.d.ts.map +0 -1
- package/dist/test/conversation-routing.test.js +0 -621
- package/dist/test/conversation-routing.test.js.map +0 -1
- package/dist/test/deferred-wake-integrity.test.d.ts +0 -29
- package/dist/test/deferred-wake-integrity.test.d.ts.map +0 -1
- package/dist/test/deferred-wake-integrity.test.js +0 -320
- package/dist/test/deferred-wake-integrity.test.js.map +0 -1
- package/dist/test/discord-awareness-outbox.test.d.ts +0 -2
- package/dist/test/discord-awareness-outbox.test.d.ts.map +0 -1
- package/dist/test/discord-awareness-outbox.test.js +0 -371
- package/dist/test/discord-awareness-outbox.test.js.map +0 -1
- package/dist/test/discord-history-delete-window.test.d.ts +0 -2
- package/dist/test/discord-history-delete-window.test.d.ts.map +0 -1
- package/dist/test/discord-history-delete-window.test.js +0 -81
- package/dist/test/discord-history-delete-window.test.js.map +0 -1
- package/dist/test/discord-history-sync.test.d.ts +0 -2
- package/dist/test/discord-history-sync.test.d.ts.map +0 -1
- package/dist/test/discord-history-sync.test.js +0 -56
- package/dist/test/discord-history-sync.test.js.map +0 -1
- package/dist/test/discord-typing-keepalive.test.d.ts +0 -2
- package/dist/test/discord-typing-keepalive.test.d.ts.map +0 -1
- package/dist/test/discord-typing-keepalive.test.js +0 -77
- package/dist/test/discord-typing-keepalive.test.js.map +0 -1
- package/dist/test/ephemeral-settle.test.d.ts +0 -2
- package/dist/test/ephemeral-settle.test.d.ts.map +0 -1
- package/dist/test/ephemeral-settle.test.js +0 -354
- package/dist/test/ephemeral-settle.test.js.map +0 -1
- package/dist/test/event-gate-passthrough.test.d.ts +0 -15
- package/dist/test/event-gate-passthrough.test.d.ts.map +0 -1
- package/dist/test/event-gate-passthrough.test.js +0 -289
- package/dist/test/event-gate-passthrough.test.js.map +0 -1
- package/dist/test/event-gate-policy-mutation.test.d.ts +0 -2
- package/dist/test/event-gate-policy-mutation.test.d.ts.map +0 -1
- package/dist/test/event-gate-policy-mutation.test.js +0 -137
- package/dist/test/event-gate-policy-mutation.test.js.map +0 -1
- package/dist/test/event-gate-rate-limit.test.d.ts +0 -2
- package/dist/test/event-gate-rate-limit.test.d.ts.map +0 -1
- package/dist/test/event-gate-rate-limit.test.js +0 -627
- package/dist/test/event-gate-rate-limit.test.js.map +0 -1
- package/dist/test/event-gate-script.test.d.ts +0 -2
- package/dist/test/event-gate-script.test.d.ts.map +0 -1
- package/dist/test/event-gate-script.test.js +0 -95
- package/dist/test/event-gate-script.test.js.map +0 -1
- package/dist/test/event-gate-selfwake.test.d.ts +0 -15
- package/dist/test/event-gate-selfwake.test.d.ts.map +0 -1
- package/dist/test/event-gate-selfwake.test.js +0 -125
- package/dist/test/event-gate-selfwake.test.js.map +0 -1
- package/dist/test/event-gate-tags.test.d.ts +0 -2
- package/dist/test/event-gate-tags.test.d.ts.map +0 -1
- package/dist/test/event-gate-tags.test.js +0 -76
- package/dist/test/event-gate-tags.test.js.map +0 -1
- package/dist/test/event-gate.test.d.ts +0 -2
- package/dist/test/event-gate.test.d.ts.map +0 -1
- package/dist/test/event-gate.test.js +0 -919
- package/dist/test/event-gate.test.js.map +0 -1
- package/dist/test/explicit-prose-routing.test.d.ts +0 -11
- package/dist/test/explicit-prose-routing.test.d.ts.map +0 -1
- package/dist/test/explicit-prose-routing.test.js +0 -1715
- package/dist/test/explicit-prose-routing.test.js.map +0 -1
- package/dist/test/framework.test.d.ts +0 -5
- package/dist/test/framework.test.d.ts.map +0 -1
- package/dist/test/framework.test.js +0 -1048
- package/dist/test/framework.test.js.map +0 -1
- package/dist/test/gather-context-timeout.test.d.ts +0 -2
- package/dist/test/gather-context-timeout.test.d.ts.map +0 -1
- package/dist/test/gather-context-timeout.test.js +0 -120
- package/dist/test/gather-context-timeout.test.js.map +0 -1
- package/dist/test/health-snapshot.test.d.ts +0 -2
- package/dist/test/health-snapshot.test.d.ts.map +0 -1
- package/dist/test/health-snapshot.test.js +0 -74
- package/dist/test/health-snapshot.test.js.map +0 -1
- package/dist/test/helpers/coalescing-fixture.d.ts +0 -74
- package/dist/test/helpers/coalescing-fixture.d.ts.map +0 -1
- package/dist/test/helpers/coalescing-fixture.js +0 -152
- package/dist/test/helpers/coalescing-fixture.js.map +0 -1
- package/dist/test/helpers/coalescing-kill-child.d.ts +0 -2
- package/dist/test/helpers/coalescing-kill-child.d.ts.map +0 -1
- package/dist/test/helpers/coalescing-kill-child.js +0 -24
- package/dist/test/helpers/coalescing-kill-child.js.map +0 -1
- package/dist/test/helpers/mock-membrane.d.ts +0 -53
- package/dist/test/helpers/mock-membrane.d.ts.map +0 -1
- package/dist/test/helpers/mock-membrane.js +0 -168
- package/dist/test/helpers/mock-membrane.js.map +0 -1
- package/dist/test/helpers/pytc-stop-rows.d.ts +0 -11
- package/dist/test/helpers/pytc-stop-rows.d.ts.map +0 -1
- package/dist/test/helpers/pytc-stop-rows.js +0 -143
- package/dist/test/helpers/pytc-stop-rows.js.map +0 -1
- package/dist/test/helpers/quiesce-crash-child.d.ts +0 -2
- package/dist/test/helpers/quiesce-crash-child.d.ts.map +0 -1
- package/dist/test/helpers/quiesce-crash-child.js +0 -156
- package/dist/test/helpers/quiesce-crash-child.js.map +0 -1
- package/dist/test/hide-then-turn.test.d.ts +0 -2
- package/dist/test/hide-then-turn.test.d.ts.map +0 -1
- package/dist/test/hide-then-turn.test.js +0 -101
- package/dist/test/hide-then-turn.test.js.map +0 -1
- package/dist/test/history-module-overview.test.d.ts +0 -2
- package/dist/test/history-module-overview.test.d.ts.map +0 -1
- package/dist/test/history-module-overview.test.js +0 -711
- package/dist/test/history-module-overview.test.js.map +0 -1
- package/dist/test/history-module-realstore.test.d.ts +0 -2
- package/dist/test/history-module-realstore.test.d.ts.map +0 -1
- package/dist/test/history-module-realstore.test.js +0 -363
- package/dist/test/history-module-realstore.test.js.map +0 -1
- package/dist/test/history-module-semantic.test.d.ts +0 -2
- package/dist/test/history-module-semantic.test.d.ts.map +0 -1
- package/dist/test/history-module-semantic.test.js +0 -213
- package/dist/test/history-module-semantic.test.js.map +0 -1
- package/dist/test/history-module-ux.test.d.ts +0 -2
- package/dist/test/history-module-ux.test.d.ts.map +0 -1
- package/dist/test/history-module-ux.test.js +0 -304
- package/dist/test/history-module-ux.test.js.map +0 -1
- package/dist/test/history-module.test.d.ts +0 -2
- package/dist/test/history-module.test.d.ts.map +0 -1
- package/dist/test/history-module.test.js +0 -619
- package/dist/test/history-module.test.js.map +0 -1
- package/dist/test/history-semantic-review-findings.test.d.ts +0 -2
- package/dist/test/history-semantic-review-findings.test.d.ts.map +0 -1
- package/dist/test/history-semantic-review-findings.test.js +0 -338
- package/dist/test/history-semantic-review-findings.test.js.map +0 -1
- package/dist/test/history-semantic-sync-converges.test.d.ts +0 -2
- package/dist/test/history-semantic-sync-converges.test.d.ts.map +0 -1
- package/dist/test/history-semantic-sync-converges.test.js +0 -109
- package/dist/test/history-semantic-sync-converges.test.js.map +0 -1
- package/dist/test/host-quiesce.test.d.ts +0 -2
- package/dist/test/host-quiesce.test.d.ts.map +0 -1
- package/dist/test/host-quiesce.test.js +0 -988
- package/dist/test/host-quiesce.test.js.map +0 -1
- package/dist/test/inference-exhaustion-rewind.test.d.ts +0 -2
- package/dist/test/inference-exhaustion-rewind.test.d.ts.map +0 -1
- package/dist/test/inference-exhaustion-rewind.test.js +0 -387
- package/dist/test/inference-exhaustion-rewind.test.js.map +0 -1
- package/dist/test/inference-failure-bounds.test.d.ts +0 -2
- package/dist/test/inference-failure-bounds.test.d.ts.map +0 -1
- package/dist/test/inference-failure-bounds.test.js +0 -1202
- package/dist/test/inference-failure-bounds.test.js.map +0 -1
- package/dist/test/inference-failure-observability.test.d.ts +0 -2
- package/dist/test/inference-failure-observability.test.d.ts.map +0 -1
- package/dist/test/inference-failure-observability.test.js +0 -84
- package/dist/test/inference-failure-observability.test.js.map +0 -1
- package/dist/test/journal-tool.test.d.ts +0 -2
- package/dist/test/journal-tool.test.d.ts.map +0 -1
- package/dist/test/journal-tool.test.js +0 -33
- package/dist/test/journal-tool.test.js.map +0 -1
- package/dist/test/kv-unified-open-flight-retry.test.d.ts +0 -2
- package/dist/test/kv-unified-open-flight-retry.test.d.ts.map +0 -1
- package/dist/test/kv-unified-open-flight-retry.test.js +0 -189
- package/dist/test/kv-unified-open-flight-retry.test.js.map +0 -1
- package/dist/test/kv-unified-wiring.test.d.ts +0 -2
- package/dist/test/kv-unified-wiring.test.d.ts.map +0 -1
- package/dist/test/kv-unified-wiring.test.js +0 -95
- package/dist/test/kv-unified-wiring.test.js.map +0 -1
- package/dist/test/late-events-after-stop.test.d.ts +0 -2
- package/dist/test/late-events-after-stop.test.d.ts.map +0 -1
- package/dist/test/late-events-after-stop.test.js +0 -122
- package/dist/test/late-events-after-stop.test.js.map +0 -1
- package/dist/test/liveness-watchdog.test.d.ts +0 -2
- package/dist/test/liveness-watchdog.test.d.ts.map +0 -1
- package/dist/test/liveness-watchdog.test.js +0 -94
- package/dist/test/liveness-watchdog.test.js.map +0 -1
- package/dist/test/machine-close-provenance.test.d.ts +0 -2
- package/dist/test/machine-close-provenance.test.d.ts.map +0 -1
- package/dist/test/machine-close-provenance.test.js +0 -116
- package/dist/test/machine-close-provenance.test.js.map +0 -1
- package/dist/test/maintenance-timer.test.d.ts +0 -2
- package/dist/test/maintenance-timer.test.d.ts.map +0 -1
- package/dist/test/maintenance-timer.test.js +0 -1827
- package/dist/test/maintenance-timer.test.js.map +0 -1
- package/dist/test/mcp-server-bin.test.d.ts +0 -2
- package/dist/test/mcp-server-bin.test.d.ts.map +0 -1
- package/dist/test/mcp-server-bin.test.js +0 -142
- package/dist/test/mcp-server-bin.test.js.map +0 -1
- package/dist/test/mcpl-access-provider.test.d.ts +0 -2
- package/dist/test/mcpl-access-provider.test.d.ts.map +0 -1
- package/dist/test/mcpl-access-provider.test.js +0 -20
- package/dist/test/mcpl-access-provider.test.js.map +0 -1
- package/dist/test/mcpl-awareness-barrier.test.d.ts +0 -2
- package/dist/test/mcpl-awareness-barrier.test.d.ts.map +0 -1
- package/dist/test/mcpl-awareness-barrier.test.js +0 -769
- package/dist/test/mcpl-awareness-barrier.test.js.map +0 -1
- package/dist/test/mcpl-capability-grant.test.d.ts +0 -10
- package/dist/test/mcpl-capability-grant.test.d.ts.map +0 -1
- package/dist/test/mcpl-capability-grant.test.js +0 -111
- package/dist/test/mcpl-capability-grant.test.js.map +0 -1
- package/dist/test/mcpl-capability-scoping.test.d.ts +0 -2
- package/dist/test/mcpl-capability-scoping.test.d.ts.map +0 -1
- package/dist/test/mcpl-capability-scoping.test.js +0 -266
- package/dist/test/mcpl-capability-scoping.test.js.map +0 -1
- package/dist/test/mcpl-child-env.test.d.ts +0 -2
- package/dist/test/mcpl-child-env.test.d.ts.map +0 -1
- package/dist/test/mcpl-child-env.test.js +0 -158
- package/dist/test/mcpl-child-env.test.js.map +0 -1
- package/dist/test/mcpl-coalesced-content-parity.test.d.ts +0 -2
- package/dist/test/mcpl-coalesced-content-parity.test.d.ts.map +0 -1
- package/dist/test/mcpl-coalesced-content-parity.test.js +0 -532
- package/dist/test/mcpl-coalesced-content-parity.test.js.map +0 -1
- package/dist/test/mcpl-coalescing.test.d.ts +0 -2
- package/dist/test/mcpl-coalescing.test.d.ts.map +0 -1
- package/dist/test/mcpl-coalescing.test.js +0 -1125
- package/dist/test/mcpl-coalescing.test.js.map +0 -1
- package/dist/test/mcpl-config-diagnostics.test.d.ts +0 -2
- package/dist/test/mcpl-config-diagnostics.test.d.ts.map +0 -1
- package/dist/test/mcpl-config-diagnostics.test.js +0 -452
- package/dist/test/mcpl-config-diagnostics.test.js.map +0 -1
- package/dist/test/mcpl-empty-content.test.d.ts +0 -2
- package/dist/test/mcpl-empty-content.test.d.ts.map +0 -1
- package/dist/test/mcpl-empty-content.test.js +0 -368
- package/dist/test/mcpl-empty-content.test.js.map +0 -1
- package/dist/test/mcpl-gate-roundtrip.test.d.ts +0 -2
- package/dist/test/mcpl-gate-roundtrip.test.d.ts.map +0 -1
- package/dist/test/mcpl-gate-roundtrip.test.js +0 -285
- package/dist/test/mcpl-gate-roundtrip.test.js.map +0 -1
- package/dist/test/mcpl-list-status.test.d.ts +0 -2
- package/dist/test/mcpl-list-status.test.d.ts.map +0 -1
- package/dist/test/mcpl-list-status.test.js +0 -82
- package/dist/test/mcpl-list-status.test.js.map +0 -1
- package/dist/test/mcpl-manifest-changed.test.d.ts +0 -2
- package/dist/test/mcpl-manifest-changed.test.d.ts.map +0 -1
- package/dist/test/mcpl-manifest-changed.test.js +0 -178
- package/dist/test/mcpl-manifest-changed.test.js.map +0 -1
- package/dist/test/mcpl-push-convert.test.d.ts +0 -2
- package/dist/test/mcpl-push-convert.test.d.ts.map +0 -1
- package/dist/test/mcpl-push-convert.test.js +0 -42
- package/dist/test/mcpl-push-convert.test.js.map +0 -1
- package/dist/test/mcpl-reconnect-events.test.d.ts +0 -2
- package/dist/test/mcpl-reconnect-events.test.d.ts.map +0 -1
- package/dist/test/mcpl-reconnect-events.test.js +0 -144
- package/dist/test/mcpl-reconnect-events.test.js.map +0 -1
- package/dist/test/mcpl-reconnect-reregistration.test.d.ts +0 -2
- package/dist/test/mcpl-reconnect-reregistration.test.d.ts.map +0 -1
- package/dist/test/mcpl-reconnect-reregistration.test.js +0 -238
- package/dist/test/mcpl-reconnect-reregistration.test.js.map +0 -1
- package/dist/test/mcpl-reference-fetcher.test.d.ts +0 -2
- package/dist/test/mcpl-reference-fetcher.test.d.ts.map +0 -1
- package/dist/test/mcpl-reference-fetcher.test.js +0 -427
- package/dist/test/mcpl-reference-fetcher.test.js.map +0 -1
- package/dist/test/mcpl-reference-fields.test.d.ts +0 -2
- package/dist/test/mcpl-reference-fields.test.d.ts.map +0 -1
- package/dist/test/mcpl-reference-fields.test.js +0 -149
- package/dist/test/mcpl-reference-fields.test.js.map +0 -1
- package/dist/test/mcpl-rejection-log-lines.test.d.ts +0 -2
- package/dist/test/mcpl-rejection-log-lines.test.d.ts.map +0 -1
- package/dist/test/mcpl-rejection-log-lines.test.js +0 -349
- package/dist/test/mcpl-rejection-log-lines.test.js.map +0 -1
- package/dist/test/mcpl-request-timeout.test.d.ts +0 -2
- package/dist/test/mcpl-request-timeout.test.d.ts.map +0 -1
- package/dist/test/mcpl-request-timeout.test.js +0 -138
- package/dist/test/mcpl-request-timeout.test.js.map +0 -1
- package/dist/test/mcpl-runtime-lifecycle.test.d.ts +0 -7
- package/dist/test/mcpl-runtime-lifecycle.test.d.ts.map +0 -1
- package/dist/test/mcpl-runtime-lifecycle.test.js +0 -142
- package/dist/test/mcpl-runtime-lifecycle.test.js.map +0 -1
- package/dist/test/mcpl-stderr-tail.test.d.ts +0 -2
- package/dist/test/mcpl-stderr-tail.test.d.ts.map +0 -1
- package/dist/test/mcpl-stderr-tail.test.js +0 -210
- package/dist/test/mcpl-stderr-tail.test.js.map +0 -1
- package/dist/test/mcpl-tool-class-listing.test.d.ts +0 -2
- package/dist/test/mcpl-tool-class-listing.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-class-listing.test.js +0 -147
- package/dist/test/mcpl-tool-class-listing.test.js.map +0 -1
- package/dist/test/mcpl-tool-classes.test.d.ts +0 -7
- package/dist/test/mcpl-tool-classes.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-classes.test.js +0 -80
- package/dist/test/mcpl-tool-classes.test.js.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-e2e.test.d.ts +0 -2
- package/dist/test/mcpl-tool-lifecycle-e2e.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-e2e.test.js +0 -237
- package/dist/test/mcpl-tool-lifecycle-e2e.test.js.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-emitter.test.d.ts +0 -11
- package/dist/test/mcpl-tool-lifecycle-emitter.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-emitter.test.js +0 -412
- package/dist/test/mcpl-tool-lifecycle-emitter.test.js.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-script.test.d.ts +0 -2
- package/dist/test/mcpl-tool-lifecycle-script.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-lifecycle-script.test.js +0 -288
- package/dist/test/mcpl-tool-lifecycle-script.test.js.map +0 -1
- package/dist/test/mcpl-tool-lifecycle.test.d.ts +0 -11
- package/dist/test/mcpl-tool-lifecycle.test.d.ts.map +0 -1
- package/dist/test/mcpl-tool-lifecycle.test.js +0 -270
- package/dist/test/mcpl-tool-lifecycle.test.js.map +0 -1
- package/dist/test/mcpl-transport-close.test.d.ts +0 -2
- package/dist/test/mcpl-transport-close.test.d.ts.map +0 -1
- package/dist/test/mcpl-transport-close.test.js +0 -373
- package/dist/test/mcpl-transport-close.test.js.map +0 -1
- package/dist/test/mcpl-transport-spawn.test.d.ts +0 -2
- package/dist/test/mcpl-transport-spawn.test.d.ts.map +0 -1
- package/dist/test/mcpl-transport-spawn.test.js +0 -58
- package/dist/test/mcpl-transport-spawn.test.js.map +0 -1
- package/dist/test/mcpl-ws-transport.test.d.ts +0 -2
- package/dist/test/mcpl-ws-transport.test.d.ts.map +0 -1
- package/dist/test/mcpl-ws-transport.test.js +0 -259
- package/dist/test/mcpl-ws-transport.test.js.map +0 -1
- package/dist/test/module-context-integration.test.d.ts +0 -18
- package/dist/test/module-context-integration.test.d.ts.map +0 -1
- package/dist/test/module-context-integration.test.js +0 -181
- package/dist/test/module-context-integration.test.js.map +0 -1
- package/dist/test/offline-recovery-branch.test.d.ts +0 -2
- package/dist/test/offline-recovery-branch.test.d.ts.map +0 -1
- package/dist/test/offline-recovery-branch.test.js +0 -570
- package/dist/test/offline-recovery-branch.test.js.map +0 -1
- package/dist/test/operator-surgery.test.d.ts +0 -2
- package/dist/test/operator-surgery.test.d.ts.map +0 -1
- package/dist/test/operator-surgery.test.js +0 -595
- package/dist/test/operator-surgery.test.js.map +0 -1
- package/dist/test/ops-alert.test.d.ts +0 -2
- package/dist/test/ops-alert.test.d.ts.map +0 -1
- package/dist/test/ops-alert.test.js +0 -153
- package/dist/test/ops-alert.test.js.map +0 -1
- package/dist/test/overbudget-drain-breaker.test.d.ts +0 -2
- package/dist/test/overbudget-drain-breaker.test.d.ts.map +0 -1
- package/dist/test/overbudget-drain-breaker.test.js +0 -198
- package/dist/test/overbudget-drain-breaker.test.js.map +0 -1
- package/dist/test/pack-installs-alone.test.d.ts +0 -2
- package/dist/test/pack-installs-alone.test.d.ts.map +0 -1
- package/dist/test/pack-installs-alone.test.js +0 -284
- package/dist/test/pack-installs-alone.test.js.map +0 -1
- package/dist/test/per-agent-delivery.test.d.ts +0 -2
- package/dist/test/per-agent-delivery.test.d.ts.map +0 -1
- package/dist/test/per-agent-delivery.test.js +0 -108
- package/dist/test/per-agent-delivery.test.js.map +0 -1
- package/dist/test/physical-window-restart.test.d.ts +0 -16
- package/dist/test/physical-window-restart.test.d.ts.map +0 -1
- package/dist/test/physical-window-restart.test.js +0 -487
- package/dist/test/physical-window-restart.test.js.map +0 -1
- package/dist/test/placed-reaction-baseline.test.d.ts +0 -2
- package/dist/test/placed-reaction-baseline.test.d.ts.map +0 -1
- package/dist/test/placed-reaction-baseline.test.js +0 -312
- package/dist/test/placed-reaction-baseline.test.js.map +0 -1
- package/dist/test/present-while-acting.test.d.ts +0 -19
- package/dist/test/present-while-acting.test.d.ts.map +0 -1
- package/dist/test/present-while-acting.test.js +0 -1649
- package/dist/test/present-while-acting.test.js.map +0 -1
- package/dist/test/prose-segments.test.d.ts +0 -2
- package/dist/test/prose-segments.test.d.ts.map +0 -1
- package/dist/test/prose-segments.test.js +0 -52
- package/dist/test/prose-segments.test.js.map +0 -1
- package/dist/test/prose-stream-router.test.d.ts +0 -2
- package/dist/test/prose-stream-router.test.d.ts.map +0 -1
- package/dist/test/prose-stream-router.test.js +0 -171
- package/dist/test/prose-stream-router.test.js.map +0 -1
- package/dist/test/provider-acceleration-cooldown.test.d.ts +0 -2
- package/dist/test/provider-acceleration-cooldown.test.d.ts.map +0 -1
- package/dist/test/provider-acceleration-cooldown.test.js +0 -435
- package/dist/test/provider-acceleration-cooldown.test.js.map +0 -1
- package/dist/test/provider-waits.test.d.ts +0 -2
- package/dist/test/provider-waits.test.d.ts.map +0 -1
- package/dist/test/provider-waits.test.js +0 -2259
- package/dist/test/provider-waits.test.js.map +0 -1
- package/dist/test/puppet-tool-call.test.d.ts +0 -2
- package/dist/test/puppet-tool-call.test.d.ts.map +0 -1
- package/dist/test/puppet-tool-call.test.js +0 -226
- package/dist/test/puppet-tool-call.test.js.map +0 -1
- package/dist/test/puppet-turn-reservation.test.d.ts +0 -2
- package/dist/test/puppet-turn-reservation.test.d.ts.map +0 -1
- package/dist/test/puppet-turn-reservation.test.js +0 -139
- package/dist/test/puppet-turn-reservation.test.js.map +0 -1
- package/dist/test/reaction-baseline-platform.test.d.ts +0 -2
- package/dist/test/reaction-baseline-platform.test.d.ts.map +0 -1
- package/dist/test/reaction-baseline-platform.test.js +0 -124
- package/dist/test/reaction-baseline-platform.test.js.map +0 -1
- package/dist/test/record-journal.test.d.ts +0 -6
- package/dist/test/record-journal.test.d.ts.map +0 -1
- package/dist/test/record-journal.test.js +0 -269
- package/dist/test/record-journal.test.js.map +0 -1
- package/dist/test/refusal-reaction-baseline.test.d.ts +0 -2
- package/dist/test/refusal-reaction-baseline.test.d.ts.map +0 -1
- package/dist/test/refusal-reaction-baseline.test.js +0 -81
- package/dist/test/refusal-reaction-baseline.test.js.map +0 -1
- package/dist/test/refusal-rewind.test.d.ts +0 -2
- package/dist/test/refusal-rewind.test.d.ts.map +0 -1
- package/dist/test/refusal-rewind.test.js +0 -117
- package/dist/test/refusal-rewind.test.js.map +0 -1
- package/dist/test/refusal-single-call.test.d.ts +0 -2
- package/dist/test/refusal-single-call.test.d.ts.map +0 -1
- package/dist/test/refusal-single-call.test.js +0 -177
- package/dist/test/refusal-single-call.test.js.map +0 -1
- package/dist/test/release-bump.test.d.ts +0 -2
- package/dist/test/release-bump.test.d.ts.map +0 -1
- package/dist/test/release-bump.test.js +0 -248
- package/dist/test/release-bump.test.js.map +0 -1
- package/dist/test/release-changelog.test.d.ts +0 -2
- package/dist/test/release-changelog.test.d.ts.map +0 -1
- package/dist/test/release-changelog.test.js +0 -159
- package/dist/test/release-changelog.test.js.map +0 -1
- package/dist/test/release-holds.test.d.ts +0 -2
- package/dist/test/release-holds.test.d.ts.map +0 -1
- package/dist/test/release-holds.test.js +0 -456
- package/dist/test/release-holds.test.js.map +0 -1
- package/dist/test/same-round-think-policy.test.d.ts +0 -2
- package/dist/test/same-round-think-policy.test.d.ts.map +0 -1
- package/dist/test/same-round-think-policy.test.js +0 -853
- package/dist/test/same-round-think-policy.test.js.map +0 -1
- package/dist/test/save-recent-image.test.d.ts +0 -26
- package/dist/test/save-recent-image.test.d.ts.map +0 -1
- package/dist/test/save-recent-image.test.js +0 -974
- package/dist/test/save-recent-image.test.js.map +0 -1
- package/dist/test/shutdown-errors.test.d.ts +0 -2
- package/dist/test/shutdown-errors.test.d.ts.map +0 -1
- package/dist/test/shutdown-errors.test.js +0 -662
- package/dist/test/shutdown-errors.test.js.map +0 -1
- package/dist/test/silent-heartbeat-rows.test.d.ts +0 -2
- package/dist/test/silent-heartbeat-rows.test.d.ts.map +0 -1
- package/dist/test/silent-heartbeat-rows.test.js +0 -451
- package/dist/test/silent-heartbeat-rows.test.js.map +0 -1
- package/dist/test/silent-heartbeat.test.d.ts +0 -2
- package/dist/test/silent-heartbeat.test.d.ts.map +0 -1
- package/dist/test/silent-heartbeat.test.js +0 -165
- package/dist/test/silent-heartbeat.test.js.map +0 -1
- package/dist/test/state-scaling-e2e.test.d.ts +0 -22
- package/dist/test/state-scaling-e2e.test.d.ts.map +0 -1
- package/dist/test/state-scaling-e2e.test.js +0 -206
- package/dist/test/state-scaling-e2e.test.js.map +0 -1
- package/dist/test/state-scaling.test.d.ts +0 -12
- package/dist/test/state-scaling.test.d.ts.map +0 -1
- package/dist/test/state-scaling.test.js +0 -251
- package/dist/test/state-scaling.test.js.map +0 -1
- package/dist/test/stop-with-host-operations.test.d.ts +0 -20
- package/dist/test/stop-with-host-operations.test.d.ts.map +0 -1
- package/dist/test/stop-with-host-operations.test.js +0 -1174
- package/dist/test/stop-with-host-operations.test.js.map +0 -1
- package/dist/test/stop-with-work-in-flight.test.d.ts +0 -23
- package/dist/test/stop-with-work-in-flight.test.d.ts.map +0 -1
- package/dist/test/stop-with-work-in-flight.test.js +0 -784
- package/dist/test/stop-with-work-in-flight.test.js.map +0 -1
- package/dist/test/surgery-marks-receipt.test.d.ts +0 -2
- package/dist/test/surgery-marks-receipt.test.d.ts.map +0 -1
- package/dist/test/surgery-marks-receipt.test.js +0 -540
- package/dist/test/surgery-marks-receipt.test.js.map +0 -1
- package/dist/test/thinking-token-stamp.test.d.ts +0 -12
- package/dist/test/thinking-token-stamp.test.d.ts.map +0 -1
- package/dist/test/thinking-token-stamp.test.js +0 -129
- package/dist/test/thinking-token-stamp.test.js.map +0 -1
- package/dist/test/timezone.test.d.ts +0 -2
- package/dist/test/timezone.test.d.ts.map +0 -1
- package/dist/test/timezone.test.js +0 -18
- package/dist/test/timezone.test.js.map +0 -1
- package/dist/test/tool-batch-hook.test.d.ts +0 -8
- package/dist/test/tool-batch-hook.test.d.ts.map +0 -1
- package/dist/test/tool-batch-hook.test.js +0 -275
- package/dist/test/tool-batch-hook.test.js.map +0 -1
- package/dist/test/tool-policy.test.d.ts +0 -2
- package/dist/test/tool-policy.test.d.ts.map +0 -1
- package/dist/test/tool-policy.test.js +0 -51
- package/dist/test/tool-policy.test.js.map +0 -1
- package/dist/test/tool-presentation.test.d.ts +0 -2
- package/dist/test/tool-presentation.test.d.ts.map +0 -1
- package/dist/test/tool-presentation.test.js +0 -268
- package/dist/test/tool-presentation.test.js.map +0 -1
- package/dist/test/tool-result-content.test.d.ts +0 -2
- package/dist/test/tool-result-content.test.d.ts.map +0 -1
- package/dist/test/tool-result-content.test.js +0 -37
- package/dist/test/tool-result-content.test.js.map +0 -1
- package/dist/test/tool-result-guard.test.d.ts +0 -2
- package/dist/test/tool-result-guard.test.d.ts.map +0 -1
- package/dist/test/tool-result-guard.test.js +0 -3729
- package/dist/test/tool-result-guard.test.js.map +0 -1
- package/dist/test/tool-result-history.test.d.ts +0 -7
- package/dist/test/tool-result-history.test.d.ts.map +0 -1
- package/dist/test/tool-result-history.test.js +0 -156
- package/dist/test/tool-result-history.test.js.map +0 -1
- package/dist/test/tool-result-spill.test.d.ts +0 -13
- package/dist/test/tool-result-spill.test.d.ts.map +0 -1
- package/dist/test/tool-result-spill.test.js +0 -586
- package/dist/test/tool-result-spill.test.js.map +0 -1
- package/dist/test/tool-wrapper-prose-guard-integration.test.d.ts +0 -2
- package/dist/test/tool-wrapper-prose-guard-integration.test.d.ts.map +0 -1
- package/dist/test/tool-wrapper-prose-guard-integration.test.js +0 -485
- package/dist/test/tool-wrapper-prose-guard-integration.test.js.map +0 -1
- package/dist/test/tool-wrapper-prose-guard.test.d.ts +0 -2
- package/dist/test/tool-wrapper-prose-guard.test.d.ts.map +0 -1
- package/dist/test/tool-wrapper-prose-guard.test.js +0 -34
- package/dist/test/tool-wrapper-prose-guard.test.js.map +0 -1
- package/dist/test/tools-observe-parser-conformance.test.d.ts +0 -2
- package/dist/test/tools-observe-parser-conformance.test.d.ts.map +0 -1
- package/dist/test/tools-observe-parser-conformance.test.js +0 -129
- package/dist/test/tools-observe-parser-conformance.test.js.map +0 -1
- package/dist/test/trunk-channel-routing.test.d.ts +0 -19
- package/dist/test/trunk-channel-routing.test.d.ts.map +0 -1
- package/dist/test/trunk-channel-routing.test.js +0 -652
- package/dist/test/trunk-channel-routing.test.js.map +0 -1
- package/dist/test/tune-out-e2e.test.d.ts +0 -2
- package/dist/test/tune-out-e2e.test.d.ts.map +0 -1
- package/dist/test/tune-out-e2e.test.js +0 -142
- package/dist/test/tune-out-e2e.test.js.map +0 -1
- package/dist/test/tune-out-gate-composition.test.d.ts +0 -2
- package/dist/test/tune-out-gate-composition.test.d.ts.map +0 -1
- package/dist/test/tune-out-gate-composition.test.js +0 -221
- package/dist/test/tune-out-gate-composition.test.js.map +0 -1
- package/dist/test/tune-out-lifecycle.test.d.ts +0 -2
- package/dist/test/tune-out-lifecycle.test.d.ts.map +0 -1
- package/dist/test/tune-out-lifecycle.test.js +0 -121
- package/dist/test/tune-out-lifecycle.test.js.map +0 -1
- package/dist/test/turn-trigger-provenance.test.d.ts +0 -2
- package/dist/test/turn-trigger-provenance.test.d.ts.map +0 -1
- package/dist/test/turn-trigger-provenance.test.js +0 -137
- package/dist/test/turn-trigger-provenance.test.js.map +0 -1
- package/dist/test/unconvertible-tool-result.test.d.ts +0 -2
- package/dist/test/unconvertible-tool-result.test.d.ts.map +0 -1
- package/dist/test/unconvertible-tool-result.test.js +0 -358
- package/dist/test/unconvertible-tool-result.test.js.map +0 -1
- package/dist/test/unsent-compiles.test.d.ts +0 -2
- package/dist/test/unsent-compiles.test.d.ts.map +0 -1
- package/dist/test/unsent-compiles.test.js +0 -139
- package/dist/test/unsent-compiles.test.js.map +0 -1
- package/dist/test/usage-accounting.test.d.ts +0 -2
- package/dist/test/usage-accounting.test.d.ts.map +0 -1
- package/dist/test/usage-accounting.test.js +0 -13
- package/dist/test/usage-accounting.test.js.map +0 -1
- package/dist/test/usage-tracker.test.d.ts +0 -2
- package/dist/test/usage-tracker.test.d.ts.map +0 -1
- package/dist/test/usage-tracker.test.js +0 -129
- package/dist/test/usage-tracker.test.js.map +0 -1
- package/dist/test/utils-surface.test.d.ts +0 -2
- package/dist/test/utils-surface.test.d.ts.map +0 -1
- package/dist/test/utils-surface.test.js +0 -145
- package/dist/test/utils-surface.test.js.map +0 -1
- package/dist/test/workspace-branch-continuation.test.d.ts +0 -15
- package/dist/test/workspace-branch-continuation.test.d.ts.map +0 -1
- package/dist/test/workspace-branch-continuation.test.js +0 -183
- package/dist/test/workspace-branch-continuation.test.js.map +0 -1
- package/dist/test/workspace-materialize-freshness.test.d.ts +0 -16
- package/dist/test/workspace-materialize-freshness.test.d.ts.map +0 -1
- package/dist/test/workspace-materialize-freshness.test.js +0 -252
- package/dist/test/workspace-materialize-freshness.test.js.map +0 -1
- package/dist/test/workspace-path-containment.test.d.ts +0 -19
- package/dist/test/workspace-path-containment.test.d.ts.map +0 -1
- package/dist/test/workspace-path-containment.test.js +0 -91
- package/dist/test/workspace-path-containment.test.js.map +0 -1
- package/dist/test/workspace-read-file-from-disk.test.d.ts +0 -17
- package/dist/test/workspace-read-file-from-disk.test.d.ts.map +0 -1
- package/dist/test/workspace-read-file-from-disk.test.js +0 -174
- package/dist/test/workspace-read-file-from-disk.test.js.map +0 -1
- package/dist/test/workspace-read-image.test.d.ts +0 -2
- package/dist/test/workspace-read-image.test.d.ts.map +0 -1
- package/dist/test/workspace-read-image.test.js +0 -597
- package/dist/test/workspace-read-image.test.js.map +0 -1
- package/dist/test/workspace-read-text.test.d.ts +0 -2
- package/dist/test/workspace-read-text.test.d.ts.map +0 -1
- package/dist/test/workspace-read-text.test.js +0 -101
- package/dist/test/workspace-read-text.test.js.map +0 -1
- package/dist/test/workspace-restore-order.test.d.ts +0 -16
- package/dist/test/workspace-restore-order.test.d.ts.map +0 -1
- package/dist/test/workspace-restore-order.test.js +0 -140
- package/dist/test/workspace-restore-order.test.js.map +0 -1
- package/dist/test/workspace-three-way.test.d.ts +0 -12
- package/dist/test/workspace-three-way.test.d.ts.map +0 -1
- package/dist/test/workspace-three-way.test.js +0 -4094
- package/dist/test/workspace-three-way.test.js.map +0 -1
- package/dist/test/workspace-watcher.test.d.ts +0 -2
- package/dist/test/workspace-watcher.test.d.ts.map +0 -1
- package/dist/test/workspace-watcher.test.js +0 -281
- package/dist/test/workspace-watcher.test.js.map +0 -1
- package/dist/test/xml-round-persist.test.d.ts +0 -19
- package/dist/test/xml-round-persist.test.d.ts.map +0 -1
- package/dist/test/xml-round-persist.test.js +0 -235
- package/dist/test/xml-round-persist.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -129,11 +129,15 @@ interface Rendering<E> {
|
|
|
129
129
|
|
|
130
130
|
/** What an assembly did, per subject, for the turn being assembled. */
|
|
131
131
|
export interface AssemblyResult {
|
|
132
|
-
/** Subjects
|
|
132
|
+
/** Subjects this assembly finished with: it waited on their render to
|
|
133
|
+
* completion, or freeze() declined them for this agent. */
|
|
133
134
|
settled: Set<string>;
|
|
134
135
|
/** Of those, the subjects whose render or fallback was delivered as content.
|
|
135
136
|
* A settled subject that is not here gave the turn nothing to read: empty
|
|
136
|
-
* or blank render (§5.2), cancelled, or
|
|
137
|
+
* or blank render (§5.2), cancelled, revoked before the render or at its
|
|
138
|
+
* response, a render-start that could not be made durable (the batch then
|
|
139
|
+
* waits for its recovery wake), or a batch whose audience doesn't include
|
|
140
|
+
* the agent. */
|
|
137
141
|
materialized: Set<string>;
|
|
138
142
|
}
|
|
139
143
|
|
|
@@ -205,7 +209,12 @@ export interface CoalescerHost<E> {
|
|
|
205
209
|
/** Persist one receipt now, before the acceptance is acknowledged. Throws
|
|
206
210
|
* on failure, which fails the acceptance (the producer retries). */
|
|
207
211
|
recordReceipt?(record: CoalescingReceiptRecord): void;
|
|
208
|
-
/**
|
|
212
|
+
/** One call per ADMITTED occurrence (never for a producer retry the receipt
|
|
213
|
+
* deduplicates), after its receipt is recorded. Observation only: a throw
|
|
214
|
+
* is contained here and never fails the acceptance. */
|
|
215
|
+
accepted?(occurrence: CoalescedOccurrence<E>): void;
|
|
216
|
+
/** Make every write so far DURABLE (an fsync; the coalescer requests each
|
|
217
|
+
* commit under its lock, so no two acceptances share one).
|
|
209
218
|
* Awaited before an acceptance is acknowledged and before push/render is
|
|
210
219
|
* issued: a kill after either boundary must find the receipt, the
|
|
211
220
|
* accepted work, and the render-start on disk. Rejects on failure. */
|
|
@@ -245,15 +254,21 @@ function mergeIdentity(prior: CoalescedOccurrence['identity'], next: CoalescedOc
|
|
|
245
254
|
* Validate wire content before it is stored, rendered or converted.
|
|
246
255
|
*
|
|
247
256
|
* Its shape and its visible emptiness, nothing else. An incoming coalesced
|
|
248
|
-
* occurrence reaches context through the
|
|
257
|
+
* occurrence reaches context through the converter an uncoalesced message
|
|
249
258
|
* goes through: a plain occurrence the moment it is admitted (the coalescer
|
|
250
259
|
* only remembers where it landed), a deferred one when its render settles or
|
|
251
260
|
* falls back to it. Its content must be an array of objects. A block the
|
|
252
|
-
*
|
|
261
|
+
* converter can't render (a video, an unknown type, an image with neither
|
|
253
262
|
* uri nor data) becomes a placeholder, as it does uncoalesced, and so does a
|
|
254
|
-
* malformed one, since the
|
|
255
|
-
* type,
|
|
256
|
-
* text block
|
|
263
|
+
* malformed one, since the converter takes any object without throwing: a
|
|
264
|
+
* type, data, mimeType or uri that isn't a string counts as absent, and a
|
|
265
|
+
* text block whose text isn't a string shows as its own placeholder, which
|
|
266
|
+
* counts as no text where MCPL content is admitted: here, on the wire blocks,
|
|
267
|
+
* and at the uncoalesced boundaries, through isVisiblyEmptyConversion. The
|
|
268
|
+
* framework's backstops read converted content with isVisiblyEmptyContent,
|
|
269
|
+
* which would count the placeholder as text, but they see only content one of
|
|
270
|
+
* those checks has passed. The uncoalesced
|
|
271
|
+
* lane doesn't check the array:
|
|
257
272
|
* there a member that isn't an object becomes the untyped placeholder, and a
|
|
258
273
|
* null member or content that isn't an array throws in conversion
|
|
259
274
|
* (agent-framework#297 brings that lane to this rule).
|
|
@@ -265,8 +280,8 @@ function mergeIdentity(prior: CoalescedOccurrence['identity'], next: CoalescedOc
|
|
|
265
280
|
*
|
|
266
281
|
* A render result, which the host delivers in the occurrence's place, gets
|
|
267
282
|
* these checks, as RFC-006 §5.2 gives it every check a pushed payload gets,
|
|
268
|
-
* and one more (`checkBlockShapes`): each block must be one the
|
|
269
|
-
*
|
|
283
|
+
* and one more (`checkBlockShapes`): each block must be one the converter
|
|
284
|
+
* shows as itself or as a reference stub, not as a placeholder. A malformed
|
|
270
285
|
* render falls back to the occurrence's own content; a pushed payload has
|
|
271
286
|
* nothing to fall back to, and gets its placeholders.
|
|
272
287
|
*
|
|
@@ -289,12 +304,12 @@ export function validateCoalescedContent(
|
|
|
289
304
|
}
|
|
290
305
|
|
|
291
306
|
/**
|
|
292
|
-
* Whether the
|
|
293
|
-
*
|
|
307
|
+
* Whether the converter (`convertBlock` in convert-block.ts, which every lane
|
|
308
|
+
* uses) shows a block as itself, its text or its image or
|
|
294
309
|
* audio source, or as a reference stub, and not as a placeholder: an
|
|
295
|
-
* unrecognized block, a no-data or no-media-type one,
|
|
296
|
-
*
|
|
297
|
-
*
|
|
310
|
+
* unrecognized block, a no-data or no-media-type one, withheld inline data,
|
|
311
|
+
* or a text block whose text isn't a string. This follows its branches in
|
|
312
|
+
* their order.
|
|
298
313
|
*/
|
|
299
314
|
function showsAsItself(b: Record<string, unknown>): boolean {
|
|
300
315
|
if (b.type === 'text') return typeof b.text === 'string';
|
|
@@ -485,6 +500,11 @@ export class PushCoalescer<E = unknown> {
|
|
|
485
500
|
throw new CoalesceError('eventId', 'host could not persist the acceptance; retry', -32000);
|
|
486
501
|
}
|
|
487
502
|
this.receipts.set(receiptKey, entry);
|
|
503
|
+
try {
|
|
504
|
+
this.host.accepted?.(occurrence);
|
|
505
|
+
} catch (error) {
|
|
506
|
+
this.host.audit({ kind: 'accepted-observer-failed', subject, eventId: occurrence.eventId, error: String(error) });
|
|
507
|
+
}
|
|
488
508
|
this.prune();
|
|
489
509
|
this.persist();
|
|
490
510
|
// Written but not yet durable: the in-memory receipt deduplicates a retry
|
|
@@ -667,7 +687,8 @@ export class PushCoalescer<E = unknown> {
|
|
|
667
687
|
// be flattened by `then`, holding the lock until the render settled —
|
|
668
688
|
// and the settlement itself needs the lock.
|
|
669
689
|
const started = await this.locked(() => this.freeze(subject, agentName));
|
|
670
|
-
if (started)
|
|
690
|
+
if (started === 'declined') result.settled.add(subject);
|
|
691
|
+
else if (started) {
|
|
671
692
|
work.push(started.done.then(() => {
|
|
672
693
|
result.settled.add(subject);
|
|
673
694
|
if (started.rendering.materialized) result.materialized.add(subject);
|
|
@@ -683,27 +704,42 @@ export class PushCoalescer<E = unknown> {
|
|
|
683
704
|
* Under the lock: decide whether `subject`'s batch renders for `agentName`,
|
|
684
705
|
* freeze it, make the render-start durable, re-check authority, and start
|
|
685
706
|
* the RPC. Returns the render's completion (shared by every assembly that
|
|
686
|
-
* waits on this batch, vector 25)
|
|
707
|
+
* waits on this batch, vector 25). Returns 'declined' when the turn being
|
|
708
|
+
* assembled gets nothing of the batch: the agent isn't in its audience,
|
|
709
|
+
* whether or not another assembly is rendering it (the batch is left as it
|
|
710
|
+
* is); authority was revoked before the render could start (the batch is
|
|
711
|
+
* dropped); or the render-start could not be made durable (the batch is
|
|
712
|
+
* kept for its recovery wake). Returns undefined when the batch was not
|
|
713
|
+
* this assembly's to decide on: there is none, the subject moved on during
|
|
714
|
+
* the audience lookup, or the host is stopping.
|
|
687
715
|
*/
|
|
688
|
-
private async freeze(subject: string, agentName: string): Promise<{ done: Promise<void>; rendering: Rendering<E> } | undefined> {
|
|
716
|
+
private async freeze(subject: string, agentName: string): Promise<{ done: Promise<void>; rendering: Rendering<E> } | 'declined' | undefined> {
|
|
689
717
|
const state = this.subjects.get(subject);
|
|
690
718
|
if (!state || this.suspended) return undefined;
|
|
691
719
|
if (state.rendering) {
|
|
692
|
-
// Another assembly froze this batch; share its outcome (vector 25)
|
|
720
|
+
// Another assembly froze this batch; share its outcome (vector 25),
|
|
721
|
+
// unless this agent isn't in its audience, as below.
|
|
693
722
|
const rendering = state.rendering;
|
|
694
|
-
|
|
723
|
+
const audience = await this.host.audience(rendering.batch.latest);
|
|
724
|
+
if (state.rendering !== rendering) return undefined;
|
|
725
|
+
if (!audience.includes(agentName)) return 'declined';
|
|
726
|
+
return { done: rendering.done, rendering };
|
|
695
727
|
}
|
|
696
728
|
const batch = state.batch;
|
|
697
729
|
if (!batch) return undefined;
|
|
698
730
|
// The audience lookup may spawn a fork. Under the lock no admission can
|
|
699
731
|
// move the subject on meanwhile; the identity check guards the host.
|
|
700
732
|
const audience = await this.host.audience(batch.latest);
|
|
701
|
-
if (
|
|
733
|
+
if (state.batch !== batch || state.rendering) return undefined;
|
|
734
|
+
// Not this agent's batch, or no longer: an agent woken for it can have left
|
|
735
|
+
// its audience since. This turn has nothing of it to show. The batch stays
|
|
736
|
+
// pending; nothing here wakes its current audience.
|
|
737
|
+
if (!audience.includes(agentName)) return 'declined';
|
|
702
738
|
state.batch = undefined;
|
|
703
739
|
this.host.cancelWake(subject);
|
|
704
740
|
if (!this.host.authorized(batch.latest)) {
|
|
705
741
|
this.host.audit({ kind: 'revoked', subject, eventId: batch.latest.eventId });
|
|
706
|
-
return
|
|
742
|
+
return 'declined';
|
|
707
743
|
}
|
|
708
744
|
const rendering: Rendering<E> = { batch, cancelled: false, done: Promise.resolve() };
|
|
709
745
|
state.rendering = rendering;
|
|
@@ -721,7 +757,7 @@ export class PushCoalescer<E = unknown> {
|
|
|
721
757
|
// unrelated traffic happens by. Re-wake with backoff, so a persistent
|
|
722
758
|
// storage outage does not become a tight loop of model turns.
|
|
723
759
|
this.scheduleRecovery(subject, state);
|
|
724
|
-
return
|
|
760
|
+
return 'declined';
|
|
725
761
|
}
|
|
726
762
|
this.clearRecovery(subject);
|
|
727
763
|
if (this.suspended) { state.rendering = undefined; state.batch = batch; return undefined; }
|
|
@@ -731,7 +767,7 @@ export class PushCoalescer<E = unknown> {
|
|
|
731
767
|
if (!this.host.authorized(batch.latest)) {
|
|
732
768
|
this.host.audit({ kind: 'revoked', subject, eventId: batch.latest.eventId });
|
|
733
769
|
state.rendering = undefined;
|
|
734
|
-
return
|
|
770
|
+
return 'declined';
|
|
735
771
|
}
|
|
736
772
|
rendering.done = this.render(subject, state, rendering, agentName);
|
|
737
773
|
return { done: rendering.done, rendering };
|
package/src/mcpl/push-handler.ts
CHANGED
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { ContentBlock } from '@animalabs/membrane';
|
|
11
|
-
import {
|
|
11
|
+
import { convertBlock } from './convert-block.js';
|
|
12
12
|
|
|
13
13
|
import type {
|
|
14
|
-
McplContentBlock,
|
|
15
14
|
PushEventParams,
|
|
16
15
|
PushEventResult,
|
|
17
16
|
} from './types.js';
|
|
@@ -19,7 +18,8 @@ import type { FeatureSetManager } from './feature-set-manager.js';
|
|
|
19
18
|
import { McplFeatureSetError } from './feature-set-manager.js';
|
|
20
19
|
import { expandCoreTags } from './tags.js';
|
|
21
20
|
import { coalesceRejectionReason, EmptyContentError, validateCoalescedContent } from './push-coalescer.js';
|
|
22
|
-
import {
|
|
21
|
+
import type { InboundSource } from './inbound-source.js';
|
|
22
|
+
import { isSilentHeartbeatMarker, isVisiblyEmptyConversion } from './visible-content.js';
|
|
23
23
|
import { logDetail, logValue } from './log-value.js';
|
|
24
24
|
import { RefusalLines } from './refusal-lines.js';
|
|
25
25
|
|
|
@@ -50,91 +50,11 @@ export interface McplPushEvent {
|
|
|
50
50
|
coalescingSubject?: string;
|
|
51
51
|
/** RFC-006 assembly: materialized for this agent's turn (store directly). */
|
|
52
52
|
assemblingFor?: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Convert a single MCPL wire-format content block to a membrane ContentBlock,
|
|
61
|
-
* as the channel lane's convertBlock (channel-registry.ts) does, apart from
|
|
62
|
-
* the provenance its reference stubs name. Hook context injections convert
|
|
63
|
-
* through hook-orchestrator.ts's own.
|
|
64
|
-
*/
|
|
65
|
-
export function convertBlock(block: McplContentBlock): ContentBlock {
|
|
66
|
-
switch (block.type) {
|
|
67
|
-
case 'text':
|
|
68
|
-
// Text that isn't a string is no text, as the request sanitizer and
|
|
69
|
-
// the visible-content check already read it.
|
|
70
|
-
return { type: 'text', text: typeof block.text === 'string' ? block.text : '' };
|
|
71
|
-
|
|
72
|
-
case 'image':
|
|
73
|
-
if (isInlineContradiction(block)) {
|
|
74
|
-
// RFC-005 vector 2: inline data claiming bulk disposition — fail
|
|
75
|
-
// closed, withhold the data (checked BEFORE the data branch).
|
|
76
|
-
return { type: 'text', text: INLINE_WITHHELD_TEXT };
|
|
77
|
-
}
|
|
78
|
-
if (isFilledString(block.uri) && block.disposition) {
|
|
79
|
-
// RFC-005 uri-form media with a disposition claim: stub, do not
|
|
80
|
-
// hand the URI to the provider or inline it.
|
|
81
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
82
|
-
}
|
|
83
|
-
if (isFilledString(block.data) && isFilledString(block.mimeType)) {
|
|
84
|
-
return {
|
|
85
|
-
type: 'image',
|
|
86
|
-
source: { type: 'base64', data: block.data, mediaType: block.mimeType },
|
|
87
|
-
} as ContentBlock;
|
|
88
|
-
}
|
|
89
|
-
if (isFilledString(block.uri)) {
|
|
90
|
-
return {
|
|
91
|
-
type: 'image',
|
|
92
|
-
source: { type: 'url', url: block.uri },
|
|
93
|
-
} as ContentBlock;
|
|
94
|
-
}
|
|
95
|
-
return { type: 'text', text: isFilledString(block.data) ? '[Image: no media type]' : '[Image: no data]' };
|
|
96
|
-
|
|
97
|
-
case 'audio':
|
|
98
|
-
if (isInlineContradiction(block)) {
|
|
99
|
-
// RFC-005 vector 2: inline data claiming bulk disposition — fail
|
|
100
|
-
// closed, withhold the data (checked BEFORE the data branch).
|
|
101
|
-
return { type: 'text', text: INLINE_WITHHELD_TEXT };
|
|
102
|
-
}
|
|
103
|
-
if (isFilledString(block.uri) && block.disposition) {
|
|
104
|
-
// RFC-005 uri-form media with a disposition claim: stub, do not
|
|
105
|
-
// hand the URI to the provider or inline it.
|
|
106
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
107
|
-
}
|
|
108
|
-
if (isFilledString(block.data) && isFilledString(block.mimeType)) {
|
|
109
|
-
return {
|
|
110
|
-
type: 'audio',
|
|
111
|
-
source: { type: 'base64', data: block.data, mediaType: block.mimeType },
|
|
112
|
-
} as ContentBlock;
|
|
113
|
-
}
|
|
114
|
-
return { type: 'text', text: isFilledString(block.data) ? '[Audio: no media type]' : '[Audio: no data]' };
|
|
115
|
-
|
|
116
|
-
case 'resource':
|
|
117
|
-
// RFC-005: reference blocks become bounded stubs — never raw URIs
|
|
118
|
-
// (a signed URL is a bearer credential that looks like a location).
|
|
119
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
120
|
-
|
|
121
|
-
default: {
|
|
122
|
-
// Unknown wire block types previously fell off the exhaustive switch
|
|
123
|
-
// and propagated `undefined` into ContentBlock[]. Fail visibly. A type
|
|
124
|
-
// that isn't a string is no type, and is never converted to one: an
|
|
125
|
-
// object can throw when it is.
|
|
126
|
-
const type: unknown = (block as { type?: unknown }).type;
|
|
127
|
-
return { type: 'text', text: `[unrecognized content block: ${typeof type === 'string' ? type : 'untyped'}]` };
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** A string with something in it: the only data, mimeType or uri a block's
|
|
133
|
-
* source is built from, and the only uri that makes it a reference. Anything
|
|
134
|
-
* else a sender puts there leaves the block without it, so conversion never
|
|
135
|
-
* throws and never copies a non-string. */
|
|
136
|
-
function isFilledString(value: unknown): value is string {
|
|
137
|
-
return typeof value === 'string' && value !== '';
|
|
53
|
+
/** Host acceptance time (epoch ms), stamped where the push is admitted. */
|
|
54
|
+
acceptedAt?: number;
|
|
55
|
+
/** Framework-owned source envelope, frozen at a coalesced occurrence's
|
|
56
|
+
* acceptance so its later delivery cannot restamp it (inbound-source.ts). */
|
|
57
|
+
inboundSource?: InboundSource;
|
|
138
58
|
}
|
|
139
59
|
|
|
140
60
|
// ============================================================================
|
|
@@ -199,6 +119,10 @@ export class PushHandler {
|
|
|
199
119
|
emitTraceFn: (event: { type: string; [key: string]: unknown }) => void,
|
|
200
120
|
shouldTriggerInference?: (content: string, metadata: Record<string, unknown>) => boolean,
|
|
201
121
|
private readonly handleCoalesced?: (serverId: string, params: PushEventParams, event: McplPushEvent) => Promise<PushEventResult>,
|
|
122
|
+
/** An ordinary (uncoalesced) push was just admitted, before it is queued
|
|
123
|
+
* or acknowledged: return its source envelope, frozen now
|
|
124
|
+
* (mcpl/inbound-source.ts). Coalesced work is stamped by its own path. */
|
|
125
|
+
private readonly acceptInbound?: (event: McplPushEvent) => InboundSource | undefined,
|
|
202
126
|
) {
|
|
203
127
|
this.featureSetManager = featureSetManager;
|
|
204
128
|
this.pushEventFn = pushEventFn;
|
|
@@ -275,8 +199,8 @@ export class PushHandler {
|
|
|
275
199
|
|
|
276
200
|
// 2. Convert content blocks, and refuse content with nothing visible in
|
|
277
201
|
// it — before dedup, so a refused eventId is not burned for a retry.
|
|
278
|
-
const content: ContentBlock[] = params.payload.content.map(convertBlock);
|
|
279
|
-
if (!emptyAllowed &&
|
|
202
|
+
const content: ContentBlock[] = params.payload.content.map((block) => convertBlock(block, 'attachment on push event', serverId));
|
|
203
|
+
if (!emptyAllowed && isVisiblyEmptyConversion(params.payload.content, content)) {
|
|
280
204
|
const err = new EmptyContentError();
|
|
281
205
|
this.traceEmptyRejection(serverId, params);
|
|
282
206
|
if (responder?.respondError) responder.respondError(err.code, err.message, { field: err.field });
|
|
@@ -326,6 +250,7 @@ export class PushHandler {
|
|
|
326
250
|
timestamp: params.timestamp,
|
|
327
251
|
inferenceId,
|
|
328
252
|
triggerInference,
|
|
253
|
+
acceptedAt: Date.now(),
|
|
329
254
|
};
|
|
330
255
|
if (coalesced) {
|
|
331
256
|
// RFC-006: the coalescer decides whether this occurrence replaces an
|
|
@@ -344,6 +269,11 @@ export class PushHandler {
|
|
|
344
269
|
}
|
|
345
270
|
return;
|
|
346
271
|
}
|
|
272
|
+
// The source envelope is frozen at admission, before queueing or the
|
|
273
|
+
// acknowledgement: nothing that changes while the push waits in the
|
|
274
|
+
// queue can rewrite where it came from.
|
|
275
|
+
const inboundSource = this.acceptInbound?.(pushEvent);
|
|
276
|
+
if (inboundSource) pushEvent.inboundSource = inboundSource;
|
|
347
277
|
this.pushEventFn(pushEvent);
|
|
348
278
|
|
|
349
279
|
// 7. Emit trace
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* dereferences a reference, and it fails closed on every axis the RFC names:
|
|
4
4
|
*
|
|
5
5
|
* - **origin binding (§6.1, revision 3):** authenticated fetches go only to
|
|
6
|
-
* the origin
|
|
6
|
+
* the origin a server's connection was dialed to, for a reference that
|
|
7
|
+
* server delivered, with that server's credential. This v1 does
|
|
7
8
|
* not fetch third-party origins at all (deferred with declared reference
|
|
8
9
|
* origins); the connection credential is applied as an Authorization
|
|
9
10
|
* header by this code alone and never surfaces to model, script, or URI.
|
|
@@ -29,15 +30,22 @@
|
|
|
29
30
|
*/
|
|
30
31
|
import { createHash } from 'node:crypto';
|
|
31
32
|
import type { ReferenceRecord } from './references.js';
|
|
32
|
-
import { EXPIRY_REASON, isReferenceExpired, referenceExpiry, REFERENCE_LIMITS, sanitizeLabel } from './references.js';
|
|
33
|
+
import { EXPIRY_REASON, isReferenceExpired, referenceExpiry, REFERENCE_LIMITS, sanitizeLabel, UNBOUND_REASON } from './references.js';
|
|
33
34
|
|
|
34
35
|
/** Per-fetch hard ceiling on actual bytes (overridable per server / call). */
|
|
35
36
|
export const DEFAULT_FETCH_MAX_BYTES = 256 * 1024 * 1024;
|
|
36
37
|
/** Eager (autofetch) threshold: at most what could have shipped inline. */
|
|
37
38
|
export const DEFAULT_EAGER_FETCH_MAX_BYTES = 256 * 1024;
|
|
38
|
-
/** Cumulative per-server budget for this process
|
|
39
|
+
/** Cumulative per-server budget for this process: every byte a fetch dialed
|
|
40
|
+
* through a server reads counts against that server's, whether or not it's
|
|
41
|
+
* kept. */
|
|
39
42
|
export const DEFAULT_MAX_TOTAL_BYTES = 1024 * 1024 * 1024;
|
|
40
43
|
const FETCH_TIMEOUT_MS = 60_000;
|
|
44
|
+
/** What a refusal by the per-server budget adds. The total lives as long as
|
|
45
|
+
* this fetcher, one per framework, so only someone running the host renews
|
|
46
|
+
* it, by starting a new one, or raises the budget (the server's config's
|
|
47
|
+
* autofetch.maxTotalBytes, which each fetch reads afresh). */
|
|
48
|
+
const BUDGET_LASTS = "the budget doesn't renew on its own, so calling again won't change that unless whoever runs this host raises or renews it";
|
|
41
49
|
const EAGER_FETCH_TIMEOUT_MS = 10_000;
|
|
42
50
|
|
|
43
51
|
export interface ResolvedServerBinding {
|
|
@@ -102,6 +110,10 @@ export function normalizedOrigin(url: string): string | null {
|
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
export class ReferenceFetcher {
|
|
113
|
+
/** Bytes read through each server in this process, charged to the server a
|
|
114
|
+
* fetch dials through as each chunk is read, kept or not. Concurrent
|
|
115
|
+
* fetches through one server share the total, so each checks what the
|
|
116
|
+
* others have taken. */
|
|
105
117
|
private totals = new Map<string, number>();
|
|
106
118
|
private inFlight = new Map<string, Promise<FetchOutcome>>();
|
|
107
119
|
|
|
@@ -113,16 +125,34 @@ export class ReferenceFetcher {
|
|
|
113
125
|
) {}
|
|
114
126
|
|
|
115
127
|
/** Would the eager (autofetch) default fetch this record? Not one the
|
|
116
|
-
* fetcher refuses as expired, which would only take an eager slot.
|
|
128
|
+
* fetcher refuses as expired, which would only take an eager slot. It
|
|
129
|
+
* takes the eager limit of the server the fetch would dial. */
|
|
117
130
|
isEagerEligible(record: ReferenceRecord): boolean {
|
|
118
131
|
if (record.fetchedPath) return false;
|
|
119
132
|
if (isReferenceExpired(record.testimony)) return false;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
133
|
+
const server = this.serverFor(record);
|
|
134
|
+
if ('refusal' in server) return false;
|
|
135
|
+
const cap = server.binding.autofetch?.maxBytes ?? DEFAULT_EAGER_FETCH_MAX_BYTES;
|
|
136
|
+
return record.testimony.sizeBytes !== undefined && record.testimony.sizeBytes <= cap;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** The server to dial for a record (§6.2): the first, in the order they
|
|
140
|
+
* delivered it, whose address is on the uri's origin. When none is, the
|
|
141
|
+
* first server's refusal (unknown to this host, or the origin check's),
|
|
142
|
+
* and for a record no server delivered, that it's unbound. */
|
|
143
|
+
private serverFor(record: ReferenceRecord): { serverId: string; binding: ResolvedServerBinding } | { refusal: string } {
|
|
144
|
+
let refusal: string | undefined;
|
|
145
|
+
for (const serverId of record.serverIds) {
|
|
146
|
+
const binding = this.resolveServer(serverId);
|
|
147
|
+
if (!binding) {
|
|
148
|
+
refusal ??= `unknown server: ${serverId}`;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const offOrigin = this.originCheck(record, binding);
|
|
152
|
+
if (offOrigin === null) return { serverId, binding };
|
|
153
|
+
refusal ??= offOrigin;
|
|
154
|
+
}
|
|
155
|
+
return { refusal: refusal ?? `reference ${UNBOUND_REASON}` };
|
|
126
156
|
}
|
|
127
157
|
|
|
128
158
|
/** §6.1/§7.1 policy check; returns a refusal reason or null. */
|
|
@@ -158,24 +188,33 @@ export class ReferenceFetcher {
|
|
|
158
188
|
|
|
159
189
|
private async doFetch(record: ReferenceRecord, opts?: { maxBytes?: number; timeoutMs?: number }): Promise<FetchOutcome> {
|
|
160
190
|
const t = record.testimony;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const refusal = this.originCheck(record, binding);
|
|
166
|
-
if (refusal) return { ok: false, error: refusal };
|
|
191
|
+
const server = this.serverFor(record);
|
|
192
|
+
if ('refusal' in server) return { ok: false, error: server.refusal };
|
|
193
|
+
const { serverId, binding } = server;
|
|
167
194
|
const expiry = referenceExpiry(t);
|
|
168
195
|
if (expiry) return { ok: false, error: `reference ${EXPIRY_REASON[expiry]}` };
|
|
169
196
|
|
|
170
197
|
const ceiling = opts?.maxBytes ?? DEFAULT_FETCH_MAX_BYTES;
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
198
|
+
// The budget is checked before the ceiling, here and while reading: a
|
|
199
|
+
// larger max_bytes lifts the ceiling, and nothing the caller does lifts
|
|
200
|
+
// the budget, so a fetch past both is told about the budget.
|
|
175
201
|
const budget = binding.autofetch?.maxTotalBytes ?? DEFAULT_MAX_TOTAL_BYTES;
|
|
176
|
-
const used = this.totals.get(
|
|
202
|
+
const used = this.totals.get(serverId) ?? 0;
|
|
177
203
|
if (used >= budget) {
|
|
178
|
-
return { ok: false, error: `per-server fetch budget exhausted (${used}/${budget} bytes)` };
|
|
204
|
+
return { ok: false, error: `per-server fetch budget exhausted (${used}/${budget} bytes); ${BUDGET_LASTS}` };
|
|
205
|
+
}
|
|
206
|
+
// Vector 4: a claim already over the ceiling refuses without dialing. One
|
|
207
|
+
// that's also over what's left of the budget is told about the budget,
|
|
208
|
+
// which no max_bytes lifts. A claim over what's left but within the
|
|
209
|
+
// ceiling still dials, and the budget stops it at its first chunk past.
|
|
210
|
+
if (t.sizeBytes !== undefined && t.sizeBytes > ceiling) {
|
|
211
|
+
if (t.sizeBytes > budget - used) {
|
|
212
|
+
return {
|
|
213
|
+
ok: false,
|
|
214
|
+
error: `claimed ${t.sizeBytes} bytes exceeds what's left of the per-server fetch budget (${used}/${budget} bytes); ${BUDGET_LASTS}`,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
return { ok: false, error: `claimed ${t.sizeBytes} bytes exceeds fetch ceiling ${ceiling}` };
|
|
179
218
|
}
|
|
180
219
|
|
|
181
220
|
const controller = new AbortController();
|
|
@@ -198,10 +237,17 @@ export class ReferenceFetcher {
|
|
|
198
237
|
const { done, value } = await reader.read();
|
|
199
238
|
if (done) break;
|
|
200
239
|
received += value.byteLength;
|
|
201
|
-
|
|
240
|
+
// What's read is charged at once, kept or not: other fetches from
|
|
241
|
+
// this server read the same total, so none spends what another took.
|
|
242
|
+
const total = (this.totals.get(serverId) ?? 0) + value.byteLength;
|
|
243
|
+
this.totals.set(serverId, total);
|
|
244
|
+
if (total > budget) {
|
|
245
|
+
controller.abort();
|
|
246
|
+
return { ok: false, error: `aborted: per-server fetch budget exhausted (${total}/${budget} bytes); ${BUDGET_LASTS}` };
|
|
247
|
+
}
|
|
248
|
+
if (received > ceiling) {
|
|
202
249
|
controller.abort();
|
|
203
|
-
|
|
204
|
-
return { ok: false, error: `aborted: actual bytes exceeded ${which} at ${received}` };
|
|
250
|
+
return { ok: false, error: `aborted: actual bytes exceeded ceiling at ${received}` };
|
|
205
251
|
}
|
|
206
252
|
const buf = Buffer.from(value);
|
|
207
253
|
hash.update(buf);
|
|
@@ -232,7 +278,6 @@ export class ReferenceFetcher {
|
|
|
232
278
|
const path = await this.saveFile(`${record.refId}.${ext}`, data, observedMime);
|
|
233
279
|
if (path === null) return { ok: false, error: 'no writable workspace mount to store the payload' };
|
|
234
280
|
|
|
235
|
-
this.totals.set(record.serverId, used + data.length);
|
|
236
281
|
record.fetchedPath = path;
|
|
237
282
|
record.verifiedBytes = data.length;
|
|
238
283
|
record.verifiedMimeType = observedMime;
|