@mindstudio-ai/remy 0.1.196 → 0.1.197
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 +9 -0
- package/dist/headless.d.ts +5 -6
- package/dist/headless.js +20 -23
- package/dist/index.js +20 -23
- package/dist/subagents/browserAutomation/prompt.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -323,6 +323,14 @@ Clear conversation history and delete the session file.
|
|
|
323
323
|
{"action": "clear", "requestId": "r4"}
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
+
#### `changeModels`
|
|
327
|
+
|
|
328
|
+
Change per-agent model picks **without** clearing history. `models` is a sparse map keyed by agent identifier (`parent`, `visualDesignExpert`, …); omit it (or send `{}`) to reset every agent to server defaults. Takes effect on the next turn. Rejected with `completed(success:false, error:"cannot change models while a turn is running")` if a turn is in flight — cancel first, then retry. Responds with `models_changed`. To start a fresh conversation on a different model, send `clear` then `changeModels`.
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{"action": "changeModels", "requestId": "r5", "models": {"parent": "gemini-3.1-pro"}}
|
|
332
|
+
```
|
|
333
|
+
|
|
326
334
|
### Output Events (stdout)
|
|
327
335
|
|
|
328
336
|
Events are emitted as newline-delimited JSON. Command responses include `requestId`; system events do not.
|
|
@@ -351,6 +359,7 @@ All command responses include the `requestId` from the originating command.
|
|
|
351
359
|
| `error` | `error` | Error message (may precede `completed`) |
|
|
352
360
|
| `history` | `messages` | Response to `get_history` |
|
|
353
361
|
| `session_cleared` | | Response to `clear` |
|
|
362
|
+
| `models_changed` | `models?`, `modelSurfaces`, `allowedModelsByType` | Response to `changeModels` |
|
|
354
363
|
| `completed` | `success`, `error?` | Terminal event — exactly one per command |
|
|
355
364
|
|
|
356
365
|
#### Example Session
|
package/dist/headless.d.ts
CHANGED
|
@@ -131,12 +131,11 @@ declare class HeadlessSession {
|
|
|
131
131
|
*/
|
|
132
132
|
private kickDrain;
|
|
133
133
|
private handleClear;
|
|
134
|
-
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
private handleNewSession;
|
|
134
|
+
/** Change per-agent model picks without clearing history. Takes effect on
|
|
135
|
+
* the next turn — the model is resolved live, per LLM call, from
|
|
136
|
+
* `state.models`. Omitting `models` (or sending an empty object) resets
|
|
137
|
+
* every agent to "use server defaults". */
|
|
138
|
+
private handleChangeModels;
|
|
140
139
|
/** Cancel the running turn and drain the queue. Returns the drained items. */
|
|
141
140
|
private handleCancel;
|
|
142
141
|
private handleStdinLine;
|
package/dist/headless.js
CHANGED
|
@@ -2940,15 +2940,6 @@ ${content}` : attachmentHeader;
|
|
|
2940
2940
|
const blocks = msg.content;
|
|
2941
2941
|
const text = blocks.filter((b) => b.type === "text").map((b) => b.text).join("");
|
|
2942
2942
|
const toolCalls = blocks.filter((b) => b.type === "tool").map((b) => ({ id: b.id, name: b.name, input: b.input }));
|
|
2943
|
-
const thinking = blocks.filter(
|
|
2944
|
-
(b) => b.type === "thinking" || b.type === "redacted_thinking"
|
|
2945
|
-
).map(
|
|
2946
|
-
(b) => b.type === "thinking" ? {
|
|
2947
|
-
type: "thinking",
|
|
2948
|
-
thinking: b.thinking,
|
|
2949
|
-
signature: b.signature
|
|
2950
|
-
} : { type: "redacted_thinking", data: b.data }
|
|
2951
|
-
);
|
|
2952
2943
|
const cleaned2 = {
|
|
2953
2944
|
role: msg.role,
|
|
2954
2945
|
content: text
|
|
@@ -2956,9 +2947,6 @@ ${content}` : attachmentHeader;
|
|
|
2956
2947
|
if (toolCalls.length > 0) {
|
|
2957
2948
|
cleaned2.toolCalls = toolCalls;
|
|
2958
2949
|
}
|
|
2959
|
-
if (thinking.length > 0) {
|
|
2960
|
-
cleaned2.thinking = thinking;
|
|
2961
|
-
}
|
|
2962
2950
|
if (msg.providerMetadata) {
|
|
2963
2951
|
cleaned2.providerMetadata = msg.providerMetadata;
|
|
2964
2952
|
}
|
|
@@ -3430,7 +3418,7 @@ var BROWSER_TOOLS = [
|
|
|
3430
3418
|
{
|
|
3431
3419
|
clearable: true,
|
|
3432
3420
|
name: "browserCommand",
|
|
3433
|
-
description: "Interact with the app's live preview by sending browser commands. Commands execute sequentially with an animated cursor. Always start with a snapshot to see the current state and get ref identifiers. The result includes a snapshot field with the final page state after all steps complete. On error, the failing step has an error field and execution stops. Batches that contain an interactive step (click, type, select) also return a `
|
|
3421
|
+
description: "Interact with the app's live preview by sending browser commands. Commands execute sequentially with an animated cursor. Always start with a snapshot to see the current state and get ref identifiers. The result includes a snapshot field with the final page state after all steps complete. On error, the failing step has an error field and execution stops. Batches that contain an interactive step (click, type, select) also return a `recording` object \u2014 one chunk of a continuous per-session rrweb recording that the viewer stitches into a single replay (not a standalone per-call clip). Timeout: 120s.",
|
|
3434
3422
|
inputSchema: {
|
|
3435
3423
|
type: "object",
|
|
3436
3424
|
properties: {
|
|
@@ -7867,13 +7855,11 @@ var HeadlessSession = class {
|
|
|
7867
7855
|
clearSession(this.state);
|
|
7868
7856
|
return {};
|
|
7869
7857
|
}
|
|
7870
|
-
/**
|
|
7871
|
-
*
|
|
7872
|
-
*
|
|
7873
|
-
*
|
|
7874
|
-
|
|
7875
|
-
handleNewSession(models) {
|
|
7876
|
-
clearSession(this.state);
|
|
7858
|
+
/** Change per-agent model picks without clearing history. Takes effect on
|
|
7859
|
+
* the next turn — the model is resolved live, per LLM call, from
|
|
7860
|
+
* `state.models`. Omitting `models` (or sending an empty object) resets
|
|
7861
|
+
* every agent to "use server defaults". */
|
|
7862
|
+
handleChangeModels(models) {
|
|
7877
7863
|
this.state.models = models && Object.keys(models).length > 0 ? models : void 0;
|
|
7878
7864
|
saveSession(this.state);
|
|
7879
7865
|
return {
|
|
@@ -7970,12 +7956,23 @@ var HeadlessSession = class {
|
|
|
7970
7956
|
);
|
|
7971
7957
|
return;
|
|
7972
7958
|
}
|
|
7973
|
-
if (action === "
|
|
7959
|
+
if (action === "changeModels") {
|
|
7960
|
+
if (this.running) {
|
|
7961
|
+
this.emit(
|
|
7962
|
+
"completed",
|
|
7963
|
+
{
|
|
7964
|
+
success: false,
|
|
7965
|
+
error: "cannot change models while a turn is running"
|
|
7966
|
+
},
|
|
7967
|
+
requestId
|
|
7968
|
+
);
|
|
7969
|
+
return;
|
|
7970
|
+
}
|
|
7974
7971
|
const models = parsed.models;
|
|
7975
7972
|
this.dispatchSimple(
|
|
7976
7973
|
requestId,
|
|
7977
|
-
"
|
|
7978
|
-
() => this.
|
|
7974
|
+
"models_changed",
|
|
7975
|
+
() => this.handleChangeModels(models)
|
|
7979
7976
|
);
|
|
7980
7977
|
return;
|
|
7981
7978
|
}
|
package/dist/index.js
CHANGED
|
@@ -3667,15 +3667,6 @@ ${content}` : attachmentHeader;
|
|
|
3667
3667
|
const blocks = msg.content;
|
|
3668
3668
|
const text = blocks.filter((b) => b.type === "text").map((b) => b.text).join("");
|
|
3669
3669
|
const toolCalls = blocks.filter((b) => b.type === "tool").map((b) => ({ id: b.id, name: b.name, input: b.input }));
|
|
3670
|
-
const thinking = blocks.filter(
|
|
3671
|
-
(b) => b.type === "thinking" || b.type === "redacted_thinking"
|
|
3672
|
-
).map(
|
|
3673
|
-
(b) => b.type === "thinking" ? {
|
|
3674
|
-
type: "thinking",
|
|
3675
|
-
thinking: b.thinking,
|
|
3676
|
-
signature: b.signature
|
|
3677
|
-
} : { type: "redacted_thinking", data: b.data }
|
|
3678
|
-
);
|
|
3679
3670
|
const cleaned2 = {
|
|
3680
3671
|
role: msg.role,
|
|
3681
3672
|
content: text
|
|
@@ -3683,9 +3674,6 @@ ${content}` : attachmentHeader;
|
|
|
3683
3674
|
if (toolCalls.length > 0) {
|
|
3684
3675
|
cleaned2.toolCalls = toolCalls;
|
|
3685
3676
|
}
|
|
3686
|
-
if (thinking.length > 0) {
|
|
3687
|
-
cleaned2.thinking = thinking;
|
|
3688
|
-
}
|
|
3689
3677
|
if (msg.providerMetadata) {
|
|
3690
3678
|
cleaned2.providerMetadata = msg.providerMetadata;
|
|
3691
3679
|
}
|
|
@@ -4179,7 +4167,7 @@ var init_tools = __esm({
|
|
|
4179
4167
|
{
|
|
4180
4168
|
clearable: true,
|
|
4181
4169
|
name: "browserCommand",
|
|
4182
|
-
description: "Interact with the app's live preview by sending browser commands. Commands execute sequentially with an animated cursor. Always start with a snapshot to see the current state and get ref identifiers. The result includes a snapshot field with the final page state after all steps complete. On error, the failing step has an error field and execution stops. Batches that contain an interactive step (click, type, select) also return a `
|
|
4170
|
+
description: "Interact with the app's live preview by sending browser commands. Commands execute sequentially with an animated cursor. Always start with a snapshot to see the current state and get ref identifiers. The result includes a snapshot field with the final page state after all steps complete. On error, the failing step has an error field and execution stops. Batches that contain an interactive step (click, type, select) also return a `recording` object \u2014 one chunk of a continuous per-session rrweb recording that the viewer stitches into a single replay (not a standalone per-call clip). Timeout: 120s.",
|
|
4183
4171
|
inputSchema: {
|
|
4184
4172
|
type: "object",
|
|
4185
4173
|
properties: {
|
|
@@ -8659,13 +8647,11 @@ var init_headless = __esm({
|
|
|
8659
8647
|
clearSession(this.state);
|
|
8660
8648
|
return {};
|
|
8661
8649
|
}
|
|
8662
|
-
/**
|
|
8663
|
-
*
|
|
8664
|
-
*
|
|
8665
|
-
*
|
|
8666
|
-
|
|
8667
|
-
handleNewSession(models) {
|
|
8668
|
-
clearSession(this.state);
|
|
8650
|
+
/** Change per-agent model picks without clearing history. Takes effect on
|
|
8651
|
+
* the next turn — the model is resolved live, per LLM call, from
|
|
8652
|
+
* `state.models`. Omitting `models` (or sending an empty object) resets
|
|
8653
|
+
* every agent to "use server defaults". */
|
|
8654
|
+
handleChangeModels(models) {
|
|
8669
8655
|
this.state.models = models && Object.keys(models).length > 0 ? models : void 0;
|
|
8670
8656
|
saveSession(this.state);
|
|
8671
8657
|
return {
|
|
@@ -8762,12 +8748,23 @@ var init_headless = __esm({
|
|
|
8762
8748
|
);
|
|
8763
8749
|
return;
|
|
8764
8750
|
}
|
|
8765
|
-
if (action === "
|
|
8751
|
+
if (action === "changeModels") {
|
|
8752
|
+
if (this.running) {
|
|
8753
|
+
this.emit(
|
|
8754
|
+
"completed",
|
|
8755
|
+
{
|
|
8756
|
+
success: false,
|
|
8757
|
+
error: "cannot change models while a turn is running"
|
|
8758
|
+
},
|
|
8759
|
+
requestId
|
|
8760
|
+
);
|
|
8761
|
+
return;
|
|
8762
|
+
}
|
|
8766
8763
|
const models = parsed.models;
|
|
8767
8764
|
this.dispatchSimple(
|
|
8768
8765
|
requestId,
|
|
8769
|
-
"
|
|
8770
|
-
() => this.
|
|
8766
|
+
"models_changed",
|
|
8767
|
+
() => this.handleChangeModels(models)
|
|
8771
8768
|
);
|
|
8772
8769
|
return;
|
|
8773
8770
|
}
|
|
@@ -62,7 +62,7 @@ Each browserCommand returns:
|
|
|
62
62
|
- `snapshot`: the final page state after all steps complete (always present, even without an explicit snapshot step)
|
|
63
63
|
- `logs`: array of browser-side events that fired during the batch (console output, network failures, JS errors, user interactions). Check this for errors before reporting pass.
|
|
64
64
|
- `duration`: total execution time in ms
|
|
65
|
-
- `
|
|
65
|
+
- `recording` (optional): metadata for an rrweb session recording, present whenever the batch contained an interactive step (click, type, select). Each call returns one chunk of a continuous per-session recording (the viewer stitches chunks by `sessionId`/`seq` into a single replay) — it's not a standalone clip. Note in your failure reports that a recording is available so the main agent can surface it.
|
|
66
66
|
|
|
67
67
|
On error, the failing step has an `error` field and execution stops. Remaining steps are skipped.
|
|
68
68
|
|