@mindstudio-ai/remy 0.1.6 → 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
  })(),
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
  })(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "MindStudio coding agent",
5
5
  "repository": {
6
6
  "type": "git",