@mindstudio-ai/remy 0.1.341 → 0.1.342

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 (4) hide show
  1. package/README.md +14 -26
  2. package/dist/headless.js +179 -197
  3. package/dist/index.js +8672 -10122
  4. package/package.json +2 -7
package/README.md CHANGED
@@ -2,19 +2,21 @@
2
2
 
3
3
  A spec-building and coding agent for building apps.
4
4
 
5
- Remy helps users design, spec, build, and iterate on app projects. It runs locally in a terminal or as a headless subprocess in the sandbox. It has tools for reading/writing specs and code, running shell commands, searching code, prompting users with structured forms, and (in the sandbox) TypeScript language server integration. LLM calls are routed through the Remy platform for billing and model routing.
5
+ Remy helps users design, spec, build, and iterate on app projects. It runs as a subprocess of the sandbox, driven over a stdin/stdout JSON protocol — the editor is the user interface. It has tools for reading/writing specs and code, running shell commands, searching code, prompting users with structured forms, and (in the sandbox) TypeScript language server integration. LLM calls are routed through the Remy platform for billing and model routing.
6
6
 
7
7
  ## Quick Start
8
8
 
9
+ Remy is normally spawned by the sandbox, not launched by hand. To drive it directly — for protocol work or debugging — run it in a project directory and write JSON actions to its stdin:
10
+
9
11
  ```bash
10
12
  # Make sure you're logged in (shares credentials with @mindstudio-ai/agent)
11
13
  mindstudio login
12
14
 
13
- # Navigate to your project
14
15
  cd my-app
16
+ npx remy --log-level debug
15
17
 
16
- # Run remy
17
- npx remy
18
+ # then, on stdin:
19
+ {"action":"message","requestId":"r1","text":"add a settings page"}
18
20
  ```
19
21
 
20
22
  ## Usage
@@ -26,20 +28,15 @@ Options:
26
28
  --api-key <key> API key (overrides env/config)
27
29
  --base-url <url> Platform API base URL
28
30
  --model <id> Model ID (defaults to org's default model)
29
- --headless Run in headless mode (stdin/stdout JSON protocol)
30
31
  --lsp-url <url> LSP sidecar URL (enables LSP tools when set)
32
+ --log-level <lvl> error | warn | info | debug (default: info)
31
33
  ```
32
34
 
33
- ### Slash Commands
34
-
35
- | Command | Description |
36
- |---------|-------------|
37
- | `/clear` | Clear conversation history and start a fresh session |
38
- | `Escape` | Cancel the current turn (while agent is running) |
35
+ There is one mode. Remy speaks the stdin/stdout JSON protocol described under [Headless Mode](#headless-mode) and has no interactive terminal surface — the editor is the front end. Unrecognized flags are ignored, so the `--headless` that older callers pass is harmless.
39
36
 
40
37
  ### Session Persistence
41
38
 
42
- Remy saves conversation history to `.remy-session.json` in the working directory after each turn and before blocking on external tools. On restart, it picks up where you left off. Use `/clear` to start fresh.
39
+ Remy saves conversation history to `.remy-session.json` in the working directory after each turn and before blocking on external tools. On restart, it picks up where you left off. Send the `clear` action to start fresh.
43
40
 
44
41
  ## Tools
45
42
 
@@ -130,7 +127,7 @@ User input
130
127
  → Save session to .remy-session.json
131
128
  ```
132
129
 
133
- The agent core (`src/agent.ts`) is a pure async function with no UI dependencies. The TUI (`src/tui/`) is an Ink + React layer on top. Headless mode (`src/headless.ts`) provides the same agent over a stdin/stdout JSON protocol for the sandbox.
130
+ The agent core (`src/agent.ts`) is a pure async function with no UI dependencies, and `src/headless/` is its single caller: it owns the session, the message queue, and the stdin/stdout JSON protocol the sandbox drives. `runTurn` requires its callbacks (`onEvent`, `resolveExternalTool`, `toolRegistry`, `takeSteering`, `onBackgroundComplete`) rather than accepting them optionally — a surface wired up halfway used to get local stubs for the external tools, which answered "approved" on the user's behalf.
134
131
 
135
132
  ### Sub-Agents
136
133
 
@@ -158,11 +155,11 @@ Some tools are resolved by the sandbox rather than executed locally. Remy emits
158
155
 
159
156
  ```
160
157
  src/
161
- index.tsx CLI entry point
158
+ index.ts CLI entry point — flags, then the headless session
162
159
  agent.ts Core tool-call loop (pure async, no UI)
163
160
  api.ts SSE streaming client for platform API
164
161
  types.ts Shared types (AgentEvent, StdinCommand, etc.)
165
- headless.ts stdin/stdout JSON protocol for sandbox
162
+ headless/ stdin/stdout JSON protocol for sandbox
166
163
  session.ts .remy-session.json persistence
167
164
  config.ts API key/URL resolution
168
165
  errors.ts Friendly error message mapping
@@ -230,13 +227,6 @@ src/
230
227
  productVision/ Product roadmap manager
231
228
  codeSanityCheck/ Architecture sanity checker
232
229
  browserAutomation/ Automated browser testing
233
-
234
- tui/ Interactive terminal UI (Ink + React)
235
- App.tsx
236
- InputPrompt.tsx
237
- MessageList.tsx
238
- ThinkingBlock.tsx
239
- ToolCall.tsx
240
230
  ```
241
231
 
242
232
  ### Project Instructions
@@ -247,7 +237,7 @@ Remy automatically loads project-level agent instructions on startup. It checks
247
237
 
248
238
  ## Headless Mode
249
239
 
250
- Run `remy --headless` for programmatic control via newline-delimited JSON. This is how the sandbox C&C server runs remy as a managed child process.
240
+ Remy is controlled entirely through newline-delimited JSON on stdin/stdout. This is how the sandbox C&C server runs it as a managed child process, and there is no other mode. Stdout is reserved for protocol traffic; everything else goes to stderr.
251
241
 
252
242
  ### Protocol Overview
253
243
 
@@ -399,9 +389,7 @@ All command responses include the `requestId` from the originating command.
399
389
 
400
390
  ### Logging
401
391
 
402
- In headless mode, structured logs go to **stderr**. Stdout is reserved for the JSON protocol. Log levels: `error`, `warn`, `info`, `debug`.
403
-
404
- In interactive mode, logs go to `.remy-debug.log` in the working directory (default level: `error`). Override with `--log-level`.
392
+ Structured NDJSON logs go to **stderr**; stdout is reserved for the JSON protocol. Levels are `error`, `warn`, `info`, `debug`, defaulting to `info` and overridable with `--log-level`. The first line of every run is a `startup` record — version, node, platform, cwd, base URL, and where the API key came from — which is the first thing to read in a debug bundle.
405
393
 
406
394
  ## Design Data Dev Tool
407
395