@animalabs/agent-framework 0.22.1 → 0.22.3
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 +4 -2
- package/dist/src/agent.d.ts +266 -28
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +539 -104
- package/dist/src/agent.js.map +1 -1
- package/dist/src/api/mcp-server-core.d.ts +41 -0
- package/dist/src/api/mcp-server-core.d.ts.map +1 -0
- package/dist/src/api/mcp-server-core.js +593 -0
- package/dist/src/api/mcp-server-core.js.map +1 -0
- package/dist/src/api/mcp-server.d.ts +2 -36
- package/dist/src/api/mcp-server.d.ts.map +1 -1
- package/dist/src/api/mcp-server.js +15 -595
- package/dist/src/api/mcp-server.js.map +1 -1
- package/dist/src/api/server.d.ts +9 -1
- package/dist/src/api/server.d.ts.map +1 -1
- package/dist/src/api/server.js +55 -27
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/api/types.d.ts +10 -2
- 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 +1212 -192
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +6686 -1835
- 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/gate/gate-script.d.ts.map +1 -1
- package/dist/src/gate/gate-script.js.map +1 -1
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcpl/capability-grant.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +170 -13
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +499 -258
- 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/feature-set-manager.d.ts.map +1 -1
- package/dist/src/mcpl/feature-set-manager.js +4 -3
- package/dist/src/mcpl/feature-set-manager.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/log-value.d.ts +54 -0
- package/dist/src/mcpl/log-value.d.ts.map +1 -0
- package/dist/src/mcpl/log-value.js +109 -0
- package/dist/src/mcpl/log-value.js.map +1 -0
- package/dist/src/mcpl/prose-stream-router.d.ts +6 -6
- package/dist/src/mcpl/prose-stream-router.d.ts.map +1 -1
- package/dist/src/mcpl/prose-stream-router.js +4 -4
- package/dist/src/mcpl/prose-stream-router.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +64 -7
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +121 -24
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.d.ts +38 -8
- package/dist/src/mcpl/push-handler.d.ts.map +1 -1
- package/dist/src/mcpl/push-handler.js +77 -78
- 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 +49 -14
- 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/refusal-lines.d.ts +37 -0
- package/dist/src/mcpl/refusal-lines.d.ts.map +1 -0
- package/dist/src/mcpl/refusal-lines.js +61 -0
- package/dist/src/mcpl/refusal-lines.js.map +1 -0
- package/dist/src/mcpl/scope-manager.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +107 -12
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +470 -139
- 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/tool-classes.d.ts +1 -1
- package/dist/src/mcpl/tool-classes.d.ts.map +1 -1
- package/dist/src/mcpl/tool-classes.js +3 -2
- package/dist/src/mcpl/tool-classes.js.map +1 -1
- package/dist/src/mcpl/tool-lifecycle.d.ts.map +1 -1
- package/dist/src/mcpl/tool-lifecycle.js.map +1 -1
- package/dist/src/mcpl/transport.d.ts +74 -7
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +209 -22
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +43 -28
- 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.d.ts.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 +383 -145
- 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/branch-intent.d.ts.map +1 -1
- package/dist/src/modules/workspace/branch-intent.js.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.d.ts +54 -6
- package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +93 -27
- 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 +127 -27
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +821 -248
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +117 -15
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +436 -51
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/reconcile.d.ts +75 -8
- package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
- package/dist/src/modules/workspace/reconcile.js +576 -68
- package/dist/src/modules/workspace/reconcile.js.map +1 -1
- package/dist/src/modules/workspace/types.d.ts +42 -3
- 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/operator-log.d.ts.map +1 -1
- package/dist/src/operator-log.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/provider-waits.d.ts.map +1 -1
- package/dist/src/provider-waits.js.map +1 -1
- package/dist/src/queue.d.ts.map +1 -1
- package/dist/src/record-journal.d.ts.map +1 -1
- package/dist/src/record-journal.js.map +1 -1
- package/dist/src/recovery/discord-awareness-outbox.d.ts.map +1 -1
- package/dist/src/recovery/discord-awareness-outbox.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 +32 -25
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/recovery/recover-cli.js.map +1 -1
- package/dist/src/runtime/liveness-watchdog.d.ts.map +1 -1
- package/dist/src/runtime/liveness-watchdog.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/shutdown.d.ts.map +1 -1
- package/dist/src/shutdown.js.map +1 -1
- package/dist/src/stored-removal.d.ts +73 -0
- package/dist/src/stored-removal.d.ts.map +1 -0
- package/dist/src/stored-removal.js +100 -0
- package/dist/src/stored-removal.js.map +1 -0
- 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/tune-out/tools.d.ts +1 -1
- package/dist/src/tune-out/tools.d.ts.map +1 -1
- package/dist/src/types/agent.d.ts +59 -11
- 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 +31 -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 +30 -7
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +151 -11
- 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 +10 -9
- package/src/agent.ts +572 -105
- package/src/api/mcp-server-core.ts +681 -0
- package/src/api/mcp-server.ts +16 -685
- package/src/api/server.ts +55 -30
- package/src/api/types.ts +10 -2
- 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 +7158 -1936
- package/src/gate/event-gate.ts +28 -3
- package/src/index.ts +12 -3
- package/src/mcpl/channel-registry.ts +615 -289
- 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/feature-set-manager.ts +4 -3
- 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/log-value.ts +116 -0
- package/src/mcpl/prose-stream-router.ts +6 -6
- package/src/mcpl/push-coalescer.ts +124 -24
- package/src/mcpl/push-handler.ts +86 -84
- package/src/mcpl/reference-fetcher.ts +71 -26
- package/src/mcpl/references.ts +81 -22
- package/src/mcpl/refusal-lines.ts +59 -0
- package/src/mcpl/server-connection.ts +496 -142
- package/src/mcpl/server-registry.ts +15 -4
- package/src/mcpl/skip-reply-wake.ts +73 -0
- package/src/mcpl/tool-classes.ts +3 -2
- package/src/mcpl/transport.ts +219 -26
- package/src/mcpl/types.ts +18 -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 +395 -160
- 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 +125 -21
- package/src/modules/workspace/effects.ts +279 -35
- package/src/modules/workspace/index.ts +841 -261
- package/src/modules/workspace/observe.ts +456 -56
- package/src/modules/workspace/reconcile.ts +688 -76
- package/src/modules/workspace/types.ts +41 -2
- 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 +36 -29
- package/src/safe-slice.ts +9 -1
- package/src/stored-removal.ts +126 -0
- 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 +59 -13
- package/src/types/events.ts +17 -0
- package/src/types/framework.ts +31 -5
- package/src/types/inference-log.ts +1 -1
- package/src/types/module.ts +31 -7
- package/src/types/trace.ts +158 -12
- 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 -462
- 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 -387
- 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 -267
- 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/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 -1394
- 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 -72
- package/dist/test/helpers/coalescing-fixture.d.ts.map +0 -1
- package/dist/test/helpers/coalescing-fixture.js +0 -146
- 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/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 -863
- 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 -309
- 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 -1201
- 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 -265
- package/dist/test/maintenance-timer.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-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 -236
- 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-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-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-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 -258
- 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 -226
- 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 -398
- 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 -197
- package/dist/test/overbudget-drain-breaker.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 -14
- package/dist/test/physical-window-restart.test.d.ts.map +0 -1
- package/dist/test/physical-window-restart.test.js +0 -222
- 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 -706
- 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 -2196
- 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 -224
- 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 -108
- 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-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/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-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 -672
- 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 -3607
- 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 -329
- 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/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 -3194
- 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
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* bookkeeping and is unit-tested without a framework.
|
|
19
19
|
*/
|
|
20
20
|
import type { McplContentBlock, PushEventResult } from './types.js';
|
|
21
|
+
import { classifyBlock, isInlineContradiction } from './references.js';
|
|
21
22
|
import { isVisiblyEmptyContent } from './visible-content.js';
|
|
22
23
|
|
|
23
24
|
export const PUSH_COALESCING_SUPPORT = {
|
|
@@ -37,6 +38,18 @@ export class CoalesceError extends Error {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
/**
|
|
42
|
+
* How the host names a coalesce rejection, from the code the wire answered
|
|
43
|
+
* with. `coalesce-failed` is the host's own failure: -32000 (coalescing
|
|
44
|
+
* unavailable, the host stopping, or an acceptance it couldn't make durable)
|
|
45
|
+
* and -32603 (an internal error). `coalesce-invalid` is every other answer,
|
|
46
|
+
* the sender's: -32602 for a malformed item, -32017 or -32023 for a channel
|
|
47
|
+
* that isn't permitted or isn't registered.
|
|
48
|
+
*/
|
|
49
|
+
export function coalesceRejectionReason(answered: number): 'coalesce-failed' | 'coalesce-invalid' {
|
|
50
|
+
return answered === -32000 || answered === -32603 ? 'coalesce-failed' : 'coalesce-invalid';
|
|
51
|
+
}
|
|
52
|
+
|
|
40
53
|
/** Content with nothing model-visible (see visible-content.ts): -32602. */
|
|
41
54
|
export class EmptyContentError extends CoalesceError {
|
|
42
55
|
readonly reason = 'empty-content';
|
|
@@ -116,11 +129,15 @@ interface Rendering<E> {
|
|
|
116
129
|
|
|
117
130
|
/** What an assembly did, per subject, for the turn being assembled. */
|
|
118
131
|
export interface AssemblyResult {
|
|
119
|
-
/** Subjects
|
|
132
|
+
/** Subjects this assembly finished with: it waited on their render to
|
|
133
|
+
* completion, or freeze() declined them for this agent. */
|
|
120
134
|
settled: Set<string>;
|
|
121
135
|
/** Of those, the subjects whose render or fallback was delivered as content.
|
|
122
136
|
* A settled subject that is not here gave the turn nothing to read: empty
|
|
123
|
-
* 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. */
|
|
124
141
|
materialized: Set<string>;
|
|
125
142
|
}
|
|
126
143
|
|
|
@@ -192,7 +209,12 @@ export interface CoalescerHost<E> {
|
|
|
192
209
|
/** Persist one receipt now, before the acceptance is acknowledged. Throws
|
|
193
210
|
* on failure, which fails the acceptance (the producer retries). */
|
|
194
211
|
recordReceipt?(record: CoalescingReceiptRecord): void;
|
|
195
|
-
/**
|
|
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).
|
|
196
218
|
* Awaited before an acceptance is acknowledged and before push/render is
|
|
197
219
|
* issued: a kill after either boundary must find the receipt, the
|
|
198
220
|
* accepted work, and the render-start on disk. Rejects on failure. */
|
|
@@ -212,7 +234,6 @@ export interface CoalescerOptions {
|
|
|
212
234
|
recoveryBackoffMs?: number;
|
|
213
235
|
maxSubjects?: number;
|
|
214
236
|
maxNotices?: number;
|
|
215
|
-
maxContentBytes?: number;
|
|
216
237
|
maxDataBytes?: number;
|
|
217
238
|
}
|
|
218
239
|
|
|
@@ -232,6 +253,38 @@ function mergeIdentity(prior: CoalescedOccurrence['identity'], next: CoalescedOc
|
|
|
232
253
|
/**
|
|
233
254
|
* Validate wire content before it is stored, rendered or converted.
|
|
234
255
|
*
|
|
256
|
+
* Its shape and its visible emptiness, nothing else. An incoming coalesced
|
|
257
|
+
* occurrence reaches context through the converter an uncoalesced message
|
|
258
|
+
* goes through: a plain occurrence the moment it is admitted (the coalescer
|
|
259
|
+
* only remembers where it landed), a deferred one when its render settles or
|
|
260
|
+
* falls back to it. Its content must be an array of objects. A block the
|
|
261
|
+
* converter can't render (a video, an unknown type, an image with neither
|
|
262
|
+
* uri nor data) becomes a placeholder, as it does uncoalesced, and so does a
|
|
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:
|
|
272
|
+
* there a member that isn't an object becomes the untyped placeholder, and a
|
|
273
|
+
* null member or content that isn't an array throws in conversion
|
|
274
|
+
* (agent-framework#297 brings that lane to this rule).
|
|
275
|
+
* Nor does the uncoalesced path set a byte budget on content:
|
|
276
|
+
* an inline image is admitted here as it is there (agent-framework#266: a
|
|
277
|
+
* 1 MiB serialized-content budget here dropped every coalesced message
|
|
278
|
+
* carrying a screenshot). A deferred occurrence's content is held, until then,
|
|
279
|
+
* in the coalescer's state and its persisted snapshot and receipts.
|
|
280
|
+
*
|
|
281
|
+
* A render result, which the host delivers in the occurrence's place, gets
|
|
282
|
+
* these checks, as RFC-006 §5.2 gives it every check a pushed payload gets,
|
|
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
|
|
285
|
+
* render falls back to the occurrence's own content; a pushed payload has
|
|
286
|
+
* nothing to fall back to, and gets its placeholders.
|
|
287
|
+
*
|
|
235
288
|
* Visibly-empty content is refused unless `allowEmpty`: an admitted
|
|
236
289
|
* occurrence with nothing to show would wake the model with no visible cause.
|
|
237
290
|
* Empty is legitimate only where the RFC gives it a meaning — a retraction
|
|
@@ -240,22 +293,38 @@ function mergeIdentity(prior: CoalescedOccurrence['identity'], next: CoalescedOc
|
|
|
240
293
|
*/
|
|
241
294
|
export function validateCoalescedContent(
|
|
242
295
|
content: unknown,
|
|
243
|
-
|
|
244
|
-
options: { allowEmpty?: boolean } = {},
|
|
296
|
+
options: { allowEmpty?: boolean; checkBlockShapes?: boolean } = {},
|
|
245
297
|
): asserts content is McplContentBlock[] {
|
|
246
298
|
if (!Array.isArray(content)) throw new CoalesceError('payload.content', 'content must be an array');
|
|
247
299
|
for (const b of content as Array<Record<string, unknown>>) {
|
|
248
300
|
if (!b || typeof b !== 'object' || Array.isArray(b)) throw new CoalesceError('payload.content', 'invalid content block');
|
|
249
|
-
if (
|
|
250
|
-
if (b.type === 'resource' && typeof b.uri === 'string') continue;
|
|
251
|
-
if ((b.type === 'image' || b.type === 'audio')
|
|
252
|
-
&& (typeof b.uri === 'string' || (typeof b.data === 'string' && typeof b.mimeType === 'string'))) continue;
|
|
253
|
-
throw new CoalesceError('payload.content', 'invalid content block');
|
|
301
|
+
if (options.checkBlockShapes && !showsAsItself(b)) throw new CoalesceError('payload.content', 'invalid content block');
|
|
254
302
|
}
|
|
255
|
-
if (Buffer.byteLength(JSON.stringify(content)) > maxBytes) throw new CoalesceError('payload.content', 'content exceeds host byte limit');
|
|
256
303
|
if (!options.allowEmpty && isVisiblyEmptyContent(content)) throw new EmptyContentError();
|
|
257
304
|
}
|
|
258
305
|
|
|
306
|
+
/**
|
|
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
|
|
309
|
+
* audio source, or as a reference stub, and not as a placeholder: an
|
|
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.
|
|
313
|
+
*/
|
|
314
|
+
function showsAsItself(b: Record<string, unknown>): boolean {
|
|
315
|
+
if (b.type === 'text') return typeof b.text === 'string';
|
|
316
|
+
if (b.type === 'resource') return classifyBlock(b).kind === 'reference';
|
|
317
|
+
if (b.type !== 'image' && b.type !== 'audio') return false;
|
|
318
|
+
if (isInlineContradiction(b)) return false;
|
|
319
|
+
if (isFilledString(b.uri) && b.disposition) return classifyBlock(b).kind === 'reference';
|
|
320
|
+
if (isFilledString(b.data) && isFilledString(b.mimeType)) return true;
|
|
321
|
+
return b.type === 'image' && isFilledString(b.uri);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function isFilledString(value: unknown): value is string {
|
|
325
|
+
return typeof value === 'string' && value !== '';
|
|
326
|
+
}
|
|
327
|
+
|
|
259
328
|
/** Validate the `coalesce` member of either lane (§13). */
|
|
260
329
|
export function validateCoalesceMember(
|
|
261
330
|
c: unknown,
|
|
@@ -431,6 +500,11 @@ export class PushCoalescer<E = unknown> {
|
|
|
431
500
|
throw new CoalesceError('eventId', 'host could not persist the acceptance; retry', -32000);
|
|
432
501
|
}
|
|
433
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
|
+
}
|
|
434
508
|
this.prune();
|
|
435
509
|
this.persist();
|
|
436
510
|
// Written but not yet durable: the in-memory receipt deduplicates a retry
|
|
@@ -613,7 +687,8 @@ export class PushCoalescer<E = unknown> {
|
|
|
613
687
|
// be flattened by `then`, holding the lock until the render settled —
|
|
614
688
|
// and the settlement itself needs the lock.
|
|
615
689
|
const started = await this.locked(() => this.freeze(subject, agentName));
|
|
616
|
-
if (started)
|
|
690
|
+
if (started === 'declined') result.settled.add(subject);
|
|
691
|
+
else if (started) {
|
|
617
692
|
work.push(started.done.then(() => {
|
|
618
693
|
result.settled.add(subject);
|
|
619
694
|
if (started.rendering.materialized) result.materialized.add(subject);
|
|
@@ -629,27 +704,42 @@ export class PushCoalescer<E = unknown> {
|
|
|
629
704
|
* Under the lock: decide whether `subject`'s batch renders for `agentName`,
|
|
630
705
|
* freeze it, make the render-start durable, re-check authority, and start
|
|
631
706
|
* the RPC. Returns the render's completion (shared by every assembly that
|
|
632
|
-
* 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.
|
|
633
715
|
*/
|
|
634
|
-
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> {
|
|
635
717
|
const state = this.subjects.get(subject);
|
|
636
718
|
if (!state || this.suspended) return undefined;
|
|
637
719
|
if (state.rendering) {
|
|
638
|
-
// 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.
|
|
639
722
|
const rendering = state.rendering;
|
|
640
|
-
|
|
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 };
|
|
641
727
|
}
|
|
642
728
|
const batch = state.batch;
|
|
643
729
|
if (!batch) return undefined;
|
|
644
730
|
// The audience lookup may spawn a fork. Under the lock no admission can
|
|
645
731
|
// move the subject on meanwhile; the identity check guards the host.
|
|
646
732
|
const audience = await this.host.audience(batch.latest);
|
|
647
|
-
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';
|
|
648
738
|
state.batch = undefined;
|
|
649
739
|
this.host.cancelWake(subject);
|
|
650
740
|
if (!this.host.authorized(batch.latest)) {
|
|
651
741
|
this.host.audit({ kind: 'revoked', subject, eventId: batch.latest.eventId });
|
|
652
|
-
return
|
|
742
|
+
return 'declined';
|
|
653
743
|
}
|
|
654
744
|
const rendering: Rendering<E> = { batch, cancelled: false, done: Promise.resolve() };
|
|
655
745
|
state.rendering = rendering;
|
|
@@ -667,7 +757,7 @@ export class PushCoalescer<E = unknown> {
|
|
|
667
757
|
// unrelated traffic happens by. Re-wake with backoff, so a persistent
|
|
668
758
|
// storage outage does not become a tight loop of model turns.
|
|
669
759
|
this.scheduleRecovery(subject, state);
|
|
670
|
-
return
|
|
760
|
+
return 'declined';
|
|
671
761
|
}
|
|
672
762
|
this.clearRecovery(subject);
|
|
673
763
|
if (this.suspended) { state.rendering = undefined; state.batch = batch; return undefined; }
|
|
@@ -677,7 +767,7 @@ export class PushCoalescer<E = unknown> {
|
|
|
677
767
|
if (!this.host.authorized(batch.latest)) {
|
|
678
768
|
this.host.audit({ kind: 'revoked', subject, eventId: batch.latest.eventId });
|
|
679
769
|
state.rendering = undefined;
|
|
680
|
-
return
|
|
770
|
+
return 'declined';
|
|
681
771
|
}
|
|
682
772
|
rendering.done = this.render(subject, state, rendering, agentName);
|
|
683
773
|
return { done: rendering.done, rendering };
|
|
@@ -700,14 +790,24 @@ export class PushCoalescer<E = unknown> {
|
|
|
700
790
|
try {
|
|
701
791
|
const result = await this.host.render(occurrence, params);
|
|
702
792
|
if (rendering.cancelled) { this.host.audit({ kind: 'late-render', subject, eventId: occurrence.eventId, discarded: true }); }
|
|
703
|
-
// §5.2: an empty result is legitimate ("nothing happened")
|
|
704
|
-
|
|
793
|
+
// §5.2: an empty result is legitimate ("nothing happened"); each
|
|
794
|
+
// block must be well formed.
|
|
795
|
+
else validateCoalescedContent(result?.content, { allowEmpty: true, checkBlockShapes: true });
|
|
705
796
|
if (rendering.cancelled) throw new CancelledRender();
|
|
706
797
|
content = result.content;
|
|
707
798
|
timestamp = typeof result.timestamp === 'string' ? result.timestamp : new Date().toISOString();
|
|
708
799
|
source = 'render';
|
|
709
800
|
} catch (error) {
|
|
710
|
-
if (!(error instanceof CancelledRender))
|
|
801
|
+
if (!(error instanceof CancelledRender)) {
|
|
802
|
+
// The occurrence's own content is delivered instead; the host names
|
|
803
|
+
// the failure where operators look (a console line, not only this
|
|
804
|
+
// audit record).
|
|
805
|
+
this.host.audit({
|
|
806
|
+
kind: 'render-failed', subject, serverId: occurrence.serverId, eventId: occurrence.eventId,
|
|
807
|
+
...(error instanceof CoalesceError ? { field: error.field } : {}),
|
|
808
|
+
error: String(error),
|
|
809
|
+
});
|
|
810
|
+
}
|
|
711
811
|
} finally {
|
|
712
812
|
const left = (this.rendersInFlight.get(occurrence.serverId) ?? 1) - 1;
|
|
713
813
|
if (left > 0) this.rendersInFlight.set(occurrence.serverId, left); else this.rendersInFlight.delete(occurrence.serverId);
|
package/src/mcpl/push-handler.ts
CHANGED
|
@@ -8,18 +8,20 @@
|
|
|
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';
|
|
18
17
|
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
|
-
import { EmptyContentError, validateCoalescedContent } from './push-coalescer.js';
|
|
22
|
-
import {
|
|
20
|
+
import { coalesceRejectionReason, EmptyContentError, validateCoalescedContent } from './push-coalescer.js';
|
|
21
|
+
import type { InboundSource } from './inbound-source.js';
|
|
22
|
+
import { isSilentHeartbeatMarker, isVisiblyEmptyConversion } from './visible-content.js';
|
|
23
|
+
import { logDetail, logValue } from './log-value.js';
|
|
24
|
+
import { RefusalLines } from './refusal-lines.js';
|
|
23
25
|
|
|
24
26
|
// ============================================================================
|
|
25
27
|
// McplPushEvent (the ProcessEvent shape pushed to the queue)
|
|
@@ -48,75 +50,11 @@ export interface McplPushEvent {
|
|
|
48
50
|
coalescingSubject?: string;
|
|
49
51
|
/** RFC-006 assembly: materialized for this agent's turn (store directly). */
|
|
50
52
|
assemblingFor?: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Convert a single MCPL wire-format content block to a membrane ContentBlock.
|
|
59
|
-
* Same logic as hook-orchestrator.ts.
|
|
60
|
-
*/
|
|
61
|
-
export function convertBlock(block: McplContentBlock): ContentBlock {
|
|
62
|
-
switch (block.type) {
|
|
63
|
-
case 'text':
|
|
64
|
-
return { type: 'text', text: block.text };
|
|
65
|
-
|
|
66
|
-
case 'image':
|
|
67
|
-
if (isInlineContradiction(block)) {
|
|
68
|
-
// RFC-005 vector 2: inline data claiming bulk disposition — fail
|
|
69
|
-
// closed, withhold the data (checked BEFORE the data branch).
|
|
70
|
-
return { type: 'text', text: INLINE_WITHHELD_TEXT };
|
|
71
|
-
}
|
|
72
|
-
if (block.uri && block.disposition) {
|
|
73
|
-
// RFC-005 uri-form media with a disposition claim: stub, do not
|
|
74
|
-
// hand the URI to the provider or inline it.
|
|
75
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
76
|
-
}
|
|
77
|
-
if (block.data && block.mimeType) {
|
|
78
|
-
return {
|
|
79
|
-
type: 'image',
|
|
80
|
-
source: { type: 'base64', data: block.data, mediaType: block.mimeType },
|
|
81
|
-
} as ContentBlock;
|
|
82
|
-
}
|
|
83
|
-
if (block.uri) {
|
|
84
|
-
return {
|
|
85
|
-
type: 'image',
|
|
86
|
-
source: { type: 'url', url: block.uri },
|
|
87
|
-
} as ContentBlock;
|
|
88
|
-
}
|
|
89
|
-
return { type: 'text', text: '[Image: no data]' };
|
|
90
|
-
|
|
91
|
-
case 'audio':
|
|
92
|
-
if (isInlineContradiction(block)) {
|
|
93
|
-
// RFC-005 vector 2: inline data claiming bulk disposition — fail
|
|
94
|
-
// closed, withhold the data (checked BEFORE the data branch).
|
|
95
|
-
return { type: 'text', text: INLINE_WITHHELD_TEXT };
|
|
96
|
-
}
|
|
97
|
-
if (block.uri && block.disposition) {
|
|
98
|
-
// RFC-005 uri-form media with a disposition claim: stub, do not
|
|
99
|
-
// hand the URI to the provider or inline it.
|
|
100
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
101
|
-
}
|
|
102
|
-
if (block.data && block.mimeType) {
|
|
103
|
-
return {
|
|
104
|
-
type: 'audio',
|
|
105
|
-
source: { type: 'base64', data: block.data, mediaType: block.mimeType },
|
|
106
|
-
} as ContentBlock;
|
|
107
|
-
}
|
|
108
|
-
return { type: 'text', text: '[Audio: no data]' };
|
|
109
|
-
|
|
110
|
-
case 'resource':
|
|
111
|
-
// RFC-005: reference blocks become bounded stubs — never raw URIs
|
|
112
|
-
// (a signed URL is a bearer credential that looks like a location).
|
|
113
|
-
return { type: 'text', text: referenceStubOrNull(block, 'attachment on push event') ?? '[reference]' };
|
|
114
|
-
|
|
115
|
-
default:
|
|
116
|
-
// Unknown wire block types previously fell off the exhaustive switch
|
|
117
|
-
// and propagated `undefined` into ContentBlock[]. Fail visibly.
|
|
118
|
-
return { type: 'text', text: `[unrecognized content block: ${(block as { type?: string }).type ?? 'untyped'}]` };
|
|
119
|
-
}
|
|
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;
|
|
120
58
|
}
|
|
121
59
|
|
|
122
60
|
// ============================================================================
|
|
@@ -171,6 +109,9 @@ export class PushHandler {
|
|
|
171
109
|
private emitTraceFn: (event: { type: string; [key: string]: unknown }) => void;
|
|
172
110
|
private shouldTriggerInference?: (content: string, metadata: Record<string, unknown>) => boolean;
|
|
173
111
|
private dedup = new DedupSet(1000);
|
|
112
|
+
/** Holds back repeats of the line for a channel-scoped push refused because
|
|
113
|
+
* its channel isn't declared (-32023) or may not be used (-32017). */
|
|
114
|
+
private channelRefusalLines = new RefusalLines();
|
|
174
115
|
|
|
175
116
|
constructor(
|
|
176
117
|
featureSetManager: FeatureSetManager,
|
|
@@ -178,6 +119,10 @@ export class PushHandler {
|
|
|
178
119
|
emitTraceFn: (event: { type: string; [key: string]: unknown }) => void,
|
|
179
120
|
shouldTriggerInference?: (content: string, metadata: Record<string, unknown>) => boolean,
|
|
180
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,
|
|
181
126
|
) {
|
|
182
127
|
this.featureSetManager = featureSetManager;
|
|
183
128
|
this.pushEventFn = pushEventFn;
|
|
@@ -221,7 +166,7 @@ export class PushHandler {
|
|
|
221
166
|
: 'Feature set validation failed';
|
|
222
167
|
// Loud rejection — a rejected push event is an agent that silently
|
|
223
168
|
// never hears the message. (2026-07-09 diagnosability pass.)
|
|
224
|
-
console.error(`[push-event-rejected] server=${serverId} eventId=${params.eventId} reason=${reason}`);
|
|
169
|
+
console.error(`[push-event-rejected] server=${serverId} eventId=${logValue(params.eventId ?? '')} reason=${logValue(reason)}`);
|
|
225
170
|
if (err instanceof McplFeatureSetError && responder?.respondError) {
|
|
226
171
|
responder.respondError(err.code, reason, { featureSet: err.featureSet });
|
|
227
172
|
} else {
|
|
@@ -240,11 +185,13 @@ export class PushHandler {
|
|
|
240
185
|
if (coalesced) {
|
|
241
186
|
// RFC-006 §13: malformed content is a -32602, checked before conversion.
|
|
242
187
|
try {
|
|
243
|
-
validateCoalescedContent(params.payload?.content,
|
|
188
|
+
validateCoalescedContent(params.payload?.content, { allowEmpty: emptyAllowed });
|
|
244
189
|
} catch (error) {
|
|
245
190
|
const err = error as Error & { code?: number; field?: string };
|
|
191
|
+
const code = err.code ?? -32602;
|
|
246
192
|
if (err instanceof EmptyContentError) this.traceEmptyRejection(serverId, params);
|
|
247
|
-
|
|
193
|
+
else this.traceCoalesceRejection(serverId, params, err, code);
|
|
194
|
+
if (responder?.respondError) responder.respondError(code, err.message, { field: err.field });
|
|
248
195
|
else responder?.respond({ accepted: false, reason: err instanceof EmptyContentError ? err.reason : err.message });
|
|
249
196
|
return;
|
|
250
197
|
}
|
|
@@ -252,8 +199,8 @@ export class PushHandler {
|
|
|
252
199
|
|
|
253
200
|
// 2. Convert content blocks, and refuse content with nothing visible in
|
|
254
201
|
// it — before dedup, so a refused eventId is not burned for a retry.
|
|
255
|
-
const content: ContentBlock[] = params.payload.content.map(convertBlock);
|
|
256
|
-
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)) {
|
|
257
204
|
const err = new EmptyContentError();
|
|
258
205
|
this.traceEmptyRejection(serverId, params);
|
|
259
206
|
if (responder?.respondError) responder.respondError(err.code, err.message, { field: err.field });
|
|
@@ -265,7 +212,7 @@ export class PushHandler {
|
|
|
265
212
|
// coalescer's receipts instead (RFC-006 §3.1: a retry within the window
|
|
266
213
|
// gets its original result, which this set could not return).
|
|
267
214
|
if (!coalesced && this.dedup.checkAndAdd(params.eventId)) {
|
|
268
|
-
console.error(`[push-event-rejected] server=${serverId} eventId=${params.eventId} reason=duplicate`);
|
|
215
|
+
console.error(`[push-event-rejected] server=${serverId} eventId=${logValue(params.eventId ?? '')} reason=duplicate`);
|
|
269
216
|
responder?.respond({ accepted: false, reason: 'duplicate' });
|
|
270
217
|
return;
|
|
271
218
|
}
|
|
@@ -303,6 +250,7 @@ export class PushHandler {
|
|
|
303
250
|
timestamp: params.timestamp,
|
|
304
251
|
inferenceId,
|
|
305
252
|
triggerInference,
|
|
253
|
+
acceptedAt: Date.now(),
|
|
306
254
|
};
|
|
307
255
|
if (coalesced) {
|
|
308
256
|
// RFC-006: the coalescer decides whether this occurrence replaces an
|
|
@@ -314,12 +262,18 @@ export class PushHandler {
|
|
|
314
262
|
responder?.respond(result);
|
|
315
263
|
} catch (error) {
|
|
316
264
|
const err = error as Error & { code?: number; field?: string };
|
|
317
|
-
|
|
318
|
-
|
|
265
|
+
const code = typeof err.code === 'number' ? err.code : -32603;
|
|
266
|
+
this.traceCoalesceRejection(serverId, params, err, code);
|
|
267
|
+
if (responder?.respondError) responder.respondError(code, err.message, { field: err.field });
|
|
319
268
|
else responder?.respond({ accepted: false, reason: err.message });
|
|
320
269
|
}
|
|
321
270
|
return;
|
|
322
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;
|
|
323
277
|
this.pushEventFn(pushEvent);
|
|
324
278
|
|
|
325
279
|
// 7. Emit trace
|
|
@@ -334,13 +288,61 @@ export class PushHandler {
|
|
|
334
288
|
responder?.respond({ accepted: true, inferenceId });
|
|
335
289
|
}
|
|
336
290
|
|
|
337
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* A coalesced occurrence the host refused, as loud as every other push
|
|
293
|
+
* rejection: its producer is told on the wire, and until now the host said
|
|
294
|
+
* nothing, so a dropped message left no trace where operators look
|
|
295
|
+
* (agent-framework#266). The producer gets the wire answer this lane gives
|
|
296
|
+
* (`answered`): the thrown error's code and message, or -32602 for a
|
|
297
|
+
* malformed occurrence without one. The reason follows that answer
|
|
298
|
+
* (coalesceRejectionReason): `coalesce-failed` when the host itself failed,
|
|
299
|
+
* `coalesce-invalid` when the producer's occurrence was refused, with the
|
|
300
|
+
* failing `field` and the error's message as `detail`. A missing eventId
|
|
301
|
+
* prints as `""` and traces as `''`, as the channel lane's missing id does.
|
|
302
|
+
* A channel-scoped push refused because its channel isn't declared or may
|
|
303
|
+
* not be used names the channel on its line and its trace, and is refused
|
|
304
|
+
* for as long as that lasts, so its line prints at most once a minute per
|
|
305
|
+
* channel (RefusalLines); every refusal is traced.
|
|
306
|
+
*/
|
|
307
|
+
private traceCoalesceRejection(
|
|
308
|
+
serverId: string,
|
|
309
|
+
params: PushEventParams,
|
|
310
|
+
error: { field?: unknown; message: string },
|
|
311
|
+
answered: number,
|
|
312
|
+
): void {
|
|
313
|
+
const reason = coalesceRejectionReason(answered);
|
|
314
|
+
const field = typeof error.field === 'string' && error.field ? error.field : undefined;
|
|
315
|
+
const scoped = params.coalesce?.channelId;
|
|
316
|
+
const channelId = (answered === -32023 || answered === -32017) && typeof scoped === 'string' ? scoped : undefined;
|
|
317
|
+
const held = channelId === undefined ? 0 : this.channelRefusalLines.admit(serverId, channelId);
|
|
318
|
+
if (held !== null) {
|
|
319
|
+
console.error(
|
|
320
|
+
`[push-event-rejected] server=${serverId} featureSet=${logValue(params.featureSet ?? '')} eventId=${logValue(params.eventId ?? '')} ` +
|
|
321
|
+
(channelId === undefined ? '' : `channel=${logValue(channelId)} `) +
|
|
322
|
+
`reason=${reason}${field ? ` field=${logValue(field)}` : ''}: ${logDetail(error.message)}` +
|
|
323
|
+
(held ? ` (${held} more since the last line)` : ''),
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
this.emitTraceFn({
|
|
327
|
+
type: 'mcpl:push-event-rejected',
|
|
328
|
+
serverId,
|
|
329
|
+
eventId: typeof params.eventId === 'string' ? params.eventId : '',
|
|
330
|
+
featureSet: params.featureSet,
|
|
331
|
+
reason,
|
|
332
|
+
...(field ? { field } : {}),
|
|
333
|
+
...(channelId === undefined ? {} : { channelId }),
|
|
334
|
+
detail: error.message,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Loud, like every other push rejection: the producer's wake went nowhere.
|
|
339
|
+
* A missing eventId prints as `""` and traces as `''`, as on every push line. */
|
|
338
340
|
private traceEmptyRejection(serverId: string, params: PushEventParams): void {
|
|
339
|
-
console.error(`[push-event-rejected] server=${serverId} eventId=${params.eventId} reason=empty-content`);
|
|
341
|
+
console.error(`[push-event-rejected] server=${serverId} eventId=${logValue(params.eventId ?? '')} reason=empty-content`);
|
|
340
342
|
this.emitTraceFn({
|
|
341
343
|
type: 'mcpl:push-event-rejected',
|
|
342
344
|
serverId,
|
|
343
|
-
eventId: params.eventId,
|
|
345
|
+
eventId: typeof params.eventId === 'string' ? params.eventId : '',
|
|
344
346
|
featureSet: params.featureSet,
|
|
345
347
|
reason: 'empty-content',
|
|
346
348
|
});
|