Replace RPC-to-string adapters and processCoreRequestMessage (~470 lines) with
typed handlers in core-swarm-handlers.js. Autopass invite wire now uses
invite.deliver RPC only; p2ns.core-invite protomux channel is removed.
- Add core-rpc-contract.js (METHODS, INVITE_STATUS) and core-swarm-handlers.js
with shared processInviteWire for deliver, relay, and pairing
- core-rpc.js: deliverInviteWire via invite.deliver; invite.request returns
{ status, reason, inviteId }; invite.ack carries optional inviteId
- p2ns.js: register native handlers; slim p2ns.core-request (lifecycle only);
proactive invite ack tracks inviteId; fix missing invite.queued handler
- proxy-server: channel-manager + shared handlers (no p2ns.core-invite strings)
- Tests: core-swarm-handlers.test.js, core-invite-rpc-integration.js; extend test:core-rpc
- Docs: PLUGIN_SDK RPC table; consensus.removeDomain in longform/RESTAPI/glossary
Smoke tests
These scripts validate core HTTP surfaces on a running P2NS instance.
Prerequisites
- P2NS is running locally and serving internal domains.
- Root certificate is trusted so
https://p2ns.adminandhttps://peer.pasteresolve. - Node.js 18+.
Scripts
npm run test:adminchecksp2ns.adminhealth/status/stats endpoints.npm run test:peer-pastecheckspeer.pastehealth/stats/OpenAPI endpoints.npm run test:pluginscheckspeer.directory,global.profile, andfile.dropAPI endpoints.npm testruns all smoke scripts in sequence.
Custom target URL
You can pass a custom base URL:
node test-scripts/admin-smoke.js https://p2ns.adminnode test-scripts/peer-paste-smoke.js https://peer.paste
You can also override plugin targets with env vars:
PEER_DIRECTORY_URLGLOBAL_PROFILE_URLFILE_DROP_URL