@animalabs/agent-framework 0.22.2 → 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 +3 -1
- package/dist/src/agent.d.ts +77 -12
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +136 -40
- 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/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 +3 -4
- package/src/agent.ts +162 -40
- 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/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
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { AgentFramework } from '../src/framework.js';
|
|
4
|
-
function busyAgentHarness() {
|
|
5
|
-
const framework = Object.create(AgentFramework.prototype);
|
|
6
|
-
framework.queue = { tryPop: () => null };
|
|
7
|
-
framework.pendingRequests = [{
|
|
8
|
-
agentName: 'Sol',
|
|
9
|
-
reason: 'discord-message',
|
|
10
|
-
source: 'discord',
|
|
11
|
-
timestamp: Date.now(),
|
|
12
|
-
}];
|
|
13
|
-
framework.agents = new Map([['Sol', { state: { status: 'waiting_for_tools' } }]]);
|
|
14
|
-
framework.activeStreams = new Map();
|
|
15
|
-
framework.activeTurnTokens = new Map();
|
|
16
|
-
framework.staleWarnAt = new Map();
|
|
17
|
-
framework.sweepExpiredConversations = () => { };
|
|
18
|
-
framework.createFrameworkState = () => ({});
|
|
19
|
-
framework.emitTrace = () => { };
|
|
20
|
-
framework.handleProcessEvent = async () => { };
|
|
21
|
-
framework.inferencePolicy = { shouldInfer: () => true };
|
|
22
|
-
framework.startAgentStream = async () => { };
|
|
23
|
-
return framework;
|
|
24
|
-
}
|
|
25
|
-
test('busy-agent inference requests yield to timers when no active stream is registered', async () => {
|
|
26
|
-
const framework = busyAgentHarness();
|
|
27
|
-
let timerRan = false;
|
|
28
|
-
setTimeout(() => {
|
|
29
|
-
timerRan = true;
|
|
30
|
-
}, 0);
|
|
31
|
-
await framework.processNextEvent();
|
|
32
|
-
assert.equal(timerRan, true, 'scheduler must yield a macrotask before polling the busy agent again');
|
|
33
|
-
assert.equal(framework.pendingRequests.length, 1, 'the deferred wake remains queued');
|
|
34
|
-
});
|
|
35
|
-
test('continuous queue traffic still yields when a busy-agent wake remains deferred', async () => {
|
|
36
|
-
const framework = busyAgentHarness();
|
|
37
|
-
framework.queue = { tryPop: () => ({ type: 'diagnostic-event' }) };
|
|
38
|
-
let timerRan = false;
|
|
39
|
-
setTimeout(() => {
|
|
40
|
-
timerRan = true;
|
|
41
|
-
}, 0);
|
|
42
|
-
await framework.processNextEvent();
|
|
43
|
-
assert.equal(timerRan, true, 'queue traffic must not starve tool-result or HTTP I/O');
|
|
44
|
-
assert.equal(framework.pendingRequests.length, 1, 'the busy-agent wake remains deferred');
|
|
45
|
-
});
|
|
46
|
-
test('stale busy-agent diagnostics are throttled with the warning', async () => {
|
|
47
|
-
const framework = busyAgentHarness();
|
|
48
|
-
framework.pendingRequests[0].timestamp = Date.now() - 31_000;
|
|
49
|
-
let traceCount = 0;
|
|
50
|
-
framework.emitTrace = () => {
|
|
51
|
-
traceCount++;
|
|
52
|
-
};
|
|
53
|
-
const originalError = console.error;
|
|
54
|
-
console.error = () => { };
|
|
55
|
-
try {
|
|
56
|
-
await framework.processInferenceRequests();
|
|
57
|
-
await framework.processInferenceRequests();
|
|
58
|
-
}
|
|
59
|
-
finally {
|
|
60
|
-
console.error = originalError;
|
|
61
|
-
}
|
|
62
|
-
assert.equal(traceCount, 1, 'the stale trace shares the once-per-minute warning throttle');
|
|
63
|
-
assert.equal(framework.pendingRequests.length, 1, 'diagnostics do not consume the deferred wake');
|
|
64
|
-
});
|
|
65
|
-
test('a budget restart defines turn semantics when batched behind an ordinary wake', async () => {
|
|
66
|
-
const framework = busyAgentHarness();
|
|
67
|
-
const now = Date.now();
|
|
68
|
-
framework.pendingRequests = [
|
|
69
|
-
{
|
|
70
|
-
agentName: 'Sol',
|
|
71
|
-
reason: 'mcpl:channel-incoming',
|
|
72
|
-
source: 'discord',
|
|
73
|
-
timestamp: now - 1,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
agentName: 'Sol',
|
|
77
|
-
reason: 'context_budget_restart',
|
|
78
|
-
source: 'framework',
|
|
79
|
-
timestamp: now,
|
|
80
|
-
},
|
|
81
|
-
];
|
|
82
|
-
framework.agents = new Map([['Sol', { state: { status: 'idle' } }]]);
|
|
83
|
-
framework.activeTurnTokens.set('Sol', 1);
|
|
84
|
-
let selectedTrigger;
|
|
85
|
-
framework.startAgentStream = async (_agent, trigger) => {
|
|
86
|
-
selectedTrigger = trigger;
|
|
87
|
-
};
|
|
88
|
-
await framework.processInferenceRequests();
|
|
89
|
-
assert.equal(selectedTrigger?.reason, 'context_budget_restart', 'the request that bypasses the turn-alive lock must preserve continuation semantics');
|
|
90
|
-
assert.equal(framework.pendingRequests.length, 0, 'the mixed wake batch is consumed once');
|
|
91
|
-
});
|
|
92
|
-
//# sourceMappingURL=busy-agent-scheduler.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"busy-agent-scheduler.test.js","sourceRoot":"","sources":["../../test/busy-agent-scheduler.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAwBrD,SAAS,g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gB,GAAG,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QACrD,eAAe,GAAG,OAAO,CAAC;IAC5B,CAAC,CAAC;IAEF,MAAM,SAAS,CAAC,wBAAwB,EAAE,CAAC;IAE3C,MAAM,CAAC,KAAK,CACV,eAAe,EAAE,MAAM,EACvB,wBAAwB,EACxB,oFAAoF,CACrF,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,uCAAuC,CAAC,CAAC;AAC7F,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel-incoming-targeting.test.d.ts","sourceRoot":"","sources":["../../test/channel-incoming-targeting.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* targetAgents on the channel-incoming path (issue #77 plumbing).
|
|
3
|
-
*
|
|
4
|
-
* McplChannelIncomingEvent declared `targetAgents` from the start, but the
|
|
5
|
-
* fan-out ignored it and woke every registered agent. Now it mirrors the
|
|
6
|
-
* push-event path: a targeted event wakes exactly the named agents (unknown
|
|
7
|
-
* names skipped), an untargeted event keeps the historical broadcast.
|
|
8
|
-
* Tune-out's wake routing is the first setter.
|
|
9
|
-
*
|
|
10
|
-
* Asserted at the pendingRequests seam (the fan-out's output), not by
|
|
11
|
-
* running turns: MockMembrane hands its whole response queue to the first
|
|
12
|
-
* stream, so two agents' concurrent turns starve one stream and the
|
|
13
|
-
* framework restart-loops it — a harness limitation, not product behavior.
|
|
14
|
-
*/
|
|
15
|
-
import { describe, it, beforeEach, afterEach } from 'node:test';
|
|
16
|
-
import assert from 'node:assert/strict';
|
|
17
|
-
import { tmpdir } from 'node:os';
|
|
18
|
-
import { mkdtempSync, rmSync } from 'node:fs';
|
|
19
|
-
import { join } from 'node:path';
|
|
20
|
-
import { AgentFramework } from '../src/index.js';
|
|
21
|
-
import { MockMembrane } from './helpers/mock-membrane.js';
|
|
22
|
-
function internals(framework) {
|
|
23
|
-
return framework;
|
|
24
|
-
}
|
|
25
|
-
function channelIncoming(text, targetAgents) {
|
|
26
|
-
return {
|
|
27
|
-
type: 'mcpl:channel-incoming',
|
|
28
|
-
serverId: 'discord',
|
|
29
|
-
channelId: 'discord:guild:chanA',
|
|
30
|
-
messageId: `m-${Math.random().toString(36).slice(2)}`,
|
|
31
|
-
author: { id: 'U1', name: 'antra' },
|
|
32
|
-
content: [{ type: 'text', text }],
|
|
33
|
-
timestamp: new Date().toISOString(),
|
|
34
|
-
metadata: {},
|
|
35
|
-
triggerInference: true,
|
|
36
|
-
...(targetAgents ? { targetAgents } : {}),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
describe('channel-incoming targetAgents', () => {
|
|
40
|
-
let tempDir;
|
|
41
|
-
let framework;
|
|
42
|
-
beforeEach(async () => {
|
|
43
|
-
tempDir = mkdtempSync(join(tmpdir(), 'channel-targeting-test-'));
|
|
44
|
-
framework = await AgentFramework.create({
|
|
45
|
-
storePath: join(tempDir, 'test.chronicle'),
|
|
46
|
-
membrane: new MockMembrane().asMembrane(),
|
|
47
|
-
agents: [
|
|
48
|
-
{ name: 'scout', model: 'test-model', systemPrompt: 'You are scout.' },
|
|
49
|
-
{ name: 'shade', model: 'test-model', systemPrompt: 'You are shade.' },
|
|
50
|
-
],
|
|
51
|
-
modules: [],
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
afterEach(async () => {
|
|
55
|
-
await framework.stop();
|
|
56
|
-
rmSync(tempDir, { recursive: true, force: true });
|
|
57
|
-
});
|
|
58
|
-
it('untargeted events keep the historical broadcast (both agents queued)', async () => {
|
|
59
|
-
const i = internals(framework);
|
|
60
|
-
await i.handleMcplChannelIncoming(channelIncoming('hello everyone'));
|
|
61
|
-
assert.deepEqual(i.pendingRequests.map((r) => r.agentName).sort(), ['scout', 'shade']);
|
|
62
|
-
});
|
|
63
|
-
it('a targeted event queues exactly the named agent', async () => {
|
|
64
|
-
const i = internals(framework);
|
|
65
|
-
await i.handleMcplChannelIncoming(channelIncoming('for shade only', ['shade']));
|
|
66
|
-
assert.deepEqual(i.pendingRequests.map((r) => r.agentName), ['shade']);
|
|
67
|
-
});
|
|
68
|
-
it('unknown names in targetAgents are skipped, not crashed on', async () => {
|
|
69
|
-
const i = internals(framework);
|
|
70
|
-
await i.handleMcplChannelIncoming(channelIncoming('mixed', ['nobody-home', 'scout']));
|
|
71
|
-
assert.deepEqual(i.pendingRequests.map((r) => r.agentName), ['scout']);
|
|
72
|
-
});
|
|
73
|
-
it('non-triggering events queue nobody', async () => {
|
|
74
|
-
const i = internals(framework);
|
|
75
|
-
const event = channelIncoming('ambient, gate said no');
|
|
76
|
-
event.triggerInference = false;
|
|
77
|
-
await i.handleMcplChannelIncoming(event);
|
|
78
|
-
assert.equal(i.pendingRequests.length, 0);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
//# sourceMappingURL=channel-incoming-targeting.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel-incoming-targeting.test.js","sourceRoot":"","sources":["../../test/channel-incoming-targeting.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,SAAS,SAAS,CAAC,SAAyB;IAC1C,OAAO,SAGN,CAAC;AACJ,CAAC;AAED,SAAS,eAA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AAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;QAC/B,MAAM,KAAK,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;QACvD,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC/B,MAAM,CAAC,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel-label-history.test.d.ts","sourceRoot":"","sources":["../../test/channel-label-history.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Durable channel-label history (mcpl/channel-label-history append log).
|
|
3
|
-
*
|
|
4
|
-
* `resolveProseTarget()` resolves a label to a channel id only against the
|
|
5
|
-
* live `channels` map, which is empty for anything the bot has disconnected
|
|
6
|
-
* from or that hasn't re-registered since a restart. `appendLabelSighting()`
|
|
7
|
-
* durably records "this channelId had this label" on every descriptor
|
|
8
|
-
* observation, and `resolveProseTargetDurable()` falls back to that history
|
|
9
|
-
* when the live path misses — the case that matters for browsing message
|
|
10
|
-
* history on an old/quiet/disconnected channel.
|
|
11
|
-
*/
|
|
12
|
-
import { test } from 'node:test';
|
|
13
|
-
import assert from 'node:assert/strict';
|
|
14
|
-
import { mkdtempSync, rmSync } from 'node:fs';
|
|
15
|
-
import { tmpdir } from 'node:os';
|
|
16
|
-
import { join } from 'node:path';
|
|
17
|
-
import { JsStore } from '@animalabs/chronicle';
|
|
18
|
-
import { ChannelRegistry } from '../src/mcpl/channel-registry.js';
|
|
19
|
-
const CHANNEL_LABEL_HISTORY_LOG_ID = 'mcpl/channel-label-history';
|
|
20
|
-
function makeRegistry(store) {
|
|
21
|
-
const serverRegistry = {
|
|
22
|
-
getServer: (_id) => null,
|
|
23
|
-
};
|
|
24
|
-
return new ChannelRegistry(serverRegistry, {}, () => { }, () => { }, store ? { store: store } : undefined);
|
|
25
|
-
}
|
|
26
|
-
/** In-memory Chronicle-store stand-in, keyed by state id (unlike a single
|
|
27
|
-
* flat array) so the lifecycle log and the label-history log don't bleed
|
|
28
|
-
* into each other's getStateJson()/appendToStateJson() results. */
|
|
29
|
-
function memoryStore() {
|
|
30
|
-
const registered = new Set();
|
|
31
|
-
const events = new Map();
|
|
32
|
-
const store = {
|
|
33
|
-
registerState: (opts) => {
|
|
34
|
-
if (registered.has(opts.id))
|
|
35
|
-
throw new Error('State already exists');
|
|
36
|
-
registered.add(opts.id);
|
|
37
|
-
if (!events.has(opts.id))
|
|
38
|
-
events.set(opts.id, []);
|
|
39
|
-
},
|
|
40
|
-
getStateJson: (id) => events.get(id) ?? null,
|
|
41
|
-
appendToStateJson: (id, event) => {
|
|
42
|
-
if (!events.has(id))
|
|
43
|
-
events.set(id, []);
|
|
44
|
-
events.get(id).push(event);
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
return { store, events };
|
|
48
|
-
}
|
|
49
|
-
function descriptor(id, label) {
|
|
50
|
-
return { id, type: 'discord', label, direction: 'bidirectional' };
|
|
51
|
-
}
|
|
52
|
-
function dmDescriptor(id, label, opts = {}) {
|
|
53
|
-
return {
|
|
54
|
-
id,
|
|
55
|
-
type: 'discord',
|
|
56
|
-
label,
|
|
57
|
-
direction: 'bidirectional',
|
|
58
|
-
metadata: {
|
|
59
|
-
channelType: opts.channelType ?? 'dm',
|
|
60
|
-
...(opts.recipientId ? { recipientId: opts.recipientId } : {}),
|
|
61
|
-
...(opts.recipientName ? { recipientName: opts.recipientName } : {}),
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
test('a label sighting persists across a simulated restart', async () => {
|
|
66
|
-
const dir = mkdtempSync(join(tmpdir(), 'channel-label-history-'));
|
|
67
|
-
try {
|
|
68
|
-
const store = JsStore.openOrCreate({ path: join(dir, 'store') });
|
|
69
|
-
const first = makeRegistry(store);
|
|
70
|
-
await first.handleRegister('discord', {
|
|
71
|
-
channels: [descriptor('discord:g1:c1', "#general (Antra's Guild)")],
|
|
72
|
-
});
|
|
73
|
-
// Fresh registry over the SAME store, like a real restart — its live
|
|
74
|
-
// `channels` map starts empty (no handleRegister call this time), so
|
|
75
|
-
// resolveProseTarget() alone cannot see this channel at all.
|
|
76
|
-
const second = makeRegistry(store);
|
|
77
|
-
const liveMiss = second.resolveProseTarget("#general (Antra's Guild)");
|
|
78
|
-
assert.ok('error' in liveMiss, 'expected a live-path miss on a fresh registry');
|
|
79
|
-
// resolveProseTargetDurable() falls back to replayed history and finds it.
|
|
80
|
-
assert.deepEqual(second.resolveProseTargetDurable("#general (Antra's Guild)"), { channelId: 'discord:g1:c1', label: "#general (Antra's Guild)" });
|
|
81
|
-
// Name-segment match (bare name, parenthetical guild suffix omitted)
|
|
82
|
-
// mirrors resolveProseTarget()'s own byName normalization.
|
|
83
|
-
assert.deepEqual(second.resolveProseTargetDurable('#general'), { channelId: 'discord:g1:c1', label: "#general (Antra's Guild)" });
|
|
84
|
-
// Raw channelId also resolves, like resolveProseTarget()'s raw-id path.
|
|
85
|
-
assert.deepEqual(second.resolveProseTargetDurable('discord:g1:c1'), { channelId: 'discord:g1:c1', label: "#general (Antra's Guild)" });
|
|
86
|
-
}
|
|
87
|
-
finally {
|
|
88
|
-
rmSync(dir, { recursive: true, force: true });
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
test('repeated identical label sightings do not bloat the log', async () => {
|
|
92
|
-
const { store, events } = memoryStore();
|
|
93
|
-
const registry = makeRegistry(store);
|
|
94
|
-
for (let i = 0; i < 3; i++) {
|
|
95
|
-
await registry.handleRegister('discord', {
|
|
96
|
-
channels: [descriptor('discord:g1:c1', '#general')],
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
const log = events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? [];
|
|
100
|
-
assert.equal(log.length, 1, 'unchanged sightings must not append new records');
|
|
101
|
-
});
|
|
102
|
-
test('a genuinely new label sighting does append a new record', async () => {
|
|
103
|
-
const { store, events } = memoryStore();
|
|
104
|
-
const registry = makeRegistry(store);
|
|
105
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c1', '#general')] });
|
|
106
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c1', '#general-renamed')] });
|
|
107
|
-
const log = events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? [];
|
|
108
|
-
assert.equal(log.length, 2);
|
|
109
|
-
// Later sighting wins on replay.
|
|
110
|
-
const second = makeRegistry(store);
|
|
111
|
-
assert.deepEqual(second.resolveProseTargetDurable('#general-renamed'), {
|
|
112
|
-
channelId: 'discord:g1:c1',
|
|
113
|
-
label: '#general-renamed',
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
test('resolveProseTargetDurable prefers the live path and only falls back to history on a live miss', async () => {
|
|
117
|
-
const { store, events } = memoryStore();
|
|
118
|
-
// Pre-seed history: a DIFFERENT (now-disconnected) channel historically
|
|
119
|
-
// held the same label text that a currently-live channel holds now.
|
|
120
|
-
events.set(CHANNEL_LABEL_HISTORY_LOG_ID, [
|
|
121
|
-
{ channelId: 'discord:g1:ghost', label: 'shared-label', ts: 1 },
|
|
122
|
-
]);
|
|
123
|
-
const registry = makeRegistry(store);
|
|
124
|
-
await registry.handleRegister('discord', {
|
|
125
|
-
channels: [descriptor('discord:g1:live', 'shared-label')],
|
|
126
|
-
});
|
|
127
|
-
// Live path resolves uniquely against the live channel — must win over
|
|
128
|
-
// the (stale) history entry for the ghost channel.
|
|
129
|
-
const live = registry.resolveProseTarget('shared-label');
|
|
130
|
-
assert.deepEqual(live, { channelId: 'discord:g1:live', label: 'shared-label' });
|
|
131
|
-
assert.deepEqual(registry.resolveProseTargetDurable('shared-label'), live);
|
|
132
|
-
});
|
|
133
|
-
test('a channel with no history at all still returns the original resolveProseTarget error/candidates unchanged', async () => {
|
|
134
|
-
const registry = makeRegistry(); // no chronicle store at all — appendLabelSighting must no-op safely
|
|
135
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c1', '#other')] });
|
|
136
|
-
const live = registry.resolveProseTarget('#nonexistent');
|
|
137
|
-
assert.ok('error' in live);
|
|
138
|
-
const durable = registry.resolveProseTargetDurable('#nonexistent');
|
|
139
|
-
assert.deepEqual(durable, live);
|
|
140
|
-
// Also true for an entirely empty registry (no channels ever seen).
|
|
141
|
-
const empty = makeRegistry();
|
|
142
|
-
const liveEmpty = empty.resolveProseTarget('#anything');
|
|
143
|
-
assert.deepEqual(empty.resolveProseTargetDurable('#anything'), liveEmpty);
|
|
144
|
-
});
|
|
145
|
-
test('ensureChannelRegistered and handleChanged updates also feed label history', async () => {
|
|
146
|
-
const { store, events } = memoryStore();
|
|
147
|
-
const registry = makeRegistry(store);
|
|
148
|
-
// ensureChannelRegistered: lazy registration with NO label at all (e.g. a
|
|
149
|
-
// DM push missing both channelName and an author name). This must NOT be
|
|
150
|
-
// durably recorded as if the bare channelId were a real label (finding
|
|
151
|
-
// #3) — only the in-memory descriptor gets the placeholder, for live
|
|
152
|
-
// routing purposes.
|
|
153
|
-
registry.ensureChannelRegistered('discord', 'discord:dm:1', undefined);
|
|
154
|
-
// ...then a later message reveals a real label — the backfill path.
|
|
155
|
-
registry.ensureChannelRegistered('discord', 'discord:dm:1', 'DM: Antra');
|
|
156
|
-
// handleChanged: an "added" channel, then an "updated" descriptor for it.
|
|
157
|
-
await registry.handleChanged('discord', {
|
|
158
|
-
added: [descriptor('discord:g1:c2', '#dev')],
|
|
159
|
-
});
|
|
160
|
-
await registry.handleChanged('discord', {
|
|
161
|
-
updated: [descriptor('discord:g1:c2', '#dev-renamed')],
|
|
162
|
-
});
|
|
163
|
-
const restarted = makeRegistry(store);
|
|
164
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('DM: Antra'), {
|
|
165
|
-
channelId: 'discord:dm:1',
|
|
166
|
-
label: 'DM: Antra',
|
|
167
|
-
});
|
|
168
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('#dev-renamed'), {
|
|
169
|
-
channelId: 'discord:g1:c2',
|
|
170
|
-
label: '#dev-renamed',
|
|
171
|
-
});
|
|
172
|
-
const log = events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? [];
|
|
173
|
-
// discord:dm:1: the label-less lazy registration records NOTHING (fix
|
|
174
|
-
// #3), only the backfill ('DM: Antra') does = 1 record; discord:g1:c2
|
|
175
|
-
// added ('#dev') then updated ('#dev-renamed') = 2 records. Total 3, not
|
|
176
|
-
// the 4 a placeholder-recording implementation would produce.
|
|
177
|
-
assert.equal(log.length, 3);
|
|
178
|
-
});
|
|
179
|
-
test('a label-less lazy registration alone (no later backfill) records nothing durably (finding #3)', async () => {
|
|
180
|
-
const { store, events } = memoryStore();
|
|
181
|
-
const registry = makeRegistry(store);
|
|
182
|
-
registry.ensureChannelRegistered('discord', 'discord:dm:2', undefined);
|
|
183
|
-
const log = events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? [];
|
|
184
|
-
assert.equal(log.length, 0, 'a placeholder label (bare channelId) must never be durably recorded');
|
|
185
|
-
});
|
|
186
|
-
test('a label-less lazy re-registration after restart does not clobber an already-durable real label (finding #3)', async () => {
|
|
187
|
-
const { store, events } = memoryStore();
|
|
188
|
-
const first = makeRegistry(store);
|
|
189
|
-
// Boot 1: a real label lands on file (e.g. a DM push that DID carry a
|
|
190
|
-
// display name).
|
|
191
|
-
first.ensureChannelRegistered('discord', 'discord:dm:3', 'DM: Antra');
|
|
192
|
-
assert.equal((events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? []).length, 1);
|
|
193
|
-
// Simulated restart: fresh registry, live `channels` map starts empty —
|
|
194
|
-
// this is exactly the state that makes the NEXT event take the
|
|
195
|
-
// fresh-registration branch of ensureChannelRegistered again, even
|
|
196
|
-
// though the channel already has a real label on file.
|
|
197
|
-
const second = makeRegistry(store);
|
|
198
|
-
assert.deepEqual(second.resolveProseTargetDurable('DM: Antra'), {
|
|
199
|
-
channelId: 'discord:dm:3',
|
|
200
|
-
label: 'DM: Antra',
|
|
201
|
-
});
|
|
202
|
-
// A label-less push arrives post-restart. This used to durably overwrite
|
|
203
|
-
// the real label with the bare-id placeholder, and the dedup guard would
|
|
204
|
-
// then append a SECOND record the moment a later event restored the real
|
|
205
|
-
// label — degrading the log forever on every boot that hit this path.
|
|
206
|
-
second.ensureChannelRegistered('discord', 'discord:dm:3', undefined);
|
|
207
|
-
assert.deepEqual(second.resolveProseTargetDurable('DM: Antra'), {
|
|
208
|
-
channelId: 'discord:dm:3',
|
|
209
|
-
label: 'DM: Antra',
|
|
210
|
-
});
|
|
211
|
-
assert.equal((events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? []).length, 1, 'a label-less event must not durably record a placeholder over an already-known real label');
|
|
212
|
-
});
|
|
213
|
-
test('a label-less descriptor from handleRegister does not crash and does not poison labelHistory (finding #2)', async () => {
|
|
214
|
-
const { store } = memoryStore();
|
|
215
|
-
const registry = makeRegistry(store);
|
|
216
|
-
// ChannelDescriptor.label: string is a compile-time-only assertion over
|
|
217
|
-
// untrusted wire data — handleRegister only runtime-validates `id`. Build
|
|
218
|
-
// a descriptor with a missing label the way a misbehaving MCPL server
|
|
219
|
-
// could actually send one.
|
|
220
|
-
const labelless = { id: 'discord:g1:broken', type: 'discord', direction: 'bidirectional' };
|
|
221
|
-
await registry.handleRegister('discord', { channels: [labelless] });
|
|
222
|
-
// A subsequent, UNRELATED resolution call must still work — before the
|
|
223
|
-
// fix, an undefined label silently written into labelHistory threw a
|
|
224
|
-
// TypeError inside normalizeChannelLabel's `.replace()` on every future
|
|
225
|
-
// resolveProseTargetDurable call with a channelId, not just this one
|
|
226
|
-
// (this is what made it crash all four HistoryModule tools process-wide).
|
|
227
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c2', '#general')] });
|
|
228
|
-
assert.deepEqual(registry.resolveProseTargetDurable('#general'), {
|
|
229
|
-
channelId: 'discord:g1:c2',
|
|
230
|
-
label: '#general',
|
|
231
|
-
});
|
|
232
|
-
assert.doesNotThrow(() => registry.resolveProseTargetDurable('#anything-else'));
|
|
233
|
-
});
|
|
234
|
-
test('a channel renamed A -> B -> A is still resolvable by a name from BEFORE the most recent rename (finding #9)', async () => {
|
|
235
|
-
const { store } = memoryStore();
|
|
236
|
-
const registry = makeRegistry(store);
|
|
237
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c1', '#alpha')] });
|
|
238
|
-
await registry.handleChanged('discord', { updated: [descriptor('discord:g1:c1', '#beta')] });
|
|
239
|
-
await registry.handleChanged('discord', { updated: [descriptor('discord:g1:c1', '#alpha')] });
|
|
240
|
-
// Live-path check: '#alpha' is current again, so it resolves live.
|
|
241
|
-
assert.deepEqual(registry.resolveProseTarget('#alpha'), { channelId: 'discord:g1:c1', label: '#alpha' });
|
|
242
|
-
// The interesting case: '#beta' is a name from BEFORE the most recent
|
|
243
|
-
// rename (A -> B -> A), not the current OR immediately-previous label —
|
|
244
|
-
// labelHistory alone (latest-only) could never answer this; it needs
|
|
245
|
-
// allLabelsSeen's full per-channel history.
|
|
246
|
-
const restarted = makeRegistry(store);
|
|
247
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('#beta'), {
|
|
248
|
-
channelId: 'discord:g1:c1',
|
|
249
|
-
label: '#alpha', // reported label is always the CURRENT/latest one
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
test('a genuine label collision across two different channels reports ambiguity, not a silent pick (finding #9)', async () => {
|
|
253
|
-
const { store } = memoryStore();
|
|
254
|
-
const registry = makeRegistry(store);
|
|
255
|
-
// Two DIFFERENT channels each historically held the label '#shared' —
|
|
256
|
-
// channel a's label has since moved on, channel b's has not.
|
|
257
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:a', '#shared')] });
|
|
258
|
-
await registry.handleChanged('discord', { updated: [descriptor('discord:g1:a', '#a-current')] });
|
|
259
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:b', '#shared')] });
|
|
260
|
-
// A fresh (post-restart) registry — live path can't shortcut this to a
|
|
261
|
-
// unique live match, so resolution goes through the historical-label
|
|
262
|
-
// scan that must detect the collision across the two distinct channelIds.
|
|
263
|
-
const restarted = makeRegistry(store);
|
|
264
|
-
const result = restarted.resolveProseTargetDurable('#shared');
|
|
265
|
-
assert.ok('error' in result, `expected an ambiguity error, got ${JSON.stringify(result)}`);
|
|
266
|
-
});
|
|
267
|
-
test("durable DM resolution keeps the live resolver's recipientName-over-label precedence, not a flat equal-priority pool (finding: false ambiguity across two channels)", async () => {
|
|
268
|
-
// Two fully-recorded DMs whose identity data happens to cross-reference:
|
|
269
|
-
// A's actual username is 'alpha_user', but its stale/leftover display
|
|
270
|
-
// label is 'DM: beta_user'; B's actual username IS 'beta_user', with an
|
|
271
|
-
// unrelated display label. Live, '@beta_user' resolves uniquely to B —
|
|
272
|
-
// the live resolver prefers recipientName outright and never considers
|
|
273
|
-
// A's label a candidate at all. A flat "equal priority" pool of
|
|
274
|
-
// recipientName+label candidates made this falsely ambiguous after a
|
|
275
|
-
// restart (both A's label and B's recipientName satisfied the same
|
|
276
|
-
// query), even though the persisted recipientName data was sufficient on
|
|
277
|
-
// its own to resolve it uniquely, exactly like the live path does.
|
|
278
|
-
const { store } = memoryStore();
|
|
279
|
-
const registry = makeRegistry(store);
|
|
280
|
-
await registry.handleRegister('discord', {
|
|
281
|
-
channels: [
|
|
282
|
-
dmDescriptor('discord:dm:A', 'DM: beta_user', { recipientId: 'a', recipientName: 'alpha_user' }),
|
|
283
|
-
dmDescriptor('discord:dm:B', 'DM: unrelated-label', { recipientId: 'b', recipientName: 'beta_user' }),
|
|
284
|
-
],
|
|
285
|
-
});
|
|
286
|
-
const restarted = makeRegistry(store);
|
|
287
|
-
const resolved = restarted.resolveProseTargetDurable('@beta_user');
|
|
288
|
-
assert.ok('channelId' in resolved, `expected a unique resolution, got ${JSON.stringify(resolved)}`);
|
|
289
|
-
assert.equal(resolved.channelId, 'discord:dm:B');
|
|
290
|
-
// The label-derived fallback for a channel WITHOUT a competing
|
|
291
|
-
// recipientName match still works (recipientName tier only blocks the
|
|
292
|
-
// label tier when it actually resolves the query, not unconditionally) —
|
|
293
|
-
// '@unrelated-label' isn't anyone's recipientName, so it should still
|
|
294
|
-
// resolve to B via B's own label.
|
|
295
|
-
const byLabel = restarted.resolveProseTargetDurable('@unrelated-label');
|
|
296
|
-
assert.ok('channelId' in byLabel, `expected B's own label to still resolve it, got ${JSON.stringify(byLabel)}`);
|
|
297
|
-
assert.equal(byLabel.channelId, 'discord:dm:B');
|
|
298
|
-
});
|
|
299
|
-
test('a DM registered live resolves after a restart via @name, not just the literal stored label (DM-addressing regression)', async () => {
|
|
300
|
-
const { store } = memoryStore();
|
|
301
|
-
const first = makeRegistry(store);
|
|
302
|
-
await first.handleRegister('discord', {
|
|
303
|
-
channels: [dmDescriptor('discord:dm:antra', 'DM: antra', { recipientId: '123456789' })],
|
|
304
|
-
});
|
|
305
|
-
// Live check: '@antra' already resolves live, before any restart —
|
|
306
|
-
// establishes this is real DM-shaped addressing, not a coincidence.
|
|
307
|
-
assert.deepEqual(first.resolveProseTarget('@antra'), {
|
|
308
|
-
channelId: 'discord:dm:antra',
|
|
309
|
-
label: 'DM: antra',
|
|
310
|
-
});
|
|
311
|
-
// Simulated restart: fresh registry, live `channels` map starts empty —
|
|
312
|
-
// resolveProseTarget() alone can no longer see this DM at all.
|
|
313
|
-
const restarted = makeRegistry(store);
|
|
314
|
-
const liveMiss = restarted.resolveProseTarget('@antra');
|
|
315
|
-
assert.ok('error' in liveMiss, 'expected a live-path miss on a fresh registry');
|
|
316
|
-
// The durable fallback must still resolve '@antra' — normalizeChannelLabel
|
|
317
|
-
// alone (its previous only tool) has no '@'-handling at all, so this used
|
|
318
|
-
// to fail silently before falling through to resolveProseTarget's
|
|
319
|
-
// original (post-#8-fix: now HARD-thrown from HistoryModule) error.
|
|
320
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('@antra'), {
|
|
321
|
-
channelId: 'discord:dm:antra',
|
|
322
|
-
label: 'DM: antra',
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
test('a DM registered live resolves after a restart via the <@id> mention form (recipientId persisted durably)', async () => {
|
|
326
|
-
const { store } = memoryStore();
|
|
327
|
-
const first = makeRegistry(store);
|
|
328
|
-
await first.handleRegister('discord', {
|
|
329
|
-
channels: [dmDescriptor('discord:dm:antra', 'DM: antra', { recipientId: '123456789' })],
|
|
330
|
-
});
|
|
331
|
-
const restarted = makeRegistry(store);
|
|
332
|
-
assert.ok('error' in restarted.resolveProseTarget('<@123456789>'), 'expected a live-path miss on a fresh registry');
|
|
333
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('<@123456789>'), {
|
|
334
|
-
channelId: 'discord:dm:antra',
|
|
335
|
-
label: 'DM: antra',
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
test('a bare (non-DM-metadata) channel whose id merely contains ":dm:" is still DM-matched by @name after a restart', async () => {
|
|
339
|
-
// Exercises the id-shape half of isDmChannelId() independently of the
|
|
340
|
-
// 'DM: ' label-prefix half — a descriptor with no metadata.channelType
|
|
341
|
-
// at all, the way ensureChannelRegistered's lazy DM path (no server
|
|
342
|
-
// metadata yet) actually looks.
|
|
343
|
-
const { store } = memoryStore();
|
|
344
|
-
const first = makeRegistry(store);
|
|
345
|
-
first.ensureChannelRegistered('discord', 'discord:dm:5', 'DM: ghost');
|
|
346
|
-
const restarted = makeRegistry(store);
|
|
347
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('@ghost'), {
|
|
348
|
-
channelId: 'discord:dm:5',
|
|
349
|
-
label: 'DM: ghost',
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
test('a DM whose live username differs from its display label resolves by USERNAME after a restart (finding: recipientName persistence)', async () => {
|
|
353
|
-
// id `discord:dm:42`, label "DM: Tess" — but the actual live resolver
|
|
354
|
-
// prefers metadata.recipientName ("antra_tessera") over the label for
|
|
355
|
-
// DM name-matching, so '@antra_tessera' must resolve live, and the
|
|
356
|
-
// durable fallback (which previously only had the label "Tess" to
|
|
357
|
-
// search) needs recipientName persisted to answer it too.
|
|
358
|
-
const { store } = memoryStore();
|
|
359
|
-
const first = makeRegistry(store);
|
|
360
|
-
await first.handleRegister('discord', {
|
|
361
|
-
channels: [dmDescriptor('discord:dm:42', 'DM: Tess', { recipientName: 'antra_tessera' })],
|
|
362
|
-
});
|
|
363
|
-
// Live check: the live resolver already prefers recipientName over the
|
|
364
|
-
// label for DM matching — establishes this is real behavior to mirror,
|
|
365
|
-
// not an invented requirement.
|
|
366
|
-
assert.deepEqual(first.resolveProseTarget('@antra_tessera'), {
|
|
367
|
-
channelId: 'discord:dm:42',
|
|
368
|
-
label: 'DM: Tess',
|
|
369
|
-
});
|
|
370
|
-
const restarted = makeRegistry(store);
|
|
371
|
-
const liveMiss = restarted.resolveProseTarget('@antra_tessera');
|
|
372
|
-
assert.ok('error' in liveMiss, 'expected a live-path miss on a fresh registry');
|
|
373
|
-
// Durable fallback must resolve it by USERNAME, not just by the label text.
|
|
374
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('@antra_tessera'), {
|
|
375
|
-
channelId: 'discord:dm:42',
|
|
376
|
-
label: 'DM: Tess',
|
|
377
|
-
});
|
|
378
|
-
// The label-derived name ("tess") must still work too — recipientName is
|
|
379
|
-
// additive, not a replacement for the label fallback.
|
|
380
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('@tess'), {
|
|
381
|
-
channelId: 'discord:dm:42',
|
|
382
|
-
label: 'DM: Tess',
|
|
383
|
-
});
|
|
384
|
-
});
|
|
385
|
-
test('a DM classified only via metadata.channelType (non-conventional id/label) is still recognized and resolvable after a restart (finding: isDm persistence)', async () => {
|
|
386
|
-
// id `private-room-42` (no ":dm:"), label "Tess" (no "DM: " prefix) — the
|
|
387
|
-
// ONLY signal this is a DM at all is metadata.channelType === 'dm',
|
|
388
|
-
// which the live resolver checks FIRST. Without persisting that
|
|
389
|
-
// classification, the durable fallback's DM classifier has no way to
|
|
390
|
-
// even consider this channel a DM once disconnected, let alone resolve
|
|
391
|
-
// a <@id> mention against it.
|
|
392
|
-
const { store } = memoryStore();
|
|
393
|
-
const first = makeRegistry(store);
|
|
394
|
-
await first.handleRegister('discord', {
|
|
395
|
-
channels: [dmDescriptor('private-room-42', 'Tess', { recipientId: '42', channelType: 'dm' })],
|
|
396
|
-
});
|
|
397
|
-
// Live check: classified as a DM live via metadata alone.
|
|
398
|
-
assert.deepEqual(first.resolveProseTarget('<@42>'), {
|
|
399
|
-
channelId: 'private-room-42',
|
|
400
|
-
label: 'Tess',
|
|
401
|
-
});
|
|
402
|
-
const restarted = makeRegistry(store);
|
|
403
|
-
const liveMiss = restarted.resolveProseTarget('<@42>');
|
|
404
|
-
assert.ok('error' in liveMiss, 'expected a live-path miss on a fresh registry');
|
|
405
|
-
// Durable fallback must still recognize it as a DM (via the persisted
|
|
406
|
-
// isDm classification, not id/label shape) and resolve the mention.
|
|
407
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('<@42>'), {
|
|
408
|
-
channelId: 'private-room-42',
|
|
409
|
-
label: 'Tess',
|
|
410
|
-
});
|
|
411
|
-
assert.deepEqual(restarted.resolveProseTargetDurable('@tess'), {
|
|
412
|
-
channelId: 'private-room-42',
|
|
413
|
-
label: 'Tess',
|
|
414
|
-
});
|
|
415
|
-
});
|
|
416
|
-
test('a non-DM channel sighting never durably asserts isDm:false (only positive classification is ever persisted)', async () => {
|
|
417
|
-
const { store, events } = memoryStore();
|
|
418
|
-
const registry = makeRegistry(store);
|
|
419
|
-
await registry.handleRegister('discord', { channels: [descriptor('discord:g1:c1', '#general')] });
|
|
420
|
-
const log = events.get(CHANNEL_LABEL_HISTORY_LOG_ID) ?? [];
|
|
421
|
-
assert.equal(log.length, 1);
|
|
422
|
-
assert.equal(log[0].isDm, undefined, 'a plain guild channel must not record isDm at all');
|
|
423
|
-
});
|
|
424
|
-
//# sourceMappingURL=channel-label-history.test.js.map
|