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,279 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration tests for joining a machine to an account (agent-comms#344), over a real hub between separate machines: the account issues an invite, a new machine redeems it and then holds the account, a machine that already trusted the account's principal covers the new machine's devices with no step of its own, and the issuer answers each invite only once.
|
|
3
|
-
*/
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
6
|
-
import { DEFAULT_CONNECTION_CODE_TTL_MS } from "../core/connection-code.js";
|
|
7
|
-
import { MeshStore } from "../core/mesh-store.js";
|
|
8
|
-
import { loadUserDisplayName } from "../core/user-identity.js";
|
|
9
|
-
import { runAccountCommand } from "../account-cli.js";
|
|
10
|
-
import { freeLocalPort, realHubOverWs, TeardownStack } from "./hub-helpers.js";
|
|
11
|
-
import { waitFor, wireTestTransport } from "./test-transport.js";
|
|
12
|
-
import { scratchDirectory } from "./scratch-directory.helper.js";
|
|
13
|
-
/** A device-id is a 64-character lowercase hex SHA-256 digest. */
|
|
14
|
-
const DEVICE_ID_HEX_LENGTH = 64;
|
|
15
|
-
/** Short enough that a gossip re-advertisement fires within a test's own wait budget. */
|
|
16
|
-
const FAST_GOSSIP_INTERVAL_MS = 50;
|
|
17
|
-
const cleanups = new TeardownStack();
|
|
18
|
-
const dirs = [];
|
|
19
|
-
/** Each machine's user identity directory, by its store. */
|
|
20
|
-
const userDirs = new WeakMap();
|
|
21
|
-
afterEach(async () => {
|
|
22
|
-
await cleanups.run();
|
|
23
|
-
for (const dir of dirs.splice(0)) {
|
|
24
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
function userDir() {
|
|
28
|
-
const dir = scratchDirectory("account-join-user-");
|
|
29
|
-
dirs.push(dir);
|
|
30
|
-
return dir;
|
|
31
|
-
}
|
|
32
|
-
function userDirOf(store) {
|
|
33
|
-
const dir = userDirs.get(store);
|
|
34
|
-
if (dir === undefined)
|
|
35
|
-
throw new Error("store was not made by machine()");
|
|
36
|
-
return dir;
|
|
37
|
-
}
|
|
38
|
-
/** A clock a test moves forward by hand, starting at the real time. */
|
|
39
|
-
function steppingClock() {
|
|
40
|
-
let offset = 0;
|
|
41
|
-
return {
|
|
42
|
-
now: () => Date.now() + offset,
|
|
43
|
-
advance: (ms) => {
|
|
44
|
-
offset += ms;
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
/** One machine: its own local mesh, its own user identity, one agent (visible unless told otherwise) so it holds a hub session once it trusts anyone. */
|
|
49
|
-
async function machine(hubUrl, name, options = {}) {
|
|
50
|
-
const store = new MeshStore({
|
|
51
|
-
coordinatorPort: await freeLocalPort(),
|
|
52
|
-
hubUrl,
|
|
53
|
-
});
|
|
54
|
-
const { clock, visibility = "visible" } = options;
|
|
55
|
-
const dir = userDir();
|
|
56
|
-
userDirs.set(store, dir);
|
|
57
|
-
await wireTestTransport(store, {
|
|
58
|
-
presenceReadvertiseIntervalMs: FAST_GOSSIP_INTERVAL_MS,
|
|
59
|
-
userIdentityOptions: { dir },
|
|
60
|
-
machineIdentityOptions: { dir },
|
|
61
|
-
clock,
|
|
62
|
-
});
|
|
63
|
-
await store.init();
|
|
64
|
-
cleanups.push(async () => store.shutdown());
|
|
65
|
-
await store.registerAgent({
|
|
66
|
-
name,
|
|
67
|
-
harness: "test",
|
|
68
|
-
cwd: `/test/${name}`,
|
|
69
|
-
pid: process.pid,
|
|
70
|
-
visibility,
|
|
71
|
-
tags: [],
|
|
72
|
-
});
|
|
73
|
-
return store;
|
|
74
|
-
}
|
|
75
|
-
/** The `account` commands' io for a test, running them against `store` and collecting what they print. */
|
|
76
|
-
function commandIo(store, readSecret, log) {
|
|
77
|
-
return {
|
|
78
|
-
readSecret,
|
|
79
|
-
log,
|
|
80
|
-
env: {},
|
|
81
|
-
openStore: async () => Promise.resolve({
|
|
82
|
-
account: store.account,
|
|
83
|
-
close: async () => Promise.resolve(),
|
|
84
|
-
}),
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function principalOf(store) {
|
|
88
|
-
const principal = store.getUserPrincipalId();
|
|
89
|
-
if (principal === undefined)
|
|
90
|
-
throw new Error("store has no identity yet");
|
|
91
|
-
return principal;
|
|
92
|
-
}
|
|
93
|
-
describe("account join", () => {
|
|
94
|
-
it("makes a new machine hold the account, and a machine trusting the account covers its devices", async () => {
|
|
95
|
-
const hub = await realHubOverWs();
|
|
96
|
-
cleanups.push(hub.close);
|
|
97
|
-
const account = await machine(hub.url, "account-home");
|
|
98
|
-
const newMachine = await machine(hub.url, "new-machine");
|
|
99
|
-
const observer = await machine(hub.url, "observer");
|
|
100
|
-
const accountPrincipal = principalOf(account);
|
|
101
|
-
expect(principalOf(newMachine)).not.toBe(accountPrincipal);
|
|
102
|
-
observer.addTrustedGatewayPrincipal(accountPrincipal);
|
|
103
|
-
account.addTrustedGatewayPrincipal(principalOf(observer));
|
|
104
|
-
const invite = await account.account.invite();
|
|
105
|
-
const joined = await newMachine.account.join(invite.code);
|
|
106
|
-
expect(await invite.settled).toBe("redeemed");
|
|
107
|
-
expect(joined.principal).toBe(accountPrincipal);
|
|
108
|
-
expect(principalOf(newMachine)).toBe(accountPrincipal);
|
|
109
|
-
expect(joined.replacedFile).toBeDefined();
|
|
110
|
-
await waitFor(async () => {
|
|
111
|
-
const agents = await observer.listAgents(observer.peerId);
|
|
112
|
-
return agents.some((agent) => agent.id === newMachine.peerId);
|
|
113
|
-
}, "the observer to list the new machine's agent");
|
|
114
|
-
expect(observer.listVerifiedMembers()).toContainEqual({
|
|
115
|
-
device: newMachine.peerId,
|
|
116
|
-
issuer: accountPrincipal,
|
|
117
|
-
kind: "principal",
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
it("hands the account's name to the machine that joins it", async () => {
|
|
121
|
-
const hub = await realHubOverWs();
|
|
122
|
-
cleanups.push(hub.close);
|
|
123
|
-
const account = await machine(hub.url, "account-home");
|
|
124
|
-
const newMachine = await machine(hub.url, "new-machine");
|
|
125
|
-
await account.naming.setPrincipalName("work account");
|
|
126
|
-
const invite = await account.account.invite();
|
|
127
|
-
await newMachine.account.join(invite.code);
|
|
128
|
-
expect(loadUserDisplayName({ dir: userDirOf(newMachine) })).toBe("work account");
|
|
129
|
-
});
|
|
130
|
-
it("keeps the label given on join as the issuing machine's petname for the joining machine", async () => {
|
|
131
|
-
const hub = await realHubOverWs();
|
|
132
|
-
cleanups.push(hub.close);
|
|
133
|
-
const account = await machine(hub.url, "account-home");
|
|
134
|
-
const newMachine = await machine(hub.url, "new-machine");
|
|
135
|
-
const newMachineId = newMachine.getMachineId();
|
|
136
|
-
const invite = await account.account.invite();
|
|
137
|
-
await newMachine.account.join(invite.code, { label: "studio mac" });
|
|
138
|
-
expect(account.naming.listPetnames().get(newMachineId ?? "")).toBe("studio mac");
|
|
139
|
-
expect(newMachine.naming.listPetnames().size).toBe(0);
|
|
140
|
-
});
|
|
141
|
-
it("refuses an unusable label before redeeming anything, leaving the invite for another try", async () => {
|
|
142
|
-
const hub = await realHubOverWs();
|
|
143
|
-
cleanups.push(hub.close);
|
|
144
|
-
const account = await machine(hub.url, "account-home");
|
|
145
|
-
const newMachine = await machine(hub.url, "new-machine");
|
|
146
|
-
const own = principalOf(newMachine);
|
|
147
|
-
const invite = await account.account.invite();
|
|
148
|
-
await expect(newMachine.account.join(invite.code, { label: "bad\u001b[2Jlabel" })).rejects.toMatchObject({ code: "INVALID_NAME" });
|
|
149
|
-
expect(newMachine.gatewayTrust.isTrusted(account.peerId)).toBe(false);
|
|
150
|
-
expect(principalOf(newMachine)).toBe(own);
|
|
151
|
-
await newMachine.account.join(invite.code, { label: "studio mac" });
|
|
152
|
-
expect(principalOf(newMachine)).toBe(principalOf(account));
|
|
153
|
-
});
|
|
154
|
-
it("refuses a join request whose label breaks the rules without spending the invite, even from a peer that skips its own check", async () => {
|
|
155
|
-
const hub = await realHubOverWs();
|
|
156
|
-
cleanups.push(hub.close);
|
|
157
|
-
const account = await machine(hub.url, "account-home");
|
|
158
|
-
const invite = await account.account.invite();
|
|
159
|
-
const request = async (params) => account.account.handleJoinRequest({
|
|
160
|
-
requestId: 1,
|
|
161
|
-
command: {
|
|
162
|
-
verb: "account:join",
|
|
163
|
-
params: { verb: "account.join", code: invite.code.code, ...params },
|
|
164
|
-
},
|
|
165
|
-
scope: { kind: "node" },
|
|
166
|
-
respond: async () => Promise.resolve(),
|
|
167
|
-
});
|
|
168
|
-
expect(await request({ label: "x", machine: "not-a-device-id" })).toMatchObject({ result: "error", code: "invalid_label" });
|
|
169
|
-
expect(await request({
|
|
170
|
-
label: "bad\u001bname",
|
|
171
|
-
machine: "a".repeat(DEVICE_ID_HEX_LENGTH),
|
|
172
|
-
})).toMatchObject({ result: "error", code: "invalid_label" });
|
|
173
|
-
expect(await request({ machine: "a".repeat(DEVICE_ID_HEX_LENGTH) })).toMatchObject({
|
|
174
|
-
result: "error",
|
|
175
|
-
code: "invalid_label",
|
|
176
|
-
});
|
|
177
|
-
expect(account.naming.listPetnames().size).toBe(0);
|
|
178
|
-
expect(await request({})).toMatchObject({ result: "ok" });
|
|
179
|
-
});
|
|
180
|
-
it("answers an invite once, so a second machine redeeming the same invite is refused", async () => {
|
|
181
|
-
const hub = await realHubOverWs();
|
|
182
|
-
cleanups.push(hub.close);
|
|
183
|
-
const account = await machine(hub.url, "account-home");
|
|
184
|
-
const first = await machine(hub.url, "first");
|
|
185
|
-
const second = await machine(hub.url, "second");
|
|
186
|
-
const secondPrincipal = principalOf(second);
|
|
187
|
-
const invite = await account.account.invite();
|
|
188
|
-
await first.account.join(invite.code);
|
|
189
|
-
await expect(second.account.join(invite.code)).rejects.toMatchObject({
|
|
190
|
-
code: "INVITE_REFUSED",
|
|
191
|
-
});
|
|
192
|
-
expect(principalOf(second)).toBe(secondPrincipal);
|
|
193
|
-
// Redeeming trusted the issuing device only so the key request could reach it; the refused join withdraws that again.
|
|
194
|
-
expect(second.gatewayTrust.isTrusted(account.peerId)).toBe(false);
|
|
195
|
-
});
|
|
196
|
-
it("refuses an invite once the issuer's clock passes its expiry, and settles it as expired", async () => {
|
|
197
|
-
const hub = await realHubOverWs();
|
|
198
|
-
cleanups.push(hub.close);
|
|
199
|
-
const clock = steppingClock();
|
|
200
|
-
const account = await machine(hub.url, "account-home", { clock });
|
|
201
|
-
const late = await machine(hub.url, "late");
|
|
202
|
-
const latePrincipal = principalOf(late);
|
|
203
|
-
const invite = await account.account.invite();
|
|
204
|
-
clock.advance(DEFAULT_CONNECTION_CODE_TTL_MS);
|
|
205
|
-
await expect(late.account.join(invite.code)).rejects.toMatchObject({
|
|
206
|
-
code: "INVITE_REFUSED",
|
|
207
|
-
});
|
|
208
|
-
expect(await invite.settled).toBe("expired");
|
|
209
|
-
expect(principalOf(late)).toBe(latePrincipal);
|
|
210
|
-
});
|
|
211
|
-
it("refuses to issue an invite valid for longer than the cap", async () => {
|
|
212
|
-
const hub = await realHubOverWs();
|
|
213
|
-
cleanups.push(hub.close);
|
|
214
|
-
const account = await machine(hub.url, "account-home");
|
|
215
|
-
await expect(account.account.invite({ ttlMs: DEFAULT_CONNECTION_CODE_TTL_MS + 1 })).rejects.toMatchObject({ code: "INVITE_TTL_TOO_LONG" });
|
|
216
|
-
});
|
|
217
|
-
it("joins through the account invite and join commands, with only hidden agents as the account commands run", async () => {
|
|
218
|
-
const hub = await realHubOverWs();
|
|
219
|
-
cleanups.push(hub.close);
|
|
220
|
-
const account = await machine(hub.url, "account-home", {
|
|
221
|
-
visibility: "hidden",
|
|
222
|
-
});
|
|
223
|
-
const newMachine = await machine(hub.url, "new-machine", {
|
|
224
|
-
visibility: "hidden",
|
|
225
|
-
});
|
|
226
|
-
const inviteOutput = [];
|
|
227
|
-
let printInvite = () => undefined;
|
|
228
|
-
const printedInvite = new Promise((resolve) => {
|
|
229
|
-
printInvite = resolve;
|
|
230
|
-
});
|
|
231
|
-
const noSecret = async () => Promise.reject(new Error("the invite command reads no secret"));
|
|
232
|
-
const inviting = runAccountCommand(["invite"], commandIo(account, noSecret, (line) => {
|
|
233
|
-
inviteOutput.push(line);
|
|
234
|
-
if (line.startsWith("{"))
|
|
235
|
-
printInvite(line);
|
|
236
|
-
}));
|
|
237
|
-
const invite = await printedInvite;
|
|
238
|
-
const joinOutput = [];
|
|
239
|
-
await runAccountCommand(["join"], commandIo(newMachine, async () => Promise.resolve(invite), (line) => {
|
|
240
|
-
joinOutput.push(line);
|
|
241
|
-
}));
|
|
242
|
-
await inviting;
|
|
243
|
-
expect(principalOf(newMachine)).toBe(principalOf(account));
|
|
244
|
-
expect(joinOutput[0]).toBe(`This machine now holds account ${principalOf(account)}.`);
|
|
245
|
-
expect(inviteOutput.at(-1)).toBe("The invite was redeemed: the new machine now holds this account.");
|
|
246
|
-
});
|
|
247
|
-
it("takes --label on account join and the issuer keeps it as its name for the new machine", async () => {
|
|
248
|
-
const hub = await realHubOverWs();
|
|
249
|
-
cleanups.push(hub.close);
|
|
250
|
-
const account = await machine(hub.url, "account-home", {
|
|
251
|
-
visibility: "hidden",
|
|
252
|
-
});
|
|
253
|
-
const newMachine = await machine(hub.url, "new-machine", {
|
|
254
|
-
visibility: "hidden",
|
|
255
|
-
});
|
|
256
|
-
let printInvite = () => undefined;
|
|
257
|
-
const printedInvite = new Promise((resolve) => {
|
|
258
|
-
printInvite = resolve;
|
|
259
|
-
});
|
|
260
|
-
const noSecret = async () => Promise.reject(new Error("the invite command reads no secret"));
|
|
261
|
-
const inviting = runAccountCommand(["invite"], commandIo(account, noSecret, (line) => {
|
|
262
|
-
if (line.startsWith("{"))
|
|
263
|
-
printInvite(line);
|
|
264
|
-
}));
|
|
265
|
-
const invite = await printedInvite;
|
|
266
|
-
await runAccountCommand(["join", "--label", "studio mac"], commandIo(newMachine, async () => Promise.resolve(invite), () => undefined));
|
|
267
|
-
await inviting;
|
|
268
|
-
expect(account.naming.listPetnames().get(newMachine.getMachineId() ?? "")).toBe("studio mac");
|
|
269
|
-
});
|
|
270
|
-
it("refuses an account join given something that is not an invite", async () => {
|
|
271
|
-
const hub = await realHubOverWs();
|
|
272
|
-
cleanups.push(hub.close);
|
|
273
|
-
const newMachine = await machine(hub.url, "new-machine");
|
|
274
|
-
const before = principalOf(newMachine);
|
|
275
|
-
await expect(runAccountCommand(["join"], commandIo(newMachine, async () => Promise.resolve('{"code":"x"}'), () => undefined))).rejects.toThrow(/not an account invite/);
|
|
276
|
-
expect(principalOf(newMachine)).toBe(before);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
//# sourceMappingURL=account-join.integration.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-join.integration.test.js","sourceRoot":"","sources":["../../src/test/account-join.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAqB,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,kEAAkE;AAClE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,yFAAyF;AACzF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,MAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC;AACrC,MAAM,IAAI,GAAa,EAAE,CAAC;AAC1B,4DAA4D;AAC5D,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAqB,CAAC;AAElD,SAAS,CAAC,KAAK,IAAI,EAAE;IACnB,MAAM,QAAQ,CAAC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CAAC,SAAS,CAChB,CACF,CAAC;QACF,MAAM,QAAQ,CAAC;QAEf,MAAM,CACJ,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CACnE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,GAAG,GAAG,MAAM,aAAa,EAAE,CAAC;QAClC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzB,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;QAEvC,MAAM,MAAM,CACV,iBAAiB,CACf,CAAC,MAAM,CAAC,EACR,SAAS,CACP,UAAU,EACV,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,EAC3C,GAAG,EAAE,CAAC,SAAS,CAChB,CACF,CACF,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;QAC3C,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared fixtures for the account ledger's replication integration tests (agent-comms#344): machines that hold one account key, each with its own user-identity.json and ledger store.
|
|
3
|
-
*/
|
|
4
|
-
import type { KeyValueStorage } from "wire-mesh-core/ports/storage";
|
|
5
|
-
import { type RevocationView } from "wire-mesh-core/domain/revocation-view";
|
|
6
|
-
import { MeshStore } from "../core/mesh-store.js";
|
|
7
|
-
import type { WireMeshTransport } from "../core/wire-mesh-transport.js";
|
|
8
|
-
import type { AccountLedger } from "../core/account-ledger.js";
|
|
9
|
-
import type { TeardownStack } from "./hub-helpers.js";
|
|
10
|
-
/** Short enough that the ledger's announcement round, which rides the re-advertise cadence, fires many times within a test's wait budget. */
|
|
11
|
-
export declare const FAST_GOSSIP_INTERVAL_MS = 50;
|
|
12
|
-
/** A fresh throwaway directory for one machine's user-identity.json, removed by removeUserDirs. */
|
|
13
|
-
export declare function userDir(): string;
|
|
14
|
-
export declare function removeUserDirs(): void;
|
|
15
|
-
/** Gives `toDir` a copy of the account key in `fromDir` and nothing else, as a deliberate copy of the key to a second machine would. */
|
|
16
|
-
export declare function copyAccountKey(fromDir: string, toDir: string): void;
|
|
17
|
-
export interface Machine {
|
|
18
|
-
store: MeshStore;
|
|
19
|
-
transport: WireMeshTransport;
|
|
20
|
-
revocation: RevocationView;
|
|
21
|
-
/** Where anything another device offers this one outside its own account ledger is stored. */
|
|
22
|
-
dataStorage: KeyValueStorage;
|
|
23
|
-
}
|
|
24
|
-
/** Starts one machine on the local mesh at `coordinatorPort`, holding the account key in `userIdentityDir`, dialling `hubUrl` when given, and registers a visible agent so its adverts carry the membership proof by which another machine recognises it as holding the same account. */
|
|
25
|
-
export declare function startMachine(cleanups: TeardownStack, options: Readonly<{
|
|
26
|
-
coordinatorPort: number;
|
|
27
|
-
userIdentityDir: string;
|
|
28
|
-
name: string;
|
|
29
|
-
hubUrl?: string;
|
|
30
|
-
}>): Promise<Machine>;
|
|
31
|
-
/** Another handle on a machine's ledger store, the way a second bridge on that machine would open it. */
|
|
32
|
-
export declare function ledgerOn(dir: string): Promise<AccountLedger>;
|
|
33
|
-
/** The token ids (hex) of the dm grants the ledger holds outstanding for `bearer`. */
|
|
34
|
-
export declare function outstandingDm(ledger: AccountLedger, bearer: string): Promise<string[]>;
|
|
35
|
-
//# sourceMappingURL=account-ledger-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-helpers.d.ts","sourceRoot":"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a,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CAGnB"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared fixtures for the account ledger's replication integration tests (agent-comms#344): machines that hold one account key, each with its own user-identity.json and ledger store.
|
|
3
|
-
*/
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
import * as path from "node:path";
|
|
6
|
-
import { createMemoryStorage } from "wire-mesh-core/adapters/memory-storage";
|
|
7
|
-
import { createSystemClock } from "wire-mesh-core/adapters/system-clock";
|
|
8
|
-
import { createRevocationView, } from "wire-mesh-core/domain/revocation-view";
|
|
9
|
-
import { MeshStore } from "../core/mesh-store.js";
|
|
10
|
-
import { openAccountLedger } from "../core/account-ledger-store.js";
|
|
11
|
-
import { loadOrCreateUserIdentity } from "../core/user-identity.js";
|
|
12
|
-
import { wireTestTransportWithHub } from "./test-transport.js";
|
|
13
|
-
import { scratchDirectory } from "./scratch-directory.helper.js";
|
|
14
|
-
/** Short enough that the ledger's announcement round, which rides the re-advertise cadence, fires many times within a test's wait budget. */
|
|
15
|
-
export const FAST_GOSSIP_INTERVAL_MS = 50;
|
|
16
|
-
const dirs = [];
|
|
17
|
-
/** A fresh throwaway directory for one machine's user-identity.json, removed by removeUserDirs. */
|
|
18
|
-
export function userDir() {
|
|
19
|
-
const dir = scratchDirectory("ledger-replication-user-");
|
|
20
|
-
dirs.push(dir);
|
|
21
|
-
return dir;
|
|
22
|
-
}
|
|
23
|
-
export function removeUserDirs() {
|
|
24
|
-
for (const dir of dirs.splice(0)) {
|
|
25
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/** Gives `toDir` a copy of the account key in `fromDir` and nothing else, as a deliberate copy of the key to a second machine would. */
|
|
29
|
-
export function copyAccountKey(fromDir, toDir) {
|
|
30
|
-
const parsed = JSON.parse(fs.readFileSync(path.join(fromDir, "user-identity.json"), "utf-8"));
|
|
31
|
-
if (typeof parsed !== "object" ||
|
|
32
|
-
parsed === null ||
|
|
33
|
-
!("privateKey" in parsed) ||
|
|
34
|
-
!("certificate" in parsed) ||
|
|
35
|
-
!("expiresAt" in parsed)) {
|
|
36
|
-
throw new Error("user-identity.json has no key material");
|
|
37
|
-
}
|
|
38
|
-
const { privateKey, certificate, expiresAt } = parsed;
|
|
39
|
-
fs.writeFileSync(path.join(toDir, "user-identity.json"), JSON.stringify({ privateKey, certificate, expiresAt }), { mode: 0o600 });
|
|
40
|
-
}
|
|
41
|
-
/** Starts one machine on the local mesh at `coordinatorPort`, holding the account key in `userIdentityDir`, dialling `hubUrl` when given, and registers a visible agent so its adverts carry the membership proof by which another machine recognises it as holding the same account. */
|
|
42
|
-
export async function startMachine(cleanups, options) {
|
|
43
|
-
const { coordinatorPort, userIdentityDir, name, hubUrl } = options;
|
|
44
|
-
const store = new MeshStore({
|
|
45
|
-
coordinatorPort,
|
|
46
|
-
...(hubUrl === undefined ? {} : { hubUrl }),
|
|
47
|
-
});
|
|
48
|
-
const revocation = createRevocationView();
|
|
49
|
-
const dataStorage = createMemoryStorage();
|
|
50
|
-
const { transport } = await wireTestTransportWithHub(store, {
|
|
51
|
-
presenceReadvertiseIntervalMs: FAST_GOSSIP_INTERVAL_MS,
|
|
52
|
-
userIdentityOptions: { dir: userIdentityDir },
|
|
53
|
-
revocation,
|
|
54
|
-
dataStorage,
|
|
55
|
-
});
|
|
56
|
-
await store.init();
|
|
57
|
-
cleanups.push(async () => store.shutdown());
|
|
58
|
-
await store.registerAgent({
|
|
59
|
-
name,
|
|
60
|
-
harness: "test",
|
|
61
|
-
cwd: `/test/${name}`,
|
|
62
|
-
pid: process.pid,
|
|
63
|
-
visibility: "visible",
|
|
64
|
-
tags: [],
|
|
65
|
-
});
|
|
66
|
-
return { store, transport, revocation, dataStorage };
|
|
67
|
-
}
|
|
68
|
-
/** Another handle on a machine's ledger store, the way a second bridge on that machine would open it. */
|
|
69
|
-
export async function ledgerOn(dir) {
|
|
70
|
-
return openAccountLedger({
|
|
71
|
-
userIdentityOptions: { dir },
|
|
72
|
-
userIdentity: loadOrCreateUserIdentity({ dir }),
|
|
73
|
-
clock: createSystemClock(),
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/** The token ids (hex) of the dm grants the ledger holds outstanding for `bearer`. */
|
|
77
|
-
export async function outstandingDm(ledger, bearer) {
|
|
78
|
-
const grants = await ledger.outstandingGrants("dm", bearer);
|
|
79
|
-
return grants.map((grant) => Buffer.from(grant.tokenId).toString("hex"));
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=account-ledger-helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-helpers.js","sourceRoot":"","sources":["../../src/test/account-ledger-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EACL,oBAAoB,GAErB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,6IAA6I;AAC7I,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,MAAM,IAAI,GAAa,EAAE,CAAC;AAE1B,mGAAmG;AACnG,MAAM,UAAU,OAAO;IACrB,MAAM,GAAG,GAAG,gBAAgB,CAAC,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Ac;IAEd,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration test for the account's replicated grant ledger between machines that meet only through the relay hub (agent-comms#358): two machines holding the same account key, on separate local meshes with no direct connection, sharing a real relay hub (createRelayHub served over local WebSockets). A grant minted on one reaches the other through a relay pairing sealed end to end, and the other can then revoke it.
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
5
|
-
//# sourceMappingURL=account-ledger-hub-replication.integration.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-hub-replication.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/account-ledger-hub-replication.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration test for the account's replicated grant ledger between machines that meet only through the relay hub (agent-comms#358): two machines holding the same account key, on separate local meshes with no direct connection, sharing a real relay hub (createRelayHub served over local WebSockets). A grant minted on one reaches the other through a relay pairing sealed end to end, and the other can then revoke it.
|
|
3
|
-
*/
|
|
4
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
|
|
6
|
-
import { generateIdentity } from "../core/identity.js";
|
|
7
|
-
import { loadOrCreateUserIdentity } from "../core/user-identity.js";
|
|
8
|
-
import { freeLocalPort, realHubOverWs, TeardownStack } from "./hub-helpers.js";
|
|
9
|
-
import { waitFor } from "./test-transport.js";
|
|
10
|
-
import { FAST_GOSSIP_INTERVAL_MS, copyAccountKey, ledgerOn, outstandingDm, removeUserDirs, startMachine, userDir, } from "./account-ledger-helpers.js";
|
|
11
|
-
/** How many announcement rounds a test lets pass before concluding that a log was never offered. */
|
|
12
|
-
const ANNOUNCEMENT_ROUNDS_TO_WAIT = 20;
|
|
13
|
-
const cleanups = new TeardownStack();
|
|
14
|
-
afterEach(async () => {
|
|
15
|
-
await cleanups.run();
|
|
16
|
-
removeUserDirs();
|
|
17
|
-
});
|
|
18
|
-
describe("account ledger replication through the relay hub", () => {
|
|
19
|
-
it("revokes on a machine met only through the hub a DM grant minted on the other", async () => {
|
|
20
|
-
const hub = await realHubOverWs();
|
|
21
|
-
cleanups.push(hub.close);
|
|
22
|
-
const dirA = userDir();
|
|
23
|
-
const dirB = userDir();
|
|
24
|
-
loadOrCreateUserIdentity({ dir: dirA });
|
|
25
|
-
copyAccountKey(dirA, dirB);
|
|
26
|
-
const a = await startMachine(cleanups, {
|
|
27
|
-
coordinatorPort: await freeLocalPort(),
|
|
28
|
-
userIdentityDir: dirA,
|
|
29
|
-
name: "machine-a",
|
|
30
|
-
hubUrl: hub.url,
|
|
31
|
-
});
|
|
32
|
-
const b = await startMachine(cleanups, {
|
|
33
|
-
coordinatorPort: await freeLocalPort(),
|
|
34
|
-
userIdentityDir: dirB,
|
|
35
|
-
name: "machine-b",
|
|
36
|
-
hubUrl: hub.url,
|
|
37
|
-
});
|
|
38
|
-
const principal = a.store.getUserPrincipalId();
|
|
39
|
-
if (principal === undefined)
|
|
40
|
-
throw new Error("expected an account");
|
|
41
|
-
expect(b.store.getUserPrincipalId()).toBe(principal);
|
|
42
|
-
// Each machine trusts the account's principal, which is what lets the hub admit the other's devices.
|
|
43
|
-
a.store.addTrustedGatewayPrincipal(principal);
|
|
44
|
-
b.store.addTrustedGatewayPrincipal(principal);
|
|
45
|
-
// Nothing connects them directly: anything one learns of the other came through the hub.
|
|
46
|
-
expect(a.store.coordinatorPort).not.toBe(b.store.coordinatorPort);
|
|
47
|
-
const bearer = deviceIdToHex(Uint8Array.from(generateIdentity().deviceId));
|
|
48
|
-
await a.store.admitAgentForDm(bearer);
|
|
49
|
-
const ledgerA = await ledgerOn(dirA);
|
|
50
|
-
const ledgerB = await ledgerOn(dirB);
|
|
51
|
-
const [minted] = await outstandingDm(ledgerA, bearer);
|
|
52
|
-
if (minted === undefined)
|
|
53
|
-
throw new Error("expected A to record its grant");
|
|
54
|
-
await waitFor(async () => (await outstandingDm(ledgerB, bearer)).includes(minted), "B's ledger to hold the grant A minted, through the hub");
|
|
55
|
-
// The gossiped revocation-announce never leaves B, so A can only learn of the revocation from B's writer log, over the same pairing.
|
|
56
|
-
b.transport.broadcastRevocation = async () => { };
|
|
57
|
-
await b.store.revokeAgentDmAccess(bearer);
|
|
58
|
-
expect(await outstandingDm(ledgerB, bearer)).toEqual([]);
|
|
59
|
-
await waitFor(async () => (await outstandingDm(ledgerA, bearer)).length === 0, "A's ledger to learn B's revocation, through the hub");
|
|
60
|
-
expect(await ledgerA.revocations()).toHaveLength(1);
|
|
61
|
-
});
|
|
62
|
-
it("never offers the ledger to a device of another account that is on the same hub", async () => {
|
|
63
|
-
const hub = await realHubOverWs();
|
|
64
|
-
cleanups.push(hub.close);
|
|
65
|
-
const dirA = userDir();
|
|
66
|
-
const dirOther = userDir();
|
|
67
|
-
loadOrCreateUserIdentity({ dir: dirA });
|
|
68
|
-
const a = await startMachine(cleanups, {
|
|
69
|
-
coordinatorPort: await freeLocalPort(),
|
|
70
|
-
userIdentityDir: dirA,
|
|
71
|
-
name: "machine-a",
|
|
72
|
-
hubUrl: hub.url,
|
|
73
|
-
});
|
|
74
|
-
const other = await startMachine(cleanups, {
|
|
75
|
-
coordinatorPort: await freeLocalPort(),
|
|
76
|
-
userIdentityDir: dirOther,
|
|
77
|
-
name: "other-account",
|
|
78
|
-
hubUrl: hub.url,
|
|
79
|
-
});
|
|
80
|
-
const otherPrincipal = other.store.getUserPrincipalId();
|
|
81
|
-
const principal = a.store.getUserPrincipalId();
|
|
82
|
-
if (otherPrincipal === undefined || principal === undefined) {
|
|
83
|
-
throw new Error("expected both machines to hold an account");
|
|
84
|
-
}
|
|
85
|
-
// Both sides trust each other as devices, so the other account is reachable through the hub and the only thing keeping the ledger from it is that it is not an account peer.
|
|
86
|
-
a.store.addTrustedGatewayPrincipal(otherPrincipal);
|
|
87
|
-
other.store.addTrustedGatewayPrincipal(principal);
|
|
88
|
-
await waitFor(async () => (await a.store.listAgents(a.store.peerId)).some((agent) => agent.id === other.store.peerId), "A to see the other account's device through the hub");
|
|
89
|
-
await a.store.admitAgentForDm(deviceIdToHex(Uint8Array.from(generateIdentity().deviceId)));
|
|
90
|
-
const [writerLog] = await (await ledgerOn(dirA)).announcements();
|
|
91
|
-
if (writerLog === undefined)
|
|
92
|
-
throw new Error("expected A's writer log");
|
|
93
|
-
// Many announcement rounds pass in this time, so a device that was offered the log would have asked for and stored it by now.
|
|
94
|
-
await new Promise((resolve) => {
|
|
95
|
-
setTimeout(resolve, ANNOUNCEMENT_ROUNDS_TO_WAIT * FAST_GOSSIP_INTERVAL_MS);
|
|
96
|
-
});
|
|
97
|
-
expect(await other.dataStorage.keys(`data/${deviceIdToHex(writerLog.peer)}/`)).toEqual([]);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
//# sourceMappingURL=account-ledger-hub-replication.integration.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-hub-replication.integration.test.js","sourceRoot":"","sources":["../../src/test/account-ledger-hub-replication.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,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AAC,EAAE,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fixture process for account-ledger-lock.integration.test.ts: a real, separate Node process appending to one machine's account ledger, because the lock under test serialises appends between genuinely concurrent OS processes, the way several bridges on one machine share its writer log. Busy-waits until an absolute deadline given by its parent, so every sibling worker starts appending at effectively the same instant.
|
|
3
|
-
*
|
|
4
|
-
* Usage: tsx account-ledger-lock-worker.ts <userIdentityDir> <subject> <appends> <startAtEpochMs>
|
|
5
|
-
*
|
|
6
|
-
* Records `appends` grants for `subject`, one append at a time.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=account-ledger-lock-worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-lock-worker.d.ts","sourceRoot":"","sources":["../../src/test/account-ledger-lock-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fixture process for account-ledger-lock.integration.test.ts: a real, separate Node process appending to one machine's account ledger, because the lock under test serialises appends between genuinely concurrent OS processes, the way several bridges on one machine share its writer log. Busy-waits until an absolute deadline given by its parent, so every sibling worker starts appending at effectively the same instant.
|
|
3
|
-
*
|
|
4
|
-
* Usage: tsx account-ledger-lock-worker.ts <userIdentityDir> <subject> <appends> <startAtEpochMs>
|
|
5
|
-
*
|
|
6
|
-
* Records `appends` grants for `subject`, one append at a time.
|
|
7
|
-
*/
|
|
8
|
-
import { createSystemClock } from "wire-mesh-core/adapters/system-clock";
|
|
9
|
-
import { openAccountLedger } from "../core/account-ledger-store.js";
|
|
10
|
-
import { randomId } from "../core/random-id.js";
|
|
11
|
-
import { loadOrCreateUserIdentity } from "../core/user-identity.js";
|
|
12
|
-
const [, , dir, subject, appendsRaw, startAtRaw] = process.argv;
|
|
13
|
-
if (dir === undefined ||
|
|
14
|
-
subject === undefined ||
|
|
15
|
-
appendsRaw === undefined ||
|
|
16
|
-
startAtRaw === undefined) {
|
|
17
|
-
console.error("usage: account-ledger-lock-worker.ts <userIdentityDir> <subject> <appends> <startAtEpochMs>");
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
const userIdentityOptions = { dir };
|
|
21
|
-
const ledger = await openAccountLedger({
|
|
22
|
-
userIdentityOptions,
|
|
23
|
-
userIdentity: loadOrCreateUserIdentity(userIdentityOptions),
|
|
24
|
-
clock: createSystemClock(),
|
|
25
|
-
});
|
|
26
|
-
const startAt = Number.parseInt(startAtRaw, 10);
|
|
27
|
-
while (Date.now() < startAt) {
|
|
28
|
-
// Busy-wait for the shared start deadline, deliberately not setTimeout, whose scheduling jitter is the imprecision this barrier exists to remove.
|
|
29
|
-
}
|
|
30
|
-
const appends = Number.parseInt(appendsRaw, 10);
|
|
31
|
-
for (let i = 0; i < appends; i++) {
|
|
32
|
-
await ledger.recordGrant("dm", subject, randomId());
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=account-ledger-lock-worker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-lock-worker.js","sourceRoot":"","sources":["../../src/test/account-ledger-lock-worker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,EAAE,AAAD,EAAG,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;AAChE,IACE,GAAG,KAAK,SAAS;IACjB,OAAO,KAAK,SAAS;IACrB,UAAU,KAAK,SAAS;IACxB,UAAU,KAAK,SAAS,EACxB,CAAC;IACD,OAAO,CAAC,KAAK,CACX,6FAA6F,CAC9F,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,CAAC;AACpC,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC;IACrC,mBAAmB;IACnB,YAAY,EAAE,wBAAwB,CAAC,mBAAmB,CAAC;IAC3D,KAAK,EAAE,iBAAiB,EAAE;CAC3B,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAChD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IAC5B,kJAAkJ;AACpJ,CAAC;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;IACjC,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* agent-comms#344: several real processes appending to one machine's account ledger at once, the way several bridges on a machine share its writer log, must each get a sequence number of their own. Two appends that both believed they held the cross-process lock would read the same head and write the same sequence number, and one grant would be lost.
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
5
|
-
//# sourceMappingURL=account-ledger-lock.integration.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-ledger-lock.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/account-ledger-lock.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|