@mindstudio-ai/remy 0.1.268 → 0.1.270

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
@@ -43,13 +43,13 @@ Remy saves conversation history to `.remy-session.json` in the working directory
43
43
 
44
44
  ## Tools
45
45
 
46
- Tool availability depends on the project's onboarding state, sent by the sandbox on each message.
46
+ The full tool set is always available — it is deliberately invariant (no onboarding-state gating) so the provider's tools-tier cache prefix stays identical across turns and sessions. The sections below are thematic groupings only.
47
47
 
48
- ### Common Tools (all onboarding states)
48
+ ### Common Tools
49
49
 
50
50
  | Tool | Description |
51
51
  |------|-------------|
52
- | `setProjectOnboardingState` | Advance the onboarding flow (intake → initialSpecReviewinitialCodegen → onboardingFinished) |
52
+ | `setProjectOnboardingState` | Advance the onboarding flow (intake → buildingbuildComplete → onboardingFinished) |
53
53
  | `setProjectName` | Set the project name |
54
54
  | `promptUser` | Ask the user structured questions (form or inline display) |
55
55
  | `confirmDestructiveAction` | Confirm a destructive or irreversible action with the user |
@@ -74,8 +74,6 @@ Available in all onboarding states. Used for authoring and editing MSFM specs in
74
74
 
75
75
  ### Code Tools
76
76
 
77
- Available from `initialCodegen` onward.
78
-
79
77
  | Tool | Description |
80
78
  |------|-------------|
81
79
  | `readFile` | Read a file with line numbers |
@@ -100,9 +98,7 @@ Available when `--lsp-url` is passed.
100
98
  | `lspDiagnostics` | Type errors and warnings for a file, with suggested quick fixes |
101
99
  | `restartProcess` | Restart a managed sandbox process (e.g., dev server after npm install) |
102
100
 
103
- ### Post-Onboarding Tools
104
-
105
- Available only when `onboardingState` is `onboardingFinished`.
101
+ ### Development & Publishing Tools
106
102
 
107
103
  | Tool | Description |
108
104
  |------|-------------|
@@ -174,11 +170,7 @@ src/
174
170
  logger.ts Structured logging
175
171
 
176
172
  prompt/
177
- index.ts System prompt builder (onboarding-state-aware)
178
- actions/ Built-in prompts for runCommand actions
179
- sync.md
180
- publish.md
181
- buildFromInitialSpec.md
173
+ index.ts System prompt builder (static prefix + small dynamic tail)
182
174
  static/ Behavioral instruction fragments
183
175
  identity.md
184
176
  intake.md
@@ -187,7 +179,7 @@ src/
187
179
  instructions.md
188
180
  team.md
189
181
  lsp.md
190
- projectContext.ts Reads manifest, spec metadata, file listing at runtime
182
+ projectContext.ts Reads project root, app identity, plan status at runtime
191
183
  compiled/ Platform docs distilled for agent consumption
192
184
  sources/ Prompt source material (hand-maintained)
193
185
 
@@ -267,7 +259,7 @@ The headless IPC protocol uses request correlation and a unified response patter
267
259
  - Messages sent while a turn is running are queued. When the turn ends, all contiguous queued user messages and background results are delivered together as **one merged turn**: the first queued message's `requestId` becomes the turn's primary id (stamped on `turn_started` and all streaming events), each absorbed message echoes its own `user_message` with its original `requestId` and `queued: true`, and at turn end the primary `completed` is emitted first, followed immediately by one `completed {…same outcome, absorbed: true}` per other absorbed `requestId`. Automated-action (`@@automated::…@@`) messages and chain steps never merge — they always run one turn each.
268
260
  - A queued **user** message can be promoted to ASAP delivery via `setQueuedDelivery`. ASAP items are pulled into the **running** turn at its next tool boundary (injected as plain user messages — no abort, no restart), echo `user_message` with `queued: true` and their own `requestId`, and get a `{…, absorbed: true}` completed with the turn's outcome at turn end. Promotion deliberately jumps ahead of anything else in the queue, including chain steps. If the turn ends before injection, the tag is ignored and the item drains in normal FIFO order.
269
261
  - Background tool completions have three delivery classes (per-tool `backgroundNotify` on the tool definition). `wake` (default): the result is queued as a `background_results` message and may start a turn when the agent is idle. `passive` (e.g. `specSync`): the result never enters the queue and never wakes the agent — it parks in a persisted holding pen and rides the next real turn as a hidden `background_results` entry (so it never appears in `queuedMessages`, never affects queue-derived busy state, and never triggers resume-on-restart). `silent` (e.g. `compactConversation`): the tool block is updated for the UI and the model is never told — its outcome reaches the model by another mechanism. All classes emit `tool_background_complete` immediately. `specSync` also takes a `refreshBuildOverview` flag (set post-deploy / post-milestone, prompted via the publish flow): the run gains the `writeBuildOverview` tool and re-authors the Build Overview from the freshly-reconciled spec — the design-expert render runs foreground within specSync's already-detached run, never nested-background.
270
- - Compaction lifecycle rides `compaction_started {blocking}` / `compaction_complete {error?}` system events. Every compaction also renders as a normal `compactConversation` tool call: the model-invoked tool has its own block, and user (`/compact`) or gate-initiated compactions get a **synthesized UI-only tool block** in history (standard `tool_start {background: true}` `tool_background_complete` lifecycle; the summary lands in the block's `backgroundResult`, and the block is excluded from every API payload — the model receives the summary via the checkpoint prefix instead). Every turn passes a **compaction gate**: it waits for any in-flight compaction and applies the finished checkpoint before running, so no turn ever bills at the uncompacted context. Messages received while a compaction is in flight are queued exactly like mid-turn messages (they appear in `queuedMessages` and drain — with merged-turn semantics — when the compaction completes, on success and failure alike). A `compact` command received **mid-turn** queues too: it's acked immediately with `completed {success: true, queued: true}` (duplicate clicks coalesce onto the queued item), appears in `queuedMessages` as a removable `@@automated::compact@@` user item, and runs as its own drain step when the turn ends — everything queued behind it runs against the compacted history.
262
+ - Compaction lifecycle rides `compaction_started {blocking}` / `compaction_complete {error?}` system events. Every compaction also renders as a normal `compactConversation` tool call. The **model-invoked** tool is a real background tool (its block completes via `tool_background_complete`; the summary lands in `backgroundResult`). User (`/compact`) and gate-initiated compactions instead get a **synthesized UI-only foreground block** in history the user is actively waiting on these, so they follow the normal foreground lifecycle: `tool_start` with no result, then a (late) `tool_done {result, isError}` carrying the summary or the error when the compaction finishes. Either way the block is excluded from every API payload — the model receives the summary via the checkpoint prefix instead. Every turn passes a **compaction gate**: it waits for any in-flight compaction and applies the finished checkpoint before running, so no turn ever bills at the uncompacted context. Messages received while a compaction is in flight are queued exactly like mid-turn messages (they appear in `queuedMessages` and drain — with merged-turn semantics — when the compaction completes, on success and failure alike). A `compact` command received **mid-turn** queues too: it's acked immediately with `completed {success: true, queued: true}` (duplicate clicks coalesce onto the queued item), appears in `queuedMessages` as a removable `@@automated::compact@@` user item, and runs as its own drain step when the turn ends — everything queued behind it runs against the compacted history.
271
263
  - The caller distinguishes command responses from system events with a single check: `if (msg.requestId)`
272
264
 
273
265
  This enables a simple promise-based RPC layer: send a command with a unique ID, store a pending promise keyed by that ID, resolve it when you see `completed` with the matching ID.
@@ -287,8 +279,7 @@ Send a user message to the agent.
287
279
  Fields:
288
280
  - `requestId` — caller-provided correlation ID (echoed on all response events)
289
281
  - `text` — the user message (required unless `runCommand` is set)
290
- - `onboardingState` — controls tool availability and prompt context. One of: `intake`, `initialSpecAuthoring`, `initialCodegen`, `onboardingFinished` (default: `onboardingFinished`)
291
- - `viewContext` — `{ mode, openFiles?, activeFile? }` for prompt context
282
+ - `onboardingState` — the project's onboarding phase, reflected in the system prompt's dynamic tail and plan-status behavior. One of: `intake`, `building`, `buildComplete`, `onboardingFinished` (default: `onboardingFinished`)
292
283
  - `attachments` — array of `{ url, extractedTextUrl? }` for file attachments
293
284
  - `runCommand` — triggers a built-in action prompt (`"sync"`, `"publish"`, `"buildFromInitialSpec"`)
294
285
 
@@ -379,7 +370,8 @@ All command responses include the `requestId` from the originating command.
379
370
  | `user_message` | `text`, `attachments?`, `queued?`, `hidden?` | Echo of a user message entering the turn. Queue-delivered messages (including ASAP items injected mid-turn) carry `queued: true` and their own original `requestId` (a merged turn emits one per absorbed message); idle sends echo with the turn's requestId and no `queued` flag. `hidden: true` marks internal entries (e.g. passive background results) that should not render. |
380
371
  | `tool_start` | `id`, `name`, `input`, `partial?`, `parentToolId?` | Tool execution started. `partial: true` means more `tool_start` events will follow for this id (progressive input streaming). |
381
372
  | `tool_input_delta` | `id`, `name`, `result`, `parentToolId?` | Progressive tool content (streaming tools only) |
382
- | `tool_done` | `id`, `name`, `result`, `isError`, `parentToolId?` | Tool execution completed |
373
+ | `tool_done` | `id`, `name`, `result`, `isError`, `parentToolId?` | Tool execution completed. For a background tool this carries the synchronous ack; for a synthesized user/gate compaction block it arrives late, when the compaction finishes, carrying the summary (or error). |
374
+ | `tool_background_complete` | `id`, `name`, `result`, `parentToolId?` | A background tool's detached work finished; `result` belongs in the block's `backgroundResult`. Emitted for all `backgroundNotify` classes. |
383
375
  | `status` | `message` | Contextual status label (e.g., "Writing files...") |
384
376
  | `error` | `error` | Error message (may precede `completed`) |
385
377
  | `history` | `messages` | Response to `get_history` |