agent-comms 9.0.10 → 9.0.12
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +10 -6
- package/dist/account-cli.d.ts.map +1 -1
- package/dist/account-cli.js +4 -1
- package/dist/account-cli.js.map +1 -1
- package/dist/bridges/user/web/dist/mesh-worker.js +4 -4
- package/dist/bridges/user/web/dist/sw.js +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js +9 -12
- package/dist/cli-main.js.map +1 -1
- package/dist/core/account-bundle.d.ts +1 -1
- package/dist/core/account-bundle.d.ts.map +1 -1
- package/dist/core/account-bundle.js +26 -19
- package/dist/core/account-bundle.js.map +1 -1
- package/dist/core/account-join.d.ts.map +1 -1
- package/dist/core/account-join.js +5 -2
- package/dist/core/account-join.js.map +1 -1
- package/dist/core/account-ledger-crypto.d.ts.map +1 -1
- package/dist/core/account-ledger-crypto.js +4 -1
- package/dist/core/account-ledger-crypto.js.map +1 -1
- package/dist/core/account-ledger-store.d.ts +3 -1
- package/dist/core/account-ledger-store.d.ts.map +1 -1
- package/dist/core/account-ledger-store.js +6 -3
- package/dist/core/account-ledger-store.js.map +1 -1
- package/dist/core/account-ledger.d.ts +51 -4
- package/dist/core/account-ledger.d.ts.map +1 -1
- package/dist/core/account-ledger.js +102 -15
- package/dist/core/account-ledger.js.map +1 -1
- package/dist/core/bridge-mesh.d.ts.map +1 -1
- package/dist/core/bridge-mesh.js +3 -0
- package/dist/core/bridge-mesh.js.map +1 -1
- package/dist/core/bridge.d.ts.map +1 -1
- package/dist/core/bridge.js +16 -4
- package/dist/core/bridge.js.map +1 -1
- package/dist/core/capability-ask.d.ts.map +1 -1
- package/dist/core/capability-ask.js +10 -2
- package/dist/core/capability-ask.js.map +1 -1
- package/dist/core/connection-code-tool.d.ts +1 -1
- package/dist/core/connection-code-tool.js +2 -2
- package/dist/core/connection-code-tool.js.map +1 -1
- package/dist/core/connection-code.d.ts +5 -5
- package/dist/core/connection-code.d.ts.map +1 -1
- package/dist/core/connection-code.js +22 -6
- package/dist/core/connection-code.js.map +1 -1
- package/dist/core/device-membership.d.ts +8 -3
- package/dist/core/device-membership.d.ts.map +1 -1
- package/dist/core/device-membership.js +4 -4
- package/dist/core/device-membership.js.map +1 -1
- package/dist/core/dm-grant-actions.d.ts.map +1 -1
- package/dist/core/dm-grant-actions.js +7 -1
- package/dist/core/dm-grant-actions.js.map +1 -1
- package/dist/core/error-reporting.d.ts.map +1 -1
- package/dist/core/error-reporting.js +5 -0
- package/dist/core/error-reporting.js.map +1 -1
- package/dist/core/gateway-trust.d.ts +1 -1
- package/dist/core/gateway-trust.d.ts.map +1 -1
- package/dist/core/gateway-trust.js +4 -4
- package/dist/core/gateway-trust.js.map +1 -1
- package/dist/core/group-proofs.d.ts.map +1 -1
- package/dist/core/group-proofs.js +2 -2
- package/dist/core/group-proofs.js.map +1 -1
- package/dist/core/identity-store.d.ts +13 -9
- package/dist/core/identity-store.d.ts.map +1 -1
- package/dist/core/identity-store.js +122 -147
- package/dist/core/identity-store.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/iso-timestamp.d.ts +10 -0
- package/dist/core/iso-timestamp.d.ts.map +1 -0
- package/dist/core/iso-timestamp.js +19 -0
- package/dist/core/iso-timestamp.js.map +1 -0
- package/dist/core/issuer-identity-file.d.ts +15 -0
- package/dist/core/issuer-identity-file.d.ts.map +1 -1
- package/dist/core/issuer-identity-file.js +69 -20
- package/dist/core/issuer-identity-file.js.map +1 -1
- package/dist/core/machine-identity.d.ts +1 -1
- package/dist/core/machine-identity.d.ts.map +1 -1
- package/dist/core/machine-identity.js +14 -11
- package/dist/core/machine-identity.js.map +1 -1
- package/dist/core/mesh-store.d.ts +2 -2
- package/dist/core/mesh-store.d.ts.map +1 -1
- package/dist/core/mesh-store.js.map +1 -1
- package/dist/core/peer-lifecycle.d.ts.map +1 -1
- package/dist/core/peer-lifecycle.js +8 -2
- package/dist/core/peer-lifecycle.js.map +1 -1
- package/dist/core/pid-lock-file.d.ts +27 -4
- package/dist/core/pid-lock-file.d.ts.map +1 -1
- package/dist/core/pid-lock-file.js +120 -11
- package/dist/core/pid-lock-file.js.map +1 -1
- package/dist/core/process-start.d.ts +10 -0
- package/dist/core/process-start.d.ts.map +1 -0
- package/dist/core/process-start.js +43 -0
- package/dist/core/process-start.js.map +1 -0
- package/dist/core/room-lifecycle.d.ts +3 -2
- package/dist/core/room-lifecycle.d.ts.map +1 -1
- package/dist/core/room-lifecycle.js +9 -8
- package/dist/core/room-lifecycle.js.map +1 -1
- package/dist/core/room-protocol.d.ts.map +1 -1
- package/dist/core/room-protocol.js +25 -3
- package/dist/core/room-protocol.js.map +1 -1
- package/dist/core/stale-agent-checker.d.ts.map +1 -1
- package/dist/core/stale-agent-checker.js +3 -1
- package/dist/core/stale-agent-checker.js.map +1 -1
- package/dist/core/store.d.ts +3 -0
- package/dist/core/store.d.ts.map +1 -1
- package/dist/core/store.js +42 -20
- package/dist/core/store.js.map +1 -1
- package/dist/core/tool.d.ts +5 -1
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js +7 -1
- package/dist/core/tool.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +8 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-identity.d.ts +5 -5
- package/dist/core/user-identity.d.ts.map +1 -1
- package/dist/core/user-identity.js +59 -45
- package/dist/core/user-identity.js.map +1 -1
- package/package.json +9 -4
- package/src/account-cli.ts +4 -1
- package/src/bridges/user/web/dist/mesh-worker.js +4 -4
- package/src/bridges/user/web/dist/sw.js +1 -1
- package/src/cli-main.ts +10 -12
- package/src/core/account-bundle.ts +36 -25
- package/src/core/account-join.ts +5 -2
- package/src/core/account-ledger-crypto.ts +4 -1
- package/src/core/account-ledger-store.ts +11 -3
- package/src/core/account-ledger.ts +142 -20
- package/src/core/bridge-mesh.ts +4 -0
- package/src/core/bridge.ts +24 -4
- package/src/core/capability-ask.ts +16 -1
- package/src/core/connection-code-tool.ts +2 -2
- package/src/core/connection-code.ts +34 -8
- package/src/core/device-membership.ts +12 -8
- package/src/core/dm-grant-actions.ts +7 -1
- package/src/core/error-reporting.ts +5 -0
- package/src/core/gateway-trust.ts +4 -4
- package/src/core/group-proofs.ts +5 -2
- package/src/core/identity-store.ts +182 -191
- package/src/core/index.ts +1 -0
- package/src/core/iso-timestamp.ts +21 -0
- package/src/core/issuer-identity-file.ts +87 -23
- package/src/core/machine-identity.ts +15 -12
- package/src/core/mesh-store.ts +2 -1
- package/src/core/peer-lifecycle.ts +9 -4
- package/src/core/pid-lock-file.ts +139 -11
- package/src/core/process-start.ts +45 -0
- package/src/core/room-lifecycle.ts +12 -9
- package/src/core/room-protocol.ts +23 -3
- package/src/core/stale-agent-checker.ts +3 -1
- package/src/core/store.ts +48 -23
- package/src/core/tool.ts +14 -1
- package/src/core/types.ts +9 -3
- package/src/core/user-identity.ts +65 -51
- package/dist/bridges/user/web/frontend/boot-logic.d.ts +0 -18
- package/dist/bridges/user/web/frontend/boot-logic.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/boot-logic.js +0 -20
- package/dist/bridges/user/web/frontend/boot-logic.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/App.d.ts +0 -26
- package/dist/bridges/user/web/frontend/components/App.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/App.js +0 -25
- package/dist/bridges/user/web/frontend/components/App.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/ChatArea.d.ts +0 -19
- package/dist/bridges/user/web/frontend/components/ChatArea.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/ChatArea.js +0 -32
- package/dist/bridges/user/web/frontend/components/ChatArea.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/CreateRoomForm.d.ts +0 -11
- package/dist/bridges/user/web/frontend/components/CreateRoomForm.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/CreateRoomForm.js +0 -39
- package/dist/bridges/user/web/frontend/components/CreateRoomForm.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/JoinForm.d.ts +0 -11
- package/dist/bridges/user/web/frontend/components/JoinForm.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/JoinForm.js +0 -12
- package/dist/bridges/user/web/frontend/components/JoinForm.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshGraphView.d.ts +0 -16
- package/dist/bridges/user/web/frontend/components/MeshGraphView.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshGraphView.js +0 -56
- package/dist/bridges/user/web/frontend/components/MeshGraphView.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshPanel.d.ts +0 -13
- package/dist/bridges/user/web/frontend/components/MeshPanel.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshPanel.js +0 -36
- package/dist/bridges/user/web/frontend/components/MeshPanel.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshTraceView.d.ts +0 -20
- package/dist/bridges/user/web/frontend/components/MeshTraceView.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/MeshTraceView.js +0 -27
- package/dist/bridges/user/web/frontend/components/MeshTraceView.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/Message.d.ts +0 -8
- package/dist/bridges/user/web/frontend/components/Message.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/Message.js +0 -19
- package/dist/bridges/user/web/frontend/components/Message.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/MessageList.d.ts +0 -8
- package/dist/bridges/user/web/frontend/components/MessageList.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/MessageList.js +0 -18
- package/dist/bridges/user/web/frontend/components/MessageList.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/ProjectTree.d.ts +0 -16
- package/dist/bridges/user/web/frontend/components/ProjectTree.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/ProjectTree.js +0 -78
- package/dist/bridges/user/web/frontend/components/ProjectTree.js.map +0 -1
- package/dist/bridges/user/web/frontend/components/Sidebar.d.ts +0 -19
- package/dist/bridges/user/web/frontend/components/Sidebar.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/components/Sidebar.js +0 -39
- package/dist/bridges/user/web/frontend/components/Sidebar.js.map +0 -1
- package/dist/bridges/user/web/frontend/dispatch-action.d.ts +0 -10
- package/dist/bridges/user/web/frontend/dispatch-action.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/dispatch-action.js +0 -62
- package/dist/bridges/user/web/frontend/dispatch-action.js.map +0 -1
- package/dist/bridges/user/web/frontend/event-pump.d.ts +0 -24
- package/dist/bridges/user/web/frontend/event-pump.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/event-pump.js +0 -91
- package/dist/bridges/user/web/frontend/event-pump.js.map +0 -1
- package/dist/bridges/user/web/frontend/input.d.ts +0 -37
- package/dist/bridges/user/web/frontend/input.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/input.js +0 -173
- package/dist/bridges/user/web/frontend/input.js.map +0 -1
- package/dist/bridges/user/web/frontend/main.d.ts +0 -7
- package/dist/bridges/user/web/frontend/main.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/main.js +0 -203
- package/dist/bridges/user/web/frontend/main.js.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-client.d.ts +0 -86
- package/dist/bridges/user/web/frontend/mesh-client.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-client.js +0 -274
- package/dist/bridges/user/web/frontend/mesh-client.js.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-invalidation.d.ts +0 -11
- package/dist/bridges/user/web/frontend/mesh-invalidation.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-invalidation.js +0 -26
- package/dist/bridges/user/web/frontend/mesh-invalidation.js.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-worker.d.ts +0 -129
- package/dist/bridges/user/web/frontend/mesh-worker.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/mesh-worker.js +0 -344
- package/dist/bridges/user/web/frontend/mesh-worker.js.map +0 -1
- package/dist/bridges/user/web/frontend/messages.d.ts +0 -18
- package/dist/bridges/user/web/frontend/messages.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/messages.js +0 -91
- package/dist/bridges/user/web/frontend/messages.js.map +0 -1
- package/dist/bridges/user/web/frontend/project-tree.d.ts +0 -9
- package/dist/bridges/user/web/frontend/project-tree.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/project-tree.js +0 -174
- package/dist/bridges/user/web/frontend/project-tree.js.map +0 -1
- package/dist/bridges/user/web/frontend/served-by-bridge.d.ts +0 -10
- package/dist/bridges/user/web/frontend/served-by-bridge.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/served-by-bridge.js +0 -10
- package/dist/bridges/user/web/frontend/served-by-bridge.js.map +0 -1
- package/dist/bridges/user/web/frontend/state.d.ts +0 -39
- package/dist/bridges/user/web/frontend/state.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/state.js +0 -82
- package/dist/bridges/user/web/frontend/state.js.map +0 -1
- package/dist/bridges/user/web/frontend/sw.d.ts +0 -13
- package/dist/bridges/user/web/frontend/sw.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/sw.js +0 -91
- package/dist/bridges/user/web/frontend/sw.js.map +0 -1
- package/dist/bridges/user/web/frontend/tab-contract.d.ts +0 -802
- package/dist/bridges/user/web/frontend/tab-contract.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/tab-contract.js +0 -13
- package/dist/bridges/user/web/frontend/tab-contract.js.map +0 -1
- package/dist/bridges/user/web/frontend/theme.d.ts +0 -154
- package/dist/bridges/user/web/frontend/theme.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/theme.js +0 -36
- package/dist/bridges/user/web/frontend/theme.js.map +0 -1
- package/dist/bridges/user/web/frontend/types.d.ts +0 -189
- package/dist/bridges/user/web/frontend/types.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/types.js +0 -7
- package/dist/bridges/user/web/frontend/types.js.map +0 -1
- package/dist/bridges/user/web/frontend/url-sync.d.ts +0 -48
- package/dist/bridges/user/web/frontend/url-sync.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/url-sync.js +0 -76
- package/dist/bridges/user/web/frontend/url-sync.js.map +0 -1
- package/dist/bridges/user/web/frontend/use-client-state.d.ts +0 -6
- package/dist/bridges/user/web/frontend/use-client-state.d.ts.map +0 -1
- package/dist/bridges/user/web/frontend/use-client-state.js +0 -8
- package/dist/bridges/user/web/frontend/use-client-state.js.map +0 -1
- package/dist/bridges/user/web/test/bridge-port-range.integration.test.d.ts +0 -2
- package/dist/bridges/user/web/test/bridge-port-range.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/bridge-port-range.integration.test.js +0 -281
- package/dist/bridges/user/web/test/bridge-port-range.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/bridge-web-server.helper.d.ts +0 -13
- package/dist/bridges/user/web/test/bridge-web-server.helper.d.ts.map +0 -1
- package/dist/bridges/user/web/test/bridge-web-server.helper.js +0 -46
- package/dist/bridges/user/web/test/bridge-web-server.helper.js.map +0 -1
- package/dist/bridges/user/web/test/bridge-web-server.integration.test.d.ts +0 -2
- package/dist/bridges/user/web/test/bridge-web-server.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/bridge-web-server.integration.test.js +0 -49
- package/dist/bridges/user/web/test/bridge-web-server.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/contract.unit.test.d.ts +0 -2
- package/dist/bridges/user/web/test/contract.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/contract.unit.test.js +0 -56
- package/dist/bridges/user/web/test/contract.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/event-publisher.unit.test.d.ts +0 -2
- package/dist/bridges/user/web/test/event-publisher.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/event-publisher.unit.test.js +0 -245
- package/dist/bridges/user/web/test/event-publisher.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/lan-web-server.integration.test.d.ts +0 -7
- package/dist/bridges/user/web/test/lan-web-server.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/lan-web-server.integration.test.js +0 -275
- package/dist/bridges/user/web/test/lan-web-server.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/orpc-router.integration.test.d.ts +0 -7
- package/dist/bridges/user/web/test/orpc-router.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/orpc-router.integration.test.js +0 -264
- package/dist/bridges/user/web/test/orpc-router.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-access.unit.test.d.ts +0 -5
- package/dist/bridges/user/web/test/web-access.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-access.unit.test.js +0 -40
- package/dist/bridges/user/web/test/web-access.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-assets.unit.test.d.ts +0 -5
- package/dist/bridges/user/web/test/web-assets.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-assets.unit.test.js +0 -90
- package/dist/bridges/user/web/test/web-assets.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-beacon.unit.test.d.ts +0 -5
- package/dist/bridges/user/web/test/web-beacon.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-beacon.unit.test.js +0 -40
- package/dist/bridges/user/web/test/web-beacon.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-console-route.integration.test.d.ts +0 -5
- package/dist/bridges/user/web/test/web-console-route.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-console-route.integration.test.js +0 -112
- package/dist/bridges/user/web/test/web-console-route.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-console-static.unit.test.d.ts +0 -5
- package/dist/bridges/user/web/test/web-console-static.unit.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-console-static.unit.test.js +0 -135
- package/dist/bridges/user/web/test/web-console-static.unit.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-server-unbuilt-frontend.integration.test.d.ts +0 -2
- package/dist/bridges/user/web/test/web-server-unbuilt-frontend.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-server-unbuilt-frontend.integration.test.js +0 -77
- package/dist/bridges/user/web/test/web-server-unbuilt-frontend.integration.test.js.map +0 -1
- package/dist/bridges/user/web/test/web-server.integration.test.d.ts +0 -7
- package/dist/bridges/user/web/test/web-server.integration.test.d.ts.map +0 -1
- package/dist/bridges/user/web/test/web-server.integration.test.js +0 -266
- package/dist/bridges/user/web/test/web-server.integration.test.js.map +0 -1
- package/dist/bridges/user/web/vite.config.d.ts +0 -10
- package/dist/bridges/user/web/vite.config.d.ts.map +0 -1
- package/dist/bridges/user/web/vite.config.js +0 -68
- package/dist/bridges/user/web/vite.config.js.map +0 -1
- package/dist/core/test/build-action.unit.test.d.ts +0 -2
- package/dist/core/test/build-action.unit.test.d.ts.map +0 -1
- package/dist/core/test/build-action.unit.test.js +0 -26
- package/dist/core/test/build-action.unit.test.js.map +0 -1
- package/dist/core/test/identity.unit.test.d.ts +0 -5
- package/dist/core/test/identity.unit.test.d.ts.map +0 -1
- package/dist/core/test/identity.unit.test.js +0 -168
- package/dist/core/test/identity.unit.test.js.map +0 -1
- package/dist/core/test/package-version.unit.test.d.ts +0 -5
- package/dist/core/test/package-version.unit.test.d.ts.map +0 -1
- package/dist/core/test/package-version.unit.test.js +0 -30
- package/dist/core/test/package-version.unit.test.js.map +0 -1
- package/dist/core/test/version-check.unit.test.d.ts +0 -5
- package/dist/core/test/version-check.unit.test.d.ts.map +0 -1
- package/dist/core/test/version-check.unit.test.js +0 -191
- package/dist/core/test/version-check.unit.test.js.map +0 -1
- package/dist/test/account-join.integration.test.d.ts +0 -5
- package/dist/test/account-join.integration.test.d.ts.map +0 -1
- package/dist/test/account-join.integration.test.js +0 -279
- package/dist/test/account-join.integration.test.js.map +0 -1
- package/dist/test/account-ledger-helpers.d.ts +0 -35
- package/dist/test/account-ledger-helpers.d.ts.map +0 -1
- package/dist/test/account-ledger-helpers.js +0 -81
- package/dist/test/account-ledger-helpers.js.map +0 -1
- package/dist/test/account-ledger-hub-replication.integration.test.d.ts +0 -5
- package/dist/test/account-ledger-hub-replication.integration.test.d.ts.map +0 -1
- package/dist/test/account-ledger-hub-replication.integration.test.js +0 -100
- package/dist/test/account-ledger-hub-replication.integration.test.js.map +0 -1
- package/dist/test/account-ledger-lock-worker.d.ts +0 -9
- package/dist/test/account-ledger-lock-worker.d.ts.map +0 -1
- package/dist/test/account-ledger-lock-worker.js +0 -34
- package/dist/test/account-ledger-lock-worker.js.map +0 -1
- package/dist/test/account-ledger-lock.integration.test.d.ts +0 -5
- package/dist/test/account-ledger-lock.integration.test.d.ts.map +0 -1
- package/dist/test/account-ledger-lock.integration.test.js +0 -71
- package/dist/test/account-ledger-lock.integration.test.js.map +0 -1
- package/dist/test/account-ledger-replication.integration.test.d.ts +0 -5
- package/dist/test/account-ledger-replication.integration.test.d.ts.map +0 -1
- package/dist/test/account-ledger-replication.integration.test.js +0 -83
- package/dist/test/account-ledger-replication.integration.test.js.map +0 -1
- package/dist/test/account-ledger.unit.test.d.ts +0 -5
- package/dist/test/account-ledger.unit.test.d.ts.map +0 -1
- package/dist/test/account-ledger.unit.test.js +0 -317
- package/dist/test/account-ledger.unit.test.js.map +0 -1
- package/dist/test/account-transfer.unit.test.d.ts +0 -5
- package/dist/test/account-transfer.unit.test.d.ts.map +0 -1
- package/dist/test/account-transfer.unit.test.js +0 -232
- package/dist/test/account-transfer.unit.test.js.map +0 -1
- package/dist/test/agent-comms-version-gossip.integration.test.d.ts +0 -5
- package/dist/test/agent-comms-version-gossip.integration.test.d.ts.map +0 -1
- package/dist/test/agent-comms-version-gossip.integration.test.js +0 -112
- package/dist/test/agent-comms-version-gossip.integration.test.js.map +0 -1
- package/dist/test/agent-details-hub.integration.test.d.ts +0 -2
- package/dist/test/agent-details-hub.integration.test.d.ts.map +0 -1
- package/dist/test/agent-details-hub.integration.test.js +0 -64
- package/dist/test/agent-details-hub.integration.test.js.map +0 -1
- package/dist/test/agent-details-refresh.unit.test.d.ts +0 -5
- package/dist/test/agent-details-refresh.unit.test.d.ts.map +0 -1
- package/dist/test/agent-details-refresh.unit.test.js +0 -108
- package/dist/test/agent-details-refresh.unit.test.js.map +0 -1
- package/dist/test/agent-details.unit.test.d.ts +0 -5
- package/dist/test/agent-details.unit.test.d.ts.map +0 -1
- package/dist/test/agent-details.unit.test.js +0 -86
- package/dist/test/agent-details.unit.test.js.map +0 -1
- package/dist/test/agent-registry.unit.test.d.ts +0 -2
- package/dist/test/agent-registry.unit.test.d.ts.map +0 -1
- package/dist/test/agent-registry.unit.test.js +0 -507
- package/dist/test/agent-registry.unit.test.js.map +0 -1
- package/dist/test/agent-self-gossip.integration.test.d.ts +0 -5
- package/dist/test/agent-self-gossip.integration.test.d.ts.map +0 -1
- package/dist/test/agent-self-gossip.integration.test.js +0 -102
- package/dist/test/agent-self-gossip.integration.test.js.map +0 -1
- package/dist/test/approval.integration.test.d.ts +0 -9
- package/dist/test/approval.integration.test.d.ts.map +0 -1
- package/dist/test/approval.integration.test.js +0 -516
- package/dist/test/approval.integration.test.js.map +0 -1
- package/dist/test/become-coordinator-actual-port.integration.test.d.ts +0 -5
- package/dist/test/become-coordinator-actual-port.integration.test.d.ts.map +0 -1
- package/dist/test/become-coordinator-actual-port.integration.test.js +0 -74
- package/dist/test/become-coordinator-actual-port.integration.test.js.map +0 -1
- package/dist/test/bridge-mesh-data-directory.integration.test.d.ts +0 -2
- package/dist/test/bridge-mesh-data-directory.integration.test.d.ts.map +0 -1
- package/dist/test/bridge-mesh-data-directory.integration.test.js +0 -234
- package/dist/test/bridge-mesh-data-directory.integration.test.js.map +0 -1
- package/dist/test/bridge-mesh-version-drift.integration.test.d.ts +0 -7
- package/dist/test/bridge-mesh-version-drift.integration.test.d.ts.map +0 -1
- package/dist/test/bridge-mesh-version-drift.integration.test.js +0 -98
- package/dist/test/bridge-mesh-version-drift.integration.test.js.map +0 -1
- package/dist/test/bridge-mesh.integration.test.d.ts +0 -5
- package/dist/test/bridge-mesh.integration.test.d.ts.map +0 -1
- package/dist/test/bridge-mesh.integration.test.js +0 -206
- package/dist/test/bridge-mesh.integration.test.js.map +0 -1
- package/dist/test/bridge-stdout.runner.d.ts +0 -5
- package/dist/test/bridge-stdout.runner.d.ts.map +0 -1
- package/dist/test/bridge-stdout.runner.js +0 -54
- package/dist/test/bridge-stdout.runner.js.map +0 -1
- package/dist/test/broadcast-window.integration.test.d.ts +0 -7
- package/dist/test/broadcast-window.integration.test.d.ts.map +0 -1
- package/dist/test/broadcast-window.integration.test.js +0 -74
- package/dist/test/broadcast-window.integration.test.js.map +0 -1
- package/dist/test/capability-admission-tool-actions.integration.test.d.ts +0 -5
- package/dist/test/capability-admission-tool-actions.integration.test.d.ts.map +0 -1
- package/dist/test/capability-admission-tool-actions.integration.test.js +0 -198
- package/dist/test/capability-admission-tool-actions.integration.test.js.map +0 -1
- package/dist/test/capability-ask.unit.test.d.ts +0 -2
- package/dist/test/capability-ask.unit.test.d.ts.map +0 -1
- package/dist/test/capability-ask.unit.test.js +0 -300
- package/dist/test/capability-ask.unit.test.js.map +0 -1
- package/dist/test/capability-bubble-up.unit.test.d.ts +0 -2
- package/dist/test/capability-bubble-up.unit.test.d.ts.map +0 -1
- package/dist/test/capability-bubble-up.unit.test.js +0 -350
- package/dist/test/capability-bubble-up.unit.test.js.map +0 -1
- package/dist/test/cc-peer-alias-reply-routing.integration.test.d.ts +0 -5
- package/dist/test/cc-peer-alias-reply-routing.integration.test.d.ts.map +0 -1
- package/dist/test/cc-peer-alias-reply-routing.integration.test.js +0 -149
- package/dist/test/cc-peer-alias-reply-routing.integration.test.js.map +0 -1
- package/dist/test/cc-peer-approval-commands.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-approval-commands.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-approval-commands.unit.test.js +0 -110
- package/dist/test/cc-peer-approval-commands.unit.test.js.map +0 -1
- package/dist/test/cc-peer-bridge.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-bridge.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-bridge.unit.test.js +0 -361
- package/dist/test/cc-peer-bridge.unit.test.js.map +0 -1
- package/dist/test/cc-peer-default-front.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-default-front.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-default-front.unit.test.js +0 -83
- package/dist/test/cc-peer-default-front.unit.test.js.map +0 -1
- package/dist/test/cc-peer-front-controller.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-front-controller.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-front-controller.unit.test.js +0 -398
- package/dist/test/cc-peer-front-controller.unit.test.js.map +0 -1
- package/dist/test/cc-peer-front-relay.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-front-relay.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-front-relay.unit.test.js +0 -725
- package/dist/test/cc-peer-front-relay.unit.test.js.map +0 -1
- package/dist/test/cc-peer-front-runtime-mesh.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-front-runtime-mesh.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-front-runtime-mesh.unit.test.js +0 -57
- package/dist/test/cc-peer-front-runtime-mesh.unit.test.js.map +0 -1
- package/dist/test/cc-peer-front-runtime.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-front-runtime.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-front-runtime.unit.test.js +0 -72
- package/dist/test/cc-peer-front-runtime.unit.test.js.map +0 -1
- package/dist/test/cc-peer-front.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-front.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-front.unit.test.js +0 -109
- package/dist/test/cc-peer-front.unit.test.js.map +0 -1
- package/dist/test/cc-peer-fronted-approval.integration.test.d.ts +0 -5
- package/dist/test/cc-peer-fronted-approval.integration.test.d.ts.map +0 -1
- package/dist/test/cc-peer-fronted-approval.integration.test.js +0 -138
- package/dist/test/cc-peer-fronted-approval.integration.test.js.map +0 -1
- package/dist/test/cc-peer-reply-aliases.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-reply-aliases.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-reply-aliases.unit.test.js +0 -142
- package/dist/test/cc-peer-reply-aliases.unit.test.js.map +0 -1
- package/dist/test/cc-peer-shared-peer.unit.test.d.ts +0 -2
- package/dist/test/cc-peer-shared-peer.unit.test.d.ts.map +0 -1
- package/dist/test/cc-peer-shared-peer.unit.test.js +0 -48
- package/dist/test/cc-peer-shared-peer.unit.test.js.map +0 -1
- package/dist/test/chat-controller-mesh-errors.integration.test.d.ts +0 -2
- package/dist/test/chat-controller-mesh-errors.integration.test.d.ts.map +0 -1
- package/dist/test/chat-controller-mesh-errors.integration.test.js +0 -50
- package/dist/test/chat-controller-mesh-errors.integration.test.js.map +0 -1
- package/dist/test/ci-required-checks.unit.test.d.ts +0 -2
- package/dist/test/ci-required-checks.unit.test.d.ts.map +0 -1
- package/dist/test/ci-required-checks.unit.test.js +0 -137
- package/dist/test/ci-required-checks.unit.test.js.map +0 -1
- package/dist/test/claude-command.unit.test.d.ts +0 -2
- package/dist/test/claude-command.unit.test.d.ts.map +0 -1
- package/dist/test/claude-command.unit.test.js +0 -11
- package/dist/test/claude-command.unit.test.js.map +0 -1
- package/dist/test/conformance/corpus-files.d.ts +0 -11
- package/dist/test/conformance/corpus-files.d.ts.map +0 -1
- package/dist/test/conformance/corpus-files.js +0 -71
- package/dist/test/conformance/corpus-files.js.map +0 -1
- package/dist/test/conformance/corpus-types.d.ts +0 -62
- package/dist/test/conformance/corpus-types.d.ts.map +0 -1
- package/dist/test/conformance/corpus-types.js +0 -8
- package/dist/test/conformance/corpus-types.js.map +0 -1
- package/dist/test/conformance/corpus.d.ts +0 -34
- package/dist/test/conformance/corpus.d.ts.map +0 -1
- package/dist/test/conformance/corpus.js +0 -134
- package/dist/test/conformance/corpus.js.map +0 -1
- package/dist/test/conformance/read-json.d.ts +0 -4
- package/dist/test/conformance/read-json.d.ts.map +0 -1
- package/dist/test/conformance/read-json.js +0 -11
- package/dist/test/conformance/read-json.js.map +0 -1
- package/dist/test/conformance/test-titles.d.ts +0 -4
- package/dist/test/conformance/test-titles.d.ts.map +0 -1
- package/dist/test/conformance/test-titles.js +0 -86
- package/dist/test/conformance/test-titles.js.map +0 -1
- package/dist/test/conformance/text.d.ts +0 -10
- package/dist/test/conformance/text.d.ts.map +0 -1
- package/dist/test/conformance/text.js +0 -64
- package/dist/test/conformance/text.js.map +0 -1
- package/dist/test/conformance/validate.d.ts +0 -24
- package/dist/test/conformance/validate.d.ts.map +0 -1
- package/dist/test/conformance/validate.js +0 -153
- package/dist/test/conformance/validate.js.map +0 -1
- package/dist/test/conformance-functions.helper.d.ts +0 -19
- package/dist/test/conformance-functions.helper.d.ts.map +0 -1
- package/dist/test/conformance-functions.helper.js +0 -586
- package/dist/test/conformance-functions.helper.js.map +0 -1
- package/dist/test/conformance-kept-tests.unit.test.d.ts +0 -2
- package/dist/test/conformance-kept-tests.unit.test.d.ts.map +0 -1
- package/dist/test/conformance-kept-tests.unit.test.js +0 -220
- package/dist/test/conformance-kept-tests.unit.test.js.map +0 -1
- package/dist/test/conformance.unit.test.d.ts +0 -2
- package/dist/test/conformance.unit.test.d.ts.map +0 -1
- package/dist/test/conformance.unit.test.js +0 -371
- package/dist/test/conformance.unit.test.js.map +0 -1
- package/dist/test/connection-approval.unit.test.d.ts +0 -2
- package/dist/test/connection-approval.unit.test.d.ts.map +0 -1
- package/dist/test/connection-approval.unit.test.js +0 -194
- package/dist/test/connection-approval.unit.test.js.map +0 -1
- package/dist/test/connection-code-ledger-persistence.unit.test.d.ts +0 -5
- package/dist/test/connection-code-ledger-persistence.unit.test.d.ts.map +0 -1
- package/dist/test/connection-code-ledger-persistence.unit.test.js +0 -84
- package/dist/test/connection-code-ledger-persistence.unit.test.js.map +0 -1
- package/dist/test/connection-code-tool.e2e.test.d.ts +0 -2
- package/dist/test/connection-code-tool.e2e.test.d.ts.map +0 -1
- package/dist/test/connection-code-tool.e2e.test.js +0 -300
- package/dist/test/connection-code-tool.e2e.test.js.map +0 -1
- package/dist/test/connection-code.unit.test.d.ts +0 -5
- package/dist/test/connection-code.unit.test.d.ts.map +0 -1
- package/dist/test/connection-code.unit.test.js +0 -234
- package/dist/test/connection-code.unit.test.js.map +0 -1
- package/dist/test/coordinator-claim-sessions.integration.test.d.ts +0 -5
- package/dist/test/coordinator-claim-sessions.integration.test.d.ts.map +0 -1
- package/dist/test/coordinator-claim-sessions.integration.test.js +0 -276
- package/dist/test/coordinator-claim-sessions.integration.test.js.map +0 -1
- package/dist/test/coordinator-election.integration.test.d.ts +0 -5
- package/dist/test/coordinator-election.integration.test.d.ts.map +0 -1
- package/dist/test/coordinator-election.integration.test.js +0 -182
- package/dist/test/coordinator-election.integration.test.js.map +0 -1
- package/dist/test/coordinator-failover-hub.integration.test.d.ts +0 -5
- package/dist/test/coordinator-failover-hub.integration.test.d.ts.map +0 -1
- package/dist/test/coordinator-failover-hub.integration.test.js +0 -84
- package/dist/test/coordinator-failover-hub.integration.test.js.map +0 -1
- package/dist/test/coordinator-failover.integration.test.d.ts +0 -5
- package/dist/test/coordinator-failover.integration.test.d.ts.map +0 -1
- package/dist/test/coordinator-failover.integration.test.js +0 -150
- package/dist/test/coordinator-failover.integration.test.js.map +0 -1
- package/dist/test/coordinator-failover.unit.test.d.ts +0 -5
- package/dist/test/coordinator-failover.unit.test.d.ts.map +0 -1
- package/dist/test/coordinator-failover.unit.test.js +0 -377
- package/dist/test/coordinator-failover.unit.test.js.map +0 -1
- package/dist/test/coordinator-role.unit.test.d.ts +0 -5
- package/dist/test/coordinator-role.unit.test.d.ts.map +0 -1
- package/dist/test/coordinator-role.unit.test.js +0 -410
- package/dist/test/coordinator-role.unit.test.js.map +0 -1
- package/dist/test/coordinator-socket-error.integration.test.d.ts +0 -8
- package/dist/test/coordinator-socket-error.integration.test.d.ts.map +0 -1
- package/dist/test/coordinator-socket-error.integration.test.js +0 -47
- package/dist/test/coordinator-socket-error.integration.test.js.map +0 -1
- package/dist/test/create-room-mints-owner-grant.integration.test.d.ts +0 -5
- package/dist/test/create-room-mints-owner-grant.integration.test.d.ts.map +0 -1
- package/dist/test/create-room-mints-owner-grant.integration.test.js +0 -54
- package/dist/test/create-room-mints-owner-grant.integration.test.js.map +0 -1
- package/dist/test/create-room-name-sanitisation.integration.test.d.ts +0 -5
- package/dist/test/create-room-name-sanitisation.integration.test.d.ts.map +0 -1
- package/dist/test/create-room-name-sanitisation.integration.test.js +0 -51
- package/dist/test/create-room-name-sanitisation.integration.test.js.map +0 -1
- package/dist/test/data-directory.unit.test.d.ts +0 -2
- package/dist/test/data-directory.unit.test.d.ts.map +0 -1
- package/dist/test/data-directory.unit.test.js +0 -27
- package/dist/test/data-directory.unit.test.js.map +0 -1
- package/dist/test/data-frame-routing.unit.test.d.ts +0 -5
- package/dist/test/data-frame-routing.unit.test.d.ts.map +0 -1
- package/dist/test/data-frame-routing.unit.test.js +0 -79
- package/dist/test/data-frame-routing.unit.test.js.map +0 -1
- package/dist/test/data-sync-frame-handling.integration.test.d.ts +0 -5
- package/dist/test/data-sync-frame-handling.integration.test.d.ts.map +0 -1
- package/dist/test/data-sync-frame-handling.integration.test.js +0 -118
- package/dist/test/data-sync-frame-handling.integration.test.js.map +0 -1
- package/dist/test/delivery-engine-delivery.unit.test.d.ts +0 -2
- package/dist/test/delivery-engine-delivery.unit.test.d.ts.map +0 -1
- package/dist/test/delivery-engine-delivery.unit.test.js +0 -729
- package/dist/test/delivery-engine-delivery.unit.test.js.map +0 -1
- package/dist/test/delivery-engine-directed-notify.unit.test.d.ts +0 -2
- package/dist/test/delivery-engine-directed-notify.unit.test.d.ts.map +0 -1
- package/dist/test/delivery-engine-directed-notify.unit.test.js +0 -319
- package/dist/test/delivery-engine-directed-notify.unit.test.js.map +0 -1
- package/dist/test/delivery-engine-own-agent.unit.test.d.ts +0 -2
- package/dist/test/delivery-engine-own-agent.unit.test.d.ts.map +0 -1
- package/dist/test/delivery-engine-own-agent.unit.test.js +0 -144
- package/dist/test/delivery-engine-own-agent.unit.test.js.map +0 -1
- package/dist/test/delivery-engine.unit.test.d.ts +0 -2
- package/dist/test/delivery-engine.unit.test.d.ts.map +0 -1
- package/dist/test/delivery-engine.unit.test.js +0 -711
- package/dist/test/delivery-engine.unit.test.js.map +0 -1
- package/dist/test/delivery-receipt.helper.d.ts +0 -16
- package/dist/test/delivery-receipt.helper.d.ts.map +0 -1
- package/dist/test/delivery-receipt.helper.js +0 -480
- package/dist/test/delivery-receipt.helper.js.map +0 -1
- package/dist/test/delivery-receipt.runner.d.ts +0 -8
- package/dist/test/delivery-receipt.runner.d.ts.map +0 -1
- package/dist/test/delivery-receipt.runner.js +0 -46
- package/dist/test/delivery-receipt.runner.js.map +0 -1
- package/dist/test/device-membership-verification.unit.test.d.ts +0 -2
- package/dist/test/device-membership-verification.unit.test.d.ts.map +0 -1
- package/dist/test/device-membership-verification.unit.test.js +0 -214
- package/dist/test/device-membership-verification.unit.test.js.map +0 -1
- package/dist/test/device-membership.unit.test.d.ts +0 -2
- package/dist/test/device-membership.unit.test.d.ts.map +0 -1
- package/dist/test/device-membership.unit.test.js +0 -250
- package/dist/test/device-membership.unit.test.js.map +0 -1
- package/dist/test/directory-admission.unit.test.d.ts +0 -2
- package/dist/test/directory-admission.unit.test.d.ts.map +0 -1
- package/dist/test/directory-admission.unit.test.js +0 -300
- package/dist/test/directory-admission.unit.test.js.map +0 -1
- package/dist/test/discovery-mdns.unit.test.d.ts +0 -2
- package/dist/test/discovery-mdns.unit.test.d.ts.map +0 -1
- package/dist/test/discovery-mdns.unit.test.js +0 -123
- package/dist/test/discovery-mdns.unit.test.js.map +0 -1
- package/dist/test/dm-admission.integration.test.d.ts +0 -7
- package/dist/test/dm-admission.integration.test.d.ts.map +0 -1
- package/dist/test/dm-admission.integration.test.js +0 -90
- package/dist/test/dm-admission.integration.test.js.map +0 -1
- package/dist/test/dm-delivery-status.integration.test.d.ts +0 -5
- package/dist/test/dm-delivery-status.integration.test.d.ts.map +0 -1
- package/dist/test/dm-delivery-status.integration.test.js +0 -72
- package/dist/test/dm-delivery-status.integration.test.js.map +0 -1
- package/dist/test/dm-first-contact.integration.test.d.ts +0 -5
- package/dist/test/dm-first-contact.integration.test.d.ts.map +0 -1
- package/dist/test/dm-first-contact.integration.test.js +0 -100
- package/dist/test/dm-first-contact.integration.test.js.map +0 -1
- package/dist/test/dm-grant-actions.unit.test.d.ts +0 -2
- package/dist/test/dm-grant-actions.unit.test.d.ts.map +0 -1
- package/dist/test/dm-grant-actions.unit.test.js +0 -78
- package/dist/test/dm-grant-actions.unit.test.js.map +0 -1
- package/dist/test/dm-grant-tool.integration.test.d.ts +0 -5
- package/dist/test/dm-grant-tool.integration.test.d.ts.map +0 -1
- package/dist/test/dm-grant-tool.integration.test.js +0 -253
- package/dist/test/dm-grant-tool.integration.test.js.map +0 -1
- package/dist/test/dm-send-capability-admission.integration.test.d.ts +0 -5
- package/dist/test/dm-send-capability-admission.integration.test.d.ts.map +0 -1
- package/dist/test/dm-send-capability-admission.integration.test.js +0 -165
- package/dist/test/dm-send-capability-admission.integration.test.js.map +0 -1
- package/dist/test/dm-send-delegation.unit.test.d.ts +0 -2
- package/dist/test/dm-send-delegation.unit.test.d.ts.map +0 -1
- package/dist/test/dm-send-delegation.unit.test.js +0 -180
- package/dist/test/dm-send-delegation.unit.test.js.map +0 -1
- package/dist/test/dm-send-principal-delegation.integration.test.d.ts +0 -2
- package/dist/test/dm-send-principal-delegation.integration.test.d.ts.map +0 -1
- package/dist/test/dm-send-principal-delegation.integration.test.js +0 -90
- package/dist/test/dm-send-principal-delegation.integration.test.js.map +0 -1
- package/dist/test/dm-token-verification.unit.test.d.ts +0 -5
- package/dist/test/dm-token-verification.unit.test.d.ts.map +0 -1
- package/dist/test/dm-token-verification.unit.test.js +0 -164
- package/dist/test/dm-token-verification.unit.test.js.map +0 -1
- package/dist/test/election-sessions.unit.test.d.ts +0 -5
- package/dist/test/election-sessions.unit.test.d.ts.map +0 -1
- package/dist/test/election-sessions.unit.test.js +0 -104
- package/dist/test/election-sessions.unit.test.js.map +0 -1
- package/dist/test/error-reporting.unit.test.d.ts +0 -2
- package/dist/test/error-reporting.unit.test.d.ts.map +0 -1
- package/dist/test/error-reporting.unit.test.js +0 -20
- package/dist/test/error-reporting.unit.test.js.map +0 -1
- package/dist/test/filestore.unit.test.d.ts +0 -5
- package/dist/test/filestore.unit.test.d.ts.map +0 -1
- package/dist/test/filestore.unit.test.js +0 -175
- package/dist/test/filestore.unit.test.js.map +0 -1
- package/dist/test/first-contact.unit.test.d.ts +0 -2
- package/dist/test/first-contact.unit.test.d.ts.map +0 -1
- package/dist/test/first-contact.unit.test.js +0 -209
- package/dist/test/first-contact.unit.test.js.map +0 -1
- package/dist/test/front-real-bridge-identity-overlap.integration.test.d.ts +0 -7
- package/dist/test/front-real-bridge-identity-overlap.integration.test.d.ts.map +0 -1
- package/dist/test/front-real-bridge-identity-overlap.integration.test.js +0 -95
- package/dist/test/front-real-bridge-identity-overlap.integration.test.js.map +0 -1
- package/dist/test/gateway-trust-recheck.unit.test.d.ts +0 -2
- package/dist/test/gateway-trust-recheck.unit.test.d.ts.map +0 -1
- package/dist/test/gateway-trust-recheck.unit.test.js +0 -75
- package/dist/test/gateway-trust-recheck.unit.test.js.map +0 -1
- package/dist/test/gateway-trust-tool.integration.test.d.ts +0 -2
- package/dist/test/gateway-trust-tool.integration.test.d.ts.map +0 -1
- package/dist/test/gateway-trust-tool.integration.test.js +0 -352
- package/dist/test/gateway-trust-tool.integration.test.js.map +0 -1
- package/dist/test/gateway-trust.integration.test.d.ts +0 -5
- package/dist/test/gateway-trust.integration.test.d.ts.map +0 -1
- package/dist/test/gateway-trust.integration.test.js +0 -200
- package/dist/test/gateway-trust.integration.test.js.map +0 -1
- package/dist/test/gateway-trust.unit.test.d.ts +0 -2
- package/dist/test/gateway-trust.unit.test.d.ts.map +0 -1
- package/dist/test/gateway-trust.unit.test.js +0 -387
- package/dist/test/gateway-trust.unit.test.js.map +0 -1
- package/dist/test/gossip-directory-aggregation.integration.test.d.ts +0 -5
- package/dist/test/gossip-directory-aggregation.integration.test.d.ts.map +0 -1
- package/dist/test/gossip-directory-aggregation.integration.test.js +0 -98
- package/dist/test/gossip-directory-aggregation.integration.test.js.map +0 -1
- package/dist/test/gossip-directory.unit.test.d.ts +0 -2
- package/dist/test/gossip-directory.unit.test.d.ts.map +0 -1
- package/dist/test/gossip-directory.unit.test.js +0 -192
- package/dist/test/gossip-directory.unit.test.js.map +0 -1
- package/dist/test/gossip-listener-addresses.integration.test.d.ts +0 -5
- package/dist/test/gossip-listener-addresses.integration.test.d.ts.map +0 -1
- package/dist/test/gossip-listener-addresses.integration.test.js +0 -90
- package/dist/test/gossip-listener-addresses.integration.test.js.map +0 -1
- package/dist/test/handshake.integration.test.d.ts +0 -5
- package/dist/test/handshake.integration.test.d.ts.map +0 -1
- package/dist/test/handshake.integration.test.js +0 -211
- package/dist/test/handshake.integration.test.js.map +0 -1
- package/dist/test/hidden-line.unit.test.d.ts +0 -5
- package/dist/test/hidden-line.unit.test.d.ts.map +0 -1
- package/dist/test/hidden-line.unit.test.js +0 -40
- package/dist/test/hidden-line.unit.test.js.map +0 -1
- package/dist/test/hosted-rooms-gossip.integration.test.d.ts +0 -5
- package/dist/test/hosted-rooms-gossip.integration.test.d.ts.map +0 -1
- package/dist/test/hosted-rooms-gossip.integration.test.js +0 -103
- package/dist/test/hosted-rooms-gossip.integration.test.js.map +0 -1
- package/dist/test/hub-exposure.integration.test.d.ts +0 -5
- package/dist/test/hub-exposure.integration.test.d.ts.map +0 -1
- package/dist/test/hub-exposure.integration.test.js +0 -165
- package/dist/test/hub-exposure.integration.test.js.map +0 -1
- package/dist/test/hub-helpers.d.ts +0 -45
- package/dist/test/hub-helpers.d.ts.map +0 -1
- package/dist/test/hub-helpers.js +0 -245
- package/dist/test/hub-helpers.js.map +0 -1
- package/dist/test/hub-link.unit.test.d.ts +0 -2
- package/dist/test/hub-link.unit.test.d.ts.map +0 -1
- package/dist/test/hub-link.unit.test.js +0 -256
- package/dist/test/hub-link.unit.test.js.map +0 -1
- package/dist/test/hub-mode-session.integration.test.d.ts +0 -2
- package/dist/test/hub-mode-session.integration.test.d.ts.map +0 -1
- package/dist/test/hub-mode-session.integration.test.js +0 -173
- package/dist/test/hub-mode-session.integration.test.js.map +0 -1
- package/dist/test/hub-peer-per-store.integration.test.d.ts +0 -9
- package/dist/test/hub-peer-per-store.integration.test.d.ts.map +0 -1
- package/dist/test/hub-peer-per-store.integration.test.js +0 -218
- package/dist/test/hub-peer-per-store.integration.test.js.map +0 -1
- package/dist/test/hub-room-domain-verb-trust-bypass.integration.test.d.ts +0 -7
- package/dist/test/hub-room-domain-verb-trust-bypass.integration.test.d.ts.map +0 -1
- package/dist/test/hub-room-domain-verb-trust-bypass.integration.test.js +0 -93
- package/dist/test/hub-room-domain-verb-trust-bypass.integration.test.js.map +0 -1
- package/dist/test/hub-session-close.integration.test.d.ts +0 -5
- package/dist/test/hub-session-close.integration.test.d.ts.map +0 -1
- package/dist/test/hub-session-close.integration.test.js +0 -38
- package/dist/test/hub-session-close.integration.test.js.map +0 -1
- package/dist/test/hub-session-dispatch.unit.test.d.ts +0 -5
- package/dist/test/hub-session-dispatch.unit.test.d.ts.map +0 -1
- package/dist/test/hub-session-dispatch.unit.test.js +0 -192
- package/dist/test/hub-session-dispatch.unit.test.js.map +0 -1
- package/dist/test/identity-cert.unit.test.d.ts +0 -7
- package/dist/test/identity-cert.unit.test.d.ts.map +0 -1
- package/dist/test/identity-cert.unit.test.js +0 -19
- package/dist/test/identity-cert.unit.test.js.map +0 -1
- package/dist/test/identity-device-id.unit.test.d.ts +0 -5
- package/dist/test/identity-device-id.unit.test.d.ts.map +0 -1
- package/dist/test/identity-device-id.unit.test.js +0 -34
- package/dist/test/identity-device-id.unit.test.js.map +0 -1
- package/dist/test/identity-restart.integration.test.d.ts +0 -7
- package/dist/test/identity-restart.integration.test.d.ts.map +0 -1
- package/dist/test/identity-restart.integration.test.js +0 -173
- package/dist/test/identity-restart.integration.test.js.map +0 -1
- package/dist/test/identity-store-race-worker.d.ts +0 -7
- package/dist/test/identity-store-race-worker.d.ts.map +0 -1
- package/dist/test/identity-store-race-worker.js +0 -33
- package/dist/test/identity-store-race-worker.js.map +0 -1
- package/dist/test/identity-store-race.integration.test.d.ts +0 -5
- package/dist/test/identity-store-race.integration.test.d.ts.map +0 -1
- package/dist/test/identity-store-race.integration.test.js +0 -47
- package/dist/test/identity-store-race.integration.test.js.map +0 -1
- package/dist/test/identity-store-wait.unit.test.d.ts +0 -2
- package/dist/test/identity-store-wait.unit.test.d.ts.map +0 -1
- package/dist/test/identity-store-wait.unit.test.js +0 -75
- package/dist/test/identity-store-wait.unit.test.js.map +0 -1
- package/dist/test/identity-store.integration.test.d.ts +0 -5
- package/dist/test/identity-store.integration.test.d.ts.map +0 -1
- package/dist/test/identity-store.integration.test.js +0 -376
- package/dist/test/identity-store.integration.test.js.map +0 -1
- package/dist/test/issuer-grouping.unit.test.d.ts +0 -2
- package/dist/test/issuer-grouping.unit.test.d.ts.map +0 -1
- package/dist/test/issuer-grouping.unit.test.js +0 -137
- package/dist/test/issuer-grouping.unit.test.js.map +0 -1
- package/dist/test/lan-web-uis.unit.test.d.ts +0 -5
- package/dist/test/lan-web-uis.unit.test.d.ts.map +0 -1
- package/dist/test/lan-web-uis.unit.test.js +0 -72
- package/dist/test/lan-web-uis.unit.test.js.map +0 -1
- package/dist/test/listener-policy.integration.test.d.ts +0 -9
- package/dist/test/listener-policy.integration.test.d.ts.map +0 -1
- package/dist/test/listener-policy.integration.test.js +0 -310
- package/dist/test/listener-policy.integration.test.js.map +0 -1
- package/dist/test/loopback-address.unit.test.d.ts +0 -5
- package/dist/test/loopback-address.unit.test.d.ts.map +0 -1
- package/dist/test/loopback-address.unit.test.js +0 -28
- package/dist/test/loopback-address.unit.test.js.map +0 -1
- package/dist/test/machine-identity.unit.test.d.ts +0 -5
- package/dist/test/machine-identity.unit.test.d.ts.map +0 -1
- package/dist/test/machine-identity.unit.test.js +0 -80
- package/dist/test/machine-identity.unit.test.js.map +0 -1
- package/dist/test/machine-membership-trust.integration.test.d.ts +0 -5
- package/dist/test/machine-membership-trust.integration.test.d.ts.map +0 -1
- package/dist/test/machine-membership-trust.integration.test.js +0 -151
- package/dist/test/machine-membership-trust.integration.test.js.map +0 -1
- package/dist/test/manual-clock.d.ts +0 -7
- package/dist/test/manual-clock.d.ts.map +0 -1
- package/dist/test/manual-clock.js +0 -10
- package/dist/test/manual-clock.js.map +0 -1
- package/dist/test/mcp-stdout-channel.integration.test.d.ts +0 -5
- package/dist/test/mcp-stdout-channel.integration.test.d.ts.map +0 -1
- package/dist/test/mcp-stdout-channel.integration.test.js +0 -123
- package/dist/test/mcp-stdout-channel.integration.test.js.map +0 -1
- package/dist/test/mcp-tool-action-enum.unit.test.d.ts +0 -2
- package/dist/test/mcp-tool-action-enum.unit.test.d.ts.map +0 -1
- package/dist/test/mcp-tool-action-enum.unit.test.js +0 -12
- package/dist/test/mcp-tool-action-enum.unit.test.js.map +0 -1
- package/dist/test/membership-proof.unit.test.d.ts +0 -2
- package/dist/test/membership-proof.unit.test.d.ts.map +0 -1
- package/dist/test/membership-proof.unit.test.js +0 -238
- package/dist/test/membership-proof.unit.test.js.map +0 -1
- package/dist/test/mesh-e2e.integration.test.d.ts +0 -8
- package/dist/test/mesh-e2e.integration.test.d.ts.map +0 -1
- package/dist/test/mesh-e2e.integration.test.js +0 -177
- package/dist/test/mesh-e2e.integration.test.js.map +0 -1
- package/dist/test/mesh-graph-trace-tool.e2e.test.d.ts +0 -2
- package/dist/test/mesh-graph-trace-tool.e2e.test.d.ts.map +0 -1
- package/dist/test/mesh-graph-trace-tool.e2e.test.js +0 -99
- package/dist/test/mesh-graph-trace-tool.e2e.test.js.map +0 -1
- package/dist/test/mesh-graph-trace.integration.test.d.ts +0 -5
- package/dist/test/mesh-graph-trace.integration.test.d.ts.map +0 -1
- package/dist/test/mesh-graph-trace.integration.test.js +0 -153
- package/dist/test/mesh-graph-trace.integration.test.js.map +0 -1
- package/dist/test/mesh-graph.unit.test.d.ts +0 -5
- package/dist/test/mesh-graph.unit.test.d.ts.map +0 -1
- package/dist/test/mesh-graph.unit.test.js +0 -121
- package/dist/test/mesh-graph.unit.test.js.map +0 -1
- package/dist/test/mesh-smoke.runner.d.ts +0 -9
- package/dist/test/mesh-smoke.runner.d.ts.map +0 -1
- package/dist/test/mesh-smoke.runner.js +0 -262
- package/dist/test/mesh-smoke.runner.js.map +0 -1
- package/dist/test/mesh-store-delivery-listeners.integration.test.d.ts +0 -2
- package/dist/test/mesh-store-delivery-listeners.integration.test.d.ts.map +0 -1
- package/dist/test/mesh-store-delivery-listeners.integration.test.js +0 -160
- package/dist/test/mesh-store-delivery-listeners.integration.test.js.map +0 -1
- package/dist/test/mesh-store-durable-send.integration.test.d.ts +0 -2
- package/dist/test/mesh-store-durable-send.integration.test.d.ts.map +0 -1
- package/dist/test/mesh-store-durable-send.integration.test.js +0 -55
- package/dist/test/mesh-store-durable-send.integration.test.js.map +0 -1
- package/dist/test/mesh-store-orchestration.unit.test.d.ts +0 -2
- package/dist/test/mesh-store-orchestration.unit.test.d.ts.map +0 -1
- package/dist/test/mesh-store-orchestration.unit.test.js +0 -662
- package/dist/test/mesh-store-orchestration.unit.test.js.map +0 -1
- package/dist/test/mesh-store-shared.unit.test.d.ts +0 -2
- package/dist/test/mesh-store-shared.unit.test.d.ts.map +0 -1
- package/dist/test/mesh-store-shared.unit.test.js +0 -107
- package/dist/test/mesh-store-shared.unit.test.js.map +0 -1
- package/dist/test/name-claim.unit.test.d.ts +0 -5
- package/dist/test/name-claim.unit.test.d.ts.map +0 -1
- package/dist/test/name-claim.unit.test.js +0 -135
- package/dist/test/name-claim.unit.test.js.map +0 -1
- package/dist/test/naming.integration.test.d.ts +0 -5
- package/dist/test/naming.integration.test.d.ts.map +0 -1
- package/dist/test/naming.integration.test.js +0 -231
- package/dist/test/naming.integration.test.js.map +0 -1
- package/dist/test/peer-lifecycle.unit.test.d.ts +0 -2
- package/dist/test/peer-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/test/peer-lifecycle.unit.test.js +0 -252
- package/dist/test/peer-lifecycle.unit.test.js.map +0 -1
- package/dist/test/peer-link-error.integration.test.d.ts +0 -2
- package/dist/test/peer-link-error.integration.test.d.ts.map +0 -1
- package/dist/test/peer-link-error.integration.test.js +0 -33
- package/dist/test/peer-link-error.integration.test.js.map +0 -1
- package/dist/test/peer-versions.unit.test.d.ts +0 -5
- package/dist/test/peer-versions.unit.test.d.ts.map +0 -1
- package/dist/test/peer-versions.unit.test.js +0 -68
- package/dist/test/peer-versions.unit.test.js.map +0 -1
- package/dist/test/petnames.unit.test.d.ts +0 -5
- package/dist/test/petnames.unit.test.d.ts.map +0 -1
- package/dist/test/petnames.unit.test.js +0 -94
- package/dist/test/petnames.unit.test.js.map +0 -1
- package/dist/test/pgp-keyserver.unit.test.d.ts +0 -5
- package/dist/test/pgp-keyserver.unit.test.d.ts.map +0 -1
- package/dist/test/pgp-keyserver.unit.test.js +0 -24
- package/dist/test/pgp-keyserver.unit.test.js.map +0 -1
- package/dist/test/pi-manifest-packed.integration.test.d.ts +0 -2
- package/dist/test/pi-manifest-packed.integration.test.d.ts.map +0 -1
- package/dist/test/pi-manifest-packed.integration.test.js +0 -68
- package/dist/test/pi-manifest-packed.integration.test.js.map +0 -1
- package/dist/test/plugin-hooks.unit.test.d.ts +0 -2
- package/dist/test/plugin-hooks.unit.test.d.ts.map +0 -1
- package/dist/test/plugin-hooks.unit.test.js +0 -99
- package/dist/test/plugin-hooks.unit.test.js.map +0 -1
- package/dist/test/presence-readvertise.integration.test.d.ts +0 -5
- package/dist/test/presence-readvertise.integration.test.d.ts.map +0 -1
- package/dist/test/presence-readvertise.integration.test.js +0 -139
- package/dist/test/presence-readvertise.integration.test.js.map +0 -1
- package/dist/test/principal-membership-trust.integration.test.d.ts +0 -5
- package/dist/test/principal-membership-trust.integration.test.d.ts.map +0 -1
- package/dist/test/principal-membership-trust.integration.test.js +0 -169
- package/dist/test/principal-membership-trust.integration.test.js.map +0 -1
- package/dist/test/query-version.integration.test.d.ts +0 -5
- package/dist/test/query-version.integration.test.d.ts.map +0 -1
- package/dist/test/query-version.integration.test.js +0 -68
- package/dist/test/query-version.integration.test.js.map +0 -1
- package/dist/test/random-id.unit.test.d.ts +0 -2
- package/dist/test/random-id.unit.test.d.ts.map +0 -1
- package/dist/test/random-id.unit.test.js +0 -16
- package/dist/test/random-id.unit.test.js.map +0 -1
- package/dist/test/relay-role.integration.test.d.ts +0 -5
- package/dist/test/relay-role.integration.test.d.ts.map +0 -1
- package/dist/test/relay-role.integration.test.js +0 -134
- package/dist/test/relay-role.integration.test.js.map +0 -1
- package/dist/test/room-admission-tool-actions.integration.test.d.ts +0 -5
- package/dist/test/room-admission-tool-actions.integration.test.d.ts.map +0 -1
- package/dist/test/room-admission-tool-actions.integration.test.js +0 -166
- package/dist/test/room-admission-tool-actions.integration.test.js.map +0 -1
- package/dist/test/room-destroy-revocation.integration.test.d.ts +0 -5
- package/dist/test/room-destroy-revocation.integration.test.d.ts.map +0 -1
- package/dist/test/room-destroy-revocation.integration.test.js +0 -62
- package/dist/test/room-destroy-revocation.integration.test.js.map +0 -1
- package/dist/test/room-invite-directed.integration.test.d.ts +0 -5
- package/dist/test/room-invite-directed.integration.test.d.ts.map +0 -1
- package/dist/test/room-invite-directed.integration.test.js +0 -94
- package/dist/test/room-invite-directed.integration.test.js.map +0 -1
- package/dist/test/room-join-admission.integration.test.d.ts +0 -7
- package/dist/test/room-join-admission.integration.test.d.ts.map +0 -1
- package/dist/test/room-join-admission.integration.test.js +0 -228
- package/dist/test/room-join-admission.integration.test.js.map +0 -1
- package/dist/test/room-join-approval-timeout.integration.test.d.ts +0 -5
- package/dist/test/room-join-approval-timeout.integration.test.d.ts.map +0 -1
- package/dist/test/room-join-approval-timeout.integration.test.js +0 -77
- package/dist/test/room-join-approval-timeout.integration.test.js.map +0 -1
- package/dist/test/room-join-by-bare-name.integration.test.d.ts +0 -5
- package/dist/test/room-join-by-bare-name.integration.test.d.ts.map +0 -1
- package/dist/test/room-join-by-bare-name.integration.test.js +0 -128
- package/dist/test/room-join-by-bare-name.integration.test.js.map +0 -1
- package/dist/test/room-kick-revocation.integration.test.d.ts +0 -7
- package/dist/test/room-kick-revocation.integration.test.d.ts.map +0 -1
- package/dist/test/room-kick-revocation.integration.test.js +0 -78
- package/dist/test/room-kick-revocation.integration.test.js.map +0 -1
- package/dist/test/room-leave-revocation.integration.test.d.ts +0 -5
- package/dist/test/room-leave-revocation.integration.test.d.ts.map +0 -1
- package/dist/test/room-leave-revocation.integration.test.js +0 -95
- package/dist/test/room-leave-revocation.integration.test.js.map +0 -1
- package/dist/test/room-lifecycle-bare-name.unit.test.d.ts +0 -2
- package/dist/test/room-lifecycle-bare-name.unit.test.d.ts.map +0 -1
- package/dist/test/room-lifecycle-bare-name.unit.test.js +0 -181
- package/dist/test/room-lifecycle-bare-name.unit.test.js.map +0 -1
- package/dist/test/room-lifecycle-membership.unit.test.d.ts +0 -2
- package/dist/test/room-lifecycle-membership.unit.test.d.ts.map +0 -1
- package/dist/test/room-lifecycle-membership.unit.test.js +0 -551
- package/dist/test/room-lifecycle-membership.unit.test.js.map +0 -1
- package/dist/test/room-lifecycle-remote.unit.test.d.ts +0 -2
- package/dist/test/room-lifecycle-remote.unit.test.d.ts.map +0 -1
- package/dist/test/room-lifecycle-remote.unit.test.js +0 -388
- package/dist/test/room-lifecycle-remote.unit.test.js.map +0 -1
- package/dist/test/room-lifecycle.unit.test.d.ts +0 -2
- package/dist/test/room-lifecycle.unit.test.d.ts.map +0 -1
- package/dist/test/room-lifecycle.unit.test.js +0 -561
- package/dist/test/room-lifecycle.unit.test.js.map +0 -1
- package/dist/test/room-messaging-durable-send.unit.test.d.ts +0 -2
- package/dist/test/room-messaging-durable-send.unit.test.d.ts.map +0 -1
- package/dist/test/room-messaging-durable-send.unit.test.js +0 -122
- package/dist/test/room-messaging-durable-send.unit.test.js.map +0 -1
- package/dist/test/room-messaging.unit.test.d.ts +0 -2
- package/dist/test/room-messaging.unit.test.d.ts.map +0 -1
- package/dist/test/room-messaging.unit.test.js +0 -495
- package/dist/test/room-messaging.unit.test.js.map +0 -1
- package/dist/test/room-notice-log.unit.test.d.ts +0 -5
- package/dist/test/room-notice-log.unit.test.d.ts.map +0 -1
- package/dist/test/room-notice-log.unit.test.js +0 -100
- package/dist/test/room-notice-log.unit.test.js.map +0 -1
- package/dist/test/room-protocol-admission.unit.test.d.ts +0 -2
- package/dist/test/room-protocol-admission.unit.test.d.ts.map +0 -1
- package/dist/test/room-protocol-admission.unit.test.js +0 -432
- package/dist/test/room-protocol-admission.unit.test.js.map +0 -1
- package/dist/test/room-protocol-notify.unit.test.d.ts +0 -2
- package/dist/test/room-protocol-notify.unit.test.d.ts.map +0 -1
- package/dist/test/room-protocol-notify.unit.test.js +0 -184
- package/dist/test/room-protocol-notify.unit.test.js.map +0 -1
- package/dist/test/room-protocol-retry-queue.unit.test.d.ts +0 -2
- package/dist/test/room-protocol-retry-queue.unit.test.d.ts.map +0 -1
- package/dist/test/room-protocol-retry-queue.unit.test.js +0 -275
- package/dist/test/room-protocol-retry-queue.unit.test.js.map +0 -1
- package/dist/test/room-protocol.helper.d.ts +0 -60
- package/dist/test/room-protocol.helper.d.ts.map +0 -1
- package/dist/test/room-protocol.helper.js +0 -169
- package/dist/test/room-protocol.helper.js.map +0 -1
- package/dist/test/room-protocol.unit.test.d.ts +0 -2
- package/dist/test/room-protocol.unit.test.d.ts.map +0 -1
- package/dist/test/room-protocol.unit.test.js +0 -431
- package/dist/test/room-protocol.unit.test.js.map +0 -1
- package/dist/test/room-read-directed.integration.test.d.ts +0 -7
- package/dist/test/room-read-directed.integration.test.d.ts.map +0 -1
- package/dist/test/room-read-directed.integration.test.js +0 -136
- package/dist/test/room-read-directed.integration.test.js.map +0 -1
- package/dist/test/room-router.unit.test.d.ts +0 -2
- package/dist/test/room-router.unit.test.d.ts.map +0 -1
- package/dist/test/room-router.unit.test.js +0 -235
- package/dist/test/room-router.unit.test.js.map +0 -1
- package/dist/test/room-send-directed.integration.test.d.ts +0 -7
- package/dist/test/room-send-directed.integration.test.d.ts.map +0 -1
- package/dist/test/room-send-directed.integration.test.js +0 -129
- package/dist/test/room-send-directed.integration.test.js.map +0 -1
- package/dist/test/room-send-retry-queue.integration.test.d.ts +0 -5
- package/dist/test/room-send-retry-queue.integration.test.d.ts.map +0 -1
- package/dist/test/room-send-retry-queue.integration.test.js +0 -152
- package/dist/test/room-send-retry-queue.integration.test.js.map +0 -1
- package/dist/test/room-send-retry.integration.test.d.ts +0 -5
- package/dist/test/room-send-retry.integration.test.d.ts.map +0 -1
- package/dist/test/room-send-retry.integration.test.js +0 -154
- package/dist/test/room-send-retry.integration.test.js.map +0 -1
- package/dist/test/room-state-sync.integration.test.d.ts +0 -5
- package/dist/test/room-state-sync.integration.test.d.ts.map +0 -1
- package/dist/test/room-state-sync.integration.test.js +0 -105
- package/dist/test/room-state-sync.integration.test.js.map +0 -1
- package/dist/test/room-token-store.unit.test.d.ts +0 -5
- package/dist/test/room-token-store.unit.test.d.ts.map +0 -1
- package/dist/test/room-token-store.unit.test.js +0 -124
- package/dist/test/room-token-store.unit.test.js.map +0 -1
- package/dist/test/room-token-verification.unit.test.d.ts +0 -2
- package/dist/test/room-token-verification.unit.test.d.ts.map +0 -1
- package/dist/test/room-token-verification.unit.test.js +0 -238
- package/dist/test/room-token-verification.unit.test.js.map +0 -1
- package/dist/test/scratch-directory.helper.d.ts +0 -18
- package/dist/test/scratch-directory.helper.d.ts.map +0 -1
- package/dist/test/scratch-directory.helper.js +0 -35
- package/dist/test/scratch-directory.helper.js.map +0 -1
- package/dist/test/scratch-directory.setup.d.ts +0 -2
- package/dist/test/scratch-directory.setup.d.ts.map +0 -1
- package/dist/test/scratch-directory.setup.js +0 -7
- package/dist/test/scratch-directory.setup.js.map +0 -1
- package/dist/test/scratch-directory.unit.test.d.ts +0 -2
- package/dist/test/scratch-directory.unit.test.d.ts.map +0 -1
- package/dist/test/scratch-directory.unit.test.js +0 -78
- package/dist/test/scratch-directory.unit.test.js.map +0 -1
- package/dist/test/send-by-room-name.integration.test.d.ts +0 -5
- package/dist/test/send-by-room-name.integration.test.d.ts.map +0 -1
- package/dist/test/send-by-room-name.integration.test.js +0 -77
- package/dist/test/send-by-room-name.integration.test.js.map +0 -1
- package/dist/test/shutdown-signals.unit.test.d.ts +0 -5
- package/dist/test/shutdown-signals.unit.test.d.ts.map +0 -1
- package/dist/test/shutdown-signals.unit.test.js +0 -110
- package/dist/test/shutdown-signals.unit.test.js.map +0 -1
- package/dist/test/stale-agent-checker.unit.test.d.ts +0 -2
- package/dist/test/stale-agent-checker.unit.test.d.ts.map +0 -1
- package/dist/test/stale-agent-checker.unit.test.js +0 -267
- package/dist/test/stale-agent-checker.unit.test.js.map +0 -1
- package/dist/test/state-sync-convergence.integration.test.d.ts +0 -7
- package/dist/test/state-sync-convergence.integration.test.d.ts.map +0 -1
- package/dist/test/state-sync-convergence.integration.test.js +0 -263
- package/dist/test/state-sync-convergence.integration.test.js.map +0 -1
- package/dist/test/synthetic-advert.d.ts +0 -8
- package/dist/test/synthetic-advert.d.ts.map +0 -1
- package/dist/test/synthetic-advert.js +0 -16
- package/dist/test/synthetic-advert.js.map +0 -1
- package/dist/test/test-transport.d.ts +0 -43
- package/dist/test/test-transport.d.ts.map +0 -1
- package/dist/test/test-transport.js +0 -122
- package/dist/test/test-transport.js.map +0 -1
- package/dist/test/token-text.unit.test.d.ts +0 -2
- package/dist/test/token-text.unit.test.d.ts.map +0 -1
- package/dist/test/token-text.unit.test.js +0 -46
- package/dist/test/token-text.unit.test.js.map +0 -1
- package/dist/test/tool-version-reporting.integration.test.d.ts +0 -5
- package/dist/test/tool-version-reporting.integration.test.d.ts.map +0 -1
- package/dist/test/tool-version-reporting.integration.test.js +0 -105
- package/dist/test/tool-version-reporting.integration.test.js.map +0 -1
- package/dist/test/user-identity.unit.test.d.ts +0 -5
- package/dist/test/user-identity.unit.test.d.ts.map +0 -1
- package/dist/test/user-identity.unit.test.js +0 -224
- package/dist/test/user-identity.unit.test.js.map +0 -1
- package/dist/test/user-principal-mints-device-grant.unit.test.d.ts +0 -7
- package/dist/test/user-principal-mints-device-grant.unit.test.d.ts.map +0 -1
- package/dist/test/user-principal-mints-device-grant.unit.test.js +0 -62
- package/dist/test/user-principal-mints-device-grant.unit.test.js.map +0 -1
- package/dist/test/version-report-actions.unit.test.d.ts +0 -5
- package/dist/test/version-report-actions.unit.test.d.ts.map +0 -1
- package/dist/test/version-report-actions.unit.test.js +0 -35
- package/dist/test/version-report-actions.unit.test.js.map +0 -1
- package/dist/test/visibility.integration.test.d.ts +0 -12
- package/dist/test/visibility.integration.test.d.ts.map +0 -1
- package/dist/test/visibility.integration.test.js +0 -259
- package/dist/test/visibility.integration.test.js.map +0 -1
- package/dist/test/web-url-tool-action.integration.test.d.ts +0 -2
- package/dist/test/web-url-tool-action.integration.test.d.ts.map +0 -1
- package/dist/test/web-url-tool-action.integration.test.js +0 -69
- package/dist/test/web-url-tool-action.integration.test.js.map +0 -1
- package/dist/test/wire-mesh-core-version.unit.test.d.ts +0 -5
- package/dist/test/wire-mesh-core-version.unit.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-core-version.unit.test.js +0 -14
- package/dist/test/wire-mesh-core-version.unit.test.js.map +0 -1
- package/dist/test/wire-mesh-identity.unit.test.d.ts +0 -5
- package/dist/test/wire-mesh-identity.unit.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-identity.unit.test.js +0 -26
- package/dist/test/wire-mesh-identity.unit.test.js.map +0 -1
- package/dist/test/wire-mesh-transport-gateway-trust.integration.test.d.ts +0 -2
- package/dist/test/wire-mesh-transport-gateway-trust.integration.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-transport-gateway-trust.integration.test.js +0 -56
- package/dist/test/wire-mesh-transport-gateway-trust.integration.test.js.map +0 -1
- package/dist/test/wire-mesh-transport-hub.integration.test.d.ts +0 -5
- package/dist/test/wire-mesh-transport-hub.integration.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-transport-hub.integration.test.js +0 -140
- package/dist/test/wire-mesh-transport-hub.integration.test.js.map +0 -1
- package/dist/test/wire-mesh-transport-shutdown-unref.integration.test.d.ts +0 -5
- package/dist/test/wire-mesh-transport-shutdown-unref.integration.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-transport-shutdown-unref.integration.test.js +0 -316
- package/dist/test/wire-mesh-transport-shutdown-unref.integration.test.js.map +0 -1
- package/dist/test/wire-mesh-transport.integration.test.d.ts +0 -5
- package/dist/test/wire-mesh-transport.integration.test.d.ts.map +0 -1
- package/dist/test/wire-mesh-transport.integration.test.js +0 -659
- package/dist/test/wire-mesh-transport.integration.test.js.map +0 -1
- package/dist/test/ws-dial.integration.test.d.ts +0 -2
- package/dist/test/ws-dial.integration.test.d.ts.map +0 -1
- package/dist/test/ws-dial.integration.test.js +0 -112
- package/dist/test/ws-dial.integration.test.js.map +0 -1
- package/dist/test/wss-remote-connect.integration.test.d.ts +0 -2
- package/dist/test/wss-remote-connect.integration.test.d.ts.map +0 -1
- package/dist/test/wss-remote-connect.integration.test.js +0 -122
- package/dist/test/wss-remote-connect.integration.test.js.map +0 -1
- package/src/bridges/user/web/test/bridge-web-server.helper.ts +0 -54
- package/src/bridges/user/web/vite.config.ts +0 -71
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WireMeshTransport's periodic gossip tick also carries this side's own currently-hosted public/private rooms (a `room/hosted` extension on peer-advert's own open tail, the same convention presence/status already established), so a peer's `listKnownDevices()` can read another device's advertised rooms without a bespoke per-fact event. This is the write side of P3.8's room-discovery replacement for createRoom's own broadcastPatch (agent-comms#48's own 2026-09-14 investigation): the read side (merging a gossip-discovered room into listRooms) is deliberately not built here -- it needs its own design pass, per that issue's established pattern, once this primitive exists to build it against.
|
|
3
|
-
*/
|
|
4
|
-
import { test, describe, expect } from "vitest";
|
|
5
|
-
import { generateIdentity } from "../core/identity.js";
|
|
6
|
-
import { toIdentityPort } from "../core/wire-mesh-identity.js";
|
|
7
|
-
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
8
|
-
import { WireMeshTransport } from "../core/wire-mesh-transport.js";
|
|
9
|
-
import { waitFor } from "./test-transport.js";
|
|
10
|
-
const SHORT_INTERVAL_MS = 50;
|
|
11
|
-
function inertEvents() {
|
|
12
|
-
return {
|
|
13
|
-
onMessage: () => undefined,
|
|
14
|
-
onPeerConnected: () => undefined,
|
|
15
|
-
onPeerDisconnected: () => undefined,
|
|
16
|
-
onIntroduction: () => undefined,
|
|
17
|
-
onConnectionRequest: () => undefined,
|
|
18
|
-
onPeerList: () => undefined,
|
|
19
|
-
onPeerJoined: () => undefined,
|
|
20
|
-
onBecomeCoordinator: () => undefined,
|
|
21
|
-
onRevocationAnnounce: () => undefined,
|
|
22
|
-
onCoordinatorClaim: () => undefined,
|
|
23
|
-
onElectionSessionEnrolled: () => undefined,
|
|
24
|
-
onPresenceAdvert: () => undefined,
|
|
25
|
-
onDeviceReachable: () => undefined,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
describe("WireMeshTransport hosted-rooms gossip", () => {
|
|
29
|
-
test("a peer's listKnownDevices reflects another device's currently-hosted public/private rooms", async () => {
|
|
30
|
-
const identityA = generateIdentity();
|
|
31
|
-
const identityB = generateIdentity();
|
|
32
|
-
const peerIdA = deviceIdToHex(await toIdentityPort(identityA).then((p) => p.deviceId));
|
|
33
|
-
const peerIdB = deviceIdToHex(await toIdentityPort(identityB).then((p) => p.deviceId));
|
|
34
|
-
let hostedByA = [
|
|
35
|
-
{
|
|
36
|
-
path: `${peerIdA}/general`,
|
|
37
|
-
name: "general",
|
|
38
|
-
type: "public",
|
|
39
|
-
description: "chat",
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
const transportA = new WireMeshTransport(inertEvents(), identityA, {
|
|
43
|
-
presenceReadvertiseIntervalMs: SHORT_INTERVAL_MS,
|
|
44
|
-
getHostedRooms: () => hostedByA,
|
|
45
|
-
});
|
|
46
|
-
const transportB = new WireMeshTransport(inertEvents(), identityB);
|
|
47
|
-
try {
|
|
48
|
-
await transportA.startDataServer();
|
|
49
|
-
await transportB.connectToPeer({
|
|
50
|
-
id: peerIdA,
|
|
51
|
-
port: transportA.dataPort,
|
|
52
|
-
startedAt: new Date().toISOString(),
|
|
53
|
-
}, peerIdB);
|
|
54
|
-
await waitFor(() => {
|
|
55
|
-
const advert = transportB
|
|
56
|
-
.listKnownDevices()
|
|
57
|
-
.find((entry) => entry.deviceId === peerIdA)?.advert["room/hosted"];
|
|
58
|
-
return (Array.isArray(advert) &&
|
|
59
|
-
advert.length === 1 &&
|
|
60
|
-
advert[0].name === "general");
|
|
61
|
-
}, "B observes A's advertised hosted room");
|
|
62
|
-
hostedByA = [];
|
|
63
|
-
await waitFor(() => {
|
|
64
|
-
const advert = transportB
|
|
65
|
-
.listKnownDevices()
|
|
66
|
-
.find((entry) => entry.deviceId === peerIdA)?.advert["room/hosted"];
|
|
67
|
-
return Array.isArray(advert) && advert.length === 0;
|
|
68
|
-
}, "B observes A no longer hosting any room after the next tick");
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
await transportB.shutdown();
|
|
72
|
-
await transportA.shutdown();
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
test("a session with no hosted-rooms source configured never advertises the room/hosted key", async () => {
|
|
76
|
-
const identityA = generateIdentity();
|
|
77
|
-
const identityB = generateIdentity();
|
|
78
|
-
const peerIdA = deviceIdToHex(await toIdentityPort(identityA).then((p) => p.deviceId));
|
|
79
|
-
const peerIdB = deviceIdToHex(await toIdentityPort(identityB).then((p) => p.deviceId));
|
|
80
|
-
const transportA = new WireMeshTransport(inertEvents(), identityA);
|
|
81
|
-
const transportB = new WireMeshTransport(inertEvents(), identityB);
|
|
82
|
-
try {
|
|
83
|
-
await transportA.startDataServer();
|
|
84
|
-
await transportB.connectToPeer({
|
|
85
|
-
id: peerIdA,
|
|
86
|
-
port: transportA.dataPort,
|
|
87
|
-
startedAt: new Date().toISOString(),
|
|
88
|
-
}, peerIdB);
|
|
89
|
-
await waitFor(() => transportB
|
|
90
|
-
.listKnownDevices()
|
|
91
|
-
.some((entry) => entry.deviceId === peerIdA), "B's known-devices view includes A");
|
|
92
|
-
const known = transportB
|
|
93
|
-
.listKnownDevices()
|
|
94
|
-
.find((entry) => entry.deviceId === peerIdA);
|
|
95
|
-
expect(known?.advert["room/hosted"]).toBeUndefined();
|
|
96
|
-
}
|
|
97
|
-
finally {
|
|
98
|
-
await transportB.shutdown();
|
|
99
|
-
await transportA.shutdown();
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=hosted-rooms-gossip.integration.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-rooms-gossip.integration.test.js","sourceRoot":"","sources":["../../src/test/hosted-rooms-gossip.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,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B,EAAE;iBAClB,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,EAChD,mCAAmC,CACpC,CAAC;YAEF,MAAM,KAAK,GAAG,UAAU;iBACrB,gBAAgB,EAAE;iBAClB,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;YAC/C,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;QACvD,CAAC;gBAAS,CAAC;YACT,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC5B,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What a store puts on the relay hub, seen the way anyone connected to a public hub sees it (agent-comms#293): a bare client that trusts nobody and records every advert the hub broadcasts to it. A store holds a hub session only when its machine trusts someone and its agent is not a ghost, and advertises its agent, presence, hosted rooms and versions only when that agent is visible, so a store with nothing to say to another machine puts nothing on the hub, and a hidden agent only its device advert.
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
5
|
-
//# sourceMappingURL=hub-exposure.integration.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub-exposure.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/hub-exposure.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What a store puts on the relay hub, seen the way anyone connected to a public hub sees it (agent-comms#293): a bare client that trusts nobody and records every advert the hub broadcasts to it. A store holds a hub session only when its machine trusts someone and its agent is not a ghost, and advertises its agent, presence, hosted rooms and versions only when that agent is visible, so a store with nothing to say to another machine puts nothing on the hub, and a hidden agent only its device advert.
|
|
3
|
-
*/
|
|
4
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { MeshStore } from "../core/mesh-store.js";
|
|
6
|
-
import { AGENT_SELF_GOSSIP_KEY, HOSTED_ROOMS_GOSSIP_KEY, PRESENCE_GOSSIP_KEY, } from "../core/gossip-extensions.js";
|
|
7
|
-
import { freeLocalPort, observeHub, realHubOverWs, TeardownStack, waitForCondition, } from "./hub-helpers.js";
|
|
8
|
-
import { wireTestTransport } from "./test-transport.js";
|
|
9
|
-
/** A device-id is a 64-character lowercase hex SHA-256 digest. */
|
|
10
|
-
const DEVICE_ID_HEX_LENGTH = 64;
|
|
11
|
-
/** Short enough that several gossip rounds fit inside a test's own watch window. */
|
|
12
|
-
const FAST_GOSSIP_INTERVAL_MS = 50;
|
|
13
|
-
/** How long a store that must stay silent is watched for: many gossip rounds and several link polls. */
|
|
14
|
-
const SILENCE_WATCH_MS = 1500;
|
|
15
|
-
const sleep = async (ms) => new Promise((resolve) => {
|
|
16
|
-
setTimeout(resolve, ms);
|
|
17
|
-
});
|
|
18
|
-
const cleanups = new TeardownStack();
|
|
19
|
-
afterEach(async () => {
|
|
20
|
-
await cleanups.run();
|
|
21
|
-
});
|
|
22
|
-
/** A store on its own machine that dials hubUrl, with an agent of the given visibility registered when one is asked for. */
|
|
23
|
-
async function startStore(hubUrl, visibility) {
|
|
24
|
-
const store = new MeshStore({
|
|
25
|
-
coordinatorPort: await freeLocalPort(),
|
|
26
|
-
hubUrl,
|
|
27
|
-
});
|
|
28
|
-
await wireTestTransport(store, {
|
|
29
|
-
presenceReadvertiseIntervalMs: FAST_GOSSIP_INTERVAL_MS,
|
|
30
|
-
});
|
|
31
|
-
await store.init();
|
|
32
|
-
cleanups.push(async () => store.shutdown());
|
|
33
|
-
if (visibility !== undefined) {
|
|
34
|
-
await store.registerAgent({
|
|
35
|
-
name: `${visibility}-agent`,
|
|
36
|
-
harness: "test",
|
|
37
|
-
cwd: `/test/${visibility}`,
|
|
38
|
-
pid: process.pid,
|
|
39
|
-
visibility,
|
|
40
|
-
tags: [],
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return store;
|
|
44
|
-
}
|
|
45
|
-
/** The working directory startStore registers a visible agent with. */
|
|
46
|
-
const VISIBLE_CWD = "/test/visible";
|
|
47
|
-
/** Trusts an arbitrary remote device, which is all it takes for a store to have something to say to another machine. */
|
|
48
|
-
const SOME_REMOTE_DEVICE = "f".repeat(DEVICE_ID_HEX_LENGTH);
|
|
49
|
-
describe("what a store puts on the hub", () => {
|
|
50
|
-
it("puts nothing on the hub while its machine trusts nobody, not even its device id", async () => {
|
|
51
|
-
const hub = await realHubOverWs();
|
|
52
|
-
cleanups.push(hub.close);
|
|
53
|
-
const observer = await observeHub(hub.url);
|
|
54
|
-
cleanups.push(observer.close);
|
|
55
|
-
const store = await startStore(hub.url, "visible");
|
|
56
|
-
await sleep(SILENCE_WATCH_MS);
|
|
57
|
-
expect(observer.advertsFor(store.peerId)).toEqual([]);
|
|
58
|
-
expect(hub.connectionCount()).toBe(1);
|
|
59
|
-
});
|
|
60
|
-
it("puts nothing on the hub for a store with no agent yet, even when its machine trusts someone", async () => {
|
|
61
|
-
const hub = await realHubOverWs();
|
|
62
|
-
cleanups.push(hub.close);
|
|
63
|
-
const observer = await observeHub(hub.url);
|
|
64
|
-
cleanups.push(observer.close);
|
|
65
|
-
const store = await startStore(hub.url, undefined);
|
|
66
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
67
|
-
await sleep(SILENCE_WATCH_MS);
|
|
68
|
-
expect(observer.advertsFor(store.peerId)).toEqual([]);
|
|
69
|
-
});
|
|
70
|
-
it("puts nothing on the hub for a ghost agent, even when its machine trusts someone", async () => {
|
|
71
|
-
const hub = await realHubOverWs();
|
|
72
|
-
cleanups.push(hub.close);
|
|
73
|
-
const observer = await observeHub(hub.url);
|
|
74
|
-
cleanups.push(observer.close);
|
|
75
|
-
const store = await startStore(hub.url, "ghost");
|
|
76
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
77
|
-
await sleep(SILENCE_WATCH_MS);
|
|
78
|
-
expect(observer.advertsFor(store.peerId)).toEqual([]);
|
|
79
|
-
expect(hub.connectionCount()).toBe(1);
|
|
80
|
-
});
|
|
81
|
-
it("puts only its device advert on the hub for a hidden agent: no agent, presence or hosted rooms", async () => {
|
|
82
|
-
const hub = await realHubOverWs();
|
|
83
|
-
cleanups.push(hub.close);
|
|
84
|
-
const observer = await observeHub(hub.url);
|
|
85
|
-
cleanups.push(observer.close);
|
|
86
|
-
const store = await startStore(hub.url, "hidden");
|
|
87
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
88
|
-
await waitForCondition(() => observer.advertsFor(store.peerId).length > 0);
|
|
89
|
-
await sleep(SILENCE_WATCH_MS);
|
|
90
|
-
for (const advert of observer.advertsFor(store.peerId)) {
|
|
91
|
-
expect(advert[AGENT_SELF_GOSSIP_KEY]).toBeUndefined();
|
|
92
|
-
expect(advert[PRESENCE_GOSSIP_KEY]).toBeUndefined();
|
|
93
|
-
expect(advert[HOSTED_ROOMS_GOSSIP_KEY]).toBeUndefined();
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
it("advertises a visible agent and its presence once its machine trusts someone", async () => {
|
|
97
|
-
const hub = await realHubOverWs();
|
|
98
|
-
cleanups.push(hub.close);
|
|
99
|
-
const observer = await observeHub(hub.url);
|
|
100
|
-
cleanups.push(observer.close);
|
|
101
|
-
const store = await startStore(hub.url, "visible");
|
|
102
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
103
|
-
await waitForCondition(() => observer
|
|
104
|
-
.advertsFor(store.peerId)
|
|
105
|
-
.some((advert) => advert[AGENT_SELF_GOSSIP_KEY] !== undefined &&
|
|
106
|
-
advert[PRESENCE_GOSSIP_KEY] !== undefined));
|
|
107
|
-
});
|
|
108
|
-
it("puts no directory, process id, tag or private room on the hub, in any field of any advert", async () => {
|
|
109
|
-
const hub = await realHubOverWs();
|
|
110
|
-
cleanups.push(hub.close);
|
|
111
|
-
const observer = await observeHub(hub.url);
|
|
112
|
-
cleanups.push(observer.close);
|
|
113
|
-
const store = await startStore(hub.url, "visible");
|
|
114
|
-
// A project room whose description names the working directory, and a private room: the things a hub must not be told.
|
|
115
|
-
await store.createRoom({
|
|
116
|
-
name: "project",
|
|
117
|
-
type: "public",
|
|
118
|
-
owner: store.peerId,
|
|
119
|
-
description: `Project room for ${VISIBLE_CWD}`,
|
|
120
|
-
});
|
|
121
|
-
await store.createRoom({
|
|
122
|
-
name: "confidential",
|
|
123
|
-
type: "private",
|
|
124
|
-
owner: store.peerId,
|
|
125
|
-
description: "not for the hub",
|
|
126
|
-
});
|
|
127
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
128
|
-
await waitForCondition(() => observer
|
|
129
|
-
.advertsFor(store.peerId)
|
|
130
|
-
.some((advert) => advert[AGENT_SELF_GOSSIP_KEY] !== undefined &&
|
|
131
|
-
advert[HOSTED_ROOMS_GOSSIP_KEY] !== undefined));
|
|
132
|
-
await sleep(SILENCE_WATCH_MS);
|
|
133
|
-
for (const advert of observer.advertsFor(store.peerId)) {
|
|
134
|
-
const self = advert[AGENT_SELF_GOSSIP_KEY];
|
|
135
|
-
if (self !== undefined) {
|
|
136
|
-
expect(Object.keys(self)
|
|
137
|
-
.filter((key) => key !== "membership" && key !== "machine")
|
|
138
|
-
.sort()).toEqual(["harness", "name"]);
|
|
139
|
-
}
|
|
140
|
-
const hosted = advert[HOSTED_ROOMS_GOSSIP_KEY];
|
|
141
|
-
if (hosted !== undefined) {
|
|
142
|
-
expect(hosted).toEqual([
|
|
143
|
-
{ path: `${store.peerId}/project`, name: "project", type: "public" },
|
|
144
|
-
]);
|
|
145
|
-
}
|
|
146
|
-
// Whichever field it would ride in, nothing a hub hands out may contain the directory.
|
|
147
|
-
const wire = JSON.stringify(advert, (_key, value) => value instanceof Uint8Array ? Array.from(value) : value);
|
|
148
|
-
expect(wire).not.toContain(VISIBLE_CWD);
|
|
149
|
-
expect(wire).not.toContain("confidential");
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
it("joins the hub as soon as trust is added and leaves it when the trust is withdrawn", async () => {
|
|
153
|
-
const hub = await realHubOverWs();
|
|
154
|
-
cleanups.push(hub.close);
|
|
155
|
-
const observer = await observeHub(hub.url);
|
|
156
|
-
cleanups.push(observer.close);
|
|
157
|
-
const store = await startStore(hub.url, "visible");
|
|
158
|
-
expect(hub.connectionCount()).toBe(1);
|
|
159
|
-
store.addTrustedGateway(SOME_REMOTE_DEVICE);
|
|
160
|
-
await waitForCondition(() => hub.connectionCount() === 2);
|
|
161
|
-
store.removeTrustedGateway(SOME_REMOTE_DEVICE);
|
|
162
|
-
await waitForCondition(() => hub.connectionCount() === 1);
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
//# sourceMappingURL=hub-exposure.integration.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub-exposure.integration.test.js","sourceRoot":"","sources":["../../src/test/hub-exposure.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,kEAAkE;AAClE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,oFAAoF;AACpF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,wGAAwG;AACxG,MAAM,gBAAgB,GAAG,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B,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACnD,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEtC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;QAC5C,MAAM,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;QAE1D,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QAC/C,MAAM,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Frame, PeerAdvert } from "wire-mesh-core/generated/protocol";
|
|
2
|
-
export declare function cbor2ToBytes(frame: Frame): Uint8Array;
|
|
3
|
-
/** A real relay hub served over ws: each accepted socket is wrapped as a Connection for createRelayHub, exactly what the production Durable Object does (pre-hibernation shape). Also exposes the hub's own live-connection count, since a test asserting a client-side disconnect actually reached the far end needs an observable on the hub itself, not just the client. */
|
|
4
|
-
export declare function realHubOverWs(options?: {
|
|
5
|
-
port?: number;
|
|
6
|
-
}): Promise<{
|
|
7
|
-
port: number;
|
|
8
|
-
url: string;
|
|
9
|
-
connectionCount: () => number;
|
|
10
|
-
close: () => Promise<void>;
|
|
11
|
-
}>;
|
|
12
|
-
/** A ws:// URL nothing is listening on, for a test that hands a store or transport a hub to dial (a bridge entry point defaults to the production hub, which a hermetic test must not touch) and wants the dial to fail fast and leave hub.isConnected false. Binds an ephemeral TCP port and closes it immediately, so the returned URL names a real, momentarily-free port with nothing behind it: connectWsUrl's own "error" handler fires on the resulting ECONNREFUSED near-instantly, well under its own 10s CONNECT_TIMEOUT_MS, rather than genuinely waiting out a black-holed address. A store built directly with no hubUrl never dials at all, so it needs no URL. */
|
|
13
|
-
export declare function unreachableHubUrl(): Promise<string>;
|
|
14
|
-
/** Polls `condition` until it's true or `timeoutMs` elapses, rejecting on timeout -- the shared shape every hub integration test uses to wait out real async gossip/discovery/close propagation rather than asserting immediately after firing an action. */
|
|
15
|
-
export declare function waitForCondition(condition: () => boolean, timeoutMs?: number): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* A test's registered teardown steps, run in reverse registration order. A test registers the hub before the stores that dial it, so closing in registration order shuts the hub while its clients are still running, and a store shutting down then can hand its coordinator role to a peer that dials the already-closed hub. Reverse order shuts the dependents down first, while the hub is still there to answer them.
|
|
18
|
-
*/
|
|
19
|
-
export declare class TeardownStack {
|
|
20
|
-
private readonly steps;
|
|
21
|
-
push(step: () => Promise<void>): void;
|
|
22
|
-
/** Runs every registered step, latest first, and empties the stack so the next test starts clean. */
|
|
23
|
-
run(): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
/** Everything an untrusted client of the hub can read: every advert the hub has broadcast to it, and the connection count that includes itself. */
|
|
26
|
-
export interface HubObserver {
|
|
27
|
-
/** Every advert received in a gossip frame so far, in arrival order. */
|
|
28
|
-
adverts: () => readonly PeerAdvert[];
|
|
29
|
-
/** The adverts received for one device (hex), or none. */
|
|
30
|
-
advertsFor: (deviceHex: string) => readonly PeerAdvert[];
|
|
31
|
-
close: () => Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Connects a bare client to the hub that never gossips, presents no identity and trusts nobody, and records every advert the hub broadcasts to it. This is the view of anyone connected to a public hub, which is what a test about what a store puts on the hub has to look at: asserting on another store's directory only shows what that store chose to accept.
|
|
35
|
-
*/
|
|
36
|
-
export declare function observeHub(url: string): Promise<HubObserver>;
|
|
37
|
-
/**
|
|
38
|
-
* The base of a bridge port range reserved for the calling test worker, for a test that starts bridges and must not bind the range a bridge on the machine holds.
|
|
39
|
-
*
|
|
40
|
-
* Each vitest worker of a run has its own pool id, and the base is that id times a stride wider than the range, so two workers of one run cannot share a base, and no worker's range is the production one. It is a reservation by construction, not a check that the ports are free: a test that asserts exact ports relies on nothing else on the machine using this worker's slot, which holds unless a second vitest run is going at the same time.
|
|
41
|
-
*/
|
|
42
|
-
export declare function testBridgePortBase(): number;
|
|
43
|
-
/** A localhost TCP port nothing is listening on right now, for a test that must not collide with whatever else runs on the machine: a fixed port can already belong to another process, and a store that connects to one that accepts but never answers as a coordinator waits for it indefinitely. */
|
|
44
|
-
export declare function freeLocalPort(): Promise<number>;
|
|
45
|
-
//# sourceMappingURL=hub-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub-helpers.d.ts","sourceRoot":"","sources":["../../src/test/hub-helpers.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAS3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAErD;AA0FD,+WAA+W;AAC/W,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC,CAmCD;AAED,ipBAAipB;AACjpB,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAiBzD;AAED,6PAA6P;AAC7P,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,OAAO,EACxB,SAAS,SAA+B,GACvC,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+B;IAErD,IAAI,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAIrC,qGAAqG;IAC/F,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAK3B;AAED,mJAAmJ;AACnJ,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,OAAO,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IACrC,0DAA0D;IAC1D,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,UAAU,EAAE,CAAC;IACzD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAclE;AAQD;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAM3C;AAED,uSAAuS;AACvS,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAiBrD"}
|
package/dist/test/hub-helpers.js
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
// Shared helpers for hub-mode integration tests: a real wire-mesh relay hub (createRelayHub -- the same domain logic the production mesh.exadev.io Durable Object runs) served over local WebSockets, canonical-CBOR framing for the ws bridge, and a condition-polling helper for the async discovery/gossip timing these tests exercise.
|
|
2
|
-
import { createServer } from "node:http";
|
|
3
|
-
import net from "node:net";
|
|
4
|
-
import { BRIDGE_PORT_COUNT } from "../bridges/user/web/bridge-port-range.js";
|
|
5
|
-
import { WebSocketServer } from "ws";
|
|
6
|
-
import { cdeDecodeOptions, cdeEncodeOptions, decode, encode } from "cbor2";
|
|
7
|
-
import { frameSchema } from "wire-mesh-core/generated/protocol";
|
|
8
|
-
import { createRelayHub } from "wire-mesh-core/domain/relay-hub";
|
|
9
|
-
import { deriveDeviceId, verifyWithPublicKey, } from "wire-mesh-core/adapters/node-identity";
|
|
10
|
-
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
11
|
-
import { connectWsUrl } from "../core/ws-dial.js";
|
|
12
|
-
const SHUTDOWN_GRACE_MS = 250;
|
|
13
|
-
const CLOSE_NORMAL = 1000; // RFC 6455 normal closure
|
|
14
|
-
const POLL_INTERVAL_MS = 25;
|
|
15
|
-
const DEFAULT_CONDITION_TIMEOUT_MS = 5_000;
|
|
16
|
-
export function cbor2ToBytes(frame) {
|
|
17
|
-
return new Uint8Array(encode(frame, cdeEncodeOptions));
|
|
18
|
-
}
|
|
19
|
-
/** ws's own RawData type is `Buffer | ArrayBuffer | Buffer[]`, but every caller here sets `socket.binaryType = "arraybuffer"` before this ever fires, so a real message is always an ArrayBuffer at runtime -- narrowed with a guard rather than asserted, since ws's declared type is genuinely broader than what this specific binaryType configuration guarantees. */
|
|
20
|
-
function isArrayBuffer(data) {
|
|
21
|
-
return data instanceof ArrayBuffer;
|
|
22
|
-
}
|
|
23
|
-
function wsReceiveStream(socket) {
|
|
24
|
-
const pending = [];
|
|
25
|
-
const waiters = [];
|
|
26
|
-
let ended = false;
|
|
27
|
-
socket.on("message", (data) => {
|
|
28
|
-
if (!isArrayBuffer(data))
|
|
29
|
-
return;
|
|
30
|
-
try {
|
|
31
|
-
const decoded = decode(new Uint8Array(data), cdeDecodeOptions);
|
|
32
|
-
const parsed = frameSchema.safeParse(decoded);
|
|
33
|
-
if (!parsed.success)
|
|
34
|
-
return;
|
|
35
|
-
const waiter = waiters.shift();
|
|
36
|
-
if (waiter !== undefined) {
|
|
37
|
-
waiter.resolve({ value: parsed.data, done: false });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
pending.push(parsed.data);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
// Undecodable: drop, keeping the stream alive for the well-formed frames behind it (the hub's own tolerance).
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
socket.on("close", () => {
|
|
48
|
-
ended = true;
|
|
49
|
-
for (const waiter of waiters.splice(0)) {
|
|
50
|
-
waiter.resolve({ value: undefined, done: true });
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
socket.on("error", () => {
|
|
54
|
-
ended = true;
|
|
55
|
-
for (const waiter of waiters.splice(0)) {
|
|
56
|
-
waiter.resolve({ value: undefined, done: true });
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
return {
|
|
60
|
-
[Symbol.asyncIterator]() {
|
|
61
|
-
return {
|
|
62
|
-
async next() {
|
|
63
|
-
const next = pending.shift();
|
|
64
|
-
if (next !== undefined) {
|
|
65
|
-
return { value: next, done: false };
|
|
66
|
-
}
|
|
67
|
-
if (ended) {
|
|
68
|
-
return { value: undefined, done: true };
|
|
69
|
-
}
|
|
70
|
-
return new Promise((resolve, reject) => {
|
|
71
|
-
waiters.push({ resolve, reject });
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function wsConnection(socket) {
|
|
79
|
-
return {
|
|
80
|
-
send: async (frame) => new Promise((resolve, reject) => {
|
|
81
|
-
socket.send(cbor2ToBytes(frame), (error) => {
|
|
82
|
-
if (error) {
|
|
83
|
-
reject(error);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
resolve();
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}),
|
|
90
|
-
receive: () => wsReceiveStream(socket),
|
|
91
|
-
// Resolves once the socket has actually closed, so a test asserting on the far end's connection count after close() sees the closure rather than racing it. A socket that is already closed never emits "close" again, so it resolves straight away.
|
|
92
|
-
close: async () => new Promise((resolve) => {
|
|
93
|
-
if (socket.readyState === socket.CLOSED) {
|
|
94
|
-
resolve();
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
socket.once("close", () => {
|
|
98
|
-
resolve();
|
|
99
|
-
});
|
|
100
|
-
socket.close(CLOSE_NORMAL);
|
|
101
|
-
}),
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/** A real relay hub served over ws: each accepted socket is wrapped as a Connection for createRelayHub, exactly what the production Durable Object does (pre-hibernation shape). Also exposes the hub's own live-connection count, since a test asserting a client-side disconnect actually reached the far end needs an observable on the hub itself, not just the client. */
|
|
105
|
-
export async function realHubOverWs(options) {
|
|
106
|
-
const http = createServer();
|
|
107
|
-
const wss = new WebSocketServer({ server: http });
|
|
108
|
-
const hub = createRelayHub({
|
|
109
|
-
identity: { verify: verifyWithPublicKey, deriveDeviceId },
|
|
110
|
-
});
|
|
111
|
-
wss.on("connection", (socket) => {
|
|
112
|
-
socket.binaryType = "arraybuffer";
|
|
113
|
-
void hub.handleConnection(wsConnection(socket));
|
|
114
|
-
});
|
|
115
|
-
await new Promise((resolve) => {
|
|
116
|
-
http.listen(options?.port ?? 0, "127.0.0.1", () => {
|
|
117
|
-
resolve();
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
const address = http.address();
|
|
121
|
-
if (address === null || typeof address === "string") {
|
|
122
|
-
throw new Error("expected a TCP listen address");
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
port: address.port,
|
|
126
|
-
url: `ws://127.0.0.1:${String(address.port)}/`,
|
|
127
|
-
connectionCount: () => wss.clients.size,
|
|
128
|
-
close: async () => new Promise((resolve) => {
|
|
129
|
-
for (const client of wss.clients) {
|
|
130
|
-
client.terminate();
|
|
131
|
-
}
|
|
132
|
-
wss.close();
|
|
133
|
-
http.close(() => {
|
|
134
|
-
resolve();
|
|
135
|
-
});
|
|
136
|
-
setTimeout(resolve, SHUTDOWN_GRACE_MS);
|
|
137
|
-
}),
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
/** A ws:// URL nothing is listening on, for a test that hands a store or transport a hub to dial (a bridge entry point defaults to the production hub, which a hermetic test must not touch) and wants the dial to fail fast and leave hub.isConnected false. Binds an ephemeral TCP port and closes it immediately, so the returned URL names a real, momentarily-free port with nothing behind it: connectWsUrl's own "error" handler fires on the resulting ECONNREFUSED near-instantly, well under its own 10s CONNECT_TIMEOUT_MS, rather than genuinely waiting out a black-holed address. A store built directly with no hubUrl never dials at all, so it needs no URL. */
|
|
141
|
-
export async function unreachableHubUrl() {
|
|
142
|
-
return new Promise((resolve, reject) => {
|
|
143
|
-
const probe = net.createServer();
|
|
144
|
-
probe.listen(0, "127.0.0.1", () => {
|
|
145
|
-
const address = probe.address();
|
|
146
|
-
if (address === null || typeof address === "string") {
|
|
147
|
-
probe.close();
|
|
148
|
-
reject(new Error("expected a TCP listen address"));
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const port = address.port;
|
|
152
|
-
probe.close(() => {
|
|
153
|
-
resolve(`ws://127.0.0.1:${String(port)}/`);
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
probe.on("error", reject);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
/** Polls `condition` until it's true or `timeoutMs` elapses, rejecting on timeout -- the shared shape every hub integration test uses to wait out real async gossip/discovery/close propagation rather than asserting immediately after firing an action. */
|
|
160
|
-
export async function waitForCondition(condition, timeoutMs = DEFAULT_CONDITION_TIMEOUT_MS) {
|
|
161
|
-
return new Promise((resolve, reject) => {
|
|
162
|
-
const started = Date.now();
|
|
163
|
-
const check = () => {
|
|
164
|
-
if (condition()) {
|
|
165
|
-
resolve();
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (Date.now() - started > timeoutMs) {
|
|
169
|
-
reject(new Error("condition not met within timeout"));
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
setTimeout(check, POLL_INTERVAL_MS);
|
|
173
|
-
};
|
|
174
|
-
check();
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* A test's registered teardown steps, run in reverse registration order. A test registers the hub before the stores that dial it, so closing in registration order shuts the hub while its clients are still running, and a store shutting down then can hand its coordinator role to a peer that dials the already-closed hub. Reverse order shuts the dependents down first, while the hub is still there to answer them.
|
|
179
|
-
*/
|
|
180
|
-
export class TeardownStack {
|
|
181
|
-
steps = [];
|
|
182
|
-
push(step) {
|
|
183
|
-
this.steps.push(step);
|
|
184
|
-
}
|
|
185
|
-
/** Runs every registered step, latest first, and empties the stack so the next test starts clean. */
|
|
186
|
-
async run() {
|
|
187
|
-
for (const step of this.steps.splice(0).reverse()) {
|
|
188
|
-
await step();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Connects a bare client to the hub that never gossips, presents no identity and trusts nobody, and records every advert the hub broadcasts to it. This is the view of anyone connected to a public hub, which is what a test about what a store puts on the hub has to look at: asserting on another store's directory only shows what that store chose to accept.
|
|
194
|
-
*/
|
|
195
|
-
export async function observeHub(url) {
|
|
196
|
-
const connection = await connectWsUrl(url);
|
|
197
|
-
const received = [];
|
|
198
|
-
void (async () => {
|
|
199
|
-
for await (const frame of connection.receive()) {
|
|
200
|
-
if (frame.type === "gossip")
|
|
201
|
-
received.push(...frame.peers);
|
|
202
|
-
}
|
|
203
|
-
})();
|
|
204
|
-
return {
|
|
205
|
-
adverts: () => received,
|
|
206
|
-
advertsFor: (deviceHex) => received.filter((advert) => deviceIdToHex(advert.device) === deviceHex),
|
|
207
|
-
close: async () => connection.close(),
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
/** The first port of the test slots, above the bridge port range and below every operating system's ephemeral range, so a test's bridge ports collide with neither a bridge running on the machine nor a port the operating system hands out. */
|
|
211
|
-
const TEST_BRIDGE_PORT_FLOOR = 21_000;
|
|
212
|
-
/** Ports between two slots' bases: wider than the bridge port range, so neighbouring slots never overlap. */
|
|
213
|
-
const TEST_BRIDGE_SLOT_STRIDE = BRIDGE_PORT_COUNT * 2;
|
|
214
|
-
/**
|
|
215
|
-
* The base of a bridge port range reserved for the calling test worker, for a test that starts bridges and must not bind the range a bridge on the machine holds.
|
|
216
|
-
*
|
|
217
|
-
* Each vitest worker of a run has its own pool id, and the base is that id times a stride wider than the range, so two workers of one run cannot share a base, and no worker's range is the production one. It is a reservation by construction, not a check that the ports are free: a test that asserts exact ports relies on nothing else on the machine using this worker's slot, which holds unless a second vitest run is going at the same time.
|
|
218
|
-
*/
|
|
219
|
-
export function testBridgePortBase() {
|
|
220
|
-
const poolId = Number(process.env.VITEST_POOL_ID);
|
|
221
|
-
if (!Number.isInteger(poolId) || poolId < 1) {
|
|
222
|
-
throw new Error("testBridgePortBase needs to run inside a vitest worker");
|
|
223
|
-
}
|
|
224
|
-
return TEST_BRIDGE_PORT_FLOOR + (poolId - 1) * TEST_BRIDGE_SLOT_STRIDE;
|
|
225
|
-
}
|
|
226
|
-
/** A localhost TCP port nothing is listening on right now, for a test that must not collide with whatever else runs on the machine: a fixed port can already belong to another process, and a store that connects to one that accepts but never answers as a coordinator waits for it indefinitely. */
|
|
227
|
-
export async function freeLocalPort() {
|
|
228
|
-
return new Promise((resolve, reject) => {
|
|
229
|
-
const probe = net.createServer();
|
|
230
|
-
probe.listen(0, "127.0.0.1", () => {
|
|
231
|
-
const address = probe.address();
|
|
232
|
-
if (address === null || typeof address === "string") {
|
|
233
|
-
probe.close();
|
|
234
|
-
reject(new Error("expected a TCP listen address"));
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
const { port } = address;
|
|
238
|
-
probe.close(() => {
|
|
239
|
-
resolve(port);
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
probe.on("error", reject);
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
//# sourceMappingURL=hub-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub-helpers.js","sourceRoot":"","sources":["../../src/test/hub-helpers.ts"],"names":[],"mappings":"AAAA,2UAA2U;AAE3U,OAAO,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AACtD,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAA8B,MAAM,IAAI,CAAC;AACjE,OAAO,EAAE,gBAAgB,E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