@zeph-to/cli 1.26.1 → 1.27.0

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
@@ -7,7 +7,7 @@
7
7
 
8
8
  **Your agent works, hits a decision, and asks your phone. You tap a button (or type a reply), and the answer lands back in the live session — so the agent keeps going.**
9
9
 
10
- `@zeph-to/cli` is the terminal side of that round trip: a zero-dependency push SDK, a `zeph` CLI that wires up 8 AI agents in one command, and a resident listener that lets your phone **drive Claude Code / Codex / Gemini sessions** by typing straight into named tmux sessions.
10
+ `@zeph-to/cli` is the terminal side of that round trip: a zero-dependency push SDK, a `zeph` CLI that wires up 8 AI agents in one command, and a resident listener that lets your phone **drive Claude Code / Codex / Cursor / Gemini sessions** by typing straight into named tmux sessions.
11
11
 
12
12
  <p align="center">
13
13
  <img src="https://zeph.to/readme/demo.gif" alt="Agent asks 'Deploy to prod?' on your phone; you tap Deploy; the session ships" width="560"><br>
@@ -78,7 +78,7 @@ To **send** notifications:
78
78
  zeph notify --title "Deploy done" --body "v2.1.0 shipped"
79
79
  ```
80
80
 
81
- To **drive a Claude Code / Codex / Gemini session from your phone**, see
81
+ To **drive a Claude Code / Codex / Cursor / Gemini session from your phone**, see
82
82
  [Remote Control](#remote-control) below.
83
83
 
84
84
  ## Remote Control
@@ -111,7 +111,7 @@ tmux session via `tmux send-keys`.
111
111
  [zeph listener — resident daemon, started by `zeph cc` automatically]
112
112
  │ tmux send-keys -l -t zeph-myapp "리팩토링 마무리해줘" + Enter
113
113
 
114
- [tmux session "zeph-myapp" running claude / codex / gemini]
114
+ [tmux session "zeph-myapp" running claude / codex / cursor-agent / gemini]
115
115
  ```
116
116
 
117
117
  The listener polls its tmux session inventory every 5 seconds and
@@ -136,10 +136,29 @@ an answerable `zeph_ask`).
136
136
  | Claude Code | `UserPromptSubmit` → plugin's `zeph-remote.sh` | Zeph plugin |
137
137
  | Gemini CLI | `BeforeAgent` → `zeph remote-hook gemini` | `zeph setup` |
138
138
  | Codex CLI | `UserPromptSubmit` → `zeph remote-hook codex` | `zeph setup` |
139
+ | Cursor CLI | — none yet | — |
139
140
 
140
141
  Detection is exact-match: a terminal keystroke racing a phone message
141
142
  can never false-flag. Muted projects are never flagged.
142
143
 
144
+ `zeph cursor` has no remote-origin hook, so it never enters sticky REMOTE
145
+ mode by itself. **Just ask for it** — one line, once per session:
146
+
147
+ > I'm driving this session from my phone. End every response with
148
+ > `zeph_ask` so I can answer with a button.
149
+
150
+ Nothing else is missing: injection works, and the MCP tools are all
151
+ there, `zeph_ask` included. Check them with `cursor-agent mcp list-tools
152
+ zeph` — `mcp list` prints only the *approved* list, not what's
153
+ configured, so it reads as empty even when the server is wired up.
154
+
155
+ Why it isn't automatic: `hooks.json` is honored by the Cursor IDE but not
156
+ by `cursor-agent`, and `beforeSubmitPrompt`'s output schema is
157
+ `{continue, user_message}` — no context channel to deliver a marker match
158
+ through. Same reason the `stop`-hook auto-push `zeph setup` installs
159
+ covers the Cursor **IDE** but not `zeph cursor` panes; ask for a
160
+ `zeph_notify` when you want one.
161
+
143
162
  ### Setup
144
163
 
145
164
  1. **Install tmux.** The listener uses `send-keys`; the wrapper spawns
@@ -162,11 +181,16 @@ can never false-flag. Muted projects are never flagged.
162
181
  3. **Run agents through the wrapper.** That's it.
163
182
 
164
183
  ```bash
165
- zeph cc # claude → tmux session "zeph-<project>"
166
- zeph codex # codex → tmux session "zeph-<project>"
167
- zeph gemini # gemini → tmux session "zeph-<project>"
184
+ zeph cc # claude → tmux session "zeph-<project>"
185
+ zeph codex # codex → tmux session "zeph-<project>"
186
+ zeph cursor # cursor-agent → tmux session "zeph-<project>"
187
+ zeph gemini # gemini → tmux session "zeph-<project>"
168
188
  ```
169
189
 
190
+ `zeph cursor` runs **`cursor-agent`**, Cursor's terminal agent — a
191
+ separate install from the Cursor IDE (the bare `cursor` on your PATH
192
+ is the editor launcher, which exits immediately and can't be driven).
193
+
170
194
  The first `zeph cc` on a machine **auto-spawns a background
171
195
  listener** (singleton, PID file at `~/.zeph/listener.pid`,
172
196
  stdout/stderr at `~/.zeph/listener.log`). You never run
@@ -360,6 +384,7 @@ zeph test
360
384
  # Run an agent in a named tmux session (so the listener can reach it)
361
385
  zeph cc # claude
362
386
  zeph codex # codex
387
+ zeph cursor # cursor-agent (Cursor CLI, not the IDE)
363
388
  zeph gemini # gemini
364
389
 
365
390
  # Run the resident listener (foreground; background it as you like)
@@ -54,13 +54,18 @@ declare const REMOTE_AGENT_TABLE: readonly [{
54
54
  readonly displayName: "Codex CLI";
55
55
  readonly binary: "codex";
56
56
  readonly subcommands: readonly ["codex"];
57
+ }, {
58
+ readonly kind: "cursor";
59
+ readonly displayName: "Cursor CLI";
60
+ readonly binary: "cursor-agent";
61
+ readonly subcommands: readonly ["cursor", "cursor-agent"];
57
62
  }, {
58
63
  readonly kind: "gemini";
59
64
  readonly displayName: "Gemini CLI";
60
65
  readonly binary: "gemini";
61
66
  readonly subcommands: readonly ["gemini"];
62
67
  }];
63
- /** Closed union of remote-controllable agent kinds ('claude' | 'codex' | 'gemini'). */
68
+ /** Closed union of remote-controllable agent kinds ('claude' | 'codex' | 'cursor' | 'gemini'). */
64
69
  export type AgentKind = (typeof REMOTE_AGENT_TABLE)[number]['kind'];
65
70
  /** A registry row: the uniform RemoteAgent shape with `kind` narrowed to the closed union. */
66
71
  export type RegisteredRemoteAgent = RemoteAgent & {
@@ -1 +1 @@
1
- {"version":3,"file":"remote-agents.d.ts","sourceRoot":"","sources":["../src/remote-agents.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IACxB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,SAAS,MAA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uB,CAAC;AAElF,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,KAAG,qBAAqB,GAAG,SAClB,CAAC;AAE3D,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,KAAG,qBAAqB,GAAG,SAG9E,CAAC"}
@@ -10,9 +10,11 @@ exports.matchAgentByPaneCommand = exports.findAgentBySubcommand = exports.REMOTE
10
10
  * and the phone picker, which may validate the enum).
11
11
  *
12
12
  * This is deliberately NOT merged into `agents.ts`: that table drives
13
- * install/uninstall/verify detection (8 agents, incl. Cursor/Windsurf
14
- * which can never be driven via tmux), and the two tables carry different
15
- * name axes — install id vs subcommand alias vs pane binary.
13
+ * install/uninstall/verify detection (8 agents, incl. Windsurf, which can
14
+ * never be driven via tmux), and the two tables carry different name axes
15
+ * — install id vs subcommand alias vs pane binary. Cursor is the clearest
16
+ * case for keeping them apart: the `cursor` install id there means the
17
+ * IDE, while the drivable binary here is `cursor-agent`, its terminal TUI.
16
18
  */
17
19
  const fs_1 = require("fs");
18
20
  const os_1 = require("os");
@@ -198,6 +200,16 @@ const REMOTE_AGENT_TABLE = [
198
200
  binary: 'codex',
199
201
  subcommands: ['codex'],
200
202
  },
203
+ {
204
+ // The pane binary is `cursor-agent`, Cursor's terminal TUI — NOT the
205
+ // bare `cursor` on PATH, which is the IDE launcher script: it opens
206
+ // the app and exits, so a pane started with it dies before the
207
+ // listener can address it.
208
+ kind: 'cursor',
209
+ displayName: 'Cursor CLI',
210
+ binary: 'cursor-agent',
211
+ subcommands: ['cursor', 'cursor-agent'],
212
+ },
201
213
  {
202
214
  kind: 'gemini',
203
215
  displayName: 'Gemini CLI',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeph-to/cli",
3
- "version": "1.26.1",
3
+ "version": "1.27.0",
4
4
  "description": "Zeph CLI + push notification SDK for AI agents",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",