oc-phone-link 2.4.4 → 2.4.5

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/CHANGELOG.md CHANGED
@@ -9,7 +9,7 @@ are attributed to the app repository's own changelog
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
- ## [2.4.4] - 2026-11-30
12
+ ## [2.4.5] - 2026-12-04
13
13
 
14
14
  Ships with the 2.4.0 app. The app and beacon must be upgraded together.
15
15
 
package/README.md CHANGED
@@ -27,7 +27,7 @@ Config file: `%USERPROFILE%\.config\opencode\opencode.jsonc` on Windows or `~/.c
27
27
 
28
28
  Inside config values OpenCode also substitutes `{env:USERPROFILE}` (Windows) and `{env:HOME}` (macOS/Linux) — config-string syntax, not shell syntax.
29
29
 
30
- There is no version pin here on purpose: npm's published version changes on every release of this package, so the install line stays true after the next publish. The PC plugin and Android app use separate version numbers. The plugin starts the beacon during setup and stops it when the session disposes. There is no tray app, no separate service and no QR code: the beacon is a keyed reverse proxy in front of the OpenCode server your PC already runs.
30
+ There is no version pin here on purpose: npm's published version changes on every release, so the install line stays true after the next publish. Two version numbers are in play and they are not the same: the beacon is this npm plugin, whose version is the package version shown in the badge above; the Android app has its own version, currently 2.4.0. Both are needed for the four-digit pairing flow below. The plugin starts the beacon during setup and stops it when the session disposes. There is no tray app, no separate service and no QR code: the beacon is a keyed reverse proxy in front of the OpenCode server your PC already runs.
31
31
 
32
32
  ## Upgrading from 2.2.0 or 2.3.x
33
33
 
@@ -36,7 +36,7 @@ An eight-digit PIN stored by an older beacon cannot work with the four-digit rul
36
36
  ## First use — one entry, then automatic
37
37
 
38
38
  1. Connect the PC and Android phone to the same Wi-Fi (or use the tunnel transport with an app that supports it).
39
- 2. Install the Android app that ships with this beacon. From 2.4.0 the app and beacon share the four-digit flow; a 2.2.0 app still expects eight digits and cannot pair with this build.
39
+ 2. Install the Android app from the [oc-phone-link Releases page](https://github.com/nathwn12/oc-collections/releases/tag/oc-phone-link-latest); the APK linked there is app version 2.4.0 — [direct download](https://github.com/nathwn12/oc-collections/releases/download/oc-phone-link-latest/oc-phone-link.apk). The page keeps that stable filename updated for each app release. From app 2.4.0 the app and beacon share the four-digit flow; a 2.2.0 app still expects eight digits and cannot pair with this build.
40
40
  3. Open `https://localhost:41338` on the PC. That page is the beacon's own control panel. Set a **four-digit** PIN there (or let the phone set the first one in step 5).
41
41
  4. Open the phone app. You can let discovery find the PC, or enter the beacon address once and call `GET /info?pair=1` on the HTTPS port (41338) instead. That endpoint returns the beacon's LAN `urls` and `agentUrls`, `httpsPort`, `proxyPort`, `hosts`, `fingerprint` and `pinRequired` (`true` when no code has been set yet). It returns no code, key, owner token or password; a plain `GET /info` still needs a device key or the owner cookie. This is the pairing-without-discovery path.
42
42
  5. The app shows a short TLS fingerprint. Compare it with the Verify line on the PC page. Enter the four digits **once** after the fingerprints match: the first code can be set from the phone through `/setup`, and a later device uses `/auth`. A successful call mints a device key. Five wrong codes from one source IP in five minutes arm a 15-minute lockout for that source; only a wrong code counts, and a correct one clears the record.
@@ -54,14 +54,16 @@ By default nothing is uploaded anywhere: discovery, pairing and proxying all sta
54
54
 
55
55
  - **The phone cannot find the beacon.** The app tries the last proven address, then UDP broadcast on 41337, then a parallel HTTPS /24 sweep on 41338; a blocked UDP port still leaves the sweep. `OC_PHONE_LINK_NO_UDP=1` disables the beacon's UDP listener for pair-by-address setups; enter the beacon address and use `GET /info?pair=1` instead. The log writes a `discovery addresses` line at startup and a `discovery request ... answer on` line for each probe, naming the addresses the beacon answers on; a probe from any other source is logged once per source as `discovery unexpected source`. Check `agent.log` before assuming the Wi-Fi is at fault.
56
56
  - **The TLS fingerprints differ.** Do not enter the PIN. Confirm the phone is showing this PC's beacon and compare its short fingerprint with the Verify line on the PC page before trying again.
57
- - **The Android app cannot pair.** The old Android 1.4.1 and 2.2.0 apps expect eight digits and cannot pair with this beacon. Install the 2.4.0 app that ships with it.
57
+ - **The Android app cannot pair.** The old Android 1.4.1 and 2.2.0 apps expect eight digits and cannot pair with this beacon. Install the 2.4.0 app from the [Releases page](https://github.com/nathwn12/oc-collections/releases/tag/oc-phone-link-latest).
58
58
  - **The control panel does not open.** Confirm the plugin loaded after the OpenCode restart. If a port is taken, set `OC_PHONE_LINK_PORT_BASE` to shift the fixed port block.
59
59
 
60
60
  ## Development
61
61
 
62
- ```text
63
- node --test packages/oc-phone-link/beacon.test.mjs
64
- node packages/oc-phone-link/probe-bench.mjs
62
+ Run these from the package directory (`packages/oc-phone-link`) in a repo checkout; neither script ships in the npm tarball:
63
+
64
+ ```sh
65
+ node --test beacon.test.mjs
66
+ node probe-bench.mjs
65
67
  ```
66
68
 
67
69
  The test file covers PIN derivation, key revoke and rotation, discovery and the proxy gate. The bench script measures UDP discovery and the first proxied response on loopback through the public startBeacon seam.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-phone-link",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Drive OpenCode from an Android phone on the same Wi-Fi: in-server beacon, pinned TLS, one PIN, no tray, no QR.",
5
5
  "license": "MIT",
6
6
  "author": "nathwn12",