@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,853 +0,0 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { mkdtempSync, rmSync } from 'node:fs';
|
|
4
|
-
import { tmpdir } from 'node:os';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
import { AgentFramework } from '../src/index.js';
|
|
7
|
-
import { MockMembrane, MockYieldingStream, createMockResponse } from './helpers/mock-membrane.js';
|
|
8
|
-
const TILDE_PREFACE_80 = 'P'.repeat(80);
|
|
9
|
-
const TILDE_THINK_4416 = 'T'.repeat(4416);
|
|
10
|
-
class TestToolsModule {
|
|
11
|
-
name = 'tools';
|
|
12
|
-
async start(_ctx) { }
|
|
13
|
-
async stop() { }
|
|
14
|
-
getTools() {
|
|
15
|
-
return [
|
|
16
|
-
{
|
|
17
|
-
name: 'read',
|
|
18
|
-
description: 'Read from the workspace.',
|
|
19
|
-
inputSchema: { type: 'object', properties: { path: { type: 'string' } }, required: ['path'] },
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'ping',
|
|
23
|
-
description: 'A non-silencing tool.',
|
|
24
|
-
inputSchema: { type: 'object', properties: {} },
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'think',
|
|
28
|
-
description: 'A namespaced tool that happens to be called think.',
|
|
29
|
-
inputSchema: { type: 'object', properties: { content: { type: 'string' } } },
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'send_message',
|
|
33
|
-
description: 'Explicitly send a message.',
|
|
34
|
-
inputSchema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'] },
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
async handleToolCall(call) {
|
|
39
|
-
return { success: true, data: { ok: true, tool: call.name, input: call.input } };
|
|
40
|
-
}
|
|
41
|
-
async onProcess(event, _state) {
|
|
42
|
-
if (event.type !== 'external-message')
|
|
43
|
-
return {};
|
|
44
|
-
const text = String(event.content ?? '');
|
|
45
|
-
return {
|
|
46
|
-
addMessages: [{ participant: 'Antra', content: [{ type: 'text', text }] }],
|
|
47
|
-
requestInference: text === 'go',
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function makeToolRound(preface) {
|
|
52
|
-
return [
|
|
53
|
-
{ type: 'text', text: preface },
|
|
54
|
-
{ type: 'tool_use', id: 'think-1', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
55
|
-
{ type: 'tool_use', id: 'read-1', name: 'tools--read', input: { path: 'project/secret.txt' } },
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
function makeChannelRegistry(framework) {
|
|
59
|
-
const routed = [];
|
|
60
|
-
const explicit = {
|
|
61
|
-
getChannelTools: () => [
|
|
62
|
-
{
|
|
63
|
-
name: 'think',
|
|
64
|
-
description: 'private reasoning',
|
|
65
|
-
inputSchema: {
|
|
66
|
-
type: 'object',
|
|
67
|
-
properties: { content: { type: 'string' } },
|
|
68
|
-
required: [],
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'skip_reply',
|
|
73
|
-
description: 'stay silent',
|
|
74
|
-
inputSchema: {
|
|
75
|
-
type: 'object',
|
|
76
|
-
properties: { reason: { type: 'string' } },
|
|
77
|
-
required: [],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
handleChannelToolCall: async (toolName) => {
|
|
82
|
-
if (toolName === 'think') {
|
|
83
|
-
return {
|
|
84
|
-
success: true,
|
|
85
|
-
data: {
|
|
86
|
-
noted: true,
|
|
87
|
-
note: 'Thought recorded (private — not sent anywhere). Same-round text routing depends on your current same_round_think_text_policy; use agent_settings get to inspect it, or call skip_reply to end the turn without replying.',
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
if (toolName === 'skip_reply') {
|
|
92
|
-
return {
|
|
93
|
-
success: true,
|
|
94
|
-
endTurn: true,
|
|
95
|
-
data: { skipped: true, note: 'Turn ended; nothing sent.' },
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return { success: false, error: `Unknown channel tool: ${toolName}`, isError: true };
|
|
99
|
-
},
|
|
100
|
-
resolveLocus: () => 'chan-test',
|
|
101
|
-
routeSpeech: async (_agent, text) => {
|
|
102
|
-
routed.push(text);
|
|
103
|
-
},
|
|
104
|
-
getDefaultPublishChannel: () => null,
|
|
105
|
-
isChannelOpen: () => true,
|
|
106
|
-
getDescriptor: () => undefined,
|
|
107
|
-
};
|
|
108
|
-
framework.channelRegistry = new Proxy(explicit, {
|
|
109
|
-
get: (target, prop) => (prop in target ? target[prop] : () => undefined),
|
|
110
|
-
});
|
|
111
|
-
return routed;
|
|
112
|
-
}
|
|
113
|
-
async function createFramework(opts) {
|
|
114
|
-
const dir = mkdtempSync(join(tmpdir(), 'same-round-think-'));
|
|
115
|
-
const membrane = opts?.membrane ?? new MockMembrane();
|
|
116
|
-
const agents = opts?.agents ?? [{
|
|
117
|
-
name: 'agent',
|
|
118
|
-
...(opts?.policy !== undefined ? { sameRoundThinkTextPolicy: opts.policy } : {}),
|
|
119
|
-
}];
|
|
120
|
-
const framework = await AgentFramework.create({
|
|
121
|
-
storePath: join(dir, 'store'),
|
|
122
|
-
membrane: (membrane.asMembrane?.() ?? membrane),
|
|
123
|
-
agents: agents.map((agent) => ({
|
|
124
|
-
name: agent.name,
|
|
125
|
-
model: 'test-model',
|
|
126
|
-
systemPrompt: 'test',
|
|
127
|
-
...(agent.sameRoundThinkTextPolicy !== undefined
|
|
128
|
-
? { sameRoundThinkTextPolicy: agent.sameRoundThinkTextPolicy }
|
|
129
|
-
: {}),
|
|
130
|
-
})),
|
|
131
|
-
modules: [new TestToolsModule()],
|
|
132
|
-
});
|
|
133
|
-
const routed = makeChannelRegistry(framework);
|
|
134
|
-
return { dir, framework, membrane, routed };
|
|
135
|
-
}
|
|
136
|
-
function trigger(framework) {
|
|
137
|
-
framework.pushEvent({
|
|
138
|
-
type: 'external-message',
|
|
139
|
-
source: 'test',
|
|
140
|
-
content: 'go',
|
|
141
|
-
metadata: {},
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
async function waitFor(predicate, timeoutMs = 1000) {
|
|
145
|
-
const deadline = Date.now() + timeoutMs;
|
|
146
|
-
while (!predicate()) {
|
|
147
|
-
if (Date.now() >= deadline)
|
|
148
|
-
throw new Error('timed out waiting for condition');
|
|
149
|
-
await new Promise(resolve => setTimeout(resolve, 5));
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
class LegacyNoRoundContentStream {
|
|
153
|
-
pendingResolve = null;
|
|
154
|
-
deliveredComplete = false;
|
|
155
|
-
provideToolResults(_results) {
|
|
156
|
-
const resolve = this.pendingResolve;
|
|
157
|
-
this.pendingResolve = null;
|
|
158
|
-
resolve?.();
|
|
159
|
-
}
|
|
160
|
-
cancel() {
|
|
161
|
-
this.deliveredComplete = true;
|
|
162
|
-
const resolve = this.pendingResolve;
|
|
163
|
-
this.pendingResolve = null;
|
|
164
|
-
resolve?.();
|
|
165
|
-
}
|
|
166
|
-
async *[Symbol.asyncIterator]() {
|
|
167
|
-
yield {
|
|
168
|
-
type: 'tool-calls',
|
|
169
|
-
calls: [
|
|
170
|
-
{ id: 'think-legacy', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
171
|
-
{ id: 'read-legacy', name: 'tools--read', input: { path: 'project/secret.txt' } },
|
|
172
|
-
],
|
|
173
|
-
context: {
|
|
174
|
-
rawText: '',
|
|
175
|
-
preamble: TILDE_PREFACE_80,
|
|
176
|
-
depth: 0,
|
|
177
|
-
previousResults: [],
|
|
178
|
-
accumulated: '',
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
await new Promise((resolve) => { this.pendingResolve = resolve; });
|
|
182
|
-
if (this.deliveredComplete)
|
|
183
|
-
return;
|
|
184
|
-
yield {
|
|
185
|
-
type: 'complete',
|
|
186
|
-
response: createMockResponse(makeToolRound(TILDE_PREFACE_80)),
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
class LegacyNoRoundContentMembrane {
|
|
191
|
-
calls = [];
|
|
192
|
-
streamYielding(request) {
|
|
193
|
-
this.calls.push(request);
|
|
194
|
-
return new LegacyNoRoundContentStream();
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
class PausedAfterFirstToolRoundStream {
|
|
198
|
-
responses;
|
|
199
|
-
events = [];
|
|
200
|
-
done = false;
|
|
201
|
-
_isWaitingForTools = false;
|
|
202
|
-
_pendingToolCallIds = [];
|
|
203
|
-
_toolDepth = 0;
|
|
204
|
-
pendingResolve = null;
|
|
205
|
-
paused = false;
|
|
206
|
-
receivedToolResults = [];
|
|
207
|
-
receivedToolResultOptions = [];
|
|
208
|
-
constructor(responses) {
|
|
209
|
-
this.responses = responses;
|
|
210
|
-
this.processResponse(0);
|
|
211
|
-
}
|
|
212
|
-
processResponse(index) {
|
|
213
|
-
const response = this.responses[index];
|
|
214
|
-
if (!response) {
|
|
215
|
-
this.done = true;
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
if (response.rawAssistantText) {
|
|
219
|
-
this.events.push({
|
|
220
|
-
type: 'block',
|
|
221
|
-
event: { event: 'block_start', index: 0, block: { type: 'text' } },
|
|
222
|
-
});
|
|
223
|
-
this.events.push({
|
|
224
|
-
type: 'tokens',
|
|
225
|
-
content: response.rawAssistantText,
|
|
226
|
-
meta: { type: 'text', visible: true, blockIndex: 0 },
|
|
227
|
-
});
|
|
228
|
-
this.events.push({
|
|
229
|
-
type: 'block',
|
|
230
|
-
event: { event: 'block_complete', index: 0, block: { type: 'text', content: response.rawAssistantText } },
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
if (response.usage) {
|
|
234
|
-
this.events.push({ type: 'usage', usage: response.usage });
|
|
235
|
-
}
|
|
236
|
-
if (response.toolCalls.length > 0) {
|
|
237
|
-
this._isWaitingForTools = true;
|
|
238
|
-
this._pendingToolCallIds = response.toolCalls.map((tc) => tc.id);
|
|
239
|
-
this.events.push({
|
|
240
|
-
type: 'tool-calls',
|
|
241
|
-
calls: response.toolCalls.map((tc) => ({
|
|
242
|
-
id: tc.id,
|
|
243
|
-
name: tc.name,
|
|
244
|
-
input: tc.input,
|
|
245
|
-
})),
|
|
246
|
-
context: {
|
|
247
|
-
rawText: '',
|
|
248
|
-
preamble: '',
|
|
249
|
-
depth: this._toolDepth,
|
|
250
|
-
previousResults: [],
|
|
251
|
-
accumulated: '',
|
|
252
|
-
roundContent: response.content,
|
|
253
|
-
},
|
|
254
|
-
});
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
this.events.push({ type: 'complete', response });
|
|
258
|
-
this.done = true;
|
|
259
|
-
}
|
|
260
|
-
provideToolResults(results, options) {
|
|
261
|
-
if (!this._isWaitingForTools)
|
|
262
|
-
throw new Error('Not waiting for tools');
|
|
263
|
-
this.receivedToolResults.push(results);
|
|
264
|
-
this.receivedToolResultOptions.push(options);
|
|
265
|
-
this._isWaitingForTools = false;
|
|
266
|
-
this._pendingToolCallIds = [];
|
|
267
|
-
this._toolDepth++;
|
|
268
|
-
if (this._toolDepth === 1) {
|
|
269
|
-
this.paused = true;
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
this.processResponse(this._toolDepth);
|
|
273
|
-
this.pendingResolve?.();
|
|
274
|
-
this.pendingResolve = null;
|
|
275
|
-
}
|
|
276
|
-
release() {
|
|
277
|
-
if (!this.paused)
|
|
278
|
-
return;
|
|
279
|
-
this.paused = false;
|
|
280
|
-
this.processResponse(this._toolDepth);
|
|
281
|
-
this.pendingResolve?.();
|
|
282
|
-
this.pendingResolve = null;
|
|
283
|
-
}
|
|
284
|
-
cancel() {
|
|
285
|
-
this.done = true;
|
|
286
|
-
this._pendingToolCallIds = [];
|
|
287
|
-
this.pendingResolve?.();
|
|
288
|
-
this.pendingResolve = null;
|
|
289
|
-
}
|
|
290
|
-
get isWaitingForTools() {
|
|
291
|
-
return this._isWaitingForTools;
|
|
292
|
-
}
|
|
293
|
-
get pendingToolCallIds() {
|
|
294
|
-
return [...this._pendingToolCallIds];
|
|
295
|
-
}
|
|
296
|
-
get toolDepth() {
|
|
297
|
-
return this._toolDepth;
|
|
298
|
-
}
|
|
299
|
-
async *[Symbol.asyncIterator]() {
|
|
300
|
-
while (true) {
|
|
301
|
-
while (this.events.length > 0) {
|
|
302
|
-
const event = this.events.shift();
|
|
303
|
-
yield event;
|
|
304
|
-
if (event.type === 'complete' || event.type === 'error' || event.type === 'aborted') {
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (this.done)
|
|
309
|
-
return;
|
|
310
|
-
await new Promise((resolve) => { this.pendingResolve = resolve; });
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
class ScenarioMembrane {
|
|
315
|
-
calls = [];
|
|
316
|
-
lastStream = null;
|
|
317
|
-
scenarios = [];
|
|
318
|
-
queueScenario(responses, opts) {
|
|
319
|
-
this.scenarios.push({ responses, pauseAfterFirstToolRound: opts?.pauseAfterFirstToolRound });
|
|
320
|
-
}
|
|
321
|
-
streamYielding(request) {
|
|
322
|
-
this.calls.push(request);
|
|
323
|
-
const next = this.scenarios.shift();
|
|
324
|
-
if (!next)
|
|
325
|
-
throw new Error('No queued stream scenario');
|
|
326
|
-
const stream = next.pauseAfterFirstToolRound
|
|
327
|
-
? new PausedAfterFirstToolRoundStream(next.responses)
|
|
328
|
-
: new MockYieldingStream(next.responses);
|
|
329
|
-
this.lastStream = stream;
|
|
330
|
-
return stream;
|
|
331
|
-
}
|
|
332
|
-
asMembrane() {
|
|
333
|
-
return this;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
function thinkDescription(request) {
|
|
337
|
-
const thinkTool = (request.tools ?? []).find((tool) => tool.name === 'think');
|
|
338
|
-
assert.ok(thinkTool, 'think tool should be present');
|
|
339
|
-
return thinkTool.description;
|
|
340
|
-
}
|
|
341
|
-
async function expectInFlightResetRestoresNextInferencePolicy(opts) {
|
|
342
|
-
const membrane = new ScenarioMembrane();
|
|
343
|
-
membrane.queueScenario([
|
|
344
|
-
createMockResponse([
|
|
345
|
-
{ type: 'text', text: 'private request before reset' },
|
|
346
|
-
{ type: 'tool_use', id: 'think-1', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
347
|
-
{
|
|
348
|
-
type: 'tool_use',
|
|
349
|
-
id: 'settings-1',
|
|
350
|
-
name: 'agent_settings',
|
|
351
|
-
input: opts.resetInput,
|
|
352
|
-
},
|
|
353
|
-
{ type: 'tool_use', id: 'read-1', name: 'tools--read', input: { path: 'project/secret.txt' } },
|
|
354
|
-
], 'tool_use'),
|
|
355
|
-
createMockResponse([
|
|
356
|
-
{ type: 'text', text: 'still private in the continuation' },
|
|
357
|
-
{ type: 'tool_use', id: 'think-2', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
358
|
-
{ type: 'tool_use', id: 'ping-1', name: 'tools--ping', input: {} },
|
|
359
|
-
], 'tool_use'),
|
|
360
|
-
createMockResponse([]),
|
|
361
|
-
], { pauseAfterFirstToolRound: true });
|
|
362
|
-
membrane.queueScenario([
|
|
363
|
-
createMockResponse(makeToolRound('public on the next inference'), 'tool_use'),
|
|
364
|
-
createMockResponse([]),
|
|
365
|
-
]);
|
|
366
|
-
const { dir, framework, routed } = await createFramework({
|
|
367
|
-
...(opts.basePolicy !== undefined ? { policy: opts.basePolicy } : {}),
|
|
368
|
-
membrane,
|
|
369
|
-
});
|
|
370
|
-
try {
|
|
371
|
-
framework.updateAgentRuntimeSettings('agent', { sameRoundThinkTextPolicy: 'private' });
|
|
372
|
-
assert.equal(framework.getAgentRuntimeSettings('agent').sameRoundThinkTextPolicy, 'private');
|
|
373
|
-
framework.start();
|
|
374
|
-
trigger(framework);
|
|
375
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
376
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
377
|
-
const firstRoundResults = membrane.lastStream.receivedToolResults[0];
|
|
378
|
-
const settingsResult = firstRoundResults.find((result) => result.toolUseId === 'settings-1');
|
|
379
|
-
assert.ok(settingsResult, 'agent_settings reset result should be present');
|
|
380
|
-
assert.match(settingsResult.content, /sameRoundThinkTextPolicyUpdateNote/);
|
|
381
|
-
assert.match(settingsResult.content, /next inference/);
|
|
382
|
-
assert.match(thinkDescription(membrane.calls[0]), /withheld from channel routing/);
|
|
383
|
-
assert.deepEqual(routed, []);
|
|
384
|
-
assert.equal(framework.getAgentRuntimeSettings('agent').sameRoundThinkTextPolicy, 'public');
|
|
385
|
-
assert.match(thinkDescription(await framework.previewActivation('agent')), /may still be routed publicly as your speech/);
|
|
386
|
-
membrane.lastStream.release();
|
|
387
|
-
await waitFor(() => framework.activeStreams.size === 0);
|
|
388
|
-
assert.deepEqual(routed, []);
|
|
389
|
-
trigger(framework);
|
|
390
|
-
await waitFor(() => membrane.calls.length === 2);
|
|
391
|
-
await waitFor(() => routed.length === 1);
|
|
392
|
-
assert.match(thinkDescription(membrane.calls[1]), /may still be routed publicly as your speech/);
|
|
393
|
-
assert.deepEqual(routed, ['public on the next inference']);
|
|
394
|
-
}
|
|
395
|
-
finally {
|
|
396
|
-
await framework.stop();
|
|
397
|
-
rmSync(dir, { recursive: true, force: true });
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
describe('same-round think text policy', () => {
|
|
401
|
-
it('compatibility default/public routes the exact Tilde-shaped same-round preface', async () => {
|
|
402
|
-
const membrane = new MockMembrane();
|
|
403
|
-
membrane.pushResponse(createMockResponse(makeToolRound(TILDE_PREFACE_80), 'tool_use'));
|
|
404
|
-
membrane.pushResponse(createMockResponse([]));
|
|
405
|
-
const { dir, framework, routed } = await createFramework({ membrane });
|
|
406
|
-
try {
|
|
407
|
-
trigger(framework);
|
|
408
|
-
await framework.runUntilIdle();
|
|
409
|
-
assert.deepEqual(routed, [TILDE_PREFACE_80]);
|
|
410
|
-
}
|
|
411
|
-
finally {
|
|
412
|
-
await framework.stop();
|
|
413
|
-
rmSync(dir, { recursive: true, force: true });
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
it('recipe private routes zero same-round prose for the exact Tilde shape', async () => {
|
|
417
|
-
const membrane = new MockMembrane();
|
|
418
|
-
membrane.pushResponse(createMockResponse(makeToolRound(TILDE_PREFACE_80), 'tool_use'));
|
|
419
|
-
membrane.pushResponse(createMockResponse([]));
|
|
420
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
421
|
-
try {
|
|
422
|
-
trigger(framework);
|
|
423
|
-
await framework.runUntilIdle();
|
|
424
|
-
assert.deepEqual(routed, []);
|
|
425
|
-
}
|
|
426
|
-
finally {
|
|
427
|
-
await framework.stop();
|
|
428
|
-
rmSync(dir, { recursive: true, force: true });
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
it('private is non-sticky: later non-think rounds and trailing prose route normally', async () => {
|
|
432
|
-
const membrane = new MockMembrane();
|
|
433
|
-
membrane.pushResponse(createMockResponse(makeToolRound(TILDE_PREFACE_80), 'tool_use'));
|
|
434
|
-
membrane.pushResponse(createMockResponse([
|
|
435
|
-
{ type: 'text', text: 'visible same turn after a non-think tool round' },
|
|
436
|
-
{ type: 'tool_use', id: 'ping-1', name: 'tools--ping', input: {} },
|
|
437
|
-
], 'tool_use'));
|
|
438
|
-
membrane.pushResponse(createMockResponse([
|
|
439
|
-
{ type: 'text', text: 'visible trailing prose after tool results' },
|
|
440
|
-
]));
|
|
441
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
442
|
-
try {
|
|
443
|
-
trigger(framework);
|
|
444
|
-
await framework.runUntilIdle();
|
|
445
|
-
assert.deepEqual(routed, [
|
|
446
|
-
'visible same turn after a non-think tool round',
|
|
447
|
-
'visible trailing prose after tool results',
|
|
448
|
-
]);
|
|
449
|
-
}
|
|
450
|
-
finally {
|
|
451
|
-
await framework.stop();
|
|
452
|
-
rmSync(dir, { recursive: true, force: true });
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
it('public remains non-silencing across later rounds and trailing prose', async () => {
|
|
456
|
-
const membrane = new MockMembrane();
|
|
457
|
-
membrane.pushResponse(createMockResponse(makeToolRound(TILDE_PREFACE_80), 'tool_use'));
|
|
458
|
-
membrane.pushResponse(createMockResponse([
|
|
459
|
-
{ type: 'text', text: 'still public in the next tool round' },
|
|
460
|
-
{ type: 'tool_use', id: 'ping-2', name: 'tools--ping', input: {} },
|
|
461
|
-
], 'tool_use'));
|
|
462
|
-
membrane.pushResponse(createMockResponse([
|
|
463
|
-
{ type: 'text', text: 'still public in trailing prose' },
|
|
464
|
-
]));
|
|
465
|
-
const { dir, framework, routed } = await createFramework({ policy: 'public', membrane });
|
|
466
|
-
try {
|
|
467
|
-
trigger(framework);
|
|
468
|
-
await framework.runUntilIdle();
|
|
469
|
-
assert.deepEqual(routed, [
|
|
470
|
-
TILDE_PREFACE_80,
|
|
471
|
-
'still public in the next tool round',
|
|
472
|
-
'still public in trailing prose',
|
|
473
|
-
]);
|
|
474
|
-
}
|
|
475
|
-
finally {
|
|
476
|
-
await framework.stop();
|
|
477
|
-
rmSync(dir, { recursive: true, force: true });
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
it('think plus skip_reply remains silent under both policies', async () => {
|
|
481
|
-
for (const policy of ['public', 'private']) {
|
|
482
|
-
const membrane = new MockMembrane();
|
|
483
|
-
membrane.pushResponse(createMockResponse([
|
|
484
|
-
{ type: 'text', text: TILDE_PREFACE_80 },
|
|
485
|
-
{ type: 'tool_use', id: `think-${policy}`, name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
486
|
-
{ type: 'tool_use', id: `skip-${policy}`, name: 'skip_reply', input: { reason: 'no reply' } },
|
|
487
|
-
], 'tool_use'));
|
|
488
|
-
membrane.pushResponse(createMockResponse([]));
|
|
489
|
-
const { dir, framework, routed } = await createFramework({ policy, membrane });
|
|
490
|
-
try {
|
|
491
|
-
trigger(framework);
|
|
492
|
-
await framework.runUntilIdle();
|
|
493
|
-
assert.deepEqual(routed, [], `${policy} should stay silent`);
|
|
494
|
-
}
|
|
495
|
-
finally {
|
|
496
|
-
await framework.stop();
|
|
497
|
-
rmSync(dir, { recursive: true, force: true });
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
it('explicit-send behavior is unchanged', async () => {
|
|
502
|
-
const membrane = new MockMembrane();
|
|
503
|
-
membrane.pushResponse(createMockResponse([
|
|
504
|
-
{ type: 'text', text: 'sending directly' },
|
|
505
|
-
{ type: 'tool_use', id: 'send-1', name: 'tools--send_message', input: { text: 'hi' } },
|
|
506
|
-
], 'tool_use'));
|
|
507
|
-
membrane.pushResponse(createMockResponse([
|
|
508
|
-
{ type: 'text', text: 'this later tool round should still stay silent' },
|
|
509
|
-
{ type: 'tool_use', id: 'ping-3', name: 'tools--ping', input: {} },
|
|
510
|
-
], 'tool_use'));
|
|
511
|
-
membrane.pushResponse(createMockResponse([
|
|
512
|
-
{ type: 'text', text: 'and trailing prose should stay silent too' },
|
|
513
|
-
]));
|
|
514
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
515
|
-
try {
|
|
516
|
-
trigger(framework);
|
|
517
|
-
await framework.runUntilIdle();
|
|
518
|
-
assert.deepEqual(routed, []);
|
|
519
|
-
}
|
|
520
|
-
finally {
|
|
521
|
-
await framework.stop();
|
|
522
|
-
rmSync(dir, { recursive: true, force: true });
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
it('private keeps the preface in Chronicle while withholding it from channel routing', async () => {
|
|
526
|
-
const membrane = new MockMembrane();
|
|
527
|
-
membrane.pushResponse(createMockResponse(makeToolRound(TILDE_PREFACE_80), 'tool_use'));
|
|
528
|
-
membrane.pushResponse(createMockResponse([]));
|
|
529
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
530
|
-
try {
|
|
531
|
-
trigger(framework);
|
|
532
|
-
await framework.runUntilIdle();
|
|
533
|
-
assert.deepEqual(routed, []);
|
|
534
|
-
const compiled = await framework.getAgent('agent').getContextManager().compile();
|
|
535
|
-
assert.ok(compiled.messages.some((message) => JSON.stringify(message.content).includes(TILDE_PREFACE_80)), 'the same-round preface should remain in Chronicle/context');
|
|
536
|
-
}
|
|
537
|
-
finally {
|
|
538
|
-
await framework.stop();
|
|
539
|
-
rmSync(dir, { recursive: true, force: true });
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
it('builds different provider-bound think descriptions per agent, and preview matches activation', async () => {
|
|
543
|
-
const { dir, framework } = await createFramework({
|
|
544
|
-
agents: [
|
|
545
|
-
{ name: 'public-agent', sameRoundThinkTextPolicy: 'public' },
|
|
546
|
-
{ name: 'private-agent', sameRoundThinkTextPolicy: 'private' },
|
|
547
|
-
],
|
|
548
|
-
});
|
|
549
|
-
try {
|
|
550
|
-
const previewPublic = await framework.previewActivation('public-agent');
|
|
551
|
-
const previewPrivate = await framework.previewActivation('private-agent');
|
|
552
|
-
const publicThink = previewPublic.tools?.find((tool) => tool.name === 'think');
|
|
553
|
-
const privateThink = previewPrivate.tools?.find((tool) => tool.name === 'think');
|
|
554
|
-
const staticThinkBefore = framework.getAllTools().find((tool) => tool.name === 'think');
|
|
555
|
-
assert.ok(publicThink);
|
|
556
|
-
assert.ok(privateThink);
|
|
557
|
-
assert.ok(staticThinkBefore);
|
|
558
|
-
assert.match(publicThink.description, /may still be routed publicly as your speech/);
|
|
559
|
-
assert.match(privateThink.description, /withheld from channel routing/);
|
|
560
|
-
assert.equal(staticThinkBefore.description, 'private reasoning');
|
|
561
|
-
const publicActivationTools = framework.getToolsForAgent('public-agent');
|
|
562
|
-
const privateActivationTools = framework.getToolsForAgent('private-agent');
|
|
563
|
-
assert.equal(publicActivationTools.find((tool) => tool.name === 'think')?.description, publicThink?.description);
|
|
564
|
-
assert.equal(privateActivationTools.find((tool) => tool.name === 'think')?.description, privateThink?.description);
|
|
565
|
-
assert.equal(framework.getAllTools().find((tool) => tool.name === 'think')?.description, 'private reasoning');
|
|
566
|
-
}
|
|
567
|
-
finally {
|
|
568
|
-
await framework.stop();
|
|
569
|
-
rmSync(dir, { recursive: true, force: true });
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
it('a host update from public to private does not retroactively change an in-flight request snapshot', async () => {
|
|
573
|
-
const membrane = new ScenarioMembrane();
|
|
574
|
-
membrane.queueScenario([
|
|
575
|
-
createMockResponse([
|
|
576
|
-
{ type: 'text', text: 'public snapshot round one' },
|
|
577
|
-
{ type: 'tool_use', id: 'think-1', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
578
|
-
{ type: 'tool_use', id: 'read-1', name: 'tools--read', input: { path: 'project/secret.txt' } },
|
|
579
|
-
], 'tool_use'),
|
|
580
|
-
createMockResponse([
|
|
581
|
-
{ type: 'text', text: 'public snapshot round two' },
|
|
582
|
-
{ type: 'tool_use', id: 'think-2', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
583
|
-
{ type: 'tool_use', id: 'ping-1', name: 'tools--ping', input: {} },
|
|
584
|
-
], 'tool_use'),
|
|
585
|
-
createMockResponse([]),
|
|
586
|
-
], { pauseAfterFirstToolRound: true });
|
|
587
|
-
membrane.queueScenario([
|
|
588
|
-
createMockResponse(makeToolRound('next inference should now be private'), 'tool_use'),
|
|
589
|
-
createMockResponse([]),
|
|
590
|
-
]);
|
|
591
|
-
const { dir, framework, routed } = await createFramework({ policy: 'public', membrane });
|
|
592
|
-
try {
|
|
593
|
-
framework.start();
|
|
594
|
-
trigger(framework);
|
|
595
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
596
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
597
|
-
assert.match(thinkDescription(membrane.calls[0]), /may still be routed publicly as your speech/);
|
|
598
|
-
assert.deepEqual(routed, ['public snapshot round one']);
|
|
599
|
-
framework.updateAgentRuntimeSettings('agent', { sameRoundThinkTextPolicy: 'private' });
|
|
600
|
-
const preview = await framework.previewActivation('agent');
|
|
601
|
-
assert.match(thinkDescription(preview), /withheld from channel routing/);
|
|
602
|
-
membrane.lastStream.release();
|
|
603
|
-
await waitFor(() => routed.length === 2);
|
|
604
|
-
assert.deepEqual(routed, [
|
|
605
|
-
'public snapshot round one',
|
|
606
|
-
'public snapshot round two',
|
|
607
|
-
]);
|
|
608
|
-
trigger(framework);
|
|
609
|
-
await waitFor(() => membrane.calls.length === 2);
|
|
610
|
-
await waitFor(() => framework.activeStreams.size === 0);
|
|
611
|
-
assert.match(thinkDescription(membrane.calls[1]), /withheld from channel routing/);
|
|
612
|
-
assert.deepEqual(routed, [
|
|
613
|
-
'public snapshot round one',
|
|
614
|
-
'public snapshot round two',
|
|
615
|
-
]);
|
|
616
|
-
}
|
|
617
|
-
finally {
|
|
618
|
-
await framework.stop();
|
|
619
|
-
rmSync(dir, { recursive: true, force: true });
|
|
620
|
-
}
|
|
621
|
-
});
|
|
622
|
-
it('a host update from private to public does not retroactively change an in-flight request snapshot', async () => {
|
|
623
|
-
const membrane = new ScenarioMembrane();
|
|
624
|
-
membrane.queueScenario([
|
|
625
|
-
createMockResponse(makeToolRound('private snapshot round one'), 'tool_use'),
|
|
626
|
-
createMockResponse([
|
|
627
|
-
{ type: 'text', text: 'private snapshot round two' },
|
|
628
|
-
{ type: 'tool_use', id: 'think-2', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
629
|
-
{ type: 'tool_use', id: 'ping-1', name: 'tools--ping', input: {} },
|
|
630
|
-
], 'tool_use'),
|
|
631
|
-
createMockResponse([]),
|
|
632
|
-
], { pauseAfterFirstToolRound: true });
|
|
633
|
-
membrane.queueScenario([
|
|
634
|
-
createMockResponse(makeToolRound('next inference should now be public'), 'tool_use'),
|
|
635
|
-
createMockResponse([]),
|
|
636
|
-
]);
|
|
637
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
638
|
-
try {
|
|
639
|
-
framework.start();
|
|
640
|
-
trigger(framework);
|
|
641
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
642
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
643
|
-
assert.match(thinkDescription(membrane.calls[0]), /withheld from channel routing/);
|
|
644
|
-
assert.deepEqual(routed, []);
|
|
645
|
-
framework.updateAgentRuntimeSettings('agent', { sameRoundThinkTextPolicy: 'public' });
|
|
646
|
-
membrane.lastStream.release();
|
|
647
|
-
await waitFor(() => framework.activeStreams.size === 0);
|
|
648
|
-
assert.deepEqual(routed, []);
|
|
649
|
-
trigger(framework);
|
|
650
|
-
await waitFor(() => membrane.calls.length === 2);
|
|
651
|
-
await waitFor(() => routed.length === 1);
|
|
652
|
-
assert.match(thinkDescription(membrane.calls[1]), /may still be routed publicly as your speech/);
|
|
653
|
-
assert.deepEqual(routed, ['next inference should now be public']);
|
|
654
|
-
}
|
|
655
|
-
finally {
|
|
656
|
-
await framework.stop();
|
|
657
|
-
rmSync(dir, { recursive: true, force: true });
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
it('same-round agent_settings updates apply immediately to preview and next request, but not to the current request snapshot', async () => {
|
|
661
|
-
const membrane = new ScenarioMembrane();
|
|
662
|
-
membrane.queueScenario([
|
|
663
|
-
createMockResponse([
|
|
664
|
-
{ type: 'text', text: 'public request before update' },
|
|
665
|
-
{ type: 'tool_use', id: 'think-1', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
666
|
-
{
|
|
667
|
-
type: 'tool_use',
|
|
668
|
-
id: 'settings-1',
|
|
669
|
-
name: 'agent_settings',
|
|
670
|
-
input: { action: 'update', same_round_think_text_policy: 'private' },
|
|
671
|
-
},
|
|
672
|
-
{ type: 'tool_use', id: 'read-1', name: 'tools--read', input: { path: 'project/secret.txt' } },
|
|
673
|
-
], 'tool_use'),
|
|
674
|
-
createMockResponse([
|
|
675
|
-
{ type: 'text', text: 'still public in the continuation' },
|
|
676
|
-
{ type: 'tool_use', id: 'think-2', name: 'think', input: { content: TILDE_THINK_4416 } },
|
|
677
|
-
{ type: 'tool_use', id: 'ping-1', name: 'tools--ping', input: {} },
|
|
678
|
-
], 'tool_use'),
|
|
679
|
-
createMockResponse([]),
|
|
680
|
-
], { pauseAfterFirstToolRound: true });
|
|
681
|
-
membrane.queueScenario([
|
|
682
|
-
createMockResponse(makeToolRound('private on the next inference'), 'tool_use'),
|
|
683
|
-
createMockResponse([]),
|
|
684
|
-
]);
|
|
685
|
-
const { dir, framework, routed } = await createFramework({ policy: 'public', membrane });
|
|
686
|
-
try {
|
|
687
|
-
framework.start();
|
|
688
|
-
trigger(framework);
|
|
689
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
690
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
691
|
-
const firstRoundResults = membrane.lastStream.receivedToolResults[0];
|
|
692
|
-
assert.ok(firstRoundResults.some((result) => result.toolUseId === 'settings-1' &&
|
|
693
|
-
result.content.includes('sameRoundThinkTextPolicyUpdateNote')));
|
|
694
|
-
assert.deepEqual(routed, ['public request before update']);
|
|
695
|
-
assert.equal(framework.getAgentRuntimeSettings('agent').sameRoundThinkTextPolicy, 'private');
|
|
696
|
-
assert.match(thinkDescription(await framework.previewActivation('agent')), /withheld from channel routing/);
|
|
697
|
-
membrane.lastStream.release();
|
|
698
|
-
await waitFor(() => routed.length === 2);
|
|
699
|
-
assert.deepEqual(routed, [
|
|
700
|
-
'public request before update',
|
|
701
|
-
'still public in the continuation',
|
|
702
|
-
]);
|
|
703
|
-
trigger(framework);
|
|
704
|
-
await waitFor(() => membrane.calls.length === 2);
|
|
705
|
-
await waitFor(() => framework.activeStreams.size === 0);
|
|
706
|
-
assert.match(thinkDescription(membrane.calls[1]), /withheld from channel routing/);
|
|
707
|
-
assert.deepEqual(routed, [
|
|
708
|
-
'public request before update',
|
|
709
|
-
'still public in the continuation',
|
|
710
|
-
]);
|
|
711
|
-
}
|
|
712
|
-
finally {
|
|
713
|
-
await framework.stop();
|
|
714
|
-
rmSync(dir, { recursive: true, force: true });
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
it('same-round agent_settings explicit reset restores the compatibility policy only on the next inference', async () => {
|
|
718
|
-
await expectInFlightResetRestoresNextInferencePolicy({
|
|
719
|
-
resetInput: { action: 'reset', settings: ['same_round_think_text_policy'] },
|
|
720
|
-
});
|
|
721
|
-
});
|
|
722
|
-
it('same-round agent_settings reset-all restores the recipe policy only on the next inference', async () => {
|
|
723
|
-
await expectInFlightResetRestoresNextInferencePolicy({
|
|
724
|
-
basePolicy: 'public',
|
|
725
|
-
resetInput: { action: 'reset' },
|
|
726
|
-
});
|
|
727
|
-
});
|
|
728
|
-
it('agent_settings reset without same_round_think_text_policy omits the next-inference note', async () => {
|
|
729
|
-
const membrane = new ScenarioMembrane();
|
|
730
|
-
membrane.queueScenario([
|
|
731
|
-
createMockResponse([
|
|
732
|
-
{ type: 'tool_use', id: 'settings-1', name: 'agent_settings', input: { action: 'reset', settings: ['tail_tokens'] } },
|
|
733
|
-
], 'tool_use'),
|
|
734
|
-
createMockResponse([]),
|
|
735
|
-
], { pauseAfterFirstToolRound: true });
|
|
736
|
-
const { dir, framework } = await createFramework({ membrane });
|
|
737
|
-
try {
|
|
738
|
-
framework.start();
|
|
739
|
-
trigger(framework);
|
|
740
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
741
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
742
|
-
const firstRoundResults = membrane.lastStream.receivedToolResults[0];
|
|
743
|
-
const settingsResult = firstRoundResults.find((result) => result.toolUseId === 'settings-1');
|
|
744
|
-
assert.ok(settingsResult, 'agent_settings reset result should be present');
|
|
745
|
-
assert.doesNotMatch(settingsResult.content, /sameRoundThinkTextPolicyUpdateNote/);
|
|
746
|
-
}
|
|
747
|
-
finally {
|
|
748
|
-
await framework.stop();
|
|
749
|
-
rmSync(dir, { recursive: true, force: true });
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
it('preview reflects a hot policy update while an already-started activation keeps its original description snapshot', async () => {
|
|
753
|
-
const membrane = new ScenarioMembrane();
|
|
754
|
-
membrane.queueScenario([
|
|
755
|
-
createMockResponse(makeToolRound('request snapshot stays public'), 'tool_use'),
|
|
756
|
-
createMockResponse([]),
|
|
757
|
-
], { pauseAfterFirstToolRound: true });
|
|
758
|
-
const { dir, framework } = await createFramework({ policy: 'public', membrane });
|
|
759
|
-
try {
|
|
760
|
-
framework.start();
|
|
761
|
-
trigger(framework);
|
|
762
|
-
await waitFor(() => membrane.calls.length === 1);
|
|
763
|
-
await waitFor(() => membrane.lastStream?.receivedToolResults.length === 1);
|
|
764
|
-
assert.match(thinkDescription(membrane.calls[0]), /may still be routed publicly as your speech/);
|
|
765
|
-
framework.updateAgentRuntimeSettings('agent', { sameRoundThinkTextPolicy: 'private' });
|
|
766
|
-
assert.match(thinkDescription(await framework.previewActivation('agent')), /withheld from channel routing/);
|
|
767
|
-
assert.match(thinkDescription(membrane.calls[0]), /may still be routed publicly as your speech/);
|
|
768
|
-
}
|
|
769
|
-
finally {
|
|
770
|
-
await framework.stop();
|
|
771
|
-
rmSync(dir, { recursive: true, force: true });
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
it('private policy suppresses only the synthesized think tool, not namespaced tools named think', async () => {
|
|
775
|
-
const membrane = new MockMembrane();
|
|
776
|
-
membrane.pushResponse(createMockResponse([
|
|
777
|
-
{ type: 'text', text: 'namespaced think should still route' },
|
|
778
|
-
{ type: 'tool_use', id: 'module-think-1', name: 'tools--think', input: { content: 'module thought' } },
|
|
779
|
-
], 'tool_use'));
|
|
780
|
-
membrane.pushResponse(createMockResponse([]));
|
|
781
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
782
|
-
try {
|
|
783
|
-
trigger(framework);
|
|
784
|
-
await framework.runUntilIdle();
|
|
785
|
-
assert.deepEqual(routed, ['namespaced think should still route']);
|
|
786
|
-
}
|
|
787
|
-
finally {
|
|
788
|
-
await framework.stop();
|
|
789
|
-
rmSync(dir, { recursive: true, force: true });
|
|
790
|
-
}
|
|
791
|
-
});
|
|
792
|
-
it('suppression logs do not include the withheld prose text', async () => {
|
|
793
|
-
const membrane = new MockMembrane();
|
|
794
|
-
const withheld = 'withheld private prose should not appear in logs';
|
|
795
|
-
membrane.pushResponse(createMockResponse(makeToolRound(withheld), 'tool_use'));
|
|
796
|
-
membrane.pushResponse(createMockResponse([]));
|
|
797
|
-
const { dir, framework } = await createFramework({ policy: 'private', membrane });
|
|
798
|
-
const originalError = console.error;
|
|
799
|
-
const errors = [];
|
|
800
|
-
console.error = (...args) => { errors.push(args.join(' ')); };
|
|
801
|
-
try {
|
|
802
|
-
trigger(framework);
|
|
803
|
-
await framework.runUntilIdle();
|
|
804
|
-
assert.ok(errors.some((line) => line.includes('same_round_think_text_policy=private')));
|
|
805
|
-
assert.ok(errors.every((line) => !line.includes(withheld)));
|
|
806
|
-
}
|
|
807
|
-
finally {
|
|
808
|
-
console.error = originalError;
|
|
809
|
-
await framework.stop();
|
|
810
|
-
rmSync(dir, { recursive: true, force: true });
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
it('an ephemeral request gets its own effective think description snapshot', async () => {
|
|
814
|
-
const membrane = new ScenarioMembrane();
|
|
815
|
-
membrane.queueScenario([
|
|
816
|
-
createMockResponse([{ type: 'text', text: 'ephemeral done' }]),
|
|
817
|
-
]);
|
|
818
|
-
const { dir, framework } = await createFramework({ membrane });
|
|
819
|
-
try {
|
|
820
|
-
const created = await framework.createEphemeralAgent({
|
|
821
|
-
name: 'ephemeral-worker',
|
|
822
|
-
model: 'test-model',
|
|
823
|
-
systemPrompt: 'test',
|
|
824
|
-
allowedTools: 'all',
|
|
825
|
-
sameRoundThinkTextPolicy: 'private',
|
|
826
|
-
});
|
|
827
|
-
created.contextManager.addMessage('user', [{ type: 'text', text: 'go' }]);
|
|
828
|
-
const run = framework.runEphemeralToCompletion(created.agent, created.contextManager);
|
|
829
|
-
framework.start();
|
|
830
|
-
const result = await run;
|
|
831
|
-
assert.equal(result.speech, 'ephemeral done');
|
|
832
|
-
assert.match(thinkDescription(membrane.calls[0]), /withheld from channel routing/);
|
|
833
|
-
}
|
|
834
|
-
finally {
|
|
835
|
-
await framework.stop();
|
|
836
|
-
rmSync(dir, { recursive: true, force: true });
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
it('legacy/no-roundContent behavior remains unchanged', async () => {
|
|
840
|
-
const membrane = new LegacyNoRoundContentMembrane();
|
|
841
|
-
const { dir, framework, routed } = await createFramework({ policy: 'private', membrane });
|
|
842
|
-
try {
|
|
843
|
-
trigger(framework);
|
|
844
|
-
await framework.runUntilIdle();
|
|
845
|
-
assert.deepEqual(routed, [TILDE_PREFACE_80]);
|
|
846
|
-
}
|
|
847
|
-
finally {
|
|
848
|
-
await framework.stop();
|
|
849
|
-
rmSync(dir, { recursive: true, force: true });
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
});
|
|
853
|
-
//# sourceMappingURL=same-round-think-policy.test.js.map
|