← Catalog

@agimon-ai/po-remote

Remote access gateway for a Po host: the tunnel, pairing, device trust, passkey step-up, the dev proxy and host federation.

Extension

Install

Install with PiG

pig install npm:@agimon-ai/po-remote

Install with Pi

pi install npm:@agimon-ai/po-remote
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

README

Written by the package's publisher, shown as published in version 0.0.0-alpha.197 (README.md). PiG does not review it.

@agimon-ai/po-remote

Remote access gateway for a Po host: the tunnel, pairing, device trust, passkey step-up, the dev proxy and host federation.

Requirements and composition

Requires Node.js 24 or newer. Po ships this package as a fixed foundation on Node: the CLI composes it, so it is never selected in .po/presets.yaml. Cloud does not load it.

Entries

  • @agimon-ai/po-remote: createRemoteRuntime, which the CLI starts once per host and binds as po-core's po/remote-gateway; createRemoteApi, the /api/remote package API; relayDevProxySocket for the web server's dev proxy; and createDefaultHubFederation.
  • @agimon-ai/po-remote/extensions/web: the Remote control settings page and its summary line, the rail status spot each template marks (rail-status), and the remote access and pairing approval dialogs. The phone's Remote control screen stays in po-native: device trust is app-owned, and a plugin's native transport refuses /api/remote.

po-core never imports this package. The contracts it implements live in @agimon-ai/po-core/remoteContract (route names, settings and device types, own-device route classification), @agimon-ai/po-core/remoteOrigin and @agimon-ai/po-core/sessionMcpContract (which Session MCP routes are public, host-only or phone-reachable). Federation grant storage lives in @agimon-ai/po-federation, which Cloud also loads.

Independent connections

The approved ConnectionsOff and ConnectionsOn exports in RemoteAccessDialog.stories.tsx exercise RemoteConnectionsDialog. The dialog reads the tunnel and relay states separately. The relay card links the host through Po Cloud and only mints pairing codes after relay admission. The tunnel card never starts, stops, or pairs the relay. Its use is optional.

Local connection controls are /api/remote/{relay,tunnel}/{state,enable,disable,codes} plus transport-specific pairing approval and session revocation. They require the local presentation origin and CSRF header. The existing local /api/remote/disable stops both listeners. Legacy environment-configured relay and LAN modes retain their one-listener behavior.

Each listener owns its pairing codes, sessions, channels, timers, and failures. Native can explicitly scan the other connection's QR for a host whose signer it already trusts. The host verifies a fresh origin-bound proof with the existing trusted device key, and issues a new session on the chosen connection. No cookies move across. A refused switch does not try another route. Revoking the trusted key ends its sessions on both routes.

dualRemote.test.ts exercises both connections with an isolated host and fake carriers. This does not demonstrate a live public tunnel, staging pairing, or physical-device acceptance. Private relay pairing in the host dialog uses the Po app; Cloud browser bootstrap is a separate acceptance requirement.

Tailscale Serve

Set PO_TAILSCALE_SERVE_HOSTNAME to the exact device.tailnet.ts.net name in the host service environment. When the operator turns on the tunnel connection, Po uses the existing origin-pinned paired gateway on 127.0.0.1:7543 instead of starting a Cloudflare connector. It does not auto-restore named Cloudflare intent in this mode. The normal loopback presentation and headless listeners are unchanged. The operator manages the Serve proxy, certificates and tailnet grants separately; Po does not enable Funnel or treat forwarded identity headers as device authorization. See the VPS setup guide.

Help and authoring

The package publishes src/prompts/help-how-to-remote/SKILL.md through a named resource route and llms.txt. Keep additional guides package-owned and in the publish allowlist; do not export Markdown or copy it into dist.

The build generates host entries from named src/extensions routes. For extension layout, scoped services and lifecycle obligations, follow Po architecture.

Development

Run the package's build, typecheck, test, and lint scripts from this directory. Use npm pack --dry-run to inspect published contents before release.

License

MIT. See LICENSE.