pipane 0.1.8 → 0.1.9

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/README.md CHANGED
@@ -30,6 +30,8 @@ If `pi` is missing, install it like this:
30
30
  npm install -g @earendil-works/pi-coding-agent
31
31
  ```
32
32
 
33
+ Run `pipane` to start the backend. It registers with `https://pipane.dev` by default and uses the machine's short hostname as its backend name, so no remote-access environment variables are required. Set `PIPANE_BACKEND_NAME` to customize the name, `PIPANE_RENDEZVOUS_URL` to use another rendezvous service, or set `PIPANE_RENDEZVOUS_URL` to an empty value to disable remote registration.
34
+
33
35
  ### Explicit local deployments
34
36
 
35
37
  Deploy the current working tree to the separate dev instance with:
@@ -1,5 +1,5 @@
1
1
  {
2
- "packageVersion": "0.1.8",
3
- "revision": "f591695",
2
+ "packageVersion": "0.1.9",
3
+ "revision": "a2d6ab6",
4
4
  "developmentCommit": false
5
5
  }
@@ -0,0 +1,7 @@
1
+ export const DEFAULT_RENDEZVOUS_URL = "https://pipane.dev";
2
+ export function resolveRendezvousUrl(configuredUrl) {
3
+ return configuredUrl ?? DEFAULT_RENDEZVOUS_URL;
4
+ }
5
+ export function resolveBackendName(configuredName, systemHostname) {
6
+ return configuredName || systemHostname.split(".", 1)[0] || systemHostname;
7
+ }
@@ -46,6 +46,7 @@ import { DataChannelFrameConnection } from "./frame-connection.js";
46
46
  import { routeFrameConnection } from "./frame-router.js";
47
47
  import { BackendProtocolHandler } from "./backend-protocol-handler.js";
48
48
  import { LocalBackendApi } from "./local-backend-api.js";
49
+ import { resolveBackendName, resolveRendezvousUrl } from "./backend-registration-config.js";
49
50
  import qrcode from "qrcode-terminal";
50
51
  const DEFAULT_PORT = process.env.NODE_ENV === "production" ? "8222" : "18111";
51
52
  const REQUESTED_PORT = parseInt(process.env.PORT || DEFAULT_PORT, 10);
@@ -74,7 +75,7 @@ const PI_AVAILABLE = checkCommandAvailable(PI_LAUNCH.command);
74
75
  const PI_MAX_PROCESSES = parseInt(process.env.PI_MAX_PROCESSES || "24", 10);
75
76
  const PI_PREWARM_COUNT = parseInt(process.env.PI_PREWARM_COUNT || "2", 10);
76
77
  const USAGE_EXTENSION_ENABLED = process.env.PIPANE_USAGE_EXTENSION !== "0";
77
- const RENDEZVOUS_URL = process.env.PIPANE_RENDEZVOUS_URL;
78
+ const RENDEZVOUS_URL = resolveRendezvousUrl(process.env.PIPANE_RENDEZVOUS_URL);
78
79
  let rendezvousPairingRuntime;
79
80
  let registeredBackendId;
80
81
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -101,7 +102,7 @@ async function startRendezvousRegistration() {
101
102
  url: RENDEZVOUS_URL,
102
103
  identity,
103
104
  metadata: {
104
- name: process.env.PIPANE_BACKEND_NAME || hostname(),
105
+ name: resolveBackendName(process.env.PIPANE_BACKEND_NAME, hostname()),
105
106
  softwareVersion: PKG_VERSION,
106
107
  protocolVersions: [WS_PROTOCOL_VERSION, BACKEND_PROTOCOL_VERSION],
107
108
  },
package/docs/protocol.md CHANGED
@@ -52,7 +52,7 @@ The server sends a fresh random `challenge`. A backend responds with `register_b
52
52
 
53
53
  The backend client reconnects its outbound WebSocket with bounded exponential backoff and repeats challenge authentication. STUN servers may be static. TURN credentials use coturn's REST convention: an expiring `timestamp:subject` username and HMAC-SHA1 credential; fresh backend credentials accompany each `connection_request` rather than expiring in a long-running peer manager. Browser and backend support relay-only ICE policy; deterministic E2E forces both peers through a local UDP TURN relay.
54
54
 
55
- Backend registration uses `PIPANE_RENDEZVOUS_URL` and optional `PIPANE_APP_URL`/`PIPANE_BACKEND_NAME`. The rendezvous executable reads comma-separated `PIPANE_STUN_URLS` and `PIPANE_TURN_URLS`, plus `PIPANE_TURN_SECRET`; durable central identity/account state defaults to `~/.config/pipane-rendezvous` or `PIPANE_RENDEZVOUS_DATA_DIR`.
55
+ Backends register with `https://pipane.dev` by default. `PIPANE_RENDEZVOUS_URL` overrides that endpoint (or disables registration when set to an empty value), while `PIPANE_APP_URL` optionally overrides generated browser links. `PIPANE_BACKEND_NAME` is optional and defaults to the machine's non-fully-qualified hostname. The rendezvous executable reads comma-separated `PIPANE_STUN_URLS` and `PIPANE_TURN_URLS`, plus `PIPANE_TURN_SECRET`; durable central identity/account state defaults to `~/.config/pipane-rendezvous` or `PIPANE_RENDEZVOUS_DATA_DIR`.
56
56
 
57
57
  ### Device identity and anonymous accounts
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipane",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "A clean web interface for the pi coding agent — chat UI with real-time tool calls, streaming output, session management, and model picker",
5
5
  "private": false,
6
6
  "type": "module",