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,252 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Direct, DI-based unit tests for PeerLifecycle -- it was previously exercised only indirectly through end-to-end mesh integration tests, leaving several individual branches, self-connect guards, and handleDataMessage's method-dispatch branches unobserved. A few of the survivors Stryker reports against handleDataMessage's whole-suite timeout classification: emptying its body doesn't fail fast, it hangs some unrelated integration test waiting on state that never arrives, so a direct unit test that fails immediately on the same mutation converts a slow timeout into a fast, precise kill. PeerLifecycleDeps is a narrow, injectable surface built exactly for this direct testing.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { PeerLifecycle, } from "../core/peer-lifecycle.js";
|
|
6
|
-
const OWNER_ID = "owner-device";
|
|
7
|
-
const COORDINATOR_PORT = 19876;
|
|
8
|
-
const FIRST_CONTACT_PORT = 19877;
|
|
9
|
-
function peerInfo(id, options) {
|
|
10
|
-
const { port = 1, startedAt = "2026-01-01T00:00:00.000Z" } = options ?? {};
|
|
11
|
-
return { id, port, startedAt };
|
|
12
|
-
}
|
|
13
|
-
function emptyState() {
|
|
14
|
-
return { agents: {}, rooms: {}, messages: {}, dms: {}, deliveryQueues: {} };
|
|
15
|
-
}
|
|
16
|
-
function makeHarness() {
|
|
17
|
-
const transport = {
|
|
18
|
-
isCoordinator: false,
|
|
19
|
-
connectToPeer: vi.fn().mockResolvedValue(undefined),
|
|
20
|
-
send: vi.fn().mockResolvedValue(undefined),
|
|
21
|
-
broadcast: vi.fn().mockResolvedValue(undefined),
|
|
22
|
-
becomeCoordinator: vi.fn().mockResolvedValue(undefined),
|
|
23
|
-
};
|
|
24
|
-
const flushPendingRoomRequests = vi.fn().mockResolvedValue(undefined);
|
|
25
|
-
const applyStateSync = vi.fn();
|
|
26
|
-
const applyPatch = vi.fn().mockResolvedValue(undefined);
|
|
27
|
-
const notifyRoomsOfStatus = vi.fn().mockResolvedValue(undefined);
|
|
28
|
-
const broadcastPatch = vi.fn().mockResolvedValue(undefined);
|
|
29
|
-
const coordinatorRole = {
|
|
30
|
-
claimIfVacant: vi.fn().mockResolvedValue(undefined),
|
|
31
|
-
claimIfVacantAfterWait: vi.fn(),
|
|
32
|
-
handleDeparture: vi.fn().mockResolvedValue(undefined),
|
|
33
|
-
isHolder: vi.fn().mockReturnValue(false),
|
|
34
|
-
};
|
|
35
|
-
const deps = {
|
|
36
|
-
peerInfo: new Map(),
|
|
37
|
-
agents: new Map(),
|
|
38
|
-
coordinatorPort: COORDINATOR_PORT,
|
|
39
|
-
getPeerId: () => OWNER_ID,
|
|
40
|
-
getCoordinatorPeerId: () => undefined,
|
|
41
|
-
requireTransport: () => transport,
|
|
42
|
-
serialise: () => emptyState(),
|
|
43
|
-
roomProtocol: { flushPendingRoomRequests },
|
|
44
|
-
deliveryEngine: {
|
|
45
|
-
applyStateSync,
|
|
46
|
-
applyPatch,
|
|
47
|
-
notifyRoomsOfStatus,
|
|
48
|
-
broadcastPatch,
|
|
49
|
-
bump: (entity) => {
|
|
50
|
-
entity.version += 1;
|
|
51
|
-
return entity;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
coordinatorRole,
|
|
55
|
-
};
|
|
56
|
-
return {
|
|
57
|
-
deps,
|
|
58
|
-
lifecycle: new PeerLifecycle(deps),
|
|
59
|
-
transport,
|
|
60
|
-
flushPendingRoomRequests,
|
|
61
|
-
applyStateSync,
|
|
62
|
-
applyPatch,
|
|
63
|
-
coordinatorRole,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
describe("PeerLifecycle — handlePeerList", () => {
|
|
67
|
-
it("records every peer and dials each one except itself", () => {
|
|
68
|
-
const h = makeHarness();
|
|
69
|
-
const self = peerInfo(OWNER_ID);
|
|
70
|
-
const other = peerInfo("other-peer");
|
|
71
|
-
h.lifecycle.handlePeerList([self, other]);
|
|
72
|
-
expect(h.deps.peerInfo.get(OWNER_ID)).toEqual(self);
|
|
73
|
-
expect(h.deps.peerInfo.get("other-peer")).toEqual(other);
|
|
74
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledTimes(1);
|
|
75
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledWith(other, OWNER_ID);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
describe("PeerLifecycle — handlePeerJoined", () => {
|
|
79
|
-
it("records the joining peer and dials it when it isn't this store's own id", () => {
|
|
80
|
-
const h = makeHarness();
|
|
81
|
-
const other = peerInfo("other-peer");
|
|
82
|
-
h.lifecycle.handlePeerJoined(other);
|
|
83
|
-
expect(h.deps.peerInfo.get("other-peer")).toEqual(other);
|
|
84
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledWith(other, OWNER_ID);
|
|
85
|
-
});
|
|
86
|
-
it("records but never dials itself when the joined peer is this store's own id", () => {
|
|
87
|
-
const h = makeHarness();
|
|
88
|
-
const self = peerInfo(OWNER_ID);
|
|
89
|
-
h.lifecycle.handlePeerJoined(self);
|
|
90
|
-
expect(h.deps.peerInfo.get(OWNER_ID)).toEqual(self);
|
|
91
|
-
expect(h.transport.connectToPeer).not.toHaveBeenCalled();
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe("PeerLifecycle — handlePeerConnected", () => {
|
|
95
|
-
it("sends a state_sync when this store already has agent state", async () => {
|
|
96
|
-
const h = makeHarness();
|
|
97
|
-
h.deps.agents.set(OWNER_ID, { id: OWNER_ID });
|
|
98
|
-
await h.lifecycle.handlePeerConnected({ id: "conn-1" }, peerInfo("x"));
|
|
99
|
-
expect(h.transport.send).toHaveBeenCalledWith({ id: "conn-1" }, { method: "state_sync", state: emptyState() });
|
|
100
|
-
});
|
|
101
|
-
it("sends no state_sync when this store has no agent state at all", async () => {
|
|
102
|
-
const h = makeHarness();
|
|
103
|
-
await h.lifecycle.handlePeerConnected({ id: "conn-1" }, peerInfo("x"));
|
|
104
|
-
expect(h.transport.send).not.toHaveBeenCalledWith(expect.anything(), expect.objectContaining({ method: "state_sync" }));
|
|
105
|
-
});
|
|
106
|
-
it("shares every known peer over the connection as a peer_list, so the mesh forms without a coordinator's handout (agent-comms#341)", async () => {
|
|
107
|
-
const h = makeHarness();
|
|
108
|
-
const self = peerInfo(OWNER_ID);
|
|
109
|
-
const other = peerInfo("other-peer");
|
|
110
|
-
h.deps.peerInfo.set(OWNER_ID, self);
|
|
111
|
-
h.deps.peerInfo.set("other-peer", other);
|
|
112
|
-
await h.lifecycle.handlePeerConnected({ id: "conn-1" }, peerInfo("x"));
|
|
113
|
-
expect(h.transport.send).toHaveBeenCalledWith({ id: "conn-1" }, { method: "peer_list", peers: [self, other] });
|
|
114
|
-
});
|
|
115
|
-
it("always flushes pending room requests for the connection, regardless of state", async () => {
|
|
116
|
-
const h = makeHarness();
|
|
117
|
-
await h.lifecycle.handlePeerConnected({ id: "conn-1" }, peerInfo("x"));
|
|
118
|
-
expect(h.flushPendingRoomRequests).toHaveBeenCalledWith("conn-1");
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
describe("PeerLifecycle — handleDataMessage", () => {
|
|
122
|
-
it("applies a normalised state_sync to the delivery engine", async () => {
|
|
123
|
-
const h = makeHarness();
|
|
124
|
-
await h.lifecycle.handleDataMessage({ id: "conn-1" }, { method: "state_sync", state: emptyState() });
|
|
125
|
-
expect(h.applyStateSync).toHaveBeenCalledWith(emptyState());
|
|
126
|
-
});
|
|
127
|
-
it("applies a state_update's patch to the delivery engine", async () => {
|
|
128
|
-
const h = makeHarness();
|
|
129
|
-
const event = {
|
|
130
|
-
type: "connection_request",
|
|
131
|
-
connectionId: "c",
|
|
132
|
-
peerId: "p",
|
|
133
|
-
dataPort: 1,
|
|
134
|
-
name: "n",
|
|
135
|
-
fingerprint: "fp",
|
|
136
|
-
};
|
|
137
|
-
await h.lifecycle.handleDataMessage({ id: "conn-1" }, {
|
|
138
|
-
method: "state_update",
|
|
139
|
-
patch: { type: "delivery", agentId: "a", event },
|
|
140
|
-
});
|
|
141
|
-
expect(h.applyPatch).toHaveBeenCalledWith({
|
|
142
|
-
type: "delivery",
|
|
143
|
-
agentId: "a",
|
|
144
|
-
event,
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
it("applies neither for a message method it doesn't dispatch on", async () => {
|
|
148
|
-
const h = makeHarness();
|
|
149
|
-
await h.lifecycle.handleDataMessage({ id: "conn-1" }, { method: "introduce", peerId: "p", dataPort: 1 });
|
|
150
|
-
expect(h.applyStateSync).not.toHaveBeenCalled();
|
|
151
|
-
expect(h.applyPatch).not.toHaveBeenCalled();
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
describe("PeerLifecycle — handleBecomeCoordinator", () => {
|
|
155
|
-
it("takes the port listener, replaces the peer table with exactly the handoff list, dials every peer, and claims the elected role only if no incumbent is known", async () => {
|
|
156
|
-
const h = makeHarness();
|
|
157
|
-
h.deps.peerInfo.set("stale-peer", peerInfo("stale-peer"));
|
|
158
|
-
const incoming = [peerInfo("a"), peerInfo("b")];
|
|
159
|
-
await h.lifecycle.handleBecomeCoordinator(incoming);
|
|
160
|
-
expect(h.transport.becomeCoordinator).toHaveBeenCalledWith("127.0.0.1", COORDINATOR_PORT);
|
|
161
|
-
expect(h.deps.peerInfo.has("stale-peer")).toBe(false);
|
|
162
|
-
expect(h.deps.peerInfo.get("a")).toEqual(incoming[0]);
|
|
163
|
-
expect(h.deps.peerInfo.get("b")).toEqual(incoming[1]);
|
|
164
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledTimes(2);
|
|
165
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledWith(incoming[0], OWNER_ID);
|
|
166
|
-
expect(h.transport.connectToPeer).toHaveBeenCalledWith(incoming[1], OWNER_ID);
|
|
167
|
-
expect(h.coordinatorRole.claimIfVacant).toHaveBeenCalledTimes(1);
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
describe("PeerLifecycle and the elected coordinator (agent-comms#341)", () => {
|
|
171
|
-
it("claims the role at once after binding the port when no first-contact presence could reach anyone else", async () => {
|
|
172
|
-
const h = makeHarness();
|
|
173
|
-
await h.lifecycle.handleBecomeCoordinator([]);
|
|
174
|
-
expect(h.coordinatorRole.claimIfVacant).toHaveBeenCalledTimes(1);
|
|
175
|
-
expect(h.coordinatorRole.claimIfVacantAfterWait).not.toHaveBeenCalled();
|
|
176
|
-
});
|
|
177
|
-
it("waits for an incumbent's announcement before claiming after binding the port when first contact may reach an existing holder", async () => {
|
|
178
|
-
const h = makeHarness();
|
|
179
|
-
h.deps.firstContactPort = FIRST_CONTACT_PORT;
|
|
180
|
-
await h.lifecycle.handleBecomeCoordinator([]);
|
|
181
|
-
expect(h.coordinatorRole.claimIfVacantAfterWait).toHaveBeenCalledTimes(1);
|
|
182
|
-
expect(h.coordinatorRole.claimIfVacant).not.toHaveBeenCalled();
|
|
183
|
-
});
|
|
184
|
-
it("hands every departure to the elected role before anything else", async () => {
|
|
185
|
-
const h = makeHarness();
|
|
186
|
-
h.deps.peerInfo.set("gone", peerInfo("gone"));
|
|
187
|
-
await h.lifecycle.handlePeerDeparture("gone");
|
|
188
|
-
expect(h.coordinatorRole.handleDeparture).toHaveBeenCalledWith("gone", expect.any(Function));
|
|
189
|
-
expect(h.deps.peerInfo.has("gone")).toBe(false);
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
describe("PeerLifecycle — sendCoordinatorHandover", () => {
|
|
193
|
-
it("does nothing when this side is not the coordinator", async () => {
|
|
194
|
-
const h = makeHarness();
|
|
195
|
-
h.transport.isCoordinator = false;
|
|
196
|
-
h.deps.peerInfo.set(OWNER_ID, peerInfo(OWNER_ID));
|
|
197
|
-
h.deps.peerInfo.set("other", peerInfo("other"));
|
|
198
|
-
await h.lifecycle.sendCoordinatorHandover();
|
|
199
|
-
expect(h.transport.send).not.toHaveBeenCalled();
|
|
200
|
-
expect(h.transport.broadcast).not.toHaveBeenCalled();
|
|
201
|
-
});
|
|
202
|
-
it("does nothing when this side is the coordinator but no other peers remain", async () => {
|
|
203
|
-
const h = makeHarness();
|
|
204
|
-
h.transport.isCoordinator = true;
|
|
205
|
-
h.deps.peerInfo.set(OWNER_ID, peerInfo(OWNER_ID));
|
|
206
|
-
await h.lifecycle.sendCoordinatorHandover();
|
|
207
|
-
expect(h.transport.send).not.toHaveBeenCalled();
|
|
208
|
-
});
|
|
209
|
-
it("sends become_coordinator to the longest-running remaining peer, carrying every other remaining peer", async () => {
|
|
210
|
-
const h = makeHarness();
|
|
211
|
-
h.transport.isCoordinator = true;
|
|
212
|
-
h.deps.peerInfo.set(OWNER_ID, peerInfo(OWNER_ID, { startedAt: "2026-01-03T00:00:00.000Z" }));
|
|
213
|
-
const oldest = peerInfo("oldest", {
|
|
214
|
-
startedAt: "2026-01-01T00:00:00.000Z",
|
|
215
|
-
});
|
|
216
|
-
const middle = peerInfo("middle", {
|
|
217
|
-
startedAt: "2026-01-02T00:00:00.000Z",
|
|
218
|
-
});
|
|
219
|
-
const newest = peerInfo("newest", {
|
|
220
|
-
startedAt: "2026-01-04T00:00:00.000Z",
|
|
221
|
-
});
|
|
222
|
-
h.deps.peerInfo.set(oldest.id, oldest);
|
|
223
|
-
h.deps.peerInfo.set(middle.id, middle);
|
|
224
|
-
h.deps.peerInfo.set(newest.id, newest);
|
|
225
|
-
await h.lifecycle.sendCoordinatorHandover();
|
|
226
|
-
expect(h.transport.send).toHaveBeenCalledTimes(1);
|
|
227
|
-
expect(h.transport.send).toHaveBeenCalledWith({ id: "oldest" }, {
|
|
228
|
-
method: "become_coordinator",
|
|
229
|
-
peerList: expect.arrayContaining([middle, newest]),
|
|
230
|
-
});
|
|
231
|
-
const [, message] = h.transport.send.mock.calls[0];
|
|
232
|
-
expect(message.peerList).toHaveLength(2);
|
|
233
|
-
});
|
|
234
|
-
it("picks the sole remaining peer as successor and sends an empty handoff list", async () => {
|
|
235
|
-
const h = makeHarness();
|
|
236
|
-
h.transport.isCoordinator = true;
|
|
237
|
-
h.deps.peerInfo.set(OWNER_ID, peerInfo(OWNER_ID));
|
|
238
|
-
const onlyPeer = peerInfo("only-peer");
|
|
239
|
-
h.deps.peerInfo.set(onlyPeer.id, onlyPeer);
|
|
240
|
-
await h.lifecycle.sendCoordinatorHandover();
|
|
241
|
-
expect(h.transport.send).toHaveBeenCalledWith({ id: "only-peer" }, { method: "become_coordinator", peerList: [] });
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
describe("PeerLifecycle — handlePeerDisconnected", () => {
|
|
245
|
-
it("removes the disconnected peer's entry from peerInfo", () => {
|
|
246
|
-
const h = makeHarness();
|
|
247
|
-
h.deps.peerInfo.set("gone-peer", peerInfo("gone-peer"));
|
|
248
|
-
h.lifecycle.handlePeerDisconnected({ id: "gone-peer" });
|
|
249
|
-
expect(h.deps.peerInfo.has("gone-peer")).toBe(false);
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
//# sourceMappingURL=peer-lifecycle.unit.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-lifecycle.unit.test.js","sourceRoot":"","sources":["../../src/test/peer-lifecycle.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EACL,aAAa,GAEd,MAAM,2BAA2B,CAAC;AAInC,MAAM,QAAQ,GAAG,cAAc,CAAC;AAChC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAEjC,SAAS,QAAQ,CACf,EAAU,EACV,OAA+C;IAE/C,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,SAAS,GAAG,0BAA0B,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAC3E,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AACjC,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC;AAC9E,CAAC;AAuBD,SAAS,WAAW;I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,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QACxD,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-link-error.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/peer-link-error.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A dial to a peer whose process is gone reaches the error channel as a typed PeerLinkError whose errno survives the transport, which is what lets the reporter tell a stale peer address from any other dial failure.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, test } from "vitest";
|
|
5
|
-
import { describeMeshError } from "../core/error-reporting.js";
|
|
6
|
-
import { generateIdentity } from "../core/identity.js";
|
|
7
|
-
import { errnoCode, PeerLinkError } from "../core/peer-link-error.js";
|
|
8
|
-
import { WireMeshTransport } from "../core/wire-mesh-transport.js";
|
|
9
|
-
import { freeLocalPort } from "./hub-helpers.js";
|
|
10
|
-
import { noopTransportEvents, waitFor } from "./test-transport.js";
|
|
11
|
-
describe("WireMeshTransport dial failures", () => {
|
|
12
|
-
test("a refused dial is reported as a PeerLinkError carrying ECONNREFUSED", async () => {
|
|
13
|
-
const errors = [];
|
|
14
|
-
const transport = new WireMeshTransport(noopTransportEvents({ onError: (e) => void errors.push(e) }), generateIdentity());
|
|
15
|
-
try {
|
|
16
|
-
const deadPort = await freeLocalPort();
|
|
17
|
-
await transport.connectToPeer({
|
|
18
|
-
id: "unreachable-peer",
|
|
19
|
-
port: deadPort,
|
|
20
|
-
startedAt: new Date().toISOString(),
|
|
21
|
-
}, "self");
|
|
22
|
-
await waitFor(() => errors.length > 0, "the transport reports the failed dial");
|
|
23
|
-
const [error] = errors;
|
|
24
|
-
expect(error).toBeInstanceOf(PeerLinkError);
|
|
25
|
-
expect(errnoCode(error)).toBe("ECONNREFUSED");
|
|
26
|
-
expect(error === undefined ? undefined : describeMeshError(error)?.message).toContain("stale address");
|
|
27
|
-
}
|
|
28
|
-
finally {
|
|
29
|
-
await transport.shutdown();
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=peer-link-error.integration.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-link-error.integration.test.js","sourceRoot":"","sources":["../../src/test/peer-link-error.integration.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnE,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,IAAI,CAAC,qEAAqE,EAAE,KAAK,IAAI,EAAE;QACrF,MAAM,MAAM,GAAY,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,IAAI,iBAAiB,CACrC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,gBAAgB,EAAE,CACnB,CAAC;QACF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,CAAC;YACvC,MAAM,SAAS,CAAC,aAAa,CAC3B;gBACE,EAAE,EAAE,kBAAkB;gBACtB,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,EACD,MAAM,CACP,CAAC;YAEF,MAAM,OAAO,CACX,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EACvB,uCAAuC,CACxC,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;YACvB,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC5C,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAC9C,MAAM,CACJ,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,CACpE,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAC/B,CAAC;gBAAS,CAAC;YACT,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for peer-versions.ts's read side (agent-comms#198): extracting a specific device's gossiped wire-mesh-core/agent-comms/cc-peer versions back out of a fake listKnownDevices, without any real mesh machinery.
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
5
|
-
//# sourceMappingURL=peer-versions.unit.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-versions.unit.test.d.ts","sourceRoot":"","sources":["../../src/test/peer-versions.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for peer-versions.ts's read side (agent-comms#198): extracting a specific device's gossiped wire-mesh-core/agent-comms/cc-peer versions back out of a fake listKnownDevices, without any real mesh machinery.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, it, expect } from "vitest";
|
|
5
|
-
import { getPeerAgentCommsVersions, getPeerWireMeshCoreVersion, } from "../core/peer-versions.js";
|
|
6
|
-
function fakeTransport(devices) {
|
|
7
|
-
return { listKnownDevices: () => devices };
|
|
8
|
-
}
|
|
9
|
-
describe("getPeerWireMeshCoreVersion", () => {
|
|
10
|
-
it("returns undefined when the transport has no listKnownDevices capability", () => {
|
|
11
|
-
expect(getPeerWireMeshCoreVersion({}, "device-1")).toBeUndefined();
|
|
12
|
-
});
|
|
13
|
-
it("returns undefined for a device this side has never heard gossip from", () => {
|
|
14
|
-
const transport = fakeTransport([
|
|
15
|
-
{ deviceId: "other-device", advert: { "wire-mesh/version": "1.0.0" } },
|
|
16
|
-
]);
|
|
17
|
-
expect(getPeerWireMeshCoreVersion(transport, "device-1")).toBeUndefined();
|
|
18
|
-
});
|
|
19
|
-
it("returns the gossiped version string when present", () => {
|
|
20
|
-
const transport = fakeTransport([
|
|
21
|
-
{ deviceId: "device-1", advert: { "wire-mesh/version": "1.50.0" } },
|
|
22
|
-
]);
|
|
23
|
-
expect(getPeerWireMeshCoreVersion(transport, "device-1")).toBe("1.50.0");
|
|
24
|
-
});
|
|
25
|
-
it("returns undefined when the gossiped value isn't a string", () => {
|
|
26
|
-
const transport = fakeTransport([
|
|
27
|
-
{ deviceId: "device-1", advert: { "wire-mesh/version": 42 } },
|
|
28
|
-
]);
|
|
29
|
-
expect(getPeerWireMeshCoreVersion(transport, "device-1")).toBeUndefined();
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
describe("getPeerAgentCommsVersions", () => {
|
|
33
|
-
it("returns undefined for a malformed advert (missing agentComms)", () => {
|
|
34
|
-
const transport = fakeTransport([
|
|
35
|
-
{
|
|
36
|
-
deviceId: "device-1",
|
|
37
|
-
advert: { "agent-comms/version": { ccPeer: "1.0.0" } },
|
|
38
|
-
},
|
|
39
|
-
]);
|
|
40
|
-
expect(getPeerAgentCommsVersions(transport, "device-1")).toBeUndefined();
|
|
41
|
-
});
|
|
42
|
-
it("returns the parsed advert, ccPeer included, when well-formed", () => {
|
|
43
|
-
const transport = fakeTransport([
|
|
44
|
-
{
|
|
45
|
-
deviceId: "device-1",
|
|
46
|
-
advert: {
|
|
47
|
-
"agent-comms/version": { agentComms: "3.0.0", ccPeer: "1.5.0" },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
]);
|
|
51
|
-
expect(getPeerAgentCommsVersions(transport, "device-1")).toEqual({
|
|
52
|
-
agentComms: "3.0.0",
|
|
53
|
-
ccPeer: "1.5.0",
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
it("returns the parsed advert with no ccPeer field when the device isn't fronting/bridging one", () => {
|
|
57
|
-
const transport = fakeTransport([
|
|
58
|
-
{
|
|
59
|
-
deviceId: "device-1",
|
|
60
|
-
advert: { "agent-comms/version": { agentComms: "3.0.0" } },
|
|
61
|
-
},
|
|
62
|
-
]);
|
|
63
|
-
expect(getPeerAgentCommsVersions(transport, "device-1")).toEqual({
|
|
64
|
-
agentComms: "3.0.0",
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=peer-versions.unit.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-versions.unit.test.js","sourceRoot":"","sources":["../../src/test/peer-versions.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAGlC,SAAS,aAAa,CACpB,OAAyE;IAEzE,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,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|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for petnames (core/petnames, agent-comms#345): the viewer's own labels, persisted in the viewer's storage and shared by every bridge reading the same directory.
|
|
3
|
-
*/
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { Petnames } from "../core/petnames.js";
|
|
8
|
-
import { scratchDirectory } from "./scratch-directory.helper.js";
|
|
9
|
-
/** Mask isolating the permission bits from a stat mode's file-type bits. */
|
|
10
|
-
const PERMISSION_BITS_MASK = 0o777;
|
|
11
|
-
/** Owner-only read and write. */
|
|
12
|
-
const OWNER_ONLY_RW_PERMISSIONS = 0o600;
|
|
13
|
-
/** A device-id is a 64-character hex SHA-256 digest; petnames are keyed by full device-ids only. */
|
|
14
|
-
const DEVICE_ID_HEX_LENGTH = 64;
|
|
15
|
-
const DEVICE_A = "a".repeat(DEVICE_ID_HEX_LENGTH);
|
|
16
|
-
const DEVICE_D = "d".repeat(DEVICE_ID_HEX_LENGTH);
|
|
17
|
-
const DEVICE_E = "e".repeat(DEVICE_ID_HEX_LENGTH);
|
|
18
|
-
function petnamesFile(dir) {
|
|
19
|
-
return path.join(dir, "petnames.json");
|
|
20
|
-
}
|
|
21
|
-
function tempDir() {
|
|
22
|
-
return scratchDirectory("agent-comms-petnames-");
|
|
23
|
-
}
|
|
24
|
-
describe("Petnames", () => {
|
|
25
|
-
it("keeps a label, keyed by the lowercase id, for every instance reading the same directory", () => {
|
|
26
|
-
const dir = tempDir();
|
|
27
|
-
new Petnames({ dir }).set(DEVICE_A.toUpperCase(), " work laptop ");
|
|
28
|
-
expect(new Petnames({ dir }).list()).toEqual(new Map([[DEVICE_A, "work laptop"]]));
|
|
29
|
-
});
|
|
30
|
-
it("writes the label file owner-only", () => {
|
|
31
|
-
const dir = tempDir();
|
|
32
|
-
new Petnames({ dir }).set(DEVICE_A, "work laptop");
|
|
33
|
-
const mode = fs.statSync(petnamesFile(dir)).mode & PERMISSION_BITS_MASK;
|
|
34
|
-
expect(mode).toBe(OWNER_ONLY_RW_PERMISSIONS);
|
|
35
|
-
});
|
|
36
|
-
it("replaces a label and clears one, reporting whether there was one to clear", () => {
|
|
37
|
-
const petnames = new Petnames({ dir: tempDir() });
|
|
38
|
-
petnames.set(DEVICE_A, "old");
|
|
39
|
-
petnames.set(DEVICE_A, "new");
|
|
40
|
-
petnames.set(DEVICE_D, "other");
|
|
41
|
-
expect(petnames.clear(DEVICE_A)).toBe(true);
|
|
42
|
-
expect(petnames.clear(DEVICE_A)).toBe(false);
|
|
43
|
-
expect(petnames.list()).toEqual(new Map([[DEVICE_D, "other"]]));
|
|
44
|
-
});
|
|
45
|
-
it("refuses a label with a control sequence in it, and keeps nothing", () => {
|
|
46
|
-
const petnames = new Petnames({ dir: tempDir() });
|
|
47
|
-
expect(() => petnames.set(DEVICE_A, "evil\u001b[2J")).toThrow(/petname must be/);
|
|
48
|
-
expect(petnames.list()).toEqual(new Map());
|
|
49
|
-
});
|
|
50
|
-
it("works in memory when given no directory", () => {
|
|
51
|
-
const petnames = new Petnames();
|
|
52
|
-
petnames.set(DEVICE_A, "in memory");
|
|
53
|
-
expect(petnames.list()).toEqual(new Map([[DEVICE_A, "in memory"]]));
|
|
54
|
-
});
|
|
55
|
-
it("refuses to label anything but a full device-id", () => {
|
|
56
|
-
const petnames = new Petnames({ dir: tempDir() });
|
|
57
|
-
for (const notADevice of [
|
|
58
|
-
"aabbcc",
|
|
59
|
-
DEVICE_A.slice(1),
|
|
60
|
-
`${DEVICE_A}0`,
|
|
61
|
-
"z".repeat(DEVICE_ID_HEX_LENGTH),
|
|
62
|
-
]) {
|
|
63
|
-
expect(() => petnames.set(notADevice, "typo")).toThrow(expect.objectContaining({ code: "INVALID_DEVICE" }));
|
|
64
|
-
}
|
|
65
|
-
expect(petnames.list()).toEqual(new Map());
|
|
66
|
-
});
|
|
67
|
-
it("keeps every valid label when one entry on disk is damaged, and drops only that entry", () => {
|
|
68
|
-
const dir = tempDir();
|
|
69
|
-
fs.writeFileSync(petnamesFile(dir), JSON.stringify({
|
|
70
|
-
[DEVICE_A]: "Alice laptop",
|
|
71
|
-
[DEVICE_D]: 7,
|
|
72
|
-
[DEVICE_E]: "evil\u001b[2J",
|
|
73
|
-
short: "typo",
|
|
74
|
-
}));
|
|
75
|
-
const petnames = new Petnames({ dir });
|
|
76
|
-
expect(petnames.list()).toEqual(new Map([[DEVICE_A, "Alice laptop"]]));
|
|
77
|
-
petnames.set(DEVICE_D, "Carol");
|
|
78
|
-
expect(new Petnames({ dir }).list()).toEqual(new Map([
|
|
79
|
-
[DEVICE_A, "Alice laptop"],
|
|
80
|
-
[DEVICE_D, "Carol"],
|
|
81
|
-
]));
|
|
82
|
-
});
|
|
83
|
-
it("refuses to read a file that is not a JSON object, and leaves it as it is rather than writing over it", () => {
|
|
84
|
-
const dir = tempDir();
|
|
85
|
-
fs.writeFileSync(petnamesFile(dir), "{not json");
|
|
86
|
-
const petnames = new Petnames({ dir });
|
|
87
|
-
expect(() => petnames.list()).toThrow(/not valid JSON/);
|
|
88
|
-
expect(() => petnames.set(DEVICE_A, "Alice")).toThrow(/not valid JSON/);
|
|
89
|
-
fs.writeFileSync(petnamesFile(dir), "[]");
|
|
90
|
-
expect(() => petnames.clear(DEVICE_A)).toThrow(/JSON object/);
|
|
91
|
-
expect(fs.readFileSync(petnamesFile(dir), "utf-8")).toBe("[]");
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=petnames.unit.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"petnames.unit.test.js","sourceRoot":"","sources":["../../src/test/petnames.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EA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xE,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9D,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pgp-keyserver.unit.test.d.ts","sourceRoot":"","sources":["../../src/test/pgp-keyserver.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for fetchPgpPublicKeyByFingerprint (agent-comms#188), against an injected fake fetch rather than a real network call.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { fetchPgpPublicKeyByFingerprint } from "../core/pgp-keyserver.js";
|
|
6
|
-
const ARMORED_KEY = "-----BEGIN PGP PUBLIC KEY BLOCK-----\nfake\n-----END PGP PUBLIC KEY BLOCK-----";
|
|
7
|
-
describe("fetchPgpPublicKeyByFingerprint", () => {
|
|
8
|
-
it("fetches the armored key from keys.openpgp.org's by-fingerprint endpoint", async () => {
|
|
9
|
-
const fakeFetch = vi.fn(async () => Promise.resolve(new Response(ARMORED_KEY, { status: 200 })));
|
|
10
|
-
const result = await fetchPgpPublicKeyByFingerprint("aabbccddeeff00112233445566778899aabbccd", fakeFetch);
|
|
11
|
-
expect(result).toBe(ARMORED_KEY);
|
|
12
|
-
expect(fakeFetch).toHaveBeenCalledWith("https://keys.openpgp.org/vks/v1/by-fingerprint/AABBCCDDEEFF00112233445566778899AABBCCD");
|
|
13
|
-
});
|
|
14
|
-
it("normalises a fingerprint with spaces and colons before building the URL", async () => {
|
|
15
|
-
const fakeFetch = vi.fn(async () => Promise.resolve(new Response(ARMORED_KEY, { status: 200 })));
|
|
16
|
-
await fetchPgpPublicKeyByFingerprint("aabb:ccdd:eeff:0011:2233:4455:6677:8899:aabb:ccd ", fakeFetch);
|
|
17
|
-
expect(fakeFetch).toHaveBeenCalledWith("https://keys.openpgp.org/vks/v1/by-fingerprint/AABBCCDDEEFF00112233445566778899AABBCCD");
|
|
18
|
-
});
|
|
19
|
-
it("throws when the keyserver responds with a non-2xx status", async () => {
|
|
20
|
-
const fakeFetch = vi.fn(async () => Promise.resolve(new Response("not found", { status: 404 })));
|
|
21
|
-
await expect(fetchPgpPublicKeyByFingerprint("00", fakeFetch)).rejects.toThrow(/404/);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=pgp-keyserver.unit.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pgp-keyserver.unit.test.js","sourceRoot":"","sources":["../../src/test/pgp-keyserver.unit.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,GACf,gFAAgF,CAAC;AAEnF,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,yEAAyE,EAAE,KAAK,IAAI,EAAE;QACvF,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CACjC,OAAO,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAC5D,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,8BAA8B,CACjD,yCAAyC,EACzC,SAAS,CACV,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjC,MAAM,CAAC,SAAS,CAAC,CAAC,oBAAoB,CACpC,wFAAwF,CACzF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,KAAK,IAAI,EAAE;QACvF,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CACjC,OAAO,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAC5D,CAAC;QAEF,MAAM,8BAA8B,CAClC,mDAAmD,EACnD,SAAS,CACV,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,CAAC,oBAAoB,CACpC,wFAAwF,CACzF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,KAAK,IAAI,EAAE;QACxE,MAAM,SAAS,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CACjC,OAAO,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAC5D,CAAC;QAEF,MAAM,MAAM,CACV,8BAA8B,CAAC,IAAI,EAAE,SAAS,CAAC,CAChD,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pi-manifest-packed.integration.test.d.ts","sourceRoot":"","sources":["../../src/test/pi-manifest-packed.integration.test.ts"],"names":[],"mappings":""}
|