mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-03 22:12:01 +09:00
* feat(phone-host): chat view for Claude Code and Codex tabs (1.1.0) Agent tabs now carry agentStatus.providerSession, and the host serves nativeChat.readSession / subscribe / unsubscribe from the agent's own transcript, confined to sessions this host started. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(phone-host): send Enter after the paste settles, so Codex submits chat messages Text and Enter in one PTY write reach a TUI agent as a paste; Codex then keeps the Enter in its input box. Write the text, wait Orca's submit delay (500 ms plus paste ingest time), then Enter. Sends to one terminal are queued so a later keystroke cannot overtake the delayed Enter. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(phone-host): report Claude/Codex turns as working or done, so the chat shows Stop Tab rows now carry a live agentStatus.state folded from the session transcript (chat-status.mjs): a prompt or Codex task_started reads "working", end_turn or task_complete reads "done", and Claude's interrupt notice or Codex turn_aborted reads "done" with interrupted. The phone shows its Stop button on "working"; Stop is two Escapes through terminal.send, which both agents honour. If the agent is no longer the terminal's foreground process, the tab reads done, so a turn left open by a crash never offers Stop into a bare shell. Also reports the model each agent names and the latest prompt. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(phone-host): files.searchPaths, files.list and files.readDir for full-access phones The chat composer's @-file picker asks files.searchPaths (falling back to files.list), and the Files tab browses with files.readDir. Shapes and ranking follow Orca. Names only, never contents. The inventory is git ls-files (tracked plus untracked-not-ignored, fsmonitor off), so node_modules and other ignored trees stay out; capped at 20,000 paths with a 30 s cache. readDir takes a relative path with no root, drive, empty, "." or ".." segment, resolves it with realpath inside the workspace's real path, never lists .git, and reports a symlink that points out of the workspace as a plain entry. Read-only phones still get method_not_found. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(phone-host): saved quick commands, and agent tabs that start with a prompt settings.getTerminalQuickCommands / updateTerminalQuickCommands back the phone's quick commands sheet. Rows are normalized exactly as Orca does (the phone rejects the whole list otherwise), one upsert or delete per update, strict keys, Orca's limits (40 commands, 4000-char command, 6000-char prompt), saved atomically to quick-commands.json (0600) in the host's state directory. Running an agent-prompt quick command opens a Claude or Codex tab with agentPrompt. Following Orca's argv injection, the prompt is one quoted argument after the fixed agent command: control characters are dropped and a leading "-" is padded so it can never be read as an option. Other agents refuse a prompt. Read-only phones still get method_not_found. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(phone-host): terminal.rename and terminal.setDisplayMode Renaming a tab from the phone's tab strip now sticks: the title is stripped of control characters, capped at 200 and published to every subscribed phone; an empty or null title restores the tab's own name. setDisplayMode 'desktop' keeps the terminal at its size (phone viewport updates no longer resize it), and 'auto' hands sizing back to the phone. Co-Authored-By: RuFlo <ruv@ruv.net> * test(phone-host): chat controls end to end over the E2EE phone client; document them A fake claude on PATH (raw-mode stdin, argv recorded) checks over a real paired connection: working -> Stop (two Escapes) -> done and interrupted; the @-file picker and readDir confinement (.., absolute, .git, a symlink out, node_modules ignored); quick commands saved 0600 and rejected when malformed; a quick-command prompt with quotes, $(), backticks, a newline and a leading "-" arrives as one argument and runs nothing; rename and display mode; and method_not_found for every new method on a read-only phone. README "What a phone can do" and NOTICE cover the new methods. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(phone-host): pass a quick command's agent prompt through the environment A prompt typed into the new shell lands while the tty is still in canonical mode, which cuts a line at about 4 KB. A 5000-character prompt lost its closing quote and left the shell at a continuation prompt, so the agent never started and the next keystrokes went to the shell. The prompt now rides in RUFLO_PHONE_AGENT_PROMPT and the typed line ends in "$RUFLO_PHONE_AGENT_PROMPT", so it is one argument whatever its length or content, and the shell never parses it. Non-POSIX shells refuse a prompt. Checked with /bin/sh and bash for 5000 ASCII and 6000 non-ASCII characters. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(phone-host): a Claude slash-command turn reads as working The turn lifecycle skips a slash command's prompt line as harness text (<command-name>/init</command-name>), so the whole turn folded as done and the phone never offered Stop. A Claude tool call (a tool_use block or stop_reason tool_use) now opens the turn, unless the last turn was interrupted. Checked against a real transcript with an /init turn. Co-Authored-By: RuFlo <ruv@ruv.net> * ci: keep phone-host's new node:test files out of the root vitest run They run in phone-host.yml with the add-on's own dependencies, like the three already listed. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x>