@mindstudio-ai/remy 0.1.5 → 0.1.7

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.
@@ -23,6 +23,55 @@ everywhere. This makes the design easy to update later without hunting
23
23
  through components. Keep it simple: a handful of CSS variables for colors
24
24
  and a few reusable text style classes or utilities for typography.
25
25
 
26
+ **When these blocks are present, always use the defined fonts and colors in
27
+ generated code.** Do not pick your own fonts or colors when the spec defines
28
+ them. Reference colors semantically (as CSS variables or named constants)
29
+ rather than scattering raw hex values through the codebase.
30
+
31
+ ### Colors block format
32
+
33
+ A `` ```colors `` fenced block declares named colors with hex values and
34
+ descriptions. Each color has a capitalized name, a `value`, and a
35
+ `description`:
36
+
37
+ ```
38
+ Background:
39
+ value: "#0A0A0A"
40
+ description: Page background
41
+ Primary:
42
+ value: "#3B82F6"
43
+ description: Buttons, links, active states
44
+ Text:
45
+ value: "#F5F5F7"
46
+ description: Primary text
47
+ ```
48
+
49
+ ### Typography block format
50
+
51
+ A `` ```typography `` fenced block declares fonts (with source URLs) and
52
+ named type styles:
53
+
54
+ ```
55
+ fonts:
56
+ Cabinet Grotesk:
57
+ src: https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;600;700
58
+
59
+ styles:
60
+ Heading:
61
+ font: Cabinet Grotesk
62
+ size: 28px
63
+ weight: 600
64
+ letterSpacing: -0.02em
65
+ lineHeight: 1.2
66
+ description: Section headings, page titles
67
+ Body:
68
+ font: Cabinet Grotesk
69
+ size: 16px
70
+ weight: 400
71
+ lineHeight: 1.5
72
+ description: Default paragraph text
73
+ ```
74
+
26
75
  ## Be Distinctive
27
76
 
28
77
  AI-generated interfaces tend to converge on the same generic look: safe
package/dist/headless.js CHANGED
@@ -1252,22 +1252,24 @@ var writeFileTool = {
1252
1252
  }
1253
1253
  },
1254
1254
  streaming: /* @__PURE__ */ (() => {
1255
- let lastLineCount = 0;
1255
+ let lastNewlineCount = 0;
1256
1256
  let lastPath = "";
1257
1257
  return {
1258
1258
  transform: async (partial) => {
1259
- if (partial.path !== lastPath) {
1260
- lastLineCount = 0;
1259
+ const newlineCount = partial.content.split("\n").length - 1;
1260
+ if (partial.path !== lastPath || newlineCount < lastNewlineCount) {
1261
+ lastNewlineCount = 0;
1261
1262
  lastPath = partial.path;
1262
1263
  }
1263
- const lines = partial.content.split("\n");
1264
- if (lines.length <= lastLineCount) {
1264
+ if (newlineCount <= lastNewlineCount) {
1265
1265
  return null;
1266
1266
  }
1267
- lastLineCount = lines.length;
1267
+ lastNewlineCount = newlineCount;
1268
+ const lastNewline = partial.content.lastIndexOf("\n");
1269
+ const completeContent = partial.content.substring(0, lastNewline + 1);
1268
1270
  const oldContent = await fs10.readFile(partial.path, "utf-8").catch(() => "");
1269
- return `Writing ${partial.path} (${lines.length} lines)
1270
- ${unifiedDiff(partial.path, oldContent, partial.content)}`;
1271
+ return `Writing ${partial.path} (${newlineCount} lines)
1272
+ ${unifiedDiff(partial.path, oldContent, completeContent)}`;
1271
1273
  }
1272
1274
  };
1273
1275
  })(),
@@ -2071,10 +2073,9 @@ var BROWSER_EXTERNAL_TOOLS = /* @__PURE__ */ new Set(["browserCommand", "screens
2071
2073
  // src/subagents/browserAutomation/prompt.ts
2072
2074
  import fs13 from "fs";
2073
2075
  import path7 from "path";
2074
- var PROMPT_PATH = path7.join(
2075
- import.meta.dirname ?? path7.dirname(new URL(import.meta.url).pathname),
2076
- "prompt.md"
2077
- );
2076
+ var base = import.meta.dirname ?? path7.dirname(new URL(import.meta.url).pathname);
2077
+ var local = path7.join(base, "prompt.md");
2078
+ var PROMPT_PATH = fs13.existsSync(local) ? local : path7.join(base, "subagents", "browserAutomation", "prompt.md");
2078
2079
  var BROWSER_AUTOMATION_PROMPT = fs13.readFileSync(PROMPT_PATH, "utf-8").trim();
2079
2080
 
2080
2081
  // src/subagents/browserAutomation/index.ts
package/dist/index.js CHANGED
@@ -1053,22 +1053,24 @@ var init_writeFile = __esm({
1053
1053
  }
1054
1054
  },
1055
1055
  streaming: /* @__PURE__ */ (() => {
1056
- let lastLineCount = 0;
1056
+ let lastNewlineCount = 0;
1057
1057
  let lastPath = "";
1058
1058
  return {
1059
1059
  transform: async (partial) => {
1060
- if (partial.path !== lastPath) {
1061
- lastLineCount = 0;
1060
+ const newlineCount = partial.content.split("\n").length - 1;
1061
+ if (partial.path !== lastPath || newlineCount < lastNewlineCount) {
1062
+ lastNewlineCount = 0;
1062
1063
  lastPath = partial.path;
1063
1064
  }
1064
- const lines = partial.content.split("\n");
1065
- if (lines.length <= lastLineCount) {
1065
+ if (newlineCount <= lastNewlineCount) {
1066
1066
  return null;
1067
1067
  }
1068
- lastLineCount = lines.length;
1068
+ lastNewlineCount = newlineCount;
1069
+ const lastNewline = partial.content.lastIndexOf("\n");
1070
+ const completeContent = partial.content.substring(0, lastNewline + 1);
1069
1071
  const oldContent = await fs7.readFile(partial.path, "utf-8").catch(() => "");
1070
- return `Writing ${partial.path} (${lines.length} lines)
1071
- ${unifiedDiff(partial.path, oldContent, partial.content)}`;
1072
+ return `Writing ${partial.path} (${newlineCount} lines)
1073
+ ${unifiedDiff(partial.path, oldContent, completeContent)}`;
1072
1074
  }
1073
1075
  };
1074
1076
  })(),
@@ -2008,14 +2010,13 @@ var init_tools = __esm({
2008
2010
  // src/subagents/browserAutomation/prompt.ts
2009
2011
  import fs10 from "fs";
2010
2012
  import path4 from "path";
2011
- var PROMPT_PATH, BROWSER_AUTOMATION_PROMPT;
2013
+ var base, local, PROMPT_PATH, BROWSER_AUTOMATION_PROMPT;
2012
2014
  var init_prompt = __esm({
2013
2015
  "src/subagents/browserAutomation/prompt.ts"() {
2014
2016
  "use strict";
2015
- PROMPT_PATH = path4.join(
2016
- import.meta.dirname ?? path4.dirname(new URL(import.meta.url).pathname),
2017
- "prompt.md"
2018
- );
2017
+ base = import.meta.dirname ?? path4.dirname(new URL(import.meta.url).pathname);
2018
+ local = path4.join(base, "prompt.md");
2019
+ PROMPT_PATH = fs10.existsSync(local) ? local : path4.join(base, "subagents", "browserAutomation", "prompt.md");
2019
2020
  BROWSER_AUTOMATION_PROMPT = fs10.readFileSync(PROMPT_PATH, "utf-8").trim();
2020
2021
  }
2021
2022
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "MindStudio coding agent",
5
5
  "repository": {
6
6
  "type": "git",