@dashup/connector 0.1.7 → 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.
Files changed (3) hide show
  1. package/README.md +6 -20
  2. package/dist/index.js +389 -597
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -8,7 +8,7 @@ With Node 24:
8
8
  npx @dashup/connector pair
9
9
  ```
10
10
 
11
- To keep `dashup` as a command, install it with `npm install -g @dashup/connector`. The package bundles the workspace code; screen and input need the native helper from `packages/desktop`, which it does not include.
11
+ To keep `dashup` as a command, install it with `npm install -g @dashup/connector`. The package bundles the workspace code.
12
12
 
13
13
  `dashup pair` walks through pairing in the terminal: it shows a QR code that expires in five minutes, waits for a phone to scan it under Pair a computer, and offers to keep Dashup running in the background. The first phone adds the computer to its account, so the walkthrough names that account and shares nothing until you confirm it. Later codes pair more phones on the same account without asking, including through a connector that is already running. A phone that scans an expired code gets a pairing the computer revokes, because it never kept that key. To pair without the prompt, as an agent can, name the account with `--account you@example.com`; a phone signed in to any other account is refused. Without a terminal, the code opens in a browser on this computer instead of printing, because it carries the pairing's encryption key and an agent's output leaves the computer. Pairing then exits, and `dashup install` keeps Dashup running. Where no browser can open, pairing needs a terminal. It uses `https://api.dashup.com`; for a local API, add `--api http://localhost:3000`. A physical phone needs a reachable HTTPS API. To run a paired connector in the foreground, use `dashup watch`.
14
14
 
@@ -24,7 +24,7 @@ The connector automatically reads existing Claude Code, Codex, and OpenCode conv
24
24
 
25
25
  A thread's title is the agent's own (a rename, Codex's stored title, Claude's title), else the first message the person typed: Codex's injected AGENTS.md and environment messages and Claude Code's slash commands are skipped, in titles and in the conversation, and a Codex subagent is named for its task. A thread's time is its last conversation message in the agent's own history; editor bookkeeping such as Zed's sidebar restamps never moves it. Subagent sessions (OpenCode children, Codex spawned agents) carry their parent thread. Tool calls are joined with their results into one step with status, duration and, for file edits, a unified diff. Saved history has unknown live status; the phone can answer it by resuming it (see Starting sessions from the phone). File changes publish project metadata; only an approval, a question, an error or a finished turn sends an alert. A workspace becomes a project once it has a conversation. After every change the connector publishes its overview: every project, and the conversations Home shows (anything that needs the person or is working, then the newest 20). The phone renders Home from the overview alone and decodes a project's full snapshot only when a page opens it. Only a scan that read every source retires a project it published earlier and left off. Each phone read request reads a thread's native history once and publishes a snapshot of separately encrypted message fragments to the database. The phone reads bounded latest and earlier pages; realtime thread updates carry only summary and approval metadata. Native history remains the source, and an incomplete upload never replaces the previous published snapshot. Native live interfaces provide actual status and pending choices. Tool integrations can also queue explicit encrypted alerts with `alert`.
26
26
 
27
- Project paths, SSH details, thread content, approvals, and alerts are encrypted separately for every paired phone. The encrypted outbox survives a connector restart. Parcae handles realtime delivery and reconnect; replay counters are saved before commands execute. Revoking a pairing stops its viewer and discards its connector key and queued content.
27
+ Project paths, SSH details, thread content, approvals, and alerts are encrypted separately for every paired phone. The encrypted outbox survives a connector restart. Parcae handles realtime delivery and reconnect; replay counters are saved before commands execute. Revoking a pairing discards its connector key and queued content.
28
28
 
29
29
  The phone watches small connection sequence records and fetches encrypted relay pages in order. New clients negotiate paged history before fetching relays; SQL excludes legacy full-transcript envelopes before loading ciphertext. The separate history API returns at most 30 encrypted records and 256 KiB per page, including a hard individual record limit. Large native outputs become authenticated continuation records. History cursors are independent of command replay counters.
30
30
 
@@ -45,11 +45,11 @@ The [existing Zed/Codex session proof](INTEGRATION_PROOF.md) records native queu
45
45
 
46
46
  Only an explicit Queue reply starts a temporary official app-server helper to initialize and call `thread/queue/add` in that same native home. It does not start, resume or load an agent thread. A durable local intent records the caller-supplied native client-message ID before dispatch. Interrupted acknowledgement leaves the request unconfirmed and prevents automatic resubmission, including after connector restart. Known acceptance is retained if the item leaves the queue; disappearance is not delivery.
47
47
 
48
- Delivery requires that exact typed client-message ID in the original thread's native history database. A response receipt requires a later native assistant item in the same turn; it does not mean the agent finished. Receipts remain encrypted through the ordinary Dashup relay. History is read on request; the phone asks again while a thread is open and its session changes. Native approvals owned by the private-stdio process remain unsupported and require its original UI or Screen. Queue text never substitutes for a native approval.
48
+ Delivery requires that exact typed client-message ID in the original thread's native history database. A response receipt requires a later native assistant item in the same turn; it does not mean the agent finished. Receipts remain encrypted through the ordinary Dashup relay. History is read on request; the phone asks again while a thread is open and its session changes. Native approvals owned by the private-stdio process remain unsupported and require its original UI. Queue text never substitutes for a native approval.
49
49
 
50
50
  Stop interrupts the running turn through each live interface: OpenCode's session abort, Codex `turn/interrupt`, the AHP client's turn cancellation, and ACP `session/cancel`. It refuses when nothing is running and expires with other commands after 60 seconds, so a late stop cannot end a newer turn.
51
51
 
52
- Live discovery is bounded to 100 sessions per endpoint. OpenCode supplies the latest 200 messages; the VS Code host supplies its current chat snapshot. Paged history prefers the native saved store when available and otherwise uses the existing live snapshot. Approvals whose actual commands or file contents cannot be previewed require Screen review; rejection remains available when the native protocol supports it.
52
+ Live discovery is bounded to 100 sessions per endpoint. OpenCode supplies the latest 200 messages; the VS Code host supplies its current chat snapshot. Paged history prefers the native saved store when available and otherwise uses the existing live snapshot. Approvals whose actual commands or file contents cannot be previewed are approved on the computer; rejection remains available when the native protocol supports it.
53
53
 
54
54
  ## Starting sessions from the phone
55
55
 
@@ -69,21 +69,7 @@ Install `dashup` globally and set the editor's existing agent command to it, wit
69
69
 
70
70
  The wrapper and connector must run on the same execution host. For SSH projects, confirm where that particular external agent runs before configuring its command; [Zed treats external-agent runtime and authentication as agent-owned](https://zed.dev/docs/ai/external-agents#remote-projects). Pair the development machine separately if it owns the wrapper process. Reading the PC's saved SSH project does not attach to a remote agent process.
71
71
 
72
- The wrapper cannot retroactively capture an already-running stdio stream. Saved history is not a live session handle. Zed's built-in agent and providers without a supported native attach interface remain read-only in Dashup; use Screen for their native controls. If the connector restarts, the original wrapped agent continues, but this optional wrapper currently needs relaunching to restore its observer connection.
73
-
74
- ## Screen and input
75
-
76
- Build the native WebRTC helper on the computer, following [desktop build requirements](../../packages/desktop/README.md), then enable access locally:
77
-
78
- ```sh
79
- pnpm --filter @dashup/desktop build
80
- dashup permissions --screen
81
- dashup permissions --screen --control
82
- ```
83
-
84
- Run `permissions` without flags to disable access. Video and input use a WebRTC peer connection; SDP, ICE candidates, and DTLS fingerprints travel inside paired-device encrypted envelopes. Only one screen session is active at a time. The relay does not carry decoded frames. Set `DASHUP_DESKTOP_BIN` if the helper lives outside its workspace build path.
85
-
86
- macOS requires Screen Recording and Accessibility permission. Windows uses the signed-in desktop session. Linux input needs `xdotool` on X11 or a configured `ydotool` daemon on Wayland; capture support depends on the native helper and desktop environment. `doctor` reports available tooling, not OS permission grants. Configure `TURN_URLS` and `TURN_SECRET` on the API and the matching coturn shared secret for networks requiring a relay; the API issues one-hour credentials. Without TURN, connectivity depends on the devices' network reachability.
72
+ The wrapper cannot retroactively capture an already-running stdio stream. Saved history is not a live session handle. Zed's built-in agent and providers without a supported native attach interface remain read-only in Dashup. If the connector restarts, the original wrapped agent continues, but this optional wrapper currently needs relaunching to restore its observer connection.
87
73
 
88
74
  ## Start at login
89
75
 
@@ -104,4 +90,4 @@ pnpm --filter @dashup/connector build
104
90
  TEST_API_URL=http://127.0.0.1:3049 pnpm --filter @dashup/connector test:workflow
105
91
  ```
106
92
 
107
- The workflow test needs a running isolated Dashup API and database. It creates disposable accounts and verifies pairing, encrypted project/alert delivery over Parcae realtime, native history and session identity, replacement approvals, command replay protection, capability removal on disconnect, reattachment, and revocation. Unit fixtures exercise real native file formats, HTTP/SSE, Unix WebSockets, and the official AHP client. Actual editor UI compatibility, macOS/Windows startup, production push credentials, and cross-network TURN deployment require their respective hosts and credentials.
93
+ The workflow test needs a running isolated Dashup API and database. It creates disposable accounts and verifies pairing, encrypted project/alert delivery over Parcae realtime, native history and session identity, replacement approvals, command replay protection, capability removal on disconnect, reattachment, and revocation. Unit fixtures exercise real native file formats, HTTP/SSE, Unix WebSockets, and the official AHP client. Actual editor UI compatibility, macOS/Windows startup, and production push credentials require their respective hosts and credentials.