Commit Graph

66 Commits

Author SHA1 Message Date
Johannes Merz 911d3f7625 feat(T-1.8/1.9): stream integration smoke, operator guide, Phase 1 complete
- T-1.8: stream.test.mjs — session CRUD, WS stream attach, send-keys,
  marker observation, reconnect+delta replay, thumbnail, delete. 12/12 green.
- T-1.9: docs/reference/OPERATOR.md — full operator guide; README sidecar section.
- Fix: tmux/control.ts -CC → -C (passthrough mode bypassed %output events).
- Fix: tmux/input.ts + snapshot.ts drop hardcoded :0.0 pane (base-index safety).
- SYNC.md + NEXT-STEPS.md: Phase 1 marked done, Phase 2 unblocked.
2026-05-15 11:43:59 +02:00
Johannes Merz b94b668df6 feat(T-1.5/1.6/1.7): stream+input+snapshot routes, sessions CRUD, commands, side-channel, health endpoint 2026-05-15 11:35:55 +02:00
Johannes Merz db6be6dcf8 feat(T-1.10): APNs scaffold — JWT provider auth, push primitive, device-token stub 2026-05-15 11:32:05 +02:00
Johannes Merz f89abd1125 feat(T-1.4): pi adapter — events, commands, autoname 2026-05-15 11:31:36 +02:00
Johannes Merz 6f106d2411 feat(T-1.3): auth tokens, pairing, TLS, CLI (pair/auth list/revoke/name) 2026-05-15 11:30:54 +02:00
Johannes Merz 17c32e7e93 feat(T-1.2): sequence counter + disk ring-buffer writer/reader 2026-05-15 11:29:41 +02:00
Johannes Merz bd990a07ab feat(T-1.1): tmux manager, control-mode client, input, snapshot 2026-05-15 11:28:45 +02:00
Johannes Merz 4f6fa0e83b docs: resolve OQ-3 — tmux control-mode per-session 2026-05-15 11:25:16 +02:00
Johannes Merz d74341af2a merge: T-1.0 server refactor + T-1.0a smoke harness 2026-05-15 11:20:32 +02:00
jay af990f6592 sync: release T-1.0a claim, add history + file ownership [@worker-t1.0a] 2026-05-15 11:18:56 +02:00
jay a7dad86901 feat(t-1.0a): smoke test harness MVP
- scripts/smoke/helpers.mjs — spawn-pi (via python3 pty.spawn), wait-for-port,
  fetch, WebSocket helpers; createSmokeHome/removeSmokeHome for isolated HOME
- scripts/smoke/smoke.mjs — 6 node:test assertions:
    GET /manifest.json → 200 + JSON shape
    GET /icon.svg → 200 + <svg body
    GET / (with token) → 302→200 + HTML marker
    GET / (no token) → 403
    WS /ws (with token) → 101 upgrade
    pi process alive check
- scripts/smoke/README.md — usage, design notes, extension guide
- package.json: add 'smoke' script
- docs/SYNC.md: add scripts/smoke/** ownership row + History entry

All 6 tests pass in ~1.4 s locally.

Key finding: pi requires a PTY to enter interactive mode and fire
session_start. Spawning without a TTY causes immediate exit. Workaround:
python3 pty.spawn() — allocates a PTY with no additional deps.
2026-05-15 11:18:20 +02:00
jay 174fa7fb31 sync: claim T-1.0a smoke test harness [@worker-t1.0a] 2026-05-15 11:12:10 +02:00
jay 3e813eb90a sync: release T-1.0 claim, add history entry (@worker-t1.0) 2026-05-15 10:58:07 +02:00
jay 568931901d refactor(T-1.0): carve server.ts into server/ sub-modules
Create the modular server/ layout from PHASE-1-sidecar.md §Architecture Sketch:

  server/types.ts    — shared WsClient/WsServer/RemoteServer interfaces
  server/upgrade.ts  — WS upgrade routing per path (LEGACY /ws)
  server/server.ts   — HTTP bootstrap, middleware, LEGACY HTML routes
  server/routes/     — empty dir, placeholder for T-1.5/T-1.6/T-1.7

The original extensions/remote-control/server.ts is replaced with a
thin re-export shim so that index.ts continues to resolve
'./server.js' without changes.

All LEGACY code paths (manifest.json, icon.svg, /, /ws) are tagged
with // LEGACY: … comments. No behaviour changes. No new endpoints.

Pre-existing biome errors in auth.ts, config.ts, index.ts are
unchanged — NOT introduced by this commit.
2026-05-15 10:57:52 +02:00
jay e396cfcaaa sync: claim T-1.0 — server refactor scaffold (@worker-t1.0) 2026-05-15 10:56:04 +02:00
Johannes Merz ba23050eda docs: resolve OQ-4 — T-1.0 worker = sonnet-4-6 2026-05-15 10:51:27 +02:00
Johannes Merz 460c5fac7a sync: clear stale T-1.0 claim (qwen swarm reset) 2026-05-15 10:48:56 +02:00
Johannes Merz 07522e5974 docs: mark IC-1..IC-4 frozen in NEXT-STEPS, resolve OQ-1/OQ-2 2026-05-15 10:48:38 +02:00
jay c9bdfce890 sync: claim T-1.0 server refactor 2026-05-15 06:56:58 +02:00
jay 7c40c49b1a chore: freeze IC-1..IC-4 interface contracts
Resolved OQ-1 (drop tree event), OQ-2 (defer resize), OQ-3 (per-session
control-mode, T-1.1 to decide final), OQ-4 (sonnet-4-5 for T-1.0).

IC-3: clarified deviceToken/environment optional pre-Phase-2, mandatory
from Phase 2 onward.
2026-05-15 06:56:38 +02:00
jay aa8aa42655 docs: update README for iOS app direction + sidecar architecture 2026-05-15 04:50:22 +02:00
jay b2b82c82ce docs: incorporate Phase 0.5 verdict (Path B), prep Phase 1
- PHASE-1-sidecar.md
  - Note at top: streaming primitive decided as tmux control mode
  - Architecture sketch: tmux/pipe.ts → tmux/control.ts
  - T-1.1 description updated to reference control mode + spike-cc.ts
  - Risks R4 (parser throughput) and R5 (tmux ≥2.5 required) added

- SYNC.md
  - File ownership map: tmux/** note about control mode
  - Frozen Interface Contracts table: added Status + Frozen-at columns
    so contracts can be tracked from draft → frozen with date stamp
  - Freeze protocol prose

- NEW: NEXT-STEPS.md — single resume pointer for the next session.
  Lists what's done, what's draft, the orchestrator todo list (freeze
  contracts → dispatch T-1.0 → plan fan-out), open questions, and
  things explicitly NOT to do tomorrow.

- README.md: NEXT-STEPS.md added at top of the docs index.
2026-05-15 04:48:20 +02:00
jay 86c4d3e869 docs: mark Phase 0.5 complete in SYNC
- Phase 0.5 status: done
- Verdict: Path B (tmux control mode) recommended
- Active claim removed
- History entry added
- Phase 1 status updated: ready to start with control mode
2026-05-15 04:18:41 +02:00
jay 307417b392 docs: add Phase 0.5 — spike tmux control mode
Phase 0 found that tmux pipe-pane is unreliable across alternate-screen
transitions. Before Phase 1 commits to a streaming primitive, a short
follow-up spike evaluates tmux control mode (`tmux -CC`) as an
alternative to pipe-pane + watchdog. Verdict drives T-1.1 design.
2026-05-15 04:06:25 +02:00
jay d97bd4aeef docs: mark Phase 0 complete in SYNC.md
- Phase 0 status: done (GREEN LIGHT)
- Phase 1 status: ready to start
- Remove active claim for T-0.*
- Add history entry
- Full report available in feat/spike-stream branch
2026-05-15 03:51:14 +02:00
jay 15772558dd docs: claim Phase 0 spike stream task 2026-05-15 03:40:50 +02:00
jay f6cbf17078 docs: reorganise — implementation plans + sync, archive spec to reference/
- docs/ now holds only implementation drivers:
  - PHASE-0-spike-stream.md (single agent, ~1 day PoC)
  - PHASE-1-sidecar.md (multi-agent, sidecar production-ready)
  - PHASE-2-ios-mvp.md (multi-agent, iOS app MVP)
  - PHASE-3-ios-augmentation.md (multi-agent, iOS polish)
  - SYNC.md (live coordination: claims, ownership, CCRs)
  - README.md (folder guide)

- docs/reference/ holds background:
  - SPEC-ios-app.md (final v3 spec)
  - EXTENSION-API-AUDIT.md (audit result)
  - SPEC-ios-app-review-v1.md (archived review thread)
  - ARCHITECTURE.md (original extension architecture)
  - README.md (folder guide)

Each phase plan defines: goal, acceptance criteria, file layout,
explicit task table with parallelisable tasks, interface contracts,
branching strategy, risks, exit criteria.

SYNC.md provides the multi-agent coordination protocol: active claims
table, file ownership map, frozen contracts, and contract change
requests (CCR) workflow.
2026-05-15 03:33:51 +02:00
jay 0f946d56ea docs: spec v3 — close Q-A (pi -p flags) and Q-C (APNs details)
- S-09a: concrete pi CLI invocation verified, ~2s with haiku-4-5
- iOS-C-02: full APNs setup, .p8 key, sandbox/production routing
  per device-token (Xcode-debug → sandbox, TestFlight → production),
  collapse-id, JWT caching, auto-cleanup on 410
2026-05-15 01:48:23 +02:00
jay cf61b2ba1b docs: spec v3 — drop Tree-Nav from iOS, audit closed
- Audit confirmed S-07, S-08 work out-of-the-box → upgraded from PENDING to firm SHOULD
- Tree-Write blocked by ExtensionAPI; Gruppe T removed entirely
- Tree-Navigation explicitly out of scope (native pi only)
- Spike-0a closed, EXTENSION-API-AUDIT.md is referenced artifact
2026-05-15 01:35:20 +02:00
jay 36938a66c4 docs: spec v2 — incorporate review feedback, archive v1 thread 2026-05-15 01:20:17 +02:00
jay 7c0e94cb57 docs: add iOS app spec with inline review thread 2026-05-15 01:09:20 +02:00
jay 94b4dc7a41 fix: reconnect immediately on tab visibility (iOS) 2026-05-14 19:22:46 +02:00
jay 74fc22ddfb feat: persist auth token across server restarts
Token is stored in ~/.pi/remote-control/token (mode 600) on first start
and reused on subsequent starts — saved URLs stay valid indefinitely.
2026-05-14 19:00:31 +02:00
jay 9f8b2cc987 Revert "fix: faster WebSocket reconnect on iOS PWA"
This reverts commit c21b6c441c.
2026-05-14 18:59:13 +02:00
jay c21b6c441c fix: faster WebSocket reconnect on iOS PWA
- connection timeout after 4s (vs OS TCP default ~75s)
- visibilitychange listener: reconnect immediately when app resumes
2026-05-14 18:57:02 +02:00
jay 1b610013c3 feat: bindAddress from config + PWA support
- config: read from ~/.pi/remote-control/config.json (zerray-compatible path)
- config: add bindAddress + advertisedBaseUrl fields
- server: listen on host/port from bindAddress (default: 127.0.0.1:random)
- server: /manifest.json + /icon.svg routes (no auth, PWA)
- server: manifest-src 'self' in CSP
- html: apple-mobile-web-app meta tags + manifest/touch-icon links
- index: advertisedBaseUrl as fallback for publicBaseUrl
2026-05-14 18:51:54 +02:00
Yejun Su 48810a5456
add Makefile for debug the extension only 2026-05-10 21:33:08 +08:00
Yejun Su 0571d42b80
npm audit fix 2026-05-08 18:19:14 +08:00
Yejun Su cff6aa693c
chore: migrate @mariozechner pi packages to @earendil-works namespace 2026-05-08 18:18:04 +08:00
Yejun Su 084515c199
npm audit fix 2026-04-30 23:19:50 +08:00
Yejun Su a489ff84bd
fix install
npm error command sh -c husky
Error: npm install --omit=dev failed with code 127
2026-04-30 23:19:49 +08:00
Yejun Su fc5d448a29
chore: add lint:check script and use it in pre-commit hook 2026-04-29 10:13:36 +08:00
Yejun Su d22b853de2
chore: add husky pre-commit hook for linting 2026-04-21 15:31:09 +08:00
Yejun Su 82c463ec27
chore(remote-control): add Biome and fix all lint warnings 2026-04-21 14:09:42 +08:00
Yejun Su 06fa1147f3
extensions/pi-remote-control -> extensions/remote-control 2026-04-21 12:51:38 +08:00
Yejun Su 8cffeb9e27
fix(remote-control): clear stale status badge on session reload 2026-03-22 00:51:10 +08:00
Yejun Su 9e92201206
feat(statusbar): show cwd with home abbreviated to ~ 2026-03-22 00:46:45 +08:00
Yejun Su 9207b3198a
docs: improve README with screenshot, security details, and fixes 2026-03-20 21:15:19 +08:00
Yejun Su 54267f1842
docs: rewrite README and add architecture docs 2026-03-20 20:56:53 +08:00
Yejun Su 63a879046b
fix(remote-control): send utf-8 charset for plain text errors 2026-03-20 20:12:47 +08:00