@mindstudio-ai/remy 0.1.152 → 0.1.154

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/dist/headless.js CHANGED
@@ -486,18 +486,21 @@ async function* streamChat(params) {
486
486
  })
487
487
  ]);
488
488
  clearTimeout(stallTimer);
489
- } catch {
489
+ } catch (err) {
490
490
  clearTimeout(stallTimer);
491
- await reader.cancel();
492
- log2.error("Stream stalled", {
491
+ try {
492
+ await reader.cancel();
493
+ } catch {
494
+ }
495
+ const isStall = err?.message === "stream_stall";
496
+ const errorMessage = isStall ? "Stream stalled \u2014 no data received for 5 minutes" : `Network error: stream interrupted \u2014 ${err?.message ?? "unknown"}`;
497
+ log2.error(isStall ? "Stream stalled" : "Stream interrupted", {
493
498
  requestId,
494
499
  ...subAgentId && { subAgentId },
495
- durationMs: Date.now() - startTime
500
+ durationMs: Date.now() - startTime,
501
+ error: errorMessage
496
502
  });
497
- yield {
498
- type: "error",
499
- error: "Stream stalled \u2014 no data received for 5 minutes"
500
- };
503
+ yield { type: "error", error: errorMessage };
501
504
  return;
502
505
  }
503
506
  const { done, value } = readResult;
@@ -1322,7 +1325,7 @@ var writePlanTool = {
1322
1325
  clearable: false,
1323
1326
  definition: {
1324
1327
  name: "writePlan",
1325
- description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons, so write only the plan itself \u2014 no conversational text, no 'what do you think?', no next-steps narration. Say those things in your chat message instead. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
1328
+ description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached; the plan content itself is just the substantive sections and ends when those do. Any wrap-up to the user \u2014 sign-offs, prompts for approval, offers to revise \u2014 belongs in your chat message alongside the plan, not inside it. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
1326
1329
  inputSchema: {
1327
1330
  type: "object",
1328
1331
  properties: {
@@ -6054,21 +6057,7 @@ function resolveUniqueFilename(name) {
6054
6057
  }
6055
6058
  return `${base}-${counter}${ext}`;
6056
6059
  }
6057
- var IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([
6058
- ".png",
6059
- ".jpg",
6060
- ".jpeg",
6061
- ".gif",
6062
- ".webp",
6063
- ".svg",
6064
- ".bmp",
6065
- ".ico",
6066
- ".tiff",
6067
- ".tif",
6068
- ".avif",
6069
- ".heic",
6070
- ".heif"
6071
- ]);
6060
+ var IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp"]);
6072
6061
  function isImageAttachment(att) {
6073
6062
  const name = att.filename || filenameFromUrl(att.url);
6074
6063
  return IMAGE_EXTENSIONS.has(extname(name).toLowerCase());
@@ -6778,7 +6767,6 @@ ${userMessage}` : header;
6778
6767
  requestId,
6779
6768
  error: err.message
6780
6769
  });
6781
- this.queue.drain();
6782
6770
  }
6783
6771
  this.applyPendingSummaries();
6784
6772
  this.applyPendingBlockUpdates();
package/dist/index.js CHANGED
@@ -171,18 +171,21 @@ async function* streamChat(params) {
171
171
  })
172
172
  ]);
173
173
  clearTimeout(stallTimer);
174
- } catch {
174
+ } catch (err) {
175
175
  clearTimeout(stallTimer);
176
- await reader.cancel();
177
- log.error("Stream stalled", {
176
+ try {
177
+ await reader.cancel();
178
+ } catch {
179
+ }
180
+ const isStall = err?.message === "stream_stall";
181
+ const errorMessage = isStall ? "Stream stalled \u2014 no data received for 5 minutes" : `Network error: stream interrupted \u2014 ${err?.message ?? "unknown"}`;
182
+ log.error(isStall ? "Stream stalled" : "Stream interrupted", {
178
183
  requestId,
179
184
  ...subAgentId && { subAgentId },
180
- durationMs: Date.now() - startTime
185
+ durationMs: Date.now() - startTime,
186
+ error: errorMessage
181
187
  });
182
- yield {
183
- type: "error",
184
- error: "Stream stalled \u2014 no data received for 5 minutes"
185
- };
188
+ yield { type: "error", error: errorMessage };
186
189
  return;
187
190
  }
188
191
  const { done, value } = readResult;
@@ -834,7 +837,7 @@ var init_writePlan = __esm({
834
837
  clearable: false,
835
838
  definition: {
836
839
  name: "writePlan",
837
- description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons, so write only the plan itself \u2014 no conversational text, no 'what do you think?', no next-steps narration. Say those things in your chat message instead. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
840
+ description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached; the plan content itself is just the substantive sections and ends when those do. Any wrap-up to the user \u2014 sign-offs, prompts for approval, offers to revise \u2014 belongs in your chat message alongside the plan, not inside it. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
838
841
  inputSchema: {
839
842
  type: "object",
840
843
  properties: {
@@ -6819,21 +6822,7 @@ var init_attachments = __esm({
6819
6822
  init_logger();
6820
6823
  log11 = createLogger("headless:attachments");
6821
6824
  UPLOADS_DIR = "src/.user-uploads";
6822
- IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([
6823
- ".png",
6824
- ".jpg",
6825
- ".jpeg",
6826
- ".gif",
6827
- ".webp",
6828
- ".svg",
6829
- ".bmp",
6830
- ".ico",
6831
- ".tiff",
6832
- ".tif",
6833
- ".avif",
6834
- ".heic",
6835
- ".heif"
6836
- ]);
6825
+ IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp"]);
6837
6826
  }
6838
6827
  });
6839
6828
 
@@ -7513,7 +7502,6 @@ ${userMessage}` : header;
7513
7502
  requestId,
7514
7503
  error: err.message
7515
7504
  });
7516
- this.queue.drain();
7517
7505
  }
7518
7506
  this.applyPendingSummaries();
7519
7507
  this.applyPendingBlockUpdates();
@@ -35,7 +35,7 @@ You will occasionally receive automated messages prefixed with `@@automated_mess
35
35
 
36
36
  ## Style
37
37
  - Your messages are rendered as markdown. Use formatting (headers, bold, lists, code blocks) when it helps readability. You can include images using `![alt](url)` — use this to show the user screenshots, generated images, or other visual references inline in your messages.
38
- - When offering suggestions or options the user might want to quickly select in a conversation, format them as clickable suggestion links: `[suggestion text](suggest:suggestion text)`. These render as clickable chips in the UI. When clicked, the suggestion text is sent as the user's next message. Use these liberally: when brainstorming, offering directions, listing options, or any time you're asking a question the user could answer with a quick tap. When explicitly gathering information from the user, however, always use the `promptUser` tool instead.
38
+ - When offering suggestions or options the user might want to quickly select in a conversation, format them as clickable suggestion links: `[label](suggest:message sent on click)`. The label renders as a tappable chip and should be a few words — chip-sized, not sentence-sized. The `suggest:` payload can be longer; that's what gets sent as the user's next message when clicked. Use these liberally: when brainstorming, offering directions, listing options, or any time you're asking a question the user could answer with a quick tap. When explicitly gathering information from the user, however, always use the `promptUser` tool instead.
39
39
  - Keep language accessible. Describe what the app *does*, not how it's implemented, unless the user demonstrates technical fluency.
40
40
  - Always use full paths relative to the project root when mentioning files (`dist/interfaces/web/src/App.tsx`, not `App.tsx`). Paths will be rendered as clickable links for the user.
41
41
  - Use inline `code` formatting only for things the user needs to type or search for.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.152",
3
+ "version": "0.1.154",
4
4
  "description": "MindStudio coding agent",
5
5
  "repository": {
6
6
  "type": "git",