@animalabs/agent-framework 0.22.2 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -4
- package/dist/src/agent.d.ts +108 -17
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +207 -67
- 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/index.d.ts +1 -1
- package/dist/src/code-execution/index.d.ts.map +1 -1
- package/dist/src/code-execution/index.js.map +1 -1
- package/dist/src/code-execution/py-runner.d.ts +50 -7
- package/dist/src/code-execution/py-runner.d.ts.map +1 -1
- package/dist/src/code-execution/py-runner.js +258 -90
- package/dist/src/code-execution/py-runner.js.map +1 -1
- package/dist/src/code-execution/runtime-py.d.ts +3 -2
- package/dist/src/code-execution/runtime-py.d.ts.map +1 -1
- package/dist/src/code-execution/runtime-py.js +94 -8
- package/dist/src/code-execution/runtime-py.js.map +1 -1
- package/dist/src/code-execution/tool-definition.d.ts +17 -1
- package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
- package/dist/src/code-execution/tool-definition.js +72 -6
- 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 +56 -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 +1529 -165
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +8264 -1939
- 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 +36 -5
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/held-writes.d.ts +16 -0
- package/dist/src/held-writes.d.ts.map +1 -0
- package/dist/src/held-writes.js +56 -0
- package/dist/src/held-writes.js.map +1 -0
- package/dist/src/index.d.ts +10 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcpl/capability-grant.d.ts +4 -0
- package/dist/src/mcpl/capability-grant.d.ts.map +1 -1
- package/dist/src/mcpl/capability-grant.js +1 -1
- package/dist/src/mcpl/capability-grant.js.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +233 -18
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +975 -386
- 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 +88 -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 +7 -1
- package/dist/src/mcpl/index.d.ts.map +1 -1
- package/dist/src/mcpl/index.js +5 -1
- package/dist/src/mcpl/index.js.map +1 -1
- package/dist/src/mcpl/inference-router.d.ts +19 -13
- package/dist/src/mcpl/inference-router.d.ts.map +1 -1
- package/dist/src/mcpl/inference-router.js +155 -87
- package/dist/src/mcpl/inference-router.js.map +1 -1
- package/dist/src/mcpl/log-value.d.ts +7 -0
- package/dist/src/mcpl/log-value.d.ts.map +1 -1
- package/dist/src/mcpl/log-value.js +9 -0
- package/dist/src/mcpl/log-value.js.map +1 -1
- package/dist/src/mcpl/modern-connection.d.ts +227 -0
- package/dist/src/mcpl/modern-connection.d.ts.map +1 -0
- package/dist/src/mcpl/modern-connection.js +1088 -0
- package/dist/src/mcpl/modern-connection.js.map +1 -0
- package/dist/src/mcpl/prefix-rule.d.ts +18 -0
- package/dist/src/mcpl/prefix-rule.d.ts.map +1 -0
- package/dist/src/mcpl/prefix-rule.js +25 -0
- package/dist/src/mcpl/prefix-rule.js.map +1 -0
- package/dist/src/mcpl/protocol-family.d.ts +179 -0
- package/dist/src/mcpl/protocol-family.d.ts.map +1 -0
- package/dist/src/mcpl/protocol-family.js +697 -0
- package/dist/src/mcpl/protocol-family.js.map +1 -0
- package/dist/src/mcpl/push-coalescer.d.ts +58 -17
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +93 -32
- 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 +76 -13
- package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
- package/dist/src/mcpl/reference-fetcher.js +275 -66
- package/dist/src/mcpl/reference-fetcher.js.map +1 -1
- package/dist/src/mcpl/references.d.ts +98 -18
- package/dist/src/mcpl/references.d.ts.map +1 -1
- package/dist/src/mcpl/references.js +170 -32
- package/dist/src/mcpl/references.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +406 -31
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +1331 -272
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/server-registry.d.ts +35 -6
- package/dist/src/mcpl/server-registry.d.ts.map +1 -1
- package/dist/src/mcpl/server-registry.js +63 -13
- package/dist/src/mcpl/server-registry.js.map +1 -1
- package/dist/src/mcpl/skip-reply-wake.d.ts +36 -0
- package/dist/src/mcpl/skip-reply-wake.d.ts.map +1 -0
- package/dist/src/mcpl/skip-reply-wake.js +55 -0
- package/dist/src/mcpl/skip-reply-wake.js.map +1 -0
- package/dist/src/mcpl/tool-result-normalize.d.ts +54 -0
- package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -0
- package/dist/src/mcpl/tool-result-normalize.js +232 -0
- package/dist/src/mcpl/tool-result-normalize.js.map +1 -0
- package/dist/src/mcpl/transport.d.ts +104 -12
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +315 -85
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +76 -19
- 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 +16 -0
- package/dist/src/mcpl/visible-content.d.ts.map +1 -1
- package/dist/src/mcpl/visible-content.js +26 -0
- package/dist/src/mcpl/visible-content.js.map +1 -1
- package/dist/src/module-registry.d.ts +34 -6
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +119 -31
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/api/index.d.ts +1 -1
- package/dist/src/modules/api/index.d.ts.map +1 -1
- package/dist/src/modules/api/index.js +3 -2
- package/dist/src/modules/api/index.js.map +1 -1
- package/dist/src/modules/discord/discord-js-client.d.ts +43 -2
- package/dist/src/modules/discord/discord-js-client.d.ts.map +1 -1
- package/dist/src/modules/discord/discord-js-client.js +286 -67
- package/dist/src/modules/discord/discord-js-client.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts +53 -5
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +712 -186
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/discord/refusal.d.ts +14 -0
- package/dist/src/modules/discord/refusal.d.ts.map +1 -0
- package/dist/src/modules/discord/refusal.js +14 -0
- package/dist/src/modules/discord/refusal.js.map +1 -0
- package/dist/src/modules/discord/types.d.ts +27 -4
- 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 +8 -3
- 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/index.d.ts +1 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js +1 -1
- package/dist/src/modules/index.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 +57 -4
- package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +75 -7
- package/dist/src/modules/workspace/disk-agreement.js.map +1 -1
- package/dist/src/modules/workspace/effects.d.ts +66 -7
- package/dist/src/modules/workspace/effects.d.ts.map +1 -1
- package/dist/src/modules/workspace/effects.js +303 -46
- package/dist/src/modules/workspace/effects.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +313 -45
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +1404 -304
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +315 -16
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +727 -37
- 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 +28 -5
- 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 +49 -2
- package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
- package/dist/src/modules/workspace/watcher.js +158 -29
- 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/silent-heartbeat.d.ts +112 -39
- package/dist/src/silent-heartbeat.d.ts.map +1 -1
- package/dist/src/silent-heartbeat.js +100 -29
- package/dist/src/silent-heartbeat.js.map +1 -1
- package/dist/src/tool-args.d.ts +40 -0
- package/dist/src/tool-args.d.ts.map +1 -0
- package/dist/src/tool-args.js +207 -0
- package/dist/src/tool-args.js.map +1 -0
- 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 +266 -62
- 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 +44 -22
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +25 -0
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +38 -7
- 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 +77 -14
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +97 -8
- 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 +5 -4
- package/src/agent.ts +257 -72
- 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/index.ts +1 -0
- package/src/code-execution/py-runner.ts +304 -93
- package/src/code-execution/runtime-py.ts +94 -8
- package/src/code-execution/tool-definition.ts +85 -7
- package/src/config-checks.ts +50 -0
- package/src/deadline-timer.ts +44 -0
- package/src/error-message.ts +48 -0
- package/src/framework.ts +8625 -1984
- package/src/gate/event-gate.ts +38 -5
- package/src/held-writes.ts +59 -0
- package/src/index.ts +29 -5
- package/src/mcpl/capability-grant.ts +1 -1
- package/src/mcpl/channel-registry.ts +1095 -411
- package/src/mcpl/checkpoint-manager.ts +104 -29
- package/src/mcpl/conversation-router.ts +28 -8
- package/src/mcpl/convert-block.ts +105 -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 +23 -1
- package/src/mcpl/inference-router.ts +179 -103
- package/src/mcpl/log-value.ts +10 -0
- package/src/mcpl/modern-connection.ts +1182 -0
- package/src/mcpl/prefix-rule.ts +32 -0
- package/src/mcpl/protocol-family.ts +691 -0
- package/src/mcpl/push-coalescer.ts +110 -36
- package/src/mcpl/push-handler.ts +20 -90
- package/src/mcpl/reference-fetcher.ts +318 -67
- package/src/mcpl/references.ts +183 -34
- package/src/mcpl/server-connection.ts +1404 -280
- package/src/mcpl/server-registry.ts +63 -14
- package/src/mcpl/skip-reply-wake.ts +73 -0
- package/src/mcpl/tool-result-normalize.ts +294 -0
- package/src/mcpl/transport.ts +320 -76
- package/src/mcpl/types.ts +77 -19
- package/src/mcpl/visible-content.ts +28 -0
- package/src/module-registry.ts +126 -36
- package/src/modules/api/index.ts +3 -2
- package/src/modules/discord/discord-js-client.ts +306 -74
- package/src/modules/discord/index.ts +737 -201
- package/src/modules/discord/refusal.ts +13 -0
- package/src/modules/discord/types.ts +27 -6
- package/src/modules/health/index.ts +8 -3
- package/src/modules/history/index.ts +410 -120
- package/src/modules/history/semantic.ts +189 -32
- package/src/modules/index.ts +1 -1
- package/src/modules/unknown-tool.ts +16 -0
- package/src/modules/workspace/disk-agreement.ts +97 -8
- package/src/modules/workspace/effects.ts +291 -36
- package/src/modules/workspace/index.ts +1469 -321
- package/src/modules/workspace/observe.ts +784 -41
- package/src/modules/workspace/reconcile.ts +619 -64
- package/src/modules/workspace/types.ts +28 -5
- package/src/modules/workspace/watcher.ts +154 -30
- 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/silent-heartbeat.ts +184 -59
- package/src/tool-args.ts +213 -0
- package/src/tool-image-ledger.ts +153 -34
- package/src/tool-presentation.ts +233 -42
- 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 +44 -24
- package/src/types/events.ts +25 -0
- package/src/types/framework.ts +38 -7
- package/src/types/inference-log.ts +1 -1
- package/src/types/module.ts +79 -14
- package/src/types/trace.ts +103 -8
- 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
|
@@ -5,31 +5,48 @@
|
|
|
5
5
|
* downstream wake policies can key on creation vs. modification vs. deletion.
|
|
6
6
|
*/
|
|
7
7
|
import { watch } from 'chokidar';
|
|
8
|
-
import { mkdirSync, statSync } from 'node:fs';
|
|
9
|
-
import { basename, sep } from 'node:path';
|
|
8
|
+
import { closeSync, constants, fstatSync, mkdirSync, openSync, statSync } from 'node:fs';
|
|
9
|
+
import { basename, resolve, sep } from 'node:path';
|
|
10
|
+
import { passedOverAt } from './observe.js';
|
|
11
|
+
const identityOf = (stat) => ({ dev: stat.dev, ino: stat.ino, birthtimeMs: stat.birthtimeMs });
|
|
10
12
|
/**
|
|
11
13
|
* Manages filesystem watching for a single mount.
|
|
12
14
|
* Handles debouncing, ignore patterns, and write suppression.
|
|
13
15
|
*/
|
|
14
16
|
export class MountWatcher {
|
|
17
|
+
others;
|
|
15
18
|
watcher = null;
|
|
16
19
|
// Most recent op seen per path within the current debounce window.
|
|
17
|
-
// create -> modify collapses to 'created' (single batch);
|
|
20
|
+
// create -> modify collapses to 'created' (single batch); a trailing delete
|
|
21
|
+
// wins, and delete -> create reads as 'modified' (see mergeOp).
|
|
18
22
|
pendingChanges = new Map();
|
|
19
23
|
debounceTimer = null;
|
|
20
24
|
rootPollTimer = null;
|
|
21
25
|
suppressedPaths = new Set();
|
|
22
26
|
suppressionTimers = new Map();
|
|
23
27
|
rootIdentity = null;
|
|
28
|
+
// The root as last attached, held open on Linux (see holdRoot).
|
|
29
|
+
rootFd = null;
|
|
24
30
|
detached = false;
|
|
25
31
|
attaching = false;
|
|
26
32
|
stopped = true;
|
|
27
33
|
debounceMs;
|
|
28
34
|
config;
|
|
35
|
+
/**
|
|
36
|
+
* The root as the watcher makes, holds, watches and checks it, and as each
|
|
37
|
+
* event's path is read against: the configured path resolved (a link in it
|
|
38
|
+
* kept), since chokidar hands back the paths it reports normalized, and
|
|
39
|
+
* those of a root configured as `./m` matched none of them.
|
|
40
|
+
*/
|
|
41
|
+
root;
|
|
29
42
|
onChangeCallback;
|
|
30
43
|
lifecycle;
|
|
31
|
-
constructor(config, onChange, lifecycle = {}
|
|
44
|
+
constructor(config, onChange, lifecycle = {},
|
|
45
|
+
/** Other mounts' directories nested in this one, mount-relative: passed over as a walk passes over them. */
|
|
46
|
+
others = []) {
|
|
47
|
+
this.others = others;
|
|
32
48
|
this.config = config;
|
|
49
|
+
this.root = resolve(config.path);
|
|
33
50
|
this.debounceMs = config.watchDebounceMs ?? 300;
|
|
34
51
|
this.onChangeCallback = onChange;
|
|
35
52
|
this.lifecycle = lifecycle;
|
|
@@ -54,15 +71,33 @@ export class MountWatcher {
|
|
|
54
71
|
// directories a user asked us only to read would be surprising.
|
|
55
72
|
if (this.config.mode === 'read-write') {
|
|
56
73
|
try {
|
|
57
|
-
mkdirSync(this.
|
|
74
|
+
mkdirSync(this.root, { recursive: true });
|
|
58
75
|
}
|
|
59
76
|
catch (err) {
|
|
60
77
|
this.lifecycle.onError?.(err instanceof Error ? err : new Error(String(err)));
|
|
61
78
|
}
|
|
62
79
|
}
|
|
63
|
-
const
|
|
64
|
-
this.watcher = watch(this.
|
|
65
|
-
|
|
80
|
+
const ignore = this.config.ignore ?? [];
|
|
81
|
+
this.watcher = watch(this.root, {
|
|
82
|
+
// What a walk passes over by design, by the path relative to the mount:
|
|
83
|
+
// another mount's directory, the mount's ignore list and editors' swap
|
|
84
|
+
// and backup files. chokidar 4
|
|
85
|
+
// compares a string given here with the whole absolute path, so the
|
|
86
|
+
// list itself would match nothing.
|
|
87
|
+
ignored: (path) => {
|
|
88
|
+
const relative = this.toRelative(path);
|
|
89
|
+
return relative !== null && passedOverAt(relative, ignore, this.others) !== undefined;
|
|
90
|
+
},
|
|
91
|
+
// Its filter for editors' files tested the whole path, so a directory
|
|
92
|
+
// with a dot in its name hid every `*.swp` beneath it, and the walk
|
|
93
|
+
// didn't agree. An editor's save by rename then arrives as an unlink at
|
|
94
|
+
// once, and an add once `awaitWriteFinish` finds the new copy settled.
|
|
95
|
+
// A pass reads disk, not the ops, after the debounce's quiet spell
|
|
96
|
+
// following the last event: a copy on disk by then is taken in as a
|
|
97
|
+
// change, one still being written is read as it stands and taken in
|
|
98
|
+
// again when its add comes, and a re-add after a longer spell is a
|
|
99
|
+
// deletion and then a creation.
|
|
100
|
+
atomic: false,
|
|
66
101
|
persistent: true,
|
|
67
102
|
ignoreInitial: true,
|
|
68
103
|
followSymlinks: this.config.followSymlinks ?? false,
|
|
@@ -97,14 +132,21 @@ export class MountWatcher {
|
|
|
97
132
|
this.watcher.on('error', (err) => {
|
|
98
133
|
this.reportError(err);
|
|
99
134
|
});
|
|
100
|
-
this.watcher.on('raw', (event, rawPath
|
|
101
|
-
|
|
135
|
+
this.watcher.on('raw', (event, rawPath) => {
|
|
136
|
+
// libuv reports the root's own move as a rename under the root's name,
|
|
137
|
+
// and its removal too once nothing holds it open. An entry beneath the
|
|
138
|
+
// root with that name comes the same way, as does, on macOS, an
|
|
139
|
+
// FSEvents event for the root that carries no modification flags, such
|
|
140
|
+
// as its making just before the watch. A held root tells these apart
|
|
141
|
+
// (checkRootLiveness), so the rename runs the check at once. A root
|
|
142
|
+
// that isn't held can be made again with the removed one's identity,
|
|
143
|
+
// so there the rename forces a re-attach. A rename without a name, as
|
|
144
|
+
// libuv gives for a file whose path it can't read, is passed over.
|
|
145
|
+
if (event !== 'rename' || typeof rawPath !== 'string')
|
|
102
146
|
return;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
void this.checkRootLiveness({ force: true });
|
|
107
|
-
}
|
|
147
|
+
if (basename(rawPath) !== basename(this.root))
|
|
148
|
+
return;
|
|
149
|
+
void this.checkRootLiveness({ force: this.rootFd === null });
|
|
108
150
|
});
|
|
109
151
|
this.captureRootIdentity();
|
|
110
152
|
}
|
|
@@ -127,6 +169,8 @@ export class MountWatcher {
|
|
|
127
169
|
this.suppressionTimers.clear();
|
|
128
170
|
this.suppressedPaths.clear();
|
|
129
171
|
this.pendingChanges.clear();
|
|
172
|
+
// Before the close, so a close that fails still lets go of the root.
|
|
173
|
+
this.releaseRoot();
|
|
130
174
|
if (this.watcher) {
|
|
131
175
|
await this.watcher.close();
|
|
132
176
|
this.watcher = null;
|
|
@@ -213,6 +257,15 @@ export class MountWatcher {
|
|
|
213
257
|
}, pollMs);
|
|
214
258
|
this.rootPollTimer.unref();
|
|
215
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Whether the root is still the directory the watcher attached to, checked
|
|
262
|
+
* every `watchRootPollMs` and at a rename under the root's name. A root
|
|
263
|
+
* replaced at its path, or whose held directory has been removed, is
|
|
264
|
+
* attached to again, and with `force` so is one that looks unchanged. A
|
|
265
|
+
* root that's gone is let go of: a read-write mount makes it again and
|
|
266
|
+
* attaches to it, and a read-only one waits, detached, until a check finds
|
|
267
|
+
* it back.
|
|
268
|
+
*/
|
|
216
269
|
async checkRootLiveness(opts = {}) {
|
|
217
270
|
if (this.stopped || this.attaching)
|
|
218
271
|
return;
|
|
@@ -221,8 +274,10 @@ export class MountWatcher {
|
|
|
221
274
|
current = this.readRootIdentity();
|
|
222
275
|
}
|
|
223
276
|
catch (err) {
|
|
224
|
-
|
|
277
|
+
// A held root that has been removed is gone, whatever the path's error.
|
|
278
|
+
if (this.isErrno(err, 'ENOENT') || this.heldRootRemoved()) {
|
|
225
279
|
this.detached = true;
|
|
280
|
+
this.releaseRoot();
|
|
226
281
|
if (this.config.mode === 'read-write') {
|
|
227
282
|
await this.reattach();
|
|
228
283
|
}
|
|
@@ -240,7 +295,7 @@ export class MountWatcher {
|
|
|
240
295
|
return;
|
|
241
296
|
}
|
|
242
297
|
if (!opts.force && !this.detached && this.rootIdentity
|
|
243
|
-
&& this.sameIdentity(current, this.rootIdentity)) {
|
|
298
|
+
&& this.sameIdentity(current, this.rootIdentity) && !this.heldRootRemoved()) {
|
|
244
299
|
return;
|
|
245
300
|
}
|
|
246
301
|
await this.reattach();
|
|
@@ -252,8 +307,16 @@ export class MountWatcher {
|
|
|
252
307
|
try {
|
|
253
308
|
const oldWatcher = this.watcher;
|
|
254
309
|
this.watcher = null;
|
|
310
|
+
this.releaseRoot();
|
|
255
311
|
if (oldWatcher) {
|
|
256
|
-
|
|
312
|
+
try {
|
|
313
|
+
await oldWatcher.close();
|
|
314
|
+
}
|
|
315
|
+
catch (err) {
|
|
316
|
+
// chokidar removes its listeners before it closes, so the old
|
|
317
|
+
// instance reports nothing more, and the root is attached to again.
|
|
318
|
+
this.reportError(err);
|
|
319
|
+
}
|
|
257
320
|
}
|
|
258
321
|
if (this.stopped)
|
|
259
322
|
return;
|
|
@@ -271,10 +334,12 @@ export class MountWatcher {
|
|
|
271
334
|
}
|
|
272
335
|
captureRootIdentity() {
|
|
273
336
|
try {
|
|
274
|
-
this.rootIdentity = this.
|
|
337
|
+
this.rootIdentity = this.holdRoot();
|
|
275
338
|
this.detached = false;
|
|
276
339
|
}
|
|
277
340
|
catch (err) {
|
|
341
|
+
// What holdRoot opened before it failed isn't held.
|
|
342
|
+
this.releaseRoot();
|
|
278
343
|
if (this.isErrno(err, 'ENOENT')) {
|
|
279
344
|
this.rootIdentity = null;
|
|
280
345
|
this.detached = true;
|
|
@@ -285,13 +350,81 @@ export class MountWatcher {
|
|
|
285
350
|
this.reportError(err);
|
|
286
351
|
}
|
|
287
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* The root's identity, with the root held open on Linux until the watcher
|
|
355
|
+
* lets go of it: at a re-attach, when the root is found gone, or at the
|
|
356
|
+
* stop. The held directory then says itself whether it has been removed
|
|
357
|
+
* (heldRootRemoved). A removed directory's inode number can otherwise go
|
|
358
|
+
* to the next directory made, as ext4 gives it, and one held open isn't
|
|
359
|
+
* given out. Elsewhere, or where the root can't be opened as a directory,
|
|
360
|
+
* as without read permission, at the process's file limit or when the
|
|
361
|
+
* path isn't a directory, it isn't held, and its identity is read from its
|
|
362
|
+
* path. So too where the root's link count reads 0 as it's opened: if
|
|
363
|
+
* that's the file system's count for a directory in place, a later check
|
|
364
|
+
* would take the root for removed and re-attach at every poll.
|
|
365
|
+
*/
|
|
366
|
+
holdRoot() {
|
|
367
|
+
if (process.platform !== 'linux')
|
|
368
|
+
return this.readRootIdentity();
|
|
369
|
+
let fd;
|
|
370
|
+
try {
|
|
371
|
+
// A directory only, so a FIFO at the path fails at once rather than
|
|
372
|
+
// blocking until a writer opens it.
|
|
373
|
+
fd = openSync(this.root, constants.O_RDONLY | constants.O_DIRECTORY);
|
|
374
|
+
}
|
|
375
|
+
catch {
|
|
376
|
+
return this.readRootIdentity();
|
|
377
|
+
}
|
|
378
|
+
this.rootFd = fd;
|
|
379
|
+
const stats = fstatSync(fd);
|
|
380
|
+
if (stats.nlink === 0) {
|
|
381
|
+
this.releaseRoot();
|
|
382
|
+
return this.readRootIdentity();
|
|
383
|
+
}
|
|
384
|
+
return identityOf(stats);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Whether the directory the watcher holds has been removed, which its link
|
|
388
|
+
* count says whatever has since been made at its path. On a file system
|
|
389
|
+
* whose inode numbers a server gives out, the hold can't keep a root made
|
|
390
|
+
* again from taking the removed one's number, and a removal by another
|
|
391
|
+
* client shows once this one revalidates the directory's cached
|
|
392
|
+
* attributes. A held directory that can't be read, as a stale one on a
|
|
393
|
+
* network file system, counts as removed.
|
|
394
|
+
*/
|
|
395
|
+
heldRootRemoved() {
|
|
396
|
+
if (this.rootFd === null)
|
|
397
|
+
return false;
|
|
398
|
+
try {
|
|
399
|
+
return fstatSync(this.rootFd).nlink === 0;
|
|
400
|
+
}
|
|
401
|
+
catch {
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
releaseRoot() {
|
|
406
|
+
if (this.rootFd === null)
|
|
407
|
+
return;
|
|
408
|
+
const fd = this.rootFd;
|
|
409
|
+
this.rootFd = null;
|
|
410
|
+
try {
|
|
411
|
+
closeSync(fd);
|
|
412
|
+
}
|
|
413
|
+
catch (err) {
|
|
414
|
+
// Linux frees the descriptor whatever close returns, so the error is
|
|
415
|
+
// reported and what called this goes on.
|
|
416
|
+
this.reportError(err);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
288
419
|
readRootIdentity() {
|
|
289
|
-
|
|
290
|
-
return { dev: stat.dev, ino: stat.ino, birthtimeMs: stat.birthtimeMs };
|
|
420
|
+
return identityOf(statSync(this.root));
|
|
291
421
|
}
|
|
292
422
|
sameIdentity(a, b) {
|
|
293
|
-
// birthtimeMs
|
|
294
|
-
//
|
|
423
|
+
// birthtimeMs tells a root made again from a removed one whose inode
|
|
424
|
+
// number it took, unless both were made within one tick of the clock or
|
|
425
|
+
// the file system keeps no birth time. A held root's removal shows in its
|
|
426
|
+
// link count instead, and where the root isn't held the rename's force
|
|
427
|
+
// covers those.
|
|
295
428
|
return a.dev === b.dev && a.ino === b.ino && a.birthtimeMs === b.birthtimeMs;
|
|
296
429
|
}
|
|
297
430
|
isErrno(err, code) {
|
|
@@ -305,18 +438,14 @@ export class MountWatcher {
|
|
|
305
438
|
// Chokidar hands back platform-separated absolute paths; compare with
|
|
306
439
|
// the platform separator and normalize the result to the '/'-separated
|
|
307
440
|
// logical form the rest of the workspace uses. No-op on POSIX.
|
|
308
|
-
const base = this.
|
|
309
|
-
? this.config.path
|
|
310
|
-
: this.config.path + sep;
|
|
441
|
+
const base = this.root.endsWith(sep) ? this.root : this.root + sep;
|
|
311
442
|
if (absolutePath.startsWith(base)) {
|
|
312
443
|
return absolutePath.slice(base.length).split(sep).join('/');
|
|
313
444
|
}
|
|
314
445
|
return null;
|
|
315
446
|
}
|
|
316
447
|
isRootPath(absolutePath) {
|
|
317
|
-
const root = this.
|
|
318
|
-
? this.config.path.slice(0, -1)
|
|
319
|
-
: this.config.path;
|
|
448
|
+
const root = this.root.endsWith(sep) ? this.root.slice(0, -1) : this.root;
|
|
320
449
|
const candidate = absolutePath.endsWith(sep)
|
|
321
450
|
? absolutePath.slice(0, -1)
|
|
322
451
|
: absolutePath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.js","sourceRoot":"","sources":["../../../../src/modules/workspace/watcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAkB,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAkC1C;;;GAGG;AACH,MAAM,OAAO,YAAY;IACf,OAAO,GAAqB,IAAI,CAAC;IACzC,mEAAmE;IACnE,8EAA8E;IACtE,cAAc,GAAG,IAAI,GAAG,EAAgB,CAAC;IACzC,aAAa,GAAyC,IAAI,CAAC;IAC3D,aAAa,GAA0C,IAAI,CAAC;IAC5D,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,iBAAiB,GAAG,IAAI,GAAG,EAAyC,CAAC;IACrE,YAAY,GAAwB,IAAI,CAAC;IACzC,QAAQ,GAAG,KAAK,CAAC;IACjB,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,GAAG,IAAI,CAAC;IACN,UAAU,CAAS;IACnB,MAAM,CAAc;IACpB,gBAAgB,CAAgC;IAChD,SAAS,CAAmB;IAE7C,YACE,MAAmB,EACnB,QAAuC,EACvC,SAAS,GAAqB,EAAE;QAEhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,eAAe,IAAI,GAAG,CAAC;QAChD,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO;QAE/C,IAAI,CAAC,O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C,GAAG,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAEO,UAAU,CAAC,YAAoB;QACrC,sEAAsE;QACtE,uEAAuE;QACvE,+DAA+D;QAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QACnE,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,UAAU,CAAC,YAAoB;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1E,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC1C,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3B,CAAC,CAAC,YAAY,CAAC;QACjB,OAAO,SAAS,KAAK,IAAI,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Held prose drafts: a resident's plain speech that was not sent.
|
|
3
|
+
*
|
|
4
|
+
* Plain speech is held back for reasons that are right in themselves: an
|
|
5
|
+
* explicit send in the same round suppresses the round's prose (so a "sent
|
|
6
|
+
* it" postscript is not posted twice), a turn may have no destination, and a
|
|
7
|
+
* malformed or unresolvable routing prefix bounces. Before drafts, the held words were
|
|
8
|
+
* kept only as a count (or, in explicit mode, as one in-memory latest-wins
|
|
9
|
+
* clipboard): the law was right, and the penalty was amnesia. A draft keeps
|
|
10
|
+
* the exact words until the resident resends or dismisses them, or the
|
|
11
|
+
* retention below lets it go.
|
|
12
|
+
*
|
|
13
|
+
* The boundary is publication and agency, not visibility: a draft is never
|
|
14
|
+
* published except by its resident's explicit resend (or `{{unsent}}`), and
|
|
15
|
+
* only that resident can list or act on it. Its notices go into the
|
|
16
|
+
* resident's own history — which residents that share one message slot
|
|
17
|
+
* (#197) share, as they already share the assistant turn the words came
|
|
18
|
+
* from.
|
|
19
|
+
*
|
|
20
|
+
* Durability is outside the conversation. Drafts live in a RecordJournal of
|
|
21
|
+
* typed Chronicle records, which do not follow branch switches: undo,
|
|
22
|
+
* rollback, suppression and branch moves never touch them. A draft written
|
|
23
|
+
* in a turn that is later undone stays usable (the words were genuinely
|
|
24
|
+
* written and held back), and a delivered draft stays delivered. The
|
|
25
|
+
* notices that name a draft are conversation, so they do follow the branch: a draft counts as
|
|
26
|
+
* named while a message naming it is on the current branch, and one a
|
|
27
|
+
* rollback or branch move has left unnamed is named again.
|
|
28
|
+
*
|
|
29
|
+
* Drafts are kept, not hoarded. Each resident's KEEP_NEWEST newest drafts
|
|
30
|
+
* are always kept; an older one, in any state, is let go at the journal's
|
|
31
|
+
* next checkpoint once nothing has happened to it (held, named, attempted,
|
|
32
|
+
* answered, dismissed) for KEEP_IDLE_MS. The journal checkpoints what it
|
|
33
|
+
* keeps every CHECKPOINT_EVERY entries, so opening it replays only what came
|
|
34
|
+
* after, and a resident whose drafts change rarely keeps its older ones
|
|
35
|
+
* until then. The words stay in the resident's history either way.
|
|
36
|
+
*
|
|
37
|
+
* A delivery attempt is journaled durably BEFORE its request leaves the
|
|
38
|
+
* host, and its outcome after: an attempt with no recorded outcome (a crash
|
|
39
|
+
* mid-send) reads as unknown, never as unsent. A delivered draft carries a
|
|
40
|
+
* historical receipt — confirmed at a time, to a destination, with the
|
|
41
|
+
* connector's message id when it names one — not a claim that the message
|
|
42
|
+
* still exists. A draft is sent only by its resident's explicit resend or
|
|
43
|
+
* an envelope's {{unsent}}; nothing replays at boot or on a branch move.
|
|
44
|
+
*/
|
|
45
|
+
import type { JsStore } from '@animalabs/chronicle';
|
|
46
|
+
import type { PublishDestination, PublishOutcome } from './mcpl/channel-registry.js';
|
|
47
|
+
/** Chronicle record type of the drafts journal. */
|
|
48
|
+
export declare const PROSE_DRAFT_RECORD_TYPE = "framework/prose-draft";
|
|
49
|
+
/** Why words were held instead of sent. */
|
|
50
|
+
export type DraftReason =
|
|
51
|
+
/** An explicit send in the same round suppressed the round's plain speech. */
|
|
52
|
+
'explicit-send'
|
|
53
|
+
/** The speech had no destination (no route this turn, or a failed envelope). */
|
|
54
|
+
| 'no-destination'
|
|
55
|
+
/** An explicit/hybrid routing prefix was missing, malformed or unresolvable. */
|
|
56
|
+
| 'bounced';
|
|
57
|
+
export interface DraftAttemptOutcome {
|
|
58
|
+
status: PublishOutcome['status'];
|
|
59
|
+
at: number;
|
|
60
|
+
messageId?: string;
|
|
61
|
+
reason?: string;
|
|
62
|
+
detail?: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface DraftAttempt {
|
|
65
|
+
attemptId: string;
|
|
66
|
+
at: number;
|
|
67
|
+
destination: PublishDestination;
|
|
68
|
+
/** How the words went out: the drafts tool, or a `{{unsent}}` envelope (explicit or hybrid). */
|
|
69
|
+
via: 'resend' | 'unsent-token';
|
|
70
|
+
/** The resident resent knowing an earlier attempt may have been posted. */
|
|
71
|
+
confirmedDuplicate?: true;
|
|
72
|
+
/** Absent until recorded; an attempt without one reads as unknown. */
|
|
73
|
+
outcome?: DraftAttemptOutcome;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A draft held with words copied from another draft that may already have
|
|
77
|
+
* been posted (`{{unsent}}` re-bounced while that draft was unconfirmed or in
|
|
78
|
+
* flight). The new draft keeps the whole authored text and carries the same
|
|
79
|
+
* duplication risk: it reads `unconfirmed` until a confirmed delivery.
|
|
80
|
+
*/
|
|
81
|
+
export interface InheritedRisk {
|
|
82
|
+
/** The draft whose words were copied in. */
|
|
83
|
+
draftId: string;
|
|
84
|
+
/** The draft whose attempt is the uncertain one, when the copied draft
|
|
85
|
+
* itself carried inherited risk (a chain of re-bounces): the evidence is
|
|
86
|
+
* that original attempt's, never re-invented. */
|
|
87
|
+
sourceDraftId?: string;
|
|
88
|
+
/** That uncertain attempt, when there was one (absent: it was in flight). */
|
|
89
|
+
destination?: PublishDestination;
|
|
90
|
+
at?: number;
|
|
91
|
+
reason: string;
|
|
92
|
+
}
|
|
93
|
+
export interface Draft {
|
|
94
|
+
id: string;
|
|
95
|
+
agent: string;
|
|
96
|
+
/** The held words, byte for byte as a resend publishes them: a run an
|
|
97
|
+
* explicit send suppressed exactly as written; a bounce or a hold with no
|
|
98
|
+
* destination, its envelope as routing read it (surrounding whitespace
|
|
99
|
+
* trimmed). */
|
|
100
|
+
text: string;
|
|
101
|
+
reason: DraftReason;
|
|
102
|
+
/** Words copied in from a draft that may already have been posted. */
|
|
103
|
+
inheritedRisk?: InheritedRisk;
|
|
104
|
+
/** Short context for the resident: the bounce reason, or the competing conversations. */
|
|
105
|
+
note?: string;
|
|
106
|
+
heldAt: number;
|
|
107
|
+
attempts: DraftAttempt[];
|
|
108
|
+
dismissedAt?: number;
|
|
109
|
+
/** The messages whose notices named this draft, by id. It counts as named
|
|
110
|
+
* while one of them is on the current branch. */
|
|
111
|
+
noticedIn?: string[];
|
|
112
|
+
/** When a notice last named it. */
|
|
113
|
+
noticedAt?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* - `held`: no inherited risk, and never attempted or every attempt
|
|
117
|
+
* definitely failed — resend freely;
|
|
118
|
+
* - `unconfirmed`: no attempt was confirmed and the draft is not dismissed;
|
|
119
|
+
* either an attempt's outcome is unknown (or was never recorded), or the
|
|
120
|
+
* words carry inherited risk regardless of their own attempts. A resend
|
|
121
|
+
* needs explicit confirmation. A later attempt that fails does not resolve
|
|
122
|
+
* an earlier one that may have landed — the uncertainty stays;
|
|
123
|
+
* - `delivered`: an attempt was confirmed — its receipt is historical;
|
|
124
|
+
* - `dismissed`: the resident set it aside.
|
|
125
|
+
*/
|
|
126
|
+
export type DraftState = 'held' | 'unconfirmed' | 'delivered' | 'dismissed';
|
|
127
|
+
export declare function draftState(draft: Draft): DraftState;
|
|
128
|
+
/** The most recent attempt that may have been posted (unknown or unrecorded
|
|
129
|
+
* outcome), when no attempt was confirmed. */
|
|
130
|
+
export declare function uncertainAttempt(draft: Draft): DraftAttempt | undefined;
|
|
131
|
+
/** Each resident's newest drafts, by hold order, that are always kept. */
|
|
132
|
+
export declare const KEEP_NEWEST = 100;
|
|
133
|
+
/** How long an older draft is kept after the last thing that happened to it. */
|
|
134
|
+
export declare const KEEP_IDLE_MS: number;
|
|
135
|
+
/** Entries the journal takes between checkpoints. */
|
|
136
|
+
export declare const CHECKPOINT_EVERY = 500;
|
|
137
|
+
/** The store's retention, KEEP_NEWEST, KEEP_IDLE_MS and CHECKPOINT_EVERY
|
|
138
|
+
* unless given (tests give smaller ones). */
|
|
139
|
+
export interface DraftRetention {
|
|
140
|
+
keepNewest: number;
|
|
141
|
+
keepIdleMs: number;
|
|
142
|
+
checkpointEvery: number;
|
|
143
|
+
}
|
|
144
|
+
export declare class ProseDraftStore {
|
|
145
|
+
private readonly journal;
|
|
146
|
+
/** agent → draft id → draft, in journal (hold) order. */
|
|
147
|
+
private drafts;
|
|
148
|
+
/** agent → the id of its latest bounce, kept or not. */
|
|
149
|
+
private latestBounces;
|
|
150
|
+
private readonly retention;
|
|
151
|
+
constructor(store: JsStore, retention?: Partial<DraftRetention>);
|
|
152
|
+
/** Rebuild the projection from the journal (at open, and to reconcile):
|
|
153
|
+
* the latest checkpoint's drafts, then the entries after it. */
|
|
154
|
+
reload(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Write a checkpoint once CHECKPOINT_EVERY entries have been appended since
|
|
157
|
+
* the last one, letting go of the drafts that aren't kept (see the module
|
|
158
|
+
* header). The projection drops them only once the checkpoint is written,
|
|
159
|
+
* so a failed one changes nothing, and the next write tries again.
|
|
160
|
+
*/
|
|
161
|
+
private checkpointIfDue;
|
|
162
|
+
private reduce;
|
|
163
|
+
/**
|
|
164
|
+
* Journal and apply one entry. A write that fails after the store's append
|
|
165
|
+
* returned leaves the journal unreconciled: rebuild from it before
|
|
166
|
+
* rethrowing, so the projection never disagrees with what the journal
|
|
167
|
+
* holds. An append that fails inside the store can't be read back until
|
|
168
|
+
* the store is reopened: the journal then refuses every write until the
|
|
169
|
+
* next start, which replays that entry, so until then each write throws,
|
|
170
|
+
* no new draft is kept, and the projection lacks that entry.
|
|
171
|
+
*/
|
|
172
|
+
private write;
|
|
173
|
+
private agentDrafts;
|
|
174
|
+
/** A new id, unique among the resident's kept drafts and never its latest
|
|
175
|
+
* bounce's. One that retention let go can be given again: after N more
|
|
176
|
+
* of its resident's drafts, a given let-go id has come back with a
|
|
177
|
+
* probability of about N in 2.75 × 10^10 (ID_LENGTH), and a request naming
|
|
178
|
+
* it then reaches the newer draft rather than being refused. */
|
|
179
|
+
private newId;
|
|
180
|
+
/**
|
|
181
|
+
* Hold words as drafts, in order, each journaled durably before this
|
|
182
|
+
* returns. If the journal refuses a write (after reconciling), the drafts
|
|
183
|
+
* already written stand and the rest are reported as not held: their words
|
|
184
|
+
* remain in the resident's history only. A draft whose record reached the
|
|
185
|
+
* store before its write failed (its sync did) is in the reconciled
|
|
186
|
+
* journal, so it is held, and counted so. When the store's append itself
|
|
187
|
+
* threw, the record may still be in its log: the draft is reported as not
|
|
188
|
+
* held, and the journal refuses further writes until a reload, which
|
|
189
|
+
* replays it as held if it is there.
|
|
190
|
+
*/
|
|
191
|
+
hold(agent: string, segments: Array<{
|
|
192
|
+
text: string;
|
|
193
|
+
note?: string;
|
|
194
|
+
inheritedRisk?: InheritedRisk;
|
|
195
|
+
}>, reason: DraftReason, note?: string): {
|
|
196
|
+
held: Draft[];
|
|
197
|
+
notHeld?: {
|
|
198
|
+
count: number;
|
|
199
|
+
error: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
get(agent: string, id: string): Draft | undefined;
|
|
203
|
+
/** Held and unconfirmed drafts, newest first (journal order, which is
|
|
204
|
+
* exact even for segments held in the same millisecond). */
|
|
205
|
+
open(agent: string): Draft[];
|
|
206
|
+
/**
|
|
207
|
+
* Open drafts, newest first, that no notice on the current branch names:
|
|
208
|
+
* none was recorded (a crash before the notice), or a rollback or branch
|
|
209
|
+
* move took away every message that named them. `onBranch` says whether a
|
|
210
|
+
* message, by id, is on the current branch.
|
|
211
|
+
*/
|
|
212
|
+
unnoticed(agent: string, onBranch: (messageId: string) => boolean): Draft[];
|
|
213
|
+
/**
|
|
214
|
+
* Record that message `messageId`, a notice naming these drafts, is in the
|
|
215
|
+
* resident's history. The notice is conversation state, buffered until the
|
|
216
|
+
* store syncs, while this record reaches the OS at once: so the store is
|
|
217
|
+
* synced FIRST (afterCommittedState), and a notice that never became
|
|
218
|
+
* durable can't leave a record that suppresses the crash catch-up.
|
|
219
|
+
*/
|
|
220
|
+
markNoticed(agent: string, ids: string[], messageId: string): void;
|
|
221
|
+
dismiss(agent: string, id: string): void;
|
|
222
|
+
/**
|
|
223
|
+
* Journal a delivery attempt durably, BEFORE the request leaves the host.
|
|
224
|
+
* Throws (having reconciled) when it cannot be made durable: the caller
|
|
225
|
+
* must then not send.
|
|
226
|
+
*/
|
|
227
|
+
beginAttempt(agent: string, id: string, destination: PublishDestination, via: DraftAttempt['via'], confirmedDuplicate: boolean): string;
|
|
228
|
+
/** Journal what an attempt established. */
|
|
229
|
+
recordOutcome(agent: string, id: string, attemptId: string, outcome: PublishOutcome): void;
|
|
230
|
+
/**
|
|
231
|
+
* Explicit and hybrid mode's `{{unsent}}`: the most recent bounce, while
|
|
232
|
+
* that draft is still open (held or unconfirmed — the caller must not
|
|
233
|
+
* resend an unconfirmed one without the resident's confirmation).
|
|
234
|
+
* Latest-wins, like the clipboard it replaces: once the latest bounce is
|
|
235
|
+
* delivered, dismissed or let go there is nothing to substitute, even if
|
|
236
|
+
* older bounces are still held (they stay in the collection, by id).
|
|
237
|
+
*/
|
|
238
|
+
latestBounce(agent: string): Draft | undefined;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=prose-drafts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose-drafts.d.ts","sourceRoot":"","sources":["../../src/prose-drafts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAErF,mDAAmD;AACnD,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAE/D,2CAA2C;AAC3C,MAAM,MAAM,WAAW;AACrB,8EAA8E;AAC5E,eAAe;AACjB,gFAAgF;GAC9E,gBAAgB;AAClB,gFAAgF;GAC9E,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,kBAAkB,CAAC;IAChC,gGAAgG;IAChG,GAAG,EAAE,QAAQ,GAAG,cAAc,CAAC;IAC/B,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,sEAAsE;IACtE,OAAO,CAAC,EAAE,mBAAmB,CAAC;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